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
c90b3cab11fe8f8ed542242e7d6fe112d1e11209
SQL
murari-goswami/bi
/ETL/DataVirtuality/views/tableau/tableau.followon_movement_invoiced_vs_calcelled.sql
UTF-8
946
4
4
[]
no_license
-- Name: tableau.followon_movement_invoiced_vs_calcelled -- Created: 2015-10-01 10:23:28 -- Updated: 2015-10-01 10:26:47 CREATE view tableau.followon_movement_invoiced_vs_calcelled as select case when used_invoice_number is not null then 'Invoiced' else 'Not-Invoiced' end as invoice_state, fo...
true
4131d8c859e9f6a92b96f52971585039c825e453
SQL
venkatkondababu/demo_dbt
/dateissuefix/models/marts/engineering/planpoint/fct_planpoint_target.sql
UTF-8
1,355
3.53125
4
[]
no_license
{{ config( materialized = 'table', schema = 'engineering', tags=['daily'] ) }} {% set username = "venkatk" %} WITH source_data AS ( SELECT ppt.*, cs.sk_clinicalsite_id, //t.sk_target_type_id, s.sk_series_id FROM {{ source('stage','PLANPOINT_TARGET') }} ppt left JOIN {{ ref('dim_clinicalsite')}} cs ON trim...
true
7eafe1386d67b016817d18699607e6312ec9be28
SQL
Robertx0Sql/DBDocumentation
/Documentation/report/Stored Procedures/upGetSQLDatabaseInformation.sql
UTF-8
2,175
3.359375
3
[]
no_license
CREATE PROCEDURE [report].[upGetSQLDatabaseInformation] ( @Server VARCHAR(255) = NULL ,@DatabaseName VARCHAR(255) = NULL ) AS BEGIN SELECT ServerName ,DatabaseName ,T.name ,t.value FROM staging.DatabaseInformation db CROSS APPLY ( VALUES --[noformat] (stagingId,recovery_model_desc, 'recovery model') ,...
true
12a32fd902532656561a196087b32ffa5ef412df
SQL
Zettai-Yain/ruby-kurosawa
/src/main/resources/db/migration/V3__create_activity_config_and_activity_rank.sql
UTF-8
421
3.390625
3
[]
no_license
CREATE TABLE activity_config ( id BIGINT, min_gain INT, max_gain INT, activity_rank_id SERIAL UNIQUE, PRIMARY KEY (id) ); CREATE TABLE activity_rank ( id SERIAL, activity_rank_id INT, role_id BIGINT, score BIGINT, ...
true
6dfbb97011f3286b75dafe89fce1843fc5ac0338
SQL
bellmit/flexdb
/2.HOST/3.Procedure/od1019.sql
UTF-8
5,988
3.09375
3
[]
no_license
-- Start of DDL Script for Procedure HOSTMSTRADE.OD1019 -- Generated 11/04/2017 3:14:50 PM from HOSTMSTRADE@FLEX_111 CREATE OR REPLACE PROCEDURE od1019 ( PV_REFCURSOR IN OUT PKG_REPORT.REF_CURSOR, OPT IN VARCHAR2, BRID IN VARCHAR2, FMONTH IN VARCHAR2, ...
true
94ea04c21e4126cf7d2de0132bcfe62549d74b7b
SQL
Ilyasmad/sql-tut-notes
/more_queries.sql
UTF-8
1,029
4.28125
4
[]
no_license
-- Find the number of employees SELECT COUNT(super_id) FROM employee; -- Find the number of female employees born after 1970 SELECT COUNT(emp_id) FROM employee WHERE sex = 'F' AND birth_day > to_date('1970-01-01', 'yyyy-mm-dd'); -- Find the average salary of all employees who are not a supervisor SELECT AVG(...
true
87f3a0ebf4528427e009343e482a7204c4a216b3
SQL
eliasst/studyproject
/Codes/disaggregation_v2.sql
UTF-8
3,398
3.96875
4
[]
no_license
--Create table buildings_pop_dis create table buildings_pop_dis as select osm_id, tags, area, area_administrative_boundary, sum_buildings_area, sum_population, geom from buildings_residential; --Create separate table with building levels select x.tags -> 'building:levels' as building_levels, x.tags -> 'roof:l...
true
97b82f63eceee6c0d49238ac717c5edf6a0298e2
SQL
AbidRaza1/Querying-Adventure-works-database
/SQLQuery4.sql
UTF-8
3,239
3.859375
4
[]
no_license
SELECT ProductID, Name, ListPrice FROM SalesLT.Product WHERE ListPrice > (SELECT AVG(UnitPrice) FROM SalesLT.SalesOrderDetail) SELECT * FROM SalesLT.Product SELECT * FROM SalesLT.SalesOrderDetail SELECT ProductID, Name, StandardCost, ListPrice, (SELECT AVG(UnitPrice) FROM SalesLT.SalesOrderDe...
true
389cddc74b730f02bd0ee1b3ec4663325fd2e651
SQL
alexander-t/agdp2013
/sut/src/main/sql/createdb.sql
UTF-8
1,038
3.65625
4
[]
no_license
DROP DATABASE IF EXISTS agdp2013; CREATE DATABASE agdp2013; GRANT ALL ON agdp2013.* to 'agdp'@'%' identified by '2013'; USE agdp2013; CREATE TABLE customer ( id bigint(20) NOT NULL AUTO_INCREMENT, first_name varchar(255) NOT NULL, last_name varchar(255) NOT NULL, street_address varchar(255) NOT NULL, version ...
true
439ec1d4dd7a22261ba31325b3c59f7f2a7d84fe
SQL
alexstudio3/lab-SQL
/5.sql
UTF-8
742
3.359375
3
[]
no_license
-- LAB 5 use sakila; ALTER table staff DROP column PICTURE; insert into staff (first_name, last_name, address_id, store_id, username) values ('TAMMY', 'SANDERS', 3, 1, 'tammy'); -- do i insert another customer? insert into customer (first_name, last_name, store_id, address_id) values ('Mike', 'Hillyer',1, 1); SH...
true
08d4d26f76610abc8a726bd54897459ab5d97bee
SQL
cr101/twitter-crm-blitz
/db/migrations/20210817112848_adding_tags_to_followers/migration.sql
UTF-8
381
3
3
[]
no_license
/* Warnings: - Added the required column `twitterUserId` to the `Tag` table without a default value. This is not possible if the table is not empty. */ -- AlterTable ALTER TABLE "Tag" ADD COLUMN "twitterUserId" TEXT NOT NULL; -- AddForeignKey ALTER TABLE "Tag" ADD FOREIGN KEY ("twitterUserId") REFERENCES "Tw...
true
aa6c1f282e6f415e37a1097e3572e202f7aa4e82
SQL
bdmlai/analytics_engineering_marts
/data_model/ddl/Redshift_ddl/fds_nplus/rpt_network_ppv_liveplusvod.sql
UTF-8
6,144
3.203125
3
[]
no_license
/* ************************************************************************************ Date : 07/28/2020 Version : 1.0 ViewName : rpt_network_ppv_liveplusvod Schema : fds_nplus Contributor : Lakshman Murugeshan Frequency : Executed for PPV events Description : View contains the information related to Live NXT and HOF...
true
71f54c200ef4985e2577be4ccede87e1278d8584
SQL
velosotiago/ITup-exercises
/Relation Databases/1.3x.sql
MacCentralEurope
446
3.390625
3
[]
no_license
--Write a query that returns the possible contacts titles of the Customers in alphabetical order. SELECT ContactTitle FROM Customers ORDER BY ContactTitle; --Write a query that returns the address from the Customers sorted by the City in reverse alphabetical order. SELECT City FROM Customers ORDER BY City DESC; --Wri...
true
0000a3db6ae5b83f84d2e75ac8e05dc28fe56161
SQL
Gankova/SQL2
/Script-2.sql
UTF-8
286
2.625
3
[]
no_license
use test2_db; set autocommit = 0; start transaction; insert into cars(model, release_date, color) values ('tesla','1998-10-10','yellow'); set @last_id = last_insert_id(); insert into cars_owners(car_id, owner_id, owned_from) values (@last_id, 2, 'invalid'); rollback;
true
98e91bf8d1ff6f14f1cae87936707d436ddae185
SQL
akula-srinu/Customization_Test
/custom/N_SOX_EAC_CHANGES_VSAT.sql
UTF-8
2,615
3.390625
3
[]
no_license
@utlspon N_SOX_EAC_CHANGES_VSAT CREATE OR REPLACE VIEW NOETIX_VIEWS.N_SOX_EAC_CHANGES_VSAT AS SELECT ppa.segment1 project, ppa.name, ppa.project_status_code, ppa.project_type, ppc.class_code product_line, ppc.description pl_desc, hou.name proj_org, ...
true
bab077d43c6e7c181f6221f51367592449e23079
SQL
barcvilla/Transact-Sql
/ch03/Ordering Data.sql
UTF-8
633
3.515625
4
[]
no_license
-- Sorting Data -- /** * El ordenamiento por defecto es ascendente. Podemos especificar ordenamiento descendente mediante * DESCENDING o DESC despues del nombre de la columna * Cuando NULL values son parte del resultado ellos seran mostrados primero cuando se ordena de manera * descendente. */ -- 1. SELECT ProductID...
true
703562f7bff55d5cd5009dfbac5d76f3546648bc
SQL
Redicolossimo/Db-homeworks-
/hw8.sql
WINDOWS-1251
3,883
3.796875
4
[]
no_license
use vk; DESC profiles; -- ALTER TABLE profiles ADD CONSTRAINT profiles_user_id_fk FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE, ADD CONSTRAINT profiles_photo_id_fk FOREIGN KEY (photo_id) REFERENCES media(id) ON DELETE SET NULL; -- ALTER TABLE profiles DROP...
true
11d39209e1f0e8999b422d68936b3abac6e2001d
SQL
agungdhewe/fgtacloud4u_retail
/webcommerce/webeditorialtype/webeditorialtype.sql
UTF-8
1,009
3.03125
3
[]
no_license
CREATE TABLE `web_editorialtype` ( `editorialtype_id` varchar(7) NOT NULL , `editorialtype_name` varchar(30) NOT NULL , `editorialtype_order` int(4) NOT NULL DEFAULT 0, `_createby` varchar(13) NOT NULL , `_createdate` datetime NOT NULL DEFAULT current_timestamp(), `_modifyby` varchar(13) , `_modify...
true
1b23de38dc7c2c04d77fda638ae4302bdd1dd5f9
SQL
ajtc16/Blogging-platform
/BDD/blog_platform.sql
UTF-8
7,031
3.140625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.4.10 -- http://www.phpmyadmin.net -- -- Host: localhost:3306 -- Generation Time: Jun 17, 2019 at 05:52 PM -- Server version: 5.5.42 -- PHP Version: 5.6.10 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIEN...
true
b8d305df4591a4f90d09cd7c86718505bf255d90
SQL
SQLauto/PyroSQL
/recurse/cte/RECURSIVE CTE.sql
UTF-8
1,197
3.953125
4
[]
no_license
The following shows the syntax of a recursive CTE: WITH expression_name (column_list) AS ( -- Anchor member initial_query UNION ALL -- Recursive member that references expression_name. recursive_query ) -- references expression name SELECT * FROM expression_name /* In general, a recursive ...
true
fe657a3ab059489cccf8f732b456283c51cafa3b
SQL
VijayMVC/Synergy
/User/Debbie Ann Chavez/RetainedUPDATE1.sql
UTF-8
1,150
3.71875
4
[]
no_license
SELECT SIS_NUMBER ,SSY.YEAR_END_STATUS ,SSY.FTE ,[GradeLevels].VALUE_DESCRIPTION AS GRADE FROM [rev].[EPC_STU_SCH_YR] AS [SSY] INNER JOIN [rev].[REV_ORGANIZATION_YEAR] AS [OrgYear] ON [SSY].[ORGANIZATION_YEAR_GU]=[OrgYear].[ORGANIZATION_YEAR_GU] INNER JOIN [rev].[REV...
true
41ef584d5f9bd60c44fa442ab2f83d481ac241f7
SQL
itman782016351/test
/testjbpm/src/main/resources/jbpmpocclean/delByDat.sql
UTF-8
6,574
3.640625
4
[]
no_license
DELIMITER $$ USE `JBPMPOC`$$ DROP PROCEDURE IF EXISTS `delByDat`$$ CREATE DEFINER=`root`@`%` PROCEDURE `delByDat`(IN `indat` CHAR) BEGIN DECLARE startTime VARCHAR(19) DEFAULT '2014-00-00 00:00:00'; DECLARE tempTime VARCHAR(19) DEFAULT DATE_SUB(NOW(),INTERVAL '2' MONTH);-- 当前时间后退三个月时间 -- DECLARE endTime V...
true
3329f273149799d2cf793afd56cc174cf38161f5
SQL
Rohangowd/Big_Data_sp16
/SQL/task3c.sql
UTF-8
133
3.015625
3
[]
no_license
SELECT DISTINCT hack_license, COUNT(DISTINCT medallion) AS num_taxis_used FROM trips GROUP BY hack_license ORDER BY hack_license ASC;
true
8cd7f613980a56c5ef8ac9418b23c1e3cd9ff98e
SQL
RaviHindocha/tpc-di_benchmark
/dags/queries/reset/reset_fact_holdings.sql
UTF-8
980
3.0625
3
[]
no_license
DROP TABLE IF EXISTS master.fact_holdings; CREATE TABLE master.fact_holdings ( TradeID INT64 NOT NULL, -- Key for Orignial Trade Indentifier CurrentTradeID INT64 NOT NULL, --Key for the current trade SK_CustomerID INT64 NOT NULL, -- Surrogate key for Customer Identifier SK_AccountID INT6...
true
c1451ab6f56e52f31bdb48efc7a0a2e5ca4282fb
SQL
SamirTalwar/bemorerandom.com
/api/src/main/resources/db/migration/V001__create_dnd_npc_names_tables.sql
UTF-8
559
2.9375
3
[]
no_license
CREATE TABLE dnd_races ( name VARCHAR(255) NOT NULL PRIMARY KEY ); INSERT INTO dnd_races VALUES ('human'), ('dragonborn'), ('dwarf'), ('eladrin'), ('elf'), ('halfling'), ('tiefling'); CREATE TABLE dnd_npc_first_names ( id SERIAL PRIMARY KEY, name VARCHAR(255) NOT NULL, sex ...
true
e8adf6788c388829634264182c9184c0723a65d7
SQL
AndrewQTUD/SQL
/prompt_dept.sql
UTF-8
183
2.875
3
[]
no_license
PROMPT Enter the department you are looking for ACCEPT dept NUMBER PROMPT "Department Number :" select first_name, last_name, department_id from employees WHERE department_id = &dept;
true
518e333bd88bbb8a8d548b3366fb7a7ee76856da
SQL
jbonfig/SQL_Exercise
/Ex1.sql
UTF-8
406
4.25
4
[]
no_license
select e.EntityName, a.BalanceDate as Date, a.Balance, s.Status from ( select b.EntityId, b.BalanceDate, MAX(StatusDate) as DATE, b.Balance from Balances b left join Status on b.BalanceDate >= StatusDate group by b.EntityId, b.BalanceDate, b.Balance ) a left join Status s on StatusDate = a.DATE inner join ...
true
4acee2dc6c0c9a4892e35cc9dab3eb9a93b353ec
SQL
thobho/sda-sql
/my-sqls/sql-createdb/create-db-policja.sql
UTF-8
4,420
3.671875
4
[]
no_license
DROP DATABASE kartoteka_policyjna; CREATE DATABASE kartoteka_policyjna; USE kartoteka_policyjna; DROP TABLE osoba; DROP TABLE nagroda; DROP TABLE policjant; DROP TABLE samochod; DROP TABLE sampchody_osob; DROP TABLE stopien; DROP TABLE zdarzenie; CREATE TABLE osoba( osoba_id INT, data_urodzenia DATE NOT NULL, ...
true
3943ff7d8ee6278aea76b29c80722ae1ee20ec74
SQL
coffee-dan/music-shop-fullstack
/F18_17_myDBinsert.sql
UTF-8
22,162
3.109375
3
[]
no_license
-- DML Script -- This script populates the database tables. ---Sets up placeholders for STORE_MANAGERs and CLERKS, the only ---data included is employee_id and type. ---The employee IDs contain four digits, the first indicates the ---store they work for while the last three are unique. ---The first number 'x000' is ...
true
dd04bc21b9b7301d971836e53c9c62afb6692799
SQL
AbhinayThota/RBMS
/PLSQL_Code/ADD_DATA_s.sql
UTF-8
714
3.015625
3
[]
no_license
/* package to add products to products table and purchase to purchases table */ /* implemented both functions and procedures*/ CREATE OR REPLACE PACKAGE Add_Data as /* for purchases*/ function Fun_add_purchase(e_id in varchar2,p_id in varchar2,c_id in varchar2,pur_qty in number) return varchar2; procedure Proc_add_pu...
true
ac59acae611e686309047982ef2db46d65dbb629
SQL
hoangbao1122/C0421G1_HoangGiaBao_Modude3
/_12_crud/user.sql
UTF-8
1,212
3.40625
3
[]
no_license
drop database if exists quanli_nguoidung; create database quanli_nguoidung; use quanli_nguoidung; create table `user`( id int primary key auto_increment, `name` varchar(50), `phone`varchar(11), `email`varchar(50), `address`varchar(50), `country` varchar(20) ); insert into `user` val...
true
8f62280b606cdf0094fd7cbfdb25681959a26e06
SQL
jinjing2013/bidata
/report/sql/03_fin_13_sales_cost_budget_19.sql
UTF-8
1,003
3.703125
4
[]
no_license
-- truncate table report.fin_13_sales_cost_budget_19; insert into report.fin_13_sales_cost_budget_19 select a.cohr ,a.bi_cuscode as ccuscode ,d.province ,a.cinvcode ,a.ddate ,round(a.isum_budget,2) as isum_budget ,round(a.inum_person,3) as inum_person ,round(b.inum_unit_person,3) as ...
true
62c825b108c230a367ee938bdd4cc4e8ea0aa98b
SQL
gitter-badger/Fat-Free-Framework-Boilerplate
/db/user.sql
UTF-8
824
2.59375
3
[]
no_license
CREATE TABLE `user` ( `id` SMALLINT(6) NOT NULL AUTO_INCREMENT, `login` VARCHAR(32) NULL DEFAULT NULL, `email` VARCHAR(64) NULL DEFAULT NULL, `username` VARCHAR(32) NULL DEFAULT NULL, `password` CHAR(60) NULL DEFAULT NULL, `language` VARCHAR(5) NULL ...
true
489b270aac329ad80d7bdc376133f9dd7c40466e
SQL
digogid/vn-case
/schema.sql
UTF-8
415
2.859375
3
[]
no_license
CREATE TABLE Page ( Id INT IDENTITY(1,1) PRIMARY KEY, Name varchar(50) NOT NULL ) CREATE TABLE UserData ( Id BIGINT IDENTITY(1,1) PRIMARY KEY, PageId INT NOT NULL, Ip VARCHAR(16) NOT NULL, Browser VARCHAR(100) NOT NULL, Input VARCHAR(300) NOT NULL, FOREIGN KEY (PageId) REFERENCES P...
true
89cf3fe9a1a7e05d51b081a86036efebe2697d0d
SQL
ArctosDB/DDL
/tables/uam_tables/project_publication.sql
UTF-8
530
3.90625
4
[]
no_license
CREATE TABLE PROJECT_PUBLICATION ( PROJECT_ID NUMBER NOT NULL, PUBLICATION_ID NUMBER NOT NULL, PROJECT_PUBLICATION_REMARKS VARCHAR2(255), CONSTRAINT PK_PROJECT_PUBLICATION PRIMARY KEY (PROJECT_ID, PUBLICATION_ID) USING INDEX TABLESPACE UAM_IDX_1, CONSTRAINT FK_PROJECTPUB_PROJECT...
true
1c26995550285dba610e5e886fb82d424e6f0ef3
SQL
DIAWARAMomo/Projet-Music-recording
/rapport/codes/fingerprints_table2.sql
UTF-8
243
3.21875
3
[]
no_license
CREATE TABLE IF NOT EXISTS FINGERPRINTS ( song_fk MEDIUMINT UNSIGNED NOT NULL, hash BINARY(10) NOT NULL, offset INT UNSIGNED NOT NULL, INDEX(hash), UNIQUE(song_fk, offset, hash), FOREIGN KEY (song_fk) REFERENCES SONGS (song_id) );
true
07a8628d609e9250a384170f1f016bc14f1d84d3
SQL
ferhanbarin/Oracle-SQL-Workspace
/Day3_Update.sql
ISO-8859-3
4,029
3.984375
4
[]
no_license
----- UPDATE - SET ----- /* Asagidaki gibi tedarikciler adinda bir tablo olusturunuz ve vergi_no sutununu primary key yapiniz. Ayrica asagidaki verileri tabloya giriniz. vergi_no NUMBER(3), firma_ismi VARCHAR2(50), irtibat_ismi VARCHAR2(50) , INSERT INTO tedarikciler VALUES (101, 'IBM', 'Kim Yon'); INSERT INTO ted...
true
1766d909990f396db0d86d7c06f42d314829bb3e
SQL
spoonser/Tournament-Website---Database-Project
/database/DDL.sql
UTF-8
2,941
3.71875
4
[]
no_license
START TRANSACTION; SET FOREIGN_KEY_CHECKS = 0; DROP TABLE IF EXISTS Fighters; DROP TABLE IF EXISTS Fights; DROP TABLE IF EXISTS Prizes; DROP TABLE IF EXISTS Weapons; DROP TABLE IF EXISTS PrizesWon; SET FOREIGN_KEY_CHECKS = 1; -- -- Table structure for Weapons -- CREATE TABLE `Weapons` ( `weaponID` int(11) NOT NULL AU...
true
6e8b3d46ad9d5387062b99dc54673ab944f01afa
SQL
kolyjjj/weed
/user/dbmigration/ddl/V1__create_user.sql
UTF-8
274
2.65625
3
[]
no_license
DROP TABLE IF EXISTS `User`; CREATE TABLE `User` ( id INT NOT NULL UNIQUE, login_name VARCHAR(50) NOT NULL UNIQUE, first_name VARCHAR(50), middle_name VARCHAR(50), last_name VARCHAR(50), PRIMARY KEY(id) ) ENGINE = InnoDB DEFAULT CHARACTER SET = utf8;
true
fd0db5275c7bd72a830965ca2aed5f3fd011b516
SQL
DianaSolano1/sql_inalcon
/Consultas Select/6_Analisis_de_precios_unitarios.sql
UTF-8
2,039
3.484375
3
[]
no_license
--select * from t_apu; --select * from t_apu_equipo; --select * from t_apu_materiales; --select * from t_apu_transporte_material; --select * from t_apu_mano_obra; --select * from t_productos; --select * from t_cuadrilla; --select * from t_cuadrilla_detalle; -- Reporte inicial APU SELECT a.codigo AS 'apu', a.nombre...
true
d73626cdfaf83bebf0c4336d9b646264d989699a
SQL
dantegaliotto/bss_tratamento_cdrs
/sql/erro440/xe/erro440xeRetornaCasos440.sql
UTF-8
566
3
3
[]
no_license
select rpon, designador, min(external_id) external_id, min(primeiro_cdr) primeiro_cdr, max(ultimo_cdr) ultimo_cdr, sum(total_cdrs) qtde, sum(qtd440) qtd440, sum(qtd430) qtd430, sum(valor) valor from bss_tratamento_cdrs_load b where created = trunc(sysdate)...
true
18d7426552f881860e8ab93399dc36f8285d20d6
SQL
accentient/AdventureWorks2019DB
/Code/AdventureWorks/Auction/Tables/Listing.sql
UTF-8
510
3.546875
4
[]
no_license
CREATE TABLE [Auction].[Listing] ( ListingID int IDENTITY(1,1) NOT NULL, Item nvarchar(50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, AuctionCategoryID int NOT NULL, Quantity int NOT NULL DEFAULT ((1)), ListedTime datetime NOT NULL DEFAULT (getdate()), EndingTime datetime NOT NULL DEFAULT (dateadd(day,...
true
bb41cfa6f5938c3e4a2df796ec5e6e11a9d14676
SQL
jadson-ti/prod_kls
/Tables/ANH/anh_home_matricula.sql
UTF-8
1,551
2.96875
3
[]
no_license
-- -------------------------------------------------------- -- Servidor: cm-kls.cluster-cu0eljf5y2ht.us-east-1.rds.amazonaws.com -- Versão do servidor: 5.6.10-log - MySQL Community Server (GPL) -- OS do Servidor: Linux -- HeidiSQL Versão: 10.1.0.5484 -- ---------...
true
46c59d9fec824d68357f7a0d3efbc5d5846a9c84
SQL
meg2208/Trading-Wheel
/relations/sql/portfolio_contents.sql
UTF-8
277
3.078125
3
[]
no_license
CREATE TABLE portfolio_contents ( state_id INTEGER, portfolio_id INTEGER, security VARCHAR2(6), PRIMARY KEY (state_id, portfolio_id), FOREIGN KEY (state_id,security) REFERENCES security_state, FOREIGN KEY (portfolio_id) REFERENCES aggregate_portfolio );
true
22e4d5ace4ec28b66bc735f88c9edbe0088ea1b8
SQL
otnasusagus/laravel-simpleCrudLaravel
/latihan.sql
UTF-8
1,902
3.015625
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.8.3 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Waktu pembuatan: 13 Jan 2019 pada 15.40 -- Versi server: 10.1.35-MariaDB -- Versi PHP: 7.2.9 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARA...
true
05116d1aa4de9811085fc56e67ff05ac9e214884
SQL
ClickHouse/ClickHouse
/tests/queries/0_stateless/01811_datename.sql
UTF-8
3,643
3.03125
3
[ "Apache-2.0", "BSL-1.0" ]
permissive
WITH toDate('2021-04-14') AS date_value, toDate32('2021-04-14') AS date_32_value, toDateTime('2021-04-14 11:22:33') AS date_time_value, toDateTime64('2021-04-14 11:22:33', 3) AS date_time_64_value SELECT dateName('year', date_value), dateName('year', date_32_value), dateName('year', date_time_value), da...
true
5978be04eb76e5d9420d50699911e37731b134ee
SQL
louisgreiner/NF92-Autoecole
/nf92a007.sql
UTF-8
4,770
3.140625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.4.10 -- http://www.phpmyadmin.net -- -- Client : localhost -- Généré le : Ven 24 Janvier 2020 à 08:05 -- Version du serveur : 5.5.43 -- Version de PHP : 5.5.26 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_...
true
b3405fb8eaa0b24eb0fed475c38f0826abf3aa76
SQL
OleksandrPavlov/source-it_final_project_tester_webapp
/tester/src/script/tester_postgresql_script.sql
UTF-8
13,767
3.4375
3
[]
no_license
-- SQL Manager Lite for PostgreSQL 6.1.2.53864 -- --------------------------------------- -- Host : localhost -- Database : webtester -- Version : PostgreSQL 9.5.16, compiled by Visual C++ build 1800, 32-bit SET search_path = public, pg_catalog; DROP INDEX IF EXISTS public.account_role_idx; DROP SEQUENCE IF EX...
true
6bc13a938dd3d38639549b2dbaab38deb6e86a18
SQL
revolyw/java-virtual-learning-community
/src/main/resources/sql/javavirtual/trends.sql
UTF-8
2,120
2.953125
3
[ "Apache-2.0" ]
permissive
-- MySQL dump 10.13 Distrib 5.7.19, for Linux (x86_64) -- -- Host: localhost Database: javavirtual -- ------------------------------------------------------ -- Server version 5.7.19-0ubuntu0.16.04.1 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTE...
true
e9cf06ab4a7c1aaead4752e64005550a236222bd
SQL
Ariah-Group/Research
/db_scripts/current/5.1.0/constraints/KC_FK1_BUDGET_SUB_AWARDS.sql
UTF-8
219
2.953125
3
[ "Apache-2.0", "ECL-2.0" ]
permissive
alter table BUDGET_SUB_AWARDS modify ORGANIZATION_ID VARCHAR2(8) NOT NULL / alter table BUDGET_SUB_AWARDS add constraint FK1_BUDGET_SUB_AWARDS foreign key (ORGANIZATION_ID) references ORGANIZATION(ORGANIZATION_ID) /
true
e26e67fe3f8c8e15819216824ca37bad47556cca
SQL
tylerlewisjcg/lookingtotomorrow
/db/work_history_DB/delete_work_history.sql
UTF-8
155
3.171875
3
[]
no_license
DELETE FROM work_history where work_id = $1; SELECT * from users JOIN work_history ON work_history.id = users.id WHERE users.id = $2 ORDER BY work_id ASC;
true
bab6b8cff1af355d948c8fbdc87954e2844e9d5f
SQL
Zira-el/cubos_food-usuario
/backend/schema.sql
UTF-8
4,718
3.171875
3
[]
no_license
CREATE DATABASE app_food; CREATE TABLE IF NOT EXISTS categoria( id SERIAL PRIMARY KEY NOT NULL, nome VARCHAR(30) NOT NULL, COLUMN imagem_categoria TEXT ); CREATE TABLE IF NOT EXISTS usuario( id SERIAL PRIMARY KEY NOT NULL, nome VARCHAR(100) NOT NULL, email VARCHAR(100) NOT NULL, senha TEXT NOT NULL );...
true
ba099623f7511b10ca9252acfc0afbc99ab00a59
SQL
zsisi/depaul
/CSC455/ZooDatabase.sql
UTF-8
3,314
3.859375
4
[]
no_license
DROP TABLE Handles; DROP TABLE Animal; DROP TABLE ZooKeeper; CREATE TABLE ZooKeeper ( ZID NUMBER(3,0), ZName VARCHAR2(25) NOT NULL, HourlyRate NUMBER(6, 2) NOT NULL, CONSTRAINT ZooKeeper_PK PRIMARY KEY(ZID) ); CREATE TABLE Animal ( AID NUMBER(3, 0), AName ...
true
b9ed3cbe06af60a1007419759d67758cc004bc87
SQL
nikitakasatkin44/jewelry
/src/main/resources/sql/create.sql
UTF-8
289
2.671875
3
[]
no_license
--DROP TABLE users IF EXISTS; CREATE TABLE users ( id INTEGER GENERATED BY DEFAULT AS IDENTITY(START WITH 100, INCREMENT BY 1) PRIMARY KEY, login VARCHAR(30), password VARCHAR(30), email VARCHAR(50), first_name VARCHAR(30), last_name VARCHAR(30), description VARCHAR(255) );
true
5f554ef353fbb8c8dd1901aacc54c74851ad98a7
SQL
CUBRID/cubrid-testcases
/sql/_18_index_enhancement_qa/_02_full_test/_05_desc_index_scan/cases/_09_using_index.sql
UTF-8
1,272
3.046875
3
[ "BSD-3-Clause" ]
permissive
--+ holdcas on; set system parameters 'dont_reuse_heap_file=yes'; create table tb (id int primary key, a int, b varchar(10)); insert into tb values (4,4, '4'); insert into tb values (1,1,'1'); create index i_tb_a on tb(a); create index i_tb_ab on tb(a,b); insert into tb values (2,2,'2'); insert into tb values (3,3,'3')...
true
a2897bcffbe59d044ae45c080c0af4a286810602
SQL
kumaresra/eventful-server
/src/main/resources/db/migration/V1_0_eventful_baseline.sql
UTF-8
1,367
4.125
4
[]
permissive
CREATE TABLE IF NOT EXISTS CATEGORY ( category_surrogate_id int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY, category_name varchar(25) DEFAULT NULL ) ENGINE=INNODB AUTO_INCREMENT=100; CREATE TABLE IF NOT EXISTS VENUE ( venue_surrogate_id int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY, venue_name varchar(100) ...
true
b203b76ef26d02092570c13d551cd49a938c63f0
SQL
Gr8-Dayne/SecondHandSearch
/data/schema.sql
UTF-8
428
3.265625
3
[ "MIT" ]
permissive
DROP TABLE IF EXISTS users, vehicles; CREATE TABLE IF NOT EXISTS users ( ID SERIAL PRIMARY KEY, Username VARCHAR(255) NOT NULL ); CREATE TABLE IF NOT EXISTS vehicles ( ID SERIAL PRIMARY KEY, title VARCHAR(255) NOT NULL, lat VARCHAR(255), long VARCHAR(255), image_URL VARCHAR(255), CL_URL VARCHAR(255), ...
true
c7b3682563edb3b91bf8cc9f5b87dbc2f8962469
SQL
Metalicon2/foodDelivery
/pizza-api/sql commands.sql
UTF-8
2,282
3.140625
3
[]
no_license
DROP TABLE IF EXISTS orders; CREATE TABLE orders ( id serial PRIMARY KEY, name VARCHAR(50) NOT NULL, location VARCHAR(100) NOT NULL, phonenumber VARCHAR(50) NOT NULL, foodname VARCHAR(50) NOT NULL, price VARCHAR(50) NOT NULL, time timestamp with time zone default current_timestamp ); DROP TABLE IF EX...
true
d86fac886953d0e2bc367905f473a0f68c0998a9
SQL
JuanERojas/SSDevelopment
/Ticket/bd-script001.sql
UTF-8
1,505
3.015625
3
[]
no_license
-- MySQL Script generated by MySQL Workbench -- Mon Sep 3 15:22:58 2018 -- Model: New Model Version: 1.0 -- MySQL Workbench Forward Engineering SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0; SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0; SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='ON...
true
55406485bc19287458aa2331c60f4cc8364ba77d
SQL
international-school-of-curitiba/TOTVSRM
/Classis/Admission/Localiza Alunos e Pais por Nacionalidade.sql
ISO-8859-1
3,043
3.265625
3
[]
no_license
/* Localiza Alunos e Pais por Nacionalidade */ SELECT EALUNOS.NOME, PCODNACAO.DESCRICAO, EACOMPL.A_NACIONAL1, EACOMPL.A_NACIONAL2, EACOMPL.A_NACIONAL3, CASE WHEN EACOMPL.A_PESSOA1 = 'PAI' THEN (SELECT NOME FROM PPESSOA WHERE CODIGO = EALUNOS.PAI) WHEN EACOMPL.A_PESSOA1 = 'ME' THEN (SELECT NOME FROM PP...
true
73f32d768ffc76a7f1bf3fec000429b86ae9138f
SQL
htmlacademy-nodejs/309949-buy-and-sell-3
/sql/queries.sql
UTF-8
1,670
4.28125
4
[]
no_license
SELECT id, name FROM categories; SELECT id, name FROM categories JOIN categories_offers ON id = category_id GROUP BY id; SELECT id, name, COUNT(offer_id) FROM categories LEFT JOIN categories_offers ON id = category_id GROUP BY id; SELECT offers.*, COUNT(comments.id) AS comments_count, STRING_AGG(DISTINCT cat...
true
f3c7e3fcdb19b633e7070f4866a9a3b599e8079a
SQL
AbdullahQureshi1080/Database_Project
/FCM-ALL/FootballClubManagement-System/Tables_DDL/Training.sql
UTF-8
1,334
3.09375
3
[]
no_license
-------------------------------------------------------- -- File created - Wednesday-May-29-2019 -------------------------------------------------------- -------------------------------------------------------- -- DDL for Table TRAINING -------------------------------------------------------- CREATE TABLE...
true
1ed60cac0b7ed7fb0e51e413a17e11f594e7f4aa
SQL
hexaforce/spring-zipkin-datarest
/datarest/src/main/resources/data.sql
UTF-8
896
2.9375
3
[]
no_license
DROP TABLE IF EXISTS billionaires; CREATE TABLE billionaires ( id INT AUTO_INCREMENT PRIMARY KEY, first_name VARCHAR(250) NOT NULL, last_name VARCHAR(250) NOT NULL, career VARCHAR(250) DEFAULT NULL, content VARCHAR(250) DEFAULT NULL, links VARCHAR(250) DEFAULT NULL, created_date DATETIME NOT NULL, modi...
true
013fd3abb21342ee8ee9c0c7167933e5feb4b9b4
SQL
JoeriRoijenga/dashboardDSH-backend
/setup.sql
UTF-8
6,965
3.640625
4
[]
no_license
IF EXISTS(SELECT 1 FROM sys.foreign_keys WHERE parent_object_id = OBJECT_ID(N'dbo.sensor_data')) ALTER TABLE dbo.sensor_data DROP CONSTRAINT fk_sensor_data_sensors1; IF EXISTS(SELECT 1 FROM sys.foreign_keys WHERE parent_object_id = OBJECT_ID(N'dbo.actuators')) ALTER TABLE dbo.actuators DROP CONSTRAINT fk_actuators...
true
2eefe3000ef463f3f0bfe93b94269a40aa406c59
SQL
Vizzuality/trase
/db/views/contexts_mv_v02.sql
UTF-8
2,167
4.125
4
[ "MIT" ]
permissive
WITH context_node_types_with_props AS ( SELECT context_id, node_type_id, column_position, node_types.name AS node_type, role, column_group, is_default FROM context_node_types JOIN context_node_type_properties ON context_node_types.id = context_node_type_properties.context_node_type_id ...
true
0d6f1ecc72058ee95c700bec69d766580a7e972a
SQL
tebajanga/HURUmap-apps
/hurumap_tz/sql/schoolattendanceuwezo.sql
UTF-8
13,161
2.9375
3
[ "MIT" ]
permissive
-- -- PostgreSQL database dump -- SET statement_timeout = 0; SET lock_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings = on; SET check_function_bodies = false; SET client_min_messages = warning; SET search_path = public, pg_catalog; ALTER TABLE IF EXISTS ONLY public.schoolattendance DROP CO...
true
e9693688211543b9d9c596cd5575751f7e6dc205
SQL
rezauwgithub/MySQL_Assignments
/Assignment02.sql
UTF-8
2,200
4.40625
4
[]
no_license
/* Reza Naeemi - SQL, ITAD 138 Spring 2014 Lake Washington Institute of Technology Instructor: Julien Feis Assignment 02 */ USE world; -- 1. Find the city with the largest population. Your query must produce the answer in the format shown below. Make sure that the columns (fields) are named exactly as in the scree...
true
cef39d203f0fba4e83bd87cc924fa55048b2dc26
SQL
NATO2042/sql-scratch-capstone-turn-in
/NATO2042_CapstoneSubmission/NATO2042_CapstoneSQLCode_ChurnRates_v181205.sql
UTF-8
4,073
4.6875
5
[]
no_license
-- STEP01: Data investigation 1 (Segments = 2 (30, 87) | Records: 2000) SELECT * FROM subscriptions LIMIT 100; SELECT COUNT(*) FROM subscriptions; SELECT DISTINCT segment FROM subscriptions; --STEP02: Data investigation 2 (Month start: Dec-2016 | Month End: Mar-2017) SELECT MIN(subscription_start), ...
true
6570fb7ae41983ba3478ccd629ada6c30af34861
SQL
ryym/fores
/migrations/2018-11-18-093550_prototype/up.sql
UTF-8
795
3.453125
3
[]
no_license
CREATE TABLE users ( id BIGSERIAL PRIMARY KEY, created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, key VARCHAR(20) NOT NULL, tree JSONB NOT NULL, UNIQUE (key) ); CREATE TABLE files ( id BIGSERIAL PRIMARY KEY, created_at TIMESTAMP NOT NULL D...
true
e5432d3acbaaaf50a45e9f54e2d641093ede85ee
SQL
judsonc/gpweb
/gpweb/instalacao/sql/atualizar_bd_mysql_144.sql
UTF-8
18,081
3.046875
3
[]
no_license
SET FOREIGN_KEY_CHECKS=0; UPDATE versao SET versao_codigo='8.2.1'; UPDATE versao SET ultima_atualizacao_bd='2013-01-27'; UPDATE versao SET ultima_atualizacao_codigo='2013-01-27'; UPDATE versao SET versao_bd=144; ALTER TABLE arquivos ADD COLUMN arquivo_calendario INTEGER(100) UNSIGNED DEFAULT NULL; ALTER TABL...
true
f0373c43b2adbe4609a57d2cdd5b15a8ea15ca95
SQL
abhisheknirmal/HackerrankPractice
/SQL/02. Advanced Select/002. The PADS.sql
UTF-8
423
3.421875
3
[]
no_license
/* Enter your query here. */ SELECT concat(NAME, CASE WHEN occupation = "Doctor" THEN "(D)" WHEN occupation = "Professor" THEN "(P)" WHEN occupation = "Singer" THEN "(S)" WHEN occupation = "Actor" THEN "(A)" END) FROM OCCUPATIONS ORDER BY NAME; SELECT "There are a total of ", COUNT(OCCUPATION), concat(LOWER(OC...
true
4fc48e97253f3aa5f00a207154424008e2d7d5a9
SQL
Mosmain/it-school
/it_school.sql
UTF-8
6,653
3.1875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.9.0.1 -- https://www.phpmyadmin.net/ -- -- Хост: 127.0.0.1 -- Время создания: Дек 27 2020 г., 02:21 -- Версия сервера: 10.3.16-MariaDB -- Версия PHP: 7.3.6 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CH...
true
a411b8c8d14663f238689d82050c8929968c9e47
SQL
CaioV1/Padoka-Hill-Valley
/Banco/views/view_promocao_produto.sql
UTF-8
401
3.5625
4
[]
no_license
ALTER VIEW view_promocao_produto AS SELECT pr.id, pr.desconto, DATE_FORMAT(pr.data_inicio, '%d/%m/%Y') AS data_inicio, DATE_FORMAT(pr.data_fim, '%d/%m/%Y') AS data_fim, pr.id_produto, pr.situacao, p.nome AS nomeProduto, p.preco, p.quantidade, p.caminho_imagem, p.descricao FROM tbl_promocao AS pr INNER JOI...
true
79d4627c93ecfd5e7b0ff9fcf167117a8d35a6a1
SQL
madmishra/learnvuejs-tarak-xhtml
/target/classes/import.sql
UTF-8
1,354
2.78125
3
[]
no_license
-- -- JBoss, Home of Professional Open Source -- Copyright 2013, Red Hat, Inc. and/or its affiliates, and individual -- contributors by the @authors tag. See the copyright.txt in the -- distribution for a full listing of individual contributors. -- -- Licensed under the Apache License, Version 2.0 (the "License")...
true
8fc8c396f99a616dcd9b4caeee4e7f9b819fe936
SQL
BastienBellariva/DataScience-Sport
/bdd/Scripts_SQL/10_import_subvention_territoriale.sql
UTF-8
625
2.671875
3
[]
no_license
DROP TABLE IF EXISTS t_subvention_territoriale; CREATE TABLE t_subvention_territoriale ( -- Informations subvention code_federation VARCHAR(10), libelle_federation VARCHAR(100), beneficiaire VARCHAR(200), siege VARCHAR(70), annee_subvention VARCHAR(4), code_postal VARCHAR(10), subvention INT(10), obj...
true
a883a4f8d731bf4cf021e5f91e536355e69b5aeb
SQL
avniproject/calcutta-kids
/data-fix-sql/voided_SES.sql
UTF-8
466
3.21875
3
[]
no_license
--voided SES encounter after 01-Nov-2019 with audit_ids as ( update encounter set is_voided = true where encounter_date_time >= '11-01-2019' and encounter_type_id = (select id from encounter_type et where et.name = 'SES Survey') returning audit_id ) update audit set last_modified_date_time = current...
true
66aa9a952d8365d55e0af6a0cc3960c11462e560
SQL
Dawid26/szkola_jezykow_03_3
/dawidma1_szkolajezykow114 (5).sql
UTF-8
62,328
3.25
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.9.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Czas generowania: 14 Maj 2020, 17:21 -- Wersja serwera: 10.4.8-MariaDB -- Wersja PHP: 7.1.33 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARA...
true
b78791c18fcb8a695f7611fa6161017f3ce82f46
SQL
BiancaBispo/Noticias-jogos-testes
/noticias_jogos/src/banco/produtos.sql
UTF-8
477
2.65625
3
[]
no_license
CREATE DATABASE vendas; USE vendas; CREATE TABLE IF NOT EXISTS `tabela_produtos` ( `id` int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY, `nome_produto` varchar(255) NOT NULL, `preco_produto` decimal (20) NOT NULL, `estoque_produtos` int(10) NOT NULL, `imagem_produto` longblob NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=lati...
true
6ce932ee714a5c6abed87cc56939c2fca71df0a1
SQL
cmu-is-projects/quickeval
/db/quickeval.sql
UTF-8
5,613
3.203125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 3.1.4 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: May 01, 2009 at 11:46 AM -- Server version: 5.0.77 -- PHP Version: 5.2.6 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_S...
true
ed86a7cf72ddc86cbfc4af8e58e3a9d44da8fdcb
SQL
huggins9000211/holbertonschool-higher_level_programming
/0x0E-SQL_more_queries/14-my_genres.sql
UTF-8
248
3.15625
3
[]
no_license
-- Show databases -- Show databases SELECT tv_genres.name FROM tv_genres JOIN tv_show_genres ON tv_genres.id = tv_show_genres.genre_id JOIN tv_shows ON tv_shows.id = tv_show_genres.show_id WHERE tv_shows.title = 'Dexter' ORDER BY tv_genres.name;
true
981a153b4523a663e79fd50403f7d490f7627eef
SQL
matthew-m-moore/EduSafe-Insurance
/Database Repository/EdusafeWebAppDB Repository/1. Tables/dbo.WebSiteInquiryCollegeName.Table.sql
UTF-8
345
3.3125
3
[]
no_license
IF NOT EXISTS (SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'WebSiteInquiryCollegeName') BEGIN CREATE TABLE WebSiteInquiryCollegeName ( Id int IDENTITY(1,1) , CollegeName varchar(250) not null , CreatedOn datetime not null , CreatedBy varchar(25) not null CONSTRAINT PK_CollegeName PR...
true
21a81ae8b0e0aa054bb36c30bb1e4d75582f7808
SQL
Vistor25/07.BasicSQL
/NorthWind/Scripts/2/2.2.6.sql
UTF-8
116
3.015625
3
[]
no_license
select j.FirstName, d.FirstName as Director from Employees j left join Employees d on j.ReportsTo=d.EmployeeID
true
b50dff52687051a754c21d0a10340bbd59cb1a64
SQL
peckadesign/PeckaDesk
/migrations/structures/2019-12-30-173626-issue.sql
UTF-8
622
3.796875
4
[]
no_license
ALTER TABLE `issue` ADD `description` text NULL; CREATE TABLE `file` ( `id` int NOT NULL AUTO_INCREMENT PRIMARY KEY, `name` varchar(255) NOT NULL ) ENGINE='InnoDB'; CREATE TABLE `issue_x_file` ( `issue_id` int(11) NOT NULL, `file_id` int(11) NOT NULL, FOREIGN KEY (`issue_id`) REFERENCES `issue` (`id`) ON DELETE RESTR...
true
d30aab179e40eeef8a01826a6bfa37f4192fdff8
SQL
tyler-simeone/Mastering-SQL
/book-4-queries/indexes.sql
UTF-8
1,663
3.515625
4
[]
no_license
-- 1. -- actual time=0.010..0.125 (before index) EXPLAIN ANALYZE SELECT * from Employees WHERE employee_type_id = 1; CREATE INDEX employee_type ON employees ( employee_type_id ASC ); -- actual time=0.051..0.084 (after index) EXPLAIN ANALYZE SELECT * from Employees WHE...
true
0fd96a739101213cf21ff103d93cd3f78e31c5cd
SQL
smashersandbangers/7570Final-Assignment
/Dump20160505/Cricket_Store_Database_Product.sql
UTF-8
2,882
3.171875
3
[]
no_license
-- MySQL dump 10.13 Distrib 5.7.9, for osx10.9 (x86_64) -- -- Host: localhost Database: Cricket_Store_Database -- ------------------------------------------------------ -- Server version 5.7.11 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET...
true
f93460a8a2af31029e478c164d7aa469522c23fc
SQL
smyers1243/multithread_2_2_update
/00_01_prep/Structure/300_KCLS_action_trigger_vert8.sql
UTF-8
3,853
3.203125
3
[]
no_license
INSERT INTO action_trigger.hook (key,core_type,description,passive) VALUES ( 'vandelay.import_items.print', 'vii', oils_i18n_gettext( 'vandelay.import_items.print', 'Print output has been requested for Import Items from records in an Importer Bib Queue.', 'at...
true
8bf12eb46882ddb553532e238f6c97c098445ddf
SQL
raffialan/SoccerLeague-Database
/Soccer League/WarmUpProject/SoccerLeague.sql
UTF-8
1,107
3.96875
4
[]
no_license
CREATE TABLE team( Tid INT not null AUTO_INCREMENT PRIMARY KEY, name VARCHAR(100), city VARCHAR(100) ); CREATE TABLE player( Pid INT not null AUTO_INCREMENT PRIMARY KEY, name VARCHAR(100), position VARCHAR(100), dob DATE, current_tid INT, FOREIGN KEY(current_tid) REFERENCES team(Tid), start_date DATE );...
true
d5748cd1001e56d3417d6f7161145b9b9d829026
SQL
tknnn/CS5200Project_Databases
/dml.sql
UTF-8
26,104
2.90625
3
[]
no_license
/* All default user images are from the following source. <div>Icons made by <a href="http://www.freepik.com" title="Freepik">Freepik</a> from <a href="https://www.flaticon.com/" title="Flaticon">www.flaticon.com</a> is licensed by <a href="http://creativecommons.org/licenses/by/3.0/" title="Creative Commons BY 3.0" ta...
true
0a595328ea4841f9ddd704bc7f67c1c3e0fce4e8
SQL
kausic-eunimart/June-month-progress
/June/BackEnd API works/movieticketbooking.sql
UTF-8
4,885
3
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jun 25, 2021 at 01:07 PM -- Server version: 10.4.11-MariaDB -- PHP Version: 7.2.31 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIE...
true
d28691ad83d59c48ffed0e9ec1d644af421bd182
SQL
vinz10/vs-oade
/database/script.sql
UTF-8
20,532
3.109375
3
[]
no_license
-- MySQL Script generated by MySQL Workbench -- 06/14/17 11:53:01 -- Model: New Model Version: 1.0 -- MySQL Workbench Forward Engineering SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0; SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0; SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITION...
true
0fb993afc5c3879b55fe8d375f5d4e63ae6d96e3
SQL
Giacomo-Barletti-TopFinish/Applicazioni
/DBScript/query estrazione galvanica.sql
UTF-8
6,213
3.203125
3
[]
no_license
select sum(mf.qta)qta,sum(mf.qtadater)qtadater, MODLAN.IDMAGAZZ AS IDMAGAZZ_LANCIO, MODLAN.MODELLO AS MODELLO_LANCIO, MOD.IDMAGAZZ AS IDMAGAZZ_WIP, ...
true
433a5a06b48e7d78a5a693e304688ed6d266982f
SQL
genweihua/OracleDailyScripts
/sqltop.sql
UTF-8
1,765
3.203125
3
[]
no_license
-- Nombre: sqltop.sql -- Autor: Juan Manuel Cruz Lopez (JohnXJean) -- Descripcion: Muestra el Top 5 de Sentencias SQL en diversas categorias -- Uso: @sqltop ENTER --Requerimientos: Acceso a v$sqlstats --Licenciamiento: Ninguno -- Creado: 10/07/2017 -- Soporte: johnxjean@gmail.com...
true
322d28d116c144ca8ac27231c19a44bc5f930372
SQL
nnajiarinze/cuala
/src/main/resources/db/migration/V1__reg.sql
UTF-8
18,287
4.0625
4
[]
no_license
USE cuala; CREATE TABLE bf_tbl_users ( id int NOT NULL AUTO_INCREMENT, fb_id varchar(30) NOT NULL UNIQUE, `name` varchar(255) NOT NULL, email varchar(255) NOT NULL UNIQUE, phone varchar(255) NOT NULL UNIQUE, matric_no varchar(11) NOT NULL UNIQUE, reg_no varchar(10) NULL, grad_year INT NOT null, image varchar(255) NU...
true
65ddfe4dbb0abb874cc5ed0ac859c4281066932d
SQL
muhammadnurbasari/survey_online
/database/survei_online.sql
UTF-8
21,369
2.796875
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Aug 08, 2019 at 02:00 PM -- Server version: 10.1.16-MariaDB -- PHP Version: 7.0.9 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLI...
true
794160d77685813934195d93dd6bc77338990404
SQL
777Max777/AquaNose3
/scripts/003 - create table measures.sql
UTF-8
465
2.703125
3
[]
no_license
CREATE TABLE [Measures] ( [ID] [int] IDENTITY(1,1) NOT NULL, [Name] [nvarchar](128) NOT NULL, [StartTime] [datetime] NOT NULL, [Description] [nvarchar](1024) NULL, [IsMeasured] [bit] NOT NULL CONSTRAINT [DF_Measures_IsMeasured] DEFAULT ((1)), [GroupID] [int] NULL, [FullLength] [float] NOT NULL, [Interv...
true
b936e17adc1ff96d7ca598d441166bf895a7b799
SQL
rubymasciangelo/SQL-Library-Project
/library.sql
UTF-8
10,128
3.34375
3
[]
no_license
CREATE DATABASE library; USE [library]; CREATE TABLE LIBRARY_BRANCH ( BranchID INT PRIMARY KEY NOT NULL IDENTITY (1,1), BranchName VARCHAR(50) NOT NULL, AddressLIB VARCHAR(70) NOT NULL ); CREATE TABLE PUBLISHER ( PublisherName VARCHAR(50) PRIMARY KEY NOT NULL, AddressPUB VARCHAR(70) NOT NULL, PhoneP...
true
692ac5cab8511373454b3f2c1aa4f52c97f158a9
SQL
h136799711/20150615modoer_marry
/core/modules/exchange/install/module_install.sql
UTF-8
4,134
3.203125
3
[ "Apache-2.0" ]
permissive
DROP TABLE IF EXISTS modoer_exchange_category; CREATE TABLE modoer_exchange_category ( catid smallint(8) unsigned NOT NULL AUTO_INCREMENT, name varchar(40) NOT NULL DEFAULT '', num mediumint(0) NOT NULL DEFAULT '0', listorder smallint(5) NOT NULL DEFAULT '0', PRIMARY KEY (catid) ) TYPE=MyISAM; DROP...
true
9db37ea26b329ec885733e9c9352accff72d432f
SQL
fareshelmy/iot-devices
/iot-devices.sql
UTF-8
3,208
3.265625
3
[]
no_license
-- MySQL dump 10.13 Distrib 8.0.16, for macos10.14 (x86_64) -- -- Host: localhost Database: iot_device -- ------------------------------------------------------ -- Server version 5.6.50 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS...
true
b86c1727c3268649e319f553d087063effa04780
SQL
CoreyJMiller22791/Thinkful
/number_of_trips.sql
UTF-8
119
2.65625
3
[]
no_license
SELECT start_station, COUNT(*) number_of_trips FROM trips GROUP BY start_station ORDER BY number_of_trips DESC
true
e85ae08bb16e909d69cfab93ec3f9336690b8f40
SQL
GSIL-Monitor/er
/db/sp/I_DL_SYNC_MAIN_ORDER.sql
UTF-8
66,025
2.9375
3
[]
no_license
DROP PROCEDURE IF EXISTS `I_DL_SYNC_MAIN_ORDER`; DELIMITER // CREATE PROCEDURE `I_DL_SYNC_MAIN_ORDER`(IN `P_OperatorID` INT, IN `P_ApiTradeID` BIGINT) SQL SECURITY INVOKER MAIN_LABEL:BEGIN DECLARE V_ModifyFlag,V_DeliverTradeID,V_WarehouseID, V_NewWarehouseID,V_Locked,V_ReceiverProvince, V_ReceiverCity, V_R...
true