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
4aa26e78f44a94248e9a32f11de0e6c4560cc3bc
SQL
mymousecat/jk-third-docking
/lis/sql/T_LIS_DUTY.SQL
UTF-8
1,037
3.0625
3
[]
no_license
create table t_lis_duty ( barcode_id varchar(100) not null, order_id varchar(100) not null, element_assem_id varchar(100) not null, element_assem_name varchar(100) not null, username varchar(100), sex_name varchar(10), age varcha...
true
67301f7bd7dc8b1dc76948620e568ff2bb5a6cf1
SQL
innowise-traulka/new-course-work
/src/main/resources/db/changelog/v1/011-initial-reservation-table.sql
UTF-8
294
3.234375
3
[]
no_license
create table reservation ( id bigserial unique, application_date date, arrival_date date, departure_date date, status reservation_enum default 'CONFIRMED', room_id int, primary key(id), constraint fk_reservation_room foreign key (room_id) references room (id) );
true
2eeacd42148e9455bf6e6fec25683dcab4fe5348
SQL
coul-omnis/school-php
/Mysql基礎/初歩良く使うコマンド.sql
UTF-8
450
3.03125
3
[]
no_license
-- ログインするとき mysql -u root -- データベースを作るとき create database namae; -- 使うデータベースの指定 use namae; -- テーブルを作るとき create table tablenamae(id int,name varchara(20),age int) values (1,"名前",30); -- テーブルを見たいとき show tables; -- テーブルの中身を見たいとき select * from tablenamae; -- データベースの一覧を見たいとき show databases;
true
363d2e1bb9880d3a15fc47cedd6dc4fa56f90436
SQL
noikiy/sc-project
/chuangying/liantong/install/dbFix.sql
UTF-8
5,164
2.78125
3
[]
no_license
CREATE TABLE `cyShopHours` ( `shopHoursId` int(10) NOT NULL AUTO_INCREMENT COMMENT '营业时间id', `shopId` int(10) NOT NULL COMMENT '店铺id', `startWeek` tinyint(4) NOT NULL DEFAULT '0' COMMENT '开始日期', `endWeek` tinyint(4) NOT NULL DEFAULT '5' COMMENT '结束日期', `startTime` char(8) NOT NULL DEFA...
true
dd124c5b90c871aba8183097cb454e93b9d4882d
SQL
YuanyuanQiu/LeetCode
/1795.sql
UTF-8
361
3.109375
3
[]
no_license
select * from (select product_id, 'store1' as store, store1 as price from Products union select product_id, 'store2' as store, store2 as price from Products union select product_id, 'store3' as store, store3 as price ...
true
76abe7947c40c25b52b583daea3a1f2bedca4a0e
SQL
VinodRobert/DBCapacite
/VersionSQL/BERACHAH/BSBS_CAPACITE/BI/Procedure/MONTHLYDEPRECIATION.sql
UTF-8
853
2.65625
3
[]
no_license
/****** Object: Procedure [BI].[MONTHLYDEPRECIATION] Committed by VersionSQL https://www.versionsql.com ******/ CREATE PROCEDURE [BI].[MONTHLYDEPRECIATION](@CURRENTYEAR INT,@CURRENTMONTH INT,@ID INT) AS IF @ID=1 EXEC [BI].[spPOSTDEPRECIATION] @CURRENTYEAR,@CURRENTMONTH,'2200007' IF @ID=2 EXEC [BI].[spPOSTDE...
true
fbbb3a8ea5dc97c88106d915f01ceb29b6e4f386
SQL
AhTiKo/SoftUni
/MySQL/20.10_EXAM/8.sql
UTF-8
200
3.8125
4
[]
no_license
SELECT p.id,CONCAT(cat.name,' - ',c.name,' - ',p.name) AS full_path FROM problems AS p JOIN contests AS c ON p.contest_id = c.id JOIN categories AS cat ON c.category_id = cat.id ORDER BY p.id ASC;
true
9138b2e2ff218e7440649bedd16d6545bd7dc129
SQL
zombodb/zombodb
/test/sql/issue-747.sql
UTF-8
1,246
3.515625
4
[ "Apache-2.0" ]
permissive
CREATE TABLE testtally_main ( id SERIAL8 NOT NULL PRIMARY KEY, name text NOT NULL ); CREATE TABLE testtally_var ( id SERIAL8 NOT NULL PRIMARY KEY, state varchar ); CREATE OR REPLACE VIEW testtallyview AS SELECT testtally_main.*, testtally_var.state, testtally_main AS zdb FROM testtally_main ...
true
e0920e5b5131caf2508435291a4d67fd1a2bc335
SQL
TH1NKFASTER/sqlex
/exercises/083.sql
UTF-8
487
3.34375
3
[]
no_license
SELECT name FROM ships INNER JOIN classes ON ships.class = classes.class WHERE ships.class = classes.class AND (CASE WHEN numguns = 8 THEN 1 ELSE 0 END + CASE WHEN bore = 15 THEN 1 ELSE 0 END + CASE WHEN displacement = 32000 THEN 1 ELSE 0 END + CASE WHEN type = 'bb' THEN 1 ELSE 0 END...
true
61db1ff5c5c9150e694c3561c0f320eaaa0779bd
SQL
GGabrielDev/MySQL-Handeling
/query_10.sql
UTF-8
610
3.328125
3
[]
no_license
USE sql_store; -- Inserting multiple rows INSERT INTO shippers (name) VALUES ('Shipper1'), ('Shipper2'), ('Shipper3'); INSERT INTO products ( name, quantity_in_stock, unit_price ) VALUES ( 'Smartphone - Galaxy S2', '40', '55.5' ), ( 'Laptop - HP Pavilion 9', '25', '99.9' ), ( 'Action F...
true
6ab4cc1be26234e2f418ace62c176badc0fccbcd
SQL
AMPATH/etl
/etl-scripts/old_sql_scripts/OLD SQL/flat_lab_data_inc_v2.0.sql
UTF-8
11,941
4.09375
4
[]
no_license
create table if not exists flat_lab_data ( encounter_id int, person_id int, encounter_datetime datetime, encounter_type int, enc_date_created datetime, enc_hiv_test int, enc_vl int, enc_cd4_count double, enc_cd4_percent double, enc_obs_date_created datetime, lab_hiv_test int, lab...
true
1ea197ab459e268c7a3d1d18290c71b1f688325f
SQL
cado1982/moneteer-database
/Moneteer.DatabaseMigrations/Scripts/Script0003_Create envelope tables.sql
UTF-8
896
3.640625
4
[]
no_license
CREATE TABLE app.envelope_category ( "id" uuid NOT NULL PRIMARY KEY, "name" varchar(255) NOT NULL, "budget_id" uuid NOT NULL references app.budget(id) ON DELETE CASCADE, "is_deleted" boolean NOT NULL default false, "is_hidden" boolean NOT NULL default false, UNIQUE ("...
true
c3455929eeea23c7b87321f438c1cae63bf74be3
SQL
Anujsinghgk/MYBBSBANK.github.io
/sql/mybbs.sql
UTF-8
2,520
3.234375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.1.0 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jun 06, 2021 at 07:59 AM -- Server version: 10.4.19-MariaDB -- PHP Version: 8.0.6 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIEN...
true
1ea58992e0fbb13a743c83174fed7752080f9cf7
SQL
petroUshtan/Megadel
/scripts/V_201609282213__add colums for products.sql
UTF-8
334
2.765625
3
[]
no_license
ALTER TABLE products ADD COLUMN price1 double precision; ALTER TABLE products ADD COLUMN price_opt1 double precision; ALTER TABLE products ADD COLUMN shtrih_code text; ALTER TABLE products ADD CONSTRAINT product_code_unicue_key UNIQUE(code); ALTER TABLE products ADD CONSTRAINT product_shtrih_code_unicue_key UNIQUE(...
true
94d409ae5a7452363138c26cb8ddabb4ee3200ad
SQL
smurphy7326/Employee-tracker-CMS
/db/seeds.sql
UTF-8
1,168
3.609375
4
[ "MIT" ]
permissive
-- this is where you have to add in the values and things like that, where the information actually is -- This uses the employees_db database INSERT INTO departments (name) -- making up the different jobs and roles VALUES ('Engineering'), ('Finance'), ('Human Resources'), ('Legal'), ('Sales'); IN...
true
ee32b87904492ac70a77bfaf1c839785b5dbe2ee
SQL
aaronbieber/helpmeet
/sample_rules/one-on-one.sql
UTF-8
535
3.875
4
[]
no_license
with attendee_counts as ( select v.vevent_id as vevent_id, count(*) as num_attendees from vevents v natural join attendees group by v.vevent_id ), attendee_counts_and_summaries as ( select v.vevent_id as vevent_id, v.summary as summary, ac.num_attendees as num_attendees from ...
true
d594491964a0acb27bd7f32b49d5b0a7bc3d64b4
SQL
Zetkazet/AndroidQrStorage
/Sql/stockproduct.sql
UTF-8
3,252
3.203125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.1.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Oct 14, 2021 at 06:26 AM -- Server version: 10.4.19-MariaDB -- PHP Version: 8.0.7 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIEN...
true
c9b970a0f466b28c6c842efbed8c0e9abf2761bd
SQL
aleks-programmer/StudentApp
/sql_scripts/init.sql
UTF-8
266
2.59375
3
[]
no_license
CREATE DATABASE IF NOT EXISTS student; USE student; create table student ( school_year int not null, campus int not null, student_id int auto_increment primary key, entry_date datetime not null, grade_level int not null, name varchar(200) not null );
true
87b6dae5a3472e416562315cec43a3f157e55088
SQL
anadobarriopajuelo/TFG-BASES-DE-DATOS-ONG
/3_CONSULTAS.sql
UTF-8
11,162
4.28125
4
[]
no_license
use ong; /* Consulta 1 : Numero de solicitudes de cada tipo de ayuda entre 1/7/2020 y 31/12/2020 (segunda mitad del 2020) */ SELECT tipo_ayuda, COUNT(*) AS solicitudes FROM militar WHERE (fecha_solicitud BETWEEN '2020-07-01' AND '2020-12-31') GROUP BY tipo_ayuda; /* Consulta 2: De los militares actualmente en tr...
true
5be3d080da112f0250af1ba148897015f757906a
SQL
thiess-cristian/sgbd
/lab3/lab3/ex1.sql
UTF-8
143
3.03125
3
[]
no_license
select h1.name from friend f join highschooler h1 on f.ID1=h1.ID join highschooler h2 on f.ID2=h2.ID where h2.name='Gabriel' order by h1.name
true
0432e2ca348e4b8f8207815145d80c4f9a4657a2
SQL
jfifer/dataguy
/StoredProcedures/getCustomerGrowthCount.sql
UTF-8
9,527
3.375
3
[]
no_license
CREATE DEFINER=`root`@`localhost` PROCEDURE `getCustomerGrowthCount`(in_resellerId INT, in_year INT) BEGIN DECLARE v_jan, v_feb, v_mar, v_apr, v_may, v_jun, v_july, v_aug, v_sept, v_oct, v_nov, v_dec , v_janCan , v_febCan, v_marCan, v_aprCan, v_mayCa...
true
551c8f9366d7b58cee28d3c90a2397bf84707189
SQL
cwi-crescer-2017-1/lucas.muller
/modulo.02/lista-04.sql
ISO-8859-1
3,039
4.15625
4
[]
no_license
/* --- LISTA DE EXERCCIOS 04 --- https://goo.gl/OQgKfb */ /* exerccio 01: Liste todos os projetos que tiveram atrasos no incio da obra, exibir tambm o tempo previsto (em meses), e o tempo realizado (em meses) para a concluso da obra. */ select Identificador, Projeto, Data_Inicio_Prev, Data_Inicio...
true
e939c5f996a4237c8eca841cbb7f2c203a20f1df
SQL
icamachoa/Test
/SqlQueries/Reportes/Ventas/Query1293-TITCOMPARATIVO_GRAFICA.sql
UTF-8
347
2.890625
3
[]
no_license
//[session.db|Untyped,session.idusuario|Untyped,idpantalla|Integer,] --SELECT /*PROTEGIDO*/ /*SEP2015*/ select top 1 (CASE WHEN (TEXTO IS NULL OR TEXTO='0') THEN 'Ejecutivo' ELSE TEXTO END) AS TITGRAFICA FROM <#SESSION.DB/>.DBO.USUARIOS_FILTROS WHERE IDUSUARIO=<#SESSION.IDUSUARIO/> AND IDPANTALLA=ISNULL(:IDPANTALLA,0...
true
a81dc65c7ad53a37a84bf97eba044f9237cf1ba6
SQL
InnovateUKGitHub/innovation-funding-service
/ifs-data-layer/ifs-data-service/src/main/resources/db/migration/V170_1_3__Move_Competitions_To_Application_Config.sql
UTF-8
524
3.5
4
[ "MIT" ]
permissive
INSERT INTO competition_application_config (temporary_competition_id, maximum_funding_sought) SELECT c.id AS temporary_competition_id, null as maximum_funding_sought FROM competition c WHERE c.id NOT IN ( SELECT cac.temporary_competition_id FROM competition_application_config cac); UPDATE competition c INNER JOIN comp...
true
954d336bed7984280f8eef8cd9beddc9ea3d9a93
SQL
anjuls/Richards-Monitor
/Scripts/sessionEvents.sql
UTF-8
860
3.140625
3
[]
no_license
SELECT sid , event , TO_CHAR(total_waits, '999,999,999,990' ) "Total Waits" , TO_CHAR(total_timeouts, '999,999,999,990' ) "Total Timeouts" , TO_CHAR(time_waited, '999,999,999,990' ) "Time Waited (hundredths)" , TO_CHAR(ROUND(average_wait, 2), '999,999,990.99' ) "Averave Wait (hundredths)" , ...
true
7fd0503b25bee44cbca716acb7d7aada16844430
SQL
niranjjammy/MSA6-3-2016
/CP2_R6.5/KPMG.DBScript/Metadata/MENU.sql
UTF-8
1,721
2.75
3
[]
no_license
SET NOCOUNT ON; IF NOT EXISTS(SELECT 1 FROM MENU WITH(NOLOCK) WHERE MENU_ID ='1') BEGIN INSERT INTO MENU (MENU_NAME , TARGETURL , IS_ACTIVE , CREATED_BY , CREATED_DATE , MODIFIED_BY , MODIFIED_DATE) VALUES ('My MSA',NULL, 1 , 'ADMIN' , GETDATE() , 'ADMIN' , GETDATE()) END IF NOT EXISTS(SELECT 1 FROM ME...
true
d2a4d31d21de47eef7afd1eb456baa603e861e8f
SQL
mjdudzic/healthcareclaims-ddd
/HealthcareClaims/CoreDomain/ClaimsVetting/ClaimsVetting.Api/Database/ChangeScripts/20190701_dbinit.sql
UTF-8
448
3.5
4
[]
no_license
DROP TABLE IF EXISTS batches; DROP TABLE IF EXISTS batch_vetting_statuses; CREATE TABLE batch_vetting_statuses ( id INT PRIMARY KEY, name VARCHAR (200) NOT NULL ); CREATE TABLE batches ( id UUID PRIMARY KEY, batch_vetting_status_id INT NOT NULL, batch_uri VARCHAR (2000) NOT NULL, vetting_report_uri VARCHAR (200...
true
6bac53f457e040029d7535fb92228dc32476ef56
SQL
upendrabcs11/institutions
/database/procedures/location/states_get.sql
UTF-8
271
3.359375
3
[ "MIT" ]
permissive
DROP procedure IF EXISTS `states_get`; DELIMITER $$ CREATE PROCEDURE `states_get`(IN `StateId` INT) NO SQL SELECT `id` AS StateId , `name` AS StateName FROM state WHERE (`id` = `StateId` OR `StateId` = 0 OR `StateId` IS NULL) AND `status` = 1; $$ DELIMITER ;
true
2ccfc36f6a5f681a6323b560aa8d804902ff0c96
SQL
carlos-sierra/cscripts
/cs_spbl_list_all_cdb.sql
UTF-8
5,000
3.140625
3
[]
no_license
---------------------------------------------------------------------------------------- -- -- File name: cs_spbl_list_all_cdb.sql -- -- Purpose: List all SQL Plan Baselines for some SQL Text string on CDB -- -- Author: Carlos Sierra -- -- Version: 2022/12/12 -- -- Usage: Connecting into PDB. -- --...
true
37bb0c11600fbd1838644750a5f2f8b1202fb8b4
SQL
Rashgild/test-task
/src/main/resources/db/migration/V5__CreateTableUserRoles.sql
UTF-8
286
3.3125
3
[]
no_license
CREATE TABLE USER_ROLES ( id INTEGER NOT NULL GENERATED ALWAYS AS IDENTITY (START WITH 1, INCREMENT BY 1), user_id INTEGER, role_id INTEGER, CONSTRAINT role_id_ref FOREIGN KEY (role_id) REFERENCES ROLES(id), CONSTRAINT user_id_ref FOREIGN KEY (user_id) REFERENCES USERS(id));
true
ad94543b3396373c85fe96072d969a13cef64ee5
SQL
felix-ctu/Jiaowei
/doc/04编码/data/tables/map_code_master.sql
UTF-8
352
2.78125
3
[]
no_license
--DROP TABLE MAP_CODE_MASTER CASCADE CONSTRAINTS PURGE; CREATE TABLE MAP_CODE_MASTER ( CODE_CATEGORY VARCHAR2(40), CODE_SEQ VARCHAR2(40), CODE_VALUE VARCHAR2(40), CODE_DESC VARCHAR2(40), REMARKS VARCHAR2(40) ) TABLESPACE TBS_OSECDJW_RPT NOLOGGING ; COMMENT ON TABLE MAP_CODE_MASTER ...
true
1c5a75a926362426a6e13180d5c951e3562b76a3
SQL
mnudelman/perestroika_1
/utils/sqlScritts/schemeCreate.sql
UTF-8
1,606
3.65625
4
[]
no_license
--CREATE DATABASE IF NOT EXISTS perestroika ; drop table user ; CREATE TABLE IF NOT EXISTS `user` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT , `username` varchar(255) NOT NULL UNIQUE , `password` varchar(255) NOT NULL, `auth_key` varchar(255) DEFAULT NULL, role INTEGER DEFAULT 0, ip VARCHAR (255), ...
true
e4e4b5be02adce585878916e4b60b022849a57e0
SQL
miguelmanjate/sipma
/WebContent/src/main/webapp/script_db.sql
UTF-8
103,840
3.109375
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : root Source Server Version : 50513 Source Host : localhost:3306 Source Database : uemgp_db Target Server Type : MYSQL Target Server Version : 50513 File Encoding : 65001 Date: 2015-08-03 13:00:38 */ SET FOREIGN_KEY_CHECKS=0; -- -----...
true
3ea4be040a8cee389f5bc3217d7fb33eb9def421
SQL
MLClark/Bookmarks
/Vendor specific/Aetna/BAC/bac-2019-aetna-data.sql
UTF-8
9,782
3.453125
3
[]
no_license
/* emplclass = 'P' is part time emplclass = 'F' is full time */ select pi.identity::char(9) as ssn, pi.identity::varchar(10) as alternateid, pn.lname::varchar(20) as lastname, pn.fname::varchar(15) as firstname, left(pn.mname,1)::char(1) as middleinitial, pn.formofaddress as prefix, pn.title as suffix, case pv...
true
9029a117b7b2f79ed8a4219f247ac18e87252693
SQL
DenChenn/SQL-homework2
/create_table.sql
UTF-8
3,323
3.796875
4
[]
no_license
CREATE TABLE patient_info ( patient_id varchar(10) NOT NULL, sex varchar(10), age int, province varchar(20), city varchar(20), infection_case varchar(100), PRIMARY KEY (patient_id) ); LOAD DATA LOCAL INFILE './covid/patient_info.csv' INTO TABLE patient_info FIELDS TERMINATED BY ',' ENCL...
true
10114e4f535cb5182855aa32383c2880f0d933d4
SQL
yswenli/WebBaseFrameV2
/src/Web/DBScripts/分页.sql
UTF-8
396
3.25
3
[ "Apache-2.0" ]
permissive
CREATE PROCEDURE proc_getList ( @pageIndex INT , @pageSize INT , @tableName NVARCHAR(20) ) AS BEGIN EXEC('select * from (select row_number() over (order by id desc) as row, * from '+@tableName+' AS a) AS b where b.row between ((' + @pageIndex + ' - 1) * ' + @pageSize + ' + 1) and...
true
f765cc8acd1000e79c120c43e645d991780da7cb
SQL
alifahfathonah/SISHU
/sishu.sql
UTF-8
39,830
3.125
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.8.3 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Waktu pembuatan: 02 Okt 2019 pada 06.08 -- Versi server: 10.1.36-MariaDB -- Versi PHP: 7.2.10 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHAR...
true
c8fbc765c6578775db71c5540cb1380780ab0a7b
SQL
lydatequ/orpheus
/DB & Queries/QueryDB.sql
UTF-8
1,096
3.84375
4
[]
no_license
/*All User's are stored in APP_USER table*/ create table APP_USER ( id BIGINT NOT NULL AUTO_INCREMENT, sso_id VARCHAR(30) NOT NULL, password VARCHAR(100) NOT NULL, first_name VARCHAR(30) NOT NULL, last_name VARCHAR(30) NOT NULL, email VARCHAR(30) NOT NULL, state VARCHAR(30) NOT NULL, PRIMARY ...
true
dc5d8b90cd00d44d0b3b822380a13eb84edf5000
SQL
daotackidz/assignment2
/Extra_Assignment2.sql
UTF-8
4,019
3.890625
4
[]
no_license
CREATE DATABASE ThucTap; USE ThucTap; CREATE TABLE Khoa (Makhoa char(10)primary key, Tenkhoa char(30), Dienthoai char(10)); CREATE TABLE GiangVien( Magv int primary key, Hotengv char(30), Luong decimal(5,2), Makhoa char(10) references Khoa); CREATE TABLE SinhVien( Masv int primary key, Hotensv char(40), Makhoa char(10)...
true
e0cd7cf695eb0f69836e2eeb8fcb11e199be4003
SQL
NatsukiH/practice_workschoolSQL
/sql/section-4/stationery_goods.sql
UTF-8
436
2.890625
3
[]
no_license
DROP TABLE IF EXISTS stationery_goods; CREATE TABLE IF NOT EXISTS stationery_goods ( id INT, name VARCHAR(100), price INT, PRIMARY KEY (id) ); INSERT IGNORE INTO stationery_goods VALUES (1, '鉛筆(1ダース)', 1000); INSERT IGNORE INTO stationery_goods VALUES (2, '消しゴム', 120); INSERT IGNORE INTO stationery_g...
true
94071bdcedd8be7300b237c386ce5ef16f633553
SQL
keybao0863/bookreview
/create.sql
UTF-8
450
3.171875
3
[]
no_license
CREATE TABLE users( id SERIAL PRIMARY KEY, username VARCHAR NOT NULL UNIQUE, email VARCHAR NOT NULL, password VARCHAR NOT NULL ); CREATE TABLE books( id SERIAL PRIMARY KEY, isbn VARCHAR NOT NULL UNIQUE, title VARCHAR NOT NULL, author VARCHAR NOT NULL, year int ); CREATE TABLE reviews( id SERIAL PR...
true
4a9bdc9dcef2d0f6cbf5a1c2e7889d5340b1094b
SQL
edenolam/bilsoc
/sql/Procedures-stockees/flyway/sqls/R__10-apa-triggers.sql
UTF-8
1,293
3.46875
3
[]
no_license
DELIMITER $$ DROP TRIGGER IF EXISTS `bilan_social_agent_ai_row` $$ CREATE TRIGGER `bilan_social_agent_ai_row` AFTER INSERT ON `bilan_social_agent` FOR EACH ROW BEGIN # # Calcul du taux de remplissage du statut (duplication du trigger update) # END; $$ DROP TRIGGER IF EXISTS `bilan_social_agent_b...
true
31899649506d9fb95dd35c69946769c41c94a448
SQL
sandeep250320/simple
/register.sql
UTF-8
1,352
3.15625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 3.2.0.1 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Apr 20, 2021 at 01:00 PM -- Server version: 5.1.36 -- PHP Version: 5.3.0 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER...
true
87cc2b34d78d9037fe2e519415e38a802dd40dc5
SQL
AlexSmith11/uni-db
/Database/MultiCampQuery.sql
UTF-8
290
3.421875
3
[]
no_license
SELECT Timetable_Relation.moduleID FROM Timetable_Relation INNER JOIN Room_Relation ON Timetable_Relation.Room = Room_Relation.Room INNER JOIN Building_Relation ON Room_Relation.Building = Building_Relation.Building GROUP BY timetable_relation.moduleID HAVING COUNT (DISTINCT Campus) > 1
true
7f978ec4e6780a08833b47b926cb1014aed919b9
SQL
ZWP-FlyZ/travel-memories-backend
/script/db_design_v1.3.sql
UTF-8
4,934
3.625
4
[]
no_license
-- MySQL Script generated by MySQL Workbench -- Tue Dec 10 12:11:31 2019 -- Model: New Model Version: 1.3 -- 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
478cff4477c72aec1b0dce05dc00a74e1b042be2
SQL
APochiero/DatabaseCatenaRistorazione
/Trigger/ProcedimentoStep/ContrInserProc.sql
UTF-8
746
3.4375
3
[]
no_license
DROP TRIGGER IF EXISTS ControllaProcedimento1; DELIMITER $$ CREATE TRIGGER ControllaProcedimento1 BEFORE INSERT ON ProcedimentoStep FOR EACH ROW BEGIN IF (NEW.Priorita<1) THEN SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT='L attributo priorita puo assumere solo valori numerici >1 '; END IF; IF (NEW.Tempo_sec<0)THEN SI...
true
076d43c6fe3c30ab8c7e80d6d0d02e50db4e6f6a
SQL
wanghy8166/orabbix
/scnhealthcheck.sql
UTF-8
4,705
3.0625
3
[]
no_license
Rem Rem $Header: rdbms/admin/scnhealthcheck.sql mtiwary_blr_backport_13498243_11.2.0.4.0/1 2013/12/18 00:47:15 mtiwary Exp $ Rem Rem scnhealthcheck.sql Rem Rem Copyright (c) 2012, 2013, Oracle and/or its affiliates. Rem All rights reserved. Rem Rem NAME Rem scnhealthcheck.sql - Scn Health check Rem Rem DESC...
true
21589fc13b69ef06ca7b83325453abdb451bd80e
SQL
wuhudamei/crm
/src/main/resources/sql/update.sql
UTF-8
3,641
3.8125
4
[]
no_license
--美得你智装系统数据库变更记录 --说明: --(1)每次只要涉及数据库更新,都需要编写更新脚本,并记录在变更记录中 --(2)标明修改的内容和修改人、时间、脚本等信息 --日期时间 --修改人:Andy --描 述: -- 数据字典表 新增排序字段 --执行状态:已执行 ALTER TABLE crm_dictionary ADD COLUMN sort int(5) COMMENT '排序' after deleted; --日期时间 --修改人:Tony --描 述: -- 订单状态表: --执行状态: CREATE TABLE `crm_orderinfo` ( `id` int(11) NOT NULL...
true
33d8a37c33470ce7a0f2da648a54ced9ed468147
SQL
aorellanad/applied_programming
/Carpeta nueva/DB producto/Tabla producto.sql
UTF-8
1,744
3.1875
3
[]
no_license
-- -------------------------------------------------------- -- Host: 127.0.0.1 -- Versión del servidor: 10.5.4-MariaDB - mariadb.org binary distribution -- SO del servidor: Win64 -- HeidiSQL Versión: 11.0.0.5919 -- ------------------------------------------------...
true
d167cbe8e801466d2ed79b3e684f68c9b241faca
SQL
almonteb/foosbot
/db_template.sql
UTF-8
1,067
3.6875
4
[]
no_license
CREATE TABLE game ( id integer PRIMARY KEY AUTOINCREMENT NOT NULL, match_id integer NOT NULL, team1_score integer, team2_score integer, FOREIGN KEY (match_id) REFERENCES "match"(id) ); CREATE TABLE "match" ( id integer PRIMARY KEY AUTOINCREMENT NOT NULL UNIQUE, match_date...
true
877b141917a0cfc56807ff96f427427568ce1fd3
SQL
c1-ra/encheres
/SQL Database/2_Trigger pour suppression totale d'un utilisateur et des données qui s'y rapportent.sql
ISO-8859-1
682
3.796875
4
[]
no_license
/* Trigger afin de supprimer les infos lies un utilisateur quand celui-ci supprime son compte (impossible avec ON DELETE CASCADE car erreur sql de possibilit de suppression en cascade) */ /* A laisser dans un fichier sql spar (doit tre la premire excution de son fichier), excuter aprs le fichier 1 de cration des tab...
true
f017eac123e61fc14d65d8be68a3418f74fde160
SQL
grewdw/goaltracker
/persistence/src/main/resources/migration/V1_createschema.sql
UTF-8
694
3.375
3
[]
no_license
CREATE SCHEMA goaltracker; USE goaltracker; CREATE TABLE activity ( id bigint(20) auto_increment, name varchar(255), primary key (id)); CREATE TABLE activity_record ( id bigint(20) auto_increment, end datetime, start datetime, activity_id bigint(20), primary key (id)); CREATE TABLE task( id bigint...
true
4e92c69bad822817aad6ef888720ad7ec32425f9
SQL
LibertyinDeath/biyesheji
/PHP 论坛系统/bbs.sql
UTF-8
428,699
3.125
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : localhost_3306 Source Server Version : 50520 Source Host : 127.0.0.1:3306 Source Database : bbs Target Server Type : MYSQL Target Server Version : 50520 File Encoding : 65001 Date: 2017-03-21 13:39:33 */ SET FOREIGN_KEY...
true
49256a95dc8e59800f1247adfc046398be4f6801
SQL
G33kyGuy3/Study_Materials
/AND_OR_NOT_ Queries.sql
WINDOWS-1252
909
4.03125
4
[]
no_license
/* Exercise 4.1 Get a list of products with at least ten but less than twenty units in stock. Show the stock levels in your results. Filtering results on a range is just one use for AND. You can also use it to filter results on separate fields, as in the next exercises. */ SELECT ProductName, UnitsInStoc...
true
879cb469edb01002f4d6c6cd5060ba709f53ad27
SQL
CUBRID/cubrid-testcases
/sql/_01_object/_10_system_table/_004_db_attribute/cases/1013.sql
UTF-8
408
3.140625
3
[ "BSD-3-Clause" ]
permissive
-- create a class with a numeric type - (p.0) auto_increment field and retrieve info from db_attribute create class xoo ( id numeric(10,0) auto_increment , title varchar(100)); insert into xoo(title) values ('aaa'); insert into xoo(title) values ('bbb'); insert into xoo(title) values ('ccc'); select * from xoo order...
true
3dfd44fc676410b1fdf11f063c592950bb518f9a
SQL
Edwin160508/selecao-java
/edworks-api/src/main/resources/db/migration/V007__cria-tabela-usuario-permissao.sql
UTF-8
366
3.65625
4
[]
no_license
CREATE TABLE usuario_permissao( usuario_id BIGINT NOT NULL, permissao_id BIGINT NOT NULL, PRIMARY KEY(usuario_id,permissao_id) ); ALTER TABLE usuario_permissao ADD CONSTRAINT fk_usuario_id FOREIGN KEY (usuario_id) REFERENCES usuario (id); ALTER TABLE usuario_permissao ADD CONSTRAINT fk_permissao_id FOREIGN...
true
216bad71abd5c1ed8cc8153ac95505374406ec49
SQL
magosdominus/PortfolioWebsite
/Capstone System Documentation/SQL Scripts/options.sql
UTF-8
308
3.296875
3
[]
no_license
DROP TABLE IF EXISTS options; CREATE TABLE options ( optionID int(255) NOT NULL AUTO_INCREMENT, weaponID int(255) NOT NULL, description text(500) NOT NULL, price int(10), maxLimit int(2), optionType char(50), PRIMARY KEY (optionID), FOREIGN KEY (weaponID) REFERENCES weapons(weaponID) );
true
946b3c4016afa9627780688717658c865e6d8d28
SQL
Silentsoul04/ctfs
/Challenges_2020_public/web/circlespace/sql/schema.sql
UTF-8
593
2.78125
3
[]
no_license
CREATE DATABASE circlespace; USE circlespace; CREATE TABLE circle ( id INTEGER PRIMARY KEY AUTO_INCREMENT, name VARCHAR(12) NOT NULL, permalink CHAR(36) NOT NULL UNIQUE DEFAULT (UUID()) ); CREATE TABLE people ( id INTEGER PRIMARY KEY AUTO_INCREMENT, circle_id INTEGER NOT NULL REFERENCES circle(id)...
true
36c117653faaead1e080dc6bff23269da2e599f9
SQL
ric-assis/PHP
/marketing/niveis.sql
UTF-8
1,553
3.125
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.7.7 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3306 -- Generation Time: 22-Dez-2018 às 16:15 -- Versão do servidor: 10.1.31-MariaDB -- PHP Version: 7.0.26 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SE...
true
ca37fae3d7d865eb0adee81d5da557255154bb8c
SQL
xy113/pxsme
/data/backup/2011122704/jeljrb20111227_struct.sql
UTF-8
21,555
2.890625
3
[]
no_license
-- SQL Dump Program -- http://www.songdewei.com -- -- DATE : 2011-12-27 04:48:37 -- MYSQL SERVER VERSION : 5.0.18-nt -- PHP VERSION : 5.3.8 -- Author:David Song -- ---------------------------- -- Table structure for sdw_about -- ---------------------------- DROP TABLE IF EXISTS `sdw_about`; CREATE TABLE `...
true
ced396e715a04b62d1642ddc1e052e6887e26bbf
SQL
MikeKMiller/wasabi
/modules/repository-datastax/src/main/resources/com/intuit/wasabi/repository/impl/mysql/migration/V004__Create_event_action_table.sql
UTF-8
595
3.421875
3
[ "Apache-2.0" ]
permissive
CREATE TABLE `event_action` ( `user_id` varchar(48) COLLATE utf8_bin NOT NULL, `experiment_id` varbinary(16) NOT NULL, `bucket_label` varchar(64) NOT NULL, `timestamp` datetime NOT NULL, `action` varchar(64) COLLATE utf8_bin NOT NULL, KEY `user_id` (`user_id`), KEY `experiment_id` (`experiment_id`), KEY...
true
0a28b49fcd4eb2bf2069eb944af02ec719ecad80
SQL
MathieuBrung/VivonsExpo
/VivonsExpoPHP/VivonsExpo.sql
UTF-8
72,134
3.6875
4
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.3 -- https://www.phpmyadmin.net/ -- -- Hôte : 127.0.0.1 -- Généré le : mar. 18 mai 2021 à 14:36 -- Version du serveur : 10.4.14-MariaDB -- Version de PHP : 7.4.11 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SE...
true
c160347d0933baa6a3e76bdb2754d68fdc49ff05
SQL
jtopor/CUNY-MSDA-607
/Final Project/tb_db_createscript.sql
UTF-8
6,976
3.890625
4
[]
no_license
/* 607 Final Project tb database create script */ DROP SCHEMA IF EXISTS tb_prediction; CREATE SCHEMA tb_prediction; USE tb_prediction; DROP TABLE IF EXISTS tb; DROP TABLE IF EXISTS tb_rates; DROP TABLE IF EXISTS cn_lookup; DROP TABLE IF EXISTS life_exp; DROP TABLE IF EXISTS percap_hc; DROP TABLE IF EXISTS percap_gn...
true
3a5929a6f7ecd4f4ab7f1bbec9ce7fa0f3f0c5fb
SQL
GIGI123422/dss_15th
/code/04_database/20_10_20_mysql_quiz_03.sql
UTF-8
3,740
4.78125
5
[]
no_license
# Quiz 03 join & sub-query # Quiz 1/ 멕시코보다 인구가 많은 나라 이름과 인구수를 조회하시고 # 인구수 순으로 내림차순 하세요 select * from country # 멕시코 보다 인구가 많은 나라 이름 -> where 절에 sub-query select name, population from country where population > (select population from country where name = "Mexico") order by population desc # Quiz 2/ 국가별 몇개의 도시가 있는지 조...
true
800fdf1774037458342ba4d7f0e676e2d67a46d4
SQL
thewizardplusplus/wizard-blog
/docs/database.sql
UTF-8
755
3
3
[ "MIT" ]
permissive
-- for MySQL DROP TABLE IF EXISTS `blog_posts`; CREATE TABLE `blog_posts` ( `id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, `title` VARCHAR(255) NOT NULL, `text` TEXT NOT NULL, `create_time` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', `modify_time` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', ...
true
ddd22b7e39653be134ad2497f18e23130b2698a0
SQL
muskacirca/lrds-stock-manager
/install/sql/lrs-initial-schema.sql
UTF-8
16,676
3.390625
3
[]
no_license
-- MySQL Script generated by MySQL Workbench -- Sat May 14 22:15:30 2016 -- 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='TR...
true
d9d0b024aac06b4880dc9d28851e7a76a48d07b2
SQL
simon4360/DQ_APP
/configDataSets/src/main/grantPrivileges/db/g77_cfg/data/t_privs_config_cfg.sql
UTF-8
2,392
3.609375
4
[]
no_license
declare c int; target_table_name varchar2(30) := 't_privs_config'; merge_table_name varchar2(30) := target_table_name || '_cfg'; target_schema varchar2(30) := 'g77_cfg'; begin -- Tidy up and create merge table select count(*) into c from all_tables where lower(table_name) = merge_table_name ...
true
4bcd2ca4c637afec114b153c3b2ed9d03f7223a2
SQL
kartikra/scripting_projects
/bash_scripts/teradata_metadata_analysis/sql/accdba_validate_migration.sql
UTF-8
683
3.265625
3
[]
no_license
SELECT 'MISSING IN $$SOURCE' || ',' || TRIM(TableName) AS MISSING_OBJECTS FROM DBC.TablesV WHERE TRIM(DatabaseName) IN ('$$TARGET') AND TableKind IN ('T','V','P') MINUS SELECT 'MISSING IN $$SOURCE' || ',' || TRIM(TABNAME) FROM CLARITY_DBA_MAINT.MIGRATION_LIST WHERE TRIM(DBNAME)IN ('$$SOURCE') AND TRIM(TABNAME) NOT LIKE...
true
f56f2b3134e4a39ecdff4484e7d02010c5e78831
SQL
ondrejvorel/VorelData
/BI_Model_Template/Model_BI_Solution_Scripts/02.00 - Transactions - Sales - Purchases - Stock Movements/tb_TRGMDLTR_Transactions.sql
ISO-8859-7
13,930
3.53125
4
[]
no_license
DROP TABLE tb_TRGMDL_Transactions -- TRUNCATE TABLE tb_TRGMDL_Transactions /* . , , . In general when we refer to Orders we are refering to the Initial Document (Sales: Order from the Customer, Purchases: Order to the Supplier) Orders can be Invoiced through multiple Documents/Transactions and also Invoices...
true
23f3e523ee6bdef8c980c223ba9d44ef9f79fd51
SQL
asiellb/orange
/support/setup_database.sql
UTF-8
4,930
3.1875
3
[ "MIT" ]
permissive
CREATE TABLE IF NOT EXISTS `orange_migrations` ( `package` varchar(255) NOT NULL, `version` bigint(20) NOT NULL, PRIMARY KEY (`package`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; CREATE TABLE IF NOT EXISTS `orange_nav` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `created_on` datetime DEFAULT current_times...
true
22d7e43437c5c197a2b445cff44387d3762ca6b3
SQL
jasmira/Credit-Card-System
/credit-card-system/credit-card-system/src/main/resources/schema.sql
UTF-8
229
2.75
3
[]
no_license
DROP TABLE IF EXISTS CREDIT_CARD_INFO; CREATE TABLE CREDIT_CARD_INFO ( ID BIGINT AUTO_INCREMENT PRIMARY KEY, NAME VARCHAR(50) NOT NULL, CARD_NUMBER BIGINT NOT NULL, LIMITS BIGINT NOT NULL, BALANCE DOUBLE NOT NULL );
true
bdca94532fca6c33e9b798eafd0eb444230965d0
SQL
DhavalHingu/RC-Hostel
/HMS/database/hms.sql/hms.sql
UTF-8
2,254
3.25
3
[]
no_license
-- -- Database: `hms` -- -- -------------------------------------------------------- -- -- Table structure for table `block_master` -- CREATE TABLE `block_master` ( `block_no` int(2) NOT NULL, `block_name` varchar(10) NOT NULL, `email_id` varchar(30) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------...
true
9d05b7fc43e67f0711abe25cc51eb89a22dc6ffc
SQL
GyarmatiAdam/FSWD70-Adam-Gyarmati-CodeReview09
/cr09_adam_gyarmati-carrental.sql
UTF-8
14,352
3.140625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jul 06, 2019 at 08:34 AM -- Server version: 10.1.39-MariaDB -- PHP Version: 7.3.5 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
true
212182862e2164d1f5aadc4b0ef6e91357afa7d6
SQL
LegilsonBrito/uninove
/programacao-web/aula-11/script-banco.sql
UTF-8
1,139
4.09375
4
[]
no_license
CREATE database acessos; USE acessos; CREATE TABLE perfil ( id INT AUTO_INCREMENT PRIMARY KEY, tipo VARCHAR(20), descricao VARCHAR(50) ); CREATE TABLE usuario ( id INT AUTO_INCREMENT PRIMARY KEY, nome VARCHAR(50), sobrenome VARCHAR(50), idade INT, estado VARCHAR(2), fk_perfil INT, FOREIGN KEY (fk_...
true
5ff711dc4699ca4fe99bc0230314fd0882919e96
SQL
supqr/supQR.
/Backend/src/main/resources/db/migration/V001__initial_setup.sql
UTF-8
1,765
3.9375
4
[]
no_license
CREATE TABLE user ( user_id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, username varchar(255) NOT NULL UNIQUE, firstName varchar(255) NOT NULL, lastName varchar(255) NOT NULL, email varchar(255) NOT NULL, password varchar(255) NOT NULL, locked bo...
true
45c80d17b0f473d6fb6a05731a64b7b58b1007aa
SQL
VetalBeliy/codeigniter-register-login
/dump.sql
UTF-8
8,779
2.84375
3
[]
no_license
-- Valentina Studio -- -- MySQL dump -- -- --------------------------------------------------------- /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40014 SET @OLD...
true
1efad759f4f044ed2c7d1ffc36e6324d7f627b7e
SQL
vlpltd/loanapp
/dbscripts/mfexpert.sql
UTF-8
2,794
3.625
4
[]
no_license
-- Table: public.address -- DROP TABLE public.address; CREATE TABLE public.address ( "ID" integer NOT NULL, line_1 text COLLATE pg_catalog."default", line_2 text COLLATE pg_catalog."default", state text COLLATE pg_catalog."default", city text COLLATE pg_catalog."default", country text COLLATE ...
true
79092e61fef22e6508db973f4aaaf7dd5b7e6c12
SQL
Montigomo/Sql-Ex-Quests
/01. Stage DML Study/a.120.sql
UTF-8
2,636
4.1875
4
[]
no_license
 -- Для авиакомпаний, самолеты которой выполнили хотя бы один рейс, вычислить с точностью до двух десятичных знаков -- средние величины времени нахождения самолетов в воздухе (в минутах). Также рассчитать указанные характеристики -- по всем летавшим самолетам (использовать слово 'TOTAL'). -- Вывод: компания, среднее...
true
d025183dd63eea06cf4089e819cc087760c15956
SQL
Hunter3787/Saturday-Solution
/Documents/Supplementary Materials/SQL Queries for RDB Diagram/autobuildDB_P2.sql
UTF-8
4,414
3.984375
4
[]
no_license
USE AutoBuildDB_P2; DROP TABLE IF EXISTS posts; DROP TABLE IF EXISTS logs; DROP TABLE IF EXISTS sess; DROP TABLE IF EXISTS shelves; DROP TABLE IF EXISTS uploadedImages; DROP TABLE IF EXISTS publishedbuilds; DROP TABLE IF EXISTS pcBuilds; DROP TABLE IF EXISTS userAccounts; -- a following schema of Logs and Sessions:...
true
ed075e4b296092e9c179e3307819109518b54f03
SQL
1922057635/carProj
/res/create.sql
UTF-8
1,876
3.203125
3
[]
no_license
CREATE TABLE brand( brandId INT NOT NULL PRIMARY KEY, --品牌id brandName VARCHAR2(30) --品牌名字 ); CREATE TABLE carmodal( modelId INT NOT NULL PRIMARY KEY,--汽车型号id modalName VARCHAR2(30) NOT NULL ,--型号名 brandId INT , --品牌名 FOREIGN KEY (brandId) REFERENC...
true
2f1b940a6349a80587229b8bb7ee634e237be3a8
SQL
konradw98/private-g01
/src/test/sql/createSchema.sql
UTF-8
767
3.71875
4
[]
no_license
drop table if exists activities; drop table if exists sports; drop table if exists users; drop table if exists routes; CREATE TABLE sports ( sid SERIAL UNIQUE, name VARCHAR(50) NOT NULL, description VARCHAR(255) NOT NULL ); CREATE TABLE users( uid SERIAL UNIQUE, email VARCHAR(50) UNIQUE NOT NULL,...
true
4e4b14e3a9b4e6e3606e1ab2d15248b2490d8bb4
SQL
ap-craft/lovelife_job
/app/plugins/blog/install.sql
UTF-8
1,949
3.375
3
[]
no_license
DROP TABLE IF EXISTS `articles`; CREATE TABLE `articles` ( `id` int(11) NOT NULL auto_increment, `url` text NOT NULL, `title` text NOT NULL, `content` text NOT NULL, `is_published` int(11) NOT NULL, `category_id` int(11) NOT NULL, `type` int(11) NOT NULL, `showed` int(11) NOT NULL, `modified...
true
aa7cd1ab6bb3676a906484249b079d1bd67b70a4
SQL
JordanMRabideau/games
/db/schema.sql
UTF-8
185
3.03125
3
[]
no_license
CREATE DATABASE games_db; use games_db; CREATE TABLE games ( id INT AUTO_INCREMENT, game_name VARCHAR(100) NOT NULL, played BOOLEAN DEFAULT false, PRIMARY KEY (id) );
true
f76f81b8a5a3cce968f0e41d69854f309935102b
SQL
TheMightyPenguin/UC-CS
/Bases-de-Datos/Talleres/retrigger/insert.sql
UTF-8
1,017
3.546875
4
[]
no_license
DELETE FROM t.Secundaria; DELETE FROM t.Principal; INSERT INTO t.Principal VALUES (1); INSERT INTO t.Principal VALUES (3); INSERT INTO t.Principal VALUES (2); INSERT INTO t.Secundaria VALUES(1,4); --Este deberia arrojar error porque el 4 no existe en la tabla Principal INSERT INTO t.Secundaria VALUES(1,2); INSERT ...
true
a5cdd810821aaf782b704912a3bf1ce1138a7c61
SQL
zitadel/zitadel
/cmd/setup/11/postgres/create_index.sql
UTF-8
132
2.625
3
[ "Apache-2.0", "LicenseRef-scancode-warranty-disclaimer" ]
permissive
CREATE INDEX IF NOT EXISTS ca_fill_idx ON eventstore.events ( event_sequence DESC , instance_id ) WHERE created_at IS NULL;
true
7799e36ffa2cc81c4885b7b972e56ec87ada587d
SQL
SA-Inc/SQL-EX-ru-Notes-and-Solutions
/53.sql
UTF-8
206
3.0625
3
[]
no_license
-- With a precision of two decimal places, determine the average number of guns for the battleship classes. SELECT CAST(AVG(numGuns * 1.0) AS NUMERIC(6, 2)) AS 'Avg-numGuns' FROM Classes WHERE type = 'bb'
true
919fc5a3878f80bbf396671a8b8f2042d8262683
SQL
fountainhead-gq/ArticleCatalog
/DB/oracle/session&lock.sql
UTF-8
2,258
3.75
4
[]
no_license
SELECT s.username, decode(l.type,'TM','TABLE LOCK', 'TX','ROW LOCK', NULL) LOCK_LEVEL, o.owner,o.object_name,o.object_type, s.sid,s.serial#,s.terminal,s.machine,s.program,s.osuser FROM v$session s,v$lock l,dba_objects o WHERE l.sid = s.sid AND l.id1 = o.object_id(+) AND s.username is NOT Null SELECT object_name, mac...
true
f298e396c05634842df3da33432f594033fdc4ed
SQL
GUSAR1T0/CarWashSystem
/Server/Database/Scripts/CarWashManagement/AlterCompanyTableDropColumn.sql
UTF-8
208
2.59375
3
[ "MIT" ]
permissive
IF EXISTS ( SELECT 1 FROM sys.columns WHERE Name = N'Phone' AND Object_ID = Object_ID(N'company.Company') ) BEGIN ALTER TABLE [company].[Company] DROP COLUMN [Phone]; END
true
77ea593adf1fd55d5cca9118ca87812e8c6183a3
SQL
ToborTheGreat/Repository01
/toolkit.dim_assembly_children.sql
UTF-8
1,244
2.859375
3
[]
no_license
-- -- PostgreSQL database dump -- SET statement_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings = off; SET check_function_bodies = false; SET client_min_messages = warning; SET escape_string_warning = off; SET search_path = toolkit, pg_catalog; ALTER TABLE ONLY toolkit.dim_assembly_childre...
true
ae3c235e1cd246a01b38553efc2854dbdaaf3437
SQL
mh7649/CLLXYZ_SSH
/documents/DemandDocument/d_CLLXYZ.sql
UTF-8
18,200
3.34375
3
[]
no_license
create database if not exists d_cllxyz default charset utf8 collate utf8_general_ci; use d_cllxyz; -- 删除数据表 drop table if exists t_role_permission; drop table if exists t_permission; drop table if exists t_ads; drop table if exists t_article; drop table if exists t_article_type; drop table if exists t_admin; drop tab...
true
9d84d52ac3b8a8b91e54924ffb2f78c38a999416
SQL
NoNeedNoMore/colorcover
/lib/sql/init.sql
UTF-8
3,189
3.875
4
[]
no_license
Drop Schema If Exists colorcover Cascade; Create Schema colorcover; Create Table colorcover.sessions( id text Primary Key, dateCreate timestamp Default now(), session json ); Create Table colorcover.users( id serial Primary Key, dateCreate timestamp Default now(), dateUpdate timestamp Default now(), us...
true
0aab1d903a0b23e41f7313b0f016d61361bff9ed
SQL
radtek/Oracle_Troubleshoot
/whodoingwhat.sql
UTF-8
1,283
3.59375
4
[]
no_license
set echo off col username for a18 col program for a45 select s.sid, substr(s.username,1,18) username, -- P.SPID, s.osuser as osuser, substr(s.program,1,45) program, decode(s.command , 1,'Create table' , 2,'Insert' , 3,'Select' , 6,'Update' , 7,'Delete' , 9,'Create index' , 10,'Drop ind...
true
e2b9fe27569345e1defa7c679d6f8b7d42c49cea
SQL
lysms/LingoLand
/fullDBSetup.sql
UTF-8
3,498
3.421875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Nov 23, 2020 at 04:06 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
87005837984926550ef98b1100d5f41463bae69d
SQL
efraindrummer/sql___databases
/proyectoxx_old.sql
UTF-8
8,013
3.078125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.6.5.2 -- https://www.phpmyadmin.net/ -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 29-10-2019 a las 21:48:59 -- Versión del servidor: 10.1.21-MariaDB -- Versión de PHP: 5.6.30 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CL...
true
19ec23c05b1fede24f089d95e743922a0aa1f7d1
SQL
raiden-network/raiden-services
/src/pathfinding_service/schema.sql
UTF-8
2,967
3.625
4
[ "MIT" ]
permissive
CREATE TABLE blockchain ( chain_id INTEGER, receiver CHAR(42), token_network_registry_address CHAR(42), latest_committed_block INT, user_deposit_contract_address CHAR(42) ); INSERT INTO blockchain DEFAULT VALUES; CREATE TABLE token_network (...
true
d3f84d9fcfa090a86cf39fc73eb379f837dcd76d
SQL
JKolodziejczyk/SQL_szkola
/kwerendy/triggery/srednia_ocen.sql
UTF-8
320
3.09375
3
[]
no_license
CREATE TRIGGER srednia_ocen ON Oceny AFTER INSERT AS BEGIN SELECT AVG(O.Ocena) AS [Średnia ocen], O.IDUcznia FROM Oceny AS O GROUP BY O.IDUcznia END --przykładowe dodanie oceny, zmieniające średnią INSERT INTO [Oceny] (IDUcznia, Ocena, IDPrzedmiotu, IDNauczyciela, Data) VALUES (1, 1, 2, 4, GETDATE())
true
0db6a3fab614f500c4f4411f94b89c58db74ca9d
SQL
Zeyuuuuuu/UCI-MSWE-FALL2019
/243P/mysql/ex_solutions/ch06/ex6-08.sql
UTF-8
325
3.171875
3
[]
no_license
SELECT IF(GROUPING(terms_id) = 1, 'Grand Totals', terms_id) AS terms_id, IF(GROUPING(vendor_id) = 1, 'Terms ID Totals', vendor_id) AS vendor_id, MAX(payment_date) AS max_payment_date, SUM(invoice_total - credit_total - payment_total) AS balance_due FROM invoices GROUP BY terms_id, vendor_id WITH RO...
true
15d6a3ebe4efafc2eb798ced8262e6a9a85cce6d
SQL
danilodesouzapereira/plataformasinap_exportaopendss
/Fontes/BD/Rede/BaseAccess/Consultas/SPSNP_rdRRCarga.sql
UTF-8
3,016
3.21875
3
[]
no_license
SELECT Equipamento.strCodigo AS Codigo, Equipamento.strExtId AS ExtId, Equipamento.intShow AS Show, IIF(ISNULL(Equipamento.intDxComentario), -1...
true
faa8934b844afdef0b54fa32e91b340e635483be
SQL
scratchstudio/toby-spring
/src/main/resources/ddl-for-mysql.sql
UTF-8
408
2.5625
3
[]
no_license
DROP TABLE IF EXISTS SQLMAP; CREATE TABLE IF NOT EXISTS SQLMAP ( KEY_ VARCHAR(100) PRIMARY KEY, SQL_ VARCHAR(100) NOT NULL ); DROP TABLE IF EXISTS USERS; CREATE TABLE IF NOT EXISTS USERS ( id varchar(10) primary key, name varchar(20) not null, password varchar(20) not null, email varchar(20) not...
true
78c9a633558d7f92e7196088d19cf70db6cd4965
SQL
Matl2018/SQL
/hotel.sql
UTF-8
1,233
3.4375
3
[]
no_license
drop table customers; drop table invoices; create table customers ( title varchar, firstname varchar, surname varchar, email varchar ); insert into customers (title, firstname, surname, email) values ('Mr', 'Donald', 'Trump', "donald.trump@whitehouse.gov"); insert into custo...
true