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
dcd17ee92b434e6aec03a0a3a80e26f925168697
SQL
ro-msg-spring-training/online-shop-roliboy
/src/main/resources/db/migration/V1_7__create_order_detail.sql
UTF-8
272
3.3125
3
[ "MIT" ]
permissive
--TODO: replace `id` with composite (order_id, product_id) composite key create table `order_detail` ( `id` integer not null auto_increment, `order_id` integer, `product_id` integer, `quantity` integer, constraint pk_order_detail primary key (`id`) );
true
22fba6fdc88adddcdf108a8b9f700222e2a62a2a
SQL
jbro885/FreeRADIUS-NAS-change-restarter
/sql/triggers.sql
UTF-8
463
2.640625
3
[ "MIT" ]
permissive
DELIMITER | CREATE TRIGGER `nas_insert` AFTER INSERT ON `nas` FOR EACH ROW BEGIN INSERT INTO `nas_changes` (kind) VALUES ("insert"); END; | DELIMITER ; DELIMITER | CREATE TRIGGER `nas_update` AFTER UPDATE ON `nas` FOR EACH ROW BEGIN INSERT INTO `nas_changes` (kind) VALUES ("update"); END; | DELIMITER ; DELIMITER | CR...
true
834eca3f1e2480dbc7c278db29b1eaed667b4256
SQL
KarenJF/leetcode_sql
/medium/1126.sql
UTF-8
1,862
4.78125
5
[ "MIT" ]
permissive
/* 1126. Active Businesses Table: Events +---------------+---------+ | Column Name | Type | +---------------+---------+ | business_id | int | | event_type | varchar | | occurences | int | +---------------+---------+ (business_id, event_type) is the primary key of this table. Each row in the table...
true
f1e70ed44900c1e96a2d97ba4777ec840c3761cf
SQL
iTiky/charge_scheduler
/storage/sqlite_base/migrations/01_initial.up.sql
UTF-8
444
2.8125
3
[]
no_license
CREATE TABLE single_events ( type TEXT NOT NULL, start_date_time TIMESTAMP NOT NULL, end_hours INTEGER NOT NULL, end_minutes INTEGER NOT NULL, created_at TIMESTAMP NOT NULL ); CREATE TABLE periodic_events ( type TEXT NOT NULL, rrule TEXT ...
true
f767700c29c242d275c8436a6b0474ebf7613f39
SQL
martinbernemann/BCD-UI
/Server/wellKnownBindingSets/bcd_create_oracle.sql
UTF-8
5,293
3.21875
3
[ "Apache-2.0" ]
permissive
/* Copyright 2010-2017 BusinessCode GmbH, Germany 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 http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed...
true
03f9ac87a651303aa0249a139d8a8bb0724f3432
SQL
FELLSAT/Procedimientos
/Autogestion sp/Roles y perfiles/Procedimientos/SP_AUTOGES_SUBMENUS_ASIGNADOS.sql
UTF-8
1,399
3.28125
3
[]
no_license
CREATE OR REPLACE PROCEDURE SP_AUTOGES_SUBMENUS_ASIGNADOS -- ============================================= -- Author: FELIPE SATIZABAL -- ============================================= ( V_IN_DATOS IN VARCHAR2, -- VARIABLE QUE CONTIENE TODOS LOS DATOS INSERTADOS SEPARADOS POR COMAS ARRAY_DATOS OUT ARRA...
true
fbdd7db3417ae3fc17fb8a7b8aefdd0e7f8889d9
SQL
BardoftheOzarks/holbertonschool-higher_level_programming
/0x0E-SQL_more_queries/6-states.sql
UTF-8
243
3.0625
3
[]
no_license
-- Creates database hbtn_0d_usa and table states inside it CREATE DATABASE IF NOT EXISTS hbtn_0d_usa; CREATE TABLE IF NOT EXISTS hbtn_0d_usa.states ( id INT UNIQUE AUTO_INCREMENT NOT NULL PRIMARY KEY, name VARCHAR(256) NOT NULL)
true
6adc36d2aa5325d8f3f6c4604c8a11ae11156174
SQL
Gabi12345678/Thesis
/Databases/monetdb/knn/udf_template.sql
UTF-8
2,233
4.25
4
[]
no_license
DROP TABLE IF EXISTS datapoints; DROP TABLE IF EXISTS result; CREATE TABLE datapoints (time TIMESTAMP, <column_types>, l INTEGER); CREATE TABLE result (l INTEGER); CREATE OR REPLACE FUNCTION get_time() RETURNS FLOAT LANGUAGE PYTHON { from datetime import datetime return (datetime.now() - datetime(1970...
true
fba20bf98ba7a48776b336e3497c599c521193e8
SQL
salmazz/Shortly-Project---AdminLTE
/shortly.sql
UTF-8
4,544
3
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Nov 02, 2019 at 03:10 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
ac6f7fc72d51e3346119cf0112440b80f7dd2e5e
SQL
NHJAX/NHJAX_Database
/NHJAX_ODS/Stored Procedures/procODS_PCM_Locations_Lookup.sql
UTF-8
741
3.296875
3
[]
no_license
-- ============================================= -- Author: Robert Evans -- Create date: 30 July 2013 -- Description: Gets a list for dropdowns of pcm locations -- ============================================= CREATE PROCEDURE procODS_PCM_Locations_Lookup AS BEGIN -- SET NOCOUNT ON added to prevent extra result set...
true
3ed6c904d92a3923b849e1ddb0fa9ee74f58b259
SQL
karvozavr/hackuniversity
/server/static/schema.sql
UTF-8
1,415
3.625
4
[]
no_license
DROP TABLE IF EXISTS "order" CASCADE; DROP TABLE IF EXISTS product CASCADE; DROP TABLE IF EXISTS equipment CASCADE; DROP TABLE IF EXISTS reservation_eq CASCADE; DROP TABLE IF EXISTS "user" CASCADE; DROP TABLE IF EXISTS eq_hist_data CASCADE; CREATE TABLE product ( id TEXT PRIMARY KEY, equipment_class T...
true
3529b4c9028f0dfa8dd7c97060cd4a8a686b7ee2
SQL
khalidbinwalid0796/Frontend
/reactecom.sql
UTF-8
14,530
2.9375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.1.0 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jun 25, 2021 at 10:22 PM -- Server version: 10.4.18-MariaDB -- PHP Version: 8.0.3 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIEN...
true
27e3d07679bd9224903aff3bbded96438e891377
SQL
chen1649chenli/Beyond-LeetCode-SQL
/LeetCode/579_Find_Cumulative_Salary_of_an_Employee/mssql_lag.sql
UTF-8
849
4.09375
4
[ "MIT" ]
permissive
-- MS SQL: Lag window function WITH cumulative AS ( SELECT Id ,LAG(Month, 1) OVER (PARTITION BY Id ORDER BY Month ASC) AS Month ,ISNULL(LAG(Salary, 1) OVER (PARTITION BY Id ORDER BY Month ASC), 0) + ISNULL(LAG(Salary, 2) OVER (PARTITION BY Id ORDER BY Month ASC), 0) + ISNULL(LAG(Salary, 3) OVER (PARTITION B...
true
3222412738ec57aa14d20d9c2118552147863b65
SQL
PNNL-Comp-Mass-Spec/DBSchema_PgSQL_DMS
/dms/t_cached_experiment_components.sql
UTF-8
1,019
3.09375
3
[ "Apache-2.0" ]
permissive
-- -- Name: t_cached_experiment_components; Type: TABLE; Schema: public; Owner: d3l243 -- CREATE TABLE public.t_cached_experiment_components ( exp_id integer NOT NULL, biomaterial_list public.citext, reference_compound_list public.citext, entered timestamp without time zone DEFAULT CURRENT_TIME...
true
38cb2209af28b06c05d9d238c5e9b5f6e07f4b51
SQL
lohitha123/sivaweb1
/RSPAClient/ReportingScripts/POU/ETL_Scripts/Cost variance Analysis_Quarterly v3.0/1.MT_POU_RPT_COST_VARIANCE_BY_REIMBURSEMENT_Q.sql
UTF-8
18,259
3.796875
4
[]
no_license
--By ICD IF EXISTS (SELECT * FROM sys.objects WHERE name = 'TEMP_PHYSICIAN_AVERAGE_TAB2_Q1_ICD') BEGIN DROP TABLE TEMP_PHYSICIAN_AVERAGE_TAB2_Q1_ICD END IF EXISTS (SELECT * FROM sys.objects WHERE name = 'TEMP_ALL_PHYSICIANS_TAB2_Q1_ICD') BEGIN DROP TABLE TEMP_ALL_PHYSICIANS_TAB2_Q1_ICD END IF EXISTS (SELECT * FROM sy...
true
00b357c4cb1365ae5298b3d99b000e15e9724cf1
SQL
Evelien-M/Prog5
/Ninja_manager/Database/Scripts/Seed/Gear.sql
UTF-8
1,455
3.171875
3
[]
no_license
MERGE INTO dbo.Gear AS Target USING (values (1, 'Muts', NULL, 30, NULL, 10, 5, 'Head'), (2, 'Helm', NULL, 60, 20, NULL, 5, 'Head'), (3, 'Mondkapje', NULL, 20, 10, 10, 10, 'Head'), (4, 'Cape', NULL, 100, NULL, NULL, 5, 'Shoulders'), (5, 'Sjaal', NULL, 30, NULL, 10, NULL, 'Shoulders'), (6, 'Ketting', NULL, 120,...
true
9ffd2a5d6754d916b3fc791f548f2b0dea74bdb7
SQL
lyoumbi/exercise.sql_simple-queries
/part5.sql
UTF-8
385
3.609375
4
[]
no_license
SELECT lastName AS 'Last Name', firstName AS 'First Name', email AS 'Email', jobTitle AS 'Job Title' FROM employees WHERE officeCode=(SELECT officeCode FROM offices WHERE city='San Francisco') ORDER BY lastName; -- Write a query to display all Last Name, First Name, Email and Job Title of all employees -- working o...
true
e78f4b7ea334287c07477e72e0a5d8b57a210e56
SQL
kihoon86/sql-homework
/sql_homework.sql
UTF-8
8,910
4.59375
5
[]
no_license
USE sakila; show database limit 1000; SHOW tables; desc country; -- 1a. Display the first and last names of all actors from the table actor. SELECT first_name, last_name FROM actor; -- 1b. Display the first and last name of each actor in a single column in upper case letters. Name the column Actor Name. SELECT UPPER...
true
208ee8872116fc9f308429464c53f2fd91b808f3
SQL
AntonovJR/Databases-Introduction
/First Steps LAB.sql
UTF-8
682
3.4375
3
[]
no_license
CREATE DATABASE `gamebar`; USE `gamebar`; CREATE TABLE `employees`( `id` INT PRIMARY KEY AUTO_INCREMENT, `first_name` VARCHAR(50) NOT NULL, `last_name` VARCHAR(50) NOT NULL ); CREATE TABLE `categories`( `id` INT PRIMARY KEY AUTO_INCREMENT, `name` VARCHAR(50) NOT NULL ); CREATE TABLE `products`( `id` INT PRIMARY KEY AUT...
true
ec946461a35b22254e92ad754c62579d811833a7
SQL
StoianAlinBogdan/BD-Proiect
/insert.sql
UTF-8
2,475
2.953125
3
[]
no_license
INSERT INTO cataloage VALUES('AC', 'Astrographic Catalogue', 'Obiecte vizibile pe cer'); INSERT INTO cataloage VALUES('ESO', 'European Southern Observatory Catalogue', 'Telescopul sud-european'); INSERT INTO cataloage VALUES('HIC', 'Hipparcos Input Catalogue', 'Locatia precisa a obiectelor vizibile pe cer'); INSERT INT...
true
a46cc2c5aa7f5519b201da6d93c0f7ce55342395
SQL
4ions/holbertonschool-higher_level_programming
/0x0D-SQL_introduction/11-best_score.sql
UTF-8
129
2.640625
3
[]
no_license
-- List all records -- with a score greater thatn 10 SELECT score, name FROM second_table WHERE score >= 10 ORDER BY score DESC;
true
5b2d80d094c405d0fbd9480e3337e9395dcb1a25
SQL
qhaaakaa/pkg
/migrate/goose/20210927164519_create_user.sql
UTF-8
452
3.0625
3
[]
no_license
-- +goose Up -- +goose StatementBegin CREATE TABLE user ( id int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增ID', username varchar(30) NOT NULL COMMENT '账号', password varchar(100) NOT NULL COMMENT '密码', createtime int(10) NOT NULL DEFAULT '0' COMMENT '创建时间', PRIMARY KEY (id) ) ENGINE=InnoDB DEFAULT CHARSE...
true
035b342ba3c8c353ab6c471abb5e4ec1b6125704
SQL
rajatgupta200795/webprojects
/naiudanc_click_counter_db.sql
UTF-8
19,106
2.859375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.7.3 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3306 -- Generation Time: Oct 30, 2017 at 03:11 PM -- Server version: 5.5.45-cll-lve -- PHP Version: 5.6.30 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET...
true
287c178b3be9f1efec17af925955d9be00c0d5a8
SQL
tcarlton2000/cookbook-api
/db/init.sql
UTF-8
818
3
3
[]
no_license
CREATE TABLE IF NOT EXISTS ingredients ( id serial primary key, name varchar(150) UNIQUE, type varchar(50), serving_size numeric, unit varchar(20), calories numeric, carbs numeric, protein n...
true
51cc937c032b369e8bec85aef4656b9ac4cfe152
SQL
jgarzonext/plsql-testing
/script_plsql/bd_iaxis/script/disparadores/WHO_EMPLEADOS.sql
UTF-8
452
2.671875
3
[]
no_license
-------------------------------------------------------- -- DDL for Trigger WHO_EMPLEADOS -------------------------------------------------------- CREATE OR REPLACE EDITIONABLE TRIGGER "AXIS"."WHO_EMPLEADOS" BEFORE INSERT OR UPDATE ON empleados FOR EACH ROW BEGIN :NEW.cusumod := f_user; :NEW.fmodifi...
true
497d65f752fb6191569797973ea3fea06a83937b
SQL
diogenesca/Exercicio
/SQL exercicio5.sql
UTF-8
368
2.640625
3
[]
no_license
SELECT title, rating, CASE WHEN rating = 'G' THEN 'Livre para todos' WHEN rating = 'PG' THEN 'Não recomendado para menores de 10 anos' WHEN rating = 'PG-13' THEN 'Não recomendado para menores de 13 anos' WHEN rating - 'R' THEN 'Não recomendado para menores 17 anos' ELSE 'Proibido para menores de idade' ...
true
d53aa0aa978a2e1477bbed9572d3937984eace6c
SQL
gopi158/Sample
/FinaoDb/Stored Procedures/userpublic_detail.sql
UTF-8
2,413
3.875
4
[]
no_license
DELIMITER // DROP procedure IF EXISTS `userpublic_detail` // CREATE PROCEDURE `userpublic_detail`(IN id INT) BEGIN DECLARE totalinspired INT; DECLARE totalfinaos INT; DECLARE totaltiles INT; DECLARE totalfollowings INT; DECLARE totalfollowers INT; CREATE TEMPORARY TABLE IF NOT EXISTS ou...
true
ee3deb4e591e7c9989d89a0025dff1c1bfc329de
SQL
gcoronelc/SISTUNI-PLSQL-005
/Clase4/T4_NCHAMPION.sql
UTF-8
1,236
4.03125
4
[]
no_license
/**********CREANDO LA TABLA*************/ CREATE OR REPLACE VIEW SCOTT.V_EMPLEADOS AS SELECT E.EMPNO, E.ENAME, D.DEPTNO, D.DNAME FROM SCOTT.EMP E INNER JOIN SCOTT.DEPT D ON E.DEPTNO = D.DEPTNO; /**********CREAR TRIGGER A LA TABLA*************/ CREATE OR REPLACE TRIGGER scott.TR_VISTA INSTEAD OF INSERT OR DELETE ON SCO...
true
f15b37bab6fe24735d3726b9ea0aa18a1c10cc62
SQL
liunh1220/springboot-aop-demo
/document/data.sql
UTF-8
1,325
3.03125
3
[]
no_license
CREATE TABLE `t_log` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `reqSource` varchar(10) DEFAULT 'pc' COMMENT '请求来源,pc:pc端,wap:wap端 默认来源为pc', `type` varchar(10) DEFAULT NULL COMMENT '日志类型,‘operate’:操作日志,‘exception’:异常日志', `ip` varchar(20) NOT NULL COMMENT '操作电脑ip', `fullName` varchar(50) NOT NULL COMMENT '操作人员...
true
26488b38afe495f98c1661f7bebaaa81abedf60b
SQL
nnvishwakarma/graph
/derby.sql
UTF-8
482
3.4375
3
[]
no_license
CREATE TABLE GRAPH_METRIX(GRAPH_ID INT,CONN_MATRIX VARCHAR(1000)); CREATE TABLE VERTICES( VERTEX_ID INT NOT NULL CONSTRAINT VERTES_PK PRIMARY KEY, LABEL VARCHAR(20), SHAPE VARCHAR(20), COLOR VARCHAR(10) ); create table GRAPH( GRAPH_ID INT GENERATED ALWAYS AS IDENTITY CONSTRAINT GRAPH_ID_PK PRIMARY KEY, VERTICES ...
true
55ae6c7ccf6259d844d6819a663d9be4ad5103ce
SQL
tonyeen/parim-spark
/spark-core/spark-system/src/main/resources/db/V0.1.1/ila_priv.sql
UTF-8
26,758
2.875
3
[]
no_license
CREATE OR REPLACE PACKAGE ILA_PRIV AS TARGET_TYPE_NONE CONSTANT CHAR := ''; TARGET_TYPE_SITE CONSTANT CHAR := 'S'; TARGET_TYPE_USER CONSTANT CHAR := 'U'; TARGET_TYPE_ORGANIZATION CONSTANT CHAR := 'O'; TARGET_TYPE_RCO CONSTANT CHAR := 'R'; TARGET_TYPE_CONTENT_...
true
cea0530f452e20772cc60fc9851eb9e92616710f
SQL
fairay/CourseDataBase
/sql/roles/guard.sql
UTF-8
669
2.5625
3
[]
no_license
REVOKE ALL PRIVILEGES ON ALL TABLES IN SCHEMA public FROM guard; DROP USER guard; CREATE ROLE guard WITH LOGIN NOSUPERUSER NOCREATEDB NOCREATEROLE NOINHERIT NOREPLICATION CONNECTION LIMIT -1 PASSWORD 'guard'; GRANT SELECT, INSERT ON Passrecords TO guard; GRANT SELECT ON Accounts TO guard; GRANT SELECT ON Perso...
true
aa864b66a9255e8323f94db6f40b62ab5b87abd4
SQL
Messier82/Reppier
/api/migrates.sql
UTF-8
1,614
3.59375
4
[]
no_license
DROP TABLE IF EXISTS users; CREATE TABLE users( id int NOT NULL AUTO_INCREMENT PRIMARY KEY, email varchar(30) NOT NULL, password varchar(255) NOT NULL, first_name varchar(15) NOT NULL, last_name varchar(20) NOT NULL, phone_number varchar(15) NOT NULL ) ENGINE = INNODB; DROP TABLE IF EXISTS sess...
true
17bfe638ec1060a1dfaac21d1c6cd9c7281befeb
SQL
lipf06/sns-crm
/sns-api/src/main/java/zx/soft/sns/api/dao/wechat_keywords.sql
UTF-8
1,579
3.171875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.2.2 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: 2015-07-02 03:53:29 -- 服务器版本: 5.5.37-MariaDB-log -- 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
31e16afe4e8eea9fcd9993bed93aad74aae638a3
SQL
Zacard274/tornado-layui
/sql/sql.sql
UTF-8
9,225
3.34375
3
[]
no_license
-- KTV 信息表, 硬件信息在授权后获取 CREATE TABLE `ktv_store` ( `ktv_id` int primary key auto_increment comment 'KTV ID', `hash_id` varchar(32) NOT NULL DEFAULT '' comment 'KTV ID hash', `agent_id` int NOT NULL DEFAULT 0 comment '代理商 ID', `ktv_name` varchar(128) NOT NULL DEFAULT '' comment 'KTV名称', `ktv_subname` varchar...
true
43b44226688994cead4bbae656b13c0580960866
SQL
arshidkv12/url_shortner
/links.sql
UTF-8
1,462
2.921875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.4.14 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: May 03, 2017 at 01:51 PM -- Server version: 5.6.26 -- PHP Version: 5.6.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;...
true
0e9442b32e951cb898a8e0ed1e4b2f826799d8db
SQL
ssoares/refuge2buzz
/bin/moduleRssCreate.sql
UTF-8
1,632
2.953125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 3.1.3 -- http://www.phpmyadmin.net -- -- Serveur: 209.222.235.12:3306 -- Version SVN: $Id: moduleRssCreate.sql 1367 2013-12-27 04:19:31Z ssoares $ SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; -- -------------------------------------------------------- REPLACE INTO `Modules` (`...
true
dd953406744835de859b533d431cf204fa6444e3
SQL
robertlrs/ltr-config
/xgboost/gbdt-train-sample-hot.sql
UTF-8
1,649
3.484375
3
[]
no_license
create table if not exists zhouyf.gbdt_feature_train_hot_sample(pvid string,label tinyint, attrs string, hittitle string, price string, difftm string, sellcnt string, evlcnt string, collectcnt string, addCartCnt string, ctr string, uid_ctr string, refund_rate string,cate_ctr string, cate_weight string, c...
true
3afe0e05e1c71aca8d2e8003a19ea1cde5efd871
SQL
tommy8137/importwsdepro
/backEnd/db-migrate/migration_sql/20190603030847-LPP-View-Modify.sql
UTF-8
2,834
3.578125
4
[]
no_license
CREATE OR REPLACE VIEW wiprocurement.predict_part_number as select d.part_number, p.plant, rc.prctr, d.manufacturer from eebom_projects p, edm_version v, eebom_detail d, marc rc where p.project_code in ('4PD0FT01B001','4PD0GK010001','4PD0FD010001','4PD0F8010001') and p.id = v.eebom_project_id and v.id = d.edm_versi...
true
4efb2ab3eec63831da13074a9ae8a85cf086b8ba
SQL
RoyMolenaar77/Spider_test
/SQL Script/2.5/017 - Migration Product Media Artikel Color Level.sql
UTF-8
727
3.0625
3
[]
no_license
--merge productmedia pd --using --( -- select pColor.productid as ColorProductID, pm.* from -- productmedia pm -- inner join product p on p.productid = pm.productid -- inner join product pColor on pColor.parentproductid = p.productid -- where pm.vendorid in (1,48) and (p.isconfigurable = 1 and p.parentproductid is n...
true
fbb959e064e4c24e120e51ad69e6df5a1732c672
SQL
bulgariamitko/SoftUniHomeWordsAndMore
/3.0PHPFundaments/Bonus/phpExams/Exam 19 March 2017/skiVacation/Ski.sql
UTF-8
4,125
3.0625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.5.4.1deb2ubuntu1 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: 19 март 2017 в 14:51 -- Версия на сървъра: 5.7.17-0ubuntu0.16.04.1 -- PHP Version: 7.0.17-2+deb.sury.org~xenial+1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET ...
true
effb953821beefd58cbf053224dac6fefcae3db2
SQL
VladSavustianenko/DataBase
/loop.sql
UTF-8
572
2.828125
3
[]
no_license
DECLARE new_values INT NOT NULL DEFAULT 1; BEGIN FOR i IN 1..new_values LOOP INSERT INTO team(team_name) VALUES ('Barcelona'); INSERT INTO match(team_home_name, team_away_name, match_home_goals, match_away_goals, match_results, season_period) VALUES ('Barcelona', 'Liverpoo...
true
b3578d25e55c48e50d0627e2ad2599e91de81852
SQL
gdelamardiere/compte
/comptes.sql
UTF-8
39,402
3.5
4
[]
no_license
-- phpMyAdmin SQL Dump -- version 3.4.5 -- http://www.phpmyadmin.net -- -- Client: 127.0.0.1 -- Généré le : Mar 09 Avril 2013 à 18:26 -- Version du serveur: 5.5.16 -- Version de PHP: 5.3.8 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */...
true
c384440109e68a0a44fd0f7007145f06fc979a45
SQL
changmingivy/ironrhino
/templates/createdb.mysql.sql
UTF-8
1,486
3.453125
3
[]
no_license
drop database if exists ironrhino; create database ironrhino default charset utf8 collate utf8_general_ci; use ironrhino; drop function if exists get_dictionary_label; delimiter $$ create function get_dictionary_label(items text, value varchar(255)) returns varchar(255) begin declare length integer; ...
true
b297d8184abd8a8917f5b6baa6bff882e5143337
SQL
Lplenka/DS_NN
/Leetcode/SQL_/median.sql
UTF-8
1,570
4.4375
4
[]
no_license
use amazon; create table IF NOT EXISTS Employee ( id int NOT NULL AUTO_INCREMENT, salary int, PRIMARY KEY (id) ); insert into Employee (salary) values (5000),(4000),(2000),(2345),(5677),(2210), (7890),(2345),(10000),(4654),(9992),(2324); select * from Employee; # Median Salary select AVG(e.salary) from ( sele...
true
3b2a16e1efbc8cef74fc44afb0b619c9bbc9f08f
SQL
MissoulaConnect/IRis-SQL-queries
/destination_transformations/addresses.sql
UTF-8
286
2.640625
3
[]
no_license
SELECT 'TODO' AS id, site.site_id AS location_id, site.agency_id AS organization_id, site.add1 AS address_1, site.add2 AS address_2, site.city AS city, site.state AS state_province, site.zip AS postal_code, site.country AS country FROM site WHERE site.deleted IS NULL
true
54d0e84b97307ced960b7649de0ebddd9463bf58
SQL
kasisoft/leister-mailserver-pgsql
/setup-db/07-create-table-tls-policy.sql
UTF-8
397
3
3
[]
no_license
DO $$ BEGIN CREATE TYPE POLICY_TYPE AS ENUM ('none', 'may', 'encrypt', 'dane', 'dane-only', 'fingerprint', 'verify', 'secure'); EXCEPTION WHEN duplicate_object THEN null; END $$; CREATE TABLE IF NOT EXISTS tlspolicies ( id INTEGER NOT NULL, domain VARCHAR(255) NOT NULL, policy POLICY_TYPE NOT NULL, params ...
true
5c788b0f4f29f7a87e31231b943c4353cde493e0
SQL
kingfish777/COVID19
/cv19v1.sql
UTF-8
3,466
3.78125
4
[]
no_license
SELECT COUNT(*) AS cnt, subject_name, subject_semtype FROM smdb.predication WHERE subject_cui LIKE '%|%' GROUP BY subject_name, subject_semtype ORDER BY cnt DESC, subject_name; SELECT count(*) AS cnt, subject_name, subject_semtype, predicate, object_name FROM predication WHERE object_name LIKE '%orona%virus%' #a...
true
5b880a73da0c7460c8ba72fca871f5e39317dabd
SQL
vierge/bootcampx
/4_queries/9_most_confusing_assignments.sql
UTF-8
259
3.578125
4
[]
no_license
SELECT assignments.id as assignment, name, day, chapter, count(assistance_requests.assignment_id) as total_requests FROM assignments JOIN assistance_requests ON assignment_id = assignments.id GROUP BY assignments.id ORDER BY total_requests DESC;
true
8a3add69eb1337e2f98179b25f9cd74443f64752
SQL
NunoAlexandre/innovation-funding-service
/ifs-data-layer/ifs-data-service/src/main/resources/db/migration/V91_2_1__Lead_applicant_org_type.sql
UTF-8
664
3
3
[ "MIT" ]
permissive
CREATE TABLE `lead_applicant_type` ( `competition_id` BIGINT NOT NULL, `organisation_type_id` BIGINT NOT NULL, PRIMARY KEY (`organisation_type_id`, `competition_id`), INDEX `competition_id_fk_idx` (`competition_id` ASC), CONSTRAINT `competition_id_fk` FOREIGN KEY (`competition_id`) REFERENCES `competi...
true
fdada615298962142ec659cf1c7574fc4de9b9b9
SQL
kimchangsi/gradle_mybatis_c3p0
/Scripts/test.sql
UTF-8
709
3
3
[]
no_license
select user(), database(); select title_code,title_name from title; select * from department; select * from employee; select dept_code, dept_name, dept_floor from department; select dept_code, dept_name, dept_floor from department select eno, ename, salary, dept_code, dept_name, dept_floor, gender, joindat...
true
520cf5e511aecb3d6778b1dbac5f347383e8893d
SQL
ymougenel/bulletTracer
/conf/evolutions/default/1.sql
UTF-8
3,924
3.515625
4
[]
no_license
# --- Created by Ebean DDL # To stop Ebean DDL generation, remove this comment and start using Evolutions # --- !Ups create table client ( id bigint not null, nom varchar(255), adresses varchar(255), email varcha...
true
f2e6deb7ea8f6e6837607cde8426c42ae6ff3ba8
SQL
nguyenngocloi1234/RELATION-DATABASE
/thao tac voi bang.sql
UTF-8
884
3.328125
3
[]
no_license
create table contacts ( contact_id int(11) not null auto_increment, last_name varchar(30) not null, first_name varchar(25), birthday date, constraint contacts_pk primary key(contact_id) ); create table suppliers ( supplier_id int(11) not null auto_increment, supplier_name varchar(50) not null, account...
true
b3b163f7f0fbaf00f3a1aa3d2411648520ce73f6
SQL
mahmoudmohey97/UserManagement
/data/usermanagement.sql
UTF-8
8,307
3.046875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Apr 17, 2019 at 09:41 PM -- Server version: 10.1.38-MariaDB -- PHP Version: 7.2.16 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
true
56df1b21e9de4263561072f2b6c43c628c71f80f
SQL
deividhs/UniversityDatabase
/UniversityDatabase/Tables/Students.sql
UTF-8
1,021
3.015625
3
[]
no_license
CREATE TABLE Students ( StudentId VARCHAR(8) NOT NULL, FirstName VARCHAR(30) NOT NULL, MiddleName VARCHAR(30) NULL, LastName VARCHAR(30) NOT NULL, StreetAddress VARCHAR(40) NOT NULL, City VARCHAR(30) NOT NULL, State VARCHA...
true
cd4352e0761fe2aa5db6cd96a88588835eed3674
SQL
filipeoliveirah/php-default-project
/res/sql/procedures/get/sp_workers_get.sql
UTF-8
386
3.46875
3
[]
no_license
CREATE PROCEDURE sp_workers_get( pidworker INT ) BEGIN SELECT a.*, b.*, c.desjobposition, CONCAT(d.desdirectory, d.desfile, '.', d.desextension) AS desphoto FROM tb_workers a INNER JOIN tb_persons b ON a.idperson = b.idperson INNER JOIN tb_jobspositions c ON a.idjobposition = c.idjobposition LEFT JOIN tb_fil...
true
031329a228ab01d4920273de2849c0c0d4e1f87a
SQL
jashmead/mapsndata
/sqls/history.sql
UTF-8
2,063
3.28125
3
[]
no_license
update helps set title = name where title is null or title = ''; insert into members (person_id, talk_id, rsvp_status, member_type) values (154, 336, 'yes', 'admin'); select * from members; alter table members rename to partners\^J; alter table partners rename column member_type to partner_type; select * from users; se...
true
0865006506f1d7d8c08388680141db7e37fdc346
SQL
jeonyoungjun32/HRD_0802_-
/HRD_0802_쇼핑몰관리/WebContent/쇼핑몰관리.sql
UTF-8
4,731
3.875
4
[]
no_license
drop table member; create table member( memno char(4) Primary Key, name varchar2(30) not null, address varchar2(100)not null, hiredate date, gender char(1), tel1 char(3), tel2 char(4), tel3 char(4) ); ---------------select.jsp------------------------- select memno,name,to_char(hiredate,'yyyy.mm.dd.')...
true
085900837356dae4f04d9a6d7378935553823ecd
SQL
confluentinc/kafka-tutorials
/_includes/tutorials/aviation/confluent/code/tutorial-steps/dev/c02.sql
UTF-8
388
2.8125
3
[ "Apache-2.0" ]
permissive
CREATE TABLE flights ( id INT PRIMARY KEY, origin VARCHAR, destination VARCHAR, code VARCHAR, scheduled_dep TIMESTAMP, scheduled_arr TIMESTAMP ) WITH ( KAFKA_TOPIC = 'flights', FORMAT = 'JSON', PARTITIONS = 6 ); CREATE TABLE bookings ( id INT PRIMARY KEY, customer_id INT, flight_id INT ) WITH (...
true
680c9ca1f09359e543f0e889bdb56c4f56535756
SQL
anwar-cell/mule-api-recipes
/streaming-api/src/main/sql/streaming-api.sql
UTF-8
367
2.78125
3
[]
no_license
CREATE USER 'bc_user'@'%' IDENTIFIED BY 'password'; CREATE DATABASE salesforce_contacts CHARACTER SET utf8; GRANT ALL PRIVILEGES ON salesforce_contacts.* TO 'bc_user'@'%' IDENTIFIED BY 'password'; USE salesforce_contacts; CREATE TABLE sfdcevent (Id varchar (255), FirstName varchar (255), LastName varchar (255), Em...
true
cb596e49b133467b3b5509ba7cfeac4f3c774608
SQL
aayu1990/SQL
/6c).sql
UTF-8
140
3.734375
4
[]
no_license
SELECT f.title AS movie, COUNT(fa.actor_id) AS no_of_actors FROM film f INNER JOIN film_actor fa on f.film_id=fa.film_id GROUP BY f.title;
true
45fef70fba5394cea87c60fed9aef310e11d59a9
SQL
j9recurses/tubestrends_nosql
/ETL/database/tubestrends_createdb.sql
UTF-8
8,269
3.828125
4
[]
no_license
-- note: foreign keys constraints will be created at the end to avoid conflicts -- create the database CREATE DATABASE IF NOT EXISTS `tubes_trends`; -- ----------------------------------------------------- -- Table `tubes_trends`.`source_data_orgs` -- ----------------------------------------------------- DROP TABLE...
true
5209e82791d31616045665994eeed92f843e7f3f
SQL
askrana/Oracle_Scripts
/getplan_cursor.sql
UTF-8
1,174
3.40625
3
[]
no_license
set verify off set linesize 500 set pages 1000 accept sql_id prompt 'Please enter the sql_id :' accept child_no prompt 'Please enter the child_no :' --SELECT * FROM TABLE(dbms_xplan.display_cursor('&sql_id',&child_no,'advanced')); SELECT * FROM TABLE(dbms_xplan.display_cursor('&sql_...
true
a0a99127c375afcf4fd9b8a29618396d15514fbd
SQL
sinjinir1999/Analytics_OyeRickshaw
/Deployment/daily_ob.sql
UTF-8
1,932
3.734375
4
[]
no_license
select * from ( Select ve.onboarding_date,count(distinct vbn)as vbn_generated,nullif(d2d_vbn,0),nullif(o2d_vbn,0),nullif(oye_dost_vbn,0),nullif(agency_vbn,0) from tmp_operations.vehicle_consolidated ve left join (Select v.onboarding_date,count(distinct case when referral_vbn is not null then referral_mobile end)o2d_vb...
true
4ec95ebcbb4534572a1204ab21d8716e02a3f1b7
SQL
Ecodev/dilps
/tests/data/fixture.sql
UTF-8
2,647
2.9375
3
[ "MIT" ]
permissive
INSERT INTO `user` (`id`, `login`, `email`, password, role) VALUES (1000, 'administrator', 'administrator@example.com', MD5('administrator'), 'administrator'), (1001, 'senior', 'senior@example.com', MD5('senior'), 'senior'), (1002, 'junior', 'junior@example.com', MD5('junior'), 'junior'), (1003, 'student', 'stu...
true
89ff44d87279d7d968d21339834c9259f1823d12
SQL
sanamsitoula/JAS
/SQLQuery3.sql
UTF-8
481
2.75
3
[]
no_license
CREATE TABLE items ( item_id integer primary key identity, item_name national character varying(200), item_code national character varying(200), item_description national character varying(max), photo national character varying(max), group_id integer not null, user_id integer not null , item_cp national character ...
true
33d55ccd97e147aad07b704a69f7942c48820e0b
SQL
ilhamnadhif/datagrip-belajar-mysql
/console_2.sql
UTF-8
5,847
4.15625
4
[]
no_license
USE belajar_mysql; CREATE TABLE products ( id VARCHAR(100) NOT NULL, name VARCHAR(100) NOT NULL, description TEXT, price INT UNSIGNED NOT NULL, quantity INT UNSIGNED NOT NULL DEFAULT 0, created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ) ENGINE = InnoDB; SHOW...
true
87fd9e0029c1ccec8adc4f3296ffb276fbd5d9d7
SQL
shung-yang/Databse_final_project
/dbProject/game_wiki.sql
UTF-8
3,425
3.1875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.3 -- https://www.phpmyadmin.net/ -- -- 主機: 127.0.0.1 -- 產生時間: 2018 年 12 月 11 日 17:07 -- 伺服器版本: 10.1.37-MariaDB -- PHP 版本: 7.2.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHAR...
true
76974946c036fba5963d9e5f0e87e0d4cfdf9434
SQL
GavinAlison/valison
/src/com/alison/SQL/110_fn_querystr.sql
GB18030
1,630
2.984375
3
[]
no_license
CREATE OR REPLACE FUNCTION fn_querystr(in_str In Varchar2, in_key varchar2, in_separator In Varchar2) RETURN varchar2 as v_keyindex Number := 0; v_sepindex number := 0; v_str varchar2(32767); begin /* urlлȡֵ */ ...
true
b5fe187503e7ed479d47ce9900bf705d0ed96053
SQL
NeshoNeshev/Microsoft-SQL
/TableRelations/Problem 6.University Database.sql
UTF-8
880
3.625
4
[]
no_license
CREATE DATABASE University USE [University] CREATE TABLE Majors ( MajorID INT PRIMARY KEY IDENTITY, [Name] NVARCHAR(50) NOT NULL ) CREATE TABLE Students ( StudentID INT PRIMARY KEY IDENTITY, StudentNumber VARCHAR(10) NOT NULL, StudentName NVARCHAR(50) NOT NULL, MajorID INT NOT NULL FOREI...
true
5db0679e662a61359d49abdf1fa135c69039d976
SQL
aakashmt97/SQL
/a71. GROUP_BY.sql
UTF-8
716
3.5625
4
[]
no_license
SELECT * FROM payment; SELECT customer_id FROM payment GROUP BY customer_id ORDER BY customer_id; SELECT customer_id, SUM(amount) FROM payment GROUP BY customer_id ORDER BY customer_id DESC; -- ORDER BY SUM(amount) DESC; SELECT customer_id, COUNT(amount) FROM payment GROUP BY customer_id ORDER BY COUNT(amount) DESC;...
true
c5b5559e2250e10842bd87300d7513798108e5a4
SQL
Fa80/SQL_Partie2_Cr-ation-de-tables
/exo2/index.sql
UTF-8
705
3.65625
4
[]
no_license
--Dans la base de données webDevelopment, créer la table tools avec les colonnes suivantes : -- id (type INT, auto-incrémenté, clé primaire) -- tool (type VARCHAR) -- USE `webDevelopment`; --on utilise USE webDevelopment car la table existe déjà. CREATE TABLE `tools`( `id` INT NOT NULL AUTO_INCREMENT, -...
true
2b385be8bf060264907451f65c6ef008bb90d478
SQL
zearaujo25/Banco-de-Dados
/Atividade3.sql
UTF-8
937
3.484375
3
[]
no_license
create database filmes ; use filmes; create table filme ( idFilme integer unsigned not null auto_increment , nome varchar(70) not null, duracao integer unsigned , anoLancamento year not null , avaliacaoFilme integer, primary key (idFilme) ); alter table filme add column nomeoriginal varchar(70) after avaliacao...
true
e975d95716edd33190be9ef3a880c4794bdb6e62
SQL
naivesoft/st-analysis
/stock-analysis/src/script/proc/tt.sql
UTF-8
13,782
3.234375
3
[]
no_license
drop procedure if exists `st`.`test_cursor` ; delimiter // create procedure test_cursor (in in_date_id int(10), in in_vol_dim_id int(10), in dropflag boolean, in truncateflag boolean) begin declare _TIME_DIM_ID int; declare _RPT_ID int; declare _DATE_ID int; declare _TIME_DIMTYPE_ID int; dec...
true
7e8a0a916253f4f272cc17d02e745a4d3d5f5115
SQL
RobertWSmith/TD_SQL
/Order Management/Scheduling Agreement Status on Date 2015-03-06.sql
UTF-8
10,754
2.5625
3
[]
no_license
DYNAMIC EXPLAIN SELECT BOM.FISCAL_YR , BOM.SLS_DOC_ID , BOM.SLS_DOC_ITM_ID , BOM.END_OF_PRIOR_MONTH_DT , BOM.LAST_ORDER_DAY_OF_MONTH , BOM.CUST_PRCH_ORD_ID , BOM.CUST_PRCH_ORD_TYP_CD , BOM.CUST_PRCH_ORD_DT , BOM.SOLD_TO_CUST_ID , BOM.CUST_NAME , BOM.OWN_CUST_ID , BOM....
true
8940d701f07a13532560f2e25c7fd481e7bf221d
SQL
mayursinh059/sql-data-science-udacity
/1) Lesson 1 Basics/6) 21. Quiz ORDER BY II.sql
UTF-8
1,340
4.5
4
[ "MIT" ]
permissive
/* 1) Write a query that displays the order ID, account ID, and total dollar amount for all the orders, sorted first by the account ID (in ascending order), and then by the total dollar amount (in descending order). */ SELECT id, account_id, total_amt_usd FROM orders ORDER BY account_id, total_amt_usd DESC LIMIT 20; ...
true
34c628a8b4aaebc7a0c69ac2870829ab581b4553
SQL
AscenKeeprov/Database-Basics
/Exercise8-ExamPreparation/WashingMachineService/CurrentClients.sql
UTF-8
268
3.75
4
[ "MIT" ]
permissive
USE WMS SELECT CONCAT(c.FirstName, ' ', c.LastName) AS [Client], DATEDIFF(DAY, j.IssueDate, '2017-04-24') AS [Days going], j.[Status] FROM Clients AS c JOIN Jobs AS j ON j.ClientId = c.ClientId WHERE j.[Status] <> 'Finished' ORDER BY [Days going] DESC, c.ClientId
true
cb162084b6f95ab9e60c506fb916ffbba369cba8
SQL
mywns123/spring5_db_study
/Scripts/2.ddl.sql
UTF-8
172
2.5625
3
[]
no_license
create table member( id int auto_increment primary key, email varchar(255) , password varchar(100), name varchar(100), regdate datetime, unique key(email) );
true
ffbcbbba47f109c7592d20c97da399eb3d9715d4
SQL
IanCode/js-skate
/app/White_HW3_DDL.sql
UTF-8
1,165
4.03125
4
[]
no_license
.mode columns .headers on .nullvalue NULL PRAGMA foreign_keys = ON; CREATE TABLE Student( studentID INTEGER UNIQUE PRIMARY KEY NOT NULL, studentName STRING NOT NULL, major STRING, class STRING NOT NULL, gpa REAL, CHECK (class IN ('Freshman', 'Sophomore', 'Junior', 'Senior')), CHECK (gpa >= 0.0 AND gpa <= 4.0)...
true
e79a5ef5fbb55ed06ec573f7a32a7b9c96bcb568
SQL
mimotej/IIS
/app/database/IIS_database.sql
UTF-8
7,118
3.875
4
[]
no_license
DROP TABLE if exists request_for_payment ; DROP TABLE if exists type_of_medical_intervention ; DROP TABLE if exists medical_report ; DROP TABLE if exists medical_examination_request ; DROP TABLE if exists health_problem ; DROP TABLE if exists health_insurance_worker ; DROP TABLE if exists doctor ; DROP TABLE if...
true
10d7f55e20928136efd01b451b4d4157b06b0bfa
SQL
jasoncode/316Project
/agreedSubjects.sql
UTF-8
968
3.71875
4
[]
no_license
--Subjects agreed upon SELECT trim(both ' ' from subject) AS agreedSubjects FROM (SELECT voteID, bill_id FROM (SELECT p1votes.vote_id AS voteID FROM (((SELECT first_name, last_name, vote_id, vote FROM (persons JOIN person_votes ON persons.id = pe...
true
b634c5d0bb70ea02c9daed2ebdf4b2a74a723566
SQL
V1n1f3rnando/EstudosCSharp
/Projeto03/SQLQuery3.sql
UTF-8
218
2.65625
3
[]
no_license
CREATE TABLE Pessoa( [IdPessoa] INT IDENTITY (1, 1) NOT NULL, [nome] VARCHAR (50) NOT NULL, [dataNascimento] DATETIME NOT NULL, PRIMARY KEY CLUSTERED ([IdPessoa] ASC) );
true
46bc72a90201ecdd8d78d846cf5406eae5ec79df
SQL
opengauss-mirror/openGauss-server
/src/common/tutorial/advanced.source
UTF-8
1,578
3.90625
4
[ "LicenseRef-scancode-mulanpsl-2.0-en", "LicenseRef-scancode-unknown-license-reference", "PostgreSQL", "BSD-3-Clause", "LGPL-2.0-or-later", "LicenseRef-scancode-unicode", "LicenseRef-scancode-warranty-disclaimer", "curl", "GPL-1.0-or-later", "LGPL-2.1-or-later", "LGPL-2.1-only", "CC-BY-4.0", ...
permissive
--------------------------------------------------------------------------- -- -- advanced.sql- -- Tutorial on advanced more PostgreSQL features -- -- -- Copyright (c) 1994, Regents of the University of California -- -- src/tutorial/advanced.source -- -----------------------------------------------------------------...
true
724b371235f1b29623838e7254c4d307d3f4681a
SQL
hd9/aspnet-microservices
/src/RecommendationSvc/db.sql
UTF-8
3,532
3.734375
4
[ "MIT" ]
permissive
-- Recommendation database init script create database if not exists recommendationdb; use recommendationdb; create table if not exists product ( slug VARCHAR(100) NOT NULL PRIMARY KEY, name VARCHAR(100) NOT NULL, description VARCHAR(1000) NOT NULL, price ...
true
eecffc7215492b9bc4d5c0f73be5a6ff5eed976a
SQL
nengen/pythRSQL
/SQL/SQLProblem1/sql3.sql
UTF-8
419
2.65625
3
[]
no_license
SELECT * FROM PRODUCTS WHERE STOCK < REORDERLEVEL SELECT CompanyName,COUNTRY FROM Suppliers WHERE COUNTRY == "Norway" OR COUNTRY == "Sweden" OR COUNTRY = "Denmark" OR COUNTRY == "Finland" SELECT ProductName FROM PRODUCTS WHERE ProductName LIKE "Women%" OR ProductName LIKE "%Gloves" DELETE FROM Suppliers WHERE Supp...
true
097fa6f10647b02118d8907d0fdf6b96d3e90c8d
SQL
it-gro/CodeGenerator
/UTL_TEXT/UnitTest/run_test.sql
UTF-8
522
2.53125
3
[ "MIT" ]
permissive
declare l_version pls_integer; l_cmd varchar2(200); l_owner varchar2(30); begin select owner into l_owner from all_objects where object_type = 'PACKAGE' and object_name = 'UT'; execute immediate 'alter session set current_schema=&INSTALL_USER.'; execute immediate 'grant inherit privile...
true
1104d6c1d261b924ccede9c42acbdd51071857b1
SQL
MichaelHu/mynotes_data
/sql/mysql_create_procedure_getline_with_context.sql
UTF-8
735
3.796875
4
[]
no_license
-- use notes; drop procedure if exists p_getline_with_context; delimiter // create procedure p_getline_with_context(line_num int, context_num int, direction int) -- direction: -1 backwards, 1 forwards, 0 both directions begin case direction when -1 then select id as line_num, article_id, text from ...
true
fd9c98d863af9d67738b66390b871856d834d021
SQL
jumorris2017/SQL-queries
/CE_Analysis_Iowa_Stores_TOPLINE__SBP411.sql
UTF-8
59,608
3.25
3
[]
no_license
--TOPLINE CE SCORES WITH SQ AS (SELECT c.FSCL_YR_NUM ,c.FSCL_QTR_IN_YR_NUM --,ce.STORE_NUM -- Compute top box scores for each question ,CASE WHEN COUNT(CASE WHEN ce.QSTN_ID = 'Q2_2' THEN ce.QSTN_ID END) = 0 THEN NULL ELSE TO_CHAR(SUM(CASE WHEN ce.RSPNS_ID = '7' AND ce.QSTN_ID = 'Q2_2' THEN 1 ELSE 0 END)...
true
cc26b2f57bdcee362222df4c2f1c5e2bf0263156
SQL
CUBRID/cubrid-testcases
/sql/_01_object/_09_partition/_005_reorganization/cases/1169.sql
UTF-8
1,401
3.390625
3
[ "BSD-3-Clause" ]
permissive
-- create table of hash partition having size 4 on char field and change partition to 1024 create table hash_test(id int , test_char char(50), test_varchar varchar(2000),primary key(id,test_char) ) PARTITION BY HASH(test_char) PARTITIONS 4; insert into hash_test values(1,'aaa','aaa'); insert into...
true
d4fa40a2ff69944604d4531f270a145f9694c7c9
SQL
thebearingedge/lil-erp
/db/migrations/ixgk6g09.alter_schema_journal.sql
UTF-8
213
2.609375
3
[ "MIT" ]
permissive
alter table schema_journal drop constraint schema_journal_pkey, add primary key (timestamp, migration_id); --- alter table schema_journal drop constraint schema_journal_pkey, add primary key (timestamp);
true
1e1d99ae7f99e115023b544e605dbc3365c67700
SQL
ephotovideo/ePhotoVideo
/ePhotoVideo(3).sql
UTF-8
12,157
3.234375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.0.10.6 -- http://www.phpmyadmin.net -- -- Хост: 127.0.0.1:3306 -- Час створення: Трв 21 2019 р., 13:07 -- Версія сервера: 5.5.41-log -- Версія PHP: 5.6.3 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT...
true
9043498a928eff298ea219be58a9ce6d977a7056
SQL
plaetzaw/SQL
/restaurant.sql
UTF-8
1,504
3.78125
4
[]
no_license
-- CREATE TABLE restaurant ( -- id SERIAL NOT NULL PRIMARY KEY, -- name varchar, -- distance integer, -- stars integer, -- category varchar, -- favoriteDish varchar, -- takeout boolean, -- lastTimeEaten date -- ); -- INSERT INTO restaurant VALUES -- (DEFAULT, 'The Tuck Room', 4, 2, 'American', 'Pasta Carbonara', TRUE,...
true
7f40560e33f8c356d780cd31b0a7a880560b59a0
SQL
tomastonina/Algabo-TNR
/Base de datos/producto.sql
UTF-8
8,513
2.890625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.3 -- https://www.phpmyadmin.net/ -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 08-11-2020 a las 18:30:53 -- Versión del servidor: 10.4.14-MariaDB -- Versión de PHP: 7.4.11 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
true
6a131c13beb2dcdf8ec4ff0fea927a48638c91e0
SQL
puilp0502/192R-kweb-nodejs-project
/schema/0001.sql
UTF-8
679
3.734375
4
[]
no_license
-- 0001.sql: CREATE TABLE user and ALTER TABLE article CREATE TABLE user( pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT, user_id VARCHAR(30), username VARCHAR(30), hashed_password VARCHAR(128), date_joined TIMESTAMP DEFAULT CURRENT_TIMESTAMP, is_active TINYINT, is_staff TINYINT DEFAULT 0 ) CHARSET UTF8 COLLATE ut...
true
84432f46d5621d2e1cf0882cd7ad2245997ade76
SQL
gabrielnevess/update-stock-backend
/src/main/resources/db/migration/V3__create_tb_user_role.sql
UTF-8
433
3.578125
4
[ "MIT" ]
permissive
CREATE TABLE IF NOT EXISTS TB_USER_ROLE ( USER_ID INTEGER NOT NULL, ROLE_ID INTEGER NOT NULL, PRIMARY KEY (USER_ID, ROLE_ID), FOREIGN KEY (USER_ID) REFERENCES TB_USER(ID), FOREIGN KEY (ROLE_ID) REFERENCES TB_ROLE(ID), CREATED_AT TIMESTAMP WITHOUT TIME ZONE DEFAULT TO_CHAR(now(), 'yyyy-MM-dd HH24:mm:ss')::ti...
true
f0d23e3c667714d9f67f1b2942f70fa4d8df6ee1
SQL
Andres-88/finalMutante
/DB/final2020_mutant.sql
WINDOWS-1252
3,255
3.015625
3
[]
no_license
/* SQLyog Ultimate v11.11 (64 bit) MySQL - 5.5.5-10.4.13-MariaDB : Database - final2020_mutant ********************************************************************* */ /*!40101 SET NAMES utf8 */; /*!40101 SET SQL_MODE=''*/; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET...
true
240e96d5fd9486ce295f1ead7d0f93d034440bc1
SQL
ZeeStorm/StickEase
/db/stickease_2011-10-26.sql
UTF-8
4,613
3
3
[]
no_license
# ************************************************************ # Sequel Pro SQL dump # Version 3408 # # http://www.sequelpro.com/ # http://code.google.com/p/sequel-pro/ # # Host: localhost (MySQL 5.5.9) # Database: stickease # Generation Time: 2011-10-26 21:09:12 +0000 # ************************************************...
true
760ac7f14cbc4f14a70cd298210bf60d5441bd62
SQL
Nineodes19/happy-end
/LibraryWeb/out/artifacts/LibraryWeb_war_exploded/WEB-INF/classes/lib.sql
UTF-8
2,110
3.5625
4
[]
no_license
DROP DATABASE IF EXISTS lib; CREATE DATABASE lib; USE lib; DROP TABLE IF EXISTS student; CREATE TABLE student( stu_xh INT comment '学号' AUTO_INCREMENT primary key, stu_name VARCHAR(20) COMMENT '姓名', stu_pwd VARCHAR(20) COMMENT '密码', stu_sex VARCHAR(20) COMMENT '性别', stu_age INT COMMENT '年龄', stu_mobile VARCHAR(2...
true
b04654ede8a3ed61148292ca9b19c94979617b2f
SQL
GyanPrakashSinghIIITG/Placement-Cell-Project
/pms.sql
UTF-8
16,247
2.921875
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.5.2 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Apr 30, 2018 at 06:56 AM -- Server version: 10.1.13-MariaDB -- PHP Version: 5.6.20 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CL...
true
4b374a63a573b1007aeb697e33cf2afeae58d12b
SQL
pgcodekeeper/pgcodekeeper
/ru.taximaxim.codekeeper.core.tests/src/main/resources/ru/taximaxim/codekeeper/core/modify_function_parallel_diff.sql
UTF-8
555
2.53125
3
[ "Apache-2.0" ]
permissive
SET search_path = pg_catalog; DROP FUNCTION public.add_unsafe(integer, integer); CREATE OR REPLACE FUNCTION public.add_safe_second(integer, integer) RETURNS integer LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE AS $_$select $1 + $2;$_$; CREATE OR REPLACE FUNCTION public.add_restricted(integer, integer) RETURNS...
true