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
c9d4ae4352e471402bd5a6054852470d5b143cbf
SQL
gilglecio/CC2017-1
/faculdade.sql
UTF-8
5,164
3.90625
4
[]
no_license
/* CRIÇÃO DA TABELA CIDADE */ CREATE TABLE cities ( -- O ID DEVE COMÇAR COM 1 E INCREMENTAR DE 1 EM 1 id INT NOT NULL PRIMARY KEY IDENTITY(1,1), name VARCHAR(50) NOT NULL, uf CHAR(2) NOT NULL, ) /* CRIÇÃO DA TABELA PROFESSOR */ CREATE TABLE teachers ( -- O ID DEVE COMÇAR COM 1 E INCREMENTAR DE 1 EM 1 id INT NOT ...
true
9b06c67e2209e8766b2e654c64faa3919e81144b
SQL
liugyang/quant
/quant-spirit/src/main/resources/script/sql/init.sql
UTF-8
10,442
3.15625
3
[]
no_license
CREATE TABLE IF NOT EXISTS STOCK_QUOTE( SNO INT(11) NOT NULL AUTO_INCREMENT primary key, SYMBOL VARCHAR(50), NAME VARCHAR(50), OPENING_PRICE DOUBLE, CLOSING_PRICE DOUBLE, CURRENT_PRICE DOUBLE, HIGHEST_PRICE DOUBLE, LOWEST_PRICE ...
true
285ae5084c5e6ce28712c7f9d796595f0ccb3e74
SQL
ThePatrickStar/sqlite-test-generator
/minimized/alter4.sql
UTF-8
2,978
3.59375
4
[]
no_license
CREATE TEMP TABLE abc(a, b, c); SELECT sql FROM sqlite_temp_master; SELECT sql FROM temp.sqlite_master; SELECT sql FROM sqlite_temp_master; SELECT sql FROM temp.sqlite_master; SELECT sql FROM sqlite_temp_master; SELECT sql FROM temp.sqlite_master; CREATE TABLE temp.t1(a, b); ALTER TABLE t1 ADD c; SELECT sql FROM sqlite...
true
78cd3e4bb03a036135f64d523b810d8eedb3dbf9
SQL
nixent/pageup-dbt-utils
/macros/sql/merge_updated_values.sql
UTF-8
3,714
4.375
4
[ "MIT" ]
permissive
{# Join the values of two tables together, taking values from the "new" table where they are updated, otherwise falling back to the "old" table. This is useful for partial row updates as part of incrementals. (eg selective updates of pivoted rows) The macro will merge rows using the following rules * every mapped col...
true
7a8fbf07fb1c8a3e3f3ec2727f8b5510fd33402d
SQL
muye0928/data
/用户分层.sql
UTF-8
2,916
4.09375
4
[]
no_license
select a.user_id,a.user_name,a.level,a.fans,a.entry_read,b.hot,c.best,d.low,e.operation,f.tag1,g.all_tags,h.cheer11, h.bookmark11,h.comment11,h.share11,i.type1,j.publish from (select user_id,user_name,level,fans,entry_read from keep_dm_su.dm_su_user_level where p_date = "2019-07-08" and level !="C")a left outer joi...
true
5f4c94a483002433feb7b040bc361202ab1b6df7
SQL
VKSi/2020_02_GB_SQL
/HW_11.sql
UTF-8
2,329
3.984375
4
[]
no_license
-- Практическое задание тема "Оптимизация запросов" -- 1. Создайте таблицу logs типа Archive. Пусть при каждом создании записи в таблицах users, -- catalogs и products в таблицу logs помещается время и дата создания записи, название -- таблицы, идентификатор первичного ключа и содержимое поля name. USE shop; DROP TAB...
true
e295a812051c1a72eb55143eb94530da05d7bd19
SQL
f0cuSsss/Travel_DB
/Queries/_11+.sql
UTF-8
354
3.421875
3
[]
no_license
 /* Отобразить информацию о самом активном туристе (по количеству приобретённых туров) */ CREATE PROCEDURE mostActiveTourist AS select DISTINCT tI.Tourist, tI.SalesCount from touristInformation as tI where tI.SalesCount=(SELECT MAX(tI.SalesCount) FROM touristInformation as tI)
true
fa4293cab6e53b00ddaab01b1edb888fd08c646c
SQL
iubhatt17/BeesWebMo-QMS
/beeswebmo.sql
UTF-8
5,095
3.140625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.7.9 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Aug 20, 2018 at 03:07 PM -- Server version: 10.1.31-MariaDB -- PHP Version: 7.2.3 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
true
699f1b6dd4a55a275df512929d07494b632838a1
SQL
julia-kopysova/python-education
/database_module/sql_practice2.3/practice_2_3.sql
UTF-8
6,204
4.34375
4
[]
no_license
-- Задание 1 -- Создайте новую таблицу potential customers с полями id, email, name, surname, second_name, city CREATE TABLE IF NOT EXISTS potential_customers( potential_customers_id serial PRIMARY KEY, email VARCHAR(255) NOT NULL, name VARCHAR(255) NOT NULL, surname VARCHAR(255) NOT NULL, second_name VAR...
true
4fc97ebd0a533de1555ea43ae330a5a5e8c7a132
SQL
Fr4nc3/oracle-db-samples
/sql/create_tables/tables/books.sql
UTF-8
532
3.0625
3
[ "MIT" ]
permissive
-------------------------------------------------------- -- DDL for Table BOOKS -------------------------------------------------------- SET VERIFY OFF connect "SYS"/"&&sysPassword" as SYSDBA set echo on CREATE TABLE "BOOKS" ( "BOOK_ID" VARCHAR2(40 BYTE), "TITLE" VARCHAR2(255 BYTE), "TOTAL_PAGES" NUMBER(*,0) DEFAUL...
true
919e04448b85f6f1180596b15ff71364762ed35b
SQL
robgalicia/katsa_php
/Database/Store/sp_ordencompracliente_sel.sql
UTF-8
1,037
3.625
4
[]
no_license
DELIMITER $$ DROP PROCEDURE IF EXISTS sp_ordencompracliente_sel $$ CREATE PROCEDURE sp_ordencompracliente_sel(IN pidordencompracliente int) begin select occ.idordencompracliente, occ.folioordencompra, occ.fecha, occ.idcliente, occ.idclientedomiciliofiscal, occ.idcotizacion, occ.idtipomoneda, ifnull(o...
true
33ba66ce38cd5a2213a69e257775f48c97f5e465
SQL
sofiull/Tugas_KulakPulsa_proyek2
/database/kulak_pulsa.sql
UTF-8
7,895
2.984375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.7.7 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Oct 10, 2019 at 03:39 AM -- Server version: 10.1.30-MariaDB -- PHP Version: 7.2.2 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
true
8c13febb762ceca739a010330597a68d19c22b0f
SQL
chaubeygaurav/fingerprint-attendance
/src/sql/fp_overtime.sql
UTF-8
297
2.859375
3
[ "MIT" ]
permissive
-- Table: fp_overtime -- DROP TABLE fp_overtime; CREATE TABLE fp_overtime ( id integer NOT NULL, mode character varying(15), CONSTRAINT fp_ovetime_pkey PRIMARY KEY (id), CONSTRAINT fp_ovetime_mode_key UNIQUE (mode) ) WITH ( OIDS=FALSE ); ALTER TABLE fp_overtime OWNER TO absensi;
true
953647a4342eae26ee7e052b0b9e80a89911ec97
SQL
alexsks65536/MySQL-lessons
/lesson9/lesson9-2.sql
WINDOWS-1251
3,101
4.1875
4
[]
no_license
/* * MySQL ( ) * shop. shop_read * , shop shop. */ -- shop DROP USER IF EXISTS 'shop_reader'@'localhost'; CREATE USER 'shop_reader'@'localhost' IDENTIFIED WITH sha256_password BY '0000'; GRANT SELECT ON shop.* TO 'shop_reader'@'localhost'; -- test INSERT INTO catalogs(nam...
true
fc4e56f92e057036e88a58ad022c1d77b1c61f68
SQL
PawLipinski/Komunikator
/KomunikatorDB/ContactsQuery.sql
UTF-8
229
3.15625
3
[]
no_license
select Uzytkownicy.imie_uzytkownika, Uzytkownicy.nazwisko_uzytkownika, status_uzytkownika FROM (Kontakty INNER JOIN Uzytkownicy ON Uzytkownicy.login_uzytkownika=Kontakty.login_kontaktu) Where Kontakty.login_wlasciciela like 'ppl'
true
2b16589d2df6121bd42bc09751919b7dc6d10591
SQL
NikiSpasov/SQL_Server_Basics
/08.FunctionsAndProcedures/03.TownNamesStartingWith.sql
UTF-8
177
3.015625
3
[]
no_license
CREATE PROCEDURE usp_GetTownsStartingWith (@firstLetter VARCHAR(10)) AS SELECT Name FROM Towns as t WHERE t.Name LIKE @firstLetter + '%' --EXEC usp_GetTownsStartingWith 'b'
true
8119902bbcf8e59a250427d5863164d379bf8d31
SQL
phuongnguyenpnv/The-Coin-and-Gift-Shop
/thecoingiftshop.sql
UTF-8
11,905
3.5625
4
[]
no_license
DROP DATABASE thecoingiftshop; CREATE DATABASE thecoingiftshop; -- USE thecoingiftshhop; CREATE TABLE IF NOT EXISTS register( admin_id int(11) NOT NULL PRIMARY KEY AUTO_INCREMENT, username varchar(255) NOT NULL, email varchar(255) NOT NULL, password varchar(255) NOT NULL ); CREATE TABLE customers( cus_id I...
true
fe248dae7d2f02d70a3b732624871dfe554af581
SQL
Zouxxyy/algorithm-learning
/nowcoder/src/main/sql/nc00/28.sql
UTF-8
559
4.375
4
[]
no_license
# SQL28: 查找描述信息中包括robot的电影对应的分类名称以及电影数目 # 这里用 c.category_id 进行 groupBy,而 c.name 和 c.category_id 是一对一关系,因此可以选它 select c.name, count(f.film_id) from film as f join film_category as fc on f.film_id = fc.film_id join category as c on fc.category_id = c.category_id where f.description like '%robot%' an...
true
7251c6f05560cf444e0ae7fccea4ab27c0b27131
SQL
Sakrawan77/rekruitment
/news.sql
UTF-8
2,364
2.984375
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.0.4 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Apr 23, 2017 at 09:22 AM -- Server version: 5.5.32 -- PHP Version: 5.4.16 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; ...
true
3d358d499a2de290f16fcc9e1dddc40bf6e91d9c
SQL
zymeng1998/sql_practice_day2
/d2q12.sql
UTF-8
167
3.234375
3
[]
no_license
SELECT pcr.Name AS Country, psp.Name AS Province FROM Person.CountryRegion as pcr join Person.StateProvince as psp ON pcr.CountryRegionCode = psp.CountryRegionCode ;
true
e4a78bbc17ed56e21ae407b0af0adfd5ec8b65a1
SQL
wonkgo1/restaurants_web_templates
/sql/triggers/trigger_rest_bus_cntcts.sql
UTF-8
1,386
3.21875
3
[]
no_license
DELIMITER $$ DROP TRIGGER IF EXISTS bi_rest_bus_cntcts$$ CREATE TRIGGER bi_rest_bus_cntcts BEFORE INSERT ON rest_bus_cntcts FOR EACH ROW BEGIN SET new.creat_ts = current_time; SET new.mod_ts = current_time; END$$ DROP TRIGGER IF EXISTS bu_rest_bus_cntcts$$ CREATE TRIGGER bu_rest_bus_cntcts BEFORE ...
true
3dee1e6386d58506406e40584a70c1ed3fbb5518
SQL
kumc-bmi/naaccr-tumor-data
/heron_load/naaccr_concepts_mix.sql
UTF-8
2,605
3.828125
4
[]
no_license
select * from naaccr_export_stats where 'dep' = 'NAACCR_Summary'; select c_basecode from naaccr_ontology where 'dep' = 'NAACCR_Ontology1'; whenever sqlerror continue; drop table naaccr_ontology_unpub; whenever sqlerror exit; create table naaccr_ontology_unpub compress as select * from naaccr_ontology where 1 = 0; /*...
true
6a3d9625619f2da4484c1bc386a410b13bf75303
SQL
aldyrenaldi/PBO-Final-Project
/db_pemilu.sql
UTF-8
3,107
3.140625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.9.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Dec 01, 2019 at 02:46 PM -- Server version: 10.4.8-MariaDB -- PHP Version: 7.3.11 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
true
0db6610a6a36b0f40dbcc6d2cf31a35d94e58ebe
SQL
Tazi0/taz-admin
/taz-admin/database.sql
UTF-8
441
2.8125
3
[]
no_license
CREATE TABLE `taz-log` ( `ID` int(11) NOT NULL, `userID` int(100) NOT NULL, `modID` int(100) NOT NULL, `action` varchar(100) COLLATE utf8mb4_bin NOT NULL DEFAULT 'report', `reason` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin; ALTER TABLE `taz-log`...
true
05b8593ec7233208d1d42a1e3ff56680bc5716df
SQL
inasafe/inasafe-fba
/fixtures/schema/02_fbf/03_views/05_sub_district_extent.sql
UTF-8
743
3.5
4
[ "MIT" ]
permissive
-- -- Name: vw_sub_district_extent; Type: VIEW; Schema: public; Owner: - -- CREATE OR REPLACE VIEW public.vw_sub_district_extent AS SELECT subdistrict_extent.id, subdistrict_extent.id_code, public.st_xmin((subdistrict_extent.extent)::public.box3d) AS x_min, public.st_ymin((subdistrict_extent.extent)::publ...
true
7e3b8dc734572e65eb69ddacd64c0960525f8c01
SQL
kdnk/tatsuzin-sql
/chap4/Items_ShopItems.sql
UTF-8
1,620
3.90625
4
[]
no_license
-- /* 関係除算でバスケット解析 */ -- CREATE TABLE Items -- (item VARCHAR(16) PRIMARY KEY); -- -- CREATE TABLE ShopItems -- (shop VARCHAR(16), -- item VARCHAR(16), -- PRIMARY KEY(shop, item)); -- -- INSERT INTO Items VALUES('ビール'); -- INSERT INTO Items VALUES('紙オムツ'); -- INSERT INTO Items VALUES('自転車'); -- -- INSERT INTO ShopI...
true
fe1a0afc1d9eedf80caf7b846fa1a307a28c067e
SQL
spencerrecneps/bna-tools
/export_shp.sql
UTF-8
2,024
2.53125
3
[]
no_license
SELECT statefp10 AS "STATEFP10", countyfp10 AS "COUNTYFP10", tractce10 AS "TRACTCE10", blockce AS "BLOCKCE", blockid10 AS "BLOCKID10", partflg AS "PARTFLG", housing10 AS "HOUSING10", pop10 AS "POP10", road_ids AS "ROAD_IDS", pop_low_stress AS "POP_LOW_ST", pop_high_stress AS "POP_HIGH_S", pop_score AS "POP_SCORE", emp_...
true
2b01b2c1a4d880e4a52c8559f78373acf611d7dd
SQL
CUBRID/cubrid-testcases
/sql/_13_issues/_12_2h/cases/bug_bts_3095.sql
UTF-8
1,991
3.640625
4
[ "BSD-3-Clause" ]
permissive
drop table if exists t1; create view v1 as select 1 id from db_root; alter view v1 as select * from v1; select * from v1; drop view v1; create table t1 (a int, b int); create view v2 as select * from t1; create or replace view v2 as select * from v2; select * from v2; drop table t1; drop view v2; drop table ...
true
12328524488881e948f3b2f387e3153b685aa8e4
SQL
wcbutler/Zencart-SQL-Reports
/salespermonth.sql
UTF-8
361
3.78125
4
[]
no_license
SELECT YEAR(date_purchased) as SalesYear, MONTH(date_purchased) as SalesMonth, SUM(products_price) AS TotalSales FROM tlal_zencart151.orders INNER JOIN tlal_zencart151.orders_products ON orders.orders_id = orders_products.orders_id GROUP BY YEAR(date_purchased), MONTH(date_purchased) ORDER BY YE...
true
ad58d901dd82bf24dd4fe9a36b45b29ec23988bc
SQL
macantivbl/BaseDatos
/DDL/CrearTablas.sql
UTF-8
268
2.921875
3
[]
no_license
/* CREATE TABLE NOMBRE ( C1 TIPO, D2 TIPO, C3 TIPO ) */ CREATE TABLE PRUEBA( CODIGO NUMBER, NOMBRE VARCHAR(100) ); DESC PRUEBA; CREATE TABLE PRUEBA1( CODIGO NUMBER, NOMBRE VARCHAR(100) DEFAULT 'TOMAS', FECHA_ENTRADA DATE DEFAULT SYSDATE ); DESC PRUEBA;
true
b41ddd29be982f5ab665cf73d4c8e1d8b383eb2d
SQL
FingerLeakers/EquationGroupLeak
/Linux/etc/oracle/t1_sample_only.sql
UTF-8
17,603
2.609375
3
[]
no_license
set echo off set pagesize 9999 set linesize 1000 set verify off set trimspool on set trimout on set feedback 6 set recsep off set maxdata 60000 set numwidth 20 set longchunk 60000 set long 9999999 set termout on set arraysize 3 set escape ~ set heading on ttitle "Passwords" skip, skip column username format a25 column...
true
4d4799ca2c5e76c0c4f94e26a19f245832bb78db
SQL
tiagodavi/assando-sites.com.br
/docs/database.sql
UTF-8
8,689
4
4
[]
no_license
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'; -- ----------------------------------------------------- -- Table `status` -- ----------------------------------------------------- DRO...
true
a30abe17e0fdd0af6f8bcdda24ee25a244e7dc02
SQL
bellmit/dbSmellsData
/data/open-source/extracted_sql/needle4j_needle4j.sql
UTF-8
272
3.5625
4
[ "MIT" ]
permissive
create table ADDRESS_TABLE ( id int primary key, zip varchar(256), street varchar(256), user_id int not null, foreign key (user_id) references USER_TABLE(id)) select * from " + Address.TABLE_NAME); create table USER_TABLE ( id int primary key, name varchar(256) not null)
true
43499b1386c4484789da91a655c27752a5cee3b6
SQL
grvgoel81/leetcode
/employees-earning-more-than-their-managers.sql
UTF-8
166
3.359375
3
[]
no_license
SELECT Name FROM Employee e WHERE EXISTS ( SELECT 1 FROM Employee m WHERE m.Id = e.ManagerId AND e.Salary > m.Salary )
true
ff6a6502b88013cb62b7ab9bd5aea8a2d3b800e3
SQL
Vyterm/VytHug
/VirusServer/virusdb.sql
UTF-8
561
3.078125
3
[ "MIT" ]
permissive
drop database if exists `virus_db`; create database `virus_db`; use `virus_db`; create table `md5_virus_table`( `virus_id` int not null auto_increment, `virus_tag` varchar(50) not null unique, `virus_name` varchar(50) not null default 'Trojan', primary key(virus_id) ); insert into `md5_virus_table`(`virus_t...
true
19e14a9272516aef0b61ad90f001d87712392d39
SQL
pratyushjava/SQL-PLSQL
/PLSQL/ex3/calamt3_8.sql
UTF-8
889
2.625
3
[]
no_license
create or replace procedure calamt(code number,amt number,netamt out number,discount out number) as begin discount:=0; netamt:=amt; if (code=1 and amt< 3000) then discount:=amt*.02; netamt:=netamt-discount; elsif (code=1 and amt>=3000 and amt<5000) then discount:=amt*.08; netamt:=netamt-discount...
true
1939beb1f82e26577408854476045740b6a872f7
SQL
Yanzu-zz/New-retail-db-design
/sql/订单表.sql
UTF-8
1,466
3.796875
4
[]
no_license
# 订单表 CREATE TABLE t_order( id INT UNSIGNED PRIMARY KEY AUTO_INCREMENT COMMENT "主键", `code` VARCHAR(200) NOT NULL COMMENT "流水号", type TINYINT UNSIGNED NOT NULL COMMENT "订单类型:1实体销售,2网络销售", shop_id INT UNSIGNED COMMENT "零售店ID", customer_id INT UNSIGNED COMMENT "会员ID", amount DECIMAL(10, 2) UNSIGNED NOT NULL COMMENT...
true
1df099fa5b9288cb4d3138fb248810f67cea9f31
SQL
bazizyacine/mysql-labs
/Samples/String_functions_lab.sql
UTF-8
307
2.6875
3
[]
no_license
USE CAVE_TEST; show tables; select * from books; select concat("Title: ", title) from books; select concat('My', ' ', 'name is', ' ', 'John'); select lcase('Fred'); select ucase(left('England', 2)); select trim(' fox '); set @greeting = 'Hello Bob. How are you?'; select substr(@greeting, 7, 3);
true
2acc6c8d5b7d0db91fe8f181d23f726b420da79c
SQL
Michelmax-code/BootcampX
/3_queries_group_by/e_average_completion_time.sql
UTF-8
283
4.03125
4
[]
no_license
SELECT students.name as student, avg(assignment_submissions.duration) as average_assignment_duration FROM students JOIN assignment_submissions ON students.id = student_id WHERE end_date IS NULL GROUP BY student ORDER BY average_assignment_duration DESC;
true
d26e6d40ba19601d6f79ca057b1d5b262b7ce484
SQL
BarryHan363136/cloud-service
/cloud-shiro/src/main/resources/spark_shiro.sql
UTF-8
4,072
3.296875
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : Local-VM128 Source Server Version : 50723 Source Host : 192.168.33.128:3306 Source Database : spark_shiro Target Server Type : MYSQL Target Server Version : 50723 File Encoding : 65001 Date: 2018-08-20 14:39:52 */ SET FOREIGN_KEY_CHEC...
true
725d293f26d2cd78dba046b4b0e8878fa2704bf9
SQL
lizhengdao/xymz
/src/main/webapp/DB/create_tables.sql
UTF-8
4,813
3.46875
3
[]
no_license
DROP TABLE IF EXISTS `tb_user`; create table tb_user( id int(8) not null auto_increment comment '用户表id' , mobilephone varchar(15) not null comment '用户手机号', cpassword varchar(60) not null comment '用户登录密码', username varchar(30) comment '用户名', realname varchar(15) comment '用户真实姓名', gender int(1) comment '用户性别0:女,1:...
true
5e14c46f43189755a5b9ea08cb13f5ffc5c4aa51
SQL
mmraz/Jmoosehead
/dao/src/main/sql/DDL.sql
UTF-8
11,351
3.3125
3
[]
no_license
/*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `aliases` ( `PLAYER_ID` int(10) unsigned NOT NULL AUTO_INCREMENT, `NAME` varchar(20) NOT NULL, `VALUE` varchar(2048) DEFAULT NULL, PRIMARY KEY (`PLAYER_ID`), CONSTRAINT `FK_ALIASES_1` FOREI...
true
8c9096ece6023ead7c739b5488704f1bddb26a32
SQL
insomnia-consulting/pcs
/src/main/sql/build_medicare_letter.sql
UTF-8
8,345
3.09375
3
[]
no_license
create or replace procedure build_medicare_letter ( M_lab_number in number, M_claim in number, second_notice in char, M_origin in number ) as P_error_code number; P_error_message varchar2(512); P_proc_name varchar2(32); P_code_area varchar2(32); M_practice number; M_practice_id varcha...
true
ccbf8ba4c304b04e5cb1f75c6be370e1664d4451
SQL
jamesp9/calendar-table
/calendar_mysql.sql
UTF-8
2,521
3.84375
4
[ "MIT" ]
permissive
DROP TABLE IF EXISTS calendar; DROP VIEW IF EXISTS v3; DROP VIEW IF EXISTS v10; DROP VIEW IF EXISTS v1000; CREATE TABLE calendar ( dt DATE NOT NULL PRIMARY KEY, y smallint NULL, q tinyint NULL, m tinyint NULL, d tinyint NULL, dw tinyint NULL, month_name varchar(9) NULL, day_name varchar(9) NULL, w ti...
true
c5830babf93c18e7676ea4514e56b8e1af1d167d
SQL
ZJHZMARK/CSE344
/create-tables.sql
UTF-8
855
3.859375
4
[]
no_license
PRAGMA foreign_keys=ON; .mode csv CREATE TABLE Carriers( cid VARCHAR PRIMARY KEY, name VARCHAR ); .import carriers.csv Carriers CREATE TABLE Months( mid INT PRIMARY KEY, month VARCHAR ); .import months.csv Months CREATE TABLE Weekdays( did INT PRIMARY KEY, day_of_week VARCHAR ); .import weekdays.csv Weekday...
true
d86c3e8db93e111f5b362006fa3bcaf6d7559b3b
SQL
djw8605/Gratia
/admin-util/site-cleanup/site-cleanup-sql/Site.sql
UTF-8
272
2.828125
3
[]
no_license
\! echo "========================================================" \! echo " Query - Sites not used in the Probe table." \! echo "========================================================" SELECT * from Site WHERE siteid NOT IN (SELECT distinct(siteid) FROM Probe) ;
true
3ed89c82c26e7b17c600b31ab25c06ea6793e6fc
SQL
luke-leonard/EventTrackerProject
/Database/CodingLanguages.sql
UTF-8
3,974
3.640625
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='ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTI...
true
b1cba6e8c2d5227271ea453c6a6e668516649769
SQL
daking0/b_OracleDB
/_30_SELECT_Question.sql
UHC
2,635
4.4375
4
[]
no_license
-- Լ ̿ؼ ذϼ 1. ̸ 2 л ̸ ˻Ѵ SELECT sno лȣ, sname ̸ FROM student WHERE length(sname) =2; 2. '' л ̸ ˻Ѵ SELECT sno лȣ, sname ̸ FROM student WHERE SUBSTR(sname, 1, 1) = ''; --WHERE sname LIKE '%'; 3. ѱڷ ˻Ѵ(EX ->) SELECT pno ȣ, pname ̸, orders FROM professor WHERE SUBSTR(orders, 1, 1)=''; 4. Ϲ ؼ...
true
a19950a1f04e0bf5285b7a96aab6b56281162350
SQL
mmart059/messenger_app
/project/sql/src/load_data.sql
UTF-8
952
2.734375
3
[]
no_license
COPY USER_LIST FROM '/tmp/mmart059/project/data/usr_list.csv' WITH DELIMITER ';'; ALTER SEQUENCE user_list_list_id_seq RESTART 55906; COPY USR FROM '/tmp/mmart059/project/data/usr.csv' WITH DELIMITER ';'; COPY USER_LIST_CONTAINS FROM '/tmp/mmart059/project/data/usr_list_contains.csv' WITH DELIMITER ';'; COPY CHAT FR...
true
fd63f03abe007c84735d38bdff514c7cd8b6578e
SQL
superhero2007/slim_cms
/slim_cms_frontend/system/sql/gbc-paying-clients-20150611.sql
UTF-8
647
3.484375
3
[]
no_license
SELECT `invoice`.`client_id`, `client`.`company_name`, `invoice`.`timestamp` AS `last_invoice`, `client`.`suburb`, `client`.`state`, `client`.`country`, `client_contact`.`firstname`, `client_contact`.`lastname`, `client_contact`.`phone`, `client_contact`.`email`, IF(`invoice`.`paid` = '1', 'YES', 'NO') AS `paid` FROM ...
true
340309dfb936328df260a4ae857bac3383163b2b
SQL
lhanson/timneh
/src/main/resources/schema-postgresql-from-scratch.sql
UTF-8
1,515
3.828125
4
[ "Apache-2.0" ]
permissive
/* * PostgreSQL schema for initializing our database schema. * Based on http://docs.spring.io/spring-security/site/docs/current/reference/html/appendix-schema.html */ drop table if exists comments cascade; drop table if exists discussions cascade; drop table if exists authorities cascade; drop table if exists users ...
true
1b2d4d30170886684146a6a3ae308a757989e99b
SQL
AA19BD/DataBase
/lab8/Lab8.sql
UTF-8
8,573
3.796875
4
[]
no_license
-- SELECT * FROM pg_statistic;---stores statistical data about the contents of the database -- select * from pg_indexes;--save all created indexes -- TRUNCATE table;--delete all from the table CREATE DATABASE lab8; CREATE TABLE countries( location_id SERIAL PRIMARY KEY , street_address varchar(25), postal...
true
0a1ff01941a342651df90c879daefb2cb8aac31d
SQL
lotomer/tomstools
/code/common-web/database/DDL/T_METRIC_WEB_SUB_DETAIL.sql
UTF-8
721
3.265625
3
[]
no_license
CREATE TABLE `T_METRIC_WEB_SUB_DETAIL` ( `DETAIL_ID` int(11) NOT NULL AUTO_INCREMENT, `SUB_WEB_METRIC_ID` int(11) NOT NULL COMMENT 'WEB指标子编号', `METRIC_TITLE` varchar(128) NOT NULL COMMENT '指标说明', `METRIC_SELECTOR` varchar(256) NOT NULL COMMENT '指标值选择器', `VALUE_TYPE` varchar(128) DEFAULT NULL COMMENT '取值属...
true
c2a990fe8e385491736aefac95a640fc4ee7c7c8
SQL
harshpandya1996/timetable-jsp-servlet
/timetable (1).sql
UTF-8
3,605
3.203125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.1.12 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Nov 29, 2016 at 08:25 AM -- Server version: 5.6.16 -- PHP Version: 5.5.11 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;...
true
81da3a0d1d5dc60a7a8d5e41d4422b7f8e9f2aeb
SQL
fittipaldi/Nodejs-API
/dump.sql
UTF-8
5,623
3.25
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Sep 22, 2020 at 06:14 PM -- Server version: 10.1.34-MariaDB -- PHP Version: 7.0.31 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; -- -- Database: `...
true
7dd6944526feecec325826b571cad4a089ed65d8
SQL
yameenajani/MCQ-Test-System
/test_software.sql
UTF-8
3,725
3.296875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.9.0.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Oct 02, 2019 at 02:09 PM -- Server version: 10.3.15-MariaDB -- PHP Version: 7.3.6 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @O...
true
62b4228755691e9bb3a5b3ef269a8619e3cb5baf
SQL
mohamedtalawy/Portfolioprojects
/COVID Portfolio Project - Data Exploration.sql
UTF-8
4,040
4.375
4
[]
no_license
select * FROM portfolio..CovidDeaths$ where continent is not null order by 3,4 --select * --FROM portfolio..CovidVaccinations$ --order by 3,4 ----select data that we are going to be using Select location, date, total_cases, new_cases, total_deaths, population FROM portfolio..CovidDeaths$ order by 1,2 --l...
true
6f753bb64e74ff1fde579f41d0317f7d7bead114
SQL
billdonner/medcommonsPhp
/schema/110_add_modservices_columns_mcidentity.sql
UTF-8
721
2.578125
3
[]
no_license
alter table modservices add column `asize` tinyint(4) NOT NULL; alter table modservices add column `suggestedprice` int(11) NOT NULL; alter table modservices add column `servicelogo` varchar(255) NOT NULL; CREATE TABLE `modsvctemplates` ( `templatenum` mediumint(9) NOT NULL, `servicename` varchar(255) NOT NU...
true
2612da306a7454e918c16698cdc7786b7da92866
SQL
Guilherme-Endrigo/SQL_LETS
/CriaçãoTabela.sql
ISO-8859-3
2,479
3.765625
4
[]
no_license
CREATE DATABASE LETSCARROS USE LETSCARROS CREATE TABLE FORMULARIO_CONTATO ( IdContato int IDENTITY PRIMARY KEY, IdModeloCarro int NOT NULL, NomeCompleto varchar (60) NOT NULL, EmailContato varchar(256) NOT NULL, TelefoneContato bigint NOT NULL, MensagemContato varchar(500) NOT NULL ) ALTER TABLE ...
true
75b71120145a81deda0d76891a9b96f375a91185
SQL
FISCO-BCOS/hackathon
/2022-shenzhen-FinTechathon/NanshanBeauty/Projects/script/DML.sql
UTF-8
1,618
3.03125
3
[ "Apache-2.0" ]
permissive
-- 角色信息 INSERT INTO `role` VALUES (1, 'customer', '消费者'); INSERT INTO `role` VALUES (2, 'car', '车企'); INSERT INTO `role` VALUES (3, 'productor', '电池生产商'); INSERT INTO `role` VALUES (4, 'rent', '电池租赁商'); INSERT INTO `role` VALUES (5, 'recycle', '回收商'); INSERT INTO `role` VALUES (6, 'stored', '储能企业'); INSERT INTO `role` ...
true
5c02bf7ec28bfdd20e2fc593a92841b8f7a6a7a9
SQL
LilianaSepulveda/holbertonschool-higher_level_programming
/0x0E-SQL_more_queries/10-genre_id_by_show.sql
UTF-8
264
3.5
4
[]
no_license
-- Lists all shows in hbtn_0d_tvshows that have at least one genre linked SELECT tv_shows.title, tv_show_genres.genre_id FROM tv_shows INNER JOIN tv_show_genres ON tv_shows.id = tv_show_genres.show_id ORDER BY tv_shows.title, tv_show_genres.genre_id;
true
b962bac72d98ebcfb7f85c42417f14a67a8696b6
SQL
sofun520/springmvc
/src/main/resources/db/migration/V20160619_01__TEST_TABLE.sql
UTF-8
5,329
3.296875
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : localhost-mysql Source Server Version : 50623 Source Host : localhost:3306 Source Database : test Target Server Type : MYSQL Target Server Version : 50623 File Encoding : 65001 Date: 2016-05-03 10:17:42 */ SET FOREIGN_K...
true
2c54a122571eaf94614e15071417cb753a9ce3e7
SQL
WilliamfShaw/honeybadger_nyc
/week_13/wed/instructor/sql_lab/basic_queries.sql
UTF-8
1,540
4.0625
4
[]
no_license
-- BASIC QUERIES -- Unless otherwise stated, all queries should return all columns -- Get all information about all authors SELECT * FROM authors; -- Get just the name and birth year of all authors SELECT name, birth_year FROM authors; -- Get all authors born in the 20th centruy or later SELECT * FROM authors WHERE ...
true
ca738b31b0b8cf19169cda4e26e0827f0c2707ab
SQL
MiguelCatala27/tuner-api
/database/seed.sql
UTF-8
425
2.53125
3
[]
no_license
\c songs_dev; INSERT INTO songs(name, artist, album, time, is_favorite) VALUES ('good 4 u', 'Olivia Rodrigo', 'SOUR', '2:58', true), ('Wants and Needs (feat. Lil Baby', 'Drake', 'Scary Hours 2', '3:12', true), ('Kiss Me More (feat. SZA)', 'Doja Cat', 'Kiss Me More - Single', '3:28', true), ('Bad Habits', 'Ed Sheeran',...
true
7f3fb5d04462aa9482f817feac83c63ed1399260
SQL
ProyectoGrupo3/Primera-entrada-del-proyecto
/PROYECTO/Fases (archivos varios)/Fase 2/Base de datos archivos/Vistas.sql
UTF-8
1,555
3.484375
3
[]
no_license
-- CREACIÓN DE VISTAS CREATE OR REPLACE FORCE VIEW "SYSTEM"."AVISO_VISTA" ("FECHA_AVISO", "CP_FECHA", "NOMBRE", "APELLIDO_1", "TEXTO", "CP_TRABAJADOR_ID_TRABAJADOR", "TRABAJADOR_ID_TRABAJADOR") AS SELECT A.FECHA_AVISO, A.CP_FECHA, T.NOMBRE, T.APELLIDO_1, A.TEXTO, A.CP_TRABAJADOR_ID_TRABAJADOR, A.TRABAJADOR_ID_T...
true
dd47f8a181fe5e229c8d11bd0cb45734a9e89c6b
SQL
McGradyZww/learning-practise
/D2.Designs/D2.Designs/SQL脚本/产品证券/ProductSecuPubIF_ts.sql
UTF-8
121,912
2.78125
3
[]
no_license
DELIMITER ;; use db_pdsecu;; # 事务_产品证券_公共接口_获取股东代码编号 DELIMITER ;; DROP PROCEDURE IF EXISTS prt_pdsepubif_GetStockAccoNo;; DELIMITER ;; CREATE PROCEDURE prt_pdsepubif_GetStockAccoNo( IN p_opor_co_no int, IN p_opor_no int, IN p_oper_mac varchar(32), IN p_oper_ip_addr varchar(32), IN p_oper_info varch...
true
22c98bdee921005eec0db8773c67c402e3737dbd
SQL
internetoftim/Automotive-TextAnalytics-POC
/tread/201_map_categories.sql
UTF-8
2,153
3.78125
4
[]
no_license
------------------------------------------------------------------------------- -- Script : 201_map_categories.sql -- Purpose : Create mapping of categories in NHTSA complaints, to -- final subset of categories for analysis. -- This needs to be discussed with client. -- -- Author(s...
true
f8b7c26952142c9c9136ead8f18968d4d142ce8e
SQL
HighDeFing/ABDProyecto1
/Scripts/3_new.sql
UTF-8
4,697
2.984375
3
[]
no_license
--1 CREATE OR REPLACE PROCEDURE agregar_servidor( id IN SERVIDOR.id %type, nombre IN SERVIDOR.nombre %type, inauguracion IN SERVIDOR.inauguracion %type, idiomas IN SERVIDOR.idiomas %type, ubicacion IN SERVIDOR.ubicacion %type, ip IN SERVIDOR.ip %type) is BEGIN INSERT INTO SERVIDOR VALUES (id...
true
d90de0d64a92e69d3572acafc2714fdcf41ccb3a
SQL
rajender-rrv/moneyflow-server
/moneyflow-scripts.sql
UTF-8
1,168
3.46875
3
[]
no_license
create database moneyflow; use moneyflow; CREATE TABLE IF NOT EXISTS `member` ( `mem_id` int(10) NOT NULL auto_increment, `refer_id` int(10), `first_name` varchar(20) NOT NULL, `last_name` varchar(20) NOT NULL, `email_id` varchar(50) , `mobile_no` varchar(12) NOT NULL, PRIMARY KEY( `mem_id` ), FOREIGN KEY (re...
true
dc9ddc3f84257b66af847bb2cc84921b18d6712d
SQL
cdufour/cdnt10-conception-bdd
/commandes-diverses.sql
UTF-8
2,124
3.734375
4
[]
no_license
/* * Commandes diverses */ -- création d'une table role à deux colonnes CREATE TABLE role (id INT nom TEXT); -- suppression de la table role DROP TABLE role; -- altération de la table role par -- ajout d'une colonne statut de type INT ALTER TABLE role ADD statut INT; -- altération de la table role par -- suppressio...
true
4aa147fb929a96da287a6899a384542d0c491cc3
SQL
loloazz/szt
/ddl_sql/1.1-ods_szt_data.sql
UTF-8
1,181
3.328125
3
[]
no_license
--2 ODS 原始数据不做任何处理 drop table IF EXISTS ods.ods_szt_data; create EXTERNAL TABLE IF NOT EXISTS ods.ods_szt_data( car_no String comment '车牌号', card_no String comment '卡号', close_date String comment '结算日期', company_name String comment '公司名称', conn_mark String comment '联程标记', deal_date String comm...
true
a8cdd642bdf9295390dd06804290c440bad8a2a4
SQL
lompong2107/movie
/movie.sql
UTF-8
31,451
3.140625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Aug 18, 2021 at 07:14 PM -- Server version: 10.4.11-MariaDB -- PHP Version: 7.4.3 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
true
488ea3f8393239cdb6ecc0838e2f7c5ff49174f9
SQL
CEAG0712/ReviewsAPI-Udacity-CarlosArosemena
/src/main/resources/db/migration/V1__CreateTables.sql
UTF-8
710
3.40625
3
[]
no_license
drop table if exists comment; drop table if exists review; drop table if exists product; create table product ( id bigint auto_increment primary key, product_name varchar(255) not null, product_description varchar(255) ); create table review ( id bigint auto_increm...
true
66fa9025e727b8c94906966f7c0693e7a8bc49d6
SQL
yaxhpal/scripts
/DB/test.sql
UTF-8
3,652
3.671875
4
[]
no_license
-- Set Home branch set @homebranch := 'CH'; -- Set inventory date set @inventoryDate := '2013-11-10'; -- List of titles checkouts SELECT /* checkouts */ items.itemnumber, biblio.biblionumber, biblioitems.isbn, items.barcode, items.itype, items.itemcallnumber, biblio.title, biblio.author,...
true
b5f0b02ee5e87574c6d5b043fe9c3e3b152be45d
SQL
thoidaianhhung/HackerRank
/AveragePopulationofEachContinent.sql
UTF-8
147
3.8125
4
[]
no_license
SELECT COUNTRY.CONTINENT, ROUND(AVG(CITY.POPULATION),0) FROM CITY INNER JOIN COUNTRY ON CITY.CountryCode = COUNTRY.Code GROUP BY COUNTRY.CONTINENT;
true
259c055349c27300feea2c5b776f0e916942976c
SQL
sslavian812/logiweb
/data/refresh drivers and statuses.sql
UTF-8
1,137
3.609375
4
[]
no_license
SET FOREIGN_KEY_CHECKS = 0; DROP TABLE IF EXISTS `drivers`; DROP TABLE IF EXISTS `driver_statuses`; CREATE TABLE `drivers` ( `id` INT(11) NOT NULL AUTO_INCREMENT, `first_name` VARCHAR(45) DEFAULT NULL, `last_name` VARCHAR(45) DEFAULT NULL, `personal_number` VARCHAR(45) DE...
true
554b8d72dfefb882d137653c2ac6a36b6b448092
SQL
radtek/LS
/Delphi/FDC Library/FDC Standard Applications/Standard VERO Application/Server/fdc_Object_Lst_ID.sql
UTF-8
207
2.890625
3
[]
no_license
create or replace view fdc_Object_Lst_ID as select obj.ID, obj.OWNER_OBJECT_ID, obj.OBJECT_TYPE_ID from fdc_Object obj where obj.AccessLevel > 0 or fdc_User_ReadAccess(obj.ID) = 1;
true
15a4e3a9d4d1a65d3c1bb14c3273e6c783217a2f
SQL
randifirmansyahh/pemilu-pub
/database/pemilu_pub.sql
UTF-8
3,688
3.140625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Waktu pembuatan: 03 Agu 2021 pada 06.58 -- Versi server: 10.4.17-MariaDB -- Versi PHP: 7.3.27 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@C...
true
4e5de8a1fff9c1cfaef83337bb22e24545a956c9
SQL
bigdatalyn/bigdatalyn.github.io
/12cR2MultitenantHOLCookbook/HOL/app_containers/wm_Order_Data.sql
UTF-8
2,877
3.484375
3
[ "MIT" ]
permissive
-- ========================================================================= -- -- File: wm_Order_Data.sql -- Author: Patrick G. Wheeler -- $Revision: 1 $ -- $Date: 5/18/17 7:53p $ -- $Author: PWheeler $ of last update -- -- Copyright (C) 2017 Oracle Corporation, All rights reserved. -- -- Purpose: -- ...
true
c5a65db4e068d01fd895b32deeaf7e75883a65bd
SQL
zhongsuofu/qtud
/doc/数据库/qtud3.sql
UTF-8
13,219
3.03125
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : qtud Source Server Version : 50539 Source Host : localhost:3306 Source Database : qtud Target Server Type : MYSQL Target Server Version : 50539 File Encoding : 65001 Date: 2017-08-13 22:50:04 */ SET FOREIGN_KEY_CHECKS=0; -- ---------...
true
dc0bcd2fb23f54f39b7ede22528bcce506a92cba
SQL
sandeshprabhu02/Learning-SQL
/Leetcode-SQL/Problem Set 2/1285. Find the Start and End Number of Continuous Ranges.sql
UTF-8
1,326
4.375
4
[]
no_license
/* 1285. Find the Start and End Number of Continuous Ranges Table: Logs +---------------+---------+ | Column Name | Type | +---------------+---------+ | log_id | int | +---------------+---------+ id is the primary key for this table. Each row of this table contains the ID in a log Table. Since some ID...
true
9327dd3b61acab3383308c49f2c9a31f164da3a4
SQL
miths1108/PiGen
/codd-data-gen/resources/cdgclient/postgresOld/projection queries/q056.sql
UTF-8
387
2.71875
3
[]
no_license
select distinct ca_state, cd_gender, cd_marital_status, cd_dep_count, cd_dep_employed_count, cd_dep_college_count from customer,customer_address,customer_demographics, catalog_sales, date_dim where c_current_addr_sk = ca_address_sk and cd_demo_sk = c_current_cdemo_sk and c_customer_sk = cs_ship_customer_sk and ...
true
50d53d9db58c314b0713adf1b5edee464d8b9153
SQL
TylerTsang/SQL-Archive
/01 Fundamentals/Fundamentals_1.sql
UTF-8
94
2.765625
3
[]
no_license
-- Select the count of payments above 5: SELECT COUNT (amount) FROM payment WHERE amount > 5;
true
7b302624d91140735ed8d5f3bacc7df82dd0c5c1
SQL
rimerkat/oraclesql
/triggers/TIEMPO_EMPLEADO.sql
UTF-8
454
3.1875
3
[]
no_license
create or replace trigger TIEMPO_EMPLEADO BEFORE LOGOFF ON DATABASE BEGIN UPDATE ESTADISTICAS SET TIEMPO_EMPLEADO = TIEMPO_EMPLEADO+(select round((extract( day from diff ))*24 + (extract( hour from diff ))+ (extract( minute from diff ))/60+ (extract( second from diff ))/3600,2) as tie...
true
12ac8292c5a78a82928fa090fd87dd0e12496f18
SQL
hw233/gsnkf_server_php
/module/world/worldpass/doc/t_world_pass_inner_user.sql
UTF-8
1,566
2.8125
3
[]
no_license
set names utf8; create table if not exists t_world_pass_inner_user ( pid int unsigned not null comment "玩家pid", server_id int unsigned not null comment "所在服server_id", uid int unsigned not null comment "玩家uid", passed_stage int unsigned not null comment "当前通关的最大关卡0-6", max_point int unsigned not null comment "本轮闯关...
true
d288f0c7e339a80516844324b739051ad3b606c5
SQL
mgeeforce/play_ratchet
/conf/evolutions/default/2.sql
UTF-8
3,340
2.578125
3
[]
no_license
# --- Sample dataset # --- !Ups Insert into user (email,name,password) values ('mike.gee@mac.com','Mike','adeptus'); INSERT INTO parent (id,name,status,date,created_by_email) VALUES (1,'Kimberely',2,'2014-03-14','mike.gee@mac.com'); INSERT INTO parent (id,name,status,date,created_by_email) VALUES (2,'Red Mountain',...
true
583b830c0aa5a4c6ab595aff21777e832f495d85
SQL
vivek-wednesday/cab-booking-nodejs
/resources/v1/08_bookings.sql
UTF-8
787
3.421875
3
[ "MIT" ]
permissive
CREATE TABLE bookings ( booking_id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, user_id INT NOT NULL, driver_id INT NOT NULL, cab_id INT NOT NULL, pickup_location VARCHAR(32) NOT NULL, start_time DATETIME DEFAULT CURRENT_TIMESTAMP, drop_location VARCHAR(32) NOT NULL, end_time DATETIME DEFAU...
true
cfe99ad6adaa5f015ae97eb369e5c7910bd61006
SQL
krishnamohankaruturi/secret
/aart-web-dependencies/db/other/US18757_ResetKAPTests.sql
UTF-8
9,657
3.46875
3
[]
no_license
DO $BODY$ DECLARE strecord RECORD; BEGIN --5402291071 ELA Stage 2 --Reactivate ELA Stage2 FOR strecord IN (select distinct st.id as stdtstid from studentstests st join student s ON st.studentid = s.id and s.statestudentidentifier in( '5402291071') and s.stateid = 51 join testsession ts ON ts.id = st.testsess...
true
f9178daff66c10365e075d659edfbbe0c3c73e12
SQL
studyskymate/MOF-inventory-management
/MOF-inventory-business/src/main/resources/data.sql
UTF-8
3,511
2.59375
3
[]
no_license
insert into todo(id,username,description,target_date,is_done) values(1001,'in28minutes','Learn Spring Boot',sysdate(),false); insert into todo(id,username,description,target_date,is_done) values(1002,'in28minutes','Learn Spring Boot2',sysdate(),false); insert into todo(id,username,description,target_date,is_done) val...
true
25369a42619a3e3a416dbe02e97bcb5add7dae4d
SQL
scott246/forannmarie
/letters.sql
UTF-8
3,186
2.578125
3
[]
no_license
DROP TABLE IF EXISTS letters; CREATE TABLE letters( title varchar(50), url text ); INSERT INTO letters VALUES ('Afraid','https://drive.google.com/open?id=1fB2TY_dbcYx84ugnvNRljU6wwDCwGf1DERO4GDD_7NU'); INSERT INTO letters VALUES ('Angry or Frustrated','https://drive.google.com/open?id=1oODnp3HSrhYPLlV17VroSa-mDlq...
true
85d70b54fb53547aa11603ef797bfc8303a7716c
SQL
jstella96/it-study-game
/src/main/webapp/sql/studyGame.sql
UTF-8
3,307
4
4
[]
no_license
SET SESSION FOREIGN_KEY_CHECKS=0; /* Drop Tables */ DROP TABLE IF EXISTS avg_typing_speed; DROP TABLE IF EXISTS default_quiz; DROP TABLE IF EXISTS default_quiz_category; DROP TABLE IF EXISTS interview_quiz_mark; DROP TABLE IF EXISTS interview_quiz; DROP TABLE IF EXISTS longword_quiz; DROP TABLE IF EXISTS shortword_qu...
true
7de852475a303ca3a8cbdf64cff2f189bffe9600
SQL
JoshuaJMiller/SQL-Course
/BB6.sql
UTF-8
375
4.0625
4
[]
no_license
# each customers last rental date select r.customer_id, concat(c.first_name, " ", c.last_name) as "Customer Name", max(left(r.rental_date, 7)) as "Last Rental Date" from rental r, customer c where r.customer_id = c.customer_id group by 1 order by 3 desc ; # revenue by month select sum(p.amount), left(p.payment...
true
2c8073587869bbce1d7e02c5f2d00e3004e7c42b
SQL
ElviraLysenko/movieTrailers_for_portfolio
/movie/movie.sql
UTF-8
12,329
3.078125
3
[ "Apache-2.0" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.7.4 -- https://www.phpmyadmin.net/ -- -- Хост: localhost -- Время создания: Авг 15 2018 г., 09:22 -- Версия сервера: 5.7.19 -- Версия PHP: 7.1.10 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SE...
true
de4465b7dab71e4ac1f00220f83553a70afeefbd
SQL
manonokekana/Meds_dispenser
/clinic.sql
UTF-8
8,904
3.234375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Oct 17, 2019 at 05:01 AM -- Server version: 10.1.37-MariaDB -- PHP Version: 7.3.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
true
9ec415a965ca2de383b5b6b21e2ad1951cbd5dfc
SQL
jaicygeorge/serverstatus
/mysqldump.sql
UTF-8
1,455
3.296875
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.5.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Oct 04, 2016 at 08:03 AM -- Server version: 5.7.11 -- PHP Version: 5.6.19 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; -- -- Database: `serverstat` -- CREATE DATABASE IF NOT EXISTS `se...
true
3f04524dcb3cb74f607be95a0530c696206da302
SQL
CUBRID/cubrid-testcases
/sql/_04_operator_function/_07_case_func/_004_least/cases/1014.sql
UTF-8
236
2.859375
3
[ "BSD-3-Clause" ]
permissive
--test least function with wehre condition. create class tb( col1 varchar ); insert into tb values('ok1'); insert into tb values('ok2'); insert into tb values('ok3'); select * from tb where least('ok4', col1)<>0 ; drop class tb;
true
994b3beea9021fbf5e5c270e1f9a7def5f0df670
SQL
yoursun0/money-transfer-api
/src/main/resources/db/ddl.sql
UTF-8
1,601
3.484375
3
[]
no_license
CREATE SCHEMA `money` ; USE `money` ; CREATE USER 'srv_money'@'%' IDENTIFIED BY 'money123'; -- ALTER USER 'srv_money'@'%' IDENTIFIED WITH mysql_native_password BY 'money123'; GRANT ALL ON money.* TO 'srv_money'@'%'; CREATE TABLE `money`.`account` ( `id` BIGINT(20) UNSIGNED NOT NULL, `name` VARCHAR(255) NOT NULL D...
true
5b93edd1a89b3066df3ffae69773217fcf09901f
SQL
JackFengRongTao/TestDemo
/oracle相关/人力-劳动合同续签.sql
GB18030
1,805
3.5
4
[]
no_license
select * from lc_hr_ldhtxq; create table lc_hr_ldhtxq_bak as select * from lc_hr_ldhtxq; select * from lc_hr_ldhtxq_bak; delete from lc_hr_ldhtxq; select * from zhyy_data.hr_evw_employee; select * from zhyy_data.hr_evw_employee a where a.empstatus = 1 and a.badge = '04087'; select a.empstatus from zhyy_data.hr...
true
be3523b5e2512308523755deaacda2f80ece8850
SQL
radtek/UGRS_Full
/UGRS.2018/UGRS.Core.SDK.DI.Transports/DAO/SQL/GetItems.sql
UTF-8
581
3.625
4
[]
no_license
SELECT DISTINCT t0.ItemCode, t0.ItemName, t0.U_GLO_RetTax from OITM T0 with (Nolock) LEFT JOIN OITW t1 with (Nolock) on t0.ItemCode = t1.ItemCode INNER JOIN [@UG_TR_ITEMRELATION] T2 with (Nolock) on t0.ItemCode = t2.Name INNER JOIN OCRD t3 with (Nolock) on t3.U_GLO_SNType = t2.U_PartnerType where t1.WhsCode = '{WHS}' a...
true
651e7a66e6f56912b9c993c2a708430fca4af393
SQL
ValentinCerneanu/ehospital
/sqlScripts.sql
UTF-8
915
3.5
4
[]
no_license
Create database movie_review; use movie_review; create table users( id int NOT NULL AUTO_INCREMENT, email varchar(50), username varchar(50), password varchar(50), status varchar(50), PRIMARY KEY (id) ); select * from users; ALTER TABLE users MODIFY COLUMN password varchar(256); CREATE TABLE...
true