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
e62c81047cb0fe587e04c0ee4f37dd41bd43401d
SQL
breal5000/bamazon_CLI
/bamazon.sql
UTF-8
1,610
3.0625
3
[]
no_license
DROP DATABASE IF EXISTS bamazon_DB; CREATE DATABASE bamazon_DB; USE bamazon_DB; CREATE TABLE products( item_id INT NOT NULL, product_name VARCHAR(100) NOT NULL, department VARCHAR(45) NOT NULL, price INT default 0, stock INT default 10, PRIMARY KEY (item_id) ); INSERT INTO products (item_id, product_name,...
true
b78afd2e5f71db86cea04727649b34a74a6b27c7
SQL
HRR43TeamHan-SDC/reviews
/database/postgreSQL/schema.sql
UTF-8
1,059
3.421875
3
[]
no_license
-- Table: public.reviews DROP TABLE reviews; CREATE TABLE reviews ( review_id integer NOT NULL, restaurant_id integer, first_name character varying COLLATE pg_catalog."default", last_name character varying COLLATE pg_catalog."default", city character varying COLLATE pg_catalog."default", num_r...
true
f4b6909209da7abd5c8aca45eb16318c2aeaf8f1
SQL
vhorta73/RecipeApp
/src/sql_schema/ingredients.sql
UTF-8
1,625
3.453125
3
[]
no_license
/** * ========================== WARNING ============================ * THIS SCRIPT WILL ERASE ALL DATA FROM rfact_wh * AND WILL RESTORE DATABASE TO DEFAULT STARTUP STATE * =============================================================== **/ CREATE DATABASE temporary_database_recipe; USE te...
true
88148174dac402e000f2dd65efe6cc530926d83a
SQL
nishapkrishna/MySql
/hideseek.sql
UTF-8
598
3.15625
3
[]
no_license
SELECT * FROM miscellaneous_db.wordassociation_bc; select *from wordassociation_bc where source = "BC"; select *from wordassociation_cc where source = "CC"; select *from wordassociation_cc where word1 = "pie" or word2 = "pie"; select min(author) from wordassociation_bc; select max(author) from wordassociation_bc; s...
true
3550f87a8c20890c65583f4da856718165a67d28
SQL
ShadowKilerd/spring-mall
/src/main/resources/db/migration/V0003__create_cart_table.sql
UTF-8
141
2.890625
3
[]
no_license
CREATE TABLE cart ( id int PRIMARY KEY AUTO_INCREMENT, product_id int, quantity int ); CREATE UNIQUE INDEX cart_id_uindex ON cart (id);
true
2dbab362befea4ac0a5bc437b64916c7647b7338
SQL
donce/university
/db/second/queries/createTable.sql
UTF-8
1,480
3.734375
4
[]
no_license
CREATE TABLE Component ( ID SERIAL PRIMARY KEY, Title VARCHAR(30) NOT NULL, Manufacturer VARCHAR(30), Price NUMERIC(10, 2) NOT NULL DEFAULT 0.00 CHECK (Price >= 0.00) ); CREATE TABLE Computer ( ID SERIAL PRIMARY KEY, Title VARCHAR(100) NOT NULL, ...
true
4f0b311dff69e6f47b5a0d1a4149270b25831f3f
SQL
Haileyhm/Python_git
/Oracle/sql 파일/0409 무결성 제약조건.sql
UHC
2,053
4
4
[]
no_license
CREATE TABLE KOPO_EVENT_INFO_FOREIGN ( EVENTID VARCHAR2(20), EVENTPERIOD VARCHAR2(20), PROMOTION_RATIO NUMBER, CONSTRAINT PK_KOPO_EVENT_INFO_FOREIGN PRIMARY KEY (EVENTID)); CREATE TABLE KOPO_PRODUCT_VOLUME_FOREIGN( REGIONID VARCHAR2(20), PRODUCTGROUP VARCHAR2(20), YEARWEEK VARCHAR2(8), VOLUME NUMBER NOT NULL, EVENTID...
true
c9d9f49d8e4f92ce4d6f64d12a914e7fc122e905
SQL
fordfrog/apgdiff
/src/test/resources/cz/startnet/utils/pgdiff/loader/schema_18.sql
UTF-8
1,182
2.921875
3
[ "MIT" ]
permissive
-- -- PostgreSQL database dump -- -- Dumped from database version 9.5.13 -- Dumped by pg_dump version 9.5.13 SET statement_timeout = 0; SET lock_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings = on; SELECT pg_catalog.set_config('search_path', '', false); SET check_function_bodies = false; S...
true
2cd10ba8fccca08d55e3e4d35bca5af58275cb88
SQL
bmlam/plsqlToolbox
/anonym_plsql--print_table.sql
WINDOWS-1250
4,764
3.453125
3
[]
no_license
REM REM This script outputs the result of a query in text-display-friendly format, i.e. one or multiple lines per column REM It is based on the PRINT_TABLE procedure which used to be available at asktom.com REM SET SERVEROUT ON SET SCAN ON VERIFY OFF DECLARE p_query CONSTANT LONG := q'[&input_qu...
true
1ef30a8148e384224acd9631adecad40e4ea1ff7
SQL
jrjr-randy/backoffice
/sql/build_new_db/prometheus_tables/partial_shipment_products.table.sql
UTF-8
1,051
3.625
4
[]
no_license
DROP PROCEDURE IF EXISTS table_create_prometheus_partial_shipment_products; DELIMITER // CREATE PROCEDURE table_create_prometheus_partial_shipment_products() BEGIN IF NOT EXISTS ( SELECT DISTINCT 1 FROM `information_schema`.`TABLES` WHERE `TABLE_SCHEMA` = DATABASE() AND `TABLE_NAME` = 'partial_shipment_products'...
true
2e33d88557a3e0f831d18dcde3e27ae27ae26d7d
SQL
luoyanghua/word
/初始化脚本/Resource/00 Index_Resource.sql
UTF-8
9,082
2.890625
3
[]
no_license
/*==============================================================*/ /* DBMS name: MySQL 5.0 */ /* Created on: 2017/10/10 14:59:01 */ /*==============================================================*/ /*================================================...
true
2fc2e9744bcbe7f28451819d089b8bf5e572cff7
SQL
jasonjabbour/caregiver_recomm
/table_structures/ema_storing_data.sql
UTF-8
1,495
2.953125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.1.14 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Mar 01, 2022 at 11:13 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
f3245e6d05b38c60c4106984de411e3c77fe9cc8
SQL
malashkovv/powerlifting-olap-project
/ddl.sql
UTF-8
4,499
3.484375
3
[ "MIT" ]
permissive
CREATE DATABASE warehouse; USE warehouse; CREATE SCHEMA eds; CREATE SCHEMA stg; CREATE SCHEMA adm; DROP TABLE IF EXISTS adm.d_equipment; CREATE TABLE adm.d_equipment ( equipment_pk INT NOT NULL IDENTITY, equipment_name VARCHAR(50) NOT NULL, CONSTRAINT equipment_pk PRIMARY KEY NONCLUSTERED (...
true
1fda28886ae198e48f08421ea51b75f281a82893
SQL
HackCamp-28/hack-repository
/sql_scripts/fetch_pitches_all.sql
UTF-8
220
3.390625
3
[]
no_license
/* Returns all pitches from all Users. Sorts by most recent first. */ SELECT * FROM Pitches LEFT JOIN Tags ON Pitches.pitchID = Tags.pitchID LEFT JOIN Categories ON Tags.catID = Categories.catID ORDER BY lastUpdate DESC;
true
d5b59cd8a5c25fc3c78741ae501ec399df3cd198
SQL
anthueeccel/HBSIS-treinamento
/Aula16_SQL_2019-09-30/SQL-scripts/SistemaLocacaoVeiculos.sql
UTF-8
1,191
3.03125
3
[]
no_license
--create table Usuarios( --Id int not null primary key identity(1,1), --Nome nchar(100), --Login nchar(50), --Senha nchar(50), --Ativo bit default 1, --UsuarioCriacao int default 0, --UsuarioAlteracao int default 0, --DataCriacao datetime default GETDATE(), --DataAlteracao datetime default GETDATE() --) --go --crea...
true
b6c8a588b9551ce825c2ef1f71ca91683bb4db05
SQL
KarenBrissow/Aprendendo
/Banco de Dados/Arquivos - Aula 4/Alterando dados usando FROM.sql
UTF-8
1,541
3.5625
4
[ "MIT" ]
permissive
SELECT * FROM TABELA_DE_VENDEDORES; SELECT * FROM VENDEDORES; UPDATE TABELA_DE_VENDEDORES SET DE_FERIAS = 0 WHERE MATRICULA IN ('00236','00237'); UPDATE TABELA_DE_VENDEDORES SET DE_FERIAS = 1 WHERE MATRICULA IN ('00235','00238'); SELECT A.MATRICULA, B.MATRICULA, A.NOME, A.FERIAS, B.DE_FERIAS FROM VENDEDORES A INNE...
true
093fb97749fd261f2533094c29c95e2c55d73dbc
SQL
AudreyNogueira/EntregaReact
/backend/fseletro.sql
UTF-8
6,657
2.984375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.3 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Tempo de geração: 16-Dez-2020 às 23:29 -- Versão do servidor: 10.4.14-MariaDB -- versão do PHP: 7.4.11 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_C...
true
dbee1b3a17b8a3d98681c9a5ad76e61efb77b48b
SQL
IsaaCurvelo/produtos-service
/src/main/resources/db/migration/V1__create-filial-produto-estoque-tables.sql
UTF-8
1,011
3.984375
4
[]
no_license
create table filial ( id BIGINT not null auto_increment, nome varchar(45) not null, primary key (id) ) engine=InnoDB default charset=utf8; create table produto ( id BIGINT not null auto_increment, nome varchar(45) not null, preco decimal(10,2) not null, primary key (id) ) engine=InnoDB default charset=utf8; ...
true
f36aa58a1db7376bc01d6134b3f7d11280891ac7
SQL
cityofaustin/atd-vz-data
/atd-vzd/schema/atd_txdot_change_log.sql
UTF-8
3,375
2.8125
3
[ "CC0-1.0", "LicenseRef-scancode-public-domain" ]
permissive
-- -- PostgreSQL database dump -- -- Dumped from database version 10.6 -- Dumped by pg_dump version 10.10 -- Started on 2019-10-15 13:59:54 CDT SET statement_timeout = 0; SET lock_timeout = 0; SET idle_in_transaction_session_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings = on; SELECT pg_c...
true
379b3fcc9067acf288bca5c8f95d751cee9d069c
SQL
Sijtech/STFW
/SQL/PersistentStoredModules/Funktion_Differenz_in_Jahren.sql
UTF-8
1,046
3.765625
4
[]
no_license
-- -- Funktion zum Berechnen der Differenz in Jahren von -- zwei übergebenen Datumsfeldern. -- -- Die Funktion kontrolliert selber, welches Datum das -- aktuellere ist und berechnet entsprechend korrekt -- die Differenz. -- DELIMITER // DROP FUNCTION IF EXISTS funktion_differenz_in_jahren // CREATE FUNCTION funkt...
true
fbeb6f5a186af4124ce91f7e27502fc4bb2bd906
SQL
EarlyMay/ImportAndExport
/staff/staff.sql
UTF-8
1,717
3.328125
3
[]
no_license
-- -------------------------------------------------------- -- 主机: 127.0.0.1 -- 服务器版本: 10.3.9-MariaDB - mariadb.org binary distribution -- 服务器操作系统: Win64 -- HeidiSQL 版本: 9.4.0.5125 -- -------------------------------------------------...
true
6e527220c3e3b7850007edfcc9581f55df8a9792
SQL
manu-austin/MySQL_Employee_Tracker
/db/seeds.sql
UTF-8
896
3.453125
3
[ "MIT" ]
permissive
USE employee_tracker_db; INSERT INTO department (name) VALUES ('Production'), ('Sales'), ('R&D'), ('Accounting'), ('HR'); INSERT INTO role (title, salary, department_id) VALUES ('Production Associate', 60000, 1), ('Head of Production', 120000, 1), ('Sales Associate', 70000, 2), ('Sales Manager', 150000, 2), ('...
true
ac9ce6c3c7bc113b2c48e6d1d4aa185cbf811921
SQL
mysql-oracle/Mastering-Oracle-SQL-and-SQLPlus
/chapter07/07-06.sql
UTF-8
713
2.921875
3
[]
no_license
create table departments ( deptno NUMBER(2) constraint D_PK primary key constraint D_DEPTNO_CHK check (mod(deptno,10) = 0) , dname VARCHAR2(10) constraint D_DNAME_NN not null constraint D_DNAME_UN ...
true
f805f7cb88de728590534c56ce5a6289416ab3a2
SQL
moeabdol/bookstore-api-golang
/db/migrations/000003_add_users_table.up.sql
UTF-8
328
3.203125
3
[]
no_license
CREATE TABLE "users" ( "id" bigserial PRIMARY KEY, "username" varchar NOT NULL, "password" varchar NOT NULL, "email" varchar UNIQUE NOT NULL, "created_at" timestamptz NOT NULL DEFAULT now(), "updated_at" timestamptz NOT NULL DEFAULT now() ); CREATE INDEX ON "users" ("username"); CREATE INDEX ON "users" ("e...
true
033812e71038fff44bb7a24f14b7e47a0c2f3261
SQL
shuhrat-shokirov/McDonalds
/data.sql
UTF-8
785
2.96875
3
[]
no_license
INSERT INTO managers VALUES (1, 'Vasya', 'vasya', 100000, 0, NULL, null), (2, 'Petya', 'petya', 90000, 90000, 1, 'boys'), (3, 'Vanya', 'vanya', 80000, 80000, 2, 'boys'), (4, 'Masha', 'masha', 80000, 80000, 1, 'girls'), (5, 'Dasha', 'dasha', 60000, 60000, 4, 'girls'), (6, 'Sasha', 'sas...
true
bc3e8d3bfde00a4b9ef7c57577d3df137efa2e4f
SQL
umindow/finance
/db/finance_schedule_status.sql
UTF-8
1,138
3.140625
3
[ "Apache-2.0" ]
permissive
/* Navicat Premium Data Transfer Source Server : localhost Source Server Type : MySQL Source Server Version : 50719 Source Host : localhost Source Database : finance Target Server Type : MySQL Target Server Version : 50719 File Encoding : utf-8 Date: 02/02/2018 20:18:5...
true
96e5112abd42814bb7b4a45733024e6a97e1aeba
SQL
jeromericks/Database_Exercises
/albums_migration.sql
UTF-8
287
2.921875
3
[]
no_license
USE codeup_test_db; DROP TABLE IF EXISTS albums; CREATE TABLE albums( id INT UNSIGNED NOT NULL AUTO_INCREMENT, artist VARCHAR(100) NOT NULL, name VARCHAR(100) NOT NULL, release_date YEAR(4) NOT NULL, sales DECIMAL(10,2) NULL, genre VARCHAR(100) DEFAULT NULL, PRIMARY KEY (id) );
true
6701d6d5f95b7fcf0742d95fd15f548bbf109614
SQL
sergiosorias/terminalzero
/TerminalZero/DataBase/TZero_Config/Schema Objects/Schemas/data/Tables/Keys/SalePaymentItem.FK_SalePaymentItem_PaymentInstrument.fkey.sql
UTF-8
179
2.515625
3
[]
no_license
ALTER TABLE [data].[SalePaymentItem] ADD CONSTRAINT [FK_StockHeader_PaymentInstrument] FOREIGN KEY (PaymentInstrumentCode) REFERENCES [data].PaymentInstrument (Code)
true
d9c0e3394faef8afffee855d325f556939a9c31c
SQL
lty0912/SQL
/practice_subquery1.sql
UTF-8
1,235
4.5
4
[]
no_license
SELECT first_name, salary FROM EMPLOYEES WHERE salary > (SELECT salary FROM EMPLOYEES WHERE first_name = 'Jack'); --연습1 SELECT MIN(salary) FROM EMPLOYEES; SELECT first_name, salary FROM EMPLOYEES WHERE salary = (SELECT MIN(salary) FROM EMPLOYEES); SELECT AVG(salary) FROM EMPLOYEES; SELECT first_name, salary FR...
true
204ffbf855bc8ab3036a078fb0b0b92e24cfeaf4
SQL
Eva1009/fund
/parts/e_fund_control.sql
UTF-8
1,763
3.21875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- 主機: localhost -- 產生時間: 2020 年 09 月 07 日 22:15 -- 伺服器版本: 10.4.14-MariaDB -- PHP 版本: 7.3.21 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;...
true
b4b7eaa852d25d0d6d9cda09b7961d7d48a1960d
SQL
DarcyIW/flask-backend
/info/attackflow.sql
UTF-8
11,508
2.9375
3
[]
no_license
-- MySQL dump 10.13 Distrib 5.7.21, for Linux (x86_64) -- -- Host: localhost Database: attack_flow -- ------------------------------------------------------ -- Server version 5.7.21-0ubuntu0.16.04.1 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTE...
true
c3464fd0ace43cadf63f133a71b56f9da6be9e5a
SQL
CUBRID/cubrid-testcases
/sql/_34_fig/cbrd_24537/cases/cbrd_24537.sql
UTF-8
529
3.40625
3
[ "BSD-3-Clause" ]
permissive
-- This is a test case to verify the CBRD-24537 issue. -- When performing a NOT MATCHED check, use the NOT EXISTS query instead of the COUNT query. drop table if exists src; drop table if exists tt; create table src (s int); create table tt (t int, str varchar); insert into src values (1), (2), (3); --@queryplan mer...
true
065d550d6c1a3d9bd6087b02d2a2cb2ce1d3622b
SQL
dreampyb/DataBase
/5.DataBase/4.SQL활용/Oracle/ParkPC_3.sql
UHC
5,201
4.375
4
[]
no_license
-- <SubQuery -From > select *from student; -- л 庸 ū л й, ̸, ˻. --1. л --2. 庸 ū л й ̸, , ˻. select STU_HEIGHT from student where stu_name=''; select *from student where STU_HEIGHT>'172'; select * from student where STU_HEIGHT > (select STU_HEIGHT from student where stu_name=''); -- ̴ ƷͰ . select b...
true
adee88bfe09baeb1fccc30fdeb5ac1566e3f0052
SQL
cvera81/NinakServer
/dataBase/ninak_DER.sql
UTF-8
3,972
3.484375
3
[]
no_license
-- MySQL Script generated by MySQL Workbench -- Mon Aug 3 22:55:31 2020 -- 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
c065cf78ee64df05a1812137a4c6efead9eb9a38
SQL
Aaron-Usher/Capstone-2017
/SnackOverFlowDB/Old Stuff/Scripts/Employee/sp_retrieve_employee_from_search.prc
UTF-8
930
3.5625
4
[]
no_license
USE [SnackOverflowDB] GO IF EXISTS(SELECT * FROM sys.objects WHERE type = 'P' AND name = 'sp_retrieve_employee_from_search') BEGIN Drop PROCEDURE sp_retrieve_employee_from_search Print '' print ' *** dropping procedure sp_retrieve_employee_from_search' End GO Print '' print ' *** creating procedure sp_retrieve_empl...
true
134da7100879a28ca7d3dd026fc83e7a3abc7c55
SQL
dkdud8140/ADayMind
/xxxxxxxxxxx/aDayMind - mindUser - 21-07-07-001.sql
UTF-8
2,873
3.78125
4
[]
no_license
USE adaymind; CREATE TABLE tbl_user ( u_seq BIGINT auto_increment PRIMARY KEY, u_prof BIGINT, u_id VARCHAR(125) NOT NULL UNIQUE, u_pw VARCHAR(125) NOT NULL, u_nick VARCHAR(125) NOT NULL UNIQUE, u_mail VARCHAR(125) NOT NULL UNIQUE, u_warning INT ); SELECT * FROM tbl_user; DELETE FROM tbl_user WHERE u_se...
true
45bc171afd1fcd3dda3b58626e4c446c76da63d6
SQL
osobolev/sqlg2
/doc/examples/schema_derby.sql
UTF-8
347
2.875
3
[]
no_license
CREATE SEQUENCE EMP_SEQ INCREMENT BY 1 START WITH 10; CREATE TABLE EMP ( EMP_NO INT NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 10), EMP_NAME VARCHAR(10) NOT NULL, JOB VARCHAR(9), MGR INT, HIRE_DATE DATE ); INSERT INTO EMP (EMP_NO, EMP_NAME, JOB, HIRE_DATE) VALUES (1, 'SCOTT',...
true
ea91a207036e109585925ddea0099ca23c6a0fec
SQL
google/perfetto
/src/trace_processor/metrics/sql/chrome/scroll_jank.sql
UTF-8
1,384
2.71875
3
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
-- -- Copyright 2020 The Android Open Source Project -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- https://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applica...
true
f3a9864f619b0e48b8286284a214ced7d1d5e631
SQL
dohernandez/market-manager
/resources/migrations/12_wallet_bank_account.up.sql
UTF-8
207
2.9375
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
-- wallet_bank_account Table CREATE TABLE wallet_bank_account ( wallet_id UUID REFERENCES wallet(id), bank_account_id UUID REFERENCES bank_account(id), PRIMARY KEY(wallet_id, bank_account_id) );
true
f7bb15b55af823b28f5583785bb059f7938768ab
SQL
pmelgren/IntrinsicPitchValue
/queries/pitch_value.sql
UTF-8
1,952
3.71875
4
[]
no_license
with pre_pitches as ( select * ,max(pitch_number) over(partition by game_pk, at_bat_number) max_pitch_no_in_ab from tm.pitch pit inner join tm.play play on play.play_id = pit.play_id where date_part('year',pitch_date) = 2019 ), pitches as ( select p1.pitch_id ,p1.bat_side ,p1.pitch_side ...
true
dad562dd722ab15cdfac72cafa93633c19a58d54
SQL
kpse/kulebao
/conf/evolutions/default/15.sql
UTF-8
552
2.984375
3
[]
no_license
# --- !Ups -- -------------------------------------------------------- -- -- 表的结构 dailylog -- CREATE TABLE dailylog ( uid INT(11) NOT NULL AUTO_INCREMENT, school_id VARCHAR(20) NOT NULL, child_id varchar(40) NOT NULL, parent_name VARCHAR(20) NOT NULL, pushid varchar(20) NOT NULL, reco...
true
06bef3c6138b9a378db589478ad1d1f2536f2724
SQL
lydiacupery/cs342
/08programming/lab08.sql
UTF-8
2,018
4.09375
4
[]
no_license
CREATE OR REPLACE PROCEDURE castDirector(actor IN Actor.id%type, movie IN Actor.id%type, role IN Role.role%type) AS BEGIN INSERT INTO Role (actorId, movieId, role) VALUES (actor, movie, role); END; / --execute procedure --EXECUTE castDirector(1, 4, 'Danny Ocean'); --my own tests /* --delete the rows from row DELETE ...
true
15ec4399890f2014de95da5bb1049f3e6d3e0fd3
SQL
vaughany/cakedemo2
/cakedemo2-paulvaughan-v9.sql
UTF-8
4,977
3.15625
3
[]
no_license
/*!40000 DROP DATABASE IF EXISTS `cakedemo2`*/; CREATE DATABASE /*!32312 IF NOT EXISTS*/ `cakedemo2` /*!40100 DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci */; USE `cakedemo2`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `comments` ( ...
true
e7f7e761dac4538eb47e9809ab65f56df97a18f3
SQL
dan-whitehouse/api2
/src/main/resources/sql/OrgView.sql
UTF-8
1,034
3.65625
4
[]
no_license
CREATE VIEW OrgView AS ( select l.LEARefId as SourcedId, l.LEASchoolYear as SourcedSchoolYear, l.leaId as DistrictId, 'district' as Type, l.LEAName as Name, l.LEAId as Identifier, l.StreetNumberAndName as Line1, l.Line2 as Line2, l.City as City, l.StateCode as State, l.PostalCode ...
true
2c995556e7ef1cfb43d6ac298b5e55bd714754ee
SQL
kavyajeetbora/my_sql_course
/Section 15 - Working with instagram clone data/executing_unfollow.sql
UTF-8
147
2.546875
3
[]
no_license
SELECT * FROM follows LIMIT 5; DELETE FROM follows WHERE follower_id=1 and followee_id=2; SELECT * FROM follows LIMIT 5; SELECT * FROM unfollows;
true
344b3f4daae523e7eee6c0ebe6ac42ce15cf25e1
SQL
ejyoo1/DDITSpring
/ejyoo.sql
UHC
920
3.46875
3
[]
no_license
CREATE TABLE MEMBER( USER_ID VARCHAR2(10) ,USER_PW VARCHAR2(10) ,USER_PHONE VARCHAR2(10) ,USER_EMAIL VARCHAR2(10) ); -- IDã SELECT count(*) FROM MEMBER WHERE USER_ID = 'ejyoo'; -- ID شϴ pw Ȯ ġϴ Ȯ SELECT count(*) FROM MEMBER WHERE USER_ID = 'ejyoo' AND USER_PW = 'dmswl123'; -- α ȯ SELECT USER...
true
b5e34e71b956dc5d37da88d927fcf55029ce293e
SQL
epam/cloud-pipeline
/api/src/main/resources/db/migration/v2021.11.02_16.00__issue_2232_nat_routing_rule.sql
UTF-8
561
2.84375
3
[ "Apache-2.0" ]
permissive
CREATE SEQUENCE IF NOT EXISTS pipeline.s_routing_rule_id START WITH 1 INCREMENT BY 1; CREATE TABLE IF NOT EXISTS pipeline.nat_routing_rule_queue ( route_id BIGINT NOT NULL, external_name TEXT NOT NULL, external_ip TEXT NOT NULL, external_port INTEGER NOT NULL, status TEXT NOT NULL, internal_nam...
true
6a27296af0366a87beb985c9db6d0a4ed4744c0c
SQL
num5268/Biz_403_2021_04_DBMS
/MySQL/TodoList(2021-05-24).sql
UTF-8
502
3.015625
3
[]
no_license
create database todoList; use todoList; show databases; CREATE TABLE tbl_todolist ( td_seq BIGINT auto_increment PRIMARY KEY, td_work VARCHAR(300) NOT NULL, td_date VARCHAR(15) NOT NULL, td_place VARCHAR(300) NOT NULL ); insert into tbl_todolist(td_work, td_date, td_place) values('서블릿 실습','2021-05-24'...
true
b668af9c7e00bbe6efd063f4f16288379398bf03
SQL
marinfotache/Database-Logic-in-Business-Applications
/Oracle 9i2. Ghidul dezvoltarii aplicatiilor 2003/Cap13_OO_in_Oracle/Listing13_06.sql
UTF-8
5,295
3.5
4
[]
no_license
DROP TABLE angajati_objtbl CASCADE CONSTRAINTS / DROP TABLE angajati_reltbl CASCADE CONSTRAINTS / DROP TABLE Sporuri_RefTbl CASCADE CONSTRAINTS / DROP TYPE Drepturi FORCE / DROP TYPE Angajat FORCE / CREATE OR REPLACE TYPE Angajat AS OBJECT ( marca INTEGER, nume VARCHAR2(50), prenume VARCHAR2(50), nr...
true
2df9133f426dd977793d0d976c155c77e7871748
SQL
domasd/labanorodraugai_netbeans
/LabanoroDraugai/sql/Scripts/summerhouse.sql
UTF-8
1,091
2.703125
3
[]
no_license
CREATE TABLE `labanorodraugai_db`.`summerhouse` ( `Id` INT(10) NOT NULL AUTO_INCREMENT, `Name` VARCHAR(45) NOT NULL, `Number` INT(10) NULL, `Capacity` INT(10) NULL, `Description` VARCHAR(256) NULL, `PointsPerDay` DECIMAL(30,2) ZEROFILL NOT NULL, `Image` BLOB NULL, PRIMARY KEY (`Id`), UNIQUE INDEX `Nam...
true
2d4e5c13b0f410b70a3124ab7cd6698856ee28ed
SQL
silence-do-good/stress-test-Postgres-and-MySQL
/dump/high/day28/select0017.sql
UTF-8
178
2.609375
3
[]
no_license
SELECT timeStamp, temperature FROM ThermometerOBSERVATION o WHERE timestamp>'2017-11-27T00:17:00Z' AND timestamp<'2017-11-28T00:17:00Z' AND temperature>=30 AND temperature<=45
true
14a136f18f6b762c54e57b9ca8a089e2842659ff
SQL
radtek/abs3
/sql/mmfo/bars/Data/error/mod_tic.sql
WINDOWS-1251
1,286
2.5625
3
[]
no_license
PROMPT ===================================================================================== PROMPT *** Run *** ========== Scripts /Sql/Bars/Data/Err/mod_TIC.sql =========*** Run *** == PROMPT ===================================================================================== PROMPT *** Create/replace ERR T...
true
04f4b5d92f9f599ca40b9ca824f7966d60f322ef
SQL
codershona/SQL-Server-Side-Learning
/SQL DATABASES/SQL CREATE DATABASE Statement.sql
UTF-8
450
3.25
3
[]
no_license
The SQL CREATE DATABASE Statement The CREATE DATABASE statement is used to create a new SQL database. Syntax CREATE DATABASE databasename; CREATE DATABASE Example The following SQL statement creates a database called "testDB": Example CREATE DATABASE testDB; Tip: Make sure you have admin privilege before creating any...
true
eda4041d0517bb40f3a19c407412f2cb5aec20a8
SQL
brianb1/sql-exercises
/sql/09-mutual-likes.sql
UTF-8
290
3.796875
4
[ "MIT" ]
permissive
SELECT a.name AS Student1, b.name AS Student2 FROM student_like JOIN student a ON a.id = student_like.liker_id JOIN student b ON b.id = student_like.likee_id JOIN student_like as like1 ON a.id = like1.likee_id AND like1.liker_id = student_like.likee_id WHERE a.id > b.id ORDER BY b.name;
true
c63af05b0b72558fd0d800863ce740a32095b231
SQL
darebeat/flink-explore
/flink-explore-source/src/main/resources/student.sql
UTF-8
501
2.953125
3
[]
no_license
DROP TABLE IF EXISTS student; CREATE TABLE student ( id int(11) unsigned NOT NULL AUTO_INCREMENT, name varchar(25) COLLATE utf8_bin DEFAULT NULL, password varchar(25) COLLATE utf8_bin DEFAULT NULL, age int(10) DEFAULT NULL, PRIMARY KEY (id) ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COLLATE=utf8_bi...
true
8505599d301b19f5a82c7998a8371e381a24404d
SQL
josephdlawson21/sql-library-lab-web-121117
/lib/insert.sql
UTF-8
1,053
2.71875
3
[ "LicenseRef-scancode-unknown-license-reference", "LicenseRef-scancode-public-domain" ]
permissive
INSERT INTO series(title, author_id, subgenre_id) VALUES ("lul",23,25),("lul",23,25); INSERT INTO books(title, year, series_id) VALUES ("Cool book",1992,232),("Cool book",1992,232),("Cool book",1992,232),("Cool book",1992,232),("Cool book",1992,232),("Cool book",1992,232); INSERT INTO characters(name,species,motto,...
true
2fff6e9c09ae6687b91f723a9fe420aa3900250d
SQL
shellamaebailio/presstoexpress-codeigniter-web
/pte/pte.sql
UTF-8
8,666
3.03125
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.1.14 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Mar 13, 2017 at 08:26 AM -- 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
56cdd6773182efe74b3d925e7764958720890f77
SQL
full1515/teamgit
/boardproject/WebContent/board.sql
UTF-8
336
2.84375
3
[]
no_license
create table board( no number not null primary key, name varchar2(12) not null, passwd varchar2(12) not null, title varchar2(50) not null, email varchar2(40) not null, regdate date default sysdate, content varchar2(4000) not null ); select * from board; desc board commit create sequence board_seq start with 1 increme...
true
14932a6582f3aaa0e5777bc4922199d65a28917d
SQL
renaldy23/Project-Learning-Management-System
/be_smart-database.sql
UTF-8
33,464
3.015625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Waktu pembuatan: 31 Bulan Mei 2021 pada 08.15 -- Versi server: 10.4.11-MariaDB -- Versi PHP: 7.3.14 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OL...
true
029aeef2bd39825cfea0c46a74df463b92b026ed
SQL
praveensivasamy/java
/mapping/bootstrap/T_COLLECTION_REPORT.sql
UTF-8
935
3.265625
3
[]
no_license
DROP INDEX IDX_T_COLLECTION_REPORT; DROP TABLE "PUBLIC"."T_COLLECTION_REPORT"; CREATE TABLE "PUBLIC"."T_COLLECTION_REPORT" ( CUSTOMER_NAME varchar(50), RECEIPT_NUMBER bigint NOT NULL, RECEIPT_DATE date, RECEIPT_CURRENCY varchar(5), ALLOCATED_AMOUNT decimal(25,4), RECEIVED_AMOUNT decima...
true
8cbf6071bb6d96c2456c802f9fa4f551ebdc10c2
SQL
Javierson/Tesebada2
/Tarea1.sql
ISO-8859-1
2,374
4.15625
4
[]
no_license
USE Tesebada; -- Script de importacion bulkinsert BULK INSERT VENTAS FROM 'E:\Universidad Materias\Tesebada\Repositorio de datos\Tarea1.Datos.txt' WITH( FIELDTERMINATOR = '\t', ROWTERMINATOR = '\n', FIRSTROW = 2); -- Los tres articulos mas vendidos y la cantidad SELECT PROD PRODUCTO, COUNT(VENTA) [TO...
true
5e71bf0c31f8766bb45cd9463994f287550f4d3f
SQL
pavelzylkov/sber_da
/SQL/lesson3/lesson_3_homework.sql
UTF-8
2,926
4.0625
4
[]
no_license
--схема БД: https://docs.google.com/document/d/1NVORWgdwlKepKq_b8SPRaSpraltxoMg2SIusTEN6mEQ/edit?usp=sharing --task1 --Корабли: Для каждого класса определите число кораблей этого класса, потопленных в сражениях. Вывести: класс и число потопленных кораблей. select s."class" , count(s.name) from ships s join out...
true
aac340ecaf85d999f9e5a6fc61950ec3d23b36c8
SQL
JazzHandsCMDB/jazzhands
/database/ddl/grants/oracle/create_token_grants.sql
UTF-8
4,605
2.78125
3
[]
no_license
-- Copyright (c) 2005-2010, Vonage Holdings Corp. -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without -- modification, are permitted provided that the following conditions are met: -- * Redistributions of source code must retain the above copyright -- notice, this ...
true
7c6538e3fbe7f580ff916d7e2e82f402cb8861a6
SQL
rajeshstomar/rst_testing_repo
/db/update_2014_04_23.sql
UTF-8
8,901
3.15625
3
[]
no_license
SET FOREIGN_KEY_CHECKS=0; DROP TABLE IF EXISTS `t_bank_groups`; CREATE TABLE `t_bank_groups` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `name` varchar(25) DEFAULT NULL, `parent_id` int(11) unsigned NOT NULL DEFAULT '0', PRIMARY KEY (`id`), KEY `idx_name` (`name`) USING BTREE, KEY `idx_parent_id` (`pa...
true
aa3317ca31bec88cb809180f326615a018528eab
SQL
kishorpawar/workdone
/code/sql/testing_server_load.sql
UTF-8
10,953
2.609375
3
[]
no_license
SHOW TABLE STATUS SET optimizer_trace="enabled=on"; EXPLAIN EXTENDED SELECT * FROM mp_raw_data WHERE serial_number_id = 3920122 AND event_time BETWEEN '2013-09-01 00:00:00' AND '2013-09-30 23:59:59' GROUP BY DATE(event_time), HOUR(event_time), MINUTE(event_time) SELECT * FROM mp_raw_data WHERE serial...
true
928e663a627ec6376765a6637e4171991aa15816
SQL
bk88collab/be-project
/Database/movie_db.sql
UTF-8
4,455
3.296875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Aug 18, 2021 at 10:36 PM -- Server version: 10.4.17-MariaDB -- PHP Version: 7.3.27 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIE...
true
96884c9451a109e3042fd257f24d3d7858984b37
SQL
wu1328113017/dangyou-
/db/user.sql
UTF-8
1,323
3.140625
3
[]
no_license
/* Navicat Premium Data Transfer Source Server : 本地连接 Source Server Type : MySQL Source Server Version : 50721 Source Host : localhost:3306 Source Schema : dangyou Target Server Type : MySQL Target Server Version : 50721 File Encoding : 65001 Date: 12/04/2020 11:16:4...
true
d2a9d88b92e3f89939a1fa503cf3aa4acaab86a7
SQL
umpyre-code/rolodex
/migrations/2019-04-22-144548_create_unique_email_addresses/up.sql
UTF-8
310
2.921875
3
[ "Apache-2.0" ]
permissive
CREATE TABLE unique_email_addresses ( id BIGSERIAL PRIMARY KEY, client_id BIGINT NOT NULL REFERENCES clients (id) ON DELETE CASCADE, created_at TIMESTAMP NOT NULL DEFAULT NOW(), updated_at TIMESTAMP NOT NULL DEFAULT NOW(), email_as_entered TEXT NOT NULL UNIQUE, email_without_labels TEXT NOT NULL)
true
e7f7c870e93ecfa80a840417b5d4deb0e14cab24
SQL
iammoavia/weatherapp
/dbweatherapp(1).sql
UTF-8
2,153
2.921875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.9.5deb2 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3306 -- Generation Time: May 08, 2021 at 12:07 AM -- Server version: 8.0.23-0ubuntu0.20.04.1 -- PHP Version: 7.4.3 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; ...
true
a52442e6667527081afa310f5fb33a6339f33b6b
SQL
bellmit/origin
/family_order/sql/TI_B_SYNCHINFO/INC_TI_34_UPD_2.sql
UTF-8
1,347
3.421875
3
[]
no_license
UPDATE TI_B_RELATION_AA A SET A.MODIFY_TAG = '2' WHERE EXISTS (SELECT 1 FROM (SELECT TRADE_ID,PARTITION_ID,ACCT_ID_A,USER_ID_A,ACCT_ID_B,USER_ID_B,PAYITEM_CODE,RELATION_TYPE_CODE,ROLE_CODE_A,ROLE_CODE_B,ORDERNO,INST_ID,LIMIT_TYPE,LIMIT_VALUE,ACT_TAG,START_DATE,END_DATE,UPDATE_TIME,UPDATE_STAFF_ID,UPDATE_D...
true
d00849d812c8745d65ce3642e13015929b853c4f
SQL
karolkepka/plsql
/KYCDIM/DK/pkg/PKG_SCRAMBLE.sql
UTF-8
6,408
3.125
3
[]
no_license
CREATE OR REPLACE PACKAGE pkg_scramble AS TYPE t_keys IS TABLE OF VARCHAR2(50) INDEX BY VARCHAR2(50); v_keys t_keys; --------------------------------------- PROCEDURE scramble; -------------------------------------- FUNCTION get_value( p_json CLOB, p_obj VARCHAR2, p_appearance NUMBE...
true
50edc866e28b4cc5dd63b35100d879cf31ad2fcc
SQL
pedrovsn04/scripts_oracle
/brinde.sql
UTF-8
1,495
3.90625
4
[]
no_license
select /*+ RULE */ a.tablespace_name,a.file_id,c.name,trunc(c.bytes/1024/1024) MB_datafile,trunc(sum(a.bytes/1024/1024)) MBytes from dba_free_space a, (select TABLESPACE_NAME,FILE_ID,max(BLOCK_ID) blockid from dba_extents group by TABLESPACE_NAME,FILE_ID) b, v$datafile c where ...
true
7b089254f7c0776509361a375bdf010f226c0f80
SQL
yaol9/yaol-p-xml
/yaol-p-xml/queries/Sample occurrence test.sql
UTF-8
1,115
3.375
3
[]
no_license
create table occurrence SELECT `keyworddewey`.`Keyword`, sum(1) as keywordCount FROM `dblp`.`keyworddewey` group by `keyworddewey`.`Keyword` ; create table top1000 SELECT * FROM occurrence order by keywordCount desc limit 1000; drop TABLE `dblp`.`KeywordDewey`; CREATE TABLE `dblp`.`KeywordDewey` ...
true
b707dddfeffee6d41709a41f01ea8e05e77d126a
SQL
eleazarMar/access-control
/src/main/resources/db/migration/V1__baseline.sql
UTF-8
1,212
3.78125
4
[]
no_license
CREATE TABLE member ( `username` VARCHAR(50) NOT NULL, `member_forename` VARCHAR(128) NOT NULL, `member_surname` VARCHAR(128) NOT NULL, `active` BOOL NOT NULL, PRIMARY KEY (`username`) ); CREATE TABLE device ( `device_id` VARCHAR(50) NOT NULL, `enable_at` TIME, `disable_at` TIMESTAMP, `trigger_dura...
true
b8736099f3173b812e5b2d1e27abe7b34c0fa3da
SQL
prbarretto/wdi_3_sql_hw_thehardway
/ex7.sql
UTF-8
790
3.0625
3
[]
no_license
sqlite> .tables car person person_car person_pet pet sqlite> DROP TABLE person; sqlite> DROP TABLE person_pet; sqlite> DROP TABLE PET; sqlite> .tables car person_car Macintosh-3:wdi_3_sql_hw_thehardway praggya$ sqlite3 ex3.db < ex3.sql Macintosh-3:wdi_3_sql_hw_thehardway praggya$ sqlite3 ex3.db ...
true
972c7802e94dc631a7b0f396ff925314e7f39569
SQL
rodisantana2002/horacerta
/src/main/java/repository/scripts/scrit_banco_dados.sql
UTF-8
6,481
3.765625
4
[]
no_license
-- Autor: Rodolfo Santana -- Generation Time: Aug 17, 2017 at 06:21 PM SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLA...
true
998122399a3ad14c7325eca8214270412d871826
SQL
MarkLiuPeng/RDBMS
/test2.sql
UTF-8
3,645
3.625
4
[]
no_license
#use mysql; /* show tables; select * from user; use mysql; show databases; #create database db1; #drop database test; #show engines\g; #存储引擎 #show engine\G; #"\g,\G友好形式 #show variables like "Storage_engine%"; #系统全部存储引擎 #default InnoB #HELP contents; #帮助 #use mysql; #create ...
true
5c23c1dd595db3d859a180d42f1b94b168cc59bb
SQL
ramyothman/Qiyas
/Source/EventoNew/QiyasDatabase/dbo/Stored Procedures/UpdateConferenceRegistrationTypeLanguage.sql
UTF-8
824
3.03125
3
[]
no_license
CREATE PROCEDURE UpdateConferenceRegistrationTypeLanguage @OldConferenceRegistrationTypeId int, @ConferenceId int, @Name nvarchar(50), @Fee decimal(18,2), @ConferenceRegistrationTypeParentId int, @LanguageID int, @Description nvarchar(500), @OfferMessage ntext AS UPDATE [Conference].[Co...
true
b1c8bef1ccbee08d43635db43ca78ead74bb0379
SQL
wf-oadenaike/TestProject
/TestDBProject/Sales.BP/Tables/WoodfordContact.sql
UTF-8
3,058
2.984375
3
[]
no_license
CREATE TABLE [Sales.BP].[WoodfordContact] ( [Id] INT IDENTITY (1, 1) NOT NULL, [CntFcaId] CHAR (8) NOT NULL, [CntSalesforceId] CHAR (18) NULL, [CntMatrixId] CHAR (5) NULL, [CntSivId] ...
true
dd58e31a755dcaffa43670b9ec8d84155bb60a28
SQL
AEW0330/DataQualityCollaboration
/DQUEEN/extra/extras/archive_sqlcode/meta/dev_payer_fianl_script.sql
UTF-8
4,836
3.28125
3
[ "Apache-2.0" ]
permissive
select mp1.* ,ar1.INSNAME ,case when mp1.MEDDATE < p1.Btdt then 'Y' when mp1.ORDDATE < p1.Btdt then 'Y' when mp1.ADMTIME is not null and mp1.ADMTIME < p1.Btdt then 'Y' when mp1.ENDDATE is not null and mp1.ENDDATe < p1.Btdt then 'Y' else 'N' end as Brith_error ,case when m...
true
e830bf4e27cb6d5c6775ff1e9148560f175523b9
SQL
lllana/SQL_practice
/Lesson4.sql
UTF-8
10,155
4.625
5
[]
no_license
###Subqueries /* Part 1. On which day-channel pair did the most events occur. */ SELECT DATE_TRUNC('day', occurred_at) AS event_date, channel, COUNT(*) AS count_events FROM web_events GROUP BY 1,2 ORDER BY 3 desc; /* Part 2. Match each channel to its corresponding average number of events per day. */ SELECT c...
true
2e5ea29acc1927a2f3fb2168ce273a9d9c2a51cc
SQL
LawNicholas/NexusLFG
/Table_Create_Statements.sql
UTF-8
1,834
3.796875
4
[]
no_license
CREATE TABLE user_profile ( UserId SERIAL, UserName VARCHAR NOT NULL, Email VARCHAR NOT NULL, Password VARCHAR NOT NULL, PRIMARY KEY (UserId) ); CREATE TABLE game ( TeamSize INT NOT NULL, GameName VARCHAR NOT NULL, GameId SERIAL, PRIMARY KEY (GameId), UNIQUE (GameName) ); CREATE TABLE role ( Rol...
true
ffc17930344fd27cecee979bf30487b3b9b48277
SQL
mateNemeth/kona
/db.schemas/tables.sql
UTF-8
1,565
3.3125
3
[]
no_license
CREATE TABLE carlist ( id BIGSERIAL NOT NULL PRIMARY KEY, platform VARCHAR(100) NOT NULL, platform_id TEXT NOT NULL, link TEXT NOT NULL, date_of_scan DATE DEFAULT NOW(), crawled BOOLEAN ); CREATE TABLE carspec ( id BIGINT NOT NULL PRIMARY KEY, ccm INT NOT NULL, cartype BIGINT NOT...
true
d611dd4969493d9c35cb1b16a7e2e929c720cba9
SQL
chriscasano/audit-demo
/sql/bank-docker.sql
UTF-8
809
3.234375
3
[]
no_license
SET CLUSTER SETTING cluster.organization = ''; SET CLUSTER SETTING enterprise.license = ''; SET CLUSTER SETTING kv.rangefeed.enabled=true; drop database if exists cis cascade; create database cis; use cis; create table audit ( tbl string not null, --kafka.topic pk string not null, --kafka.key ts string not null...
true
7d9a7b93bb167c612fbb0adde6dd15c34e9989a4
SQL
NikaOrl/node-aws-be
/games-service/src/db/dbInit.sql
UTF-8
5,851
3.296875
3
[]
no_license
CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; CREATE TABLE product ( id uuid PRIMARY KEY DEFAULT uuid_generate_v4(), title text NOT NULL, description text, price integer, image text ); CREATE TABLE stock ( id uuid PRIMARY KEY DEFAULT uuid_generate_v4(), product_id uuid, count integer, ...
true
03a1cea8c94b6a14b5a1d66aa24f56fd353ddeac
SQL
AjinkyaBangale2/Leetcode-SQL-Solutions
/603 Consecutive Available Seats.sql
UTF-8
384
4.25
4
[ "MIT" ]
permissive
# https://leetcode.com/problems/consecutive-available-seats/ SELECT distinct b.seat_id FROM cinema a join cinema b ON abs(a.seat_id - b.seat_id) = 1 and a.free = 1 and b.free = 1; #Another solution SELECT DISTINCT c1.seat_id FROM cinema c1 JOIN cinema c2 ON (c1.seat_id = c2.seat_id - 1 or c1.seat...
true
6aaa65bf6ac697454794d3b154addf27f4ef2c4a
SQL
Corey-Tattam/HotelBooking
/sql_files/cast-list.sql
UTF-8
2,172
3.640625
4
[]
no_license
SELECT booking_id, hotel, check_in, check_out, size, quantity, pin, url, extra_bed from Bookings; SELECT * from HOTELS; SELECT * FROM BOOKINGS; SELECT * FROM ROOMS; SELECT room_num from rooms where availability = 'Occupied'; -- select room number with "OCCUPIED" select room_num, hotel from rooms where availability = ...
true
5c8f46a22dd0aca301b746bbcd9cdfd637a334a6
SQL
lockwood/esekey
/trunk/schema/create_commission_test.sql
UTF-8
789
3.046875
3
[]
no_license
# Server version: 4.0.13 # PHP Version: 4.3.3 # USE eseData; # Create Table structure for table `commission_test` DROP TABLE IF EXISTS `commission_test`; CREATE TABLE `commission_test` ( `company_id` mediumint(5) ZEROFILL NOT NULL, `quarter` char(6) NOT NULL, `booking_reference` mediumint(9) NOT NUL...
true
0180a8e0a47cae40d01db2ead2989d3814a68b57
SQL
mradulbadaya/Activation_Framework
/queries/porter_gold.sql
UTF-8
219
2.78125
3
[]
no_license
SELECT id AS subs_id, customer_id, to_timestamp(subscribed_at) AT TIME zone 'utc' AT TIME zone 'asia/kolkata' AS gold_subscribed_at FROM porter_club_members WHERE customer_id IN (`customers_list`) ;
true
19b3745c506a07dae220129c13ab50fc2e3f8070
SQL
Theo293/Travaux-pratiques
/TPDivers/Sql/RequetesBasiques.sql
UTF-8
508
3.0625
3
[]
no_license
SELECT * FROM article; SELECT Designation, REF FROM `article` WHERE PRIX > 2; SELECT * FROM `article` WHERE PRIX >= 2 && PRIX <= 6.25; SELECT * FROM `article` WHERE Prix BETWEEN 2 AND 6.25; SELECT * FROM `article` WHERE (NOT (PRIX >= 2 && PRIX <= 6.25)) && ID_FOU = 1; SELECT * FROM `article` WHERE ID_FOU = 1 || ID...
true
ef43101689586a41e599bd8c524b755ccf86aad0
SQL
sunnycoast/ZaawansowaneTechnologieWebowe
/bazy danych/my_project_database.sql
UTF-8
56,358
3.125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.7.7 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jun 13, 2018 at 07:37 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
c77dac18146afa7fc4a1bac81306e9bd4a4c4834
SQL
psabela/SQL
/Registrations-dropped.sql
UTF-8
33,369
2.953125
3
[]
no_license
--DROPPED CLASSES WITH SAIG_SB_V2_DATA_STUDENT AS (select distinct (select spriden_id from spriden where spriden_pidm = SGBSTDN_PIDM and spriden_change_ind is null) STU_GWID, SGBSTDN_PIDM STU_PIDM, SGBSTDN_LEVL_CODE ...
true
ef4e1e566c9d48b3c3745294c5ea56d64acab58d
SQL
algoflow19/CS145
/Project1/submit/create.sql
UTF-8
1,014
3.703125
4
[]
no_license
drop table if exists catItem; create table catItem ( catName text, ItemID integer, primary key ( catName, ItemID ) foreign key ( catName ) references item( ItemID ), foreign key ( ItemID ) references category( catName ) ); drop table if exists category; create table category ( catName text primary key ); drop table...
true
56d8e04f59ca3e997afae52de06743f83b99511e
SQL
aoke79/property
/sql/QUALITY-550.sql
UTF-8
4,391
2.921875
3
[]
no_license
/* ADD BY licumn ,2013-05-07; create a table :TF_QUAL_COPILOT_CHECKLIST; */ -- Create table create table TF_QUAL_COPILOT_CHECKLIST ( ID VARCHAR2(36) not null, DETAILS_ID VARCHAR2(36), RUN_BASE VARCHAR2(60), CHECK_DATE DATE, CHECK_...
true
a87df69c7368cb248096eeccb0497148f0e954b6
SQL
Bugrabugra/SQL
/PostgreSQL Tutorial/Section 14. Managing Tables/14.11 - PostgreSQL DROP COLUMN Remove One or More Columns of a Table.sql
UTF-8
1,051
3.96875
4
[]
no_license
--PostgreSQL DROP COLUMN examples create table publishers (publisher_id serial primary key, name varchar not null); create table categories2 (category_id serial primary key, name varchar not null); create table books (book_id serial primary key, title varchar not null, isbn var...
true
38c10f0efa83e8163c074a26a434aae6d5e2da18
SQL
rudolfduplessis/es-exp
/src/main/resources/db/migration/V1501878437__seed.sql
UTF-8
1,016
3.84375
4
[]
no_license
DO $$ BEGIN CREATE SCHEMA IF NOT EXISTS event_schema; IF NOT exists(SELECT * FROM information_schema.tables WHERE table_schema = 'event_schema' AND table_name = 'event') THEN CREATE TABLE event_schema.event( event_id UUID NOT NULL, event_name TEXT NOT NULL, event_raised TIMESTAMP NOT NULL, ...
true
7e0be4a6b2c2d83b3c2a4b884081ca7777f75032
SQL
Denitsa2212/php19
/02_PHP_MySQL/16_final_test/solutions/done/Denislav_test/Denislav_test/Task_1/news.sql
UTF-8
6,072
3.453125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Apr 26, 2020 at 01:34 PM -- Server version: 10.4.11-MariaDB -- PHP Version: 7.4.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
true
ba11a3f2cbde989e754a9f3c5b1a13c2fa3224a7
SQL
praveen-kumar-data-science/Advanced-MySQL-Projects
/Query 1.sql
UTF-8
3,201
3.6875
4
[]
no_license
SET GLOBAL max_allowed_packet = 1073741824; USE mavenfuzzyfactory; -- Running this command will allow Workbench -- to accept a larger file (of size 1073741824 in this case). SELECT website_sessions.utm_content, count(website_sessions.utm_content), count(orders.order_id), count(orders.order_id)/count(website_sessio...
true
e567069abb06f99bd2bb1d0bc2d37718ded89506
SQL
FlorGRP/Solucion
/viernes3.sql
UTF-8
424
4.21875
4
[]
no_license
/*Mostrar un ranking de los primeros 10 productos(los nombres y cantidad de unidades) mas pedidos en 1997, ordenados descendientemente por cantidad de unidades*/ select top 10 p.ProductName, sum(od.Quantity) as Unidades from orders as o inner join [Order Details] as od on od.OrderID=o.OrderID inner join Products as p...
true
3d18028a900917796e1b05baef511725b6824534
SQL
brslv/software-university
/Databases/HW04_SQLIntroduction/18.All-employees-with-their-addresses.sql
UTF-8
120
3.0625
3
[]
no_license
SELECT e.FirstName, e.LastName, a.AddressText FROM Employees e INNER JOIN Addresses a ON e.AddressID = a.AddressID
true