blob_id stringlengths 40 40 | language stringclasses 1
value | repo_name stringlengths 5 133 | path stringlengths 3 276 | src_encoding stringclasses 33
values | length_bytes int64 23 9.61M | score float64 2.52 5.28 | int_score int64 3 5 | detected_licenses listlengths 0 44 | license_type stringclasses 2
values | text stringlengths 23 9.43M | download_success bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|
8cdcc9b96ec98dd01125e6e298558004f345970c | SQL | tnelson2016/mysql-query-exam | /answers.sql | UTF-8 | 2,414 | 4.3125 | 4 | [] | no_license | /*
1) Select a distinct list of ordered airports codes. Be sure to name the column correctly. Be sure to order the results correctly.
*/
SELECT DISTINCT departAirport as Airports from flight;
/*
2)Provide a list of delayed flights departing from San Francisco (SFO).
*/
SELECT name, flightNumber, scheduledDepartDateTi... | true |
e72057532cf54aa1ac5829020028b796c478f93a | SQL | josepitteloud/VESPA | /ad_hoc/BB Churn process/Original code/Proc_FORECAST_Loop_Table_2_Weekly_Actions.sql | UTF-8 | 16,458 | 3.609375 | 4 | [] | no_license | Create variable Counter integer; Set Counter = 1;
Create variable multiplier bigint;
Create variable multiplier_2 bigint;
-- First you need to impersonate CITeam
Setuser CITeam;
-- Drop procedure if exists CITeam.Forecast_Loop_Table_2_Actions;
Create procedure CITeam.Forecast_Loop_Table_2_Actions(IN Counter inte... | true |
304c832d792127aed9f17e537a772a6c2f266feb | SQL | dragosconst/proiect-SGBD | /Tantaru_Dragos-Constantin_SQL.sql | UTF-8 | 16,840 | 3.625 | 4 | [] | no_license | -- Un subprogram care determina in care librarii se gaseste cartea introdusa ca parametru si ce abonamente o includ.
CREATE OR REPLACE PROCEDURE ex6 (v_nume_carte carti.denumire%TYPE )IS
TYPE string_tabel IS TABLE OF VARCHAR2(60) INDEX BY PLS_INTEGER;
TYPE number_tabel IS TABLE OF NUMBER INDEX BY PLS_INTEGER;
... | true |
4b9c438436c9b30eac3797aa1e72661a056f4e6f | SQL | HerrAugust/ServiceOrientedApplication | /SQL/bank.sql | UTF-8 | 2,104 | 3.6875 | 4 | [] | no_license | DROP DATABASE IF EXISTS bank;
CREATE DATABASE IF NOT EXISTS bank;
GRANT ALL PRIVILEGES ON bank.* TO 'bank'@'localhost' IDENTIFIED BY 'bank';
USE `bank`;
CREATE TABLE `addresses` (
`id` INT(6) NOT NULL AUTO_INCREMENT,
`street` VARCHAR(50) NOT NULL,
`city` VARCHAR(50) NOT NULL,
`country` VARCHAR(50) NOT NULL,
... | true |
61bd590be50ec27aa250a1befecc8c0a0b163b7d | SQL | complitex/flexpay | /eirc/etc/sql/update/2009_01_12.sql | UTF-8 | 598 | 3.09375 | 3 | [] | no_license | alter table eirc_quittance_packets_tbl
drop index eirc_quittance_packets_tbl_payment_id,
drop foreign key eirc_quittance_packets_tbl_payment_id;
alter table eirc_quittance_packets_tbl
change column payment_id payment_point_id bigint not null comment 'Payment point reference';
alter table eirc_quittance_packets_tbl... | true |
f271a726effbc9396f571a40d37360a4690a170c | SQL | lizcolores/codewars-sql | /BugFixing.sql | UTF-8 | 281 | 3.921875 | 4 | [] | no_license | SELECT
DISTINCT(j.job_title),
CAST(ROUND(SUM(j.salary)/COUNT(p), 2) AS float) as average_salary,
COUNT(p.id) as total_people,
CAST(ROUND(SUM(j.salary), 2) AS float) as total_salary
FROM people p
JOIN job j
ON p.id = j.people_id
GROUP BY j.job_title
ORDER BY average_salary desc;
| true |
a69e295289c8f5ce3726c2b59a314e4b41b297da | SQL | R2RITO/MPD-EM2015 | /Scripts - Originals/CA_Trap.sql | UTF-8 | 445 | 2.609375 | 3 | [] | no_license | CREATE OR REPLACE FUNCTION CA_Trap (CT_Domain VARCHAR2, CT_Label VARCHAR2)
RETURN Trapezoid_Objtyp
is
UD_reg UDLinLab_tab%rowtype;
CT_T Trapezoid_Objtyp;
BEGIN
SELECT * INTO UD_reg
FROM UDLinLab_tab
WHERE User_name=user AND Label=CT_Label AND Dom_name=CT_Domain;
CT_T:=UD_reg.Trapezoid;
RETU... | true |
e60af1919301894bce95d413ca458ceb04854d9f | SQL | ironartisan/tams | /src/main/resources/db/migration/V1.2__CreatePaper.sql | UTF-8 | 1,646 | 3.359375 | 3 | [] | no_license |
# 创建教改论文表
create table paper
(
ppno int(6) not null COMMENT '论文编号',
ppname varchar(50) null COMMENT '论文名称',
author int(11) null COMMENT '作者',
journal varchar(50) null COMMENT '期刊',
pubdate bigint(11) null COMMENT '出版日期',
rank varchar(50) null COMMENT '等级:SCI(006)、EI(JA)(007)、EI(CA)(008),核心(009)、计算机教育(010),一般(01... | true |
69bfdc68b2f21a7620df48186dc7554c853a0f92 | SQL | yifeng2019uwb/DataCampAndCodePractice | /Data-Analyst-with-SQL-Server/01-Introduction-to-SQL-Server/04-You're-got-power/11-Ultimate-Power.sql | UTF-8 | 1,264 | 4.5 | 4 | [] | no_license | /*
Ultimate Power
Sometimes you might want to 'save' the results of a query so you can do some more work with the data. You can do that by creating a temporary table that remains in the database until SQL Server is restarted. In this final exercise, you'll select the longest track from every album and add that into a t... | true |
70f9e1d6479e7edd3b34c05032e1db16152c78e7 | SQL | seat-project-2016/Python-Api-Code- | /seatdriversapp.sql | UTF-8 | 4,383 | 3.34375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.2.11
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Sep 10, 2016 at 02:20 PM
-- Server version: 5.6.21
-- PHP Version: 5.6.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
... | true |
445d273b52fa9e007bbb6e324cac9b7bffbe3432 | SQL | mannhuynh/PLSQL-by-Khaled-Part1 | /Section 13 - Woking with Packages/chapter-13-part-1.sql | UTF-8 | 3,652 | 3.625 | 4 | [] | no_license | drop table customer;
create table customer
(cust_id number,
name varchar2(100),
birthday date
);
--case 1 ( 2 procedure differ in number of parameters
create or replace package overload_proc
is
procedure add_cust(p_id number,p_name varchar2,p_bd date);
procedure add_cust(p_id number,p_name varchar2);
... | true |
ef7f8653015e6ce8b0a283afb3e7c602495ee561 | SQL | JailtonDPaula13/controle_de_ativos | /passos acesso/steps.sql | UTF-8 | 830 | 3.046875 | 3 | [] | no_license | --primeiro passo criara tablespace
CREATE TABLESPACE TS_ATV
DATAFILE 'C:\ORACLEXE\APP\ORACLE\ORADATA\XE\TS_ATIVOS.DBF'
SIZE 50M AUTOEXTEND ON NEXT 10M MAXSIZE 200M;
--segundo criar usuário
CREATE USER JAILTON --nomenclatura do LOGIN
IDENTIFIED BY JD1 --definição da senha de acesso
DEFAULT TABLESPACE TS_ATV --TABLESP... | true |
e21a916f6269534d2a647a7dcee6551b5026aab2 | SQL | ujjwalmishra/sociat | /api/schema.sql | UTF-8 | 2,313 | 3.546875 | 4 | [
"MIT"
] | permissive | CREATE EXTENSION postgis;
CREATE TABLE "User" (
"id" serial NOT NULL UNIQUE,
"email" varchar(255) NOT NULL UNIQUE,
"address" varchar(255),
"full_name" varchar(50) NOT NULL,
"area" integer NOT NULL,
"location" integer NOT NULL,
CONSTRAINT "User_pk" PRIMARY KEY ("id")
) WITH (
OIDS=FALSE
);
CREATE TABLE "Loc... | true |
0254af158d99feb37e51ff539ce2d4adfea7dc46 | SQL | citraput/HackerRank-SQL | /23-Type_Of_Triangle.sql | UTF-8 | 273 | 2.984375 | 3 | [] | no_license | SELECT CASE
WHEN A + B <= C OR A + C <= B OR B + C <= A THEN 'Not A Triangle'
WHEN A = B AND A = C AND B = C THEN 'Equilateral'
WHEN A != B AND A != C AND B != C THEN 'Scalene'
WHEN A = B OR A = C OR B = C THEN 'Isosceles'
END AS 'Type'
FROM TRIANGLES;
| true |
fbf7a07f3a47f17344bb7f0ad3aa45413f6a692d | SQL | fengruo/NetShopping | /src/shopping.sql | UTF-8 | 8,830 | 3.453125 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : localhost_3306
Source Server Version : 50716
Source Host : 127.0.0.1:3306
Source Database : shopping
Target Server Type : MYSQL
Target Server Version : 50716
File Encoding : 65001
Date: 2017-11-03 21:41:01
*/
SET FOREIGN_KEY_CHECKS=0;... | true |
c7d1052bfdad44e388df2c3c56d14c5dc6f0e3e8 | SQL | sduslu/twu-biblioteca-svenja | /TWU_Biblioteca_SQL/q2.sql | UTF-8 | 149 | 3.3125 | 3 | [
"Apache-2.0"
] | permissive | SELECT COUNT(name)
FROM member
WHERE member.id NOT IN (
SELECT member.id
FROM checkout_item, member
WHERE checkout_item.member_id = member.id
);
| true |
170355fdc7f05947e67f0cbfdff7fb837d834156 | SQL | nearmap/dbt_marketo | /models/intermediate/marketo__email_stats__by_program.sql | UTF-8 | 693 | 3.703125 | 4 | [] | no_license | with email_sends as (
select *
from {{ ref('marketo__email_sends') }}
), aggregated as (
select
program_id,
count(*) as count_sends,
sum(count_opens) as count_opens,
sum(count_bounces) as count_bounces,
sum(count_clicks) as count_clicks,
sum(count_deliverie... | true |
3379edc7d9e3958ac9f04fa9bf93d99aebcca714 | SQL | dabarc/DabarcStrategyNewDesignMabe | /DabarcStrategyNewDesign/dabarc/Stored Procedures/sp_XREF_DeletedRowOfXREF.sql | UTF-8 | 769 | 2.53125 | 3 | [] | no_license | CREATE PROCEDURE [dabarc].[sp_XREF_DeletedRowOfXREF](
@xref_id int,
@deleted_user nvarchar(15)
) AS
----------------------------------------------------------------------------
-- hay que validar si no se usar en un ODBC
--------------------------------------------------------------------------... | true |
f7d545b8440741e014d8beb62382b78cdfbf8c12 | SQL | wongak/xrmoddir | /resources/mysql/xrmoddir.sql | UTF-8 | 4,388 | 3.609375 | 4 | [
"MIT"
] | permissive | SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL,ALLOW_INVALID_DATES';
-- -----------------------------------------------------
-- Table `users`
-- --------------------------------------... | true |
e581fa0448cb4ae66ad556195961fb11ace4256d | SQL | alexbartley/SOCO-Test | /104909/CONTENT_REPO/Views/DEV_TAXABILITY_SEARCH_V.sql | UTF-8 | 4,983 | 3.421875 | 3 | [] | no_license | CREATE OR REPLACE FORCE VIEW content_repo.dev_taxability_search_v ("ID",reference_code,calculation_method_id,basis_percent,recoverable_percent,recoverable_amount,start_date,end_date,entered_by,entered_date,status,status_modified_date,rid,nkid,next_rid,jurisdiction_id,jurisdiction_nkid,jurisdiction_rid,jurisdiction_offi... | true |
c6f0774a17cc0f91fb98e9b1dac50da53faf2542 | SQL | gennova/Yudori | /9 oktober 2017.sql | UTF-8 | 153,214 | 3 | 3 | [] | no_license | /*
SQLyog Community v12.4.3 (64 bit)
MySQL - 10.1.25-MariaDB : Database - yudori
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_K... | true |
9c34365a5f85545276aabff70f7ca6575ce794e8 | SQL | bitslayer42/warranty | /src/MakingMopar.sql | UTF-8 | 7,654 | 3.734375 | 4 | [] | no_license | ALTER VIEW MakingMopar AS
-- Use this to create the data format to use on the website SORT IS IMPORTANT!
/*
select * from MakingMopar -- where term = '8/125K' and Class = 'b' And Ded = '200'
ORDER BY Class, PlanType, CAST(Ded AS INT),
CAST(dbo.NumericPart(LEFT(Term,CHARINDEX('/',Term))) AS INT), --years
CAST(dbo.Nume... | true |
bc6111376c05b186cfab879d7564b3bcac8e48a1 | SQL | MIoTMartinMoro/DII_PMulticapa | /localidad.sql | UTF-8 | 354 | 2.921875 | 3 | [] | no_license |
CREATE DATABASE IF NOT EXISTS `miot`;
USE `miot`;
DROP TABLE IF EXISTS `localidad`;
CREATE TABLE `localidad` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`nombre` varchar(45) NOT NULL,
`latitud` int(11) NOT NULL,
`longitud` int(11) NOT NULL,
`activo` int(11) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `nombre... | true |
526a1eb9866becab2fa281f70dfb81862e06e7f2 | SQL | architanasit/InsuranceApp | /sql/insurence.sql | UTF-8 | 5,891 | 3.640625 | 4 | [] | no_license | DROP TABLE IF EXISTS offers CASCADE;
commit;
DROP TABLE IF EXISTS coupons CASCADE;
commit;
DROP TABLE IF EXISTS policy CASCADE;
commit;
DROP TABLE IF EXISTS quotes CASCADE;
commit;
DROP TABLE IF EXISTS claims CASCADE;
commit;
DROP TABLE IF EXISTS masterinfo CASCADE;
commit;
DROP TABLE IF EXISTS ref_city CASCADE;
... | true |
b0d7daceb4b4b3f8d32426f651c7ee93fa253232 | SQL | silence-do-good/stress-test-Postgres-and-MySQL | /dump/low/day26/select1142.sql | UTF-8 | 178 | 2.6875 | 3 | [] | no_license |
SELECT timeStamp, temperature FROM ThermometerOBSERVATION o
WHERE timestamp>'2017-11-25T11:42:00Z' AND timestamp<'2017-11-26T11:42:00Z' AND temperature>=42 AND temperature<=98
| true |
d90ab2d2471c580c147159f4fdc8e5482d013840 | SQL | computationalmystic/Zephyr-group12 | /ERD/Sprint2.sql | UTF-8 | 1,296 | 3.609375 | 4 | [] | no_license | Create Table Users(
UserID int not null,
UserName varchar(255),
UserPassword varchar(255),
AccessLevel varchar(255),
Primary key (UserID)
);
Create Table Room (
RoomNum int not null,
RoomType Varchar (255),
UserID int,
Foreign key (UserID) references Users(UserID),
primary key (RoomNum)
);
Create Table Thermostat(
Th... | true |
418db164f4ac5897c846319239b8fe8aca6ee935 | SQL | neurotech/edumate-extensions | /sql/reports/global_reportable-courses.sql | UTF-8 | 2,897 | 4.78125 | 5 | [] | no_license | WITH unique_classes AS (
SELECT
(CASE WHEN class_type_id = 2 THEN 'Home Rooms' ELSE ('Year ' || LEFT(course, 2)) END) AS "SORT_ORDER",
course_id,
course,
class_id,
class,
student_id,
start_date,
end_date
FROM view_student_class_enrolment
WHERE
academic_year = YEAR(current d... | true |
b507e8cfc9862084f3078f127720c506a4da897d | SQL | 896637210/mysql | /cmd_directions.sql | UTF-8 | 3,033 | 3.53125 | 4 | [] | no_license | -- mysql -uroot -proot
-- mysql>_
-- 查看数据库列表
-- show databses;
-- 打开数据库
-- use mysql;
-- 查看数据表列表
-- show tables;
-- 查询数据表
-- SELECT * FORM user;
-- SELECT host, user, password FROM user;
-- [_$a-zA-Z0-9]
-- 创建数据库 CREATE DATABASE ***;
-- CREATE DATABASE myBlog;
-- 快捷键:大写<Ctrl>+<K>,<Ctrl>+<U>,小写... | true |
77dd86a39172c57b2c3fa54914cd3eb666533596 | SQL | ejimenezdelgado/Aplica_db_martes_1_2018 | /Clase 10/CLASE_10_2.sql | UTF-8 | 7,965 | 2.875 | 3 | [] | no_license | --Se insertan las regiones
INSERT INTO region VALUES(1001, 'Sur de Asia');
INSERT INTO region VALUES(1002, 'Medio Oeste');
INSERT INTO region VALUES(1003, 'Noreste de Europa' );
INSERT INTO region VALUES(1007, 'América del Norte');
-- Se insertan todos los departamentos
INSERT INTO departamento VALUES(30,'Ventas',201... | true |
5dfe63cfcc6c1c50e2bc8836cd35dd65a4367d1d | SQL | nss-day-cohort-48/chinook-anmonzi | /Chinook queries/27_top_media_type.sql | UTF-8 | 249 | 3.59375 | 4 | [] | no_license | SELECT
m.name as MediaType,
COUNT(il.InvoiceId) as NumberSold
FROM InvoiceLine as il
JOIN Track as t
ON il.TrackId = t.TrackId
JOIN MediaType as m
ON t.MediaTypeId = m.MediaTypeId
GROUP BY MediaType
ORDER BY NumberSold DESC
LIMIT 1;
| true |
bf58c5da226e045b4db1a05c9a64c8ff05c19096 | SQL | Muhammadaan/lelang | /db.sql | UTF-8 | 4,650 | 3.078125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: May 01, 2019 at 03:19 PM
-- Server version: 8.0.15
-- PHP Version: 7.1.16
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACT... | true |
909add016de17a5d8d30747920232cc23177c295 | SQL | EricPPerry/CT-Wk4-Homework | /day-1/homework-day-1.sql | UTF-8 | 1,895 | 4.71875 | 5 | [] | no_license | -- 1. How many actors are there with the last name "Wahlberg"?
SELECT COUNT(last_name) AS Wahlbergers
FROM actor
WHERE last_name = 'Wahlberg';
--2. How many payments were made between $3.99 and $5.99?
SELECT COUNT(amount) AS Payments_between_399_599
FROM payment
WHERE amount BETWEEN 3.99 AND 5.99;
--3. What film does... | true |
0997030c7bc42b9d5827e3e63579fb7df29f4cbb | SQL | subashcs/infrainit | /well-known/ibuild/ibuild.sql | UTF-8 | 25,558 | 3.046875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Mar 21, 2018 at 05:04 PM
-- Server version: 10.1.30-MariaDB
-- PHP Version: 7.2.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
de95507b57e00b5519501b82d4dc5553168112a8 | SQL | silence-do-good/stress-test-Postgres-and-MySQL | /dump/high/day10/select1341.sql | UTF-8 | 265 | 3 | 3 | [] | no_license |
SELECT sen.name
FROM SENSOR sen, SENSOR_TYPE st, COVERAGE_INFRASTRUCTURE ci
WHERE sen.SENSOR_TYPE_ID=st.id AND st.name='WeMo' AND sen.id=ci.SENSOR_ID AND ci.INFRASTRUCTURE_ID=ANY(array['2228','5219','3026','2011','5100_3','3100_10','6076','5099','4091','4086'])
| true |
8fe51fcc129acb7ff02d948ba3dde5dd47c91dca | SQL | Shimpijain/demo | /demo.sql | UTF-8 | 2,122 | 2.953125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Sep 22, 2021 at 11:03 AM
-- Server version: 10.4.20-MariaDB
-- PHP Version: 8.0.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... | true |
cabcedefe31e7f8d1349483d95cf3a622de8a864 | SQL | NelliBtn/BootcampX | /4_queries/assistance_request_data.sql | UTF-8 | 392 | 3.796875 | 4 | [] | no_license | SELECT teachers.name as teacher,
students.name as student,
assignments.name as assignment,
(completed_at - started_at) as duration
FROM assistance_requests
JOIN students ON students.id = assistance_requests.student_id
JOIN teachers ON teachers.id = assistance_requests.teacher_id
JOIN assignments O... | true |
77558d391c3abf06c94c32285a2a8e018310b4f9 | SQL | sejalvijaynaik/swabhav | /SQL/clustered index practice/clustered index practice.sql | UTF-8 | 331 | 3.4375 | 3 | [] | no_license | create table foo(
id int,
description varchar(100)
);
desc foo;
insert into foo(id, description)
values(2, '60'),
(5, '10'),
(3, '20'),
(6, '40'),
(1, '30'),
(4, '50');
select * from foo;
alter table foo
add primary key(id);
--non clustered index maintains insertion order
--clustered index maintains ascen... | true |
7b74f84dc32bba608fb444e404ab8c1068509af5 | SQL | bitcafe24-byungkwan/sqlpractice | /mariadbSql/webdb190507.sql | UTF-8 | 964 | 3.84375 | 4 | [] | no_license | #outter join
/*insert into department values (null, '총무팀');
insert into department values (null, '인사팀');
insert into department values (null, '개발팀');
insert into department values (null, '영업팀');
*/
select * from department;
/*insert into employee values(null,'둘리',1);
insert into employee values(null,'마이클',2);
insert i... | true |
fa02be65ad04eeb1eaca9827eaff7b72e82ec21a | SQL | LabKey/cnprcEHRModules | /cnprc_ehr/resources/queries/study/Home Location.sql | UTF-8 | 900 | 3.21875 | 3 | [
"Apache-2.0"
] | permissive | /*
* Copyright (c) 2017-2018 LabKey Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable l... | true |
d7771bc52f20e6b491e8a3aa27a64b2944c3e764 | SQL | waylostreamers/db | /watlostreamspostgresscript.sql | UTF-8 | 7,117 | 3.671875 | 4 | [] | no_license | create table roles
(
role_id serial not null
constraint roles_pk
primary key,
role_description varchar
);
alter table roles
owner to postgres;
create unique index roles_role_id_uindex
on roles (role_id);
create table contributors
(
artist_id integer,
role_id ... | true |
8d82e218e3f6b52aec0287ad122150dae4800bbc | SQL | KyleMerc/mysql | /intermed_exercise/exercise4_join.sql | UTF-8 | 292 | 4.1875 | 4 | [] | no_license | SELECT DISTINCT employeeNumber, CONCAT(firstName, ' ', lastName) AS employeeName, COUNT(c.customerNumber) AS customerCount
FROM employees e
LEFT JOIN customers c ON c.salesRepEmployeeNumber = e.employeeNumber
WHERE jobTitle = 'Sales Rep'
GROUP BY employeeNumber
ORDER BY customerCount DESC;
| true |
d6a8369c087b991ee2d55c6868af1ff7c6581d77 | SQL | gervasiodbjr/simplechat | /migrate/simplechat_20180418.sql | UTF-8 | 3,802 | 3.1875 | 3 | [] | no_license | CREATE DATABASE IF NOT EXISTS `simplechat` /*!40100 DEFAULT CHARACTER SET utf8 */;
USE `simplechat`;
-- MySQL dump 10.13 Distrib 5.7.21, for Linux (x86_64)
--
-- Host: localhost Database: simplechat
-- ------------------------------------------------------
-- Server version 5.7.21-0ubuntu0.16.04.1
/*!40101 SET @O... | true |
19a1c2d45321d394a9cf2d11fbcdecb6299446fb | SQL | silence-do-good/stress-test-Postgres-and-MySQL | /dump/high/day28/select2230.sql | UTF-8 | 178 | 2.6875 | 3 | [] | no_license |
SELECT timeStamp, temperature FROM ThermometerOBSERVATION o
WHERE timestamp>'2017-11-27T22:30:00Z' AND timestamp<'2017-11-28T22:30:00Z' AND temperature>=21 AND temperature<=71
| true |
a301f35f0877811cad727cc4c32e1cc8f70e8894 | SQL | nateharrell123/OAHeLP-Database-Project | /Stored Procedures/SP_GetMedicalHistory.sql | UTF-8 | 607 | 3.75 | 4 | [] | no_license | CREATE PROCEDURE [Subject].GetMedicalHistory
@SubjectId INT
AS
SELECT V.Name AS Village, CV.[Date], Cn.Code AS Clinician, BodyTempDegC AS Temp, WeightKG AS Wt, PercentBodyFat AS BodyFat,
HeightCM AS Ht, WBCCount,
IsPregnant, TobaccoUse, AlcoholUse
FROM Clinic.ClinicVisit CV
INNER JOIN Clinic.Clinic C ... | true |
7c31bad36aaa8fcfe680da4680a425fa58373e31 | SQL | shengjies/springdemo | /ssmshiro/shiro.sql | UTF-8 | 4,994 | 3.171875 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 8.0.13, for Win64 (x86_64)
--
-- Host: localhost Database: shiro
-- ------------------------------------------------------
-- Server version 8.0.13
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40... | true |
8b59b1d853657ef800723c70a0a6b29e56798441 | SQL | riyadavis/work | /work.sql | UTF-8 | 4,560 | 3.671875 | 4 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | create DATABASE work;
create TABLE deliveryAddress(id int PRIMARY KEY AUTO_INCREMENT, customerName varchar(25), customerAddress text, deliveryPincode int,landmark text, mobileNumber varchar(12),deliverTo varchar(10));
CREATE TABLE category(id int PRIMARY KEY AUTO_INCREMENT,category_name varchar(20),product_tag text);... | true |
d437078182839c9b813e941d68bccc29abbc1328 | SQL | YyzHarry/Dynamic_Webpage | /aqi.sql | UTF-8 | 4,293 | 2.984375 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 5.7.12, for Win64 (x86_64)
--
-- Host: localhost Database: aqidata
-- ------------------------------------------------------
-- Server version 5.7.16-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESU... | true |
e81b3291f9ae67846f9ef348d36c539c3ca82530 | SQL | Arik096/Laravel_8 | /example-app-v0.1/database/test1.sql | UTF-8 | 15,215 | 3.109375 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jul 07, 2021 at 03:46 PM
-- Server version: 10.4.19-MariaDB
-- PHP Version: 8.0.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... | true |
cdebecf839e8ca9501d3ddfa85acdb7984e0106f | SQL | keroroishappy/sql-example | /finish/college_nddzb.sql | UTF-8 | 2,131 | 2.734375 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 8.0.13, for Win64 (x86_64)
--
-- Host: 192.168.99.100 Database: college
-- ------------------------------------------------------
-- Server version 8.0.13
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RES... | true |
b6ca08898912fa2981183f18220843b47ee2da7c | SQL | albertomattos/SQL_gerais | /DBA/Tablespace 2 clean.sql | UTF-8 | 2,103 | 3.9375 | 4 | [] | no_license | SELECT t.table_name AS "TABLE_NAME", t.num_rows AS "Rows", t.avg_row_len AS "Avg Row Len", Trunc((t.blocks * p.value)/1024) AS "Size KB",
t.last_analyzed AS "Last Analyzed" FROM dba_tables t, v$parameter p WHERE t.owner = Decode(Upper('ADMWPD'), 'ALL', t.owner, Upper('ADMWPD'))AND
p.name = 'db_block_size' and t.last_an... | true |
c840a543a9892b7ab160115f93e2d857fd05d92b | SQL | JorgeDuenasLerin/basesdedatos-dam1 | /apuntes/3/trabajosCreacionTablas/AlquilerCoches_ZahiraZamora_CarlosDominguez/AlquilerCoches_ZahiraZamora_CarlosDominguez/4.sql | ISO-8859-1 | 3,218 | 3.0625 | 3 | [] | no_license | --Base de Datos Alquiler de Coches
--Autor: Zahira Zamora y Carlos Dominguez
--Parte4 Insercion Datos2
--Datos para Mercedes Clase B con
--Matrcula 1234ABC (error enunciado cogemos fecha compra 1/1/2011)
INSERT INTO revisiones_itv
(cod_rev_itv,nbastidor,fecha_prevista)
values (1,'O123456789BCDFTYH',to_dat... | true |
7442329602cb31d9d723ebcbadd311a60a76cd2d | SQL | syrus-ru/amficom | /AMFICOM/v1/database/schema/measurement/dictionary/modelingtype.sql | UTF-8 | 242 | 2.53125 | 3 | [] | no_license | -- $Id: modelingtype.sql,v 1.2 2005/09/28 10:34:02 arseniy Exp $
CREATE TABLE ModelingType (
code NUMBER(2, 0),
codename VARCHAR2(32 CHAR) NOT NULL,
--
CONSTRAINT modtyp_pk PRIMARY KEY (code),
CONSTRAINT modtyp_uniq UNIQUE (codename)
);
| true |
81b803f31680608ee0f5c8a6c999dd9d5954d1b9 | SQL | kotegawa-arashi/it-automation | /ky_sql_seeds/TABLE_CONFIG/ita_model-l4.sql | UTF-8 | 2,553 | 2.65625 | 3 | [
"LGPL-3.0-only",
"Apache-2.0",
"MIT"
] | permissive | -- *****************************************************************************
-- *** ***** CreateParameterMenu Tables ***
-- *****************************************************************************
CREATE TABLE F_MATERIAL_LINKAGE_TERRAFORM
(
ROW_ID ... | true |
e36d30e15a456d5c94c998e74eccfac73984174a | SQL | manuelolmos/products_tracker | /priv/dbs/ptracker.cql | UTF-8 | 270 | 2.703125 | 3 | [
"Apache-2.0"
] | permissive | DROP KEYSPACE IF EXISTS ptracker;
CREATE KEYSPACE ptracker WITH replication = { 'class' : 'SimpleStrategy', 'replication_factor' : '3'} AND durable_writes = true;
CREATE TABLE ptracker.products (
name text PRIMARY KEY,
prize int,
date text,
seller text
);
| true |
8d0ba966fce0a68d7f8599d2fb5403de28a52c22 | SQL | Mihriban-Karakilic/mihribankarakilic | /TeleponeDirectory_SQLQuery.sql | UTF-8 | 563 | 2.703125 | 3 | [] | no_license | create database TeleponeDirectory
use TeleponeDirectory
create table Directory
(
DirectoryId int identity(1,1) primary key,
Firstname nvarchar(max),
LastName nvarchar(max),
EmailAddress nvarchar(max),
Telepone1 nvarchar(max),
Telepone2 nvarchar(max),
Telepone3 nvarchar(max),
FacebookURI nvarchar(max),
Twite... | true |
d7202002a3691c376dd2b6404d7c87a932dc3df6 | SQL | IliaIliev94/SoftUni-Work | /C# MS SQL/Table Relations Exercise/06. University Database.sql | UTF-8 | 752 | 3.734375 | 4 | [] | no_license | CREATE DATABASE University
CREATE TABLE Majors
(
MajorID INT PRIMARY KEY,
Name VARCHAR(50) NOT NULL
)
CREATE TABLE Students
(
StudentID INT PRIMARY KEY,
StudentNumber VARCHAR(20) NOT NULL,
StudentName VARCHAR(50) NOT NULL,
MajorID INT FOREIGN KEY REFERENCES Majors(MajorID)
)
CREATE TABLE Payments
(
PaymentID ... | true |
e66dc47b487318be24a8cd10a1bc0db1f16daf0d | SQL | jurgenei/SqlXmlAst | /examples/plsql/plsql_procedure_implicit_results1.sql | UTF-8 | 510 | 3.5625 | 4 | [] | no_license | /* procedure returning implicit result
from https://www.oracletutorial.com/plsql-tutorial/oracle-implicit-statement-results/ */
CREATE OR REPLACE PROCEDURE get_customer_by_credit(
min_credit NUMBER
)
AS
c_customers SYS_REFCURSOR;
BEGIN
-- open the cursor
OPEN c_customers FOR
SELECT customer_i... | true |
00a40cf137070250b6b63421abc4beacb5edac6f | SQL | reata/sqllineage | /sqllineage/data/tpcds/query23.sql | UTF-8 | 4,338 | 3.296875 | 3 | [
"MIT"
] | permissive | insert into query23
with frequent_ss_items as
(select substr(i_item_desc, 1, 30) itemdesc, i_item_sk item_sk, d_date solddate, count(*) cnt
from store_sales
, date_dim
, item
where ss_sold_date_sk = d_date_sk
and ss_item_sk = i_item_sk
and d... | true |
1db2b0a32c33c92f0e39afb704f06ae56797efb1 | SQL | Charlotte-Ardaens/dataV2-labs | /module-1/Advanced-mySQL/solutions.sql | UTF-8 | 2,124 | 4.15625 | 4 | [] | no_license | ###CHALLENGE 1
#step1
select ta.title_id as TitleID, ta.au_id as AuthorID, (t.advance*ta.royaltyper/100 ) as 'Advance', (t.price * s.qty * t.royalty / 100 * ta.royaltyper / 100) as 'Sales_Royalties'
from titleauthor ta
left join titles t on t.title_id = ta.title_id
left join sales s on s.title_id =ta.title_id;
#st... | true |
88c23f8c99f5adf4ded4f9bfb674a4540a8ef257 | SQL | seymafirat/CarProject | /RecapProjectDatabase.sql | UTF-8 | 779 | 3.25 | 3 | [] | no_license |
Create Table Car(
CarId int primary key IDENTITY(1,1),
CarName varchar(100) NOT NULL,
BrandId int NOT NULL,
ColorId int NOT NULL,
ModelYear varchar(4) NOT NULL,
DailyPrice int NOT NULL,
Description varchar(100) NOT NULL,
)
Create Table Color(
ColorId int primary key IDENTITY(1,1),
ColorName varchar(50) NOT NULL,
)
Cr... | true |
02edae0d01097a8ecb330640fc856bb79d99a741 | SQL | steffchep/yanap | /create_tables.sql | UTF-8 | 939 | 2.9375 | 3 | [] | no_license | CREATE TABLE "sprints" (
"id" BIGINT NOT NULL DEFAULT NULL,
"name" VARCHAR(255) NOT NULL DEFAULT NULL,
"startDate" DATE NOT NULL DEFAULT NULL,
"endDate" DATE NOT NULL DEFAULT NULL,
"status" INT NOT NULL DEFAULT '1',
PRIMARY KEY ("id")
)
;
CREATE TABLE "users" (
"id" BIGINT NOT NULL DEFAULT NULL,
"name" VARCHAR... | true |
bfa0b1ee4c311df31b98be7ccb23e8a17c5b6dc2 | SQL | armbiant/dropbox-hermes | /db/update_to_046.sql | UTF-8 | 608 | 2.65625 | 3 | [
"Apache-2.0"
] | permissive | ALTER TABLE `fates` ADD `for_owner` INT(1) NOT NULL DEFAULT 1 AFTER `follows_id`;
ALTER TABLE `fates` ADD `for_creator` INT(1) NOT NULL DEFAULT 0 AFTER `follows_id`;
ALTER TABLE `labors` ADD `for_owner` INT(1) NOT NULL DEFAULT 1 AFTER `host_id`;
ALTER TABLE `labors` ADD `for_creator` INT(1) NOT NULL DEFAULT 0 AFT... | true |
e3439f4db0673e6f87ecd4f16d4addaeeb6ca34c | SQL | gooelg/Jshop_mall | /word/2019-10-09-发货单订单关联表.sql | UTF-8 | 608 | 3.015625 | 3 | [] | no_license | SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for jshop_bill_delivery_order_rel
-- ----------------------------
DROP TABLE IF EXISTS `jshop_bill_delivery_order_rel`;
CREATE TABLE `jshop_bill_delivery_order_rel` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
`or... | true |
4858a87c9604eb12f38314a475efcb1dab155c44 | SQL | victorhrvs/projeto-de-banco-de-dados | /docs/procedure/procedure_GetAcessoNotebook.sql | UTF-8 | 535 | 3.421875 | 3 | [] | no_license | CREATE DEFINER=`root`@`localhost` PROCEDURE `GetAcessoNotebook`()
BEGIN
DECLARE total_de_alunos_com_cadastro INT;
DECLARE notebook INT;
SELECT
count(*) into total_de_alunos_com_cadastro
FROM
socioeconomico
order by
renda_per_capita;
SELECT
count(*) into notebook
FROM
notebook;
IF (t... | true |
4658e9a0570c66c3f6d28c2d5643dded498fb0da | SQL | kobimac/INFS3202-iFlyEvents | /DB_Script/ifly.sql | UTF-8 | 1,293 | 4.03125 | 4 | [] | no_license | create table event
(
event_id int not null auto_increment
primary key,
event_location_id int not null,
event_date date null,
event_start_time time null,
constraint event_event_id_uindex
unique (event_id)
)
;
create index event_locations_location_id_fk
on event (event_location_id)
;
create table locations
(
... | true |
211325f7f16d6a0a7bcb4fcfe2fac8c311f207f6 | SQL | ares1060/theFoundation | /_services/Checklist/install/checklist.sql | UTF-8 | 1,675 | 3.140625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 2.11.7.1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Erstellungszeit: 25. Februar 2011 um 23:55
-- Server Version: 5.0.41
-- PHP-Version: 5.2.6
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACT... | true |
141963d55b9ac5c30b46bc145abc58cea3206857 | SQL | cfoxleyevans/HackSmart14 | /model/sql/db.sql | UTF-8 | 2,541 | 3.25 | 3 | [
"MIT"
] | permissive | # ************************************************************
# Sequel Pro SQL dump
# Version 4096
#
# http://www.sequelpro.com/
# http://code.google.com/p/sequel-pro/
#
# Host: 127.0.0.1 (MySQL 5.6.15)
# Database: wonder
# Generation Time: 2014-03-07 01:27:45 +0000
# **************************************************... | true |
89c70c730f7f9a568f6d1d7dec3a16fd020ce9c3 | SQL | jaimeirazabal1/productos_espera | /productos_espera_cesar (2).sql | UTF-8 | 23,601 | 3 | 3 | [
"BSD-3-Clause"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 02-04-2016 a las 10:52:01
-- Versión del servidor: 10.1.9-MariaDB
-- Versión de PHP: 5.6.15
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=... | true |
4e3aa01c54520b7a9c98e6569e30b0743832dd77 | SQL | algsalmon/Iscored.net | /iscored /db/Backups_Online/iscored_db_26092012.sql | UTF-8 | 29,071 | 3.3125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 3.4.10.1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Sep 26, 2012 at 02:46 AM
-- Server version: 5.1.63
-- PHP Version: 5.2.9
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
... | true |
779a8df14ae23849d33de24e2f27146057a04e31 | SQL | cdesmarais/WebDB-Test | /WebDB/StoredProcedures/Common/dbo.Admin_FoodType_Get.PRC | UTF-8 | 811 | 3.609375 | 4 | [] | no_license | if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Admin_FoodType_Get]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[Admin_FoodType_Get]
GO
CREATE PROCEDURE dbo.Admin_FoodType_Get
@FoodTypeID nvarchar(255)
As
SET NOCOUNT ON
SET TRANSACTION ISOLATION LEVEL READ UNCOMMIT... | true |
588bcf4d1477cf3ba142a50b8d6ca08608af8edb | SQL | NadiaAbd/project | /tbase.sql | UTF-8 | 16,846 | 3.328125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.4
-- https://www.phpmyadmin.net/
--
-- Hôte : 127.0.0.1:3306
-- Généré le : ven. 25 juin 2021 à 01:52
-- Version du serveur : 5.7.24
-- Version de PHP : 7.3.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET... | true |
44c483fe8ed64d1d8b6a48eabdec991bc217bec6 | SQL | AslanKussein/htc-data-manager | /src/main/resources/db/migration/postgres/V20200618113300__Abzal_alter_purchase_data.sql | UTF-8 | 411 | 2.703125 | 3 | [] | no_license | alter table htc_dm_purchase_data
add column pay_type_id bigint default null,
add column payed_sum numeric(19, 2) default null,
add column payed_client_login varchar(255) default null,
add column is_payed boolean default false;
alter table htc_dm_purchase_data
add constraint htc_dm_purchase_data_ht... | true |
a911917ac1eb7aac188cef5c108fca5af26211fb | SQL | martlaus/kasutajaliidesed-api | /misc/database/createTables.sql | UTF-8 | 2,338 | 3.703125 | 4 | [] | no_license | USE kasutajaliidesedApi;
-- Drop tables
SET foreign_key_checks = 0;
DROP TABLE IF EXISTS User;
DROP TABLE IF EXISTS Joke;
DROP TABLE IF EXISTS AuthenticatedUser;
DROP TABLE IF EXISTS Vote;
DROP TABLE IF EXISTS Comment;
SET foreign_key_checks = 1;
-- Create tables
CREATE TABLE User (
id BIGINT AUTO_INC... | true |
31ff37b198521cf3c6578755e44c70ac7a0aaaac | SQL | iklu/PHP | /SQL/group.sql | UTF-8 | 405 | 3.65625 | 4 | [] | no_license | SELECT
locationState AS state,
locationCity AS city,
storeId AS store_id
FROM (
SELECT
locationState,
locationCity,
storeId
FROM stores
WHERE
locationState = 'TX'
OR locationCity = 'houston'
OR storeId = 75
GROUP BY
locationState
) AS stores
SELECT
locationState,
locationCity,
storeId
FROM stores
WHERE
loca... | true |
a85e52c80312f6fd91377b4bbe0c77a40775606a | SQL | jnguyen27/CMPS182 | /lab3/createindex.sql | UTF-8 | 180 | 2.9375 | 3 | [] | no_license | /* Create an index named LookUpPosts over the posterID and postDate columns (in that order) of the ChirpPosts table */
CREATE INDEX LookUpPosts ON ChirpPosts(posterID, postDate);
| true |
8a9ad94c5a31bc92d272c69e89e69f56b3b0484d | SQL | lirance/errands | /src/main/resources/sql/errands.sql | UTF-8 | 1,385 | 3.546875 | 4 | [] | no_license |
------------------------------------
DROP TABLE IF EXISTS `user_order`;
DROP TABLE IF EXISTS `user`;
DROP TABLE IF EXISTS `order`;
------------------------------------
--user table
CREATE TABLE `user` (
`userId` int(20) NOT NULL AUTO_INCREMENT,
`userName` varchar(40) NOT NULL,
`password` varchar(255) NOT NULL,
... | true |
063630d161005a26c6d7417537fe1116ce03fc48 | SQL | mdecourci/spark_scala_example | /report-daily.sql | UTF-8 | 344 | 3.734375 | 4 | [] | no_license | SELECT count(PRODUCT_SOLD_ID) FROM SALES;
SELECT * FROM (
SELECT sum(s.SOLD_PRICE) as total, s.PRODUCT_SOLD_ID FROM dev.SALES s
group by s.PRODUCT_SOLD_ID) p order by p.total desc LIMIT 1;
SELECT * FROM (
SELECT count(s.PRODUCT_SOLD_ID) as total, s.PRODUCT_SOLD_ID FROM dev.SALES s
group by s.PRODUCT_SOLD_ID) p order ... | true |
69108a37706f801c2477e97df05b2a69a6d500be | SQL | ClickHouse/ClickHouse | /tests/queries/0_stateless/01278_alter_rename_combination.sql | UTF-8 | 1,629 | 3.828125 | 4 | [
"Apache-2.0",
"BSL-1.0"
] | permissive | DROP TABLE IF EXISTS rename_table;
CREATE TABLE rename_table (key Int32, value1 Int32, value2 Int32) ENGINE = MergeTree ORDER BY tuple() SETTINGS min_bytes_for_wide_part=0;
INSERT INTO rename_table VALUES (1, 2, 3);
-- replace one with other
ALTER TABLE rename_table RENAME COLUMN value1 TO old_value1, RENAME COLUMN ... | true |
1d6ebfe521a113fe21a6b50259eb68bb59b5a37a | SQL | silence-do-good/stress-test-Postgres-and-MySQL | /dump/low/day18/select2032.sql | UTF-8 | 178 | 2.671875 | 3 | [] | no_license |
SELECT timeStamp, temperature FROM ThermometerOBSERVATION o
WHERE timestamp>'2017-11-17T20:32:00Z' AND timestamp<'2017-11-18T20:32:00Z' AND temperature>=46 AND temperature<=49
| true |
f59235caa5080cbef9e12be89bcd947d38a059a3 | SQL | jenniferaguirre/handlebars | /db/schema.sql | UTF-8 | 292 | 3.015625 | 3 | [] | no_license | CREATE DATABASE IF NOT EXISTS burgers_db;
USE burgers_db;
DROP TABLE IF EXISTS burgers;
CREATE TABLE burgers (
id int NOT NULL AUTO_INCREMENT,
burger_name varchar(255) NOT NULL,
createdAt TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (id)
);
| true |
e1b390ce585bc09aefc26f53dae44683b06ddd27 | SQL | muhamadanwarsaputra/CRUDwithLoginPhp | /db_skkni.sql | UTF-8 | 2,264 | 3.03125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.6.5.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: 27 Mar 2019 pada 17.09
-- Versi Server: 10.1.21-MariaDB
-- PHP Version: 5.6.30
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CL... | true |
4a1fcc9a778a2e9d8220811f6c310f6cf878bce0 | SQL | OnePlc/PLC_X_Article_Number_Autoincrement | /data/install.sql | UTF-8 | 797 | 2.78125 | 3 | [
"BSD-3-Clause"
] | permissive | --
-- Add custom art nr to article structure
--
ALTER TABLE `article` ADD `custom_art_nr` VARCHAR(50) NOT NULL DEFAULT '' AFTER `label`;
--
-- add new readonly field to form
--
INSERT INTO `core_form_field` (`Field_ID`, `type`, `label`, `fieldkey`, `tab`, `form`, `class`, `url_view`, `url_list`, `show_widget_left`, `a... | true |
7cfb21bf12808d49d3255685daeac241b0179958 | SQL | slybag/LegoManager | /LegoManager-backend/src/main/resources/testdata.sql | UTF-8 | 5,776 | 2.609375 | 3 | [] | no_license | -- categories
INSERT INTO PA165.CATEGORY (ID, DESCRIPTION, "NAME") VALUES (1, 'Category for star wars themed items', 'Star Wars');
INSERT INTO PA165.CATEGORY (ID, DESCRIPTION, "NAME") VALUES (2, 'Category for Duplo themed items', 'duplo');
INSERT INTO PA165.CATEGORY (ID, DESCRIPTION, "NAME") VALUES (3, 'Category for Ma... | true |
3972f07959b5d577deb525af56c7196ac8c08d1f | SQL | misoten-iw-g2/lovechan | /go/src/app/migrations/5_requests.sql | UTF-8 | 508 | 3.046875 | 3 | [
"MIT"
] | permissive | -- +migrate Up
CREATE TABLE requests
(
id bigint NOT NULL AUTO_INCREMENT COMMENT 'id',
request_display varchar(100) NOT NULL COMMENT 'リクエスト表示名',
request varchar(200) NOT NULL COMMENT 'リクエスト',
video_file_name varchar(100) NOT NULL COMMENT '動画ファイル名',
voice_file_name varchar(100) NOT NULL COMMENT '音声ファイル名',
PRIMARY ... | true |
2eae5f656474e922c8cc72084aee10bca06ae3cc | SQL | sahasrara62/quizmania | /finaldata.sql | UTF-8 | 26,571 | 2.5625 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Nov 21, 2016 at 07:58 PM
-- Server version: 10.1.19-MariaDB
-- PHP Version: 5.5.38
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CL... | true |
d22d8b2e0c5679f65f61445f893df6791a858309 | SQL | juanfevargax2/Scripts | /Genericos/GENERIC V6/GENERIC_DATA.sql | UTF-8 | 3,095 | 3.546875 | 4 | [] | no_license | DROP TABLE METADATA_DESTINATION;
DROP TABLE TRANSFORMATIONS;
DROP TABLE METADATA_SOURCE;
DROP TABLE DATA_GENERATOR;
DROP TABLE PEQS;
DROP TABLE JOINS;
DROP TABLE ERROR_MESSAGES;
DROP TABLE INTERFACE_ASSIGNED;
DROP TABLE SQL_TEXT;
DROP TABLE SOURCES;
DROP TABLE ASSIGNMENT;
CREATE TABLE
ASSIGNMENT
(
COD NUMBER PRIMARY ... | true |
f5c203c46d3c7e8a482b802c6e971db6bc73e78a | SQL | derek-y-lee/SQL-course-hw | /dlee_assignment8/dlee_assignment8.sql | UTF-8 | 4,274 | 4.1875 | 4 | [] | no_license | /* Assignment 8.sql
Derek Lee
CS 31A, Winter 2018
*/
SHOW warnings; /* enable warnings!*/
USE bookstore;
/*Query 1: View named customer_address shows shipping for each customer:
Returns customer_id, email_address, last_name, first_name from Customer
From ADDRESS: ship_line1, ship_line2, ship_city, ship_s... | true |
8658594c262e983353a8767827c54552dc56010b | SQL | gpierre42/bv.server | /share/data/migrations/from_v1.2.beta_to_1.3.beta/before.sql | UTF-8 | 1,892 | 2.75 | 3 | [] | no_license | ALTER TABLE accounts_userprofile ADD COLUMN "language" varchar(2) NOT NULL DEFAULT 'fr';
ALTER TABLE site_cartype RENAME TO carpool_cartype;
ALTER TABLE site_city RENAME TO carpool_city;
ALTER TABLE site_favoriteplace RENAME TO carpool_favoriteplace;
ALTER TABLE site_trip RENAME TO carpool_trip;
ALTER TABLE site_tripde... | true |
25122854af7eb399e8f6173d9d5e04cee66e1dc9 | SQL | silence-do-good/stress-test-Postgres-and-MySQL | /dump/high/day25/select0314.sql | UTF-8 | 177 | 2.65625 | 3 | [] | no_license |
SELECT timeStamp, temperature FROM ThermometerOBSERVATION o
WHERE timestamp>'2017-11-24T03:14:00Z' AND timestamp<'2017-11-25T03:14:00Z' AND temperature>=5 AND temperature<=39
| true |
c2730bc075dc9fc8e10b846349711f44870e10cd | SQL | Dilicidum/Lab4 | /Lab4/Procedures/4_1.sql | UTF-8 | 278 | 3.328125 | 3 | [] | no_license | select Appointments.JobName,count(Performers.Id)
from Performers_Projects_Appointments
join Appointments on Appointments.Id=Performers_Projects_Appointments.AppointmentId
join Performers on Performers.Id=Performers_Projects_Appointments.PerformerId
group by Appointments.JobName | true |
78b0e293789565cd6553bdaf44fada096665bb9b | SQL | liangxilong/Huatomedicalsystem | /sql/InsertInto.sql | UTF-8 | 2,699 | 2.78125 | 3 | [] | no_license |
insert into `authority_level`(`authority_level_id`,`authority_level_name`) values
(1,'院长'),
(2,'副院长'),
(3,'主任'),
(4,'副主任'),
(5,'医生'),
(6,'护士'),
(7,'仓库管理员'),
(8,'统计工作人员');
insert into `depart`(`depart_id`,`depart_name`,`manager_staff_id`,`vice_manager_staff_id`,`depart_properties`) ... | true |
b7fce6997b51f17586321eaf75d36d5ec5659157 | SQL | alibaba/canal | /parse/src/test/resources/ddl/alter/test_8.sql | UTF-8 | 1,395 | 2.625 | 3 | [
"Apache-2.0"
] | permissive | CREATE TABLE `tb_fwnltgnpeg` (
`col_gzxmlukzgv` smallint(169) unsigned zerofill NOT NULL,
PRIMARY KEY (`col_gzxmlukzgv`),
UNIQUE INDEX `uk_gwlvlnvrkh` (`col_gzxmlukzgv`),
UNIQUE INDEX `uk_ygsnwxzroc` (`col_gzxmlukzgv`)
) DEFAULT CHARSET=utf8;
RENAME TABLE `tb_fwnltgnpeg` TO `tb_hmfoniytbf`;
ALTER TABLE `tb_hmfo... | true |
9fca3adb35a53f06d3fc3a04210bfdbc798f158d | SQL | thanhloan6196/Railway12-javadvanced | /SQL_file for Java Advanced/AccountList.sql | UTF-8 | 7,183 | 3.265625 | 3 | [] | no_license | DROP DATABASE IF EXISTS TestingSystem3;
CREATE DATABASE TestingSystem3;
USE TestingSystem3;
DROP TABLE IF EXISTS Department;
CREATE TABLE Department(
ID MEDIUMINT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
Department_Name NVARCHAR(30) NOT NULL UNIQUE KEY
);
-- create table 2: Posittion
DROP TABLE IF EXISTS Position;
CREATE T... | true |
52b6ffb53dfb749dcf828b342f991a2180b5968f | SQL | KheprySoftware/KhepryHubVX | /dbase_routines/sqlite_schema.sql | UTF-8 | 3,736 | 2.84375 | 3 | [] | no_license | DROP TABLE IF EXISTS nc_voter_master;
DROP TABLE IF EXISTS nc_voter_history;
DROP TABLE IF EXISTS state_counties;
DROP TABLE IF EXISTS user;
CREATE TABLE state_counties (
state_name VARCHAR(100),
state_init VARCHAR(5),
county_name VARCHAR(50),
PRIMARY KEY (state_name, state_init, county_name)
);
CREAT... | true |
c46181d5982b0a9121460feb4c560ce78fd90a98 | SQL | rodrigobazan/sermed | /Sermed-Boundaries/src/test/java/resources/limpiarbase.sql | UTF-8 | 1,417 | 2.578125 | 3 | [] | no_license | DELETE FROM afiliado CASCADE;
DELETE FROM persona_antecedente_medico_collection CASCADE;
DELETE FROM plan_lista_precios CASCADE;
DELETE FROM antecedentemedico CASCADE;
DELETE FROM persona CASCADE;
DELETE FROM tipodocumento CASCADE;
DELETE FROM sangre CASCADE;
DELETE FROM afeccion CASCADE;
DELETE FROM periodopago CASCAD... | true |
eea9ac572314eae2e9c7f522a809d7f06f0e476a | SQL | oreills9/clutch | /sql/NBA/NBA_Load_Script.sql | UTF-8 | 17,466 | 3.734375 | 4 | [] | no_license | ##INTIAL DATA LOAD##
DROP TABLE nba_2017_sample;
CREATE TABLE nba_2017_sample (
game_id int(20) NOT NULL,
data_set text,
match_date date,
a1 text,
a2 text,
a3 text,
a4 text,
a5 text,
h1 text,
h2 text,
h3 text,
h4 text,
h5 text,
period int(1),
away_score int(3),
home_score int(3),
remaining_time time,
elapsed time,
play... | true |
13bbce61fafb14f06736df4e798604249f9212ad | SQL | ghoshtanmay87/transfer-service | /src/main/resources/transfer-table-data.sql | UTF-8 | 643 | 2.84375 | 3 | [] | no_license | create table account(
account_no varchar(20) primary key,
account_name varchar(255),
balance decimal(20, 2),
version bigint);
insert into account (account_no, account_name, balance, version) values ('A10000', 'Jones', 1000.00, 1);
insert into account (account_no, account_name, balance, version) values ('B20000', 'Morg... | true |
b48614b39c1cf24cf2b45087e27c146a51eddf64 | SQL | SukanyaVee/indevr | /db/get_project_users.sql | UTF-8 | 142 | 2.84375 | 3 | [] | no_license | SELECT first_name, last_name, users.id FROM users
JOIN project_users ON project_users.user_id = users.id
WHERE project_users.project_id = $1;
| true |
ac427a7746934fb873494bcee9587ad2c76a65e8 | SQL | tsebal/JavaRushTasks | /3.JavaMultithreading/src/com/javarush/task/sql/task04/task0432/query.sql | UTF-8 | 168 | 3.234375 | 3 | [] | no_license | -- Write your code here:
SELECT MONTHNAME(date), COUNT(*)
FROM event
WHERE status = 'ERROR' OR status = 'FAILED'
GROUP BY MONTHNAME(date)
ORDER BY COUNT(*) DESC
LIMIT 1 | true |
12b58d2903ab8207afc8506e1b1fa572c440d188 | SQL | danglephd/movieManage | /db/movies_db_main_genre.sql | UTF-8 | 2,370 | 2.921875 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 5.7.12, for Win64 (x86_64)
--
-- Host: 127.0.0.1 Database: movies_db
-- ------------------------------------------------------
-- Server version 5.7.17-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS *... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.