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
f1849915b17776bb8f3319979e80a47968bcc475
SQL
willemvandenboom/ync-capstones
/Ahmed/Data Extraction/5. data_per_icustay_final.sql
UTF-8
3,737
3.640625
4
[]
no_license
with orderedtable as ( select table1.*, -- table1.icustay_id, table1.gender, table1.age, table1.ethnicity, table1.height, table1.weight, table1.sofatotal, table1.vent_duration, table1.oxygen_therapy_type, table1.supp_oxygen,icu_length_of_stay, table1.mortality_in_Hospt, table1.mortality_in_ICU, table1.deathtim...
true
77511133bd0dce7ed3e7b18af29e048acec77bae
SQL
muyake/mywebsite
/simple2/server/soft/blog.sql
UTF-8
2,277
3.171875
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : localhost_3306 Source Server Version : 50717 Source Host : localhost:3306 Source Database : blog Target Server Type : MYSQL Target Server Version : 50717 File Encoding : 65001 Date: 2017-09-02 10:01:50 */ SET FOREIGN_KEY_CHECKS=0; --...
true
e14e42752fd2f7190e4c136191b4500dc0c3cc92
SQL
SimonaCannalire/jd
/mySql/m3/s11.sql
UTF-8
325
3.609375
4
[]
no_license
-- group by use me; -- average salary for each department select department_id, round(avg(salary), 2) as 'avg salary' from employees group by department_id order by 2 desc; select department_id, truncate(avg(salary), 0) as 'avg salary' from employees where department_id is not null group by department_id order by 2 d...
true
8391811031b8a3f47df143754cebf89a2149d6c8
SQL
tataranovich/aws-learning
/api-gateway/social-network.sql
UTF-8
1,104
3.703125
4
[]
no_license
DROP TABLE IF EXISTS users; DROP TABLE IF EXISTS groups; DROP TABLE IF EXISTS membership; DROP TABLE IF EXISTS friendship; DROP SEQUENCE IF EXISTS user_ids; DROP SEQUENCE IF EXISTS group_ids; CREATE SEQUENCE user_ids; CREATE TABLE users ( user_id INTEGER PRIMARY KEY DEFAULT NEXTVAL('user_ids'), first_name VAR...
true
f90a64442375847afc37b127de25206e361654ef
SQL
ai-aiom/AiOM
/sql/create_database.sql
UTF-8
255
2.625
3
[]
no_license
DROP SCHEMA IF EXISTS `aiom`; CREATE SCHEMA IF NOT EXISTS `aiom` DEFAULT CHARACTER SET utf8 COLLATE utf8_bin; USE mysql; DELETE FROM user WHERE User='aiom' AND Host='%'; FLUSH PRIVILEGES; GRANT ALL PRIVILEGES ON aiom.* TO 'aiom'@'%' IDENTIFIED BY 'aiom';
true
5b59d2171169b8f8e75210b702aa9b72a944669c
SQL
Dipesh-Kokitkar/Swabhav_Repo
/SQL Server/Joins.sql
UTF-8
1,309
4.4375
4
[]
no_license
SELECT * FROM EMP; --INNER JOIN SELECT EMP.ENAME,DEPT.DNAME FROM EMP JOIN DEPT ON EMP.DEPTNO=DEPT.DEPTNO; --ALL DEPT DEATILS ALONG WITH EMP IF ANY SELECT * FROM DEPT LEFT JOIN EMP ON EMP.DEPTNO=DEPT.DEPTNO; --SHOW DEPT WHERE NO EMP SELECT DEPT.DEPTNO,DEPT.DNAME FROM DEPT LEFT JOIN EMP ON EMP.DEPTNO=DEPT.DEPT...
true
d832bc5d6d31772a20eecddc6a80c79255f22d39
SQL
fieranmason/gwells
/database/scripts/migrate_bcgs.sql
UTF-8
466
2.609375
3
[ "Apache-2.0" ]
permissive
\echo '...importing wells_screens data' INSERT INTO gwells_bcgs_number ( who_created ,when_created ,who_updated ,when_updated ,bcgs_id ,bcgs_number ) SELECT who_created ,when_created ,who_updated ,when_updated ,bcgs_id ,bcgs_number FROM WELLS.WELLS_BCGS_NUMBERS ORDER BY BCGS_NUMBER; \echo 'BCGS data i...
true
428865cc687df83ae74bbd991094756d7f40f15c
SQL
MCZbase/queries_MCZbase
/taxonomy/qc_taxa_with_missing_higher.sql
UTF-8
3,167
3.875
4
[ "Apache-2.0" ]
permissive
-- query to obtain a list of taxa used in identifications or citations within a department -- example using VP as the department. select distinct taxonomy.SCIENTIFIC_NAME , taxonomy.TAXON_NAME_ID , KINGDOM , PHYLUM , SUBPHYLUM , SUPERCLASS , PHYLCLASS , SUBCLASS , INFRACLASS , SUPERORDER , PHYLORDER , SUBORDER ,INFRA...
true
527bbd1082435a5d5abb7279baa974fe9d8b92ba
SQL
NotorionN/l2j-universe
/l2j-universe-lindvior/Lindvior Source/dist/tools/sql-game/install/bbs_memo.sql
UTF-8
373
2.6875
3
[]
no_license
CREATE TABLE IF NOT EXISTS `bbs_memo` ( `memo_id` int(11) NOT NULL auto_increment, `account_name` varchar(45) NOT NULL, `char_name` varchar(35) NOT NULL, `ip` varchar(16) NOT NULL, `title` varchar(128) NOT NULL, `memo` text NOT NULL, `post_date` INT(15) UNSIGNED NOT NULL, PRIMARY KEY(`memo_id`), INDEX...
true
86cb011dca52d4e7e3b02531b3f5c74a9d1363c5
SQL
silence-do-good/stress-test-Postgres-and-MySQL
/dump/low/day13/select1156.sql
UTF-8
266
2.84375
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='WiFiAP' AND sen.id=ci.SENSOR_ID AND ci.INFRASTRUCTURE_ID=ANY(array['4039','5092','2068','4042','4054','5100_3','1412','3092','3086','2100_4'])
true
887722dc577b975bb5fa8b3a5478aa57d6efa8e9
SQL
PurrBiscuit/james-river-jewelry
/creates-alters-drops.sql
UTF-8
13,032
3.9375
4
[]
no_license
/* The order of the DROP TABLE statements matters in this file; this ensures that the child tables in the foreign key constraints are dropped before the parents tables are. */ IF OBJECT_ID('dbo.TAX_RATES', 'U') IS NOT NULL DROP TABLE dbo.TAX_RATES; CREATE TABLE TAX_RATES( TaxRateID uniqueidentifier NOT NULL, T...
true
ff173cc1d46bb17d6e3e0d517901b526e5f00745
SQL
paul-rogers/drill-test-framework
/framework/resources/Advanced/tpcds/tpcds_sf1/hive-generated-parquet/metadata_caching_hive1dot2_parquet_withdate/query40.sql.drill4525
UTF-8
1,642
4.3125
4
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
-- start query 40 in stream 0 using template query40.tpl SELECT w.w_state , i.i_item_id , Sum( CASE WHEN ( Cast(d.d_date AS DATE) < Cast ('2002-06-01' AS ...
true
8363e0301cf6c29be3e5f27e21a689afc559a0bc
SQL
ivancekic/sql-data-analysis
/sql/ZAVISNI_TROSKOVI/Inst_package/03 ZTro_vrste.sql
UTF-8
2,249
2.78125
3
[ "MIT" ]
permissive
---------------------------------------------------------------------------------- -- tabela ZAVISNI_TROSKOVI_VRSTE CREATE TABLE INVEJ.ZAVISNI_TROSKOVI_VRSTE ( VRSTA_TROSKOVA VARCHAR2(5) NOT NULL, NAZIV VARCHAR2(30) NOT NULL, FORMULA NUMBER NOT NULL, OPIS VARCHAR2...
true
a5087e2155c020d6fc842032bcf699c51dd6c869
SQL
irhamputra/Final-Project
/finalproject.sql
UTF-8
3,671
2.96875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.4.10 -- http://www.phpmyadmin.net -- -- Host: localhost:3306 -- Generation Time: Feb 15, 2017 at 11:55 PM -- Server version: 5.5.42 -- PHP Version: 7.0.0 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT...
true
ad823b77d3468b53b9b23ebf447819291b6cdd1d
SQL
asiantripstore/ATS-migrations
/ats_migrations/000003_addtableroutes.up.sql
UTF-8
428
3.09375
3
[]
no_license
CREATE TABLE "api_infos" ( "id" SERIAL PRIMARY KEY UNIQUE NOT NULL, "app_name" VARCHAR(255) UNIQUE, "host" VARCHAR(255), "port" VARCHAR(255) ); CREATE TABLE "route_infos" ( "id" SERIAL PRIMARY KEY UNIQUE NOT NULL, "path" VARCHAR(255), "method" VARCHAR(255), "name" VARCHAR(255), "api...
true
86e029098be3ee1e7f46003dbd2dad1b822e2379
SQL
murari-goswami/bi
/ETL/DataVirtuality/procs/desk_com_connector/desk_com_connector.internal_validateServerVersion.sql
UTF-8
2,579
2.828125
3
[]
no_license
-- Name: desk_com_connector.internal_validateServerVersion -- Created: 2015-08-10 15:23:14 create virtual procedure desk_com_connector.internal_validateServerVersion ( ) as begin declare integer server_build_min = 2976 ; declare integer server_interfaces_min = 4342 ; declare integer server_core_min = 4481 ...
true
0588ef879906b7c6c6e9e2178e3b2c7751f7281a
SQL
AlexYoungZ/cs61a
/Labs/lab12/lab12.sql
UTF-8
385
3.671875
4
[]
no_license
.read fa18data.sql -- Q2 CREATE TABLE obedience AS select seven, denero from students; -- Q3 CREATE TABLE smallest_int AS select time ,smallest from students where smallest>13 order by smallest limit 20; -- Q4 CREATE TABLE matchmaker AS select A.pet, A.song, A.color, B.color from students as A,students...
true
b1cd7bc123097556e881a44e7285b4ef9be3a1cf
SQL
davidmayer-art/CRM-PHP
/cerfa/test_form2.sql
UTF-8
3,660
3.4375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Hôte : 127.0.0.1:3306 -- Généré le : jeu. 25 mars 2021 à 09:05 -- Version du serveur : 5.7.31 -- Version de PHP : 7.4.9 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CL...
true
63a58716fc0c715ef880d5f56d4e7a594db2b823
SQL
farookshaik/angular
/DynamicDashboard/DynamicDashboardDB/StoredProcedures/dbo.INSERT_REPORT.mysql
UTF-8
5,541
3.828125
4
[]
no_license
DROP PROCEDURE IF EXISTS INSERT_REPORT; CREATE PROCEDURE `INSERT_REPORT`() BEGIN DECLARE HsResp_AppComp_Avg DECIMAL(10,4); DECLARE PPCre_HsResp_Avg DECIMAL(10,4); DECLARE PPApp_PPCre_Avg DECIMAL(10,4); TRUNCATE TABLE `th_report_details`; #Populate the records into the report table INSERT INTO th_report_details ...
true
761363b08c1064e19e7730398cbdd518284e33bf
SQL
TatianaZag/JavaWebsite
/CreateDB.sql
UTF-8
2,151
3.78125
4
[]
no_license
----------------< For delete table in database >---------------- DROP TABLE Products CASCADE; DROP TABLE Type_client CASCADE; DROP TABLE Suppliers CASCADE; DROP TABLE Customers CASCADE; DROP TABLE Deliveries CASCADE; DROP TABLE Provision CASCADE; ---------------< For create table in database >----------------- CREATE ...
true
453a003eb7090e175d6f299df0ab23047fb04881
SQL
Chris0lsen/debugging-challenge
/activities.sql
UTF-8
6,223
3.09375
3
[]
no_license
CREATE TABLE IF NOT EXISTS [activities] ( [activity] VARCHAR NULL, [type] VARCHAR NULL, [participants] INT NULL, [price] FLOAT NULL, [link] VARCHAR NULL, [key] INT NULL, [accessibility] FLOAT NULL ); INSERT INTO activities VALUES ('Paint the first thing you see','recreational',1,0.25,'',1162360,0.2), ('Learn how to fo...
true
119f2a4f6bec87567ecd92b20660c4b7a82fd1b6
SQL
cau-team-projects/bbs
/sql/init.sql
UTF-8
4,025
3.78125
4
[]
no_license
SET `foreign_key_checks` = 0; DROP TABLE IF EXISTS `user`; CREATE TABLE `user` ( `id` INT UNSIGNED NOT NULL AUTO_INCREMENT, `uname` VARCHAR(127) NOT NULL, `pw` CHAR(64) NOT NULL, `salt` CHAR(64) NOT NULL, `level` INT UNSIGNED, `bdate` DATE, `fname` VARCHAR(127) NOT NULL, `mname` VARCHAR(127), `lname`...
true
d2ddf166d0eddb7140229785607922177e1c274a
SQL
ifgen-it/SQL-Oracle
/lab_9_9.sql
UTF-8
1,791
3.734375
4
[]
no_license
/*Лаба 9.9 Вывести из таблицы EMPLOYEES информацию о сотрудниках отделов с номерами 10,30,50,90. Вывод должен быть оформлен в таблицу, содержащую столбцы: 1. Сквозной порядковый номер сотрудника (1…n). 2. Порядковый номер сотрудника внутри отдела (1…n). 3. Номер отдела для данного сотрудника (Department_id). ...
true
058dcf89c3ebc76ad809b546047a27b4c1835b13
SQL
Activiti/activiti-cloud
/activiti-cloud-query-service/activiti-cloud-services-query/activiti-cloud-services-query-liquibase/src/main/resources/config/query/liquibase/changelog/06-alter.oracle.schema.7.1.0-m10.sql
UTF-8
120
2.59375
3
[ "Apache-2.0" ]
permissive
alter table task add completed_by varchar(255); create index task_completedBy_idx on task (completed_by); commit;
true
1c02c98ae0efd405b9210dc7b9d3c17fc5b2ad55
SQL
Mo-na-rh/mai-sql-course
/home_works/hw01-12/scripts/queries/blogger_post_rating.sql
UTF-8
464
3.5625
4
[]
no_license
-- Оконная функция, CTE -- Вывести пользователей с их постами, -- отранжированными по убыванию популярности WITH top_ids AS ( SELECT user_id, view_count, rank() OVER ( PARTITION BY user_id ORDER BY view_count DESC ) FROM posts ) SELECT users.nickname, users.first_name, top_ids.view_count, ...
true
89a9dde47b28d687d1579eff4bc0c73e564b90fe
SQL
alifahfathonah/surat46
/surat46.sql
UTF-8
14,148
2.515625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.9.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Waktu pembuatan: 10 Feb 2020 pada 10.18 -- Versi server: 10.4.11-MariaDB -- Versi 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_CHARA...
true
d169b7e422fb763eab1f71fd19f378d80d5d326a
SQL
Fukada9905/pythagora
/sql/archives/functions/ufn_get_ip.sql
UTF-8
458
3.09375
3
[]
no_license
DROP FUNCTION IF EXISTS ufn_get_ip; delimiter // CREATE FUNCTION ufn_get_ip( p_user_id varchar(20) ) RETURNS varchar(15) DETERMINISTIC BEGIN DECLARE _ip varchar(15); IF p_user_id IS NULL THEN RETURN '127.0.0.1'; END IF; SELECT remote_ip INTO _ip FROM sys_login_informations WHER...
true
4fca81d37d32c7a05aff210251891a61d0725d17
SQL
iamdanmaks/sales_forecast
/us_queries/us_region_models_comparison.sql
UTF-8
2,669
4.3125
4
[]
no_license
WITH RealPastSales AS ( SELECT TIMESTAMP(Date_Part) AS Date, COUNT(DISTINCT DocumentId) AS Sales FROM `twc-bi-education.sales_data_2.sale_from_2016` WHERE RetailYear BETWEEN 2015 AND 2019 GROUP BY Date), MeanAndStd AS ( SELECT AVG(Sales) AS mean, STDDEV(Sales) AS std FROM ...
true
25aa7f13fbfc1c24bd18ce81abe2730b77f43a78
SQL
BrenPatF/plsql_profiling
/install_prereq/install_sys_hprof.sql
UTF-8
2,032
2.875
3
[ "MIT" ]
permissive
@initspool install_sys_hprof DEFINE APP=app DEFINE LIB=lib /*************************************************************************************************** Name: install_sys_hprof .sql Author: Brendan Furey Date: 21-Jun-2020 Install sys script for the hierarchical profiler in the PL...
true
6eaea63006a8db5524f39abb2e3fc7b080eaefb1
SQL
leedonghu/jsp-web
/WebContent/WEB-INF/sql/CONSTRAINT06_Foreign_Key.sql
UTF-8
819
3.828125
4
[]
no_license
CREATE TABLE MyTable17 ( id VARCHAR(255) PRIMARY KEY, name VARCHAR(255) NOT NULL ); DROP TABLE MyTable18; CREATE TABLE MyTable18 ( id INT PRIMARY KEY AUTO_INCREMENT, title VARCHAR(255) NOT NULL, t17Id VARCHAR(255) NOT NULL, FOREIGN KEY(t17Id) REFERENCES MyTable17(id) ); INSERT INTO MyTable17 (id, name) VALUES ('good...
true
a4e50d75fa08ae0560f0ee0c507fc6df87667231
SQL
wbox/Reckon
/backend/db/schema/03_incomes.sql
UTF-8
355
2.953125
3
[]
no_license
DROP TABLE IF EXISTS incomes CASCADE; CREATE TABLE incomes ( id SERIAL PRIMARY KEY NOT NULL, user_id INTEGER REFERENCES users(id) ON DELETE CASCADE, account_id INTEGER REFERENCES accounts(id) ON DELETE CASCADE, description VARCHAR(255) NOT NULL, date TIMESTAMP DEFAULT CURRENT_TIMESTAMP, amount_cents INTEGER...
true
34fe0db97fd898c3375e30c318d9e6ffb15139d8
SQL
Abhishek325/Tablo
/Backend/migrations/db_crm.sql
UTF-8
3,058
3.265625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.7.9 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1:3306 -- Generation Time: May 11, 2020 at 06:41 PM -- Server version: 5.7.21 -- PHP Version: 5.6.35 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CH...
true
16d220b88dc3636cedcc6ec42375fe94e054219f
SQL
divshekhar/Flask-blog
/flask-blog.sql
UTF-8
3,649
3.125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Mar 07, 2020 at 12:52 PM -- Server version: 10.4.11-MariaDB -- PHP Version: 7.4.2 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
true
b31e8f3731d0b57194c8a7864905f2187b163f98
SQL
tgspacelabs/Dev
/msdb/msdb/MS_PerfDashboard/Stored Procedures/usp_RequestsWithLatchWaits.sql
UTF-8
692
3.53125
4
[]
no_license
create procedure MS_PerfDashboard.usp_RequestsWithLatchWaits as begin select r.session_id, r.request_id, master.dbo.fn_varbintohexstr(r.sql_handle) as sql_handle, master.dbo.fn_varbintohexstr(r.plan_handle) as plan_handle, case when LEN(qt.query_text) < 2048 then qt.query_text else LEFT(qt.query_text, 20...
true
23317152cbc96900fee2b9e4ffe16633fae99343
SQL
wcmayor/streaminglab
/mysql-init.sql
UTF-8
587
2.875
3
[]
no_license
create database apache_logs; use apache_logs; create table sqs ( id bigint not null auto_increment primary key, host varchar(20), user varchar(20), method varchar(10), path varchar(400), code int, size varchar(100), referer varchar(400), agent varchar(400), ts timestamp, dedu...
true
3be69a93690ebf4bea83b1e91191eb0e0dff8e66
SQL
YoYo-simida/SpringBootDemo
/请修改-person.sql
UTF-8
813
3.609375
4
[]
no_license
-- Create table create table PERSON ( person_no NUMBER(5), name VARCHAR2(30), sex VARCHAR2(2), birthday DATE ); -- 测试记录 INSERT INTO person(person_no, NAME, sex, birthday) VALUES(1, '小游子', '女', DATE '2019-01-01'); -- 存储过程 CREATE OR REPLACE PROCEDURE pro_person(v_person_no IN system.person.person_no...
true
975280ecb12dcb759f54fbd08c93e7eed9959968
SQL
laurentide/LCL-BI
/Queries/Update Quote Laest Revision.sql
UTF-8
528
3.8125
4
[]
no_license
update tblquotes set latest_revision = 1 where convert(char,quoteid) + ' ' + convert(char,date) in (select convert(char,quoteid) + ' ' + convert(char,max(date)) from tblquotes group by quoteid) update tblquotes set latest_revision = 0 where latest_revision is null select quoteid,count(*), count(Distinct lat...
true
a2dff4e44e46454a45e9b7438ed642e7adb41919
SQL
genepattern/genepattern-server
/website/WEB-INF/schema/analysis_oracle-3.0.0.sql
UTF-8
4,927
3.734375
4
[ "BSD-3-Clause", "BSD-2-Clause" ]
permissive
/* JOB STATUS CODE TABLE */ CREATE TABLE JOB_STATUS ( STATUS_ID NUMBER(10,0) NOT NULL, STATUS_NAME VARCHAR2(20 CHAR), PRIMARY KEY (STATUS_ID) ); /* TASK ACCESS CODE TABLE */ CREATE TABLE TASK_ACCESS ( ACCESS_ID NUMBER(10,0) NOT NULL, NAME VARCHAR2(4000), DESCRIPTION VARCHAR2(4000), PRIMAR...
true
9c2945bb1aa99c5707c6cc55c4df457d88b823f0
SQL
satty12121981/jeera_me-restservice
/sql/jeera.sql
UTF-8
23,577
2.921875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.1.14 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Oct 17, 2014 at 01:24 PM -- Server version: 5.6.17 -- PHP Version: 5.5.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;...
true
c2ff9a11d0e4e92422e3e32fc8afaa52901e5324
SQL
VCHSRobots/AttendanceMachine
/Server/sql/CreateDatabase.sql
UTF-8
2,513
3.828125
4
[]
no_license
drop Database EpicAdmin; Create Database EpicAdmin; Use EpicAdmin; create Table Users ( UserID int AUTO_INCREMENT PRIMARY KEY, UserName varchar(40) NOT NULL UNIQUE, PasswordHash varchar(40), LastName varchar(80), FirstName varchar(80), NickName varchar(80), Title varchar(80), BadgeID char(10), ...
true
043353766b38af1c4ef1d01e0e6044ab7737c495
SQL
jdeiss55/CSE-581---Database-Management
/lab 10.sql
UTF-8
1,068
3.734375
4
[]
no_license
/* question 1 */ BEGIN TRANSACTION Question1 --start UPDATE Invoices --update table SET VendorID = 68 --update the vendor ID to be correct for drawing board WHERE VendorID = 65; DELETE Vendors --delete board WHERE VendorName = 'The Drawing Board'; UPDATE Vendors --replace board SET VendorName = 'Comp...
true
d55118671724f924110f666f106b27374faae06d
SQL
leandrocorreati/Curso_mysql
/Curso de MySql/Aula_07_Selects_Parte2_Banco.sql
UTF-8
1,759
3.609375
4
[]
no_license
select * from cursos where nome = 'PHP'; select * from cursos where nome like 'P%'; /* que comece com P --- Case Sensitive*/ select * from cursos where nome like '%A'; /* que termine com A --- Case Sensitive*/ select * from cursos where nome like '%A%'; /* retorna tudo que contenha A */ select * from cursos where nome ...
true
b66deed5ca6e487dbcd7a9c8fffe729376d242a5
SQL
yanoandri/SalesOrder-Pro
/PFSHelper.DataAccessLayer/dbFrameworkPFS/dbFrameworkPFS/dbo/Stored Procedures/uspPSC_CustomerObjectiveList.sql
UTF-8
2,221
3.65625
4
[]
no_license
 /*********************************************************************************************************************** Copyright (c) 2015 PT Profescipta Wahanatehnik. All Rights Reserved. This software, all associated documentation, and all copies DESCRIPTION Name : uspPSC_CustomerObjectiveList Desc...
true
37dc32c7498de83be3eafe846190672df03f54b1
SQL
kiyoshikondo/funkyjam.com
/public_html/premium/reminder/sql/pass_list.sql
UTF-8
228
2.890625
3
[]
no_license
select p.mail from premium_users_pc as p inner join "order" as o on p.order_no = o.order_no inner join "order_desc" as od on p.order_desc_no = od.order_desc_no where delete_flg = '0' and o.d_stamp is null and od.d_stamp is null;
true
7b29e6dca943aaff8c238710c7dbae90cc40f75f
SQL
theboocock/OtagoGalaxy
/src/ensembl-functgenomics/sql/patch_61_62_c.sql
UTF-8
571
2.640625
3
[]
no_license
/** @header patch_61_62_c.sql - feature_type.sequence_ontology @desc Add so_accession and so_name and fields */ #Or generic associated_ontology table? ALTER table feature_type ADD `so_accession` varchar(64) DEFAULT NULL; ALTER table feature_type ADD `so_name` varchar(255) DEFAULT NULL; ALTER table feature_type ...
true
733600dabd1f6ae99713d8180c8e58ec2470911d
SQL
FFCK/kpi
/SQL/20220316_fix_contraintes.sql
UTF-8
1,033
2.78125
3
[]
no_license
ALTER TABLE `kp_match_detail_old` DROP FOREIGN KEY `fk_matchs_detail`; ALTER TABLE `kp_match_detail_old` ADD CONSTRAINT `fk_matchs_detail_old` FOREIGN KEY (`Id_match`) REFERENCES `kp_match`(`Id`) ON DELETE RESTRICT ON UPDATE RESTRICT; ALTER TABLE `kp_match_detail_old` DROP FOREIGN KEY `fk_matchs_details_competi...
true
a025f5e1527efd5d819f3805e9bebf1e9269f4bd
SQL
3d3d3d-code/MERISE
/Exercices Franck Modele relationnel/tp2_etudiant/tp_etudiant.sql
UTF-8
1,019
3.328125
3
[]
no_license
DROP DATABASE IF EXISTS etudiants; CREATE DATABASE etudiants; USE etudiant; CREATE TABLE IF NOT EXISTS Etudiant( id_etudiant INT AUTO_INCREMENT, nom_etudiant VARCHAR(50), prenom_etudiant VARCHAR(50), date_entree DATE NOT NULL, PRIMARY KEY(id_etudiant) )engine=InnoDb CHARSET utf8 COLLATE utf8_general_ci; ...
true
e04b8b42e76f3de28c07bb78587fb8320b62b023
SQL
CUBRID/cubrid-testcases
/sql/_01_object/_03_virtual_class/_006_querypart/cases/1009.sql
UTF-8
720
3.125
3
[ "BSD-3-Clause" ]
permissive
--test normal querypart create class xoo ( id int auto_increment , title varchar(100)); create unique index uni_id on xoo (id); insert into xoo(title) values ('aaa'); insert into xoo(title) values ('bbb'); insert into xoo(title) values ('ccc'); create vclass vxoo ( id int, title varchar(100) ) as select * from xoo...
true
852244942e628a2f2a7c0a2ade8da91a2163a370
SQL
peakdot/nextstep
/query/nextstep.sql
UTF-8
2,869
3.671875
4
[ "MIT" ]
permissive
create Database nextstep; use nextstep; CREATE TABLE Employer ( ID int AUTO_INCREMENT, email varchar(50) NOT NULL, fname varchar(50) character set utf8 NOT NULL, lname varchar(50) character set utf8 NOT NULL, password varchar(128), accpro varchar(50), PRIMARY KEY (ID), UNIQUE (email) ); ALTER TABLE Employer AUTO_INCR...
true
ca5634af562f5f16bc0b3946d4e3201b7972e1f3
SQL
xepan/base
/dbversion/00000199.sql
UTF-8
551
2.5625
3
[]
no_license
SET FOREIGN_KEY_CHECKS=0; -- ---------------------------- -- Table structure for `epan_category_association` -- ---------------------------- DROP TABLE IF EXISTS `epan_category_association`; CREATE TABLE `epan_category_association` ( `id` int(11) NOT NULL AUTO_INCREMENT, `epan_id` int(11) NOT NULL, `epa...
true
b3351dbb28a2554f495c24dd9bbb9dac91b1aea0
SQL
arnaldo4511/Sistema-WEB-de-Facturacion-Electronica
/UTP_Aplicacion/2. Construccion/2.1. Scripts/2.1.1. Definicion de datos/crea_tbls_transmap.sql
UTF-8
10,522
3.25
3
[]
no_license
/************************************************************************ *Descripción : Script para la creación de Tablas y Esquemas *Fecha de Creación : 2017/08/03 *Fecha de Modificación: *Parámetros : *Autor : Octavio Bedregal Flores / Arnaldo Ramírez Valverde *Modificado Por : *Versión : 1.0 *Cambios Import...
true
08cfe00e5f20b275b89f4e237a1089b8e683a48c
SQL
mo-alaa/Hackerrank-Problems
/SQL/Basic Select/Easy/Weather Observation Station 6.sql
UTF-8
907
3.71875
4
[]
no_license
/* Language: T-SQL Author: Mohamed Alaa Github: https://github.com/mo-alaa Hackerrank: https://www.hackerrank.com/mo_alaa Problem: https://www.hackerrank.com/challenges/weather-observation-station-6/problem */ SELECT DISTINCT CITY FROM STATION WHERE CITY like '[AEIOU]%'; /* Explanation: ---------...
true
8ca86818d522e16245198ee3bdff9b7c7b23e496
SQL
diable201/DataBases
/Labs/lab_8.sql
UTF-8
811
4.21875
4
[ "MIT" ]
permissive
-- Create indexes for queries like below: CREATE INDEX name_of_countries ON countries (name); SELECT * FROM countries WHERE name = 'string'; CREATE INDEX name_of_employees ON employees (name, surname); SELECT * FROM employees WHERE name = 'string' AND surname = 'string'; CREATE UNIQUE INDEX salary_delta ON employees ...
true
80c3033610ce316b0ae4da74bc7fb617dbd3e9e6
SQL
PrebenHan/assignment-5
/exported.sql
UTF-8
21,674
2.625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.7.4 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: 03. Des, 2017 13:23 PM -- Server-versjon: 10.1.28-MariaDB -- PHP Version: 7.1.10 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_...
true
b8991c921a2dc4a308c5638cf70671fd5c33b627
SQL
synergydesigns/stylesblitz-server
/migrations/query/1085649637_create_autocomplete_view.up.sql
UTF-8
363
2.640625
3
[]
no_license
CREATE OR REPLACE VIEW autocomplete AS SELECT id, vendors.name as query, vendors.tsv, 'vendors' as type FROM vendors UNION SELECT services.id::VARCHAR, services.name as query, services.tsv, 'services' as type FROM services UNION SELECT categories.id::VARCHAR, categories.name as query, categories.t...
true
1cbd8cb8ab9dee335dbe4be8b213477e870a59ff
SQL
JamieO53/nuget-for-sql-projects
/NugetDbTools/DbSolutionBuilder/PackageTools.Builder.Db/DbCompare/CompareMSGTables.sql
UTF-8
320
3.765625
4
[]
no_license
select * from ( select * from EFTRR.dbo.MSG ) EFTRR full outer join ( select * from EFTRR1.dbo.MSG ) EFTRR1 on EFTRR1.msg = EFTRR.msg and EFTRR1.msgTypeID = EFTRR.msgTypeID where EFTRR.msg is null or EFTRR1.msg is null order by coalesce(EFTRR.msg, EFTRR1.msg), coalesce(EFTRR.msgTypeID, EFTRR1.msgTypeID)
true
f3b430533ba397ca0a51ee2799850b05ef0c6e17
SQL
mrj31/immdonor
/db/autoload/schema/lab_test_panel.ddl
UTF-8
725
3.453125
3
[]
no_license
DROP TABLE IF EXISTS lab_test_panel; CREATE TABLE lab_test_panel ( lab_test_panel_accession VARCHAR(15) NOT NULL COMMENT "Primary key", name_preferred VARCHAR(125) COMMENT "Standardized name or idenitifier", name_reported VARCHAR(125) COMMENT "Name or identifier", study_accession VARCHA...
true
76ce3f1a4a6f026e80e29ef3bf9c7e74fe113e84
SQL
alecmerdler/cs-340
/final/sql/Media.sql
UTF-8
3,525
3.375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.7.0 -- https://www.phpmyadmin.net/ -- -- Host: classmysql.engr.oregonstate.edu:3306 -- Generation Time: Jun 15, 2017 at 11:45 PM -- Server version: 10.1.22-MariaDB -- PHP Version: 7.0.20 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "...
true
2bac600cad36f8748fb4e3b59aa3f3650523ae58
SQL
abinesh-23/CSE560-course-at-UB
/SQL project/q9.sql
UTF-8
346
4.375
4
[]
no_license
select e as emp_no, count(e) as cnt from ( select e, t.from_date, salary from ( select e, from_date from (select count(title), emp_no as e from titles group by emp_no having count(title) > 1) t1 inner join titles t2 on t1.e = t2.emp_no) t left join salaries s on s.from_date = t.from_date and (s.emp_no = t.e) where sala...
true
f2df036493d40f9627e5d17d15cea255db2f0336
SQL
jhonsfran/SIGERS_CRUD_FEO
/BD_SIGER.sql
UTF-8
2,218
3.703125
4
[]
no_license
DROP TABLE IF EXISTS Personal, pedido, categoria, item_menu, pedido_item, factura, forma_pago, factura_items, factura_forma_pago CASCADE; create table Personal( id_personal varchar(10) primary key, nombre varchar(20) NOT NULL, apellido varchar(20) NOT NULL, tipo_identificacion varchar(20) NOT NULL, cargo varchar(20) N...
true
f8c0f96defb1b282a945262b9e2c74bcd0039ca7
SQL
ekuvardin/Oracle
/Scripts/refer.sql
UTF-8
154
2.890625
3
[]
no_license
select * from user_source u where u.name in( select name from user_dependencies a where a.REFERENCED_NAME = 'PLIB') and lower(u.TEXT) like '%plib.parse%'
true
df341db732cf4eb586135c8b14b07c8c3ab3e642
SQL
j7ng/CLFY_SA
/SA/Views/TABLE_PSFG_VIEW.sql
UTF-8
675
3.4375
3
[]
no_license
CREATE OR REPLACE FORCE VIEW sa.table_psfg_view (psfg_objid,bar_item_id,title) AS select table_prtkp_cat.objid, table_prtkp_cat.prtkp_cat2keyphrase, table_gbkp_cat.title from table_prtkp_cat, table_gbkp_cat where table_gbkp_cat.objid = table_prtkp_cat.prtkp_cat2gbkp_cat AND table_prtkp_cat.prtkp_cat2keyphrase IS N...
true
c8aed2a31c391d9056604484e1336d31b9f37409
SQL
Junghyo/from_eclipse_homework
/Git_Project/homework/0316_homework1_a05.sql
UHC
2,562
4.25
4
[]
no_license
/* 1. (homework 1) 6 ϱⰣ ޿ 70% ϱ ߴ. ϱⰣ ϰ, 6 ޿ ϼ. ޿ : sal/13 ϱⰣ : ޿ 70% ϱⰣ ޿ Ѿ 10 ؼ ȣ Ի ͱⰣ ޿ ϱⰣ޿ ϱⰣ޿Ѿ */ select empno ȣ, ename , hiredate Ի, add_months(hiredate,6) ϱⰣ, sal/13 ޿, sal/13*0.7 ϱⰣ޿, trunc(sal/13*0.7*6,-1) ϱⰣ޿Ѿ from emp; /* 2. (homework 2) ޿ -- 3ܰ ޿...
true
2b01c6a2fb398575e772217e3a86fe971c8f863f
SQL
donniezhanggit/car-reservation-microservices
/docs/test.sql
UTF-8
5,246
4.4375
4
[ "MIT" ]
permissive
-- 2018-08-25 -- Return reservations associated to category COMPACT in a given period select r.pickupdatetime, r.dropoffdatetime from reservation r where r.category_category_type = 'COMPACT' and (('2019-06-01 17:00:00' between r.pickupdatetime and r.dropoffdatetime) or ('2019-06-18 17:00:00' between r.pickupdat...
true
6fa9256bc6a21c11f818f015b2e10d00620db71b
SQL
katiesenger/DSHome
/mysql/tLog.sql
UTF-8
303
2.5625
3
[]
no_license
USE DSHome; DROP TABLE IF EXISTS tLog; CREATE TABLE IF NOT EXISTS tLog( LogID int(11) unsigned NOT NULL AUTO_INCREMENT PRIMARY KEY, LogEntered DateTime NOT NULL, UserID int(11) NOT NULL, Action nvarchar(255) NOT NULL, TableName nvarchar(255) NOT NULL, Statement nvarchar(255) NOT NULL )
true
a6bb80cdf1d3ed064c3dfa5d44aa6a14d6d90b40
SQL
softasap/sa-lamp
/templates/grcat.mysql
UTF-8
744
3.046875
3
[ "MIT", "BSD-3-Clause" ]
permissive
# install grc with apt-get install grc and add # pager = grcat ~/.grcat to # inside [mysql] section of ~/.my.cnf #default word color #regexp=[\w.,\:\-_/]+ regexp=.+ colours=green - #table borders regexp=[+\-]+[+\-]|[|] colours=red - #data in ( ) and ' ' regexp=\([\w\d,']+\) colours=white - #numeric regexp=\s[\d...
true
9eebc9cdb4cb81f136023260b1aa5eb08633b844
SQL
HRahman1777/Blood-Bank-Management-System
/bbms.sql
UTF-8
3,729
3.0625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Apr 10, 2019 at 07:37 AM -- Server version: 10.1.38-MariaDB -- PHP Version: 7.3.3 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
true
383fcb7c287051874ca639f37bee58cdf6c36798
SQL
harlemnight/finance
/databasemodel/obj_t_chn_stock_xsgjj.sql
UTF-8
1,136
3.140625
3
[]
no_license
/* SQLyog Ultimate MySQL - 5.7.20-log : Database - db_finance ********************************************************************* */ /*!40101 SET NAMES utf8 */; /*!40101 SET SQL_MODE=''*/; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_...
true
9892fe62e458141090898f85619af56423a55a67
SQL
XXTower/WarhammerPainting
/src/test/resources/TABLE_USER.sql
UTF-8
265
3.15625
3
[]
no_license
CREATE TABLE IF NOT EXISTS USER ( USER_ID integer not null auto_increment, PASSWORD varchar(255), USERNAME varchar(255), primary key (USER_ID)) ; INSERT INTO USER( USER_ID, USERNAME, PASSWORD) VALUES (1, 'test', 'test'), (2, 'test2', 'test2');
true
097a9cc88b50325abd016234ffaa2c10c74c22c6
SQL
Cougar/powerfeed-ventenable-coolenable
/dichannels.sql
UTF-8
2,222
3.3125
3
[]
no_license
-- DC58888-2 starman energiamotmine keldris + ouman-gw -- CONF BITS -- # 1 - value 1 = warningu (values can be 0 or 1 only) -- # 2 - value 1 = critical, -- # 4 - value inversion -- # 8 - value to status inversion -- # 16 - immediate notification on value change (whole multivcalue service will be (re)reported) -- # 3...
true
b0aff9cd496e37f9224c54e9a71a932cc78d3f74
SQL
Evelien-M/Prog5
/Ninja_manager/Database/Scripts/Seed/Ninja.sql
UTF-8
891
3.453125
3
[]
no_license
/* Post-Deployment Script Template -------------------------------------------------------------------------------------- This file contains SQL statements that will be appended to the build script. Use SQLCMD syntax to include a file in the post-deployment script. Example: :r .\myfile.sql ...
true
14f24932ecded74fe36d7ef6837fac5248979f97
SQL
NikolayZhmaev/PolyclinicRegistry
/sql/polyclinic.sql
UTF-8
4,568
3.53125
4
[]
no_license
DROP DATABASE IF EXISTS `polyclinic`; CREATE DATABASE `polyclinic`; USE `polyclinic`; CREATE TABLE `polyclinic`.`medical_specialties` ( `id_speciality` INT NOT NULL AUTO_INCREMENT, `name_speciality` VARCHAR(45) NOT NULL, PRIMARY KEY (`id_speciality`)) ENGINE = InnoDB DEFAULT CHARACTER SET = utf8 COLLATE = utf8_...
true
c4050bed69fa6edbb9ed5e877c8ca4cda42e3817
SQL
gitalecu/arduinoWebSD
/testSql1.sql
UTF-8
3,513
3.0625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 3.5.8.2 -- http://www.phpmyadmin.net -- -- Host: sql109.byetcluster.com -- Generato il: Giu 27, 2015 alle 11:36 -- Versione del server: 5.00.15 -- Versione PHP: 5.3.3 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_S...
true
a21c96fe83dde3e40e358c9b36ca6172df2762b3
SQL
ho-bolt/Practice_Spring_MVC
/test/test.sql
UTF-8
424
2.984375
3
[]
no_license
create table message( mid int primary key, title varchar(30), content varchar(100) ); create table member( id varchar(30) primary key, password varchar(30), name varchar(30), role varchar(30) ); insert into message(mid,title,content) values(1,'me','whatsup'); select * from message; select * from M...
true
6fa3e40898c96d62c1541be1c1497e5a7f3990d0
SQL
jysohn0825/toy_project
/Prevention of drowsiness/drowsiness_db.sql
UTF-8
221
2.53125
3
[]
no_license
CREATE TABLE drowsiness( d_id CHAR(10) PRIMARY KEY, d_pw CHAR(15), d_phone CHAR(13) ); CREATE TABLE d_time( d_id CHAR(10), d_time CHAR(30), FOREIGN KEY (d_id) REFERENCES drowsiness(d_id) );
true
10be9e5183dc2a824555e0813966004e5e10aeb3
SQL
Tharnid/Chazwa
/SQL20012QueryingBook/SQL20012QueryingBook/NonRelationalElements.sql
UTF-8
151
2.859375
3
[]
no_license
USE TSQL2012; SELECT custid, YEAR(orderdate) FROM Sales.Orders ORDER BY 1, 2; SELECT DISTINCT custid, YEAR(orderdate) AS orderyear FROM Sales.Orders;
true
79dd24de547922bfd406913ed95cd0fab6ff5435
SQL
maenylee/blueheart
/script/create_table.sql
UTF-8
5,007
3.5625
4
[]
no_license
-- 创建数据库blueheart CREATE DATABASE `blueheart`; -- 创建用户表 DROP TABLE IF EXISTS `tb_user`; CREATE TABLE `tb_user` ( `id` INTEGER NOT NULL AUTO_INCREMENT COMMENT '{name:"主键"}', `user_name` VARCHAR(64) NOT NULL COMMENT '{name:"用户名"}', `real_name` VARCHAR(32) DEFAULT NULL COMMENT '{name:"真实名称"}', ...
true
427bf45e68805691c1e13a8dfb36dedae44ebc21
SQL
lixiang2017/leetcode
/problems/0627.2_Swap_Salary.sql
UTF-8
300
2.96875
3
[]
no_license
# Write your MySQL query statement below update salary set sex = (CASE WHEN sex = 'm' THEN 'f' else 'm' END) # Success # Details # Runtime: 249 ms, faster than 87.77% of MySQL online submissions for Swap Salary. # Memory Usage: 0B, less than 100.00% of MySQL online submissions for Swap Salary.
true
73da176ba9e2c1fed9b24d1ce77799e31802a059
SQL
chezou/molehill
/examples/titanic/queries/impute_whole.sql
UTF-8
363
2.640625
3
[ "Apache-2.0" ]
permissive
-- client: molehill/0.0.1 select rowid , survived , coalesce(age, ${td.last_results.age_median}) as age , coalesce(fare, ${td.last_results.fare_median}) as fare , coalesce(cast(embarked as varchar), 'missing') as embarked , coalesce(cast(sex as varchar), 'missing') as sex , coalesce(cast(pclass as varchar...
true
29f4daf02bd94b64233a153ea14d95d31f71bfae
SQL
giapnh/T08_E-learning
/lesson_report.sql
UTF-8
1,432
3.1875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.0.4 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Apr 22, 2014 at 02:36 PM -- Server version: 5.6.12-log -- PHP Version: 5.4.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT ...
true
1a8f1a4dea5d20b1fec93cb4ac0bce11d80feb73
SQL
louiecaulfield/trains
/list_trains.sql
UTF-8
403
3.8125
4
[]
no_license
SELECT d.name AS stn_departure, a.name AS stn_arrival, datetime(time_dep, 'unixepoch', 'localtime') AS time_departure, datetime(time_arr, 'unixepoch', 'localtime') AS time_arrival, price AS price, operator AS operator, datetime(time_query, 'unixepoch', 'localtime') AS queried FROM trains AS t JOIN stat...
true
84fa57bd722c4b897ab44f44c7a4c536ba60325a
SQL
imavishek/StairSupplies
/db/2018-05-11.01 - inventory changes.sql
UTF-8
2,988
3.921875
4
[]
no_license
ALTER TABLE TblProducts CHANGE COLUMN `QuantityInStock` `_unused_QuantityInStock` INT(10) NULL DEFAULT NULL, CHANGE COLUMN `InventoryNote` `_unused_InventoryNote` VARCHAR(255) NULL DEFAULT NULL ; CREATE TABLE `TblProductsInventoryIn` ( `InventoryInID` INT(10) NOT NULL AUTO_INCREMENT, `ProductID` INT(10) NOT NULL,...
true
cac2c386fda0b2a063962bc20fa55e10f4f8705d
SQL
silence-do-good/stress-test-Postgres-and-MySQL
/dump/low/day21/select0936.sql
UTF-8
177
2.578125
3
[]
no_license
SELECT timeStamp, temperature FROM ThermometerOBSERVATION o WHERE timestamp>'2017-11-20T09:36:00Z' AND timestamp<'2017-11-21T09:36:00Z' AND temperature>=3 AND temperature<=56
true
f445e9e66886149a13ed0f4f11f0c9811d42971b
SQL
NikiYu812/regional-transformation
/sql/rt_multibuilding.sql
UTF-8
2,823
2.671875
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : localhost_3306 Source Server Version : 50605 Source Host : localhost:3306 Source Database : regional transformation Target Server Type : MYSQL Target Server Version : 50605 File Encoding : 65001 Date: 2017-09-12 09:56:38 */ SET FOREIG...
true
a1018da6d9042f8101039d9cea5a52ad94643864
SQL
denvens/famous-teacher-backend
/doc/sql/sprint1.sql
UTF-8
403
2.765625
3
[]
no_license
-- 用户表 CREATE TABLE squirrel_users ( id bigint(11) NOT NULL AUTO_INCREMENT, openId varchar(64) NOT NULL , unionId varchar(64) NOT NULL , nickName varchar(64) DEFAULT '', sex int(1) DEFAULT '0', headImgUrl varchar(1024) DEFAULT '', createdAt datetime , PRIMARY KEY (`id`), UNIQUE KEY(`openId`), INDEX...
true
853b31cf2b6fa080ba67b411ede594912207eeaf
SQL
Patel-D7/Query-Optimization
/query4_opt.sql
UTF-8
479
3.765625
4
[]
no_license
.timer on --explain query plan SELECT o_orderpriority, count( 1 ) AS order_count FROM orders WHERE o_orderdate >= "1993-07-01"/* '[DATE]' */ AND o_orderdate < "1993-10-01"/* '[DATE]' */ AND EXISTS ( SELECT 1 -- 1 instead of * scans only 1 column FROM lineitem...
true
9258c1f4e6bdae43282aa82f1c07f20fd2c71352
SQL
cjungmann/sfw_lookup
/setup_files/Person1.sql
UTF-8
2,740
3.875
4
[]
no_license
USE SFW_Lookup; DELIMITER $$ -- ---------------------------------------- DROP PROCEDURE IF EXISTS App_Person1_List $$ CREATE PROCEDURE App_Person1_List(id INT UNSIGNED) BEGIN SELECT p.id, p.fname, p.lname, p.gender, p.industry, p.state FROM Person p WHERE (...
true
6fc26ba157ca9f7251ce4be31a59426771af0277
SQL
SemIngSwTeam/Ejemplo
/invernadero.sql
UTF-8
742
2.859375
3
[]
no_license
CREATE TABLE usuario( id INTEGER PRIMARY KEY AUTOINCREMENT, nombre TEXT, apellido1 TEXT, apellido2 TEXT, correo TEXT, password TEXT, tipo INTEGER ); CREATE TABLE invernadero( id INTEGER PRIMARY KEY AUTOINCREMENT, nombre TEXT, ubicacion TEXT ); CREATE TABLE UsuarioInvernadero( id_usuario INTEGER, id_invernadero IN...
true
19eef265d0573f2e5da377fded42cd752b29e1a8
SQL
tfedorov/java_saved
/social-crawler/src/main/sql/create-crawler-scheme.sql
UTF-8
9,263
3.40625
3
[]
no_license
DROP TABLE IF EXISTS `lexicon`; CREATE TABLE `lexicon` ( `id` int(11) NOT NULL AUTO_INCREMENT, `term` varchar(200) DEFAULT NULL, `qualification` varchar(200) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 DEFAULT COLLATE utf8_general_ci; DROP TABLE IF EXISTS `level_2_lexicon`; CREATE T...
true
1bfddd9c33afc07057018cd627794ab31f86e8b9
SQL
WaynBander/ReaddleTest
/Task 2/Third Query.sql
UTF-8
615
4.0625
4
[]
no_license
SELECT country.Name FROM ( select countrylanguage.CountryCode, COUNT(CountryCode) as sumT from countrylanguage where countrylanguage.IsOfficial='T' group by countrylanguage.CountryCode )AS sum, (select countrylanguage.CountryCode, COUNT(CountryCode) as sumF from countrylanguage where countrylanguage.IsOfficial='F' g...
true
4a0f33ae7b1e7f70ba5662175ef4eb6f454bd66a
SQL
SheaClose/nineteen-full-stack-demo
/db/getCart.sql
UTF-8
132
3.296875
3
[]
no_license
select * from cart c join products p on p.id = c.prod_id where c.user_id = ( select id from customer where session_id = $1 );
true
aeb920f65d19c2d1a9a1d4fbe548a6e7c91b8557
SQL
Jkolze1/bamazon
/bamazon.sql
UTF-8
1,369
3.296875
3
[]
no_license
-- Create a database called 'Bamazon' and switch into it for this activity -- CREATE DATABASE Bamazon; USE Bamazon; -- Create a table called 'products' which will contain the store inventory -- CREATE TABLE products ( item_id INTEGER(11) AUTO_INCREMENT NOT NULL, product_name VARCHAR(30) NOT NULL, department_name VA...
true
7914217441f44dba5f01b3d6b9d6268d08c04f83
SQL
NguyenThong2201/loanduong
/shoploanduong.sql
UTF-8
10,100
2.890625
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.7.7 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Oct 02, 2018 at 06:04 PM -- 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
572fd8026e3b309cd61c4a13af1b354b3aa01d71
SQL
Beckers81/bamazon
/bamazon.sql
UTF-8
790
3.25
3
[]
no_license
DROP DATABASE IF EXISTS bamazon; CREATE DATABASE bamazon; USE bamazon; CREATE TABLE products( item_id INT AUTO_INCREMENT NOT NULL, product_name VARCHAR(30) NOT NULL, department_name VARCHAR(30) NOT NULL, price DECIMAL (10,2) NOT NULL, stock_quantity INTEGER(11) NOT NULL, PRIMARY KEY (item_id) ); I...
true
189844cfdfb431e380c707490903594f8cfab549
SQL
dahuangRun/LeetCodeExercise
/src/com/hone/database004/RankScores.sql
UTF-8
1,274
4.5
4
[]
no_license
/* 分数排名:https://leetcode-cn.com/problems/nth-highest-salary/description/ */ --方法1:对于每一个分数,找出表中有多少个大于或等于该分数的不同的分数,然后按降序排列即可 SELECT Score, (SELECT COUNT(DISTINCT Score) FROM Scores WHERE Score >= s.Score) Rank FROM Scores s ORDER BY Score DESC; --方法2 SELECT Score, (SELECT COUNT(*) FROM (SELECT DISTINCT Score s FROM...
true
d0f2686f26b4c1c0143614a735144e98c7645fbe
SQL
harsh-2711/SBGBackEnd
/SBG_BACKEND/Database/8-mj-sbg_daiict.sql
UTF-8
15,791
3.125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Apr 30, 2020 at 10:36 AM -- 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
cc01ceedf61b663700a16c5e9fecc08e757492ae
SQL
xoghkscc/SQLStudy
/sql_files/21.05.26 숙제 및 연습.sql
UHC
1,562
4.4375
4
[]
no_license
--EMPLOYEES ڽ ִ ۼƮ ް ִ --ȸ(Ŀ̼ǵ ) SELECT first_name, job_title, nvl(commission_pct, 0) AS Ŀ̼, salary * ( 1 + nvl(commission_pct, 0) ) AS "Ŀ̼ ", max_salary, trunc(salary * ( 1 + nvl(commission_pct, 0) ) / max_salary, 3) *100 AS "" FROM employees ...
true
669213a1e483347e53ddd8a303e964947b635c71
SQL
jetherton/shopify_custom_image
/sql/init.sql
UTF-8
4,438
3.796875
4
[ "BSD-3-Clause" ]
permissive
CREATE TABLE IF NOT EXISTS `roles` ( `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, `name` varchar(32) NOT NULL, `description` varchar(255) NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `uniq_name` (`name`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; INSERT INTO `roles` (`id`, `name`, `description`) VALUES(1, 'login'...
true
fa2f57acec3850eaec8b0fb97ed7bfdbc15c9802
SQL
spencel/gwpd-test0-dev
/mysql/migration/mockdatabase.sql
UTF-8
15,612
2.78125
3
[]
no_license
use heroku_b2cf77a96af7a57; -- MySQL dump 10.13 Distrib 5.7.17, for Win64 (x86_64) -- -- Host: localhost Database: mockdatabase -- ------------------------------------------------------ -- Server version 5.7.21 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESUL...
true
590d7381891fb41b184c3772222559394235d651
SQL
zengguangyi/face-faceMonitor
/face_data.sql
UTF-8
1,298
2.9375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.1.14 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: 2016-03-24 14:46:38 -- 服务器版本: 5.6.17 -- PHP Version: 5.5.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET ...
true