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
3596d0330b03ab6de767e81fe54369977060e6f3
SQL
ChoongangFinal6/myWishList
/MyWishList/etc/sungHunDB.sql
UTF-8
2,390
3.40625
3
[]
no_license
-- MyWish DROP TABLE MyWish; -- MyWish CREATE TABLE MyWish ( wishNo NUMBER PRIMARY KEY, -- 위시리스트 번호 email VARCHAR2(50) NOT NULL, -- 아이디(이메일) product VARCHAR2(50) NOT NULL, -- 품명 price INTEGER NOT NULL, -- 금액 remainDate DATE NOT NULL, -- 기한 success NUMBER NULL, -- 성...
true
6a423af896ab8057cec2d6b8839d855facd38e84
SQL
kmvanneste/Lessons-Examples-Practice
/12-MySQL/01-Activities/08-playlistRead/playlist.sql
UTF-8
536
3.25
3
[]
no_license
DROP DATABASE IF EXISTS playlist_db; CREATE DATABASE playlist_db; USE playlist_db; CREATE TABLE songs ( id INT NOT NULL AUTO_INCREMENT, title VARCHAR(50), artist VARCHAR(50), genre VARCHAR(50), PRIMARY KEY (id) ); INSERT INTO songs (title, artist, genre) VALUES ("Photograph", "Nickelback", "Rock...
true
55786ca16976a29c8d2ae09ac00e5a67d9aa370b
SQL
BrychDaneel/FootBallManager
/scripts/create.sql
UTF-8
11,002
3.46875
3
[]
no_license
-- MySQL Script generated by MySQL Workbench -- Вт 12 дек 2017 18:59:07 -- 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='TRA...
true
a145137a70ea9a4bb5713147c13d159c433dbf44
SQL
CUBRID/cubrid-testcases
/sql/_23_apricot_qa/_03_i18n/tr_TR/_11_coallation/cases/003.sql
UTF-8
2,897
3.171875
3
[ "BSD-3-Clause" ]
permissive
--+ holdcas on; set names utf8; CREATE TABLE t( col1 INT NOT NULL AUTO_INCREMENT, col2 CHAR collate utf8_tr_cs DEFAULT NULL ); INSERT INTO t(col2) VALUES('a'); INSERT INTO t(col2) VALUES('b'); INSERT INTO t(col2) VALUES('c'); INSERT INTO t(col2) VALUES('d'); INSERT INTO t(col2) VALUES('e'); INSERT INTO t(col2) VALU...
true
fb7f6cd7596e9c5eeae461e691e5a7c477222ea3
SQL
kjlist/Bazooka
/src/main/resources/createSQL/createTableUser.sql
UTF-8
768
3.078125
3
[]
no_license
CREATE TABLE `t_user` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `create_time` timestamp NOT NULL DEFAULT '2020-01-01 00:00:00', `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `username` varchar(40) NOT NULL DEFAULT '' COMMENT '用户名', `password` varchar(45) NOT...
true
33f151baef8d42da9a0f22e035b04b6e6e1e6e00
SQL
chunchengmeigui/dalyNote
/springboot/springboot-持久层/springboot-multiple-datasource/dynamic-datasource-aop-loop/src/main/resources/sql/cdn.sql
UTF-8
1,204
2.984375
3
[]
no_license
/* Navicat Premium Data Transfer Source Server : 127 Source Server Type : MySQL Source Server Version : 80015 Source Host : 127.0.0.1:3306 Source Schema : cdn Target Server Type : MySQL Target Server Version : 80015 File Encoding : 65001 Date: 10/07/2020 13:24:35 */ ...
true
20a7602aa744603b6ffd948d6ba04f6421d419ac
SQL
krishnamohankaruturi/secret
/aart-web-dependencies/db/dml/536.sql
UTF-8
12,564
3.15625
3
[]
no_license
--dml/*.sql --US17808: Reports: Upload subscore descriptions, usage enhancements for 2016 --Create the fieldspec for the new column insert into fieldspecification (fieldname, allowablevalues, minimum, maximum, fieldlength, rejectifempty, rejectifinvalid, formatregex, showerror, createddate, createduser, activeflag, ...
true
613bbac4b1d7c658faa8a0997f466714e76d39d8
SQL
schreckmason/COMS319
/UwAmp/www/Lab6/createDatabase.sql
UTF-8
1,034
3.40625
3
[]
no_license
drop table users; drop table books; drop table loanHistory; drop table shelves; drop table bookLocation; create table users( UserName VARCHAR(255), Password VARCHAR(255), Email VARCHAR(255), Phone VARCHAR(255), Librarian TINYINT, FirstName VARCHAR(255), LastName VARCHAR(255), Primary Key (UserName)); creat...
true
689605684a9438474f1d9bee14c0479f445a8845
SQL
adityasugandhi/enabling-personal-consent
/queries+constraints/tpch/16-clean.sql
UTF-8
206
2.59375
3
[ "MIT", "BSD-3-Clause", "BSD-2-Clause" ]
permissive
-- $ID$ -- TPC-H/TPC-R Parts/Supplier Relationship Query (Q16) -- Functional Query Definition -- Approved February 1998 select p_brand, p_type, p_size from partsupp, part where p_partkey = ps_partkey
true
8bbf0b83af507986f2a3153ba99c9d7241687616
SQL
hillerlab/CESAR2.0
/kent/src/hg/lib/encode/wgEncodeGencodeUniProt.sql
UTF-8
686
3.03125
3
[ "LicenseRef-scancode-other-permissive", "LicenseRef-scancode-proprietary-license", "MIT" ]
permissive
# wgEncodeGencodeUniProt.sql was originally generated by the autoSql program, which also # generated wgEncodeGencodeUniProt.c and wgEncodeGencodeUniProt.h. This creates the database representation of # an object which can be loaded and saved from RAM in a fairly # automatic way. #GENCODE transcript to UniProt pepti...
true
a22d1645002c38712b8be094a9f7a5bf0f51c9ad
SQL
juancanuto/lab4-finalwork
/loja/src/main/resources/db/scripts/fornecedor.sql
UTF-8
795
3.484375
3
[ "MIT" ]
permissive
--liquibase formatted sql --changeset adriano:201810210022 --comment: Criando a estrutura da tabela FORNECEDOR CREATE TABLE IF NOT EXISTS `lab04db`.`fornecedor` ( `id` INT(11) NOT NULL COMMENT 'Identificador da tabela forncedor.', `nome` VARCHAR(45) NOT NULL COMMENT 'Nome do fornecedor do produto.', `cnpj...
true
6c6ba5476016501757e514e48eec8b11a312ff44
SQL
sucun21/CMS_20171005
/sogo-lms-cms-api/sql/web_cms_course_get_activity_by_id.sql
UTF-8
604
2.953125
3
[]
no_license
delimiter // DROP PROCEDURE IF EXISTS web_cms_course_get_activity_by_id; // CREATE PROCEDURE `web_cms_course_get_activity_by_id`( IN p_activity_id INT ) BEGIN SELECT activity_id `activityId`, activity_type_id `activityTypeId`, activity_name `activityName`, CONVERT(activity_data USING...
true
126c0654aefbf2d170a01b55e877a14790c7dbaa
SQL
hanifbudiarto/apotekamp
/apotekamp.old.sql
UTF-8
18,464
3.5625
4
[]
no_license
drop database if exists apotekamp; create database apotekamp; use apotekamp; -- phpMyAdmin SQL Dump -- version 4.4.14 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Jun 13, 2016 at 01:55 AM -- Server version: 5.6.26 -- PHP Version: 5.6.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone =...
true
f4df9f4bb684c4d2259eaa093cf3726ce4251e90
SQL
kaiwetlesen/parkmeister
/table_definitions/parking_spot.sql
UTF-8
314
3.03125
3
[]
no_license
create table parking_spot ( -- parking spot row_id int unsigned unique auto_increment primary key, spot_number int, floor_number int, parking_type varchar(16), lot_id int unsigned NOT NULL, is_used boolean default false, FOREIGN KEY(lot_id) REFERENCES parking_lot(lot_id) )ENGINE = innoDb;
true
f1ba22c8e9c8a69866780b1f167897c95183f538
SQL
prestigeprog/startjava
/src/com/startjava/lesson4/sql/querise.sql
UTF-8
547
3.078125
3
[]
no_license
SELECT * FROM robots; SELECT * FROM robots WHERE status = 'NotDestroyed'; SELECT * FROM robots WHERE mark IN ('Mark-1', 'Mark-6'); SELECT * FROM robots ORDER BY mark DESC; SELECT * FROM robots WHERE launch = (SELECT MAX(launch) FROM robots); SELECT * FROM robots WHERE kaijuKill = (SELECT MAX(kaijuKill) FROM robots); SE...
true
1ecb539c6fcc06c60feae2e4b7decd588bdc70e2
SQL
LQNguyen97/ISTA420
/labs/myfamily.sql
UTF-8
677
3.203125
3
[]
no_license
.echo on .headers on --Name: myfamily.sql --Author: Linh Nguyen --Date: July 02, 2020 drop table if exists family; create table family ( id int, name text, sex int, role text, age int ); insert into family values (1,"Thanh",0,"parent",58); insert into family values (2,"Hoa",1,"child",28); insert...
true
0a14062ee836dc689dc25e08b4f96dcdfc0ca8ba
SQL
vladimirbasaric/it-obuka
/SQL/42 43 44 45/45_materijali_za_cas/01_exists.sql
UTF-8
308
3.296875
3
[]
no_license
-- Upite izvrsavati nad bazom fakultet -- Napisati upit koji prikazuje polaganja svih studenata -- za koje je poznato da imaju neku napomenu u baci podaka. -- Koristiti exists. SELECT * FROM `polaganja` as p WHERE EXISTS ( SELECT * FROM studenti as s WHERE s.indeks = p.indeks and s.napomena <> '' );
true
709459e719d62c43b7b8d58b1fad28ef58a8bb88
SQL
ffreddymx/ciiea
/CIEEA/Base de datos/ciiea.sql
UTF-8
6,808
3.203125
3
[ "Apache-2.0" ]
permissive
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 04-11-2020 a las 04:41:03 -- Versión del servidor: 10.4.14-MariaDB -- Versión de PHP: 7.4.10 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
true
8515673d403e187b8f03b113d453b82a178f3181
SQL
nblaskar/Laravel-Complete-Course-With-Codes-By-NBL-Series-Two
/17.Query Builder in Laravel/nbldb.sql
UTF-8
1,948
3.203125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.1.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jul 04, 2021 at 06:15 PM -- 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
8faf924f94e67afa0fbb9c7cc7f937512c97f836
SQL
atakanonat/patika.dev-sql-homeworks
/Homework-12.sql
UTF-8
474
3.875
4
[]
no_license
/* 1. SELECT COUNT(*) FROM film WHERE length > (SELECT AVG(length) FROM film) */ /* 2. SELECT COUNT(*) FROM film WHERE rental_rate = (SELECT MAX(rental_rate) FROM film) */ /* 3. SELECT * FROM film WHERE rental_rate = (SELECT MIN(rental_rate) FROM film) AND replacement_cost = (SELECT MIN(replacement_cost) FROM film) ...
true
430a0c9e790f6196a174e3d95aa0aa125d000561
SQL
dulumary/java_web
/springProject/marondalgram/query/create.sql
UTF-8
1,243
3.109375
3
[]
no_license
CREATE TABLE `user` ( `id` int NOT NULL AUTO_INCREMENT primary key, `loginId` varchar(16) NOT NULL, `password` varchar(32) NOT NULL, `name` varchar(16) NOT NULL, `email` varchar(32), `createdAt` timestamp DEFAULT CURRENT_TIMESTAMP, `updatedAt` timestamp DEFAULT CURRENT_TIMESTAMP ) ENGINE=I...
true
4e310e08a417b51bf767363fd23dcaecff9c8569
SQL
Theriong/CODE_SQL_BCI
/Panel_InformeDiario_EM_VF/Script.sql
UTF-8
1,487
3.859375
4
[]
no_license
DROP TABLE ftorren.REG_PLT_EJE_TABLE; CREATE TABLE ftorren.FACT_TABLE ( ID_FACT_TABLE INT identity, ID_DATE_TABLE INT, FEC_PROC INT, ANO_MES INT, ANO INT, TRIMESTRE INT, REGION VARCHAR(50), PLATAFORMA VARCHAR(50), EJECUTIVO VARCHAR(50) ) CREATE UNIQUE INDEX IDX_FACT_TABLE ON ftorren.FACT_TA...
true
cc10fa078984f9c2a14b285b447bd6128326a6d8
SQL
xinyuwufei/CCIGW
/ccigw._finalsql.sql
UTF-8
10,063
3.21875
3
[]
no_license
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=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8 */; -- -- Database: `liu11121...
true
78fbabd6ef938d1932e475c09be5ca8878e53009
SQL
shelbylee/oj-forum
/src/db/init_db.sql
UTF-8
2,678
3.84375
4
[]
no_license
/* Navicat Premium Data Transfer Source Server : localhost Source Server Type : MySQL Source Server Version : 80011 Source Host : localhost Source Database : oj_forum Target Server Type : MySQL Target Server Version : 80011 File Encoding : utf-8 Date: 04/23/2019 20:57:...
true
6c21b784f244fd790c5030cf89ca8385bd44f2cd
SQL
kiaerwnd/basdat-kelompok5-TI-41-05
/DDL Script.sql
UTF-8
2,595
3.421875
3
[]
no_license
/*==============================================================*/ /* DBMS name: MySQL 5.0 */ /* Created on: 30/08/2019 18:54:49 */ /*==============================================================*/ drop table if exists TBL_BERANGGOTAKAN; d...
true
048f5e18fb07808146d3ca6ddad32cdad07db57c
SQL
SpamLark/Work_SQL
/Banner/EXCEPTION REPORT - Multiple outcome records with the same graduatio term.sql
UTF-8
356
3.359375
3
[]
no_license
SELECT spriden_id, shrdgmr_pidm, COUNT(*) FROM shrdgmr s1 JOIN spriden ON shrdgmr_pidm = spriden_pidm AND spriden_change_ind IS NULL WHERE 1=1 AND shrdgmr_stsp_key_sequence IS NOT NULL AND shrdgmr_degs_code != 'RE' AND shrdgmr_term_code_grad = '202209' --AND spriden_id = '16069311' GROUP BY spriden_id, ...
true
5f826bc93d4475971e0e894c6a9d18c7eba50a54
SQL
jgch88/tsql-fundamentals-2e
/TSQL Fundamentals - Page 200 (EXCEPT ALL).sql
UTF-8
610
4.3125
4
[]
no_license
USE TSQL2012; /* EXCEPT vs EXCEPT_ALL, EXCEPT misses "Seattle" because there are two employees in Seattle and only one customer in Seattle */ SELECT country, region, city FROM HR.Employees EXCEPT SELECT country, region, city FROM Sales.Customers; WITH EXCEPT_ALL AS ( SELECT ROW_NUMBER() OVER(PARTITION BY count...
true
43a76ab6d0e2a43d357d5800b025642993b858fd
SQL
kotevskim/bp_lab6
/lab6_problem1_queries.sql
UTF-8
1,599
3.90625
4
[]
no_license
/* 1.1 Prikazi gi konsultantite cie prezime pocnuva na bukvata P. */ SELECT * FROM CONSULTANTS WHERE CONSULTANTNAME LIKE 'P%'; /* 1.2 Prikazi gi konsultantite cie prezime zavrsuva na ska, a imeto im pocnuva na bukvata M. */ SELECT * FROM CONSULTANTS WHERE CONSULTANTNAME LIKE '%ska M%'; /* 1.3 Prik...
true
ba62e1a4cb64d593c298597ee4b078ac1dc0fd1a
SQL
fozuzip/nmap-scanner
/dump.sql
UTF-8
4,619
3.09375
3
[]
no_license
-- MySQL dump 10.13 Distrib 5.5.46, for debian-linux-gnu (x86_64) -- -- Host: localhost Database: nmapproject -- ------------------------------------------------------ -- Server version 5.5.46-0ubuntu0.14.04.2 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS...
true
1787615e268d126f409576bceeb832acc5f18e54
SQL
allwaysoft/fun
/Clients/dte/Queries/on dec 15th.sql
UTF-8
3,711
3.203125
3
[]
no_license
SELECT 1 APERE_P_ENT_SEQ, --DECODE(ARR_ENTERPRISE_CODE,'GAS','GAS','CEL','ELECTRIC CHOICE','CGA','GAS CHOICE','ELECTRIC') APERE_P_ENTERPRISE_CODE, DECODE(ARR_ENTERPRISE_CODE,'GAS','GAS', 'CGA','GAS CHOICE LDC(Buy Sell)', 'CEL','ELECTRIC CHOICE LDC(Non Buy Sell)...
true
619f554ecf85fee3ce7d6c8b27f63e0726992417
SQL
faroyam/graphql-rbac
/internal/migrations/1569155140_baseline.up.sql
UTF-8
4,411
3.84375
4
[ "MIT" ]
permissive
CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; CREATE TABLE IF NOT EXISTS users ( id UUID DEFAULT uuid_generate_v4() NOT NULL CONSTRAINT users_pk PRIMARY KEY, login VARCHAR(50) NOT NULL, first_name VARCHAR(50) ...
true
cbf4e90f50641ad2ac1df0684ce34d0dbe0fc2f2
SQL
oglindalucian/circ18
/BD/New folder/baseCircuit/sql.sql
UTF-8
5,685
3.296875
3
[]
no_license
#------------------------------------------------------------ # Script MySQL. #------------------------------------------------------------ DROP DATABASE h18circuits; Create DATABASE h18circuits; use h18circuits; #------------------------------------------------------------ # Table: circuit #------------------...
true
20d741da573a7dd4378b7ac533103a75b086d796
SQL
kerrykato/SQL-Scripts
/ReturnsAudit/CHI_v1.sql
UTF-8
1,001
3.828125
4
[]
no_license
select * into #mfsts from dbo.listMfstsAccts('Delivery',null, null, -1, null); --with mfsts (AccountId, AcctCode, PublicationId, PubShortName, MfstCode, ManifestTypeId, ManifestTypeDescription, ManifestOwner, Frequency) --as --( -- select AccountId, AcctCode, PublicationId, PubShortName, MfstCode, ManifestTypeId, Man...
true
094d724131d333eddc451e4b397da02d9af74747
SQL
dbauz/sugtrad
/suggestion Xfury/suggestion sd2 mangos 2815.sql
UTF-8
1,182
2.6875
3
[]
no_license
-- ### Oculus vehicle spells scripts ### -- ruby DELETE FROM spell_script_target WHERE entry = 49464; INSERT INTO spell_script_target (entry, type, targetEntry, inverseEffectMask) VALUES (49464, 1, 27756, 0); -- emerald DELETE FROM spell_script_target WHERE entry = 49346; INSERT INTO spell_script_target (entry, type, t...
true
080297cc329848f4c837fa77061001e522c0ecda
SQL
maelker/TobeFree
/projet/sources/RSS/news.sql
UTF-8
1,801
3.0625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.5.4.1deb2ubuntu2 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Mar 16, 2018 at 05:34 PM -- Server version: 5.7.21-0ubuntu0.16.04.1 -- PHP Version: 5.6.33-3+ubuntu16.04.1+deb.sury.org+1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40...
true
9452242777f8c034f7978c19973fd371b0fbd334
SQL
nelsongomezr/simulacro
/simulacro.sql
UTF-8
9,140
3.25
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.1 -- https://www.phpmyadmin.net/ -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 15-10-2021 a las 18:51:16 -- Versión del servidor: 10.4.11-MariaDB -- Versión de PHP: 7.4.3 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; ...
true
23d93483379d3a8ba5f77c6017e3291f8470797f
SQL
DHorrible/bmstu_db_coursework_2020
/queries/1.sql
UTF-8
143
2.765625
3
[]
no_license
select month(`datetime`) as `month`, count(*) as `transactions` from `transaction_history` where year(`datetime`) = 2020 order by `month`
true
05ceec27468e211a47c3202d5cc8a9248f37959d
SQL
infoshareacademy/jdszr2-DataResearchers
/sql/scripts/above_65yo.sql
UTF-8
721
3.71875
4
[]
no_license
select party, avg(above_65) as AVG, percentile_disc(0.25) within group (order by above_65) as Q1, mode() within group (order by above_65) as MEDIAN, percentile_disc(0.75) within group (order by above_65) as Q3, stddev(above_65) as STD from ( (select county, party, candidate, votes ,AGE775214 as above_65 from ( ...
true
e087c9c12fb5384b7538e87dc789e0646ee309e6
SQL
luffylg/zjujournals_en
/search/init.sql
UTF-8
773
3.03125
3
[]
no_license
#drop database if exists zdxbmsg; #重新建立一个zdxbmsg数据库 #create database zdxbmsg; #把zdxbmsg切换为当前用数据库 use zdxbmsg; #grant select, insert, update, delete on zdxbmsg.* to 'zdxb'@'127.0.0.1' identified by 'zdxb'; #创建表artmsg create table artmsg ( `title` varchar(150) not null, `status` varchar(50) not null, `statusT...
true
df9d3fac3f965f4484d6304f492ed15488f00cb2
SQL
gutogirardon/Training
/Treinamento/Termo de Abertura de Projeto (Project Charter)/Lucas Abner/CRUD/importarbanco/banco.sql
UTF-8
3,253
3.375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: 30-Jul-2018 às 04:04 -- Versão do servidor: 10.1.34-MariaDB -- PHP Version: 7.2.7 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
true
f911e7a12cbeb59cfc9c4d72c9267107eec48afb
SQL
yucigou/hello-objection
/objection.sql
UTF-8
1,674
4.0625
4
[]
no_license
CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; CREATE TABLE people ( id UUID DEFAULT uuid_generate_v4() PRIMARY KEY, firstname TEXT, lastname TEXT ); CREATE TABLE animals ( id UUID DEFAULT uuid_generate_v4() PRIMARY KEY, name TEXT, ownerid UUID NOT NULL REFERENCES people ); CREATE TABLE users ( ...
true
6c58549651ea5db8bd84a1a2e7a16cbb2f306626
SQL
BancoDatosNaturaleza/Listas_IEPNB
/Sentencias_SQL/Sentencias_LC/LC_IFN_MateriaOrg.sql
UTF-8
959
2.609375
3
[]
no_license
CREATE TABLE "LC_IFN_MATERIAORG" ( "ID_MATORG" VARCHAR2(1) NOT NULL, "NB_MATORG" VARCHAR2(50) NULL, "DS_MATORG" VARCHAR2(200) NULL, CONSTRAINT "PK_LC_IFN_MATERIAORG" PRIMARY KEY ("ID_MATORG") ) ; /*Insert "LC_IFN_MATERIAORG"*/ Insert into LC_IFN_MATERIAORG (ID_MATORG,NB_MATORG,DS_MATORG) valu...
true
380be2c420fd8e49053838ead9783efa87fa9824
SQL
navikt/veilarbaktivitet
/patcher/FAGSYSTEM-170502.sql
UTF-8
3,261
4.125
4
[ "MIT" ]
permissive
-- Problemet er at for noen aktiviteter finnes det flere versjoner som er gjeldende. -- Dette er et resultat av race-conditions i insertAktivitet. Forhåpentligvis vil disse ikke oppstå etter at kafka er tatt i bruk for sett-til-historisk alter session set current_schema=veilarbaktivitet; -- finner alle aktiviteter so...
true
42d12920a16a7806b59ca657b753df3cb702acd4
SQL
reubber/projeto-gac
/pglScripts/categorias.sql
UTF-8
337
2.984375
3
[ "MIT" ]
permissive
-- Table: public.categorias -- DROP TABLE public.categorias; CREATE TABLE public.categorias ( id_categ integer NOT NULL DEFAULT nextval('categoria_id_categ_seq'::regclass), categ_nome character varying(55), CONSTRAINT categ_id PRIMARY KEY (id_categ) ) WITH ( OIDS=FALSE ); ALTER TABLE public.categorias OWNE...
true
146b81f6df550cbc720ab8ad313110880d6dafad
SQL
WilliamWachholz/B1Base
/B1Base/SQL/HANA/GetListAvailableBatch.sql
UTF-8
403
3.65625
4
[]
no_license
SELECT "OBTQ"."SysNumber", "OBTN"."DistNumber", (COALESCE("OBTQ"."Quantity",0) - COALESCE("OBTQ"."CommitQty",0)) AS "Quantity" FROM "OBTQ" INNER JOIN "OBTN" ON "OBTQ"."SysNumber" = "OBTN"."SysNumber" AND "OBTQ"."ItemCode" = "OBTN"."ItemCode" WHERE "OBTQ"."ItemCode" = '{0}' AND "OBTQ"."WhsCode" = '{1}' AND(COALESC...
true
17882f01ddc207b4696434239ee75229d1174553
SQL
HoangThiThuy2898/test_Project1
/DB.sql
UTF-8
13,131
3.3125
3
[ "MIT" ]
permissive
drop database if exists ProjectDB; create database ProjectDB; use projectDB; create table User( userId int auto_increment not null primary key, userName varchar(255) not null, pass varchar(255) not null, phone varchar(20) not null, address varchar(255), dateOfBirth date ); create table categorys( categoryId int prim...
true
488234c982c2b23712ca851d25ce3fe6350342dc
SQL
ignas26/PHP-nd
/projektas/forum/projektasFINAL.sql
UTF-8
12,189
2.84375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.7.7 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Apr 03, 2018 at 01:41 AM -- Server version: 10.1.30-MariaDB -- PHP Version: 7.2.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
true
a40eef08d799847e0fa6ae880bde2b4db72fb392
SQL
graphium-project/graphium
/postgis/db/02_from_v1_to_v2_create_subscriptions.sql
UTF-8
1,879
3.65625
4
[ "MIT", "BSD-3-Clause", "EPL-1.0", "LGPL-2.0-or-later", "Apache-2.0" ]
permissive
CREATE TABLE graphs.subscription_groups ( id serial NOT NULL, name character varying(255) NOT NULL, graph_id bigint NOT NULL, CONSTRAINT groups_pk PRIMARY KEY (id), CONSTRAINT groups_unq UNIQUE (name), CONSTRAINT groups_waygraphs_fk FOREIGN KEY (graph_id) REFERENCES graphs.waygraphs (id) MATCH S...
true
081a21f81dc36511c46372b0555732a5556b295b
SQL
johndpope/spy611scripts
/script/backtests/qry_np.sql
UTF-8
1,317
3.046875
3
[]
no_license
-- -- ~/spy611/scrnpt/backtests/qry_np.sql -- -- Demo: -- ./psqlmad.bash -f qry_np.sql -- I use this scrnpt to query the contents of 'initial predictions' tables. SELECT algo ,COUNT(algo) count_algo FROM np_n1dg GROUP BY algo ORDER BY algo ; SELECT algo ,COUNT(algo) count_algo FROM np_n2dg GROUP BY algo ORDER BY al...
true
64a090025d5e78e163816e61f5e1c948ab4224a9
SQL
miggestein/pruebas
/prueba.sql
UTF-8
1,473
2.90625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Feb 16, 2019 at 05:01 PM -- Server version: 10.1.37-MariaDB -- PHP Version: 7.3.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
true
217328d70807fc0f183dc5a97694b53cd598de13
SQL
TheONEShafiq/Thinkful_Exercises
/sql_seflexam_naep_12182019.sql
UTF-8
1,734
4.0625
4
[]
no_license
--1 SELECT column_name, is_nullable, data_type FROM information_schema.COLUMNS WHERE table_name = 'naep' --2 SELECT * FROM naep limit 50 --3 SELECT "state", COUNT("avg_math_4_score") AS "count_math_4_score", min("avg_math_4_score") AS "min_math_4_score", max("avg_math_4_score") AS "max_math_4_sc...
true
21b853bdc487f2cbb11b3a7710a8af7eb739acf0
SQL
TaijiroInoue/20210924
/kadai07/gsacf_d03_02.sql
UTF-8
2,026
3.09375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.1.1 -- https://www.phpmyadmin.net/ -- -- ホスト: localhost -- 生成日時: 2021 年 9 月 24 日 03:06 -- サーバのバージョン: 10.4.21-MariaDB -- PHP のバージョン: 8.0.10 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CL...
true
2d9c628d13efffd11c249b53250ccb0068cc1536
SQL
nagerz/HomeTracker_BE
/src/main/resources/schema-postgres.sql
UTF-8
2,251
3.546875
4
[]
no_license
DROP TABLE IF EXISTS projects cascade; DROP TABLE IF EXISTS rooms cascade; DROP TABLE IF EXISTS materials cascade; DROP TABLE IF EXISTS room_materials; CREATE TABLE projects(id serial PRIMARY KEY, name VARCHAR(100), description VARCHAR(100), address VARCHAR(100), city VARCHAR(100), state VARCHAR(100), zip_code VARCHAR...
true
6739f9977d62d020295c9d6dbfe9fa5d61e67404
SQL
sciserver/sqlloader
/dr18/mssql_tables.sql
UTF-8
84,496
2.734375
3
[]
no_license
DROP TABLE IF EXISTS dbo.dr18_allwise CREATE TABLE dbo.dr18_allwise ( designation varchar(100), ra numeric(10,7), "dec" numeric(9,7), sigra numeric(7,4), sigdec numeric(7,4), sigradec numeric(8,4), glon numeric(10,7), glat numeric(9,7), elon numeric(10,7), elat numeric(9,7), ...
true
80da68944da01f3ecfb3522300be266b487dabd0
SQL
zhaom5/w18brown
/server/SQL/caraway.sql
UTF-8
13,287
2.875
3
[]
no_license
-- MySQL dump 10.13 Distrib 5.7.21, for Linux (x86_64) -- -- Host: localhost Database: caraway -- ------------------------------------------------------ -- Server version 5.7.21 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!...
true
3986163cf2380295a1c8a7b245a3c2a0df1ef809
SQL
CaMMelo/desafio_tikal
/docker/database/dump.sql
UTF-8
704
3
3
[]
no_license
create table if not exists crud_cliente ( id serial primary key, nome varchar(80) not null, rg varchar(14) not null unique, cpf varchar(11) not null unique, data_nascimento date not null, sexo varchar(1) not null ); create table if not exists crud_telefone ( id serial primary key, ddd ...
true
5e8d85648268a923b55925a640d334fe1636a03d
SQL
Jambrose777/JacobAmbroseWCAStatistics
/NumDelegatesAtComp/query.sql
UTF-8
233
3.5625
4
[]
no_license
SELECT competitionId, COUNT(DISTINCT personId) as delegates FROM Results WHERE personId IN (SELECT wca_id FROM `users` WHERE delegate_status IS NOT NULL ) GROUP BY CompetitionId ORDER BY delegates DESC LIMIT 100
true
e771ec94421f0400e6a08ea26e8ef797bd517d5a
SQL
kkazmi/crm
/crm.sql
UTF-8
14,878
2.90625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.4.14 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Apr 30, 2016 at 09:41 PM -- Server version: 5.6.26 -- PHP Version: 5.5.28 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;...
true
0715d560c01b6fbafa41168848afdc95bc378774
SQL
satelit-project/satelit-index
/sql/query/index_files.sql
UTF-8
643
3.71875
4
[]
no_license
-- name: CountIndexFiles :one -- Returns number of index files with given hash. select count(*) from anidb_index_files where hash = $1; -- name: AddIndexFile :exec -- Adds new index file with given hash, source and remote path or does nothing if index file already exists. insert into anidb_index_files (hash, source, f...
true
f3faacbc2379b0360215c27df898b87a9cfaf3fc
SQL
silence-do-good/stress-test-Postgres-and-MySQL
/dump/high/day13/select1844.sql
UTF-8
178
2.65625
3
[]
no_license
SELECT timeStamp, temperature FROM ThermometerOBSERVATION o WHERE timestamp>'2017-11-12T18:44:00Z' AND timestamp<'2017-11-13T18:44:00Z' AND temperature>=15 AND temperature<=66
true
0bd7eac272e1e7726075ec2160ed3a9c56b1e4e0
SQL
chelseaisgood/ADBHomework2
/Q1/PostgreSQL/p4/PostgreSQL_p4.sql
UTF-8
1,485
3.84375
4
[]
no_license
drop table if exists temp; drop table if exists temp1; drop table if exists temp2; drop table if exists temp3; drop table if exists temp4; drop table if exists temp5; drop table if exists temp6; create temporary table temp as (select stocksymbol, stocktime, price from stock order by stocksymbol asc, stocktime asc); c...
true
12a13a7aafa6bc1464b591e21055ef10c3141c1d
SQL
stanreport/bdit_data-sources
/volumes/miovision/sql/populate-table-volumes.sql
UTF-8
737
3.609375
4
[]
no_license
TRUNCATE miovision.volumes; INSERT INTO miovision.volumes (intersection_uid, datetime_bin, classification_uid, leg, movement_uid, volume) SELECT B.intersection_uid, (A.datetime_bin AT TIME ZONE 'America/Toronto') AS datetime_bin, C.classification_uid, A.entry_dir_name as leg, D.movement_uid, A.volume FROM miovision.r...
true
879c3dfbfa3f9e15d412f50b84915f5184ccd2d7
SQL
Macr0pyre/PersonalBlog
/Database creating.sql
UTF-8
1,280
3.625
4
[]
no_license
create database PersonalBlog use PersonalBlog create table Users ( ID int IDENTITY(1,1) NOT NULL CONSTRAINT PK_Users PRIMARY KEY, Login nvarchar(max) NOT NULL, PasswordHash nvarchar(max) NOT NULL, PageID int NOT NULL ) create table Pages ( ID int IDENTITY(1,1) NOT NULL CONSTRAINT PK_Pages PRIMARY KEY, Name varchar(25...
true
4e3674b47db6d6ea5b602a4fb899863c67c4ed7d
SQL
shobes572/thinkful
/baseball_practice.sql
UTF-8
610
3.703125
4
[]
no_license
--Return all records of people not born in the USA whose first name starts with the letter Y. SELECT * FROM people WHERE birthcountry!='USA' AND LEFT(namefirst,1)='Y'; --Return all records of people born between 1980 and 1985 either throw or bat with their right arm. SELECT * FROM people WHERE (bats='R' OR throws='R...
true
5ae822da56a5faade89ff427c700c5da94acae47
SQL
TitaniumBrain/Starboard-2
/app/database/types.sql
UTF-8
216
2.625
3
[ "MIT" ]
permissive
DO $$ BEGIN IF NOT EXISTS ( SELECT * FROM pg_type WHERE typname = 'patron_status' ) THEN CREATE TYPE patron_status AS ENUM ( 'no', 'declined', 'yes' ); END IF; END; $$
true
337c6709882ce915c00a1a6fb705e985f4b6de3d
SQL
hhrianyk/BASICS_OF_DATABASES
/Trade enterprise/Trade enterprise.sql
UTF-8
9,275
4.1875
4
[]
no_license
# ///////4//// #4.1 SELECT * FROM товари ORDER BY Ціна_закупки; #4.2 SELECT Назва_товару,Ціна_закупки FROM товари WHERE `Ціна_закупки`>3000 ORDER BY `Ціна_закупки` DESC; #4.3 SELECT sum(Кількість * Ціна) AS прибуток FROM партія ; #4.4 SELECT Код_товара, (`Кількість`*`Ціна`) AS Прибуток FROM Партія WHERE `Кількість`>10...
true
6e8281432affa98eb689981b06e315742e20be60
SQL
silence-do-good/stress-test-Postgres-and-MySQL
/dump/low/day23/select1531.sql
UTF-8
267
3.15625
3
[]
no_license
SELECT sen.name FROM SENSOR sen, SENSOR_TYPE st, COVERAGE_INFRASTRUCTURE ci WHERE sen.SENSOR_TYPE_ID=st.id AND st.name='Thermometer' AND sen.id=ci.SENSOR_ID AND ci.INFRASTRUCTURE_ID=ANY(array['4026','3089','6039','6074','1413','1407','2092','4061','2051','4091'])
true
55d34f34f570b83be941005bb7a4bdcb30c5072d
SQL
leskovsky1/FRI
/Bc/4.semester/zaklady databazovych systemov/databazy/pomocky z predoslych rokov/ZDBS/ZDBS/!_ZDBS cvika, prednasky,testy,skusky/Testy a iné materiály k zápočtu a skúške/zds/sql/tise_new2.sql
UTF-8
49,140
3.09375
3
[]
no_license
CREATE TABLE TYP_UBYT ( ID INTEGER NOT NULL, POPIS INTEGER NULL ); ALTER TABLE TYP_UBYT ADD ( PRIMARY KEY (ID) ) ; CREATE TABLE STAT ( NAZOV VARCHAR2(240) NOT NULL, ID INTEGER NOT NULL, SKRATKA ...
true
fdb1e1829a56115ae7776a9e605c6aca6cd97126
SQL
bellmit/researchmeng2
/derby/467793_DERBY-1377/from/joinDeadlock.sql
UTF-8
951
3.5625
4
[]
no_license
disconnect; connect 'wombat;user=U1' AS C1; autocommit off; connect 'wombat;user=U2' AS C2; autocommit off; set connection C1; -- user 1 for bug 1573 -- a deadlock when reopening a join gets an assertion -- violation in close() create table outer1(c1 int); create index o1_i1 on outer1(c1); insert into ou...
true
d377bc969487b7d0ee9f1f11c02eed1fa179a78f
SQL
pared-adp/CPTS-451-Yelp-project
/dump.sql
UTF-8
10,998
3.09375
3
[]
no_license
-- -- PostgreSQL database dump -- -- Dumped from database version 11.2 -- Dumped by pg_dump version 11.2 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_catalog.set_config('search_pa...
true
59fa9e56151f941ce284c0a3ebd70533bcd57ed7
SQL
tchiphuong/sales-managerment
/document/script/script.sql
UTF-8
5,012
2.9375
3
[]
no_license
CREATE DATABASE `sales` CHARACTER SET utf8 COLLATE utf8_general_ci; USE `sales`; CREATE TABLE `ms_categories` ( `id` INT NOT NULL AUTO_INCREMENT, `code` VARCHAR(10), `name_vn` VARCHAR(50), `name_en` VARCHAR(50), `status` INT, PRIMARY KEY (`id`) ); INSERT INTO `ms_categories` (`code`...
true
5c4f6f7943dfb68f617f0dfd665bdbbcc1728ecd
SQL
aminazar/iran-insight
/sql/person/getPersonExpertise.sql
UTF-8
323
2.9375
3
[]
no_license
select person_expertise.peid, person_expertise.expertise_id, expertise.name_en, expertise.name_fa, expertise.is_education from person inner join person_expertise on person.pid = person_expertise.pid inner join expertise on expertise.expertise_id = person_expertise.expertise_id where person.pid = ${p...
true
b89411c328ff973590586e7b5f1d08295792f3f9
SQL
hw79chopin/MySQL-Codebook
/SQL 스터디/프로그래머스/pgm(SELECT) 동물의 아이디와 이름.sql
UTF-8
202
2.640625
3
[]
no_license
-- 동물 보호소에 들어온 모든 동물의 아이디와 이름을 ANIMAL_ID 순으로 조회하는 SQL문을 작성해주세요. SELECT ANIMAL_ID, NAME FROM ANIMAL_INS ORDER BY ANIMAL_ID;
true
33e857507fc0d10b48177fc6b9b570e3a2bcc388
SQL
yaswanth89kumar/employe
/employee_recent.sql
UTF-8
2,747
3.171875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.7.0 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 <<<<<<< HEAD -- Generation Time: Sep 22, 2017 at 06:39 AM ======= -- Generation Time: Sep 21, 2017 at 07:51 AM >>>>>>> 229c209eddc06c66ae2cea91b757a8f4c749f6c0 -- Server version: 10.1.26-MariaDB -- PHP Version: 7.1.8 SET SQL_M...
true
cb7e2d6d89d7c83b67cdfc71b00b3e1896e96b4d
SQL
giraruba99/Pewlett_Hackard_Analysis
/Queries/queries.sql
UTF-8
6,085
4.21875
4
[]
no_license
--just to begin, we are looking for employees nearing retirement by just looking their birth date SELECT first_name, last_name FROM employees WHERE birth_date BETWEEN '1952-01-01' AND '1955-12-31'; SELECT first_name, last_name FROM employees WHERE birth_date BETWEEN '1952-01-01' AND '1952-12-31'; SELECT first_name, las...
true
442eb2cbb7cb29f85e952e7dd8cbd759cc6f6f49
SQL
LoganBanning/sql-1-wrpt3
/practice.sql
UTF-8
823
3.703125
4
[]
no_license
SELECT * FROM artist; SELECT first_name, last_name, country FROM employee; SELECT name, composer, milliseconds FROM track WHERE milliseconds > 299000; SELECT count(*) FROM track WHERE milliseconds > 299000; SELECT avg(milliseconds) FROM track; SELECT count(*) FROM invoice WHERE billing_country = 'USA'; SELECT * ...
true
b51eb808eeaaca04ddd0c6d79cc6dc0ad94dedfd
SQL
Tomohiro-Hayashi/matchscout_predictor
/応募モデル/target/work_list.sql
UTF-8
752
3.15625
3
[]
no_license
SELECT wb.id work_id, wb.company_id,--除外求人設定にcompany_idを使う wb.age_upper, wb.gender work_gender, wb.salary, wb.salary_system, wb.salary_options FROM jstaff.work_base wb --掲載中の企業のみ抽出 INNER JOIN jstaff.companies c ON wb.company_id = c.id INNER JOIN jstaff.company_scores cs ON wb.company_id ...
true
c868584c2c14a9b39f8af80ad4584c9871763d92
SQL
Hakim2016/30EBS
/R12/1.Hitachi/6.SQL from churong/查LOV来源.sql
UTF-8
139
2.65625
3
[]
no_license
select sa.SQL_TEXT from v$session se, v$sqlarea sa where se.PREV_HASH_VALUE = sa.HASH_VALUE and se.AUDSID = 41681718 --DB_SESSION_ID
true
e4a222b4e9a53b0a127118631324ed74e81fca23
SQL
TonyKartony/BI-Lab-2017
/_0. DWH/Projects/Maryna_Hlazunova/batches/3nf09_batch_categories/ext_refer_products.sql
UTF-8
1,271
2.90625
3
[]
no_license
/**===============================================*\ Name...............: External table ext_locations SA_SRC layer Contents...........: Create table description Author.............: Maryna Hlazunova Date...............: 27-Nov-2017 \*=============================================== */ DROP TABLE ext_refer_produ...
true
e901e2158c5f5919ccb696c961b0583325c26102
SQL
Lpmartinez1109/Employee_Management_System
/Master/db/seed.sql
UTF-8
697
3.25
3
[]
no_license
use employee_db; insert into department(name) values ("Sales"), ("Engineering"), ("Finance"),("Legal"); insert into role (title, salary, department_id) values ("Sales Lead", 100000, 1), ("Salesperson", 80000, 1),("Lead Engineer", 150000, 2), ("Software Engineer", 120000, 2), ("Account Manager", 160000, 3), ("Accounta...
true
58d78ee34390390af45f504aec5a37453c80a8b1
SQL
fdrennan/biggr
/inst/sql/nyc.sql
UTF-8
1,608
2.53125
3
[]
no_license
CREATE TABLE nyc ( "Summons" varchar, "Plate ID" varchar, "Registration State" varchar, "Plate Type" varchar, "Issue Date" varchar, "Violation Code" double precision, "Vehicle Body Type" varchar, "Vehicle Make" varchar, "Issuing Agency" varchar, "Street Code1" varchar, "Street Code2" varchar, "S...
true
abad09a2005503f3019744b3857c79e8f8c78864
SQL
yuvarajsridhar/Restaurant
/Restaurant/function/fn_validationoforderid.sql
UTF-8
451
2.984375
3
[]
no_license
DELIMITER $$ USE `hms`$$ DROP FUNCTION IF EXISTS `validation_of_order_id`$$ CREATE DEFINER=`root`@`localhost` FUNCTION `validation_of_order_id`(order_ids INT) RETURNS TEXT CHARSET utf8 BEGIN IF EXISTS(SELECT order_details.order_id FROM order_details WHERE order_details.order_id=order_ids) THEN ...
true
f7a09dca1983eaa120b16094022640366e68e134
SQL
vsaraminev/Databases-Basics-MS-SQL-Server-09.2017
/Exams/16October2016/20. Update Trigger.sql
UTF-8
508
3.578125
4
[]
no_license
CREATE TRIGGER tr_ArriveFlights ON Flights AFTER UPDATE AS INSERT INTO ArrivedFlights (FlightID, ArrivalTime, Origin, Destination, Passengers) SELECT FlightID ,ArrivalTime ,orig.AirportName AS OriginAirport ,dest.AirportName AS DestinationAirport ,(SELECT COUNT(*) FROM Tickets WHERE FlightID = i.FlightID) AS ...
true
497b3ff0f0d0fd7c36b89ef82bf41f5568007356
SQL
dmvstar/ugb-vuejs-meest
/src/bankid/logs/pgsql/clog-easypay-errors-1502-4.sql
UTF-8
931
3.203125
3
[]
no_license
-- @WHERE clog-easypay-errors-1502-4.sql -- @WHAT for send notifications -- STEP 1 SELECT cls.reqid , cls.payload -> 'person' -> 'inn' AS inn , * FROM cllogs cls WHERE cls.reqid IN ( SELECT DISTINCT reqId FROM cllogs cl JOIN cllast last ON cl.date >= last.date WHERE 1 = 1 AND cl.source...
true
1b482b42dbd3a29ab19b52a6cf21adf5c17bd9aa
SQL
raj638111/hudiexamples
/a20_Tables(Copy_on_Write, Merg_on_Read)/c20_Advantage+^.sql
UTF-8
393
2.78125
3
[]
no_license
Apart from having the same advantage of Copy on Write table, Additional advantage includes, + We now have commits every 1 minute - which might be highly inefficient in Copy-on_Write table because of 'synchronous merge' vis-a-vis the 'asynchronous merge' achieved through the use of delta files + Compaction ...
true
16a9ad03b6538ffc5ea45f81edf2841739bdcaf2
SQL
silence-do-good/stress-test-Postgres-and-MySQL
/dump/high/day16/select0843.sql
UTF-8
178
2.625
3
[]
no_license
SELECT timeStamp, temperature FROM ThermometerOBSERVATION o WHERE timestamp>'2017-11-15T08:43:00Z' AND timestamp<'2017-11-16T08:43:00Z' AND temperature>=23 AND temperature<=41
true
45ea0a8ea5a88cae300504f54b3d51a5b9be30e5
SQL
Bilyukov/php-mysql-course
/examples/10.advanced-mysql/06.union-multiple-tables.sql
UTF-8
243
3.359375
3
[]
no_license
( SELECT CountryCode AS `Code`, Percentage AS 'Info' FROM world.countrylanguage WHERE Percentage > 50 AND Percentage < 55 ) UNION ( SELECT `Code`, Continent AS `Info` FROM world.country WHERE Continent LIKE '%America' ) ORDER BY `Code`
true
067b7e0cb5644b6bcd5af04168be73e31721d14f
SQL
eivaremir/programador-mibus
/P2/2.E. Promedio de ingresos por hora.sql
UTF-8
250
2.90625
3
[]
no_license
Select avg(Monto_por_hora) as "promedio_por_hora" from (SELECT sum(TarifaMonto) as "Monto_por_hora", DATE_FORMAT(FechaTransaccion, '%d-%m-%Y %H:%m') AS 'Hora' FROM blaisesocial.trx GROUP BY Hora) as montos_por_hora;
true
10eb0928073735f2530c02182770d58d8ccf01a1
SQL
ivashenyuk/Eleks-Database-Camp-2018-Lecture-08
/Test Project/Test Project/dbo/Stored Procedures/SelectInformation.sql
UTF-8
1,019
3.71875
4
[]
no_license
 -- stored procedure create procedure SelectInformation ( @ListCountries varchar(max) = '', @TypeAddress varchar(50) = null, @City varchar(65) = null, @MinCountOffice int = 0 ) as begin select distinct(City), StateProvince, countOffice, CountryRegion from SalesLT.CustomerAddress as cusAddr outer apply ( ...
true
bf4afdfdf39f477b6733d66828fb62c974679146
SQL
VeselinAtanasov/mysql-database-demos
/mysql-database-demos/07_DatabaseProgrammability/lab/tasks/06_EmployeeBySalaryLevel_BETTER.sql
UTF-8
401
3.65625
4
[]
no_license
DELIMITER $$ CREATE PROCEDURE usp_get_employees_by_salary_level ( IN salary_level VARCHAR(10) ) BEGIN SELECT e.first_name, e.last_name FROM employees e WHERE CASE WHEN salary_level = 'Low' THEN e.salary < 30000 WHEN salary_level = 'Average' THEN e.salary <= 50000 WHEN salary_level = 'High' THE...
true
b3b7384b4056d44527f89690c8ad898763481726
SQL
violet2016/scripts
/select_cpu.sql
UTF-8
2,009
3.421875
3
[]
no_license
with diff_cpu as ( select metrics_name, container_name, pod_name, metrics_value, sample_time, metrics_value - lag(metrics_value) over (partition BY pod_name order by pod_name, sample_time) as cpu from raw_result_0920_1 where metrics_name like '%cpu_usage%' and pod_name like 'group1%' and container_name = 'group...
true
5a17949676d4d6a0f7ceb46c27870450bc1337e3
SQL
veashwinikumar/star9000
/franc906_star9000.sql
UTF-8
10,939
3.046875
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.7.3 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3306 -- Generation Time: Aug 09, 2019 at 06:44 AM -- Server version: 5.6.36-82.1-log -- PHP Version: 5.6.30 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SE...
true
771689462e2122f4bde7925b9a90ab07b5eb7c18
SQL
zwong91/cyaServer
/Document/DB/数据库备份/20171208/sgsverify.sql
UTF-8
9,240
3.25
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : root Source Server Version : 50515 Source Host : localhost:3306 Source Database : sgsverify Target Server Type : MYSQL Target Server Version : 50515 File Encoding : 65001 Date: 2017-12-08 11:19:04 */ SET FOREIGN_KEY_CHECKS=0; -- ----...
true
e1ffddf0517aac1d236893bab08f57bdc0ee8df9
SQL
A1exanderAlexeyuk/PLE_obesity_vs_hypertension_stroke
/obesity.sql
UTF-8
6,965
4.21875
4
[]
no_license
IF OBJECT_ID('@resultsDatabaseSchema.@comparator_cohort_table', 'U') IS NOT NULL DROP TABLE @resultsDatabaseSchema.@comparator_cohort_table; CREATE TABLE @resultsDatabaseSchema.@comparator_cohort_table ( cohort_definition_id INT, subject_id BIGINT, cohort_start_date DATE, cohort_end_date DATE ); CREATE TEMP TABLE ...
true
a5b9b8f1643ad2014424b97da0481744c336a120
SQL
dazzul94/fast_data_study
/모두를위한SQLDB/PART4/20200418.sql
UTF-8
7,508
3.296875
3
[]
no_license
-- 유저별 장르 선호도에 대한 데이터셋 만들기 select * from rating r inner join ( select m.movieid, m.title_nm, m.release_year, m.genres_nm, case when m.genres_nm like '%Action%' then 1 else 0 end action_yn, case when m.genres_nm like '%Adventure%' then 1 else 0 end adventure_yn, case when m.genres_nm like '%Children''s%' ...
true
a26a944da616e3694151d27a14dcc8dab96c52fc
SQL
sz1829/nmu
/Accounting2_indiv.sql
UTF-8
1,340
3.375
3
[]
no_license
/* click one order */ /* first for the little window in the left corner*/ SELECT currency, revenue, cost, coupon, total_profit FROM IndividualTourOrder WHERE transaction_id = '123'; /* and then, get the list*/ SELECT currency, payment_amount, cc_id, coupon FROM TourDetails WHERE indiv_collection_id = 250; /* update...
true
93bb0eb50b032a755e0b466b691a8191fe8aa612
SQL
tomxwd/MySQL-Basic
/1基础查询.sql
UTF-8
1,685
4.28125
4
[]
no_license
# 1. 查询表中的字段 select last_name from employees; # 2. 查询表中的多个字段 select last_name, salary, email from employees; # 3. 查询表中的所有字段 select employee_id, first_name, last_name, email, phone_number, job_id, salary, commission_pct, manager_id, department_id, hir...
true
1550b6dc87f2fc728e68154bfe93a2ffc0bf5f7d
SQL
asafebymarques/twitter_clone
/twitter_clone.sql
UTF-8
3,486
3.046875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.4.15.7 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: May 25, 2019 at 05:37 PM -- Server version: 5.6.37 -- PHP Version: 7.1.8 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */...
true
e6bc6f062395eadff069956f1aee4bae66bcadd1
SQL
DaniAngelov/SQL-
/HackerRank SQL/Aggregation/Weather Observation Station 13.sql
UTF-8
126
2.78125
3
[]
no_license
-- github.com/DaniAngelov select cast((sum(lat_n)) as decimal(16,4)) from station where lat_n > 38.7880 and lat_n < 137.2345
true
d7f430f3a52093b6f189a3a845d6d9e8504507ae
SQL
ygouzerh/pilbifarmer
/sql/farmer.sql
UTF-8
799
3.453125
3
[]
no_license
CREATE TABLE Commande ( planteID varchar(80) NOT NULL , date_heure datetime NOT NULL , periode int NOT NULL , commande text NOT NULL , executed bit NOT NULL , PRIMARY KEY ( planteID,date_heure,periode ) ); CREATE TABLE Mode ( planteID varchar(80) NOT NULL , arr...
true