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
b422872b3f29fc93d7b0fea56754d785bf5fee98
SQL
hernan-alperin/segmentacion
/EjemplosMDQ/cortar_equilibrado_mza_independiente.sql
UTF-8
3,331
4.125
4
[ "MIT" ]
permissive
/* titulo: cortar_equilibrado_mza_independiente.sql descripción: -- separando listado por segmentos en manzanas independientes -- donde la distribución de viviendas en cada segmento en la manzana es equilibrado -- y rank es el orden de visita en el segmento autor: -h fecha: 2019-04-19 Vi */ ---------------------------...
true
67a2e9d1c59529a564c29f5e0f1cf55009365953
SQL
Murugar/SpringBootScalaAngular2
/src/main/resources/init.sql
UTF-8
772
2.859375
3
[]
no_license
drop table account; drop table post; CREATE TABLE account( id INT NOT NULL AUTO_INCREMENT, name VARCHAR(100) NOT NULL, password VARCHAR(40), PRIMARY KEY ( id )); CREATE TABLE post( id INT NOT NULL AUTO_INCREMENT, title VARCHAR(100) NOT NULL, content VARCHAR(200), reg_date TIMESTAMP, PRIMARY K...
true
c4dd7afad01bb3fce6cd326884e46c28a1df3b0a
SQL
emlynazuma/data-toolkit
/sql/edm_20200604.sql
UTF-8
274
3.296875
3
[]
no_license
SELECT u.name, u.email FROM users AS u WHERE lastlogin_at > unix_timestamp('2019-12-01') AND lastlogin_at < unix_timestamp('2020-06-01') AND u.id NOT IN ( SELECT DISTINCT userid FROM courses_users_package )
true
040c1cf30c4591f6316bd6afb3663066b025c837
SQL
GIJoseph/School
/Database Management/final/Player.sql
UTF-8
10,737
3.171875
3
[]
no_license
CREATE DATABASE IF NOT EXISTS `MLB_NATIONAL_LEAGUE_CENTRAL`; USE `MLB_NATIONAL_LEAGUE_CENTRAL`; DROP TABLE IF EXISTS `Player`; CREATE TABLE `Player` ( `first_name` varchar(15) NOT NULL, `last_name` varchar(15) NOT NULL, `jersey_number` numeric(2,0) NOT NULL, `position` varchar(2) , `salary` numeric(10,0), ...
true
692a076c012bfd7931d7e132e52805be98d17946
SQL
sooyeonleeee/BCG
/src/main/resources/schema/erd.sql
UTF-8
850
3.25
3
[]
no_license
/* Drop Tables */ DROP TABLE bookinfo CASCADE CONSTRAINTS; DROP TABLE genre CASCADE CONSTRAINTS; /* Create Tables */ CREATE TABLE bookinfo ( bookcode varchar2(100) NOT NULL, genrecode number NOT NULL, title varchar2(4000), imgurl varchar2(4000), wordcloud varchar2(4000), graph varchar2(40...
true
877d5490c451b92442a4e7b3372d8bd5ba9706ea
SQL
danisyellis/SQLpractice
/twitter/queries.sql
UTF-8
321
2.90625
3
[ "MIT" ]
permissive
INSERT INTO tweets ("user_id", "content") VALUES (20, "My tweet is less than 140 characters, yay!"); UPDATE tweets SET content="I hated that last tweet" WHERE id = 100; DELETE FROM users WHERE user_name = "stupid name"; SELECT content FROM tweets WHERE user_id = 3; SELECT content FROM tweets WHERE user_id = 1 LIMIT 1;...
true
1bd5992aeebc7ddc28384c4778b4cbdc4b27e201
SQL
mitrakreasindo/script-and-document
/Create-tables-versi03.sql
UTF-8
12,394
3.0625
3
[]
no_license
-- In schema Step03; several constraints are removed -- Several tables are already ignored in this version -- Two tables are named Tickets and TicketLines -- Bernaridho. 2017-07-26. --CREATE TYPE timestamp FROM DateTime ; CREATE TABLE "Step03".Breaks ( "Id" varchar(255) NOT NULL, Name varchar(255), --...
true
4d0e8a80d2698cc66cdf6b8b4afdccdb3d5baa55
SQL
schlinkertc/classifying_public_companies
/recycling/SQL_Queries/DELETE.sql
UTF-8
152
2.609375
3
[]
no_license
DELETE FROM financial_statements.presentations WHERE adsh in (SELECT adsh FROM financial_statements.submissions WHERE form !='10-K' )
true
0a41169d5d228deb3745c70765a99e19fe3339be
SQL
gunnibunny/Blue-Stats-Minecraft
/install/dataBase.sql
UTF-8
1,261
3.03125
3
[ "Apache-2.0" ]
permissive
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; CREATE TABLE IF NOT EXISTS `BlueStats_config` ( `row_id` int(11) NOT NULL, `server_id` int(11) NOT NULL, `option` varchar(64) NOT NULL, `plugin` varchar(64) NOT NULL, `value` text NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1...
true
0fdecee55a6db03573770ec9e955b3d47f383b9b
SQL
josephramsay/nz.co.kakariki.WNMSExtract
/WNMSExtract/sql/view/int_cell3g_traffic.sql
UTF-8
1,781
2.734375
3
[]
no_license
create or replace view int_cell3g_traffic as select a.rcid as rcid, a.rfid as rfid, a.ucid as ucid, a.ts as ts, interm_rnccn_vmconverl2667(a.vsrabmeancsvsumcum) as converl_2667, interm_rnccn_vmtrmbytehsdpa(a.vsdedicateddownlinkkbytesrlcreferencecelldlrabhsdpa) as trmbyte_hsdpa, interm_rnccn_vmtrmbytehsupa(a.vs...
true
0a3b613aaf70f28ce2f8d6b1714c17ac7fd1739a
SQL
kai-koch/wut
/sql/update0.1.1to0.1.2/CREATE_wut0.1.1.sql
UTF-8
54,658
3.75
4
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 3.4.11.1deb1 -- http://www.phpmyadmin.net -- -- Host: localhost -- Erstellungszeit: 19. Apr 2013 um 16:49 -- Server Version: 5.5.24 -- PHP-Version: 5.4.4-4 SET FOREIGN_KEY_CHECKS=0; SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT=0; START TRANSACTION; SET time_zone = "+00:00"; -...
true
ad139690e7bd9a3eb5ac86bd5a9ddec8abc00a46
SQL
Rayissach/bamazon
/bamazon.sql
UTF-8
955
3.09375
3
[ "MIT" ]
permissive
DROP DATABASE IF EXISTS bamazon_db; CREATE DATABASE bamazon_db; USE bamazon_db; CREATE TABLE products( id INT(11) AUTO_INCREMENT NOT NULL, product_name VARCHAR(40) NOT NULL, department_name VARCHAR(40) NOT NULL, price DECIMAL (10,4) NOT NULL, stock_quantity INTEGER(40) NULL, primary key(id) ); INSERT INTO products ...
true
9fdba0e7627808934cb59e5710bd93c9cce4d31a
SQL
AlanKalbermatter/TheHospital
/src/main/resources/db/Aggregation.sql
UTF-8
1,227
4.625
5
[]
no_license
--SHOW THE PATIENT'S APPOINTMENTS WITH EACH DOCTOR SELECT mydb.p.name AS 'Patients Names', mydb.p.symptom AS 'Patients Symptoms', mydb.ms.name AS 'Doctors names', mydb.a.date AS 'Appointments Date' FROM Appointments AS a LEFT JOIN Patients AS p ON p.id = a.patients_id RIGHT JOIN Medical_staff AS d ON d.id =...
true
6d58bf9d7ad83b29603ad8bb4ad37c4a54a74bf9
SQL
ew-shopp/ingestion_lib
/06_fetch_weather_owm/examples/weather_data_mysql_schema.sql
UTF-8
1,618
2.796875
3
[]
no_license
-- -------------------------------------------------------- -- Host: 192.168.1.21 -- Server version: 8.0.17 - MySQL Community Server - GPL -- Server OS: Linux -- HeidiSQL Version: 10.1.0.5464 -- --------------------------------------------------------...
true
828faebe1a9a1fa6d0846d7de3ee69b384564918
SQL
m-macnair/GSA3
/etc/schema/track_titles.sql
UTF-8
491
3.609375
4
[ "BSD-3-Clause" ]
permissive
CREATE TABLE `track_titles` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `title_id` int(10) unsigned NOT NULL, `track_id` int(10) unsigned NOT NULL, PRIMARY KEY (`id`), KEY `lyrics_id` (`title_id`), KEY `track_id` (`track_id`), CONSTRAINT `track_titles_ibfk_1` FOREIGN KEY (`title_id`) REFERENCES `titl...
true
d613e83085b3ae6427ac11b6b5d5f10701b4e75c
SQL
blavoie/oracle-scripts
/_blos/exttools/sqlt/utl/spm/imp_and_unpack_sts.sql
UTF-8
877
2.53125
3
[]
no_license
REM $Header: 215187.1 imp_and_unpack_sts.sql 11.4.5.8 2013/05/10 carlos.sierra $ PAU Requires Oracle Tuning Pack license. Hit "Enter" to proceed PAU About to re-create staging table SPM_STGTAB_STS. Hit "Enter" to proceed SET ECHO ON; DROP TABLE spm_stgtab_sts; ACC pwd PROMPT 'Enter &&_user. password, nee...
true
eda18535377d5902714b7c3ab7e763bf817b4ac3
SQL
shadow1687/guarderia
/evento.sql
UTF-8
1,312
2.75
3
[ "LicenseRef-scancode-unknown-license-reference", "MIT" ]
permissive
-- -------------------------------------------------------- -- Host: 127.0.0.1 -- Versión del servidor: 10.1.21-MariaDB - mariadb.org binary distribution -- SO del servidor: Win32 -- HeidiSQL Versión: 9.4.0.5144 -- ------------------------------------------------...
true
cb9a42c5d1fd79032c0ecd20dad607315d6fab10
SQL
ProgrammingPeter/Sports_Countdown
/Sports_pages/Connect to DB/nbaschedule.sql
UTF-8
5,580
3.546875
4
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.0.6 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Nov 02, 2014 at 05:01 AM -- Server version: 5.5.33 -- PHP Version: 5.5.3 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /...
true
f4f4b7748023ba6106622e665e6ef267fddb7354
SQL
ethiansjh/SQL
/Requete 19/requete.sql
UTF-8
308
3.3125
3
[]
no_license
SELECT UCASE(nom) AS 'nom_distrib', ( SELECT count(id) FROM film WHERE distrib.id = distrib_id ORDER BY count(id) DESC ) AS 'nombre_films', ( SELECT sum(duree_min) FROM film WHERE distrib.id = distrib_id ORDER BY sum(duree_min) DESC ) AS 'duree_min' FROM distrib;
true
df64dbc2c32fb56e966fd6ab845a14db0084d8d6
SQL
ahviplc/pythonLCDemo
/com/lc/python_1_100_Days_Demo/Day36-40/code/contact/contact.sql
UTF-8
1,264
2.84375
3
[]
no_license
/* Navicat Premium Data Transfer Source Server : ecs-lc-sh-mysql-localhost-root-root Source Server Type : MySQL Source Server Version : 50523 Source Host : ip:3306 Source Schema : contact Target Server Type : MySQL Target Server Version : 50523 File Encoding : 65001 ...
true
db7950b882a3d4384299d99ab5c30cd21548fc9c
SQL
cckmit/xinfu
/ccms/WebContent/WEB-INF/action/project/fitness/guestget/myhome/crud/query-favoritesnum.sql
UTF-8
209
2.734375
3
[]
no_license
select ( (select count(1) from cc_hkb_notice where status = 2 and org_id = ${def:org}) + (select count(1) from cc_hkb_faq where status = 2 and org_id = ${def:org}) )as favoritesnum from dual
true
de144b755166dc493bc8dd4cb5a4ebebf67aa1e6
SQL
deepakash7051/Assignment
/yii2.sql
UTF-8
1,185
2.8125
3
[ "BSD-3-Clause" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.8.0.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jan 22, 2019 at 05:51 AM -- Server version: 10.1.32-MariaDB -- PHP Version: 7.2.5 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @O...
true
cabf396b148e1c56049c67d75390e186c6e2495c
SQL
benwille/PHP-Project-Starter-Template
/database.sql
UTF-8
614
3.296875
3
[]
no_license
-- -- Table structure for table `users` -- CREATE TABLE `users` ( `id` int(11) NOT NULL, `first_name` varchar(255) DEFAULT NULL, `last_name` varchar(255) DEFAULT NULL, `email` varchar(255) DEFAULT NULL, `username` varchar(255) DEFAULT NULL, `hashed_password` varchar(255) DEFAULT NULL, `accounts` longtext...
true
2e5310c4a23802fa2416ca03e9cbbb9eee0b2055
SQL
ABassem16/InternetApplication-Project
/online_testing_project.sql
UTF-8
5,329
3.34375
3
[]
no_license
/* Navicat Premium Data Transfer Source Server : assignment2 Source Server Type : MySQL Source Server Version : 80018 Source Host : localhost:3306 Source Schema : online_testing_project Target Server Type : MySQL Target Server Version : 80018 File Encoding :...
true
d2499cff38b720e7aaf7c7f900c195afea2c6315
SQL
MichaelHendryWebDev/Spending_Tracker_project
/db/spending_tracker.sql
UTF-8
490
3.359375
3
[]
no_license
DROP TABLE transactions; DROP TABLE merchants; DROP TABLE tags; DROP TABLE budgets; CREATE TABLE merchants ( id SERIAL PRIMARY KEY, name VARCHAR(255), state BOOLEAN ); CREATE TABLE tags ( id SERIAL PRIMARY KEY, type VARCHAR(255) ); CREATE TABLE transactions ( id SERIAL PRIMARY KEY, merchant_id INT REFE...
true
5bd958b054673e1060e9435b5df8331e3e74a4fb
SQL
madhurivaishnav/SALTWEB
/SALT_NewDesign/Database/Procedure/dbo.prcPolicy_Get.PRC
UTF-8
796
3.390625
3
[]
no_license
SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[prcPolicy_Get]') AND type in (N'P', N'PC')) BEGIN EXEC dbo.sp_executesql @statement = N' /*Summary: Gets a policy Parameters: @PolicyID int, Returns: Nothing Called By: Policy.cs. Calls: Nothing ...
true
6775b3699f69ce88e644ad414fd7c7e61dc80e28
SQL
Hoopou/tp2_environnementGraphique
/Interface graphique - TP2 - sources/Création tables.sql
UTF-8
2,876
3.84375
4
[]
no_license
drop table if exists `tp2_graphique_bibliotheque_musique`.`albums`; drop table if exists `tp2_graphique_bibliotheque_musique`.`artistes`; drop table if exists `tp2_graphique_bibliotheque_musique`.`utilisateurs`; CREATE TABLE IF NOT EXISTS `tp2_graphique_bibliotheque_musique`.`utilisateurs` ( `id` INT NOT NULL AUTO...
true
13996c675a0b9d8fc06543c68fdf986540c96350
SQL
Wilczek01/alwin-projects
/alwin-middleware-grapescode/db-schema/src/main/dbschema/1.3.0/ddl/001_add_customer_account_manager.sql
UTF-8
326
3.078125
3
[]
no_license
ALTER TABLE customer ADD COLUMN account_manager_id BIGINT; ALTER TABLE customer ADD CONSTRAINT fk_customer_alwin_operator FOREIGN KEY (account_manager_id) REFERENCES alwin_operator (id); COMMENT ON COLUMN customer.account_manager_id IS 'Opiekun klienta'; ALTER TABLE customer_aud ADD COLUMN account_manager_id B...
true
85e678e548a0fe2665eed7ca6fee8e90b2304c87
SQL
LZXprogrammer/Interface_Example
/database/sql/ad_promote.sql
UTF-8
3,778
3.3125
3
[ "MIT" ]
permissive
/* Navicat MySQL Data Transfer Source Server : LZX Source Server Version : 50719 Source Host : 192.168.10.10:3306 Source Database : ad_show_control_db Target Server Type : MYSQL Target Server Version : 50719 File Encoding : 65001 Date: 2018-06-07 14:45:44 */ SET FOREIGN_KEY_CHECKS...
true
aff1ed1acdff433f8e2cdf080572062af1a7c314
SQL
yimiancheng/college-student-part-time-platform
/mysql/platform.sql
UTF-8
17,237
3.21875
3
[ "Apache-2.0" ]
permissive
/* Navicat MySQL Data Transfer Source Server : localhost-mysql(root) Source Server Version : 50717 Source Host : localhost:3306 Source Database : platform Target Server Type : MYSQL Target Server Version : 50717 File Encoding : 65001 Date: 2019-05-14 18:03:43 */ SET FOREIGN_KEY_CH...
true
8b4d3a4e508525d115c7b17149b39e63cb6dcadf
SQL
OlegSudakov/Programming-Problems
/hackerrank/sql/type_of_triangle.sql
UTF-8
368
3.5625
4
[]
no_license
// https://www.hackerrank.com/challenges/what-type-of-triangle SELECT CASE WHEN A+B <= C THEN "Not A Triangle" WHEN A+C <= B THEN "Not A Triangle" WHEN B+C <= A THEN "Not A Triangle" WHEN (A = B AND B = C) THEN "Equilateral" WHEN (A = B OR A = C OR B = C) THEN "Isosceles" WHEN (A != B AND B != ...
true
f550fb11ed18cd581f05d009171052b71da223a1
SQL
MarcosDanielBudtinger/ciss-backend
/src/main/resources/db/migration/V01__criar_funcionarios.sql
UTF-8
1,182
2.90625
3
[]
no_license
CREATE TABLE FUNCIONARIO ( id serial NOT NULL, nome character varying(30) NOT NULL, sobrenome character varying(50) NOT NULL, email character varying(50) NOT NULL, numero_nis character varying(15) NOT NULL, PRIMARY KEY (id) ); INSERT INTO FUNCIONARIO (nome, sobrenome, email, numero_nis) values ...
true
79e9c2c376ea0c2055e71cd10313a7d9a6b1b8ec
SQL
SmelcorS/MySQL-Basics
/6-Joins-Subqueries-and-Indices/salary_chalange.sql
UTF-8
349
4
4
[]
no_license
SELECT e.first_name, e.last_name, e.department_id FROM `employees` as e JOIN (SELECT AVG(e.salary) AS `avg_salary`, e.department_id FROM `employees` e GROUP BY e.department_id) AS `average_salary` ON e.`department_id` = `average_salary`.department_id WHERE e.salary > `average_salary`.avg_salary ORDER BY e.department_i...
true
d7e5f46e172b91c6b19a9d6402595ed934a70452
SQL
gabriel331/BancoMySqlExemplo_RepositoryGabriel331
/BancoGabriel331.sql
UTF-8
2,424
4
4
[]
no_license
create database EstoqueMyGabriel33; use EstoqueMyGabriel33; -- Informando banco criação tabela create table tb_tb_pessoa ( nome float not null, sobrenome float not null, cpf int not null, idpessoa int not null auto_increment, constraint pktb_tb_pessoa primary key (idpessoa)); --banco criação procudere create pro...
true
2b416d1250587d4ae633f9ecff75bb278aec3edc
SQL
zyanchixia/sql-note
/数据挖掘机基础与应用/会员流失率.sql
GB18030
1,576
4.1875
4
[]
no_license
--11Աʧʣ빫˾ƶӪԣ˾ƷͷԱ̬ȵй --ʧʱֻѼ¼ĻԱ with test as ( select distinct a.Ա,vip,vipֹ ,case when vip>='2014-01-01' and vip<'2015-01-01' then '2014' when vip>='2015-01-01' and vip<'2016-01-01' then '2015' when vip>='2016-01-01' and vip<'2017-01-01' then '2016' when vip>='2017-01-01' and vip<'2018-01-01' then '2018' en...
true
0fae0e1c1ef5078d081ba259382d5438f26dc6ab
SQL
josarta/mcm
/src/main/webapp/script/Dump20210901.sql
UTF-8
32,580
3.140625
3
[]
no_license
-- MySQL dump 10.13 Distrib 8.0.23, for Win64 (x86_64) -- -- Host: localhost Database: mcm -- ------------------------------------------------------ -- Server version 5.7.33-log /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!...
true
ebf466ca012c081398513ec3499f6b3a089aa822
SQL
marcwright/WDI_ATL_1_Students
/03week/movies_db/movies_actor_count.sql
UTF-8
126
3.359375
3
[]
no_license
SELECT movies.name, count(*) FROM movies INNER JOIN actors_movies ON actors_movies.movie_id = movies.id GROUP BY movies.name;
true
29a72d58a8545ee8a584eaacc3f3594c08a5cd22
SQL
59364202/test
/tools/installer/initdata/database/001_public/schema/3050_temperature_daily.sql
UTF-8
5,242
4.15625
4
[]
no_license
-- Table: public.temperature_daily -- DROP TABLE public.temperature_daily; CREATE TABLE public.temperature_daily ( id bigserial NOT NULL, -- รหัสข้อมูลค่าอุณหภูมิจากสถานีโทรมาตรอัตโนมัติ temperature's serial number tele_station_id bigint, -- รหัสสถานีโทรมาตร tele station's serial number temperature_date...
true
42712c5d74efab9d866bb8cdd4ae42da8e518a72
SQL
zaidmukaddam/SQL_CODES
/Assignment-1/5.sql
UTF-8
410
3.84375
4
[]
no_license
-- 1 SELECT first_name, last_name, education.startyear, education.END_YEAR FROM users, education WHERE (education.END_YEAR - education.startyear) <= 2 AND users.userID = education.userID; -- 2 SELECT first_name, last_name FROM users, education WHERE users.userID = education.userID GROUP BY first_...
true
8f1955eb59b6ff68e87a78ed5f1c3122956cf36d
SQL
vinillo/showcase
/backups/rest_api_struc.sql
UTF-8
1,187
2.859375
3
[]
no_license
/* SQLyog Ultimate v11.42 (64 bit) MySQL - 5.6.20-log : Database - rest_api ********************************************************************* */ /*!40101 SET NAMES utf8 */; /*!40101 SET SQL_MODE=''*/; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_C...
true
bb3b4125f4e1cb5dc712aa2009628966e42120a3
SQL
Brejral/MLB-Showdown
/Assets/Database/GetBatterInfo.sql
UTF-8
951
3.109375
3
[]
no_license
select Name, Team, OnBase, Speed, Case when SO = 0 Then '-' WHEN SO = 1 THEN SO Else '1-'|| SO END AS SO, Case when GB = SO THEN '-' WHEN (SO + 1) = GB THEN GB ELSE (SO + 1) || '-' || GB END AS GB, Case when FB = GB THEN '-' WHEN (GB + 1) = FB THEN FB ELSE (GB + 1) || '-' || FB END AS FB, Case when BB = FB THEN '-...
true
727a4ccd145d980cb49b829551af7f0bc7e327b6
SQL
Kiryacheldik/Royal
/src/main/resources/dbCreation.sql
UTF-8
3,577
3.890625
4
[]
no_license
DROP DATABASE IF EXISTS TattooSalon; CREATE DATABASE TattooSalon DEFAULT CHARACTER SET utf8; USE TattooSalon; CREATE TABLE user_discount( discount_id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, discount INT NOT NULL); INSERT INTO user_discount(discount) VALUES (15), (20), (50), (60), (75), (80); CREATE TABLE user_role( ...
true
a8c085ee978ddbe235da7875bc3a9759ced06133
SQL
Unicorn-snow/StudySystem
/Update/student.sql
UTF-8
7,312
3.546875
4
[]
no_license
/* Navicat Premium Data Transfer Source Server : localhost_3306 Source Server Type : MySQL Source Server Version : 50729 Source Host : localhost:3306 Source Schema : student Target Server Type : MySQL Target Server Version : 50729 File Encoding : 65001 D...
true
9e5a9d07b88f87b5809e8064cde5fc01ae164f65
SQL
naveenrajput25/school
/pencilcrunch (3).sql
UTF-8
1,859
3.03125
3
[ "LicenseRef-scancode-unknown-license-reference", "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.9.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Feb 03, 2020 at 07:16 AM -- Server version: 10.4.8-MariaDB -- PHP Version: 7.3.10 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
true
20ee82206dac918e6164e54f95f10ada98f68b4a
SQL
linuxing3/datacenter
/movies/movie.sql
UTF-8
734
3.453125
3
[]
no_license
-- ---------------------------- -- Table structure for base_member -- ---------------------------- DROP TABLE IF EXISTS `movies`; CREATE TABLE `movies` ( `id` bigint NOT NULL AUTO_INCREMENT COMMENT '电影id', `title` varchar(100) NOT NULL COMMENT '标题', `description` varchar(250) NOT NULL COMMENT '描述', `url` varcha...
true
966f8dc74f07ee74bcb52dad8584a437a1ff3bfe
SQL
Loulou31/projetWEB
/projetWEB/installBD.sql
UTF-8
3,862
3.296875
3
[]
no_license
/**8888888 * Author: nicolasl * Created: Mar 20, 2017 */ DROP TABLE PARTIE ; DROP TABLE DECISION_LOUP ; DROP TABLE DECISION_HUMAIN ; DROP TABLE MESSAGE_SPIRITISME; DROP TABLE MESSAGE_REPAIRE ; DROP TABLE MESSAGE_SALLE_DISCUSSION ; DROP TABLE JOUEUR ; DROP TABLE MEMBRE ; CREATE TABLE MEMBRE ( login varcha...
true
17514cdd6be132408d341f69b2d5196db5594f92
SQL
aimanaliff/online-grocery-shopping-system
/groceries (12).sql
UTF-8
32,332
3.109375
3
[ "Apache-2.0" ]
permissive
-- phpMyAdmin SQL Dump -- version 5.0.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jun 18, 2021 at 04:59 PM -- Server version: 10.4.17-MariaDB -- PHP Version: 8.0.2 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIEN...
true
25383c319648e0328752704ea920117e8a1b6b4f
SQL
A3Chavez/CSC-134
/HW2 (Insert)/HW2-Insert.sql
UTF-8
4,560
3.875
4
[]
no_license
ALTER TABLE chave_student DROP PRIMARY KEY CASCADE; ALTER TABLE chave_class DROP PRIMARY KEY CASCADE; ALTER TABLE chave_student_class DROP PRIMARY KEY CASCADE; DROP TABLE chave_student; DROP TABLE chave_class; DROP TABLE chave_student_class; CREATE TABLE chave_student ( ssn VARCHAR2(9) CONSTRAINT ch...
true
831b67212de8cf9b15f66e5245730d98639dea96
SQL
chanif/genetic-forex
/ForexGenetic/sql/UPDATE INDIVIDUOS IND SET IND.TIPO_INDIVIDUO.sql
UTF-8
186
3.0625
3
[]
no_license
UPDATE INDIVIDUO IND SET IND.TIPO_INDIVIDUO='INDICADORES' WHERE EXISTS (SELECT 1 FROM INDICADOR_INDIVIDUO II WHERE IND.ID=II.ID_INDIVIDUO AND II.INTERVALO_INFERIOR IS NOT NULL); COMMIT;
true
c91c006700be37f7da8f8b05bfac796bb1d51762
SQL
mimo-lukacka/Project---spring-2012
/Recipebook/src/main/resources/createTables.sql
UTF-8
488
2.875
3
[]
no_license
CREATE TABLE "RECIPES" ( "ID" BIGINT NOT NULL PRIMARY KEY GENERATED ALWAYS AS IDENTITY, "NAME" VARCHAR(255), "TYPE" INTEGER NOT NULL, "CATEGORY" INTEGER NOT NULL, "COOKINGTIME" INTEGER NOT NULL, "NUMPORTIONS" INTEGER NOT NULL, "INSTRUCTIONS" VARCHAR(255) ); CREATE TABLE "INGREDIENTS" ( ...
true
dbe8b976aa2c6af63bc1682321ce8b19f447da58
SQL
motpfofs/LAB.DataScanner
/LAB.DataScanner/LAB.DataScanner.ConfigDatabase/DatabaseSchemas/meta/Table/ApplicationType.sql
UTF-8
269
2.640625
3
[]
no_license
CREATE TABLE [meta].[ApplicationType] ( [TypeID] INT IDENTITY (1,1) NOT NULL, TypeName NVARCHAR(50) NOT NULL, TypeVersion NVARCHAR(12) NOT NUll, ConfigTemplateJson NVARCHAR(MAX) NOT NULL, CONSTRAINT PK_ApplicationType_TypeID PRIMARY KEY CLUSTERED ([TypeID]) );
true
ee07d138cae9baf7a0199e314203347375163cd4
SQL
altamira/visualstudio
/Sistema de Informação Altamira/EGISSQL.Database/dbo/Stored Procedures/Procs1/pr_controle_amostra.sql
UTF-8
2,107
3.625
4
[]
no_license
 CREATE PROCEDURE pr_controle_amostra @ic_parametro as int, @dt_inicial as DateTime, @dt_final as DateTime as Begin -----------------------------Realiza Pesquisa por Período------------------------------------------------ if @ic_parametro = 1 -------------------------Usado Somente no Controle de Amostra-------------...
true
2dc80a1f16e0f6884f33635bb1899c7467b9d23f
SQL
jgarzonext/plsql-testing
/script_plsql/bd_iaxis/script/Scripts Complementarios/IAXIS-2415/01_SCRIPT_IAXIS2415_V01.sql
ISO-8859-1
1,143
2.671875
3
[]
no_license
/* Formatted on 27/02/2019 11:00*/ /* **************************** 27/02/2019 11:00 ********************************************************************** Versin Descripcin 01. -Este script agrega el literal "El domicilio debe corresponder a la Ciudad del Gestor". TCS-18 27/02/2019 D...
true
07e5d025138e59e69bac1244acce474a19511a6a
SQL
plnh/SQL-Code
/3.1_Sales_Products_Inventory.sql
UTF-8
532
3.96875
4
[]
no_license
-- Inventory, Products, Sales files SELECT * FROM sales; SELECT * FROM orders; SELECT * FROM inventory; -- How many years of sale data included SELECT MIN(YEAR(Date)) AS min_year, MAX(YEAR(Date)) As min_year FROM sales; -- What is the total quantity sold for each ProductId per month? SELECT YEAR(Date) AS...
true
5b0a3ba2448bef34afd37dfdde225370a5bc9e21
SQL
evrimulgen/Oracle-DBA-Life
/Advance Tunning Scripts/lookup_block.sql
UTF-8
755
3.0625
3
[ "MIT" ]
permissive
------------------------------------------------------------------------------- -- -- Script: lookup_block.sql -- Purpose: to find out which object a particular block belongs -- For: 8.1 -- -- Copyright: (c) Ixora Pty Ltd -- Author: Nabeel Khan -- -----------------------------------------------------------------------...
true
7fe0b1596195220e98ea561062c471fd9d2ba727
SQL
saranyav91/employee_tracker
/schema.sql
UTF-8
639
3.734375
4
[]
no_license
DROP DATABASE IF EXISTS companyDB; CREATE database companyDB; USE companyDB; CREATE TABLE department ( id INT NOT NULL, name VARCHAR(30) NOT NULL, PRIMARY KEY (id) ); CREATE TABLE role ( id INT NOT NULL, title VARCHAR(30) NOT NULL, salary DECIMAL NOT NULL, department_id INT NOT NULL, FOREIGN KEY (dep...
true
9fad2f1a644e397d3f7f74eb0105891df84e6473
SQL
lbrackspace/bind-lbaas
/contrib/schema/bind-schema.sql
UTF-8
819
2.703125
3
[]
no_license
drop table if exists xfer; create table xfer( id int not null auto_increment, zone varchar(64) not null, client_ip varchar(40) not null, primary key(id) )engine=myisam default charset=utf8; drop table if exists records; create table records( id int not null auto_increment, zone varchar(255) not...
true
582f940e95a0f9a352ffea71f4fb9deacbb03181
SQL
josepvidalcanet/Epitech
/Tek1/B2 - Introduction to Web Development/Epytodo/epytodo.sql
UTF-8
622
3.453125
3
[]
no_license
CREATE TABLE `epytodo`.`user` ( `user_id` INT NOT NULL AUTO_INCREMENT, `username` VARCHAR(32) NOT NULL, `password` VARCHAR(64) NOT NULL, PRIMARY KEY (`user_id`)); CREATE TABLE `epytodo`.`task` ( `task_id` INT NOT NULL AUTO_INCREMENT, `title` VARCHAR(45) NOT NULL, `begin` DATETIME NULL,...
true
afc36ecf77fa45bb7bd8dbb2474fe2155f31313e
SQL
ningyifan/auto-query-runner
/sql-qry/demo-qry/OP01-OQRW-65.sql
UTF-8
240
3.359375
3
[]
no_license
/*Number of people who have at least one observation period that is longer than 365 days*/ SELECT COUNT(DISTINCT person_ID) AS NUM_personS FROM observation_period WHERE observation_period_END_DATE - observation_period_START_DATE >= 365;
true
d905d4aa1af7ea68e1bc0bbfaa282519f6a71648
SQL
PreranaChandru/SQL
/LeetCode/Duplicate Emails.sql
UTF-8
69
2.828125
3
[]
no_license
SELECT Email FROM Person GROUP BY Email HAVING COUNT(Email) > 1;
true
c7953608b493fecd2ec1b87202736916597ad1b8
SQL
dxprog/anime-bracket
/sql/proc_RemoveUserFromBracket.sql
UTF-8
326
3.46875
3
[]
no_license
/** * Removes a user from a bracket */ DROP PROCEDURE IF EXISTS `proc_RemoveUserFromBracket`; DELIMITER // CREATE PROCEDURE `proc_RemoveUserFromBracket` ( bracketId INT, userId INT ) BEGIN DELETE FROM `bracket_owners` WHERE `bracket_id` = bracketId AND `user_id` = userId; EN...
true
4905d209a31a46a19fb97657a8ef87238cfefb6f
SQL
SPEC-jalisci/Databasebasebase
/zapytania/16.sql
UTF-8
217
3.96875
4
[ "WTFPL" ]
permissive
SELECT SUM(zad16.policzone) FROM ( SELECT COUNT(customer.id) AS policzone FROM customer INNER JOIN address ON address.id = customer.shipment_address_id GROUP BY address.id HAVING COUNT(customer.id) > 1 ) AS zad16
true
e1f2d55cdc2c81d34f6414fa1d28b025768c2034
SQL
blaec/Movies
/sql/initDB.sql
UTF-8
1,130
3.46875
3
[]
no_license
DROP TABLE IF EXISTS movies; DROP SEQUENCE IF EXISTS movie_seq; DROP TYPE IF EXISTS resolution_type; CREATE TYPE resolution_type AS ENUM ('VGA', 'HD', 'FullHD'); CREATE SEQUENCE movie_seq START 100000; CREATE TABLE movies ( id INTEGER PRIMARY KEY DEFAULT nextval('movie_seq'), title TEXT ...
true
5f8d12f32ed2636245ed79d7177acb2013060678
SQL
Muthu7422/car_wash_php
/hr/payslip/hr_payroll_calculation.sql
UTF-8
3,562
2.734375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Sep 28, 2018 at 01:46 PM -- Server version: 10.1.16-MariaDB -- PHP Version: 5.5.38 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CL...
true
f2e858cdcb86fff6d6d0bf0196678f3abe9f408b
SQL
opengauss-mirror/openGauss-server
/src/test/regress/sql/test_astore_multixact.sql
UTF-8
1,939
3.53125
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
drop table if exists astore_mult1; drop table if exists astore_mult2; create table astore_mult1 (a int primary key, b int); create table astore_mult2 (c int , d int); alter table astore_mult2 add foreign key (c) references astore_mult1 (a); insert into astore_mult1 values (1, 1); insert into astore_mult2 values (1, 1);...
true
6493a36c832e9e0057ca01593217637107b1b0fa
SQL
gitsangramdesai/blue-tie
/db.sql
UTF-8
3,228
3.984375
4
[]
no_license
An inspection company wants to create a software which needs to track the progress of the Inspector while inspecting different types of venues like Home, offices, Vehicles, along with the exact location of the inspection, also the company should be able to check the status of the inspection like pending, started, app...
true
bfd5eaec358d3db5ce60eccae610ad459203c52c
SQL
mika-alaoutinen/WineApp
/src/test/resources/schema.sql
UTF-8
1,309
3.765625
4
[]
no_license
-- Hibernate sequence for generating IDs. -- Start at 9 because data.sql persists 8 entities -- and I want to set their IDs explicitly. CREATE SEQUENCE hibernate_sequence START 9 INCREMENT 1; -- Users CREATE TABLE IF NOT EXISTS users ( id serial primary key, password varchar not null, username varcha...
true
64cf90a52a3bffbde46c22ab73341dc4978f58a1
SQL
maxfouquet/remediation
/sql/inserer_donnees.sql
UTF-8
1,644
2.828125
3
[]
no_license
INSERT INTO role (idRole, libelle) VALUES (1, "utilisateur"); INSERT INTO role (idRole, libelle) VALUES (2, "responsable"); INSERT INTO role (idRole, libelle) VALUES (3, "administrateur"); INSERT INTO utilisateur (nom, prenom, adresse, identifiant, motdepasse, idRole) VALUES ("Labossière", "Normand", "normand.Labossie...
true
15a6502e6112631708207d942cf03e107eb9bd55
SQL
Yuki1999/CampusShopPlatform
/src/main/resources/sql/tb_user_product_map.sql
UTF-8
938
3.25
3
[]
no_license
CREATE TABLE `tb_user_product_map` ( `user_product_id` INT(30) NOT NULL AUTO_INCREMENT, `user_id` INT(10) DEFAULT NULL, `product_id` INT(100) DEFAULT NULL, `shop_id` INT(10) DEFAULT NULL, `operator_id` INT(10) DEFAULT NULL, `create_time` DATETI...
true
8e867888f20ecc3c4625e16e2e88a327b4bfccba
SQL
PEDSnet/pedsnetcdms
/pedsnetcdms/ddloutput/itwobtwocdm/I2B2_CDM_oracle.ddl
UTF-8
6,317
2.921875
3
[ "BSD-2-Clause" ]
permissive
-- running migrations for 'I2B2 CDM' / CREATE TABLE alembic_version ( version_num VARCHAR2(32 CHAR) NOT NULL ) / -- Running upgrade -> 1a2b15a3ecfc CREATE TABLE observation_fact ( provider_id VARCHAR2(50 CHAR) NOT NULL, nval_num NUMBER, confidence_num NUMBER, encounter_num NUMBER NOT NULL, ...
true
2fd7b633a77196d45832ece150f71bdcbc1ba007
SQL
cuongtm2000/zend-mvc
/zend/job/job.sql
UTF-8
3,739
3
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 3.4.5 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Apr 27, 2012 at 06:27 AM -- Server version: 5.5.16 -- PHP Version: 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
26e4b76c38e3da448573a61c2d27336fa25c48ee
SQL
andrey2901/baclab-reports
/baclab-reports/src/test/resources/sql/create.sql
UTF-8
1,614
3.53125
4
[]
no_license
CREATE TABLE units ( id int not null auto_increment, unit varchar(100) not null, PRIMARY KEY (id), UNIQUE (unit) ); --INSERT INTO units(unit) VALUES ('амп'), ('флак'), ('шт'), ('гр'), ('кг'), ('набір'), ('уп'), ('кор'), ('пар'); INSERT INTO units(unit) VALUES ('amp'), ('flak'), ('pcs'), ('gr'), ('kg'), ('...
true
63be60e42bc651ff156c2e7c2b54437dc9826076
SQL
Valestie25/TerrariumProject
/Terraro.sql
UTF-8
944
3.390625
3
[]
no_license
CREATE DATABASE IF NOT EXISTS terrarium; CREATE TABLE Terrarium ( Id_Terrarium INT NOT NULL, Terrarium_Num INT NOT NULL, Num_Iguanas INT NOT NULL, PRIMARY KEY (Id_Terrarium) ); INSERT INTO Terrarium(Id_Terrarium, Terrarium_num, Num_Iguanas) values (1, 1, 5); SELECT * FROM Terrarium; DROP TABLE ...
true
af4d2c0b67c6f8c574b5e9a64021d95f70fd4384
SQL
hey-agr/workout-scheduled-telegram-bot
/src/main/resources/db/migration/V1__initial.sql
UTF-8
4,921
3.734375
4
[]
no_license
CREATE EXTENSION IF NOT EXISTS "uuid-ossp" SCHEMA main; CREATE TABLE main.training ( id uuid NOT NULL DEFAULT main.uuid_generate_v4(), name text COLLATE pg_catalog."default" NOT NULL, CONSTRAINT pk_training_id PRIMARY KEY (id) ); COMMENT ON TABLE main.training IS 'Тренировка'; COMMENT ON COLUMN main....
true
376482e3a90cca22e510d9179eff73a533a76867
SQL
CUBRID/cubrid-testcases
/sql/_06_manipulation/_03_delete/cases/1004.sql
UTF-8
290
2.546875
3
[ "BSD-3-Clause" ]
permissive
--test delete by delete the same table two times create class tb( col1 int auto_increment primary key, col2 varchar(20) ); insert into tb (col2) values('aaa1'); insert into tb (col2) values('aaa2'); insert into tb (col2) values('aaa3'); delete from tb; delete from tb; drop class tb;
true
4518164565de2770c29eb3ba885dfcd08ca3cd36
SQL
RittnerE/libraryDB
/Dockerdir/db/docker-entrypoint-initdb.d/init.sql
UTF-8
822
2.890625
3
[]
no_license
-- Adminer 4.8.0 MySQL 5.5.5-10.5.10-MariaDB-1:10.5.10+maria~focal dump SET NAMES utf8; SET time_zone = '+00:00'; SET foreign_key_checks = 0; SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO'; SET NAMES utf8mb4; DROP TABLE IF EXISTS `books`; CREATE TABLE `books` ( `name` varchar(20) NOT NULL, `book_id` int(11) ...
true
4668e3ab515baa4f564a4e74950f6e8db1c54c3f
SQL
irmafifah96/finalProjectGolang
/migration/mysql/ui_go.sql
UTF-8
2,927
3.4375
3
[ "MIT" ]
permissive
/* Navicat Premium Data Transfer Source Server : ratingDev Source Server Type : MySQL Source Server Version : 50729 Source Host : 35.219.80.173:31306 Source Schema : ui_go Target Server Type : MySQL Target Server Version : 50729 File Encoding : 65001 Date: 09/01/2021...
true
d51172aa3d3bda43dc9985eab21bdb3cd80083cd
SQL
Savalek/SQL
/SQL/z_else.sql
WINDOWS-1251
1,423
2.65625
3
[]
no_license
------------------------------------------------------------------------------------------------------------------------------------------ ------------------------- @?"X_0. RECYCLE BIN.----------------------- -----------------------------------------------------------------------------------...
true
b8c964867da88c1ce35dfdc0f712a538d1dbd827
SQL
Bo3WaaS/Phone-Book-Microservices
/Phone Book Microservices.sql
UTF-8
7,693
2.765625
3
[]
no_license
-- MySQL dump 10.13 Distrib 5.7.21, for Linux (x86_64) -- -- Host: 192.168.1.209 Database: phonebook -- ------------------------------------------------------ -- Server version 5.7.20 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS *...
true
17d92e5a04679a4d53361c40cdfef2c5208941d7
SQL
zhangchong-666/springboot-shrio
/src/main/java/com/zc/springbootshrio/entity/sql/UserRole.sql
UTF-8
320
2.640625
3
[]
no_license
-- auto Generated on 2021-05-29 -- DROP TABLE IF EXISTS user_role; CREATE TABLE user_role( id INT (11) NOT NULL AUTO_INCREMENT COMMENT 'id', `uid` INT (11) NOT NULL DEFAULT -1 COMMENT 'uid', rid INT (11) NOT NULL DEFAULT -1 COMMENT 'rid', PRIMARY KEY (id) )ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT 'user_role';
true
d6c5d75a2930ecf7f590148b4fb5cd4db968c4a3
SQL
ferdn4ndo/infotrem
/legacy/trem_db/tblFerroviaFabricante.sql
UTF-8
925
3.34375
3
[ "MIT" ]
permissive
# tblFerroviaFabricante # # DESC: Tabela de armazenamento dos fabricantes de material rodante # TODO: - # NOTES: - # DROP TABLE IF EXISTS tblFerroviaFabricante; CREATE TABLE tblFerroviaFabricante ( CodFerroviaFabricante INT(8) NOT NULL AUTO_INCREMENT PRIMARY KEY COMMENT 'Código de indexação', NomeFerroviaFab...
true
6b89883d377641d95da511583e682008c0ecf977
SQL
Minigrim0/ClientMecontent
/assets/scripts/get_game_words.sql
UTF-8
156
2.859375
3
[ "MIT" ]
permissive
-- Returns all the words of the game with the given ID SELECT Words.word FROM wordToGame LEFT JOIN Words ON Words.id = wordToGame.word_id WHERE game_id = ?
true
350a02533d5386adfd43240807a943e3f605647d
SQL
RenataAssuncao/AdventureWorks
/models/Staging/stg_salesperson.sql
UTF-8
306
2.640625
3
[]
no_license
with source as( select distinct businessentityid , territoryid , salesquota , bonus , commissionpct , salesytd , saleslastyear , rowguid , modifieddate from {{ source('adventureworkselt','salesperson')}} ) select * from source
true
2f6e13bafde7a863c5f5a14f6d995af3f759fba9
SQL
silence-do-good/stress-test-Postgres-and-MySQL
/dump/high/day28/select2122.sql
UTF-8
191
2.78125
3
[]
no_license
SELECT timeStamp, temperature FROM ThermometerObservation WHERE timestamp>'2017-11-27T21:22:00Z' AND timestamp<'2017-11-28T21:22:00Z' AND SENSOR_ID='5a11362e_7542_414a_898a_e422217f1906'
true
7c9c9027449944a241cacb51bffcbcf2a20e78a1
SQL
PinchenCui/test-mysql
/1022-normal (copy)/2019-10-30-12:01:47.787836.sql
UTF-8
1,113
2.546875
3
[]
no_license
use db; CREATE TABLE glIgO (id smallint unsigned not null auto_increment, name varchar(32) not null, pwd varchar(32) not null, constraint pk_example primary key (id)); INSERT INTO glIgO (id,name,pwd) VALUES (null, '0PcspDQmNF', 'TqWhVJefiVweHdDdL2YSDgjnn2'); SELECT * FROM example WHERE id=0; SELECT * FROM example WHE...
true
8a72639fcdf3b80ccd0a16408fab94acddfe5352
SQL
nolanchao/megalab
/Desktop/FullStack_Info_HW06-master/HW6_Starter_Code/megalab_eric/HW6_Starter_Code/schema.sql
UTF-8
621
3.46875
3
[]
no_license
drop table if exists trips; create table trips ( customer_id integer primary key, trip_name text not null, destination text not null, friend text not null ); drop table if exists orders; create table orders ( order_id integer primary key, name_of_part text not null, manufacturer_of_part text not null, customer...
true
2f247d8282a7fe5270736e4ba36e1ab17d01f9f9
SQL
Heon717/hebe-spring
/todo,user.sql
UTF-8
1,374
4
4
[]
no_license
SELECT * FROM todo; create TABLE user_day( user_id CHAR(20) NOT NULL, regdt DATE NOT NULL DEFAULT CURDATE() UNIQUE ); CREATE TABLE todo( t_board INT NOT NULL, t_text CHAR(100) NOT NULL, done BOOLEAN, regdt DATE NOT NULL DEFAULT CURDATE(), FOREIGN KEY (regdt) REFERENCES user_day(regdt), PRIMARY KE...
true
9a7bea9de3ee277f2e1e75e68c19b778da1e093d
SQL
hkneal/DojoAssignments
/Python/MySQL/friendship_selfJoin.sql
UTF-8
652
3.5
4
[]
no_license
-- INSERT INTO users (id, first_name, last_name, created_at, updated_at) -- VALUES(5, 'Bob', 'Johnson', Now(), Now()); -- SELECT * FROM users; -- SELECT * FROM friendships; -- -- INSERT INTO friendships (id, created_at, updated_at, user_id, friend_id) -- VALUES(9, Now(), Now(), 5, 2); -- -- SELECT * -- FROM users...
true
76578ce7515ffbdb3fd176559b0338738f3c3854
SQL
areawen2CHub/iworm
/data/sql/v_db_iworm.sql
UTF-8
4,176
3.359375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.1.4 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: 2016-03-29 11:58:23 -- 服务器版本: 5.5.28 -- PHP Version: 5.4.6 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @O...
true
1321013f47f7235898cc233429dc2d434e03dbfa
SQL
EvaGms/ERCPhysio
/ercphysio.sql
UTF-8
6,609
3.28125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.7.4 -- https://www.phpmyadmin.net/ -- -- Hôte : 127.0.0.1:3306 -- Généré le : mer. 14 fév. 2018 à 09:37 -- Version du serveur : 5.7.19 -- Version de PHP : 7.1.9 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET...
true
95a0edb030eae52f678a05055b22bd54a3a87975
SQL
Zerofire03/CSUMB
/CST363/MurachFiles/ex_solutions/ch05/ex5-05.sql
UTF-8
432
3.953125
4
[]
no_license
SELECT account_description, COUNT(*) AS line_item_count, SUM(line_item_amount) AS line_item_amount_sum FROM general_ledger_accounts gl JOIN invoice_line_items li ON gl.account_number = li.account_number JOIN invoices i ON li.invoice_id = i.invoice_id WHERE invoice_date BETWEEN '2011-04-01' AN...
true
5e4a4232f0be74c75ed0057c5103adbefd70fc19
SQL
lgs/tubestrends
/database/add_FKs.sql
UTF-8
3,616
3.453125
3
[]
no_license
-- put foreign key constraints here; we don't want someone -- delete a given parent row if a child row exists that references the value for that parent row. -- if that happpened, it could kill all the data that was collected, and be a mess to sort out ALTER TABLE `tubes_trends`.`twitter_available_places` ADD CONSTR...
true
13180497a738acb2cc2f6c16bd6b44239fa7bf72
SQL
Web-Development-Environments-2021/assignment-3-2-316590470_204389639
/sql queries/users.sql
UTF-8
1,124
3.328125
3
[]
no_license
-- create table fav_players( -- user_id int not null, -- full_name varchar(300) not null, -- current_team_name VARCHAR(20) not null, -- picture VARCHAR(300), -- position_number int not null, -- ); -- create table fav_teams( -- user_id int not null, -- team_id int not null, -- team_name ...
true
68fb6fe8af86019c866a4c39e41e09f1e4fca723
SQL
gurpreet19/ec198392_wht
/Database/configuration/03_02_headless_tool/Delta_WST/SourceTriggerDefinitions/IUD_V_CALC_OBJ_TYPE_IMPL_CLS.sql
UTF-8
1,886
3.046875
3
[]
no_license
CREATE OR REPLACE EDITIONABLE TRIGGER "IUD_V_CALC_OBJ_TYPE_IMPL_CLS" INSTEAD OF INSERT OR UPDATE OR DELETE ON v_calc_obj_type_impl_cls FOR EACH ROW -- $Revision: 1.1 $ -- $Author: SIAH DECLARE v_exp VARCHAR2(500); v_new_object_id VARCHAR2(32); v_new_obj_type VARCHAR2(32); v_new_exc_ind VARCH...
true
556fefb4cd081acc8a3073bf0a1c0c50f7ff6842
SQL
YYMo/csc343automarker
/all/group_0527/a2.sql
UTF-8
6,956
4.125
4
[]
no_license
-- Add below your SQL statements. -- You can create intermediate views (as needed). Remember to drop these views after you have populated the result tables. -- You can use the "\i a2.sql" command in psql to execute the SQL commands in this file. -- Query 1 statements CREATE VIEW FirstJoin AS SELECT C.cid AS c1i...
true
26c0287b73fc6eca9deda1127b42aa6a6792822d
SQL
Arideno/DevchallengeTeam
/server/migrations/000002_create_topics_table.up.sql
UTF-8
1,617
3.109375
3
[]
no_license
create table topics ( id serial not null constraint topics_pk primary key, name varchar not null ); alter table topics owner to postgres; create unique index topics_name_uindex on topics (name); INSERT INTO public.topics (id, name) VALUES (1, 'Консульський прийом'); INSERT INTO...
true
00a4542e4d68a993f25919f7a4de783770d4e07e
SQL
nss-cohort-36/chinook-JohnALong
/country_invoices.sql
UTF-8
249
3.65625
4
[]
no_license
-- query to show # of invoices by country (showed both customer and billing coungry) SELECT COUNT() 'byCountry', i.BillingCountry, c.Country 'customerCountry' FROM Invoice i JOIN Customer c ON i.CustomerId = c.CustomerId GROUP BY c.Country;
true
7895a9456755077742942c6a1e2c0854b3500e0d
SQL
peraltarh/tpo-seminario
/creacionDB.sql
UTF-8
7,035
3.4375
3
[]
no_license
--creacion de usuario seminario1 y DB seminario1 CREATE DATABASE seminario1 USE seminario1 --DROP TABLAS /* drop table auditoria drop table consulta drop table nomenclador drop table obrasocial drop table practicaambulatoria drop table practicaquirurgica drop table prestacion drop table prest...
true
01ec5ea29c595d86ad3d7fb9d111c775a7137630
SQL
hzambrella/wsnIndoor_sinkSimu
/doc/wsnIndoor.sql
UTF-8
7,356
3.765625
4
[]
no_license
--postgresql -- Table: public.build_network -- DROP TABLE public.build_network; CREATE TABLE public.build_network ( nid integer NOT NULL DEFAULT nextval('build_network_bn_id_seq'::regclass), -- 主键 bid integer NOT NULL, -- 楼宇id coor_id integer NOT NULL, -- 协调器id floor integer NOT NULL DEFAULT 1, -- 楼层 status...
true
a49533dd975e5867db8d4edf2aca2288b0154eab
SQL
denapurnama/Incubator
/PakAnas/SQL/PakAnas/Pakanas_Search.sql
UTF-8
407
3.265625
3
[]
no_license
select * from ( select ROW_NUMBER() over(order by org_code asc) [r] ,org_code ,org_name ,create_by ,create_on ,update_by ,update_on from tb_org where 1=1 and ((@org_code is null or @org_code = '') or (org_code LIKE '%' + @org_code+ '%')) and ((@org_name is null or @org_name = '') or (org_name LIKE '%'...
true