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
c930b86e442123f0dfcbd37aaf547634bb249264
SQL
Fidel1985/Bot
/src/main/resources/db/migration/V2__Orders_grid.sql
UTF-8
255
2.828125
3
[]
no_license
CREATE TABLE `GRID` ( `ID` BIGINT NOT NULL, `PAIR` VARCHAR(50) NOT NULL, `OPERATION` VARCHAR(50) NOT NULL, `AMOUNT` DOUBLE NOT NULL, `PRICE` DECIMAL NOT NULL, `CREATE_DATE` DATETIME, CONSTRAINT `PK_GRID` PRIMARY KEY (`ID`) ); CREATE SEQUENCE grid_id_seq;
true
d442cdc6fdab96379ce2dd3249a480a4ed3235f8
SQL
nss-day-cohort-21/chinook-tedpennington
/sales_agent_total_sales.sql
UTF-8
208
3.671875
4
[]
no_license
SELECT Employee.EmployeeId, SUM(Invoice.Total) FROM Invoice JOIN Customer ON Invoice.CustomerId = Customer.CustomerId JOIN Employee ON Customer.SupportRepId = Employee.EmployeeId GROUP BY Employee.EmployeeId;
true
7026ae8359bed63d4201e9ed4ab1c4c93f45b844
SQL
praveenmadupu/SQL-Scripts
/tempdb only one data file.sql
UTF-8
84
2.609375
3
[]
no_license
SELECT COUNT(1) FROM tempdb.sys.database_files WHERE type = 0 HAVING COUNT(1) = 1
true
d8ec582025e6a3642aab2769e7474f1f9e769292
SQL
KennethS0/Judicial-Record-System
/SQL - Scripts/GE/DDL/Keys/Canton Keys.sql
UTF-8
309
3.5625
4
[]
no_license
-- PRIMARY KEY ALTER TABLE canton ADD CONSTRAINT canton_id_pk PRIMARY KEY(id) USING INDEX TABLESPACE ge_index PCTFREE 20 STORAGE (INITIAL 10k NEXT 10k PCTINCREASE 0); -- FOREIGN KEY ALTER TABLE canton ADD CONSTRAINT canton_province_fk FOREIGN KEY(province_id) REFERENCES province(id);
true
8293e4e2a3ede8565298a84d7cb10444b1248b2a
SQL
NicholasBaraldi/Meus-codigos-SQL
/Subqueries.sql
UTF-8
154
3.015625
3
[]
no_license
SELECT e.first_name, e.last_name FROM employees e WHERE e.emp_no IN (SELECT dm.emp_no FROM dept_manager dm);
true
bb763aec7c15ec1b9b954f19b53825d07129006f
SQL
sadopsa/JavaDesktop
/databases.sql
UTF-8
1,321
3.40625
3
[]
no_license
create table siswa( NIS varchar2(5) not null, Nama varchar2(30), ALAMAT varchar2(30), GENDER varCHAR2(5), primary key(NIS)); create table guru( NIP varchar2(5) not null, Nama Varchar2(30), ALAMAT varchar2(30), GENDER varCHAR2(5), primary key(NIP)); create table walikelas( IDWK varchar2(10) not null, N...
true
51fcc9ec610030dfeed2e6434d5800edf9002393
SQL
woodenbox/WoodenBox
/database/woodenbox_contents.sql
UTF-8
28,070
3.03125
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.2.7.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Mar 16, 2015 at 11:00 AM -- Server version: 5.5.39 -- PHP Version: 5.4.31 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */...
true
7035945447bc61ac8729a6531a0dd47fb5180e6f
SQL
cjstkrha5/inBitcamp
/src/main/java/sql/auction.sql
UTF-8
946
3.375
3
[]
no_license
create table auction_product ( pno int, kind varchar(100) not null, name varchar(100) not null, info text, photo varchar(100), sprice int default 0, cprice int default 0, eprice int default 0, sdt datetime, edt datetime, bidder varchar(100) constra...
true
c0557c8961b8872f1d61e7ea98cfff97451addba
SQL
hwangseongyeong/koroot
/db/create_teable.sql
UTF-8
2,645
3.625
4
[]
no_license
CREATE TABLE `board_info` ( `board_info_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '๊ฒŒ์‹œํŒ ์•„์ด๋””', `board_name` varchar(20) NOT NULL COMMENT '๊ฒŒ์‹œํŒ ๋ช…(๋ฉ”๋‰ด๋ช…)', `board_type` varchar(20) NOT NULL DEFAULT 'GENERAL' COMMENT '๊ฒŒ์‹œํŒ ํ˜•์‹', `deleted` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '0: ์‚ฌ์šฉ์ค‘, 1: ์‚ญ์ œ๋จ', `cr...
true
d65e030dc4a9e6c1b566129702c47b138737e957
SQL
dreamPis/oauth
/src/doc/table.sql
UTF-8
12,276
3.015625
3
[]
no_license
/* Navicat Premium Data Transfer Source Server : pg9.6 Source Server Type : PostgreSQL Source Server Version : 90610 Source Host : localhost:5432 Source Catalog : ndt Source Schema : boot Target Server Type : PostgreSQL Target Server Version : 90610 File Encoding ...
true
cb98e2fda0463edd5bbf4f87cf440ea91005f7de
SQL
taku-xhift/labo
/Sql/sqledi2_Sample/Sample/Ch07/7_1/List7_4.sql
SHIFT_JIS
200
2.515625
3
[ "MIT" ]
permissive
SELECT shohin_id, shohin_mei FROM Shohin WHERE shohin_bunrui = 'Lb`pi' UNION SELECT shohin_id, shohin_mei FROM Shohin2 WHERE shohin_bunrui = 'Lb`pi' ORDER BY shohin_id;
true
8673d61aa04ae5df4c9ec3b17f76e9e9e39782d3
SQL
jgarzonext/plsql-testing
/script_plsql/bd_iaxis/script/tables/SIN_AGENTES.sql
UTF-8
1,913
2.921875
3
[]
no_license
-------------------------------------------------------- -- DDL for Table SIN_AGENTES -------------------------------------------------------- CREATE TABLE "AXIS"."SIN_AGENTES" ( "SCLAVE" NUMBER, "CAGENTE" NUMBER, "CTRAMTE" NUMBER(4,0), "CRAMO" NUMBER(4,0), "CTIPCOD" NUMBER(4,0), "CTRAMITAD" VARCHAR2(...
true
de72720b04d11f2e95f265ad274f3cdd3952e5b1
SQL
srinathweb/nested-comment-master-dev
/nested.sql
UTF-8
1,994
3.203125
3
[ "MIT" ]
permissive
/* SQLyog Enterprise - MySQL GUI v7.15 MySQL - 5.6.16 : Database - nestedcomment ********************************************************************* */ /*!40101 SET NAMES utf8 */; /*!40101 SET SQL_MODE=''*/; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; /*!40101 S...
true
875559c165a4dc45d17e92c409fefc89890c9b5f
SQL
0xRamadan/HackerRank-Practice-SQL
/Basic Select/Higher Than 75 Marks.sql
UTF-8
222
2.984375
3
[]
no_license
-- Problem link: https://www.hackerrank.com/challenges/more-than-75-marks/problem?h_r=next-challenge&h_v=zen&h_r=next-challenge&h_v=zen -- my solution select name from students where marks > 75 order by right(name, 3), id
true
20ec1665f5e4e37e79b8c9716718f65046f5cf29
SQL
vitorgewe/dw_adventure_works
/models/staging/stg_sales_reason.sql
UTF-8
606
3.578125
4
[]
no_license
with sales_reason as ( select /* Primary key */ cast(salesreasonid as integer) as sales_reason_id /* Columns to use in final join */ , cast(reasontype as string) as reason_type , cast(`name` as string) as reason_description ...
true
5906c88fb3bd1e34d574cb5c00b9cecbdb077914
SQL
ryangillard/misc
/leetcode/197_rising_temperature/197_rising_temperature.sql
UTF-8
194
3.546875
4
[ "Apache-2.0" ]
permissive
# Write your MySQL query statement below SELECT A.Id FROM Weather AS A INNER JOIN Weather AS B ON DATEDIFF(A.RecordDate, B.RecordDate) = 1 WHERE A.Temperature > B.Temperature
true
9e994143264b597d9035cad07718b33b914b4664
SQL
gl3n0n/TPJ_System
/Documents/StoredProcedures/SF_COUNT_SUNDAYS_OP_20081112.sql
UTF-8
830
2.84375
3
[]
no_license
create or replace function sf_count_sundays_op ( p_empl_id in varchar2, p_date_fr in date, p_date_to in date, p_outer in varchar2 ) return number is dChkDate Date; nCtr Number := 0; nUpTO Number := 0; nDummy Number; begin nUpTo := (p_date_to-p_date_fr)+1; dChkDate := p_date_fr -1; ...
true
e56c3e68bf480b039665a635b0023d6ec99e7c9a
SQL
Hiroaki-Inomata/ORCA-5-1
/jma-receipt.r_5_1_branch/sql/4.3/orcadbup_nrrksrh_4.3.0-1.sql
WINDOWS-1252
446
2.875
3
[]
no_license
\set ON_ERROR_STOP drop table tbl_nrrksrh ; create table tbl_nrrksrh ( HOSPNUM numeric(2,0), PTID numeric(10,0), SRYYMD char(8), ZAINUM numeric(9,0), RRKNUM numeric(3,0), TERMID varchar(16), OPID varchar(16), CREYMD char(8), UPYMD char(8), UPHMS char(6) ); ALTER TABLE ONLY tbl_nrrksrh ADD CONSTRAINT tb...
true
8dcfc7953dd80b1775f3b2ba881386756da25300
SQL
parimalmahindrakar/Construction-Material-Management
/database/construction_material_management.sql
UTF-8
2,499
3.65625
4
[]
no_license
CREATE TABLE `client` ( `CLIENT_ID` int NOT NULL AUTO_INCREMENT, `CLIENT_NAME` varchar(60) DEFAULT NULL, `CITY` varchar(60) DEFAULT NULL, `COMPANY` varchar(60) DEFAULT NULL, PRIMARY KEY (`CLIENT_ID`) ); CREATE TABLE `contact_details` ( `CLIENT_ID` int DEFAULT NULL, `PHONE_NO` varchar(13) DEFAULT NULL, ...
true
534c3383199a684b49059c5103e2effb454ce039
SQL
silence-do-good/stress-test-Postgres-and-MySQL
/dump/high/day19/select2338.sql
UTF-8
178
2.640625
3
[]
no_license
SELECT timeStamp, temperature FROM ThermometerOBSERVATION o WHERE timestamp>'2017-11-18T23:38:00Z' AND timestamp<'2017-11-19T23:38:00Z' AND temperature>=14 AND temperature<=24
true
a1b7420446191b66de1871e7fe34e3429a241ca9
SQL
nishadianjalika/Tea-Management-Center
/t_center.sql
UTF-8
5,478
3.40625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.0.4 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Nov 22, 2015 at 07:16 PM -- Server version: 5.6.12-log -- PHP Version: 5.4.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT ...
true
66d6ffde6ea41dc117a21e194ea1f096204a240a
SQL
AndresGarcia1999/Challenge
/challenge_questions.sql
UTF-8
8,821
3.078125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.1.1 -- https://www.phpmyadmin.net/ -- -- Servidor: 127.0.0.1 -- Tiempo de generaciรณn: 12-09-2021 a las 21:42:44 -- Versiรณn del servidor: 10.4.21-MariaDB -- Versiรณn de PHP: 8.0.10 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
true
bed7fd0ab66e54b34de5f4fad64c431b4eb86d34
SQL
nag9s/PostGreSQL-Bootcamp-Udemy
/Conditional_Expressions_Procedures.sql
UTF-8
4,384
4.28125
4
[]
no_license
----------------------- Module CONDITIONAL EXPRESSION and PROCEDURE ----------------------------- ------ CASE ------- /* only to execute SQL code when certain conditions ar emet. Just like IF/ELSE for other programming languages. General and Expression CASE syntax. */ -- check customers that are in first 100 as prem...
true
96fd045e48794ad0ab1cea419a1ec4b3b26fba47
SQL
iastapov17/DS
/insert_to_cards_and_activities.sql
UTF-8
909
3.75
4
[]
no_license
INSERT INTO cards(num, uid, bonusprogramm) SELECT DISTINCT( c.num), up.id, c.bonusprogramm FROM userr us join card c on us.usid = c.usid join activity a on c.num = a.num join route r ON fromr = departure AND tor = arrival join flights f ON f.idr = r.idr AND f.flight = a.code join list_flight l on l.id_flight = f.idf AN...
true
198b6d6d08b37395aa2fd7f06115ded1a2fa49cf
SQL
sajanchandran/account-manager
/src/main/resources/data.sql
UTF-8
316
2.578125
3
[]
no_license
CREATE TABLE USER (ID INT NOT NULL AUTO_INCREMENT, FIRST_NAME VARCHAR(25) NOT NULL, SECOND_NAME VARCHAR(25) NOT NULL, ACCOUNT_NUMBER INT, PRIMARY KEY (ID)); INSERT INTO USER VALUES (1, 'John', 'Doe', '1234'); INSERT INTO USER VALUES (2, 'Jane', 'Doe', '1235'); INSERT INTO USER VALUES (3, 'Jim', 'Taylor', '1236');
true
2d0779b4aaddd23a8b7679587b133b8627499675
SQL
alperkonuralp/SqlOrnekleri
/20100823/SQLQuery28.sql
UTF-8
210
3.640625
4
[]
no_license
SELECT Orders.OrderID, Orders.OrderDate, Orders.CustomerID, Customers.CustomerID, Customers.CompanyName FROM Orders INNER JOIN Customers ON Orders.CustomerID = Customers.CustomerID Order By Orders.CustomerID
true
7f21b45ea7ab414b8946d87329cf979d177ab6b1
SQL
yvvys/yvvy
/data/news.sql
UTF-8
1,827
2.578125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version phpStudy 2014 -- http://www.phpmyadmin.net -- -- ไธปๆœบ: localhost -- ็”Ÿๆˆๆ—ฅๆœŸ: 2015 ๅนด 09 ๆœˆ 18 ๆ—ฅ 17:42 -- ๆœๅŠกๅ™จ็‰ˆๆœฌ: 5.5.40 -- PHP ็‰ˆๆœฌ: 5.3.29 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_CHARA...
true
d0fc3539016f340933bb4e2165c954254975d0e1
SQL
reuning/nlrb-cats
/scripts/schema.sql
UTF-8
13,504
3.265625
3
[]
no_license
CREATE TABLE IF NOT EXISTS "nlrb_case" ( "r_case_number" TEXT NOT NULL PRIMARY KEY, "case_type" TEXT, "status" TEXT, "nlrb_office_id" INTEGER, "docket_num" INTEGER, "inquiry_id" TEXT, "case_name" TEXT, "date_filed" TEXT, "hearing_target_date" TEXT, "election_target_date" TEXT, "employer_on_petitio...
true
d7704ccee4400f942e6e6789734fb2dc3a1115a6
SQL
abraxaslee/LeetCode
/184.sql
UTF-8
406
3.984375
4
[ "MIT" ]
permissive
-- 184. Department Highest Salary -- 15 / 15 test cases passed. -- Status: Accepted -- Runtime: 308 ms # Write your MySQL query statement below SELECT d.name AS Department, e.name AS Employee, salary AS Salary FROM Employee e INNER JOIN Department d ON e.departmentId = d.id WHERE (e.salary, e.departmentId) IN ( SELE...
true
b123c4cc276b690f277a68cda66f03af53ad9a10
SQL
MinJun1204/OLS
/Server/src/sql/191014A.sql
UTF-8
4,536
3.703125
4
[ "Apache-2.0" ]
permissive
-- phpMyAdmin SQL Dump -- version 5.0.0-alpha1 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3306 -- ์ƒ์„ฑ ์‹œ๊ฐ„: 19-10-14 00:46 -- ์„œ๋ฒ„ ๋ฒ„์ „: 8.0.17 -- PHP ๋ฒ„์ „: 7.3.9 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACT...
true
ae19129eadf42e79dcd994854cd7204580b8ab09
SQL
vamischenko/php-2-geekbrains
/lesson 5/db.sql
WINDOWS-1251
1,940
2.890625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 3.5.1 -- http://www.phpmyadmin.net -- -- : 127.0.0.1 -- : 26 2017 ., 23:22 -- : 5.5.25 -- PHP: 5.3.13 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; -- -- : `dz` -- -- -------------------------------------------------------- -- -- `categories` -- CREATE TAB...
true
3408b82ba2206688f6e0e0d15953d7c4df5e07d0
SQL
LeoChen1003/test
/day02/02_xz.sql
UTF-8
579
2.75
3
[]
no_license
SET NAMES UTF8; DROP DATABASE IF EXISTS xz; CREATE DATABASE xz CHARSET=UTF8; USE xz; CREATE TABLE laptop( lid INT, title VARCHAR(10), price DECIMAL(6,2), stockCount BIGINT, shelfTime DATETIME, isIndex BOOL ); INSERT INTO laptop VALUES('1','ๅŽไธบ','3999.99','2138392','2017-08-09 08:30:00',TRUE); INSERT INTO laptop V...
true
e04dfd595cd565fae9fa9167126089877a7d6be1
SQL
bp-santos/cdsi-project
/BD_Simulacao.sql
UTF-8
2,619
3.53125
4
[]
no_license
USE youcredit; DROP TABLE IF EXISTS cr_simulacao_credito; DROP TABLE IF EXISTS cr_estado_credito_simulacao; DROP TABLE IF EXISTS cr_periodicidade_estado_prestacao; CREATE TABLE cr_estado_credito_simulacao ( estado_id INT AUTO_INCREMENT, estado_simulacao VARCHAR (15) NOT NULL, descricao VARCHAR (15) NOT NULL,...
true
9fb504942a2d234acd086784debf0b8f91da9cab
SQL
epellin/sql-scratch-capstone-turn-in
/elenaPellinCarcelen/code.sql
UTF-8
2,180
4.4375
4
[]
no_license
1.1) SELECT COUNT(DISTINCT utm_campaign) AS 'Number of campaigns' FROM page_visits; SELECT COUNT(DISTINCT utm_source) AS 'Number of sources' FROM page_visits; SELECT DISTINCT utm_campaign, utm_source FROM page_visits; 1.2) SELECT DISTINCT page_name FROM page_visits; 2.1) WITH first_touch AS ( SELECT user_id, ...
true
b8825e3c3cd1dd3023856fb00c57f021a186e2d9
SQL
AsjadMalick/LibraryDatabase
/libraryDBDump/library_db_volunteers_at.sql
UTF-8
2,326
2.921875
3
[]
no_license
-- MySQL dump 10.13 Distrib 8.0.19, for Win64 (x86_64) -- -- Host: 127.0.0.1 Database: library_db -- ------------------------------------------------------ -- Server version 8.0.19 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; ...
true
f5e9ea86c51553224997ddb6a5343baae3aee5de
SQL
SleeplessChallenger/SQL_EX_exercises
/solutions_11_20.sql
UTF-8
1,247
4.21875
4
[]
no_license
-- 11 select avg(speed) from pc; -- 12 select avg(speed) from laptop where price > 1000; -- 13 select avg(speed) from pc inner join product on product.model=pc.model where maker = 'A'; -- 14 select distinct ships.class, ships.name, classes.country from ships inner join classes on classes.class=ships.cla...
true
b2ef1187c8767e37196789cec232a20d7cde4382
SQL
SociallyCompute/RJI-Photo
/old_codes/database/sql/build_tables.sql
UTF-8
1,054
3.546875
4
[ "Apache-2.0" ]
permissive
CREATE SCHEMA rji; ALTER SCHEMA rji OWNER TO rji; SET default_tablespace = ''; SET default_with_oids = false; CREATE TABLE rji.photos( photo_id BIGSERIAL PRIMARY KEY NOT NULL, photo_fname character varying, ranking int NOT NULL, create_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP );...
true
8be8936a8bc5ae1a430840eedc59771550a69bf8
SQL
GoPlaceIn/siacc
/sql/publicacoes/p_007_OK.sql
ISO-8859-1
5,958
3.65625
4
[]
no_license
CREATE TABLE mesresolucaosituacao ( CodSituacao int(11) NOT NULL AUTO_INCREMENT COMMENT 'Cdigo do status da resoluo', ...
true
36b2774037d0545358c0169c1b2d961bdec92861
SQL
Diego21605/Aplicacion-Escritorio-Python
/Proyecto/grupo_1_proyecto (1).sql
UTF-8
11,281
3.21875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Servidor: 127.0.0.1 -- Tiempo de generaciรณn: 17-11-2020 a las 03:49:25 -- 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
aed4809854d0145c93ed0fc2428a5314aefa7cb5
SQL
hunseok329/Smilevle
/src/main/java/kr/co/smilevle/review/dao/Oracle.sql
UTF-8
2,342
3.890625
4
[]
no_license
create table tbl_review( review_no number constraint review_no_pk primary key, writer_id varchar2(50) not null, writer_name varchar2(50) not null, title varchar2(255) not null, areacode varchar2(10) not null, location_name varchar2(255) not null, rate varchar2(10) not null, content long, regdate timestamp not ...
true
70130ca1ce4c0b3107192560be1602c418b086c4
SQL
stevenbluesky/IRemoteMessager
/sql/iRemoteMessagerSqlAll.sql
UTF-8
12,810
3.140625
3
[]
no_license
/* SQLyog v12.2.6 (64 bit) MySQL - 5.5.56 : Database - iremote ********************************************************************* */ /*!40101 SET NAMES utf8 */; /*!40101 SET SQL_MODE=''*/; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FORE...
true
5d568f553a3bd264ff91f468da344f46d0c3b7df
SQL
adrianostankewicz/stklog
/src/main/resources/db/migration/V202110240819__create-devlivery.sql
UTF-8
558
2.609375
3
[]
no_license
CREATE TABLE delivery ( id bigserial NOT NULL PRIMARY KEY, client_id bigint NOT NULL, rate bigint NOT NULL, status character varying[] NOT NULL, request_date timestamp NOT NULL, finished_date timestamp NOT NULL, recipient_name character varying[] NOT NULL, recipient_public_place character va...
true
dbb4dbf2692af83684d2ffb87c717dec26f20077
SQL
MithrandirD/common_schema
/routines/time/_as_datetime.sql
UTF-8
677
3.671875
4
[ "MIT", "BSD-3-Clause", "GPL-1.0-or-later" ]
permissive
-- -- Checks whether the given string is a valid datetime. -- DELIMITER $$ DROP FUNCTION IF EXISTS _as_datetime $$ CREATE FUNCTION _as_datetime(txt TINYTEXT) RETURNS DATETIME DETERMINISTIC NO SQL SQL SECURITY INVOKER COMMENT 'Convert given text to DATETIME or NULL.' BEGIN declare continue handler for SQLEXCEPTIO...
true
579727196a7119295d11289be36175484d9530e8
SQL
sprokushev/Delphi
/MASTER/_DATABASE/Procedures/RENEW_UKHSMS.sql
UTF-8
1,193
3.203125
3
[]
no_license
-- -- RENEW_UKHSMS (Procedure) -- CREATE OR REPLACE PROCEDURE MASTER.RENEW_UKHSMS (DATE_BEG DATE:=TRUNC(SYSDATE,'MONTH') ,DATE_END DATE:=SYSDATE, param1 VARCHAR2:='', param2 VARCHAR2:='', param3 VARCHAR2:='')IS BEGIN execute immediate 'TRUNCATE TABLE LOAD_BUFFER.MASTER_FILES_UKHSMS'; INSERT INTO LOAD_BUFFER...
true
98480dd6263b733e39658c80cc69b3bc8980908d
SQL
Antoshqqa/Fifo
/src/main/resources/db/migration/V1__Init_DB.sql
UTF-8
1,232
3.5
4
[]
no_license
create sequence hibernate_sequence start 1 increment 1; create table products ( id int8 not null unique, name varchar(255), primary key (id) ); create table purchase ( id int8 not null, pu...
true
262e96577a849655e2c2faa016d61f40c35a546f
SQL
leekwunfung817/Ra_calculate
/SQL/Predict_1.sql
UTF-8
1,286
3.859375
4
[]
no_license
with Rand as ( select ้ฆฌๅ h, ้จŽๅธซ r, ็ทด้ฆฌๅธซ t, b.* from RaceCard b where dt=(select dt from RaceCard order by dt desc limit 1) ) ,result1 as ( select Rand.dt, raceno+0 raceno, Rand.h,Rand.r,Rand.t, IFNULL((select avo from h where h.h like '%'||Rand.h||'%'),0) havo, IFNULL((select avo from r where r.r ...
true
df6d17e4e278c58ed0010dae019d402faecc9330
SQL
slotrans/advent-of-code-2020
/06/sql_solution.sql
UTF-8
3,192
4.28125
4
[]
no_license
/* postgres=# create table advent2020.input06 ( idx serial primary key, val text not null ) ; CREATE TABLE postgres=# \copy advent2020.input06 (val) from 'input06' ; COPY 2246 postgres=# select * from advent2020.input06 order by idx limit 20 ; idx | val -----+------------------------- 1 | lfnghcsv...
true
be0060cf30c4d783166db7e5e1b5a57059388f16
SQL
penkocode/JAVA-DB-BASICS
/Data Definition and Data Types - Exercise/07. Create Table People.sql
UTF-8
563
3.296875
3
[]
no_license
CREATE TABLE people( id INT PRIMARY KEY AUTO_INCREMENT, name VARCHAR (200) NOT NULL, picture BLOB, height DOUBLE (3,2), weight DOUBLE (5,2), gender ENUM ('m','f') NOT NULL, birthdate DATE NOT NULL, biography TEXT ); INSERT INTO people (id,name,picture,height,weight,gender,birthdate,biography) VALUES (1,'Dimon'...
true
82d23b1b5f62ffe544f50ad825b3b2a594cddb6b
SQL
JayPrice2011/U2
/u2/database/v0/views.sql
UTF-8
210
2.90625
3
[]
no_license
CREATE VIEW uuser_vw AS SELECT a.username, a.id, b.first_name, b.last_name, b.email_address FROM uuser a, uuser_log b WHERE b.id = a.uuser_log_id;
true
c420a7a376078d2d4374876e2a7b500e6b4f2ce7
SQL
CahHjl/C---Cmbap
/Documentatie/SQL-files/Licentie.sql
UTF-8
1,232
2.765625
3
[]
no_license
DROP TABLE Licentie; CREATE TABLE Licentie ( Lic_Id AUTOINC NOT NULL, Lic_Programma VARCHAR(10) NOT NULL, Lic_Nr INTEGER NOT NULL, Lic_Code VARCHAR(30), Lic_Type BYTE DEFAULT 1 NOT NULL, Lic_Usermode INTEGER DEFAULT 1 NOT NULL, Lic_NaamLh VARCHAR(50) NOT NULL, Lic_DisplaynaamLh VARCHAR(35) NOT NULL, L...
true
5bdefdec24136c3b29cde31907c35a6e9f43d345
SQL
Nguyen-Minh-Tri/TestMaker
/maindb.sql
UTF-8
2,257
3.703125
4
[ "Apache-2.0" ]
permissive
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+07:00"; -- Database: `TestCreator` -- Table users CREATE TABLE `users` ( `uid` int NOT NULL AUTO_INCREMENT, `username` varchar(256) CHARACTER SET ascii COLLATE ascii_bin NOT NULL, `password` varchar(256) NOT NULL, ...
true
f8657ba8bc3199001bdb421bc615cfa787cb6d50
SQL
Shurbeski/AdvanceDatabses
/DDL&Queries/Category.sql
UTF-8
306
2.890625
3
[]
no_license
do $do$ declare i int; begin for i in 1..25 loop insert into category VALUES(i,concat('CategoryName-',i),null ); end loop; end $do$; do $do$ declare i int; begin for i in 1..25 loop UPDATE category SET sub_category = floor(random()*(25-1+1)+1) WHERE category.id = i; end loop; end $do$;
true
d78e1323b4ffbea71ce449fc09014f2f1a52bcc1
SQL
lo-rodriguez/dojogroup
/BD/APPDJOPTY Create.ddl
UTF-8
13,524
3.375
3
[ "MIT" ]
permissive
USE dbbzk; CREATE TABLE ACCESS_PROFILE (ID_ACCESS_PROFILE int(10) NOT NULL AUTO_INCREMENT, ID_PROFILE int(10) NOT NULL, ID_SYS_DASHBOARD int(10) NOT NULL, PRIMARY KEY (ID_ACCESS_PROFILE)); CREATE TABLE ACCOUNT (ID_ACCOUNT int(10) NOT NULL AUTO_INCREMENT, NIC varchar(20) comment 'NOMBRE DE PILA', ID_APP_PROFILE int(10) ...
true
9c420878b7f96a05def4e150d6906ac7967ef559
SQL
wlclimaco85/e-contabil-demo
/src/main/resources/db/migration/V27__ALTERACAO_TABELA_CERTIFICADO.sql
UTF-8
254
2.5625
3
[]
no_license
ALTER TABLE certificados ADD COLUMN idconta INT; UPDATE certificados SET idconta = idapibanco; ALTER TABLE certificados ADD CONSTRAINT fk_certificados_conta FOREIGN KEY (idconta) REFERENCES contas (id); ALTER TABLE certificados DROP COLUMN idapibanco;
true
53e044c754d55d97698750914556969f2858ea42
SQL
SerhiiOrSoratik/hotel-project
/backend/prisma/migrations/20210902144546_init/migration.sql
UTF-8
543
3.25
3
[]
no_license
/* Warnings: - You are about to drop the column `roomId` on the `Visitors` table. All the data in the column will be lost. - Added the required column `visitorsId` to the `Rooms` table without a default value. This is not possible if the table is not empty. */ -- AlterTable ALTER TABLE "Rooms" ADD COLUMN "v...
true
00667bdec860a1ca4035bea4f08ff54e69e5a079
SQL
dblancoformacion/ivan_pelis
/src/ivan_pelisSQLconsultas.sql
UTF-8
14,629
3.453125
3
[]
no_license
USE ivan_pelis; CREATE TABLE producciones( id_produccion int AUTO_INCREMENT, titulo varchar(255) NOT NULL, estreno int NOT NULL, pais varchar(255), vose bool, vos bool, puntuacion float, vista bool, PRIMARY KEY(id_produccion), INDEX(estreno) ); CREATE TABLE generos( id_genero i...
true
5ffe22c2bdebd13e195c034fd7cb2593714e04ba
SQL
vipin3/vipcart
/vipcartbackend/databaseQuery.sql
UTF-8
1,230
3.34375
3
[]
no_license
CREATE TABLE CATEGORY ( id IDENTITY, cname VARCHAR(50), description VARCHAR(50), image_url VARCHAR(50), is_active BOOLEAN, CONSTRAINT pk_category_id PRIMARY KEY (id) ); INSERT INTO category (cname, description, image_url, is_active) VALUES('Mobile', 'This is description for Mobile Category|', 'CAT_...
true
8cb9b69441f4713435e1a0f46524e3b44ea5942a
SQL
mforootan/Schnek_SQL
/scr_Task_DocumentMerge.sql
UTF-8
1,604
3.25
3
[]
no_license
USE Northwind; -- Switch to the Northwind database -- You can use SQL to merge traditional document text with column data... up to 8000 characters -- You'll first need to setup your query tool to display more than the typical 256 chars per column -- Query analyzer-->Tools-->Options-->QueryResults-->SQLSer...
true
74dd40de38d8945fbb874e44952374b407a8ca71
SQL
selvaebi/repo
/src/test/resources/db/schema.sql
UTF-8
18,338
2.546875
3
[ "Apache-2.0" ]
permissive
CREATE SEQUENCE assayParamSequence START WITH 1 INCREMENT BY 100; CREATE SEQUENCE assayPtmSequence START WITH 1 INCREMENT BY 100; CREATE SEQUENCE assaySequence START WITH 1 INCREMENT BY 100; CREATE SEQUENCE authoritySequence START WITH 1 INCREMENT BY 100; CREATE SEQUENCE contactSequence START WITH 1 INCREMENT BY 10...
true
f20050560079b0296f8f537b04a9449144f81564
SQL
as1124/AS-1124
/code/extensions/DadongServer/src/main/resources/config/tables/tables.sql
UTF-8
10,235
2.828125
3
[]
no_license
-- ---------------------------- -- Table structure for app_setting -- ---------------------------- DROP TABLE IF EXISTS `app_setting`; CREATE TABLE `app_setting` ( `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, `client_version` varchar(16) NULL DEFAULT '' COMMENT '็”จๆˆทๅฐ็จ‹ๅบ็‰ˆๆœฌๅท', `client_type` int(11) NOT NU...
true
53d6075293e3c7729de412e447bc5ab70cd0fbe4
SQL
yuyhong23/One-Hot_Future
/data_cleaning_process/schema.sql
UTF-8
421
2.921875
3
[]
no_license
-- Add primary and foreign keys to tables -- Alter the data types -- For tables --ALTER TABLE countries --DROP CONSTRAINT countries_pkey; ALTER TABLE emission_goals ADD PRIMARY KEY (country); ALTER TABLE emissions ADD PRIMARY KEY (country); ALTER TABLE energy_consumption ADD PRIMARY KEY (country); ALTER TABLE re...
true
66fb33fad8e46b7a63fd8856c59035e3ee181318
SQL
brentjenkins/kitchener
/trunk/chefworking/conf/evolutions/default/5.sql
UTF-8
610
3.25
3
[]
no_license
# add GEOPOSTAL table # --- !Ups CREATE TABLE IF NOT EXISTS GEOPOSTAL ( ID BIGINT(20) NOT NULL auto_increment, POSTALCODE VARCHAR(20) NOT NULL, CITY VARCHAR(255) NOT NULL, COUNTY VARCHAR(255) DEFAULT NULL, STATECODE VARCHAR(8) NOT NULL, COUNTRYCODE VARCHAR(2) NOT NULL, REGIONCODE VARCHAR(2) DEFAULT NULL...
true
9b372673f69ab3b7488d6d73763a0bb415333154
SQL
barbarahf/Php_DAW
/Books_12_02_2020/sql/initSql.sql
UTF-8
519
2.921875
3
[]
no_license
DROP SCHEMA IF EXISTS Books; CREATE DATABASE Books; USER Books; DROP TABLE IF EXISTS books; create table books ( book_id BIGINT PRIMARY KEY AUTO_INCREMENT, title VARCHAR(45), author VARCHAR(45), year YEAR, price DOUBLE ); INSERT INTO books (title,author,year, price) VALUES ('Desarrollo web...
true
e838e3648eabaa61e6f09ce7e66e0abb4a3cb162
SQL
jwgl/bell-db
/sync/sync-view.sql
UTF-8
4,896
4.0625
4
[ "Apache-2.0" ]
permissive
-- bell/sync /** * ๅŸบๆœฌ่กจ็›ดๆŽฅไพ่ต– */ create or replace view sync.dv_direct_dependency as with foreign_constraints as ( select c.conname as constraint_name, nr.nspname as table_schema, r.relname as table_name, c.contype as constraint_type from pg_namespace nr join pg_class r on nr.oid = r.relnamespace joi...
true
3d76c71fb6f729e4dfe3342e48fcd37c14835df5
SQL
PhotoSynthesist62/UCI_Data_Analytics_Bootcamp_2020
/13-Extract_Transform_Load/earthquakes_SQL_AR.sql
UTF-8
552
2.703125
3
[]
no_license
DROP TABLE quake_table; CREATE TABLE quake_table ( "Date" VARCHAR(30) NOT NULL, "Tsunami" VARCHAR, "Depth" float, "Magnitude" float, "Country" VARCHAR, "State" VARCHAR, "Location" VARCHAR, "Latitude" VARCHAR(30) NOT NULL, "Longitude" VARCHAR(30) NOT NULL, "Deaths" float, "Injuries" float, "Damages_Millions...
true
04fe9e4cbdad8eb1d22d391201382a920b72fd3b
SQL
tlenclos/PKI
/database.sql
UTF-8
1,092
3.59375
4
[]
no_license
-- -- Database: `pki` -- CREATE DATABASE IF NOT EXISTS `pki` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci; USE `pki`; -- -------------------------------------------------------- -- -- Table structure for table `users` -- CREATE TABLE IF NOT EXISTS `users` ( `id` int(11) NOT NULL AUTO_INCREMENT, `email`...
true
8fc92e75d0166084897d2cffd1b3053a227175f1
SQL
andri000me/new_skt
/01. alter vdaftarpinjamanumum.sql
UTF-8
593
3.3125
3
[]
no_license
DELIMITER $$ ALTER ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vdaftarpinjamanumum` AS ( SELECT `a`.`fnid` AS `fnid`, `a`.`fdTrans_date` AS `fdTrans_date`, `a`.`ftTrans_No` AS `ftTrans_No`, `a`.`ftCustomer_Code` AS `ftCustomer_Code`, `b`.`ftNamaNasabah` AS `...
true
2c903c3268a5bdc7f6762b2800704ae201f78163
SQL
dwiansyah06/web_kasir
/database/erporate.sql
UTF-8
4,645
2.9375
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.6.5.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Oct 23, 2018 at 06:53 PM -- Server version: 10.1.21-MariaDB -- PHP Version: 5.6.30 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SE...
true
19ea8f1118c512a24bf24dfc6199cdbb8788c2ec
SQL
ieropael/rbs-stage4
/task3/select_all_emails.sql
UTF-8
192
2.984375
3
[]
no_license
SELECT c_firstname, c_lastname, c_middlename, c_email FROM partition.t_employees UNION ALL SELECT c_lastname, c_firstname, c_middlename, c_email FROM partition.t_clients ORDER BY c_lastname;
true
49645b9c5290b83b3c885821aac948877d39690b
SQL
yanru-jasmine/LeetCode-SQL-Summary
/Subquery/Simple-Subquery/602_Friend_Requests_II_Who_Has_the_Most_Friends.sql
UTF-8
214
3.375
3
[]
no_license
WITH tb1 AS ( SELECT requester_id AS id FROM request_accepted UNION ALL SELECT accepter_id FROM request_accepted ) SELECT TOP 1 id, COUNT(*) AS num FROM tb1 GROUP BY id ORDER BY COUNT(*) DESC;
true
1b56ee5f1e006d1327cf724b77195a8ad666031d
SQL
stanlee321/facebook-ads-librar-rest-server-golang
/db/query/facebook_job_to_demo.sql
UTF-8
545
3.078125
3
[]
no_license
-- name: CreateJobToFacebookDemo :one INSERT INTO "JobToFacebookDemo" ( job_id, ad_demo_id ) VALUES ( $1, $2 ) RETURNING *; -- name: GetJobToFacebookDemo :one SELECT * FROM "JobToFacebookDemo" WHERE id = $1 LIMIT 1; -- name: ListJobToFacebookDemo :many SELECT * FROM "JobToFacebookDemo" ORDER BY id LIMIT $1 OFF...
true
56dcbd98ebe1a62a59592a6ccef4b24cbbe57939
SQL
Gordonzi/Partner-Workshop
/2_AGILE_FACT/scripts/sls_raw_agile_db_dll.sql
UTF-8
2,244
3.375
3
[]
no_license
-- 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='TRADITIONAL,ALLOW_INVALID_DATES'; -- ----------------------------------------------------- -- Schema sl...
true
450bfc01f943401a7f7b9e7d0b9d3b654260a3d1
SQL
milisarge/giom
/altyapi/rapor/carihar_ozu.sql
ISO-8859-9
1,372
3.96875
4
[]
no_license
set @dbakiye := 0; select date(t.tarih) as tarih,t.fino,date(t.vade_tarihi) as vade_tarihi,round(t.giris,2) as giri,round(t.cikis,2) as k, round((@dbakiye := @dbakiye + giris-cikis),2) as bakiye,t.hareket_tipi,t.aciklama,t.fkod from( select tarih as tarih,fno as fino,geneltoplam as gt,vade_tarihi,aciklama,islem_turu...
true
7a9e80a3ddf74afc8900b02b44c57c39e4dea64c
SQL
ahm4d-m4rtha/Aplikasi-Cuti-Karyawan
/DB/hrd.sql
UTF-8
4,756
3.359375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.0 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Waktu pembuatan: 09 Bulan Mei 2019 pada 08.27 -- Versi server: 10.1.31-MariaDB -- Versi PHP: 7.1.16 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OL...
true
e006d962cf192aead66b1813af6bba9ac546e14b
SQL
WeiyiDeng/Dataset_code
/time_convert_newtable.sql
UTF-8
562
3.375
3
[]
no_license
delete from Todate; insert into Todate(date) SELECT datetime(FROM_UTS, 'unixepoch') FROM newtable7; --Note: first create table Todate with char variable date-- drop table if exists table7date; create table table7date(TRACK_ID text, USER text, FROM_UTS int, COUNT int, date char); insert into table7date(TRACK_ID, US...
true
0c5b2d27dfa2bf6b313cd037e110e4554b31acfe
SQL
biocore/american-gut-web
/amgut/db/patches/0042.sql
UTF-8
3,077
4.1875
4
[ "BSD-3-Clause" ]
permissive
-- create the new many-to-many relation between barcodes and surveys CREATE TABLE ag.source_barcodes_surveys ( barcode varchar NOT NULL , survey_id varchar NOT NULL ); CREATE INDEX idx_source ON ag.source_barcodes_surveys ( barcode ); CREATE INDEX idx_source_0 ON ag.source_barcodes_surveys ( ...
true
74312ec85e46a6949ebe89eb847b4d0b9c6c0b50
SQL
followfire/Vue
/src/data/sql.sql
UTF-8
2,278
3.046875
3
[]
no_license
drop database IF EXISTS music; CREATE DATABASE music charset=utf8; use music; CREATE TABLE m_user ( u_id INT PRIMARY KEY auto_increment, u_name VARCHAR(20), u_avatar VARCHAR(500), u_fans int ); INSERT INTO m_user VALUES(null,'ZRๅญ็ป•','https://al-qn-echo-image-cdn.app-echo.com/bee7817645711afdc8aef1ab23120...
true
d09748d287f6e3ab5f2ce1086c41f2c075b830bc
SQL
LeoHongyi/Leetcode-solutions
/src/Database/sql/leetcode-sql/Product Sales Analysis II.sql
UTF-8
203
3.71875
4
[]
no_license
# join table and sum() SELECT p.product_id, SUM(quantity) as total_quantity FROM Sales s JOIN Product p ON s.product_id = p.product_id GROUP BY p.product_id ORDER BY p.product_id;
true
76f1fd391056ea296df0e55b5461eba2cb27442d
SQL
lazybios/Protein-protein-Interactions
/misc/utils/sql_log.sql
UTF-8
1,367
3.078125
3
[]
no_license
CREATE TABLE ppi( ppiid INTEGER PRIMARY KEY AUTOINCREMENT, source text not null, target text not null, score1 REAL, score2 REAL, ); #colorpro soft coding in the js INSERT INTO ppi(source,target,score1,score2) VALUES ('Cs4g18200.1','Cs4g11150.3',0.185604063988537,0); ######################### CREATE TABLE exp...
true
8adfcc0489b304e98ea908bfe87a03ac716893aa
SQL
MuthomiMate/Fruitfarm
/fruitfarm.sql
UTF-8
16,052
3.015625
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.4.14 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Jul 17, 2017 at 05:40 AM -- 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
6730bea4985a0dccdf21bce8808d88e5dbeb3c3b
SQL
kiessling95/Pasantia-Mocovi-2019
/BD/form.sql
UTF-8
6,630
2.90625
3
[]
no_license
-- -- PostgreSQL database dump -- -- Dumped from database version 11.5 (Ubuntu 11.5-1.pgdg18.04+1) -- Dumped by pg_dump version 11.5 (Ubuntu 11.5-1.pgdg18.04+1) SET statement_timeout = 0; SET lock_timeout = 0; SET idle_in_transaction_session_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings =...
true
8b33108039b4adf863027f7d5ae48dbbd6c741cd
SQL
shamca65/consignment
/Dump20181219/SQL_Update_Statements.sql
UTF-8
760
2.59375
3
[]
no_license
UPDATE consignment_development.items SET `clerk`= ELT(FLOOR(RAND()*7)+1, 'Shaun', 'Laura', 'Ben', 'Alex', 'Elizabeth', 'Maddie', 'Mocha') where id > 0; UPDATE consignment_development.items SET `item_status`= ELT(FLOOR(RAND()*5)+1, 'fs', 'sold', 'po', 'mtd', 'rtc')\ where id > 0; UPDAT...
true
5b3fe7b8d28b8ef860b44c52c90969bdacebe3d6
SQL
wangsungtaek/Do-it-oracle
/database/ch07.sql
UTF-8
6,743
4.21875
4
[]
no_license
-- 07-1 ํ•˜๋‚˜์˜ ์—ด์— ์ถœ๋ ฅ ๊ฒฐ๊ณผ๋ฅผ ๋‹ด๋Š” ๋‹ค์ค‘ํ–‰ ํ•จ์ˆ˜ -- SUM ํ•จ์ˆ˜ SELECT SUM(SAL) FROM EMP; SELECT SUM(COMM) FROM EMP; SELECT SUM(DISTINCT SAL), SUM(ALL SAL), SUM(SAL) FROM EMP; SELECT SUM(SAL), SUM(COMM) FROM EMP; -- COUNT ํ•จ์ˆ˜ SELECT COUNT(*) FROM EMP; SELECT COUNT(*) FROM EMP WHERE DEPTNO = 30; SELECT COUNT...
true
59c34d4da854b56184a6e6eac7f3a989ece16960
SQL
szarbartosz/pbd-lab
/lab/agregaty_lab2.sql
WINDOWS-1250
4,367
4.34375
4
[]
no_license
use northwind select top 5 orderid, productid, quantity from [order details] order by quantity desc select top 5 with ties orderid, productid, quantity from [order details] order by quantity desc select count(*) from employees select count(reportsto) from employees --srednia cena jednostkowa dla wszystkich produk...
true
f4930d688dea234943026189e5836ca7e133c208
SQL
AnelMidzic/projects
/AssignmetWpfAdministracija/SQLQueryAdministracija01.sql
UTF-8
322
2.59375
3
[]
no_license
CREATE TABLE Users( Id int IDENTITY(1,1) PRIMARY KEY, UserName nvarchar(20) NOT NULL, UserPass nvarchar (20) NOT NULL, IsAdmin bit NOT NULL ); INSERT INTO Users VALUES ('Peter', 'Parker', 1); INSERT INTO Users VALUES ('Tony', 'Stark', 0); INSERT INTO Users VALUES ('Bary', 'Alan', 0); SELECT * FROM Use...
true
968125510f1b844fb2b7dcb9a6bd1c4660316600
SQL
dogomeo5794/php-bimfs
/database/20191007_bimfs_db-11-12-2019.sql
UTF-8
23,176
2.609375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.9.0.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Nov 12, 2019 at 01:56 AM -- Server version: 10.4.6-MariaDB -- PHP Version: 7.3.8 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OL...
true
75684a8ac2cf18c4d5c7e94297af397245ec3037
SQL
ministryofjustice/dps-data-compliance
/src/main/resources/db/migration/V1_20__deceased_offender_deletion_batch.sql
UTF-8
1,349
3.78125
4
[ "MIT" ]
permissive
DROP TABLE IF EXISTS DECEASED_OFFENDER_DELETION_BATCH; CREATE TABLE DECEASED_OFFENDER_DELETION_BATCH ( BATCH_ID BIGSERIAL NOT NULL, REQUEST_DATE_TIME TIMESTAMP NOT NULL, REFERRAL_COMPLETION_DATE_TIME TIMESTAMP, BATCH_TYPE VARCHAR(255) N...
true
a36e406e4d6d3d6cf705783f32479561e57d8e8b
SQL
gkumar24/America-The-Beautiful
/collection/updatevisitor_count_analysis_highlowrain.sql
UTF-8
642
3.640625
4
[]
no_license
select *, cast(rain as double precision) from public.import_weather_csv select V.*, W.* from visitor_count_analysis as V inner join import_weather_csv as W on V.park_code = W.park_code and V.month = cast(W.month as integer) order by V.park_code, V.month; update visitor_count_analysis set high = cast(import_weather_c...
true
4bc56c93fda2b3a673309fb54137413ad7964eda
SQL
GabeMeister/Youtube-Collections-Revamp-Server
/Database Sql Scripts/Select Statements/Channels.sql
UTF-8
1,178
3.46875
3
[]
no_license
๏ปฟselect * from Channels limit 10; select count(*) from Channels; delete from Channels; select * from Channels where Title like '%Red Bull%'; select * from Channels c where c.ChannelID=60232; select * from Channels where Title like '%Collier Mayo%'; select ch.ChannelID,ch....
true
332d2373030bddd221f8bf56ff9a190d09a12a69
SQL
zz0733/op-gbsql
/history/v1073/sites/V1.0.1.0231__U_v_agent_fund_record.sql
UTF-8
1,657
3.859375
4
[]
no_license
-- auto gen by bruce 2016-08-23 16:10:09 DROP VIEW IF EXISTS v_agent_fund_record; CREATE OR REPLACE VIEW "v_agent_fund_record" AS SELECT a.id, a.transaction_no, a.agent_id, a.create_time, b.transaction_money, b.balance, CASE a.settlement_state WHEN 'pending_lssuing'::text THEN '1'::tex...
true
3c3f7a9560ad4ab3ed5cab99dbc42a650d03bb13
SQL
rcrenny/DatabaseFinal
/NBADemo.sql
UTF-8
512
3.15625
3
[]
no_license
/*Get All Player's Stats and Information*/ SELECT * FROM PLAYER ORDER BY PlayerID; /*First Half Player Scoring*/ SELECT * FROM POINTS WHERE Time_Point_Scored <= 24 ORDER BY PlayerID; /*Devonte Graham Assists*/ SELECT * FROM ASSIST WHERE PlayerID = 00000014 ORDER BY Time_Assist; /*PJ Washington First Half Rebounds*...
true
4aeac1b33be66d35bfb4509704719accffd68ada
SQL
BackupTheBerlios/webnotes-svn
/sql/db_upgrade.sql
UTF-8
1,031
2.953125
3
[]
no_license
# # Upgrade phpWebNotes 1.0.0 to phpWebNotes 2.0.0pr1 # ALTER TABLE `phpWN_user_table` CHANGE `password` `password` VARCHAR( 32 ) NOT NULL; ALTER TABLE `phpWN_user_table` CHANGE `access_level` `access_level` INT( 2 ) DEFAULT '40' NOT NULL; ALTER TABLE `phpWN_page_table` ADD `url` VARCHAR( 255 ) NOT NULL ; ALTER T...
true
a337e8f49843fcbe1998f211f71f52abeb4e9e72
SQL
smwright/FTC-PAM
/database/migration/depl_unit_get_tree.sql
UTF-8
342
3.140625
3
[]
no_license
CREATE DEFINER=`root`@`localhost` PROCEDURE `depl_unit_get_tree`(IN c_id INT) BEGIN SELECT node.id, campaign_id, acg_unit_id, hist_unit_id, report_type, lft, rgt FROM deployed_unit AS node, deployed_unit AS parent WHERE node.lft BETWEEN parent.lft AND parent.rgt AND node.campaign_id = c_id GROUP BY node.name O...
true
c59ffe1b241fde00546ef3646d73dca81014af4e
SQL
Jonnoriega/proyecto
/tienda.sql
UTF-8
4,395
2.9375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.3 -- https://www.phpmyadmin.net/ -- -- Servidor: 127.0.0.1:3306 -- Tiempo de generaciรณn: 14-11-2019 a las 18:54:20 -- Versiรณn del servidor: 5.7.23 -- Versiรณn de PHP: 7.2.10 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /...
true
37330c5226c4166c12e60312431737eb8eee1ebe
SQL
DDobrovolskiy/job4j
/middle_hibernate/hibernate/src/main/db/car.sql
UTF-8
147
2.671875
3
[]
no_license
CREATE TABLE car ( car_id SERIAL PRIMARY KEY, car_name TEXT, engine_id int, FOREIGN KEY (engine_id) REFERENCES engine (engine_id) )
true
3eccc09b515e5919012f4afc0c0e3500b43fdbf7
SQL
ChakPC/Online-Education-Portal
/Database/Procedures/Delete_Post.sql
UTF-8
467
2.953125
3
[]
no_license
/*Delete Post*/ delimiter // create procedure Delete_Post( in name varchar(30), out rif int ) begin declare exit handler for 1451 begin set rif=1; end; delete from Post_Wise_Employees where Post_Wise_Employees.post=name; delete from Posts where Posts.Post_Name=name; end // delimiter ; /*Execute*/ call Delete_Post('Assi...
true
63c8506831bb0561df3f8848b5603305e7343f91
SQL
yanxurui/keepcoding
/python/algorithm/leetcode/185.sql
UTF-8
282
3.90625
4
[]
no_license
select Department.Name as Department, x.Name as Employee, x.Salary from Employee x, Department where x.DepartmentId = Department.Id and 3 > (select count(distinct(Salary)) from Employee y where x.DepartmentId = y.DepartmentId and x.Salary<y.Salary) order by Department, Salary desc;
true
f4d7ef83ab88964d041e5d5637c737b18979d15f
SQL
gidzRufino/eskwela
/app/modules/install/tables/quiz_management.sql
UTF-8
6,209
3.078125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.5.4.1deb2ubuntu2 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Mar 18, 2018 at 07:20 PM -- Server version: 5.7.21-0ubuntu0.16.04.1 -- PHP Version: 5.6.34-1+ubuntu16.04.1+deb.sury.org+1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40...
true
57fcdef53f541be4a4f6959da436a61bb0436316
SQL
kyeung2/HackerRank
/src/main/java/io/nimbus/hackerrank/practice/sql/basicselect/easy/RevisingTheSelectQuery2.sql
UTF-8
181
2.6875
3
[]
no_license
-- https://www.hackerrank.com/challenges/revising-the-select-query-2/problem?h_r=next-challenge&h_v=zen SELECT NAME FROM CITY c WHERE c.CountryCode = 'USA' and c.POPULATION >120000;
true
3dbc7a5faf347d14cce9df6e07057ce5153c48e5
SQL
Watcharakorn-Golf/SQL
/From DB Browser/total song sold out each country.sql
UTF-8
201
3.65625
4
[]
no_license
-- total sold out song each Country SELECT customers.country, SUM(total) AS sold_out FROM customers JOIN invoices ON customers.customerid = invoices.customerid GROUP BY customers.country;
true