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
16e0a18959b86c2d6d48430e9e4a48835c0eb2c8
SQL
marcson909/assessment-3
/database/seeds.sql
UTF-8
3,518
2.5625
3
[]
no_license
-- Seed data goes here INSERT INTO addresses (street, city, state, zipcode) VALUES ('6232 Guiseppe Courts', 'Jamartown', 'Maryland', '49028'); INSERT INTO addresses (street, city, state, zipcode) VALUES ('704 Cecil Mountain', 'West Jon', 'South Dakota', '91578'); INSERT INTO addresses (street, city, state, zipcode) VA...
true
81ac0d1ffe746a8d3339ce2da63a9e825fa9121c
SQL
wkkp/eXceedVote
/conf/evolutions/default/1.sql
UTF-8
2,201
3.09375
3
[]
no_license
# --- Created by Ebean DDL # To stop Ebean DDL generation, remove this comment and start using Evolutions # --- !Ups create table ballot ( bid bigint auto_increment not null, user_id bigint, project_id bigint, criteria_id bigint, scor...
true
c0cbb693f8834258dec5bcdcf2eddcd95a7468b5
SQL
Qadriga/tuer_server
/setuplocaldb.sql
UTF-8
925
3.546875
4
[]
no_license
-- BIGINT 64 bit value TINYINT 8 bit value CREATE DATABASE IF NOT EXISTS door; USE door; CREATE TABLE IF NOT EXISTS tagtype( tag_type TINYINT UNIQUE NOT NULL PRIMARY KEY, custom_description VARCHAR(120) NOT NULL); CREATE TABLE IF NOT EXISTS users( tag_id BIGINT UNIQUE NOT NULL PRIMARY KEY, tag_type tinyint ...
true
4a100b06a38aef242c41ee9d16cf7fd167722456
SQL
Antoniojustino4/sysmeeting
/sysmeeting/src/main/resources/db/migration/V01__criar_e_registrar_primeira_interacao.sql
UTF-8
2,010
3.53125
4
[]
no_license
CREATE TABLE campus( id BIGINT(11) NOT NULL PRIMARY KEY AUTO_INCREMENT, cnpj varchar(50), nome varchar(90), cidade varchar(30) )ENGINE=InnoDB DEFAULT CHARSET=utf8; CREATE TABLE curso( id BIGINT(11) NOT NULL PRIMARY KEY AUTO_INCREMENT, nome varchar(90), turno varchar(30), modalidade varchar(30)...
true
96815846b19917941512059eb98ebe217d4f1eb9
SQL
zy12241025dafsafa/WebMarketHome
/src/main/java/SQL/comment.sql
UTF-8
1,466
3.09375
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : zhangy Source Server Version : 10000 Source Host : localhost:3306 Source Database : web_market Target Server Type : MYSQL Target Server Version : 50051 File Encoding : 65001 Date: 2016-07-17 13:23:09 */ SET FOREIGN_KEY_CHECKS=0; -- -...
true
86b7ddcc216bbf8e7b97c962cc1b77a38708b7c7
SQL
VitorNetoS/moveis_de_madeiras
/moveis_bd.sql
UTF-8
1,740
3.5625
4
[ "Apache-2.0" ]
permissive
-- MySQL Workbench Synchronization -- Generated: 2019-06-01 14:16 -- Model: New Model -- Version: 1.0 -- Project: Name of the project -- Author: vitor 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=...
true
c9af30e1da72da22f5ee5304d80e07ac602b313e
SQL
MiguelSWolf/bi-projeto-final
/create_dimensoes.sql
UTF-8
3,119
3.78125
4
[]
no_license
DROP TABLE IF EXISTS DIM_PAGINA; DROP TABLE IF EXISTS DIM_ENDERECO; DROP TABLE IF EXISTS DIM_CLIENTE; DROP TABLE IF EXISTS DIM_IP; DROP TABLE IF EXISTS DIM_NAVEGADOR; DROP TABLE IF EXISTS DIM_DISPOSITIVO; DROP TABLE IF EXISTS DIM_RESOLUCAO; DROP TABLE IF EXISTS DIM_DATA; DROP TABLE IF EXISTS DIM_TEMPO; DROP TA...
true
aee49b852bb0f380db5f432ffc0c35aec3af598b
SQL
andxbes/homework7
/src/main/resources/schema.sql
UTF-8
1,328
3.640625
4
[]
no_license
DROP TABLE IF EXISTS STUDENT; DROP TABLE IF EXISTS INSTRUMENT; DROP TABLE IF EXISTS PERFORMANCE_PERTICIPANTS; DROP TABLE IF EXISTS PERFORMANCE; DROP TABLE IF EXISTS COMPOSITION; CREATE TABLE INSTRUMENT( ID INT NOT NULL AUTO_INCREMENT , TYPE_ VARCHAR(15) NOT NULL , PRODUCER VARCHAR(30) NOT NULL , PROD_DATE DATE, ,...
true
9d343551b91d4216fb13afeb7bee82d6c96155b7
SQL
XeTK/SE31520
/Get_Feed.sql
UTF-8
648
3.875
4
[]
no_license
CREATE OR REPLACE VIEW extension_feeds as /* Get our data from the database */ select us.firstname || ' ' || us.surname 'Name', us.email 'Email', bc.content 'Content', bc.created_at 'Created', bc.updated_at ...
true
a6a736261f321814cef8e16b26d5d0006a3c6db3
SQL
ringhilterra/DSE201-Data-Management-Systems
/final/sql/q4.sql
UTF-8
1,603
4.1875
4
[]
no_license
WITH homeWinPoints AS ( SELECT hteam AS name, COUNT(*) * 2 AS points FROM matches m WHERE hscore > vscore GROUP BY hteam ), awayWinPoints AS ( SELECT vteam AS name, COUNT(*) * 3 AS points FROM matches m WHERE hscore < vscore GROUP BY ...
true
7cb7d0e99d4ab9b6fac0b64519ad7b54f4075241
SQL
Jamaxack/HackerrankPractice
/SQL/Aggregation/Top Earners.sql
UTF-8
306
3.703125
4
[]
no_license
--Problem: https://www.hackerrank.com/challenges/earnings-of-employees/problem --Max Score: 20 Select Concat(Cast(Max(Salary * Months) as nvarchar), ' ', COUNT(*)) From Employee Where Salary * Months = (Select Max(Salary * Months) From Employee)
true
c8a11a3e6dcfd5bd557cf5a9b4dac634e8ea1dc8
SQL
agxcd/BootcampX
/4_queries/assistance_requests_data.sql
UTF-8
398
3.890625
4
[]
no_license
-- Assistance Requests Data SELECT teachers.name AS teacher, students.name AS student, assignments.name as assignement, SUM(completed_at - started_at) as duration FROM assistance_requests JOIN teachers ON teachers.id = teacher_id JOIN students ON students.id = student_id JOIN assignments ON assignments.id = assignment...
true
a4704ea158f3d59d50a7ce868b31c505fe04ce7a
SQL
albertomattos/SQL_gerais
/Cirurgias por profissional (quantidade).sql
UTF-8
1,038
3.359375
3
[]
no_license
select faprocad.nome_pro, faprdcad.descricao, count(faprdcad.descricao), faconcad.fantasia, faplacad.nome_plano from faprccad, faprocad, fapaccad, faconcad, faplacad, faprdcad where faprccad.cod_pac = fapaccad.cod_pac and faprocad.cod_pro = faprccad.cod_pro and faconcad.cod_con = fapaccad.cod_con an...
true
0ce67a52838952a6248bc9c45c48bdd4eb650e61
SQL
Nathy21/IncomeTax
/h2-boot-master/target/classes/data.sql
UTF-8
2,328
3.390625
3
[]
no_license
DROP TABLE IF EXISTS student; CREATE TABLE student ( id INT AUTO_INCREMENT PRIMARY KEY, first_name VARCHAR(250) NOT NULL, last_name VARCHAR(250) NOT NULL, department VARCHAR(250) DEFAULT NULL ); INSERT INTO student (first_name, last_name, department) VALUES ('John', 'Castle', 'Computer Science'), ('Jai', 'Va...
true
62edf59da1b2e5150f4f77c222db1be9ca44d011
SQL
felipemendesvidal/Banco_de_dados_exercicios02
/DDL.sql
UTF-8
1,670
3.46875
3
[]
no_license
CREATE DATABASE Nyousrecriacao; -- CREATE TABLE Acesso( IdAcesso INT PRIMARY KEY IDENTITY NOT NULL, Tipo VARCHAR(50) NOT NULL ); -- -- CREATE TABLE Categoria( IdCategoria INT PRIMARY KEY IDENTITY NOT NULL, Titulo VARCHAR(50) NOT NULL ); -- -- CREATE TABLE Localizacao( IdLocalizacao INT PRIMARY KEY ...
true
c77637da895ea90ce1d8108ba27080e2c65fb8fc
SQL
harshalschaudhari/SavvySqlChart
/code/26_Union.sql
UTF-8
414
2.6875
3
[]
no_license
-- ================================================ -- Author: Harshal Chaudhari -- Create date: 8 Aug 2014 -- Topic: Union -- (c)2014 \\WorkShopBook, All rights reserved. -- ================================================ --Syntax SELECT Statement UNION [ALL] SELECT Statement --UNION SELECT Point FROM RegionX UNI...
true
d7d1e70aeafeead8e791d5e957f7c0137c40563c
SQL
Galaraz/SQL_Playground
/mysql-one-for-all/desafio3.sql
UTF-8
274
3.296875
3
[]
no_license
CREATE VIEW historico_reproducao_usuarios AS SELECT user_name AS usuario, song_name AS nome FROM SpotifyClone.users_history_songs AS HIS JOIN SpotifyClone.users US ON HIS.user_id = US.user_id JOIN SpotifyClone.songs SON ON HIS.song_id = SON.song_id ORDER BY usuario, nome;
true
faed261834e01a791fdec2c9067ce311efae3ac4
SQL
ayrtonjb/PFC-ADSEP
/app/src/main/res/Doc/PFC/DB_dumps/db_v1.sql
UTF-8
10,457
3
3
[]
no_license
-- MySQL dump 10.13 Distrib 5.6.23, for Win32 (x86) -- -- Host: localhost Database: db_pfc_adsep -- ------------------------------------------------------ -- Server version 5.5.0-m2-community /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_R...
true
4ff95ff78836fdb719ac037b5370e6663b79c873
SQL
lechetta/Mysql
/Scripts/AtividadeCursor2.sql
UTF-8
3,071
3.890625
4
[]
no_license
create table OrdersProcedure( vendedor_id int (11),#vendedor cliente_id int (11), #customer PortLand int(11), LasVegas int (11), Denver int (11), LosAngeles int (11), NewYork int (11), OutrasCidades int (11) ); Delimiter $$ create procedure Cursor2() Begin declare c_terminou integer default 0; declar...
true
a3f08620fac8d46862352164b338ab6946f70557
SQL
inecsoft/terraform-course
/webapi/seed.sql
UTF-8
457
2.59375
3
[]
no_license
\connect postgres CREATE TABLE blog ( id serial PRIMARY KEY, title VARCHAR (50) NOT NULL, description VARCHAR (100) NOT NULL ); ALTER TABLE "blog" OWNER TO postgres; Insert into blog(title,description) values( "Title 1","Description 1"); Insert into blog(title,description) values( "Title 2","Description 2"); Insert ...
true
91dcf03f09fe0f0c5f98d3e32357f23db9f94922
SQL
CollectiveOne/CollectiveOneWebapp
/db-migrations/create_section_creation_date.sql
UTF-8
605
3.921875
4
[ "LicenseRef-scancode-warranty-disclaimer" ]
no_license
SELECT COUNT(*) FROM activity act1 WHERE type = 'MODEL_SECTION_CREATED' AND ( SELECT COUNT(*) FROM activity act2 WHERE act1.model_section_id = act2.model_section_id AND act2.type = 'MODEL_SECTION_CREATED' ) > 1; DELETE FROM activity act1 USING activity act2 WHERE act1.type = 'MODEL_SECTION_CREATED' AND ( a...
true
1759dc97035916983a6feecbd1626441495b8c37
SQL
OnlineS3/3.2.-Scenario-building
/db_installer/install.sql
UTF-8
3,510
3.4375
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.8.3 -- https://www.phpmyadmin.net/ -- -- Host: mysql.s3platform.eu -- Generation Time: Nov 26, 2018 at 01:50 AM -- Server version: 5.6.34-log -- PHP Version: 7.1.22 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SE...
true
23e5c26f93728d2e798c13c9e6b0e4c1e80b5de3
SQL
200921-USF-ROCP1/White_Code
/Week 2/Test1.sql
UTF-8
779
3.84375
4
[]
no_license
drop table test; create table test ( name varchar(60) primary key, number_of_pets numeric(5), yearly_income numeric(10,2), department varchar(60) ); insert into test values ('Matthew',1,0, 'Engineering'), ('Jacob',0,50000, 'Engineering'), ('Marina',1,60000, 'Human Resources'); insert into test(...
true
d054c87e360f7505ed717f03d06abc18be535fba
SQL
0xCM/Meta.Core
/src/SqlT.Schemas.Systems/SqlStore/Stores/DataTypes/StoreNativeTypes.sql
UTF-8
996
3.046875
3
[]
no_license
create procedure [SqlT].[StoreNativeTypes] as with Natives as ( select * from [SqlT].[DescribeDataTypes]() where IsUserDefined = 0 ) merge into [SqlStore].[NativeDataType] as Dst using Natives as Src on Src.TypeName = Dst.TypeName when not matched then insert ( TypeName, [MaxLength], [Preci...
true
1ecd8195126c62ede40833d7993bdd20fbe6542c
SQL
santiagoagustinnavarro/Rea
/BDreaNuevo.sql
UTF-8
19,633
3.25
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
-- MySQL Script generated by MySQL Workbench -- 02/10/19 19:32:14 -- Model: New Model Version: 1.0 -- MySQL Workbench Forward Engineering 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='TRADITION...
true
bae82c9b5b15af61d7107a0fe22d28dd2b6a51e0
SQL
MetDev2/SQL_Queries
/SQL_Queries/DB Computer firm/SQLQuery19.sql
UTF-8
1,178
4.34375
4
[]
no_license
/* Для каждого производителя, у которого присутствуют модели хотя бы в одной из таблиц PC, Laptop или Printer, определить максимальную цену на его продукцию. Вывод: имя производителя, если среди цен на продукцию данного производителя присутствует NULL, то выводить для этого производителя NULL, иначе максимальну...
true
d2288027855b2afbe424b83bf9fe9ba74777afa1
SQL
anigmo97/3-
/BDA/PRACTICA 2/SOLUCION_P2_PROFESOR.sql
UTF-8
3,104
4.09375
4
[]
no_license
/* ##################### CREACIO DE LES TAULES ##################### */ -- si ja estan creades cal esborrar-les DROP TABLE p2_Docencia CASCADE CONSTRAINT; DROP TABLE p2_Departamento CASCADE CONSTRAINT; DROP TABLE p2_Asignatura CASCADE CONSTRAINT; DROP TABLE p2_Profesor CASCADE CONSTRAINT; CREATE T...
true
b2f206a9b5e92a70d7cbfd71bc72a7897ea95cad
SQL
ChainRxn12/employee-o-matic
/db/schema.sql
UTF-8
2,535
4.0625
4
[ "MIT" ]
permissive
-- /////////////// create database name, drop db or tables if exists /////////////// DROP DATABASE IF EXISTS astrosDB; CREATE DATABASE astrosDB; USE astrosDB; DROP TABLE IF EXISTS department; DROP TABLE IF EXISTS job; DROP TABLE IF EXISTS employee; --/////////////// create department table/////////////// CREATE T...
true
82b92ef1def17e946d44822388f9002b18b4fd80
SQL
Toan1660625/SpringQLHS
/PL_SQL/PLSQL_v2.1/Exercise 4.1.sql
WINDOWS-1252
3,456
3.84375
4
[]
no_license
-- Cu 1 : Tinh giai thua DECLARE giai_thua NUMBER := 1; n NUMBER := &n; i NUMBER := 1; BEGIN WHILE(i <= n) LOOP giai_thua := giai_thua * i; i := i +1; END LOOP; dbms_output.put_line('Giai thua l: ' || giai_thua); END; -- Cu 2 : Bang cuu chuong cua n DECLARE tich ...
true
fca8be4158edc7d4b4caf6b644637a65ff1d775d
SQL
chu3sao/SQL
/zszq_SQL/嘉扬/01 薪资福利/11 员工工资/old/pVW_EmployeeEmoluPerMMnoTax.sql
UTF-8
3,385
3.15625
3
[]
no_license
-- pVW_EmployeeEmoluPerMMnoTax select c.Date as Date,a.EID as EID, -- 基本工资:固定工资(考核工资)+保代津贴+保代补贴 --- 转正前后工资计算 ---- 未转正人员或者已转正但转正月份和发薪月份相同,固定工资80%(未包含考核工资) ((CASE When ISNULL(a.IsAppraised,0)=0 or DATEDIFF(mm,a.AppraisedDate,GETDATE())<1 then (ISNULL(a.SalaryPerMM,0)-ISNULL(a.CheckUpSalary,0))*0.8+ISNULL(a.CheckUpSalary...
true
385ed76541d84640b81a32f4aa8931c6118596df
SQL
rkboyce/WebAPI
/src/main/resources/resources/cdmresults/sql/report/measurement/treemap.sql
UTF-8
3,859
4.03125
4
[ "Apache-2.0" ]
permissive
SELECT concept_hierarchy.concept_id AS "conceptId", isNull(concept_hierarchy.level3_concept_name, 'NA') + '||' + isNull(concept_hierarchy.level2_concept_name, 'NA') + '||' + isNull(concept_hierarchy.level1_concept_name, 'NA') + '||' + isNull(concept_hierarchy.concept_name, 'NA') AS "c...
true
194b80b258581054fe6da54aa7e671e223336bb0
SQL
wwjcn/wwjhome
/mysql.sql
UTF-8
3,713
3.59375
4
[ "Apache-2.0" ]
permissive
CREATE TABLE `admin_user` ( `user_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '管理员用户id', `username` varchar(20) NOT NULL COMMENT '帐号', `password` varchar(32) NOT NULL COMMENT '密码MD5(密码+盐)', `salt` varchar(32) DEFAULT NULL COMMENT '盐', `realname` varchar(20) DEFAULT NULL COMMENT '姓名', `avatar` varch...
true
9a6be7cec1a6d6edbbd19c86ea8434e1f207b6c4
SQL
AjinkyaBangale2/Leetcode-SQL-Solutions
/595 Big Countries.sql
UTF-8
144
2.90625
3
[ "MIT" ]
permissive
# https://leetcode.com/problems/big-countries/ SELECT name, population, area FROM World WHERE area > 3000000 or population > 25000000;
true
b3fd480d5f3ec627840844bc3646b1fb8f7f3582
SQL
OlafMd/MedCon1.0
/mm-docconnect-dataimporter/DataImporter/DataImporter/DBMethods/ExportData/Atomic/Retrieval/SQL/cls_Get_All_Treatments_OLD_System.sql
UTF-8
7,928
3.265625
3
[]
no_license
Select hec_patient_treatment.HEC_Patient_TreatmentID, hec_patient_treatment.IsScheduled As isTreatmentScheduled, hec_patient_treatment.IsTreatmentBilled As isTreatmentBilled, hec_patient_treatment.IfSheduled_Date As treatmentScheduledDate, hec_patient_treatment.IfTreatmentPerformed_Date As treatmentPerformed...
true
bebec08c33a95c15e8d36ea5a8fd9f31b759a33e
SQL
tcg123/melog
/update.sql
UTF-8
1,006
2.84375
3
[ "MIT" ]
permissive
SET FOREIGN_KEY_CHECKS=0; ALTER TABLE `me`.`melog_article` ADD COLUMN `thumb` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '缩略图' AFTER `description`; ALTER TABLE `me`.`melog_upload` ADD COLUMN `original` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT ''...
true
4bbcb34f527f697b1422fd8e5d835e2d4e3c44ba
SQL
jona-26/Hackathon-n-2
/Hackathon-n-2/src/components/Database/databaseSangoQuiz.sql
UTF-8
765
2.734375
3
[]
no_license
CREATE DATABASE sangoQuiz; USE sangoQuiz; CREATE TABLE question ( id INT PRIMARY KEY AUTO_INCREMENT, question VARCHAR(255) NOT NULL, reponse VARCHAR(255) NOT NULL ); INSERT INTO question (question, reponse) VALUES ('Qui est sangoku ?','Le héros principal du manga Dragon Ball'), ('Comment est ressuscité ...
true
c1f36a0854d1a4c273272cf6d3ac9ec49578bfb3
SQL
kgeorge314/code-examples
/sql-server-development-environment/db_Datawarehouse/sql/R__050_Tables/R__050.100.etl.input_file.sql
UTF-8
337
2.859375
3
[ "Unlicense" ]
permissive
DROP TABLE IF EXISTS etl.input_file ; CREATE TABLE etl.input_file ( event_id INT IDENTITY(1, 1) CONSTRAINT pk_etl_input_file PRIMARY KEY CLUSTERED , file_path NVARCHAR(100) , business_date DATE NOT NULL , is_processed BIT NOT NULL CONSTRAINT df_etl_input_file ...
true
506c93d74ef8e1fc81b83d3af87d4cfbb2a735d9
SQL
komitoff/Java-DB-Fundamentals
/Exam 24.06.2017/13.Contest Maximum points.sql
UTF-8
212
4.0625
4
[ "MIT" ]
permissive
#13 CONTEST MAXIMUM POINTS SELECT c.id, c.name, SUM(p.points) AS 'maximum_points' FROM contests AS c INNER JOIN problems AS p ON p.contest_id = c.id GROUP BY p.contest_id ORDER BY maximum_points DESC, c.id;
true
30a24be3a4d8073da61353f8e4853eee95004d64
SQL
ella-hong22/PostgreSQL-DB
/Part01_SQL을 활용한 데이터 전처리/06_LEFT,RIGHT,FULL&NATURAL JOIN.sql
UHC
6,937
4.1875
4
[]
no_license
# create table basket_a ( id int primary key, fruit varchar (100) not null ); select * from basket_a ; create table basket_b ( id int primary key, fruit varchar (100) not null ); select * from basket_b ; --------------------------------- insert into basket_A (id, fruit) values (1, 'Apple'), ...
true
c812265e93ac1696604458020d5b71b4ac5b16ef
SQL
h9lk/sql-learning
/HackerRank/Practice.sql
UTF-8
6,737
4.15625
4
[]
no_license
-- Only MS SQL -- Revising the Select Query I Select * From city Where population>100000 and countrycode='USA'; -- Revising the Select Query II Select name From city Where population>120000 and countrycode='USA'; -- Select All Select * From city; -- Select By ID Select * From city Where id=1661; -- Japanese Citie...
true
d628f6565a9f7020376681736eb5a983325b1955
SQL
PryskaS/SQL-challenges
/Aggregation Challenges/Weather Observation Station 15.sql
UTF-8
154
3.140625
3
[]
no_license
SELECT Round(long_w, 4) FROM station WHERE lat_n = (SELECT Max(lat_n) FROM station WHERE lat_n < 137.2344);
true
6ddf64926445b4a4fc77337d93041ba83ba2fa06
SQL
ArusSM/2021_Back_Class
/HRD_SooGang/WebContent/SooGang.sql
UTF-8
2,841
3.5625
4
[]
no_license
create table course_tbl( id varchar2(5) not null primary key, name varchar2(40), credit number(6), lecturer varchar2(10), week number(2), start_hour number(4), end_end number(4) ); select * from course_tbl order by id; insert into course_tbl(id, name, credit, lecturer, week, start_hour, end_end) values(10001, '프...
true
38c4b69911753261735c6eebbab572680af4bbb0
SQL
Genskill2/03-bootcamp-sql-hridika
/query3.sql
UTF-8
144
3.25
3
[]
no_license
select b.title from books b ,subjects s,books_subjects bs where b.id=bs.book and s.id=bs.subject and (s.name='Technology'or s.name='Politics');
true
5739066e19dc2517ade2cb1cb591abc79203966e
SQL
hawkinsbryan/cookie-site
/db/is_admin.sql
UTF-8
169
2.59375
3
[]
no_license
SELECT cookie_users.username , cookie_users.email , cookie_users.password FROM cookie_users INNER JOIN cookie_admins ON cookie_users.users_id = cookie_admins.users_id;
true
42698f8284862a17c6dc81fde44a0f8fd989ca1c
SQL
febianadahliaa/sijadin
/sijadin.sql
UTF-8
17,567
2.78125
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
-- phpMyAdmin SQL Dump -- version 5.0.3 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jan 30, 2021 at 04:10 PM -- Server version: 10.4.14-MariaDB -- PHP Version: 7.4.11 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIE...
true
eec29edfe1acbbcc6253037bf130785157d23529
SQL
Coos-Wolff/track_team_members_phone_destroyer
/src/main/resources/db/migration/h2/V2__create_initial.sql
UTF-8
1,252
3.984375
4
[]
no_license
CREATE TABLE IF NOT EXISTS event ( id INT NOT NULL AUTO_INCREMENT, event_date VARCHAR(30) NOT NULL, name VARCHAR(255) NOT NULL, has_ended BOOLEAN NOT NULL DEFAULT FALSE, PRIMARY KEY (id) ); CREATE TABLE IF NOT EXISTS member ( id INT NOT NUL...
true
ad79df66cdb1630574d8880a0d10786358fb67c7
SQL
silence-do-good/stress-test-Postgres-and-MySQL
/dump/low/day09/select0803.sql
UTF-8
260
3.015625
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['3226','4099','3011','1407','4231','3082','4054','3086','2068','5208'])
true
51e6398fc6e4c5a7c5fd2eb880051b0f3d013e27
SQL
WardersJSL/PrisonManager
/prisoner_sql.sql
UTF-8
1,692
3.28125
3
[]
no_license
-- 테이블 생성 create table prisoner( prinum varchar2(9) primary key, name varchar2(20) not null, crime varchar2(20) not null, prisoner_type varchar2(20) not null, penalty number not null, score number not null, work number, ill number(1) not null, punish number not null ); -- 데이터 삽입 -- 사형수...
true
4d84309f17fa26b477b3e3bd1d689c97a4339adc
SQL
aasouzaconsult/Scripts-para-DBA
/0. Instalação e Configuração/MaxWorkerThreads.sql
ISO-8859-1
1,477
2.9375
3
[]
no_license
/* ------------------------------------------------------------------------- Opo max worker threads http://msdn.microsoft.com/pt-br/library/ms187024%28v=sql.105%29.aspx ------------------------------------------------------------------------- Configurar a opo max worker threads de configurao de servidor http://...
true
d6152831a1f9d3cb77caaaf12d5dad14f360100d
SQL
ashishPractice/user-info-management
/Dump20210419.sql
UTF-8
3,568
3.15625
3
[]
no_license
-- MySQL dump 10.13 Distrib 8.0.22, for macos10.15 (x86_64) -- -- Host: 127.0.0.1 Database: bank_db -- ------------------------------------------------------ -- Server version 8.0.23 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */...
true
d20739a1e9ab1f5609df0f18a4dae517efff8145
SQL
MartinianoAlbo/agnviajesnode
/agenciaviajes.sql
UTF-8
3,132
3.3125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.4 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3306 -- Generation Time: Oct 12, 2021 at 10:32 PM -- Server version: 5.7.24 -- PHP Version: 7.4.16 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@...
true
77ab9a6ac982c5249a759c8e51cb1ca75bf583fd
SQL
motech/ananya-reports
/ananya-reports-migrations/src/main/resources/db/migration/V1_53.sql
UTF-8
491
2.78125
3
[]
no_license
ALTER TABLE report.location_dimension ADD COLUMN state VARCHAR(255); UPDATE report.location_dimension set state = 'Bihar'; ALTER TABLE report.location_dimension alter COLUMN state set NOT NULL; ALTER TABLE report.location_dimension DROP CONSTRAINT unq_district_block_panchayat; ALTER TABLE report.location_dimension ADD ...
true
2d20915e5cd34927003c4e3ecebef4a1cdb1a11c
SQL
ngoan1608/TestResultWebApp
/mysql_server/TMLdb_sproc/experiments/heatmap.sql
UTF-8
2,149
3.453125
3
[ "Apache-2.0" ]
permissive
# Copyright 2010-2020 Robert Bosch Car Multimedia GmbH # # 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 applicab...
true
11f26866d210a11be4939a5f28c982a9db993d73
SQL
baitongning/EPMS
/sql/epms.sql
UTF-8
1,280
3.25
3
[]
no_license
/* Navicat Premium Data Transfer Source Server : MySQL Source Server Type : MySQL Source Server Version : 50646 Source Host : localhost:3306 Source Schema : epms Target Server Type : MySQL Target Server Version : 50646 File Encoding : 65001 Date: 31/05/2020 13:29:44 ...
true
3e9d6f4a86ad34ad63f495088b705ad9bb3a9a0c
SQL
adsingh20/EnterpriseDataManagement
/Database/DML/user_setup.sql
UTF-8
1,871
3.640625
4
[]
no_license
-- Function setup insert into neuroid.function (functionname) values ('Projects'), -- ID = 1 ('Clients'), -- ID = 2 ('Industry'), -- ID = 3 ('Topic Tags'), -- ID = 4 ('Questions'); -- ID = 5 insert into neuroid.roles (rolename) values ('Admin Role'), -- ID = 1 ('Technical Role'), -- ID = 2 ('Sales Role'), -- ID = 3 ('...
true
0f4e73769a9af7c0bcdcec7618ad4b9c1dc8f05a
SQL
urimaro/progate_sql
/sql_i_dojo/9_exercise2.sql
UTF-8
317
4
4
[]
no_license
-- 「サンダル」を購入したユーザーのidと名前を重複無く取得してください SELECT users.id, users.name FROM sales_records JOIN users ON sales_records.user_id = users.id WHERE sales_records.item_id = ( SELECT id FROM items WHERE name = "サンダル" ) GROUP BY users.id, users.name;
true
6e3c21f6e4855cfa5af3d7a1a4cb21748f4e7187
SQL
darkirui/IQCareMigration-1
/Four2One/Four2One/Scripts/DBUpdate/2001/026_UpdatePaediatricRegimen.sql
UTF-8
383
2.828125
3
[ "Apache-2.0" ]
permissive
IF NOT EXISTS(select * from LookupItemView where MasterName = 'PaedsFirstLineRegimen' and ItemName='AF2E') BEGIN INSERT LookupMasterItem (LookupMasterId,LookupItemId,DisplayName,OrdRank) VALUES( (select Id from LookupMaster where Name='PaedsFirstLineRegimen') ,(select Id from LookupItem where Name='AF2E'),(select ...
true
477ac523f06acc4e696160adae5871f39a646424
SQL
coding-is-for-losers/seo-audit
/target/compiled/seo_audit/base-adp/search-console/search_console_proc.sql
UTF-8
651
3.984375
4
[]
no_license
select date, unix_date, a.account, b.client, a.platform, url, keyword, impressions, clicks, position FROM ( SELECT date, unix_date(date) as unix_date, site as account, 'Organic' as platform, lower(trim(regexp_replace(replace(replace(replace(url,'www.',''),'http://',''),'https://',''),r'\?.*$',''),'/')) as ur...
true
d011dfd1995c270e7a0f4f956c641a1929a8010d
SQL
kishkp/CUNY-DAM
/Week3 Assignment.sql
UTF-8
542
3.71875
4
[]
no_license
/* Transform the tb data to make it into 1 row per country year and with the total of TB cases across child, adult and elderly as well as by the sex Manually upload this file to github for further processing in R*/ SELECT country, year, SUM(child+adult+elderly) AS cases INTO OUTFILE 'c://data/tb_cases.csv' FIELDS T...
true
375ea0ed623f1d49113b57596ac5939cd4df27e8
SQL
segi3/job-portal
/dummy.sql
UTF-8
3,379
2.671875
3
[]
no_license
insert into job_categories values ('1', 'Pertanian', 'pertanian', null, null); insert into job_categories values ('2', 'Pertambangan', 'pertambangan', null, null); insert into job_categories values ('3', 'Industri Dasar dan Kimia', 'industri-dasar-dan-kimia', null, null); insert into job_categories values ('4', 'Aneka...
true
1c077bdfa159ec49e027fcfd3394cd55098227c9
SQL
evrimulgen/Oracle-DBA-Life
/Advance Tunning Scripts/fixed_view_text.sql
UTF-8
634
2.734375
3
[ "MIT" ]
permissive
------------------------------------------------------------------------------- -- -- Script: fixed_view_text.sql -- Purpose: to extract the view text for the V$ views -- -- Copyright: (c) Ixora Pty Ltd -- Author: Nabeel Khan -- ------------------------------------------------------------------------------- @save_sqlpl...
true
622f3d52b08920ed38dd96445d9b93f94fbc0812
SQL
dosmanthus/leetcode
/001-200/176_SecondHighestSalary.sql
UTF-8
408
4.15625
4
[]
no_license
// Solution 1, 380 ms // SELECT MAX(Salary) FROM Employee 找出第一高 -> 找出其他的最高 SELECT MAX(Salary) AS SecondHighestSalary FROM Employee WHERE Salary < (SELECT MAX(Salary) FROM Employee) // Solution 2, 148 ms // 從高至低排序之後,排除第一行後LIMIT一行 SELECT ( SELECT DISTINCT Salary FROM Employee ORDER BY Salary DESC LIMIT 1 OFFS...
true
a7861953c21d45a6b808dc69527466988ddf4511
SQL
GrishaAngelov/Guice
/Bank/scripts/bank.sql
UTF-8
698
2.78125
3
[]
no_license
create database if not exists bank; use bank; create table if not exists users(username varchar(20) not null primary key, password varchar (10)); insert into users values ("john","password"); create table bank_account(username varchar(20) not null primary key, amount decimal (10,2)); insert into bank_account values ("j...
true
954d216fdd1145aabab01f966991bc9fcf7bcf37
SQL
pdeyhim/PerfKitBenchmarker
/perfkitbenchmarker/data/tpcds_queries/query65.sql
UTF-8
950
4.09375
4
[ "BSD-3-Clause", "MIT", "Classpath-exception-2.0", "AGPL-3.0-only", "GPL-2.0-only", "Apache-2.0", "LicenseRef-scancode-public-domain" ]
permissive
select s_store_name, i_item_desc, sc.revenue, i_current_price, i_wholesale_cost, i_brand from store, item, ( select ss_store_sk, avg(revenue) as ave from ( select ss_store_sk , ss_item_sk , sum(ss_sales_price) as revenue from store_sales ...
true
49ca9cf1172df5d5bf4fd6f070d798f7ff8a1c6c
SQL
Katya1994/yagudina_test
/test_task1_2/yagudina_db/yagudina_MinBox_query.sql
UTF-8
208
3.375
3
[]
no_license
SELECT productName, categoryName FROM products LEFT JOIN productCategories ON productCategories.pcProductID = products.productID LEFT JOIN categories ON productCategories.pcCategoryID = categories.categoryID;
true
9b638f972e63bc40f1fa7382fcf8ec787e35575c
SQL
MaJalaniz/database-exercises
/limit_exercises.sql
UTF-8
290
3.6875
4
[]
no_license
USE employees; SELECT DISTINCT last_name FROM employees ORDER BY last_name LIMIT 10; SELECT * FROM employees WHERE hire_date LIKE '%12-25' And hire_date LIKE '199%' ORDER BY birth_date, hire_date DESC LIMIT 5 OFFSET 45; #offset = limit * page - limit; SELECT * FROM employees LIMIT 10;
true
f58bf57af852bc15a7642afb97aa626ecb2ec38a
SQL
kitchentalks/postgres
/employees/02_populate.sql
UTF-8
2,019
3.78125
4
[]
no_license
insert into departments(name,boss_id) select 'depto-'||s.a , null from generate_series(1,1000) as s(a); insert into employees(name) select 'employee-'||s.a from generate_series(1,10000) as s(a); update employees e set birthday=( select s.a from generate_series('1970-01-01 00:00'::timestamp, ...
true
98082d057ddf0e0e1c37db5575e8b42af0d56b81
SQL
tealun/Tchat
/Application/Install/Data/change.sql
UTF-8
2,685
3.828125
4
[ "Apache-2.0" ]
permissive
-- ----------------------------- -- 说明:本SQL文件用于为符合TCHAT系统需要而对ONETHINK系统数据表进行的一些结构和数据更改; -- 目前更改过结构的表有: -- 1、`onethink_channel`中增加了一个`group`字段,用于扩展分组导航 -- 2、`onethink_document` 中增加了一个`index_pic`字段,用于设置列表索引方形图(配合微信) -- 3、`onethink_attribute` 中更新了id为12的的`remark`字段值,用于描述`onethink_document`中`cover_id`属性描述 -- ---------------...
true
1826ae55ce5137694cf68584c2b53be30e2f6f16
SQL
jgarzonext/plsql-testing
/script_plsql/bd_iaxis/script/tables/HISRIESGOS.sql
ISO-8859-1
3,236
2.921875
3
[]
no_license
-------------------------------------------------------- -- DDL for Table HISRIESGOS -------------------------------------------------------- CREATE TABLE "AXIS"."HISRIESGOS" ( "NRIESGO" NUMBER(6,0), "SSEGURO" NUMBER, "NMOVIMI" NUMBER(4,0), "TNATRIE" VARCHAR2(300 BYTE), "CDOMICI" NUMBER, "NASEGUR" NUM...
true
bc5ed396d5ea0cc0c42351a415037bda7b55c2a4
SQL
nabeel244/php-student-management-system
/sms.sql
UTF-8
2,708
3.203125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.1.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Sep 01, 2021 at 03:38 PM -- Server version: 10.4.20-MariaDB -- PHP Version: 7.4.22 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIE...
true
62f44052b3daaf43f9acb886665d2a81108399c5
SQL
willamsclemente/if685
/ListaOR/Q11.sql
UTF-8
486
2.921875
3
[]
no_license
SET SERVEROUTPUT ON; ALTER TYPE tp_projeto ADD MAP MEMBER FUNCTION novoValor RETURN NUMBER CASCADE; CREATE OR REPLACE TYPE BODY tp_projeto AS MAP MEMBER FUNCTION novoValor RETURN NUMBER IS BEGIN DBMS.DBMS_OUTPUT.PUT_LINE('O vslor do projeto foi duplicado'); RETURN (SELF.valor*2); END; END; / DECLARE proj tp_projeto; ...
true
826d67fece7d001c7d2130dc0555e3009976fccc
SQL
Daal94/DFNB_DA
/other_scripts/LDSBC_IT240_DA_W1.4.sql
UTF-8
4,790
3.390625
3
[]
no_license
Homework /*Q1: By Order Quantity, what were the five most popular products sold in 2014? Include these data points in the output: Order Date Year Product ID Product Number Product Color Sales Order Count Order Quantity Sales Order Line total */ SELECT TOP 5 YEAR(soh.OrderDate) AS OrderYear , p.ProductID ...
true
02c8d3d4ad97b4e2e16ada358cbe7ec28b5ad632
SQL
juanseromo/Delilah-Resto-website
/models/delilah-DB.sql
UTF-8
2,841
3.359375
3
[]
no_license
-- MySQL Script generated by MySQL Workbench -- Wed Sep 23 10:38:56 2020 -- Model: New Model Version: 1.0 -- MySQL Workbench Forward Engineering 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='ON...
true
fc4f625de1cd326785be522aaa17eca041b32acb
SQL
yitianyedegithub/DataV
/大屏-3-流量统计-当天车辆类型.sql
UTF-8
519
3.71875
4
[]
no_license
SELECT * FROM ( SELECT CASE WHEN userType=4 THEN '临时车' WHEN userType=2 THEN '错峰车' WHEN userType=1 THEN '长租车' WHEN userType=3 THEN '预约车' END as userType, count(userType) as count FROM parking_record WHERE parkCode = 'pd31011500586' AND inTime > CURRENT_DATE ( ) AND outTime IS NULL and (userTyp...
true
b49390a1bf6b1f60a5c5e424c35bebde188dc9b9
SQL
NJLangley/Azure-Demos
/Introduction to Databricks Delta Live Tables/1) Data Ingestion (SQL) Checks.sql
UTF-8
3,425
3.671875
4
[]
no_license
-- Databricks notebook source -- MAGIC %md -- MAGIC > ***Note:*** *Update the paths for the data lake connection before running on your own environment!* -- COMMAND ---------- -- MAGIC %md -- MAGIC ## Customer SCD tables -- COMMAND ---------- SELECT * FROM adventure_works_demo_1.Bronze_Customer WHERE CustomerId = 6...
true
45c9ac0fdaccfa9b4e253f3aabaeb37b5d5d71dc
SQL
s3valkov/Database-Basics-MySQL
/ExamPreparation/DML/Exam_Preparation_DML_2.sql
UTF-8
705
4.03125
4
[ "Apache-2.0" ]
permissive
-- 1.Problem INSERT INTO comments (content,user_id,post_id) SELECT concat('Omg!' , u.username , '!This is so cool!'), ceil((p.id * 3) / 2), p.id FROM posts p JOIN users u ON p.user_id = u.id WHERE p.id BETWEEN 1 and 10; -- 2.Problem UPDATE users uout SET profile_picture_id = (SELECT IF(COUNT(uf.user_id) = 0, u.id, CO...
true
202b1fa9e54ad31ee2fe396161aff20cd7b683bc
SQL
lfallo1/NflDraftImporter
/src/main/resources/migrations/V1_3__update_per_nfl_data.sql
UTF-8
1,838
3.546875
4
[]
no_license
DROP TABLE workout_result; DROP TABLE participant; CREATE TABLE conf ( id bigint NOT NULL, name text, CONSTRAINT conf_pk PRIMARY KEY (id) ) WITH ( OIDS=FALSE ); ALTER TABLE conf OWNER TO postgres; CREATE TABLE college ( id bigint NOT NULL, name text, conf bigint, CONSTRAINT college_pk PRIMARY KEY (i...
true
e2fa5e553523fd8ccd548f8ff865ffe2697a2be1
SQL
radtek/abs3
/sql/mmfo/bars/Table/ispro.sql
UTF-8
2,511
2.90625
3
[]
no_license
PROMPT ===================================================================================== PROMPT *** Run *** ========== Scripts /Sql/BARS/Table/ISPRO.sql =========*** Run *** ======= PROMPT ===================================================================================== PROMPT *** ALTER_POLICY_INFO...
true
4937ad154559ee741b689366ebad54bf1d125d30
SQL
ezdiscount/peach
/sql/v0.1.2.sql
UTF-8
614
2.71875
3
[ "Unlicense" ]
permissive
drop table if exists config; create table config ( id int unsigned not null auto_increment, name varchar(50) not null default '', description varchar(500) not null default '', data json, version tinyint(1) not null default 1, index idx_meta_name (name), primary key (id) ); insert into config (name,descrip...
true
661c67fc6ddcf37a519ba0f632956e9398ea26a4
SQL
akbaker/erate
/fabric/import/south_carolina_library.sql
UTF-8
929
2.671875
3
[]
no_license
drop table if exists fabric.sc_lib; CREATE TABLE fabric.sc_lib ( institution_cat character varying(1), site_type character varying(10), service_type character varying(30), cxn_tech character varying(5), tech_cat int, lease_own character varying(7), lib_name character varying(100), id character varying(6), fsc...
true
1909af7eb71e725d8e9c6d985d0b05c2796714fb
SQL
Theosis/RoboResumeWeb
/sql/populate_cv.sql
UTF-8
550
2.515625
3
[]
no_license
use cv; insert into person (name, email) values ("George Paley", "George@JDPaley.com"); set @person_id = last_insert_id(); insert into edu (ach, org, yr) values ("Counseling Psychology", "Holos", 2000); insert into wrk (role, org, era) values ("CTO", "Genstar", "2008-2014"); set @wrk_id = last_insert_id(); insert i...
true
c45eba36b43ee56162f4befc0c8d339098063a39
SQL
teropaj/weather
/WeathereService.sql
UTF-8
3,776
2.921875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.5.4.1deb2ubuntu2.1 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Oct 10, 2018 at 11:44 AM -- Server version: 5.7.23-0ubuntu0.16.04.1 -- PHP Version: 7.0.32-0ubuntu0.16.04.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD...
true
608d79a559d5996985b132ebdb233e05c961a5d7
SQL
zoedsoupe/stone_challenge
/step_1/query.sql
UTF-8
254
3.453125
3
[]
no_license
SELECT SUM(amount) AS total_amount FROM account_transactions AS t GROUP BY MONTH(FROM_UNIXTIME(t.processed_at)) ORDER BY MONTH(FROM_UNIXTIME(t.processed_at)) WHERE t.type = 'payment' WHERE YEAR(FROM_UNIXTIME(t.processed_at)) = YEAR(CURDATE());
true
27b8bbd960f604a2a3ab6e42df4c3a72df155c06
SQL
avneetkr/SQL
/asn2/5.sql
UTF-8
544
3.796875
4
[]
no_license
-- Problem 5 -- Output a table having columns World Region, Average MPI Urban, -- Average MPI Rural. This table has one row for each world Region. -- The Average MPI Urban column gives the Average urban MPI of countries -- that have at least one sub-national region belonging to the corresponding -- world region. The de...
true
fe732e41e9318974c1619e9cec013506b07a3340
SQL
TheAmg/Java-Petstore
/build/classes/petproj_ui/pet.sql
UTF-8
5,847
3.5625
4
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.7.4 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3307 -- Generation Time: Nov 28, 2017 at 06:32 AM -- Server version: 5.7.20 -- PHP Version: 7.1.11 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CH...
true
4ec05e6f0a590d7ff1739198cc56400759fc0391
SQL
fruscil/AFScripts
/DDL_Split_From_Terry/EMOC3_Script-20140219100142_converted/PLSQL_Packages/PKG_emoc_systemlinks.sql
UTF-8
1,387
2.859375
3
[]
no_license
--<ScriptOptions statementTerminator="@"/> CREATE OR REPLACE PACKAGE "EMOC_SYSTEMLINKS" AS TYPE systemlinkscursor IS REF CURSOR; /* Get UserImages By User ID */ PROCEDURE getbymocid ( p_cursor OUT systemlinkscursor, mocidin IN links.mocid%TYPE ); END emoc_systemli...
true
9a6919590f88aca48e65c58866f073bbca659dbe
SQL
rbansa11/Data_Science_Practice_Problems
/Q40_sql/Q40.sql
UTF-8
470
3.578125
4
[]
no_license
""" #Monthly Growth Problem Given the table below, called 'orders', write a SQL query to show the monthly revenue growth. To calculate the monthly revenue growth, you can apply the following logic: revenue growth = (current month's revenue-prior month's revenue)/prior month's revenue. order_id channel date month r...
true
d65f656c52a03decd0473013b2d687be37fb9a43
SQL
xiaowangxu/DataBase1-Project
/courseElect/db.session.sql
UTF-8
318
3.84375
4
[]
no_license
SELECT C.id id, C.name name, C.credit credit, C.cid cid, C.depart depart, T.id tuid, T.tid tid, T.name tname, A.avg FROM course_course C JOIN teacher_teacher T on T.id = C.keys_tid_id JOIN ( SELECT avg(grade) avg, cid_id cid FROM election_election GROUP BY cid_id ) A on A.cid = C.id WHERE T.id = 5
true
19a080f9c65ca9acc2904e0450980e984eef07d6
SQL
rektplorer64/ITCS495-PJ_Sizzler_OOAD
/Postgresql Implementation/Custom Data Generator Scripts/Data Generation DML.sql
UTF-8
51,836
3.84375
4
[]
no_license
-- Update member customers, who are not in the provided set of Id, in terms of the branch that they live nearby. UPDATE "MemberCustomer" SET "liveNearBranchId" = (SELECT "branchId" FROM "Branch" WHERE "memberCustomerId" = "memberCustomerId" O...
true
fbbd0ebffcc214ed51ccca13cef1c0f9efe3dbc2
SQL
ildar66/WSAD_iBank_EJB_store
/2003_05_23/WSAD_iBankEJB/store_IBANKEJB_tables/Current iBankEJB/create_tables.sql
WINDOWS-1251
29,978
3.21875
3
[]
no_license
--------------------------- IBANK----------------------- CONNECT RESET; -------------------- IBANK-------------------------------- CREATE DATABASE IBANKEJB; CONNECT TO IBANKEJB; CREATE SCHEMA ILDAR; ------------------------------------------------------------------------ -------------------- --------------...
true
37a67f5510e1338c689f27ba5b447638be38bf2c
SQL
dmitrykovaliov/gym_center_
/script.sql
UTF-8
5,836
3.625
4
[]
no_license
PRIMARY KEY, act_name VARCHAR(200) NULL COMMENT 'name of service', act_price DECIMAL(19, 2) UNSIGNED NULL COMMENT 'price per training, price can be reconsidered and changed', act_note VARCHAR(1500) NULL COMMENT 'additional infomation about service' ) COMMENT 'register of s...
true
d06e879b11410a2a02f6c35d7ec3ad4f5191e306
SQL
jlu-ilr-hydro/odmf
/odmf/db/sql/tables/valuetype.sql
UTF-8
2,480
3.34375
3
[ "MIT" ]
permissive
-- -- PostgreSQL database dump -- SET statement_timeout = 0; SET lock_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings = on; SET check_function_bodies = false; SET client_min_messages = warning; SET search_path = public, pg_catalog; SET default_tablespace = ''; SET default_with_oids = fals...
true
c8c1ffbb5c7cfb9a878ecc1b6759740eeacba531
SQL
bagdhan/database_itegrasi_pascasarjana_ipb
/pascaonline.sql
UTF-8
8,555
3
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Waktu pembuatan: 22 Jan 2019 pada 02.39 -- Versi server: 10.1.37-MariaDB -- Versi PHP: 5.6.39 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHAR...
true
e620e663c5bc0732a958655a46a4eda92a39c309
SQL
aayu1990/SQL
/6a).sql
UTF-8
115
2.9375
3
[]
no_license
USE sakila; SELECT s.first_name, s.last_name,a.address FROM staff s JOIN address a ON a.address_id=s.address_id;
true
853334c1d9a80dba74ed96aa8bdee2ed8ab69515
SQL
land007/docker_node-reptile-tokyo-mou
/pscdb.sql
UTF-8
3,306
3.21875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.1 -- https://www.phpmyadmin.net/ -- -- 主机: rm-2zew3g96vzbn5648cqo.mysql.rds.aliyuncs.com -- 生成日期: 2020-03-09 07:14:00 -- 服务器版本: 5.7.26-log -- PHP 版本: 7.4.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_...
true
2b6ee4363640fb1ec18759b8446138e00e407f71
SQL
przemyslawstudzinski/mots
/src/main/resources/db/changelog/20190116_1213.mysql.sql
UTF-8
315
2.640625
3
[ "Apache-2.0" ]
permissive
--liquibase formatted sql --changeset user:1547637201600-1 UPDATE user SET email = NULL WHERE email = ''; --changeset user:1547637201600-2 ALTER TABLE in_charge ADD CONSTRAINT UC_IN_CHARGEEMAIL_COL UNIQUE (email); --changeset user:1547637201600-3 ALTER TABLE user ADD CONSTRAINT UC_USEREMAIL_COL UNIQUE (email);
true
99f2edff54bd5fca8f3e4b33d2299f5983dbc178
SQL
NinaYulistiaKarina/INPUT_PHPFORMULIR
/INPUT_PHPFORMULIR/tamu (2).sql
UTF-8
1,967
2.734375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 2.10.1 -- http://www.phpmyadmin.net -- -- Host: localhost -- Waktu pembuatan: 18. Juli 2017 jam 19:46 -- Versi Server: 5.0.41 -- Versi PHP: 5.2.3 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; -- -- Database: `db_latihan1anina` -- -- -------------------------------------------------------...
true
33a98530e135e168a65cbe220f0eacaf4246b39b
SQL
silence-do-good/stress-test-Postgres-and-MySQL
/dump/high/day21/select1441.sql
UTF-8
191
2.6875
3
[]
no_license
SELECT timeStamp, temperature FROM ThermometerObservation WHERE timestamp>'2017-11-20T14:41:00Z' AND timestamp<'2017-11-21T14:41:00Z' AND SENSOR_ID='b2979c87_3920_4c0b_bb69_46d7ffbc2c1a'
true
1e285687bd05011da52f44e78d92bb203668e4c4
SQL
ClickHouse/ClickHouse
/tests/queries/0_stateless/00589_removal_unused_columns_aggregation.sql
UTF-8
1,304
3.046875
3
[ "Apache-2.0", "BSL-1.0" ]
permissive
SELECT * FROM (SELECT sum(x) AS a, avg(x) AS b FROM (SELECT number AS x FROM numbers(10))); SELECT a, b FROM (SELECT sum(x) AS a, avg(x) AS b FROM (SELECT number AS x FROM numbers(10))); SELECT a FROM (SELECT sum(x) AS a, avg(x) AS b FROM (SELECT number AS x FROM numbers(10))); SELECT b FROM (SELECT sum(x) AS a, avg(x)...
true
662c79bfb4ba9dd4b6a6acd11d542a958a5c2938
SQL
jawadhasan/devtest
/sqlscripts/older/fmAPIscript.sql
UTF-8
8,915
3.3125
3
[]
no_license
CREATE TABLE IF NOT EXISTS "__EFMigrationsHistory" ( "MigrationId" character varying(150) NOT NULL, "ProductVersion" character varying(32) NOT NULL, CONSTRAINT "PK___EFMigrationsHistory" PRIMARY KEY ("MigrationId") ); DO $$ BEGIN IF NOT EXISTS(SELECT 1 FROM "__EFMigrationsHistory" WHERE "MigrationId"...
true