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
c85c3a743feedb5d5cfe3aae32458f5524ecbb10
SQL
CodeHunt101/sql-table-relations-library-lab
/lib/queries.sql
UTF-8
1,029
4.75
5
[ "LicenseRef-scancode-unknown-license-reference", "LicenseRef-scancode-public-domain" ]
permissive
-- selects all of the books titles and years in the first series and orders them chronologically SELECT title, year FROM Books WHERE series_id = 1 ORDER BY year; -- returns the name and motto of the character with the longest motto SELECT name, motto FROM Characters ORDER BY LENGTH(motto) DESC LIMIT 1; -- determines...
true
3b2704a5d63c66a711fadfdbb5db0b418f9d94a1
SQL
Gaya3-SQL/SQL_Exercise
/SQL_HRTeam.sql
UTF-8
404
2.65625
3
[]
no_license
CREATE TABLE Employee.HRTeam ( [HRTeamID] [INT] PRIMARY KEY NOT NULL, [EmployeeID] [int] FOREIGN KEY REFERENCES EmployeeData(EmployeeID), [DepartmentID] [INT] NULL, [DepartmentName] [varchar](25) NULL, [HRName] [Varchar] (25) Null, [Service] [Varchar] (25) Null, [Qualification] [Varchar] (50) Null, [BirthDate] ...
true
36a418fd316190b7c79436f17ebc5b16fc7452ad
SQL
thirtist/jsp20201103
/WebContent/WEB-INF/sql/select/selectEx3.sql
UTF-8
606
2.921875
3
[]
no_license
SELECT * FROM emplyee; SELECT * FROM employee WHERE ename = 'WARD'; SELECT * FROM employee WHERE ename LIKE 'W%'; SELECT * FROM employee WHERE ename LIKE '%D'; SELECT * FROM employee WHERE ename LIKE '%D%'; SELECT * FROM employee WHERE ename LIKE '_A__'; SELECT * FROM employee WHERE commission IS NULL; SELECT * FROM e...
true
f70a6baec98dd5c7345a29aa4b578fa35ef7ec8f
SQL
MikeRena77/sdlw
/SQL/legacyHarvestSQL/versionNumbersForPkgforHar5.sql
UTF-8
368
3.453125
3
[]
no_license
select T.pathfullname, I.itemname, V.mappedversion from harpathfullname T, haritems I, harversions V, harpackage P, harenvironment E where E.environmentname = 'DEMO' and P.packagename = 'MR- 00001' and P.envobjid = E.envobjid and V.packageobjid = P.packageobjid and V.itemobjid = I.itemobjid and I.parentobjid = T.itemob...
true
8e71a172fa54b8e2cbe7c74342e1008916fb40ff
SQL
j0park/PostgreSQL
/Queries/3장/SQLRcp05.sql
UTF-8
2,616
3.703125
4
[]
no_license
--Page 54 select user_id , case when register_device = 1 then 'desktop' when register_device = 2 then 'smartphone' when register_device = 3 then 'application' end as device_name from "053_mst_users"; --Page 56 select stamp , substring(referrer from 'https?://([^/]*)') AS referrer_host from "056_ac...
true
8c4c31b1c46f8354122e7774944dfea9dd19d9bc
SQL
federicomasiero/MyBikeDBMS
/MyBikePopulate.sql
UTF-8
8,911
2.75
3
[]
no_license
-- Before all -- Organization Insert INSERT INTO mbt.Organization VALUES (1, 'GoodBike'); INSERT INTO mbt.Organization VALUES (2, 'Università degli studi di Padova'); INSERT INTO mbt.Organization VALUES (3, 'AcegasApsAmga'); INSERT INTO mbt.Organization VALUES (4, 'Comfordinord'); INSERT INTO mbt.Organization V...
true
2e997d4803257f407fee5edaacd9411dfa0c624f
SQL
Dheinny/rfit
/src/main/resources/sqls/V0__create_ingredients_table.sql
UTF-8
291
2.640625
3
[]
no_license
CREATE TABLE IF NOT EXISTS ingredients ( id NUMERIC NOT NULL, name VARCHAR, type VARCHAR, qtt_per_portion NUMERIC, cal_count NUMERIC, PRIMARY KEY (id) ); CREATE SEQUENCE ingredients_seq;
true
6d3ed546b51d2020f91056da911d05ad63ec3e70
SQL
n-raymond/developers
/conf/postgres/init/01-languages.sql
UTF-8
340
2.71875
3
[]
no_license
CREATE TABLE language( id SERIAL PRIMARY KEY, name VARCHAR NOT NULL, creator VARCHAR NOT NULL ); INSERT INTO language VALUES (0, 'Java', 'Sun Microsystems'); INSERT INTO language VALUES (1, 'Scala', 'EPFL'); INSERT INTO language VALUES (2, 'Python', 'Python Software Foundation'); INSERT INTO language VALUES (3,...
true
d81edac334ca74e71e7d3b3a18fab9c1a517905c
SQL
zombiQWERTY/call_center
/store/sqlstore/sql/3_calendar.sql
UTF-8
1,540
3.828125
4
[]
no_license
create table IF NOT EXISTS calendar ( id serial not null constraint calendar_pkey primary key, timezone varchar(15) default 'utc'::character varying not null, start integer, finish integer, name varchar(20) not null, domain_id integer constraint calendar_domain_id_fk references domain ); create unique...
true
e8d8aa3453b44ce58ea1f0ab3d219c3fde2ee655
SQL
bellmit/dbSmellsData
/data/open-source/extracted_sql/Ray-DI_Ray.AuraSqlModule.sql
UTF-8
495
2.796875
3
[ "MIT" ]
permissive
SELECT * FROM posts', []); CREATE TABLE IF NOT EXISTS `comments` ( id INTEGER PRIMARY KEY AUTOINCREMENT, post_id INTEGER, username VARCHAR(32), content TEXT ) SELECT COUNT(*) FROM ', $query, 1); SELECT * FROM posts'; SELECT * FROM posts', [], 1, new DefaultRouteGenerator('/{?page}')); CREATE TABLE IF NOT EXISTS `posts`...
true
ee0ad0f54ac691bdf9660ea2d6784ba201be637b
SQL
hozza94/945
/dump.sql
UTF-8
362
2.578125
3
[]
no_license
BEGIN TRANSACTION; CREATE TABLE table1 (id integer PRIMARY KEY, name text, birthday text); INSERT INTO "table1" VALUES(1,'NEW1','1987-00-00'); INSERT INTO "table1" VALUES(2,'KIM','1990-00-00'); INSERT INTO "table1" VALUES(3,'NEW2','1991-00-00'); INSERT INTO "table1" VALUES(4,'CHOI','1999-00-00'); INSERT INTO "table...
true
3db3d5d286a6f1c048389eedf39b327280c04727
SQL
phi314/nidoran
/db/Query/peminjaman.sql
UTF-8
176
3.3125
3
[]
no_license
SELECT peminjaman.*, member.nama, member.kelas FROM peminjaman JOIN member ON member.id=peminjaman.id WHERE MONTH(NOW())=MONTH(peminjaman.tanggal) ORDER BY peminjaman.kode ASC;
true
3e412e05b3ef8b32d195660974406dcaa988cbc9
SQL
marcwright/WDI_ATL_1_Instructors
/REPO - DC - Students/w03/d01/Elaine/evite_modeling.sql
UTF-8
747
3.3125
3
[]
no_license
CREATE TABLE event ( id serial PRIMARY KEY, name varchar(200) NOT NULL, host_id integer REFERENCES user (id) NOT NULL, event_date varchar(50) NOT NULL, event_time varchar(50) NOT NULL, location varchar(50) NOT NULL ); CREATE TABLE invitation ( id serial PRIMARY KEY, event_id integer REFERENCES event (i...
true
18a4d243c2c5444d8b5846681310ab356d1842b1
SQL
jisoom/sql
/2021_03_18sql.sql
UTF-8
12,077
3.953125
4
[]
no_license
date 날짜 조작 ROUND TRUNC 날짜 관련 함수 -MONTHS_BETWEEN : 인자 - start date, end date, 반환값 : 두 일자 사이의 개월 수 -ADD_MONTHS (***): 인자 - date, number 더할 개월 수 : date로 부터 x개월 뒤의 날짜 date + 90 1/15 3개월 뒤의 날짜 ==> ADD_MONTHS 사용 -NEXT_DAY (***):인자 - date, number (weekday, 주간 일자) date 이후의 가장 첫번째 주간 일자에 해당하는 date를 반환 -LAST_DAY(***) : 인자 : ...
true
c1688cfd32b1dc47666a56d8436af7733405be03
SQL
casmith205/Plant-Tracker
/db_scratch_pad/data_base_load_faster_than_import.sql
UTF-8
1,177
2.546875
3
[ "MIT" ]
permissive
SELECT * FROM gxe7hd3rssbfk7oz.usda_plant_data_db; LOAD DATA LOCAL INFILE 'C:\\Users\\marting\\Documents\\uOfMinnesotaBootCampHomeworks\\Plant-tracker\\db_scratch_pad\\usdaplantsLESSCOLUMNS.csv' INTO TABLE `usda_plant_data_db` CHARACTER SET 'utf8' FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' LINES TERMINATED BY...
true
f9ebeb299be2255c99841c5bfa52cd892a398c3b
SQL
llorca-chrmn/inventory
/assets/inventory-system.sql
UTF-8
8,402
3.21875
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.8.0.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jul 25, 2019 at 02:42 PM -- Server version: 10.1.32-MariaDB -- PHP Version: 7.2.5 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @O...
true
ff95c3127a140e4cf0fd5cd7f37edf45063e32e4
SQL
chengyiqingqing/py_learn
/keyworld_rank/crawler/op_data/mobvista.sql
UTF-8
2,926
3.234375
3
[]
no_license
-- Adminer 4.2.5 MySQL dump SET NAMES utf8; SET time_zone = '+00:00'; SET NAMES utf8mb4; CREATE TABLE `ad_mobvista` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `date` date DEFAULT NULL, `account` varchar(50) NOT NULL, `platform` varchar(20) NOT NULL, `country` char(2) DEFAULT NULL, `appname` varchar...
true
f22f66bf3ac0e707b81c0c250523d95cff0fbc1d
SQL
cv9955/cv2017
/sql/v1_facturas.sql
UTF-8
903
3.5625
4
[]
no_license
CREATE OR REPLACE FORCE VIEW "V1_FACTURAS" ("ID", "TIPO_CAB", "SIGNO", "FECHA", "ID_RAZON", "CUIT", "DFISCAL", "NRO", "TOTAL", "PAGO", "RECIBOS", "REMITOS","REMITIDO") AS select id,tipo_cab, case when tipo_cab =3 then -1 else 1 end signo, fecha, (select id from cli_dfiscal where cuit = f.cuit) id_razon, cuit, (sele...
true
d45c8d6fa67fcd67d7c6fc5d77ff0139c2c040a0
SQL
hz2657/SQL-everyday
/HackerRank/Interviews.sql
UTF-8
797
3.984375
4
[]
no_license
/*LEFT JOIN*/ SELECT contest_id, hacker_id, name, A, B, C,D FROM Contests INNER JOIN (SELECT contest_id, SUM(total_submissions) A, SUM(total_accepted_submissions) B, SUM(total_views) C, SUM(total_unique_views) D FROM Contests INNER JOIN Colleges USING (contest_id) INNER JOIN Challenges USING (college_id) LEFT JOIN...
true
5d56edf9609298bfb370f1726274dde4ae4da241
SQL
dirtyZiu/horariolab-unab
/Desarrollo/localhost.sql
UTF-8
32,822
3.28125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 3.4.10.1 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: May 23, 2012 at 07:45 AM -- Server version: 5.5.20 -- PHP Version: 5.3.10 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;...
true
43af7760ac9cf0c8ce3a7617972c9a1ccca8de7a
SQL
tiagotas/PHP_SISGEN_ROTAS
/SQL/SQL Grupos de Usuários.sql
UTF-8
786
3.6875
4
[]
no_license
create table grupos ( id int auto_increment, descricao varchar(150), primary key(id) ); INSERT INTO grupos (descricao) VALUES ('Administrador'), ('Usuário'); create table grupos_permissoes ( id int auto_increment, id_grupo int, cadastrar enum('S','N'), editar enum('S','N'), listar enum('S','N'), ...
true
201210c40654e46db9ddd4c8cfc3e5070bb50eea
SQL
AlyaSelviaTamzila/10UniversitasLuarNegeriFullBeasiswa
/daftar.sql
UTF-8
1,711
3
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.3 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Waktu pembuatan: 26 Apr 2019 pada 15.41 -- Versi server: 10.1.36-MariaDB -- Versi PHP: 7.2.10 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHAR...
true
beafe1e12e30279cbf6b36ca546649050408194e
SQL
First-01/dune_queries
/queries/96798_volume_distribution_on_polygon.sql
UTF-8
1,257
4.375
4
[]
no_license
WITH prices AS ( SELECT date_trunc('day', MINUTE) AS DAY, contract_address AS token, decimals, AVG(price) AS price FROM prices.usd WHERE MINUTE >= '{{2. Start date}}' AND MINUTE <= '{{3. End date}}' GROUP BY 1, 2, 3 ), swaps...
true
e655570578f830e1940f8dd060d9c0bb7dba9b5b
SQL
tsydenov96/pizza
/_dump/2017.09.21pizzadb.sql
UTF-8
4,750
3.046875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Хост: 127.0.0.1 -- Время создания: Сен 21 2017 г., 15:39 -- Версия сервера: 10.1.16-MariaDB -- Версия PHP: 5.6.24 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT ...
true
6bcdb6281206086ff59750c0c7c113964eae5095
SQL
iusoltsev/sqlplus
/dba_hist_sqlstat2.sql
UTF-8
2,727
3.546875
4
[]
no_license
-- -- SQL execution extended analysis with rows_per_exec,... values from ASH, sqlstats -- SQL> @dba_hist_sqlstat2 "6585ka4kkk8fs" 13703 14400 -- ^sql_id ^start_snap_id ^stop_snap_id -- col ELA_PER_EXEC for 999,999,999,999 col CPU_PER_EXEC for 999,999,999,999 col GETS_PER_EXEC for...
true
c9a49e4e162e7079362884aed6aadeeda0349bc5
SQL
abhishekasingh/100daysofcoding
/PostgreSQL/005 Check Constraints.sql
UTF-8
873
3.40625
3
[]
no_license
---------------------------------------- -- Start CHECK CONSTRAINTS Statement --- ---------------------------------------- CREATE TABLE user_info( user_info_id serial PRIMARY KEY, user_info_first_name VARCHAR(50), user_info_last_name VARCHAR(50), user_info_birth_date DATE CONSTRAINTS check_birth_date CHECK (...
true
bb2adf4c232acbbb6301ff9b177d14fc943a7a55
SQL
Ben-HurFigueiredo/EIBNeti_PHP
/php/PDO/pdo_teste.sql
UTF-8
1,163
2.59375
3
[]
no_license
-- -------------------------------------------------------- -- Servidor: 127.0.0.1 -- Versão do servidor: 10.1.37-MariaDB - mariadb.org binary distribution -- OS do Servidor: Win32 -- HeidiSQL Versão: 10.1.0.5464 -- -----------------------------------------------...
true
2c1fc626f47f10bf5a2f28c6f837d877f04d5b14
SQL
vv-me/BankingSystemAssign
/Customer_MySQL.sql
UTF-8
607
2.515625
3
[]
no_license
USE SpringBoardBankingSystem; CREATE TABLE Customer ( CustomerId INT auto_increment NOT NULL, FirstName NVARCHAR(500) NOT NULL, LastName NVARCHAR(500) NOT NULL, DOB DATE NOT NULL, AddressLine1 NVARCHAR(500) NOT NULL, AddressLine2 NVARCHAR(500) NULL, City NVARCHAR(500) NOT NULL, State NVA...
true
c1a38e4d9ca59c13499b5203bf101ea07bf366d8
SQL
Maribmdj/chaoDesempleoProyII
/SCRIPTS/ESTADISTICAS/empresaxjobs.sql
UTF-8
519
3.578125
4
[]
no_license
Delimiter $$ CREATE PROCEDURE `empresaxjobs`(IN i INT) MODIFIES SQL DATA BEGIN Select p.id_person as 'ID', p.name as 'NOMBRE', @curRow := @CurRow + 1 as 'PUESTO' from (SELECT e.ID_PERSON, e.name, count(j.id_person) as 'num_jobs' FROM(select id_person, concat(name, ' ', lastname1, ' ', lastname2) as name from person...
true
f922eb24e06083d5e4eb087b82d129a233432c04
SQL
avdominello/SQLProjects
/SQL Utilities/SQL Utilities/MissingIndices.sql
UTF-8
1,649
4.21875
4
[]
no_license
/* When this script runs, it identifies potentially missing indexes. This script combines three closely-related DMVs to get a very useful missing index query. It uses the various statistics stored regarding data access patterns to calculate the possible 'advantage' of adding a certain index; The higher the index_ad...
true
b4990e6fbe8ca8a31314deac64e021cc94e90e72
SQL
Jahnavi-Rav/Podracing_Database
/Part 2/table.sql
UTF-8
4,583
3.875
4
[]
no_license
DROP SCHEMA IF EXISTS podracing; CREATE DATABASE podracing; USE Podracing; DROP TABLE IF EXISTS being; CREATE TABLE being( Id INTEGER NOT NULL, Fname VARCHAR(45), Lname VARCHAR(45), Species VARCHAR(45), Is_slave BOOLEAN, CONSTRAINT being_pk PRIMARY KEY (Id) ); ...
true
cacf47cf1bcb7fda536669beba6189d5acdb4c18
SQL
WindhoverLabs/airliner
/apps/cf/test_and_ground/asist/prc/template/template_cf_maxtrans.prc
UTF-8
24,772
2.875
3
[ "NASA-1.3" ]
permissive
PROC $sc_$cpu_cf_maxtrans ;******************************************************************************* ; Test Name: cf_maxtrans ; Test Level: Build Verification ; Test Type: Functional ; ; Test Description ; This test verifies that the CFS CCSDS File Delivery Protocol (CF) ; application properly handl...
true
cc2624f5c7daf81c72df020f2740b621b6be2033
SQL
rishabh19089/safeya
/Data Files/assigns.sql
UTF-8
1,705
2.828125
3
[ "Apache-2.0" ]
permissive
USE b1hjbod5x53zcqbm37to; CREATE TABLE `assigns` ( `Worker_ID` int NOT NULL, `FMS_ID` int NOT NULL, `Complaint_ID` int primary key ); INSERT INTO `assigns` (`Worker_ID`,`FMS_ID`,`Complaint_ID`) VALUES (142,9,1),(105,1,2),(142,10,3),(107,10,4),(55,9,5),(146,1,6),(77,10,7),(93,4,8),(94,10,9),(51,4,10); INSERT INT...
true
978b52408010eee97285b763c6baf73fbc874027
SQL
WuLC/LeetCode
/Database/184. Department Highest Salary.sql
UTF-8
644
3.78125
4
[]
no_license
/* * @Author: WuLC * @Date: 2017-03-28 23:54:13 * @Last Modified by: WuLC * @Last Modified time: 2017-03-29 12:45:02 */ # can not deal with multiple highest salary SELECT Department.Name AS Department, Employee.Name AS Employee, MAX(Employee.Salary) AS Salary \ FROM Employee JOIN Department ON Employee.DepartmentI...
true
300d40d06e6d8dba1f5c66ecf7394ebd986c42c9
SQL
sklein94/vocabularyLearning
/DB.sql
UTF-8
31,916
3.578125
4
[]
no_license
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ ----------------------------Deleting previous generated Tables-----------------------------------------------------------...
true
41bfda1e462ed0ac4e1b221cf6e8546333fe3c97
SQL
ktxjusto/SQL
/HW5_Marcus_Allen.sql
UTF-8
3,169
4.125
4
[]
no_license
-- Question 1 Marcus Allen jma5328-- SELECT SYSDATE, TRIM(TO_CHAR(SYSDATE, 'YEAR'))AS "YEAR",TRIM(TO_CHAR(SYSDATE, 'DAY-MONTH'))AS "DAY_MONTH", TO_CHAR(SYSDATE, 'HH') AS "HOUR", ROUND(TO_DATE('31-DEC-2020')-SYSDATE) As "Days_till_end_yr", TO_CHAR(SYSDATE, 'mon-dy-yyyy') AS "Abbreviated_mon_dy" FROM dual; -- Ques...
true
67356bdbc0cd89b227df197492be9b28149759fc
SQL
tzekiattok/hangry
/ESD-Project/SQL-files/customer.sql
UTF-8
1,811
2.90625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.7.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1:3306 -- Generation Time: Jan 14, 2019 at 06:42 AM -- Server version: 5.7.19 -- PHP Version: 7.1.9 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!401...
true
b70e69f0307f9bf3759fff98b92fb569ab63caad
SQL
VladimirSerdyuk/Hi-Tech_Webstore
/hitech.webstore/src/main/resources/db/migration/V1__Init.sql
UTF-8
1,999
3.1875
3
[]
no_license
create table items (id bigserial primary key, category varchar(255), title varchar(255), author varchar(255), price int); insert into items (category, title, author, price) values ('Product', 'Хлеб', 'Московский хлебный комбинат', 50), ('Product', 'Молоко', '1-й Молочный комбинат', 80), ('Product', 'Сыр', '1-й Моло...
true
deee7a0bae064972be323a2f7fdd6bbd61fb101d
SQL
AdhithyanSridhar/spring-batch-postgresql
/src/main/resources/postgresTest.sql
UTF-8
1,076
3.96875
4
[]
no_license
SELECT id, data FROM postgres.data WHERE data @> '{"state": "California"}'; CREATE INDEX state_index ON postgres.data USING GIN ((data -> 'state')); CREATE INDEX profit_index ON postgres.data USING GIN ((data -> 'profit')); SELECT id , data ->> 'state' , data ->> 'profit' FROM postgres.data where cast(data -...
true
a7e5be836f51871db75092a79cd3a8d81df523a2
SQL
gladiopeace/digital-data-syn
/documents/oms/TB_INVFN.SQL
GB18030
2,371
3.0625
3
[]
no_license
/* ================================================================================ ṹ:TB_INVFN ṹ:̵ϸӱ ṹĿ: ================================================================================ */ drop sequence SEQ_TB_INVFN; drop index AK_TB_INVFN; drop table TB_INVFN; create table TB_INVFN ( INVFN_ID INTEGER ...
true
3ac0395b8746092484cdeffac006254dd8c3630d
SQL
qcoliveros/ClosDotNet
/ClosDotNet/App_Data/SQL/103_data_code_04_borrowertype.sql
UTF-8
15,628
3.140625
3
[]
no_license
-- BORROWER_TYPE INSERT INTO code_set (version_time, create_by, creation_date, last_update_by, last_update_date, deprecated, status, code, name,...
true
88c270712c9dc43c894b2fb739602bbdcdfaced1
SQL
galaxyll/JavaWeb
/ttms/TTMS/target/TTMS/WEB-INF/classes/sql/ticket.sql
UTF-8
383
2.96875
3
[]
no_license
use ttms; create table ticket( moviename varchar(50) , play_date datetime , seat_row int , seat_column int , ticket_price double, username varchar(50) not null, hallname char(20) not null, hall_type varchar(50) null, is_take int default 0 not null, is_mark int default 0 not null, photo varchar(100...
true
c1143a91995ac7441ee0c296891cdd1432c26697
SQL
lihongjing/ExcelToSQL
/excelSql/data/db2/2019-9-2/CB_CRE_APP_INF.sql
GB18030
1,652
3.25
3
[]
no_license
/* DB2 Source Schema : XFJRCB Target Server Type : DB2 Date: Mon Sep 02 16:21:32 CST 2019 */ -- ---------------------------- -- CB_CRE_APP_INF --Ϣ -- ---------------------------- CREATE TABLE XFJRCB.CB_CRE_APP_INF( CHANNEL_NO VARCHAR(20) NOT NULL, CHANNEL_SEQ VARCHAR(30), APPLY_DATA VARCHAR (1000...
true
3715a0273ce8c24a4bb000106955943f3209ccc4
SQL
johanine/Sistema-Lavanderia
/Procedimientos Almacenados/Cliente/spuModificarCliente.sql
UTF-8
770
2.75
3
[]
no_license
use dblavanderia; delimiter $ CREATE DEFINER=`root`@`localhost` PROCEDURE `spuModificarCliente`(IdCliente_ varchar(6), DNI_ varchar(8), Nombres_ varchar(25), Apellidos_ varchar(50), Telefono_ varchar(9), Direccion_ varchar(50)) begin declare CodError varchar(2); de...
true
1171f46e372a1ece3832bd62f520f21605d3b3c6
SQL
cosmosCosmicos/AcidLabTest
/WorldIndicator/ACIDLAB SQL/getMortalityIndicatorByAllCountries.sql
UTF-8
488
3.390625
3
[]
no_license
CREATE PROCEDURE getMortalityIndicatorByAllCountries( @startYear varchar(4), @endYear varchar(4) ) AS BEGIN SELECT COUNTRYNAME [CountryName],SUM(round(CONVERT(FLOAT,I.VALUE),2))[Rate],YEAR [Year], 'MORTALITY'[Description] FROM WorldIndicator..indicators I WHER...
true
9653b3dd432fd42a98dbe9dc78a493f17e831e90
SQL
BrianMartinDev/My-SQL-Queries
/Results/Week 11 Assignment/5. Recipes Database.sql
UTF-8
182
3.3125
3
[]
no_license
SELECT SUM(MeasureAmountID) AS RecipiesWithCarrots FROM ingredients INNER JOIN recipes ON ingredients.IngredientID = recipes.RecipeID WHERE ingredients.IngredientName = 'Carrot';
true
7ec27d182190e7bfa585fd48a16bf05ee604f483
SQL
tymfrontiers-cdn/admin.soswapp
/data/data.sql
UTF-8
2,029,400
2.703125
3
[ "MIT" ]
permissive
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; DROP TABLE IF EXISTS `city`; CREATE TABLE `city` ( `code` char(10) NOT NULL, `state_code` char(5) NOT NULL, `name` varchar(30) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; INSERT INTO `city` (`code`, `state_code`, `name`) V...
true
c53ca8a0d996c7e7a5b354aaed3c4087d14e781b
SQL
jmagit/MAD20200113
/Ejemplos.sql
UTF-8
2,889
4
4
[]
no_license
select $ROWGUID, p.BusinessEntityID , p.FirstName as Nombre, p.LastName Apellidos, p.MIddleName [Middle Name], 1 Tipo from Person.Person p --where p.FirstName like '$_A$_$%' escape '$' where 'Algo' like (p.FirstName + '%') order by p.FirstName, p.LastName SELECT [BusinessEntityID] , case when Title is not ...
true
1bcb3485cfa22c0acaf2e46e59aa35459ee84901
SQL
EJMason/book-node-api
/sql/optimal.sql
UTF-8
306
3.5625
4
[]
no_license
SELECT users_books.read, books.id AS books_id, books.title, authors.name AS author, authors.id AS authors_id FROM users INNER JOIN users_books ON users.id = users_books.users_id INNER JOIN books ON users_books.books_id = books.id INNER JOIN authors ON books.authors_id = authors.id WHERE users.id = $1;
true
b6be1e05eb08a367a9d29c1c7f0260b25e6a0db6
SQL
dimitarminchev/ITCareer
/06. Бази данни/05. Joins/5.2.4.sql
UTF-8
487
3.734375
4
[ "CC-BY-NC-4.0", "CC-BY-NC-SA-4.0" ]
permissive
/* Задача 5.11. Резюме на служителите */ USE `soft_uni`; SELECT `e`.`employee_id`, concat(`e`.`first_name`," ",`e`.`last_name`) AS `employee_name`, concat(`m`.`first_name`," ",`m`.`last_name`) AS `manager_name`, `d`.`name` AS `department_name` FROM `employees` AS `e` INNER JOIN `employees` AS `m` ON `m`.`empl...
true
b72cd71b04deba797ff667503f402cb1ed5f1423
SQL
UAMS-DBMI/PosdaTools
/posda/posdatools/queries/sql/DefacingImportCommentLike.sql
UTF-8
327
2.625
3
[ "Apache-2.0" ]
permissive
-- Name: DefacingImportCommentLike -- Schema: posda_files -- Columns: ['import_event_comment'] -- Args: ['import_event_comment_like'] -- Tags: ['nifti'] -- Description: Find matching import_event_comments in defaced_dicom_series -- select import_event_comment from defaced_dicom_series where import_event_comment...
true
585ae9f0e32cd7ea4a36f995a46b7e825954a0ee
SQL
izayoi5776/leetcode
/src/leetcode/627.sql
UTF-8
395
3.125
3
[]
no_license
update Salary set sex = if(sex='f','m','f') START TRANSACTION; CREATE TABLE `Salary` ( `id` INT NOT NULL, `name` VARCHAR(250) NULL, `sex` ENUM('M','F') NULL, `salary` INT NULL, PRIMARY KEY (`id`) ); COMMIT; insert into Salary values(1,'A','m',2500); insert into Salary values(2,'B','f',1500); insert into...
true
3bb129f14e369389d57b046194aa0f051d9eda82
SQL
bretweinraub/bash_profiles
/bdw/sql/createUser.sql
UTF-8
569
3.171875
3
[]
no_license
set pagesize 0 select 'this script will first drop/cascade the user you specify ....' from dual; drop user &&user cascade; create user &&user identified by &&password temporary tablespace temp default tablespace data1; grant connect to &&user; grant resource to &&user; grant create table to &&user; grant create sna...
true
dae760f2af9bfea1cd59e330d03baa70774c99db
SQL
klutometis/incubot
/log.sql
UTF-8
600
2.71875
3
[]
no_license
DROP TABLE IF EXISTS tokens; CREATE TABLE tokens( token_id INTEGER PRIMARY KEY AUTOINCREMENT, token TEXT UNIQUE DEFAULT NULL, token_count INTEGER DEFAULT 0 ); DROP TABLE IF EXISTS saws; CREATE TABLE saws( saw_id INTEGER PRIMARY KEY AUTOINCREMENT, saw TEXT UNIQUE DEFAULT NULL ...
true
9a4d62f5f86c851c6f864fc38c32c9c402b69105
SQL
MTES-MCT/monitorenv
/infra/db/db_users_metabase.sql
UTF-8
334
2.65625
3
[ "MIT" ]
permissive
CREATE ROLE readaccess; GRANT CONNECT ON DATABASE monitorenvdb TO readaccess; GRANT USAGE ON SCHEMA public TO readaccess; GRANT SELECT ON ALL TABLES IN SCHEMA public TO readaccess; ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES TO readaccess; CREATE USER metabase WITH PASSWORD '***'; GRANT readacces...
true
09e3a2a2ec046a997ad6744477ad527613a95436
SQL
akozlik/YMCA-Parser
/install.sql
UTF-8
1,695,282
2.703125
3
[]
no_license
CREATE TABLE `ymcas` ( `ymca_id` int(11) NOT NULL AUTO_INCREMENT, `location_name` varchar(100) NOT NULL, `address` varchar(50) NOT NULL, `city` varchar(50) NOT NULL, `state` varchar(5) NOT NULL, `zip` varchar(5) NOT NULL, `phone` varchar(15) NOT NULL, `website` text NOT NULL, PRIMARY KEY (`ymca_id`)...
true
2e4673e145428772f011a9d5b922d01f56743abc
SQL
b4tm444n/Content-Management-Systeme-Studienarbeit
/Datenbankexporte/Daten_2.1.sql
UTF-8
3,237
3.28125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.3 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Erstellungszeit: 21. Nov 2018 um 13:18 -- Server-Version: 10.1.36-MariaDB -- PHP-Version: 7.2.11 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_C...
true
7164543b2f4303d9d9827ad07b4f14b5b62974f4
SQL
zob456/perch-fms
/schemas/schemas.sql
UTF-8
11,892
3.109375
3
[ "MIT" ]
permissive
-- Client SCHEMA CREATE SCHEMA IF NOT EXISTS "GloboGym"; SET SCHEMA 'GloboGym'; CREATE TABLE IF NOT EXISTS "FacilityData" ( "FacilityID" SERIAL PRIMARY KEY NOT NULL, "FacilityName" text NOT NULL, "FacilityAddressID" integer NOT NULL, "FacilityPhone" integer ...
true
907cb484ae4f43f6dd3896942bf968ec90f27178
SQL
luccasklotz/Udemy-MySQL
/join.sql
UTF-8
1,888
4.28125
4
[]
no_license
select * from dept_manager_dup order by dept_no; select * from departments_dup order by dept_no; select m.dept_no,m.emp_no,d.dept_name from dept_manager_dup m inner join departments_dup d on m.dept_no = d.dept_no order by m.dept_no; SELECT e.emp_no, e.first_name, e.last_name, e.hire_date, d.dept_no FROM emp...
true
56d07c37b33502d108e378bc4094aae2c0ab33af
SQL
NicoBecq/php-crudbrut
/assets/build/contacts.sql
UTF-8
1,019
3.28125
3
[]
no_license
-- -- Base de données : `crudbrut` -- CREATE DATABASE IF NOT EXISTS `crudbrut` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci; USE `crudbrut`; -- -------------------------------------------------------- -- -- Structure de la table `contacts` -- DROP TABLE IF EXISTS `contacts`; CREATE TABLE IF NOT EXISTS `co...
true
9577ec193f70d2dc0c79d5f64c7192757f40e1fd
SQL
Tecktoart/example
/db/structure.sql
UTF-8
1,584
3.09375
3
[]
no_license
CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL); CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version"); CREATE TABLE "articles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" text, "description" text, "created_at" datetime, "updated_at" datetime, "user_id" intege...
true
5202527bafa66aef008bce5f6d7d6d5118a67699
SQL
Oseriki/Pewlett-Hackard-Analysis
/Queries/Employee_Database_challenge.sql
UTF-8
1,456
4.75
5
[]
no_license
--Getting retiring employees only in Sales and Development department SELECT e.emp_no, e.first_name, e.last_name, ti.title, ti.from_date, ti.to_date INTO retirement_titles FROM employees AS e LEFT JOIN titles AS ti ON e.emp_no= ti.emp_no WHERE birth_date BETWEEN '1952-01-01' AND '1955-12-31' ORDER BY...
true
bef4b04329457340efd711e157eb850e837297c1
SQL
emilypadilha/galeriadefotosifc
/galeriadefotosifc.sql
UTF-8
19,218
3.375
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.8.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1:3306 -- Generation Time: 29-Nov-2019 às 12:42 -- Versão do servidor: 5.7.24 -- versão do PHP: 7.2.14 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_...
true
143e0f34b62c23bb965b798545efbc91729d8793
SQL
omermacitt/Patika_sql_dersleri
/Sql_task9.sql
UTF-8
907
3.890625
4
[]
no_license
--1.city tablosu ile country tablosunda bulunan şehir (city) ve ülke (country) isimlerini birlikte görebileceğimiz INNER JOIN sorgusunu yazınız. select city,country from country inner join city on city.country_id = country.country_id ; --2.customer tablosu ile payment tablosunda bulunan payment_id ile customer ta...
true
e5c14914689f3c6762aa78fdb6806028ec7aebd1
SQL
bortoloso/ORACLE-PLSQL
/MONTAR_AMBIENTE/criar_schemas_usuarios.sql
UTF-8
1,281
2.84375
3
[]
no_license
/* Ambiente de PRODUÇÃO */ create tablespace prd logging datafile 'prd.dbf' size 100m autoextend on next 100m extent management local; create user prd identified by <informar senha> default tablespace prd quota unlimited on prd; grant create session, alter session, create table, create procedure, create view, create ...
true
11faaba689cf36712bdb4072dfc888e81a7c322d
SQL
OsmanYavuz-web/Toplu-Numara-Operator-Sorgulama
/operator_db.sql
UTF-8
3,473
3.21875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.3.11 -- http://www.phpmyadmin.net -- -- Anamakine: 127.0.0.1 -- Üretim Zamanı: 04 Tem 2015, 21:03:48 -- Sunucu sürümü: 5.6.24 -- PHP Sürümü: 5.6.8 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*...
true
4289b1c45c0a6bc08fecbed832d3befb6f4af734
SQL
robgalicia/katsa_php
/Database/Store/sp_categoria_lst.sql
UTF-8
199
2.625
3
[]
no_license
DELIMITER $$ DROP PROCEDURE IF EXISTS sp_categoria_lst $$ CREATE PROCEDURE sp_categoria_lst() begin select idcategoria, desccategoria from categoria order by desccategoria; end$$ DELIMITER ;
true
c334f6d8b3acc4e37271d21cb77a370ee673f0d0
SQL
xqj/webs
/sqlScript/Lable.sql
UTF-8
1,062
3.046875
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : mono Source Server Version : 50152 Source Host : 192.168.87.64:3306 Source Database : websites Target Server Type : MYSQL Target Server Version : 50152 File Encoding : 65001 Date: 2015-02-04 17:49:59 */ SET FOREIGN_KEY_CHECKS=0; -- -...
true
930b227d6ec832ae410b91fffc41169f2ccb52b4
SQL
KalaniCollen/comunidadAEI
/dbscripts/db.sql
UTF-8
19,626
3.171875
3
[ "MIT" ]
permissive
-- phpmyadmin sql dump -- version 4.8.2 -- https://www.phpmyadmin.net/ -- -- servidor: 127.0.0.1 -- tiempo de generación: 07-11-2018 a las 22:46:35 -- versión del servidor: 10.1.34-mariadb -- versión de php: 5.6.37 set sql_mode = "no_auto_value_on_zero"; set autocommit = 0; start transaction; set time_zone = "+00:00";...
true
33a5b2bb78b18dfcaf307da456e01ba177e926a3
SQL
connorschutz/323-HW
/Subkeys.sql
UTF-8
901
3.3125
3
[]
no_license
CREATE TABLE composers ( composerName varchar(20) NOT NULL, nationality varchar(20), yearOfBirth int, CONSTRAINT composers_pk PRIMARY KEY (composerName) ); CREATE TABLE compositions ( title varchar(20) NOT NULL, composer varchar(20) NOT NULL, CONSTRAINT compositions_fk FOREIGN KEY (composer...
true
869dab19f961ad2cb62de6eaab96198d30c7fe23
SQL
Youichii/Project-1TM1
/backendProjet/scripts-base-de-donnees/insertion-donnees.sql
UTF-8
15,832
3.4375
3
[]
no_license
//Ajout des villes et des codes postaux INSERT INTO villes (postal, ville) VALUES (5000,'Namur'), (1348,'Louvain-la-Neuve'), (2000,'Anvers'), (4000,'Liège'), (6600,'Bastogne'), (1000,'Bruxelles'), (3500,'Hasselt'); //Ajout des catégories et de leur id INSERT INTO categories (idCat, categorie) VALUES ('c01','autre'),...
true
5cb199c534332e06691001629f457b094aaa7134
SQL
ciainis/petition
/sql/user_profiles.sql
UTF-8
224
2.875
3
[]
no_license
DROP TABLE IF EXISTS user_profiles; CREATE TABLE user_profiles( id SERIAL PRIMARY KEY, age INT, city VARCHAR(100), url VARCHAR(400), user_id INT REFERENCES users(id) ON DELETE CASCADE UNIQUE NOT NULL );
true
ec0707ade916099c4dd529e63f709dbaec2bcc04
SQL
Guilherme-git/GerenciamentoEstoque
/controleestoque.sql
UTF-8
4,597
3.328125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.9.0.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Tempo de geração: 27-Out-2019 às 22:39 -- Versão do servidor: 10.4.6-MariaDB -- versão do PHP: 7.3.9 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET ...
true
8a2e50904d5ae5bf3d1cae116f7ffa724b314954
SQL
Jamoladdin/chat
/chat.sql
UTF-8
8,089
3.171875
3
[ "BSD-3-Clause" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.7.3 -- https://www.phpmyadmin.net/ -- -- Хост: 127.0.0.1:3306 -- Время создания: Дек 17 2020 г., 10:04 -- Версия сервера: 5.6.37 -- Версия PHP: 7.0.21 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACT...
true
12a299e69aae71dd420df354d15b8aa378665af0
SQL
julianflowers/Achilles
/inst/sql/sql_server/heels/parallel/heel_results/rule_6.sql
UTF-8
879
3.53125
4
[ "Apache-2.0" ]
permissive
--ruleid 6 CDM-conformance rule:invalid concept_id --HINT DISTRIBUTE_ON_KEY(analysis_id) select analysis_id, ACHILLES_HEEL_warning, rule_id, record_count into @scratchDatabaseSchema@schemaDelim@tempHeelPrefix_@heelName from ( SELECT or1.analysis_id, CAST(CONCAT('WARNING: ', cast(or1.analysis_id as VARCHAR(10...
true
9727f9bc431afd53aab614ec77fe5f7258fecf31
SQL
BradyBerner/SpringCLC
/Documentation/Database/DDL Script.sql
UTF-8
2,679
3.703125
4
[]
no_license
-- 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='TRADITIONAL,ALLOW_INVALID_DATES'; -- ----------------------------------------------------- -- Schema springclc...
true
d99a359831ffca98c73d23b0056023148d50cb96
SQL
drkvogel/retrasst
/notes/discard/discard-samples/queries.sql
UTF-8
186
3.03125
3
[]
no_license
SELECT DISTINCT D.specimen_field_name FROM DESCRIP D JOIN PROFILE_MAP PM ON 1=1 AND D.descriptor_id = PM.group_id WHERE 1=1 AND PM.group_id <> 0 AND D.specimen_field_name <> ''
true
9f10e30470bdd3bf2fb64209cc6e13595fa54ece
SQL
jhuang0416/Mysql
/US266_SQL_Trigger Implementations/US266-2.sql
UTF-8
9,805
4.28125
4
[]
no_license
/* Revisit the code implementation of the following user stories, and implement SQL triggers. *Build a MYSQL Database - US103, US96, US114, US104, US58, US115 -Verify that the acceptance criteria has been met in the above stories. -Implement Triggers. */ CREATE DATABASE StudentDB; USE StudentDB; ...
true
df3cb4e88fce2ba0829858eb0502c74d254c8e10
SQL
hillscottc/git-hill
/umg/RDx SQL/Stored Procedures/R2/TalentNameRolesLoad/R2.TalentNameRolesInsert.proc.sql
UTF-8
666
3.21875
3
[]
no_license
-- ============================================ -- Description: Inserts records in R2.TalentNameRoles -- ============================================= CREATE PROCEDURE [R2].[TalentNameRolesInsert] AS BEGIN insert into R2.TalentNameRoles select TALENT_NAME_ID = ld.TALENT_NAME_ID, ROLES = R2.GetTalentNa...
true
f7258a70738cd7d8f7a54839ebaf4fb000339455
SQL
Nabil-Chaouki/TDI205
/Base de données/S2 - Langage SQL/Pratique Langage SQL/Rajae Ajandouz/requite 52.sql
UTF-8
151
2.609375
3
[]
no_license
create table Employe( id int primary key, nom varchar(20), salaire float , ); Select * From Employe where salaire =(select MAX(salaire) From Employe) ;
true
e580d6927fcd8106a7b7efb1e3d02e274f51362b
SQL
MrD0079/portal
/sql/rep_spd_list.sql
UTF-8
486
2.734375
3
[]
no_license
/* Formatted on 10.06.2015 16:24:49 (QP5 v5.227.12220.39724) */ SELECT id, fio, tn, ter_db, TO_CHAR (last_month, 'dd.mm.yyyy') last_month, contract_num, TO_CHAR (contract_end, 'dd.mm.yyyy') contract_end FROM rep_spd_list WHERE :valid = 1 OR ( ...
true
ad08934c55a2783e30a7866865f8721c03b6991d
SQL
DigitalResearchCentre/api
/sql/140724.cleanup.sql
UTF-8
861
3.5
4
[]
no_license
-- delete doc: 53453, 53503 from admin interface -- delete entity: 725005 -- delete text: 1579353 /* select d.id, d.name, c.id, c.name from api_doc d left join api_community_docs cd on cd.doc_id = d.id left join api_community c on c.id = cd.community_id where d.depth = 1 and c.id is null; select d.id, d.name, c.id, ...
true
43f6847b444fffb1f58968543b13c8c6048a8ce2
SQL
edwaxyax111/asigpro
/dbasigpro.SQL
UTF-8
1,669
3.515625
4
[ "MIT", "BSD-3-Clause" ]
permissive
/* Created: 16/11/2017 Modified: 16/11/2017 Model: MySQL 5.6 Database: MySQL 5.6 */ -- Create tables section ------------------------------------------------- -- Table empleado CREATE DATABASE IF NOT EXISTS dbasigpro COLLATE utf8_spanish_ci; use dbasigpro; CREATE TABLE `empleado` ( `id_empleado` Int NOT NULL A...
true
820d2c446d70d7fbe9bef6ddee2083d3c79c8ac7
SQL
chenxy11/wx
/wx-master/src/main/resources/db/migration/V6__ADD_BASE_INFO.sql
UTF-8
1,188
3.53125
4
[]
no_license
-- Create table create table BASE_DICT ( ID VARCHAR2(64) not null, BASE_CODE VARCHAR2(20), BASE_NAME VARCHAR2(80), INPUT_CODE VARCHAR2(40), BASE_TYPE VARCHAR2(40) ) tablespace JIMS_DATA pctfree 10 initrans 1 maxtrans 255 storage ( initial 64 next 1 minextents 1 maxextents ...
true
116fb726ab7e79cb9585c14d23af5d3a94fcf19c
SQL
fvargas10/EMBus
/PA/agregarbus.sql
UTF-8
449
2.5625
3
[]
no_license
---se crea el procedimiento almacenado create procedure agregarbus ---se declaran los parametros que usaremos @patente varchar(6), @id_marca_bus int, @id_oficina int, @apodo varchar(20), @capacidad int, @estado bit as ---se hace un insert a la tabla usuarios y se envian los parametros INSERT INTO BUS(PATENTE, ID_MARCA_...
true
89ef85c2884fea358ae3c326b9dd9d605461f536
SQL
github-googleforwork/bvi
/schemas/bigquery_esku/bigquery_custom_schemas/custom/custom_drive_adoption_per_day_per_ou.sql
UTF-8
2,318
4.4375
4
[ "Apache-2.0" ]
permissive
-- CUSTOM custom_drive_adoption_per_day_per_ou -- Review: 19/01/2018 SELECT audit_log_drive_adoption.date AS date, audit_log_drive_adoption.ou AS ou, audit_log_drive_adoption.custom_1 AS custom_1, audit_log_drive_adoption.custom_2 AS custom_2, audit_log_drive_adoption.custom_3 AS custom_3, active_users.cou...
true
58dbc237f2fb6b3b1c849a90601f12eac46752c5
SQL
LeonDuan/Relational_Databases_Practice
/final-project/m4_create_tables.sql
UTF-8
504
3.15625
3
[]
no_license
create table Songs (song_id varchar(10), song_title varchar(75), song_duration float); create table Title_Songs(title_id varchar(10), song_id varchar(10)); create table Singer_Songs(person_id varchar(10), song_id varchar(10)); alter table Songs add primary key (song_id); alter table Title_Songs add primary key (titl...
true
bf0d3c2a92cb8dbf547f6a18bb52c4a3958efff7
SQL
radtek/abs3
/sql/mmfo/bars_dm/Script/partition_customers_plt.sql
WINDOWS-1251
7,018
3.03125
3
[]
no_license
prompt bars_dm/script/partition_customers_plt prompt drop interim table if exists (in case of previous unsuccessfull installation) begin execute immediate 'drop table bars_dm.test_customers_plt'; exception when others then if sqlcode = -942 then null; else raise; end if; end; / prompt partit...
true
6b0440376e963d53df09c668fffc471f04b4ce8c
SQL
Purva1991/Shopping-Cart--JSF2.0-
/sql/tbl_cart.sql
UTF-8
2,759
3.546875
4
[]
no_license
-------------------------------------------------------- -- File created - Tuesday-May-13-2014 -------------------------------------------------------- -------------------------------------------------------- -- DDL for Table TBL_CART -------------------------------------------------------- CREATE TABLE "ORACLE...
true
eef5d470f1da1d90899491844a87a19337b8dc90
SQL
jorgelrt/PL-SQL
/Delete.sql
UTF-8
190
2.515625
3
[]
no_license
DECLARE v_StudentCutoff NUMBER := 10; BEGIN DELETE FROM classes WHERE current_students < v_StudentCutoff; DELETE FROM students WHERE current_credits = 0 AND major = 'Economics'; END;
true
e640bc329d15e94997730e9345a5bccdc2663b44
SQL
lastlySly/shirodemo
/shiro-web/src/main/resources/sql_data/shiro_test.sql
UTF-8
5,406
3.03125
3
[]
no_license
/* Navicat Premium Data Transfer Source Server : localhost_3306 Source Server Type : MySQL Source Server Version : 50717 Source Host : localhost:3306 Source Schema : shiro_test Target Server Type : MySQL Target Server Version : 50717 File Encoding : 65001 Date: 04/07...
true
ffc9334ca102ca7ec748de1b8e156abb7deb7be8
SQL
hazardland/app.sql
/admin/tables/admin_session.sql
UTF-8
411
3.234375
3
[]
no_license
SET search_path TO admin; DROP TABLE IF EXISTS admin_session; CREATE TABLE admin_session ( id BIGSERIAL NOT NULL PRIMARY KEY, admin_id BIGINT REFERENCES admin(id) NOT NULL, token CHAR(36), device CHAR(36), insert_date TIMESTAMP WITHOUT TIME ZONE NOT NULL DEFAULT NOW() ); CREATE UNIQUE INDEX ON ad...
true
a8d37398ef05057e5ee8694671fce2f42352658d
SQL
elack33/MyDiveristyRank
/MyDiversityRank_CreateTables.sql
UTF-8
1,854
3.5625
4
[]
no_license
DROP TABLE IF EXISTS DataDetail, Answers, Questions, Career, Orientation, Interests, Gender, BirthYear, Demographics; CREATE TABLE Demographics ( ID INT NOT NULL AUTO_INCREMENT, DemoGraphic nchar varchar(100) NOT NULL, PRIMARY KEY (ID) ); CREATE TABLE BirthYear ( ID INT NOT NULL AUTO_INCREMENT, ...
true
11adb51f0ab5c1d8bf05720249e8d524d573a385
SQL
ashokcs/tenpo-customer-authentication-ms
/src/main/resources/db/migration/V1_0__base_schema.sql
UTF-8
1,169
3.375
3
[]
no_license
CREATE TABLE customer_transaction_context( id UUID NOT NULL, user_id UUID NOT NULL, external_id VARCHAR(64) NOT NULL, tx_type VARCHAR(20) NOT NULL, tx_amount NUMERIC(15,2) NOT NULL, tx_currency INTEGER NOT NULL, tx_merchant VARCHAR(100) NOT NULL...
true
4ed23c68adf9d7c9d30c790e0786123f8e931847
SQL
dejovy/bus_ticketing
/database/bus_ticketing.sql
UTF-8
9,426
3.078125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.7.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jul 15, 2018 at 12:31 PM -- Server version: 10.1.29-MariaDB -- PHP Version: 7.2.0 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
true
300c8caaa5265581eae60d83aaeb44e346090f2b
SQL
France-ioi/AlgoreaBackend
/db/migrations/1911050522_rework_items_permissions.sql
UTF-8
27,159
3.890625
4
[ "MIT" ]
permissive
-- +migrate Up CREATE TABLE `permissions_granted` ( `group_id` BIGINT(20) NOT NULL, `item_id` BIGINT(20) NOT NULL, `source_group_id` BIGINT(20) NOT NULL, `origin` ENUM('group_membership','item_unlocking','self','other') NOT NULL, `latest_update_at` DATETIME NOT NULL DEFAULT NOW() COMMENT 'La...
true
0ee0458a48bb93ba506a87e615605f477954945a
SQL
yujihamaguchi/sql-QA
/p058_01.sql
UTF-8
219
3.328125
3
[]
no_license
-- Q: Class_Bの東京在住の誰よりも若いClass_Aの生徒を抽出せよ。(ALLを使って) -- A SELECT * FROM Class_A WHERE age < ALL (SELECT age FROM Class_B WHERE city = '東京' AND age IS NOT NULL) ;
true
2e02d98b30913b62f821dbaf3a11f7607a7f06c9
SQL
antongtkolev/SpeedyPizzaApp_CUBA_Platform
/modules/core/db/init/hsql/20.create-db.sql
UTF-8
2,435
2.96875
3
[]
no_license
-- begin SPEEDYPIZZAAPP_ORDER_DETAILS alter table SPEEDYPIZZAAPP_ORDER_DETAILS add constraint FK_SPEEDYPIZZAAPP_ORDER_DETAILS_ON_ORDER foreign key (ORDER_ID) references SPEEDYPIZZAAPP_ORDERS(ID)^ alter table SPEEDYPIZZAAPP_ORDER_DETAILS add constraint FK_SPEEDYPIZZAAPP_ORDER_DETAILS_ON_DISH foreign key (DISH_ID) refere...
true
b6a23b4425ba0600217b800a48372a6d7ade876b
SQL
freezby/transmart-data
/ddl/postgres/tm_lz/lt_chromosomal_region.sql
UTF-8
651
2.9375
3
[]
no_license
-- -- Name: lt_chromosomal_region; Type: TABLE; Schema: tm_lz; Owner: - -- CREATE TABLE lt_chromosomal_region ( region_id bigint NOT NULL, gpl_id character varying(50), chromosome character varying(2), start_bp bigint, end_bp bigint, num_probes integer, region_name character varying(100), ...
true
a86c8fc200619a0fcafc11a6438991a309626cf6
SQL
LorranSutter/URI-Online-Judge
/Tried/SQL/2616.sql
UTF-8
105
2.859375
3
[ "MIT" ]
permissive
-- Wrong answer 100% select C.id, C.name from customers C left join locations L on C.id = L.id_customers
true