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
dde404120c8d2eca799267d989dda8e1712ff2d6
SQL
xbwei/lbsocial-tgis
/demo_data_sql/activity_demo.sql
UTF-8
805
2.765625
3
[ "MIT" ]
permissive
-- Table: demo.activity_demo -- DROP TABLE demo.activity_demo; CREATE TABLE demo.activity_demo ( fromuserid character(256) COLLATE pg_catalog."default", fromusername character(256) COLLATE pg_catalog."default", activityid character(256) COLLATE pg_catalog."default", location geometry, pl...
true
dd8c72116f80c2be513b41acccdf2eb2e7a5db7b
SQL
Ingrid-T/Merise
/exo1.sql
UTF-8
1,889
3.796875
4
[]
no_license
DROP TABLE IF EXISTS Clients ; CREATE TABLE Clients (id_client_Clients INT AUTO_INCREMENT NOT NULL, nom_Clients VARCHAR(20), prenom_Clients VARCHAR(20), adresse_Clients VARCHAR(50), PRIMARY KEY (id_client_Clients)) ENGINE=InnoDB; DROP TABLE IF EXISTS Compte ; CREATE TABLE Compte (id_compte_Compte INT AUTO_INCREMENT NO...
true
20957389b8b76b71f8a7541cffb12f091eafa296
SQL
pjuliano/glowing-waffle
/Views/KD_NA_Year_Quota.sql
UTF-8
1,826
3.4375
3
[]
no_license
Create Or Replace View KD_NA_Year_Quota As SELECT A.Region, Sum(A.Year) AS Year_Total_Quota, Sum( ROUND( CASE WHEN EXTRACT(MONTH FROM SYSDATE) = 1 THEN (A.Jan / B.Total_Sales_Days) * B.Elapsed_Work_Days WHEN EXTRACT(MONTH FROM SYSDATE) = 2 THEN A.Jan + ((A.Feb / B.Total_...
true
a779f53650bc464ffae16b34441e5b923799f66b
SQL
silence-do-good/stress-test-Postgres-and-MySQL
/dump/high/day20/select0234.sql
UTF-8
177
2.640625
3
[]
no_license
SELECT timeStamp, temperature FROM ThermometerOBSERVATION o WHERE timestamp>'2017-11-19T02:34:00Z' AND timestamp<'2017-11-20T02:34:00Z' AND temperature>=0 AND temperature<=87
true
4bcae7401b95926dd708be27650a6a6acc6a797c
SQL
silence-do-good/stress-test-Postgres-and-MySQL
/dump/low/day27/select0031.sql
UTF-8
191
2.71875
3
[]
no_license
SELECT timeStamp, temperature FROM ThermometerObservation WHERE timestamp>'2017-11-26T00:31:00Z' AND timestamp<'2017-11-27T00:31:00Z' AND SENSOR_ID='b45018e0_c948_4657_a402_856e587b726d'
true
a3cd1579c906ce36b9817fb23078f22d20067312
SQL
prodigyK/PhoneTable
/src/main/resources/db/initDB.sql
UTF-8
1,349
3.640625
4
[]
no_license
DROP TABLE IF EXISTS phones; DROP TABLE IF EXISTS subdivisions; DROP TABLE IF EXISTS vessels; DROP TABLE IF EXISTS fleets; CREATE TABLE subdivisions ( id INT NOT NULL AUTO_INCREMENT, name VARCHAR(50) NOT NULL, parent_id INT DEFAULT NULL, ordering INT NOT NULL, PRIMARY KEY (id), FOREIGN...
true
1edc1f95bc1386fd5b4318d99a9678eb4861e310
SQL
ConnorCallison/Tournament-Databse
/tournament.sql
UTF-8
387
3.390625
3
[]
no_license
-- Table definitions for the tournament project. DROP DATABASE IF EXISTS tournament; CREATE DATABASE tournament; \c tournament CREATE TABLE Players ( player_id serial, player_name varchar(50), PRIMARY KEY(player_id) ); CREATE TABLE Matches ( match_id serial, winner_id int references Players (player_id), loser...
true
7a4fbd21a67aa97fdf3537b84eedf1db8377dd12
SQL
jillro/spotify-game
/migrations/002-add-vote-table.sql
UTF-8
216
2.765625
3
[]
no_license
-- Up DROP TABLE users; CREATE TABLE votes ( user_id TEXT, song_id TEXT, created TEXT, FOREIGN KEY(song_id) REFERENCES songs(id) ); -- Down DROP TABLE votes; CREATE TABLE users (id UNIQUE, last_vote TEXT);
true
9d237fec1451aecb730f9cda1a67560df6dbfb32
SQL
michaelcunningham/oracledba
/projects/DBA-6082/count_all_objects_after.sql
UTF-8
360
3
3
[]
no_license
drop table count_all_objects_after; create table count_all_objects_after as select object_type, count(*) total_objects from dba_objects where owner = 'TAG' group by object_type order by object_type / grant select on count_all_objects_after to public; create or replace public synonym count_all_obje...
true
58d45aaf20ec17156f5e5af9154e33663d643ae3
SQL
fandashtic/arc_chennai
/Sivabalan-SQL/SQL_STORED_PROCEDURE/mERP_Get_FreeSKU.sql
UTF-8
521
3.421875
3
[]
no_license
CREATE Procedure mERP_Get_FreeSKU(@SlabID AS Int) As Begin Select Top 1 (Case isNull(FreeUOM,0) When 1 Then isNull(Volume,0) When 2 Then isNull(Volume,0) * (Select UOM1_Conversion From Items Where Items.Product_Code = FreeSKU.SKUCode) When 3 Then isNull(Volume,0) * (Select UOM2_Conversion From Items Where...
true
b88774200fab5004d0c354c992f1da1e32f08fcd
SQL
ghkdtpehd/Java_HSD
/1차프로잭트/user.sql
UHC
3,492
3.421875
3
[]
no_license
-------------------------------------------------------- -- - ȭ-6-22-2021 -------------------------------------------------------- DROP TABLE "JSPID"."BOOK_USER"; -------------------------------------------------------- -- DDL for Table BOOK_USER -------------------------------------------------------- CREATE...
true
f6f4fc06cad723cd3665ee5bd605a07c53af6ef0
SQL
DuongXuanBinh/Baitap
/PHP/coffeeshop.sql
UTF-8
1,973
3.09375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.4 -- https://www.phpmyadmin.net/ -- -- Máy chủ: 127.0.0.1 -- Thời gian đã tạo: Th3 17, 2021 lúc 02:54 AM -- Phiên bản máy phục vụ: 10.4.17-MariaDB -- Phiên bản PHP: 8.0.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARA...
true
89121a6cce59e63de3d2fddfaaf1e5a2e5732aac
SQL
kokijorge/report_football
/quotesbot-master/quotesbot/spiders/BBDD/dim_fecha.sql
UTF-8
4,010
3.765625
4
[ "MIT" ]
permissive
DROP TABLE if exists dw.dim_fecha; CREATE TABLE dw.dim_fecha ( id_fecha INT4 NOT NULL, fecha_actual DATE NOT NULL, --hora VARCHAR(5) NOT NULL, hora_categoria text NOT NULL, dia_nombre VARCHAR(11) NOT NULL, dia_de_la_semana INT2 NOT NULL, ...
true
2cc5d64f125c8f657552f89e69e36ca8b80e2b64
SQL
x3nex/5100-dragonmonkeys
/cms2/tasks-cms3-22-17.sql
UTF-8
1,805
2.96875
3
[]
no_license
# ************************************************************ # Sequel Pro SQL dump # Version 4541 # # http://www.sequelpro.com/ # https://github.com/sequelpro/sequelpro # # Host: 127.0.0.1 (MySQL 5.5.5-10.1.17-MariaDB) # Database: tasks-cms # Generation Time: 2017-03-22 13:54:35 +0000 # ******************************...
true
44d1f8dcc27c09b87bed4e652dd1c2f0c0d5999a
SQL
kamyu104/LeetCode-Solutions
/MySQL/find-followers-count.sql
UTF-8
153
3.46875
3
[ "MIT" ]
permissive
# Time: O(nlogn) # Space: O(n) SELECT user_id, Count(follower_id) AS followers_count FROM followers GROUP BY user_id ORDER BY user_id;
true
55d6ad081df0c5f009605f525b684f7284f1af4d
SQL
gribkov-s/OTUS_dbt_biggquery_new_york_subway
/models/marts/fact_trips_lenght.sql
UTF-8
1,051
3.953125
4
[]
no_license
with trips_stops as ( select * from {{ ref('fact_trips_stops') }} ), last_stop_number as ( select trips_stops.trip_id, max(trips_stops.stop_sequence) as last_stop_number from trips_stops group by trips_stops.trip_id ), first_stop as ( select ...
true
80ad9e7f81444b984daa8888fe5e568a8aed5c99
SQL
hyperkarmic/w12-employee-tracker
/src/db/roster_db.sql
UTF-8
882
3.6875
4
[ "MIT" ]
permissive
DROP DATABASE IF EXISTS roster_db; CREATE DATABASE roster_db; USE roster_db; CREATE TABLE department( id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, name VARCHAR(50) NOT NULL ); CREATE TABLE role( id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, title VARCHAR(50) NOT NULL, salary DECIMA...
true
715c5a132e32f75c3dcceba76776c204b0a4cb4e
SQL
Arnas-Kucinskas/PC_Inv
/DB/DB.sql
UTF-8
10,668
3
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.6.5.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jun 27, 2018 at 08:34 AM -- 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
cbe94580015e0ef14e3d396ca60fd9a42daaec92
SQL
nehalp1925/Car-Rental
/Sql/herzing.sql
UTF-8
4,030
3.125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.3 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1:3306 -- Generation Time: Jun 20, 2019 at 02:11 PM -- Server version: 5.7.23 -- PHP Version: 7.2.10 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CH...
true
27fefacc0f2cdd4785d4afa3ff0276072b1847ca
SQL
skanapar/DB_SCRIPTS
/sql/create_tuning_task2.sql
UTF-8
351
2.515625
3
[]
no_license
 DECLARE l_sql_tune_task_id VARCHAR2(100); BEGIN l_sql_tune_task_id := DBMS_SQLTUNE.create_tuning_task ( sql_id => '&&sql_id', scope => DBMS_SQLTUNE.scope_comprehensive, time_limit => 60, task_name => 'tuning_task_&&sql_id' ); DBMS_OUTPUT.put_line('l_sql_tune_task_id: ' |...
true
800f616dc31ea72c37571513bc9fae540317782c
SQL
pulchrit/knit-mine-api
/migrations/003.do.create_stitches.sql
UTF-8
229
2.890625
3
[]
no_license
CREATE TABLE stitches ( id INTEGER PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY, name TEXT NOT NULL, url TEXT NOT NULL, image_url TEXT, notes TEXT, user_id INTEGER REFERENCES users(id) ON DELETE CASCADE );
true
60d109d4aec366c912594274e22e46817b3f5572
SQL
ecallison/Library-Database
/freedom_library.sql
UTF-8
9,819
3.40625
3
[]
no_license
CREATE DATABASE freedom_library; CREATE TABLE BOOK ( BookIdA INT PRIMARY KEY NOT NULL IDENTITY (1,1), Title VARCHAR(50) NOT NULL, PublisherName VARCHAR(50) NOT NULL ); CREATE TABLE LIBRARY_BRANCH ( BranchIdC INT PRIMARY KEY NOT NULL IDENTITY (1,1), BranchName VARCHAR(50) NOT NULL, Address VARCHAR(50)...
true
ce0367eaa548cbd814302d291355b71e4d951872
SQL
liweidong32768/springbootmybatis
/src/main/resources/test.sql
UTF-8
1,229
2.984375
3
[]
no_license
/* SQLyog Ultimate v12.4.1 (64 bit) MySQL - 5.7.22-log : Database - test ********************************************************************* */ /*!40101 SET NAMES utf8 */; /*!40101 SET SQL_MODE=''*/; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN...
true
85b93fcf968c170c9b95feb32fd37c3f9c13e0bf
SQL
rafael-negrao/teste-poc
/teste-poc-spark/script-cassandra/init_cassandra_ideal.cql
UTF-8
519
2.703125
3
[]
no_license
create table tweets ( hashtag_id text primary key, counthashtags map<text, int>, counttweets map<text, int>, top5followerstweets map<text, int> ) with caching = {'keys': 'ALL', 'rows_per_partition': 'NONE'} and compaction = {'max_threshold': '32', 'min_threshold': '4', 'class': 'org.apache.cassandra...
true
f0d45cd38707a0103554845294e6042aa2a535a2
SQL
Esteban-Duarte31/JavaWeb_abarrotes
/basesdeDatos/BaseDatosClientes.sql
UTF-8
837
3.671875
4
[]
no_license
use DataBaseproducts; CREATE TABLE IF NOT EXISTS clientes ( idCliente VARCHAR(100) PRIMARY KEY NOT NULL, nombres VARCHAR(1000) NOT NULL, edad int NOT NULL, telefono VARCHAR(10) NOT NULL, direccion VARCHAR(1000) NOT NULL ); DELIMITER // CREATE PROCEDURE insertCliente( in _idCliente varchar(1...
true
8c182eea27ae22d0107351f898835b6e8e680b6f
SQL
j7ng/CLFY_SA
/SA/Tables/TABLE_X_CASE_PROMOTIONS.sql
UTF-8
1,234
2.625
3
[]
no_license
CREATE TABLE sa.table_x_case_promotions ( objid NUMBER, dev NUMBER, x_start_date DATE, x_end_date DATE, x_annual_plan NUMBER, case_promo2promotion NUMBER, case_promo2promo_grp NUMBER, case_promo2case NUMBER ); ALTER TABLE sa.table_x_case_promotions ADD SUPPLEMENTAL LOG GROUP dmtsora1419619887_...
true
8cdadf6e1ffd781a95c64570f29395d8034960e5
SQL
RongChao90/Content-AWS-Certified-Data-Analytics---Speciality
/AWS_Glue_Athena_Quicksight/age-groupings.sql
UTF-8
508
2.640625
3
[]
no_license
SELECT SUM(CASE WHEN "dob.age" BETWEEN 21 AND 29 THEN 1 ELSE 0 END) AS "21-29", SUM(CASE WHEN "dob.age" BETWEEN 30 AND 39 THEN 1 ELSE 0 END) AS "30-39", SUM(CASE WHEN "dob.age" BETWEEN 40 AND 49 THEN 1 ELSE 0 END) AS "40-49", SUM(CASE WHEN "dob.age" BETWEEN 50 AND 59 THEN 1 ELSE 0 END) AS "50-5...
true
562d66e876272dfe7ab09fe07660afa465eb4c85
SQL
hqottsz/MXI
/assetmanagement-database/src/base/plsql/maintenix/view/vw_asb_connectors.sql
UTF-8
702
2.984375
3
[]
no_license
--liquibase formatted sql --changeSet vw_asb_connectors:1 stripComments:false /******************************************************************************** * * View: VW_ASB_CONNECTORS * * Description: This view returns a sorted list of the distinct modules (connectors) and message types (connector me...
true
2db0335e36bbe342cf01c2fd97ee58ac4957f935
SQL
thily00/Todo-list
/todo_list.sql
UTF-8
2,609
3.25
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.4 -- https://www.phpmyadmin.net/ -- -- Hôte : 127.0.0.1:3308 -- Généré le : Dim 10 mai 2020 à 03:10 -- Version du serveur : 5.7.24 -- Version de PHP : 7.2.14 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET ...
true
bf1f4c82344099900d388e3e76ab84b79bf77b23
SQL
eduborio/fuze
/src/main/webapp/sqls/20151217_2124_12_AddContatoNoOrcamento.sql
UTF-8
286
3.0625
3
[]
no_license
ALTER TABLE fuze.orcamentos ADD COLUMN contato_id INT UNSIGNED NULL AFTER praca_id, ADD INDEX fk_orc_cont_idx (contato_id ASC); ALTER TABLE fuze.orcamentos ADD CONSTRAINT fk_orc_cont FOREIGN KEY (contato_id) REFERENCES fuze.contato (id) ON DELETE RESTRICT ON UPDATE RESTRICT;
true
c04cb7f73ca3bc93d876ce661111d4b8ea36d7e1
SQL
cityplymlibrary/koha-reports
/dist/circ/chromebook-checkouts-and-renewals-by-date-range.sql
UTF-8
543
3.765625
4
[ "Apache-2.0" ]
permissive
SELECT borrowers.cardnumber, borrowers.surname, borrowers.firstname, statistics.datetime, statistics.type, items.barcode, items.itype FROM borrowers LEFT JOIN statistics on (statistics.borrowernumber=borrowers.borrowernumber) LEFT JOIN items on (items.itemnumber = statistics.itemnumber) LEFT JOIN biblioitems on (biblio...
true
ad87a524bb49ce524852e1c6ecb96a7a59c7b375
SQL
avigeya/book.01
/books.sql
UTF-8
1,851
3.21875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.6.4 -- https://www.phpmyadmin.net/ -- -- Хост: 127.0.0.1 -- Время создания: Фев 02 2017 г., 16:01 -- Версия сервера: 5.7.14 -- Версия PHP: 5.6.25 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!...
true
8d65a5f90aee8067993a5c699c2abb80400204ff
SQL
kannanGc/ASR
/asr_api/migrations/sqls/20170727072449-reporttablereferences-up.sql
UTF-8
416
2.828125
3
[]
no_license
/* Replace with your SQL commands */ CREATE TABLE IF NOT EXISTS `ReportTableReferences` ( `reporttablerederenceid` int(11) NOT NULL AUTO_INCREMENT, `tablename` varchar(200) NOT NULL, `referencetablename` varchar(200) NOT NULL, `tablekey` varchar(100) NOT NULL, `referencetablekey` varchar(100) NOT NULL, PRI...
true
3ec0b9ce68b8c70616e00d2563b972611471d130
SQL
nixxholas/potatozine
/potatozine/latest.sql
UTF-8
3,211
3.4375
3
[]
no_license
create database Potatozine create table magazine( prodID varchar(10), name varchar(100), descpt varchar(1000), price money, catcd int, img varchar(500), pages int ) insert into magazine values ('M1','CLEO','CLEO is a magazine for young fun women who are always on the lookout for brand new ideas and are ready to eyyxp...
true
c468c7395fc675b8723c6dc2b85ddc6bc63a5a59
SQL
nikoi-addo/AcaCell
/acacell_members.sql
UTF-8
2,111
2.984375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.5.4.1deb2ubuntu2.1 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Jan 16, 2020 at 12:05 AM -- Server version: 5.7.28-0ubuntu0.16.04.2 -- PHP Version: 7.0.33-0ubuntu0.16.04.7 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD...
true
27ff20e785c8ade7013d313b9dbb92e55b6508d2
SQL
sgseo/vm-manager
/sql/init.sql
UTF-8
5,277
3.46875
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.9.4 -- https://www.phpmyadmin.net/ -- -- 主机: 127.0.0.1 -- 生成日期: 2020-08-18 01:42:40 -- 服务器版本: 8.0.21 -- PHP 版本: 7.4.3 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; -- -- 数据库: `vm_manager` -- CREATE DATABASE IF NOT EXISTS `v...
true
5b032fa0600248c0bdcd250d61e66e8e6e5d2f0c
SQL
pavel-xa/pgcodekeeper
/apgdiff/src/main/resources/cz/startnet/utils/pgdiff/loader/ms/QUERY_MS_TYPES.sql
UTF-8
4,566
3.78125
4
[ "Apache-2.0", "MIT", "PostgreSQL" ]
permissive
SELECT --general t.schema_id AS schema_oid, t.name, p.name AS owner, aa.acl, -- assembly type a.name AS assembly, ay.assembly_class, -- wrapper type t.is_nullable, basetypes.name AS base_type, CASE WHEN basetypes.name IN (N'nchar', N'nvarchar') AND t.max_length >= 0 THEN t.max_length/2 ELSE t.max_length END AS size, ...
true
b95c17eaf2a63c3f2f2f57e1250d4de4f61e0a13
SQL
tvirus-01/topchart
/wordpress.sql
UTF-8
5,583
3.15625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.4 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: Dec 18, 2018 at 04:46 PM -- Server version: 10.1.37-MariaDB -- PHP Version: 7.3.0 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
true
13d6caeff6c99289f20c1b8010abb3712c6b7390
SQL
Lyn4444/blog
/sql/blog_msgboard.sql
UTF-8
2,241
2.9375
3
[]
no_license
-- MySQL dump 10.13 Distrib 8.0.21, for Win64 (x86_64) -- -- Host: localhost Database: blog -- ------------------------------------------------------ -- Server version 8.0.21 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!401...
true
9a585b4e9f7dbe9d7d9c0e4d0203c3d27d83b6bc
SQL
haman92/POESUBCHAR
/POESUBCHAR/src/createtable1205.sql
UTF-8
2,499
3.453125
3
[ "Apache-2.0" ]
permissive
drop table using_activegem; drop table using_herald_curse_aura; drop table using_uniqueitem; drop table Streamer; drop table poecharacter; drop table labyrinthladder; CREATE TABLE LabyrinthLadder( labyrinthladderdate DATE NOT NULL, total INT DEFAULT 0, ascendant INT DEFAULT 0, assasin INT DEFAULT 0, b...
true
92b4fb614748e4e07a1c2c716395e3b007d3211b
SQL
rafape17-hotmail-com/IPS_CECEP
/Base de datos/base_ipsDB.sql
UTF-8
15,567
3.046875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 27-11-2020 a las 00:33:58 -- Versión del servidor: 10.4.14-MariaDB -- Versión de PHP: 7.2.33 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
true
1acfe9cd26009c535408ea5a399d7bb0ad79fb22
SQL
EKrzych/codecool_projects_java_web_sql
/4TW_2018_07_16_Tests/data.sql
UTF-8
2,681
3.640625
4
[ "MIT" ]
permissive
DROP TABLE IF EXISTS codecooler, admin, mentor, student, mentor_class, class, transaction, inventory, item CASCADE; CREATE TABLE codecooler ( codecooler_id serial PRIMARY KEY, first_name text, last_name text, email text, login text, password text, account_type text ); INSERT INTO codecooler...
true
01ce220ac7e047a762590fff1f6ff5f6c2c6cf10
SQL
ChanceHarmon/unicorn-ranch
/schema.sql
UTF-8
1,537
2.90625
3
[]
no_license
DROP TABLE IF EXISTS stable; CREATE TABLE stable ( id SERIAL PRIMARY KEY, name VARCHAR(255), color VARCHAR(255), favorite_food VARCHAR(255), current_location VARCHAR(255) ); INSERT INTO stable (name, color, favorite_food, current_location) VALUES ('Sparkles', 'purple', 'carrots', 'barn'); INSERT INTO stable...
true
9eb90211af7d698a57be7a358bec3689154eb58e
SQL
DJS593/techly
/db/seeds.sql
UTF-8
7,717
3.5
4
[ "MIT" ]
permissive
-- For Testing locally ONLY: -------------------------------------------------------- -- Run this seeds.sql script to seed the tables -- Note, once running in Heroku, the tables will be empty -- You'll need to seed the tables via MySQL Workbench -- Other: ------------ -- check tables in mysql command line after runni...
true
456fa59273bfc87a66bf5775a65ea41456df2dea
SQL
sdb125/mysqlDesign
/1.introductions.sql
UTF-8
1,392
3.546875
4
[]
no_license
/* 关系型数据库(数据表):sqlite db2 MYSQL oracle access sql Server 非关系型数据库(key-value):mongodb redis memcache */ --- 初始mysql --- ---查看当前用户--- select user(); ---退出mysql-- quit; exit; ---创建账号--- create user '用户名'@'ip'; ---指定网段--- create user '用户名'@'xx.xx.xx.%'; ---所有ip可以访问-- create user '用户名'@'%'; ---远程...
true
069f2504717e778a7e4c5d6d4d1b872e0987b4f4
SQL
OlafMd/MedCon1.0
/mm-libs/dbaccess/Level 5/CL5_MyHealthClub_Examanations/Atomic/Retrieval/SQL/cls_Get_Curent_Patient_Substances.sql
UTF-8
846
3.265625
3
[]
no_license
Select hec_patient_medications.R_DateOfAdding, hec_patient_medications.R_ActiveUntill, hec_patient_medications.R_IfSubstance_Strength, hec_patient_medications.R_DosageText, hec_patient_medications.HEC_Patient_MedicationID, hec_sub_substances.GlobalPropertyMatchingID From hec_patient_medications Inner Jo...
true
be74f8dfc9ac2698bebddc890095dac689a80ec8
SQL
windldream/leetcode
/sql/employee3.sql
UTF-8
93
2.9375
3
[]
no_license
select e2.unique_id, e1.name from Employees e1 left join EmployeeUNI e2 on e1.id = e2.id
true
4a851b090a06ae069186c000cc9e128d1306e1bf
SQL
SimonaCannalire/jd
/mySql/m4/s11.sql
UTF-8
1,048
4.03125
4
[]
no_license
-- create table w/ constraints use me; drop table if exists details; create table details ( -- detail_id integer primary key -- constraint detail_id_ck check (mod(detail_id, 2) = 1), detail_id integer primary key auto_increment, status char default 'A' constraint detail_status_ck check (stat...
true
cab37aa61729f4b15ac1e8d5fceb7e70732b7959
SQL
codershona/SQL-Server-Side-Learning
/SQL ORDER BY Keyword.sql
UTF-8
1,857
4.0625
4
[]
no_license
SQL ORDER BY Keyword The SQL ORDER BY Keyword The ORDER BY keyword is used to sort the result-set in ascending or descending order. The ORDER BY keyword sorts the records in ascending order by default. To sort the records in descending order, use the DESC keyword. ORDER BY Syntax SELECT column1, column2, ... FROM tab...
true
c5362479df5ddcef60a58063ee2f06e46e3bbb6b
SQL
teckhockng/SQL
/Assignment.sql
UTF-8
4,110
3.921875
4
[]
no_license
-- Create table to store values USE gc200349362; CREATE TABLE movies_200349362 ( Movie_name VARCHAR(30), Release_date DATE, Cost_Mil INT, Revenue_Mil INT ); -- insert values into table INSERT INTO movies_200349362 VALUES ('Toy Story', '1995-11-22', '31','365'); INSERT INTO movies_200349362 VALUES ('Toy Story...
true
deca074e284779ca95a8ba987774ad6731937624
SQL
Adravilag/ABD
/Proyecto/4_creacion_vistas.sql
UTF-8
1,127
3.96875
4
[]
no_license
-- Vista de los datos completos que son empleados -- Motivo: Llevar a cabo el objetivo de conocer con más detalle la información completa de los empleados CREATE OR REPLACE VIEW datos_empleados AS SELECT P.*, num_ss FROM Persona P, Empleado E WHERE P.dnie = E.dnie; SELECT * FROM datos_empleados; -- ...
true
60baa512a7562fb60df4eea6c70a3f3a74c52324
SQL
Erlanglin/accountbooks
/src/main/sql/schema.sql
UTF-8
1,704
3.8125
4
[]
no_license
-- 创建数据库 CREATE DATABASE account_books; -- 创建基佬表(消费者也是付款者) CREATE TABLE `boss` ( `boss_id` int(20) NOT NULL AUTO_INCREMENT, `name` varchar(100) NOT NULL COMMENT '基佬名字', `accounts` int(11) NOT NULL COMMENT '账目', `remarks` varchar(256) DEFAULT NULL COMMENT '消费备注', `update_time` timestamp NOT NULL DEFAULT CURRE...
true
c662903e6db7ba572d52c8a3d3888843ddb8412d
SQL
shezz77/online-course-management-system
/database/fk.sql
UTF-8
11,039
2.875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.6.5.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Aug 05, 2017 at 10:27 AM -- 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
0a0566fa3c50346e83d172a47746cd13a56685ff
SQL
asouzab/oracle_plsql
/GOLIVEELO/TOPSQL/contratodeveriamencerrar25.sql
UTF-8
4,105
2.96875
3
[]
no_license
SELECT --LADOfora.* LADOfora.NU_CONTRATO, ladofora.nu_contrato_sap, cd_item_contrato, cd_produto_sap, saldoporitem, saldoitem, qtdeitem, dt_inicio, dt_fim, cd_incoterms, DH_ULT_INTERFACE FROM ( SELECT (select sum(nvl(ic.NU_QUANTIDADE,0) - nvl(ic.NU_QTY_DELIVERED,0)) from vnd.item_contrat...
true
fc73cddfe46007f92405aea4fce1d162de10e6a3
SQL
funbringer/pgconf_ru_2018_partitioning
/partition_methods/inheritance/multiple_dimensions.sql
UTF-8
2,098
3.703125
4
[ "MIT" ]
permissive
CREATE OR REPLACE FUNCTION public.hash_mod(value integer, mod integer) RETURNS integer LANGUAGE sql IMMUTABLE AS $function$ select ((hashint4(value) + 2147483648) % mod)::integer; $function$; create table foo(i integer, t timestamp); create table foo_1_1 (check(t >= '2018-01-01' and t < '2018-02-01' and hash_mod(i...
true
138cab48c64b1de88f672fc47942f2edabf30bb4
SQL
egrva/spring-boot-jooq-flyway-reactjs
/src/main/resources/db/migration/V1__Create_table_friend.sql
UTF-8
166
3.140625
3
[]
no_license
-- create table for friends CREATE TABLE friend ( id SERIAL PRIMARY KEY, name TEXT NOT NULL CONSTRAINT friend_name_constraint CHECK (char_length(name) >= 2) )
true
afefe7b0d2b856059a7913f405402ba65e73fadc
SQL
MCozzetti/Parquimetros
/parquimetros.sql
UTF-8
6,582
3.78125
4
[ "MIT" ]
permissive
CREATE DATABASE parquimetros; USE parquimetros; #--------------------------------------------------------------------------Creaci�n tablas entidades---------------------------------------# CREATE TABLE Conductores ( dni INT UNSIGNED NOT NULL, registro INT UNSIGNED NOT NULL, nombre VARCHAR(32) NOT NULL, apellido VAR...
true
392bff93a076ef94b20d12a2f240c4f02a3853b6
SQL
foxes/hearthstoneDB
/create_tables.sql
UTF-8
1,813
3.53125
4
[]
no_license
DROP TABLE Player CASCADE CONSTRAINTS; DROP TABLE Regions CASCADE CONSTRAINTS; DROP TABLE Deck CASCADE CONSTRAINTS; DROP TABLE Card CASCADE CONSTRAINTS; DROP TABLE DeckContains CASCADE CONSTRAINTS; DROP TABLE Mechanics CASCADE CONSTRAINTS; DROP TABLE Class CASCADE CONSTRAINTS; DROP TABLE HeroPower CASCADE CONSTR...
true
70b0117456d79c97b41a94998874005823799828
SQL
brathfon/vue-template
/db/mysql/devCreateDatabase.sql
UTF-8
611
2.78125
3
[]
no_license
DROP DATABASE IF EXISTS dev_vue_template; CREATE DATABASE IF NOT EXISTS dev_vue_template; USE dev_vue_template; DROP USER IF EXISTS 'dev_vue_template_dba'@'localhost'; CREATE USER 'dev_vue_template_dba'@'localhost' IDENTIFIED WITH mysql_native_password BY 'dev_dba_pw'; GRANT ALL ON dev_vue_template.* TO 'dev_vue_templ...
true
2589e804ef7adafad0e4debfbeaa4ae79bb275c2
SQL
agails/How-Bootcamp-Engenharia-de-Dados
/Module 2/sql/Basic_commands.sql
UTF-8
1,177
3.8125
4
[]
no_license
select TBB."date" , TBB."rank" , TBB.song , TBB.artist , TBB."last-week" , TBB."peak-rank" , TBB."weeks-on-board" from "Billboard" as TBB limit 10; select count(TBB.date) as days from "Billboard" as TBB; select max(TBB."date") as max_date fr...
true
cd0b02d95ddcea4e75c89c6bb0951e7b70a30af6
SQL
magrai/URBAN-MV-VIE_UniBw_Study1_DB
/_backup_150210/blink/ALT-blinker3.sql
UTF-8
1,805
3.875
4
[]
no_license
--CREATE OR REPLACE VIEW blinker3 AS SELECT --"public".t_can_sxx_gesamt_aggr_zeit.znr, --"public".t_can_sxx_gesamt_aggr_zeit.vp, --"public".t_can_sxx_gesamt_aggr_zeit.zeit_s_rounded, max("public".t_can_sxx_gesamt_aggr_zeit.runde), "public".t_can_sxx_gesamt_aggr_zeit.runde_txt, "public".t_can_sxx_gesamt_aggr_zeit.s05_e...
true
5145b7d6ff9a1fb9455e912062f20d1769fbe784
SQL
lfpdev/sequelize-sharding
/test/db.sql
UTF-8
1,083
2.671875
3
[ "Apache-2.0" ]
permissive
CREATE TABLE `user_2018_10` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(100) NOT NULL, `birthday` datetime NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4; CREATE TABLE `user_2018_10_test` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(100) NOT NULL,...
true
7f4a8bdbf9b98649de5ff49004c6b336aea1a917
SQL
IsadoraLiberato/SERVIDOR-SOS
/_fonte/Modelagem BD/Script ciracao do banco.sql
UTF-8
1,476
3.640625
4
[ "MIT" ]
permissive
CREATE SCHEMA IF NOT EXISTS `sosexpress` DEFAULT CHARACTER SET utf8 ; USE `sosexpress` ; CREATE TABLE IF NOT EXISTS `sosexpress`.`oficinas` ( `id` INT NOT NULL AUTO_INCREMENT, `rua` VARCHAR(45) NOT NULL, `numero` INT NOT NULL, `bairro` VARCHAR(45) NOT NULL, `cep` INT NOT NULL, `nome` VARCHAR(45) NOT NULL, ...
true
a56a8cfc770a84a0d8eda8464e79f32f268f6cc0
SQL
markwell/cpvdvfu-1
/cpvdvfu.sql
UTF-8
9,284
3.375
3
[]
no_license
-- MySQL Script generated by MySQL Workbench -- 06/26/15 17:21:33 -- Model: New Model Version: 1.0 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'; -- -----------...
true
5961c92854dd025e1045c2491019fa6b9587549a
SQL
pkrsnak/queries
/data_issues.sql
UTF-8
776
2.734375
3
[]
no_license
--item missing issue Select * from CRMADMIN.V_WEB_CUSTOMER_GRP where CUSTOMER_NBR_STND = 36211; Select * from CRMADMIN.V_WEB_CUSTOMER_GRP_RTL_PRICE where FACILITYID = '008' and ITEM_NBR_HS in ('1620582', '0316943') and CUST_GROUP_NBR = 988211; --retail issue Select * from CRMADMIN.V_WEB_ITEM_CORE where FACILITYID =...
true
ff1b47026aca369195a9e0bb848cbd6272d895fd
SQL
YulianStrus/Examples-of-academic-homeworks
/PHP,AJAX/less_13/bookshelf.sql
UTF-8
4,774
3.546875
4
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.1 -- https://www.phpmyadmin.net/ -- -- Хост: 127.0.0.1 -- Час створення: Квт 14 2020 р., 22:41 -- Версія сервера: 10.4.11-MariaDB -- Версія PHP: 7.4.3 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARA...
true
6f7cac4d980361c2104ec82596c5c56abf23ec26
SQL
jongvin/werp
/werp/erpw/general/t_web/sql/Procedure/SP_T_FIN_LOAN_KIND.sql
UHC
3,463
2.96875
3
[]
no_license
Create Or Replace Procedure SP_T_FIN_LOAN_KIND_I ( AR_LOAN_KIND_CODE VARCHAR2, AR_CRTUSERNO VARCHAR2, AR_LOAN_KIND_NAME VARCHAR2, AR_LOAN_ACC_CODE VARCHAR2, AR_ITR_ACC_CODE VARCHAR2,...
true
5b1576e7628f952f8348d4d5654290e4da77eb31
SQL
fardokhtsadat/Advanced-Database-Systems
/importANDmodify.sql
UTF-8
5,816
4.15625
4
[]
no_license
----How to create a DB------ # To create a db: CREATE DATABASE moviesDB; ------------------------------------------- -----create and load tables for the big dataset------ ------------------------------------------- # The dataset contains 27753444 ratings and 1108997 tag applications across 58098 movies. # These data...
true
34e1ab675d0c9267bfbd6108cc7e3aa74e4c453d
SQL
HugoSanctorum/discordBot
/db.sql
UTF-8
567
2.953125
3
[]
no_license
CREATE TABLE clan( id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, name VARCHAR NOT NULL, score INT NOT NULL ); CREATE TABLE user( id VARCHAR NOT NULL, clan INTEGER, nb_objectif INTEGER NOT NULL, nb_valide INTEGER NOT NULL, nb_message INTEGER NOT NULL, expiration_date_message INTEGER, #UNIX TIME expiration_da...
true
2cd92101ddd427a54c749cfe119c4e65d1333711
SQL
552379105/kanshu01
/kanshu_user.sql
GB18030
634
2.65625
3
[]
no_license
DROP DATABASE IF EXISTS xz; CREATE DATABASE ks CHARSET=UTF8; USE ks; CREATE TABLE ks_user( uid INT PRIMARY KEY AUTO_INCREMENT, uname VARCHAR(32), upwd VARCHAR(32), email VARCHAR(64), phone VARCHAR(16), user_name VARCHAR(32), #ûС gender INT #Ա 0-Ů 1- ); INSERT INTO ks_user VALUES (...
true
0ab7963a5adeefefe71c4b52ec360a6cb8464dc7
SQL
rachaelbaumann/SSMS_Student_Files
/Demo Files/Chapter 06 JOIN/Inline Samples/Chapter 06 Inline Samples.sql
UTF-8
2,033
4.59375
5
[]
no_license
USE RetailBankingSample; --INNER JOIN SELECT C.CustomerID, C.FirstName, C.LastName, CA.AccountID, CA.AccountNumber FROM Customer AS C INNER JOIN CustomerAccount AS CA ON C.CustomerID = CA.CustomerID ; --LEFT OUTER - Sample 1 under Left and Right Outer Joins SELECT C.FirstName, C.LastName, A.AccountID FROM Customer ...
true
f3ad492bcee979d36fb8011e51f7cddd73784e8a
SQL
JainLaunda/sparks-internship
/spark_bank.sql
UTF-8
2,867
3.3125
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 5.0.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Mar 14, 2021 at 03:49 PM -- Server version: 10.4.17-MariaDB -- PHP Version: 7.4.13 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIE...
true
f22539c46909967a1862f704d4dc2e39223cb99d
SQL
prasanavasu/Crime_Management
/database/crime.sql
UTF-8
24,319
3.21875
3
[]
no_license
-- -------------------------------------------------------- -- Host: 127.0.0.1 -- Server version: 8.0.19 - MySQL Community Server - GPL -- Server OS: Win64 -- HeidiSQL Version: 10.3.0.5771 -- ------------------------------------------------------...
true
d7501ab5af26a38bce859c058ee2e0201c8f50b9
SQL
ian-james-johnson/database_exercises
/case_exercises.sql
UTF-8
2,917
4.40625
4
[]
no_license
#1 write a query that finds all employes (emp_no), department number, start date, end date, and a new column 'is current employer' # need emp_no, dept_no, start_date, end_date # need tables: dept_emp SELECT emp_no, dept_no, from_date, to_date, IF (to_date = '9999-01-01', 'is_currently_employed', 'not_currently_emplo...
true
c40e9c38be4a81754f1cde5af5cfa6bb6426c9e4
SQL
nofrialdi/PhonebookApps2
/db/telepon.sql
UTF-8
7,040
2.890625
3
[]
no_license
/* Navicat Premium Data Transfer Source Server : local_koneksi Source Server Type : MySQL Source Server Version : 100108 Source Host : localhost:3306 Source Schema : telepon Target Server Type : MySQL Target Server Version : 100108 File Encoding : 65001 Date: 25/10/2...
true
39165a253f711eaa4635db86c65a29c5612e82fc
SQL
himselfv/jet-tool
/examples/DataTypes.sql
UTF-8
2,331
3.515625
4
[]
no_license
/* Tests datatype support in Jet. 1. This must run without errors. 2. The resulting DB must dump more or less to the same SQL. */ CREATE TABLE [DataTypeTest_NoDefaults] ( [ID] COUNTER, [I1] TINYINT, [I2] SMALLINT, [I4] INTEGER, /*[TI8] BIGINT, -- not supported in Jet */ [UI1] BYTE, /*[UI2] SMALLINT UNSIGN...
true
ba5b2766dbab18128c0701582429b46a95978547
SQL
manu3569/flatiron-labs
/sql-quiz/quiz.sql
UTF-8
704
3.1875
3
[]
no_license
-- Author: Manuel Neuhauser -- Date: October 3, 2013 -- 4. quiz.sql -- Create a quiz.sql that will load all questions in a quiz. SELECT questions.content, GROUP_CONCAT(choices.content) FROM questions, choices WHERE questions.id = choices.question_id AND quiz_id = 1 GROUP BY questions.id; SELECT questions.conte...
true
608283303346874dadcbd8e1bf15e46f30e1b133
SQL
anatar02/bromine3_rc2
/app/config/sql/bromine.sql
UTF-8
34,791
3.453125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 3.2.4 -- http://www.phpmyadmin.net -- -- Vært: localhost -- Genereringstid: 24. 07 2010 kl. 19:28:05 -- Serverversion: 5.1.41 -- PHP-version: 5.3.1 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET...
true
c077700429ad91e8b28d5c6b891651e0be11c194
SQL
sungchun12/AWS-data-pipeline-team-B
/Terraform/test_redshift.sql
UTF-8
469
2.75
3
[]
no_license
CREATE TABLE all_star_full ( playerID VARCHAR(50), yearID SMALLINT, gameNum SMALLINT, gameID VARCHAR(20), teamID VARCHAR(3), lgID CHAR(2), GP SMALLINT, startingPos SMALLINT ); COPY all_star_full FROM 's3://ima-flexb-sor/data/AllstarFull/AllstarFull.csv' iam_role 'arn:aws:iam::<account number>:role/i...
true
5b12cb614a6ac131da956f98177a21646634d04e
SQL
pdo9141/InterviewPrep
/UnitTestProject1/Database/Question13/Queries.sql
UTF-8
1,322
3.8125
4
[]
no_license
USE TestDB --DROP TABLE TableA --DROP TABLE TableB --Create table TableA --( -- Id int identity primary key, -- Name nvarchar(50) --) --Go --Insert into TableA values ('Mark') --Go --Create table TableB --( -- Id int identity primary key, -- Name nvarchar(50) --) --Go --Insert into TableB values ('Mar...
true
ad54156240d30644557eca614795e499baeb81d0
SQL
Vedia-JerezDaniel/Sql-problems57
/023.sql
UTF-8
195
2.84375
3
[]
no_license
SELECT productid, productname, unitsinstock, unitsonorder, reorderlevel FROM products WHERE (unitsinstock + unitsonorder) <= reorderlevel AND discontinued = 0 ORDER BY productid
true
96833c0f54958c9d106c07d27c29be1b0492c19c
SQL
Shelly444/JavaProject
/kirkwoodm/webd4201/kirkwoodm/sql/faculty.sql
UTF-8
345
2.59375
3
[]
no_license
CREATE TABLE faculty ( id int REFERENCES Users(id), schoolCode varchar(5), schoolDescription varchar(255), office varchar(10), extension int, PRIMARY KEY (id) ); INSERT INTO faculty VALUES ( 100234567, 'DCOM', 'Stupid class', 'H-122', 1234), (100227777, 'DBAS', 'Databases', 'H-126', 1235), (100222555, 'WEBD', 'Web Deve...
true
a9c80e2d61d8a1c87f909d99ef0bf3c623bab07b
SQL
UNITY-BARS-Develop/R2D2
/backend/r2d2/src/main/resources/database/insert_test_data_script.sql
UTF-8
3,075
3.21875
3
[ "MIT" ]
permissive
-- create services with parameters INSERT INTO SERVICE (service_type_id, service_status_id, name, id) VALUES ('WEB', 'ACTIVE', 'Service 1', '1'), ('WEB', 'ACTIVE', 'Service 2', '2'), ('WEB', 'DELETED', 'Service 3', '3'), ('SQL', 'ACTIVE', 'Service 4', '4'), ('SQL', '...
true
d8b02bf4a93e572788549996dd3b5478514444bc
SQL
iamslash/learntocode
/leetcode/EmployeeBonus/a.sql
UTF-8
148
3.09375
3
[]
no_license
# 164ms 69.40% SELECT E.name, B.bonus FROM Employee E LEFT OUTER JOIN Bonus B ON E.empId = B.empId WHERE B.bonus IS NULL OR B.bonus < 1000;
true
fd4b3b5a700da37ffb9099dcd1570f5eb657737d
SQL
bclipp/EasyDatabase
/config_pg/init.sql
UTF-8
391
2.671875
3
[ "BSD-2-Clause" ]
permissive
CREATE TABLE customers ( id integer PRIMARY KEY, first_name VARCHAR(255), last_name VARCHAR(255), email VARCHAR(255), latitude FLOAT, longitude FLOAT, block_id BIGINT, state_fips BIGINT, state_code VARCHAR(10), block_pop BIGINT ); COPY customers(id,first_name,last_name,email,l...
true
9a8211bf4c44570e5840338edbb114ea4baf8cbc
SQL
silence-do-good/stress-test-Postgres-and-MySQL
/dump/high/day28/select0148.sql
UTF-8
178
2.640625
3
[]
no_license
SELECT timeStamp, temperature FROM ThermometerOBSERVATION o WHERE timestamp>'2017-11-27T01:48:00Z' AND timestamp<'2017-11-28T01:48:00Z' AND temperature>=21 AND temperature<=86
true
5d9a199670f8b8b25d7876e748b93ce109e1bfec
SQL
sean-blessing/sql_instruction
/mod4/mod4_joins_paramaterized_queries.sql
UTF-8
608
4
4
[]
no_license
select * from orders; select o.id, o.date, c.name, o.total from orders o join customer c on o.customerID = c.id; select o.customerID, c.name as 'cust. name', o.date, o.total from orders o join customer c on o.customerID = c.id where o.total > ( select avg(total) as 'Average Total' from orders )...
true
150bfb015a5dc4beceee458c1a2e942918fe6409
SQL
gramnum1/dbman
/GrahamLab4.sql
UTF-8
1,182
3.859375
4
[]
no_license
--Graham Harrison --Lab 4 -- Q1 Select city from agents where aid in ( Select aid from orders where cid in ( select cid from customers where customers.name='Basics') ) -- Q2 Select distinct pid from orders where aid in( select aid from orders where cid in( Select cid from ...
true
330f4a0903a0255d385c234c6c0b35475ae358b9
SQL
with-sahan/jentest
/database/CreateDatabase/SP/psm/updatepostpollactivity.sql
UTF-8
1,773
3.65625
4
[]
no_license
DELIMITER $$ CREATE DEFINER=`root`@`%` PROCEDURE `updatepostpollactivity`(token varchar(255), polling_station_id int,election_id int, activity_id int, status int ) BEGIN declare spcode varchar(45); declare username varchar(45); declare orgcode varchar(45); declare orgid int(11); set username=secu...
true
e8c8163eb27de0ba046e6035dd868f735bd38ca9
SQL
Henrique-Moura/sd-09-mysql-vocabulary-booster
/desafio19.sql
UTF-8
309
3.703125
4
[]
no_license
USE hr; DELIMITER $$ CREATE FUNCTION exibir_quantidade_pessoas_contratadas_por_mes_e_ano(mes INT, ano INT) RETURNS INT READS SQL DATA BEGIN DECLARE quantidade INT; SELECT COUNT(*) FROM hr.employees WHERE MONTH(HIRE_DATE) = mes AND YEAR(HIRE_DATE) = ano INTO quantidade; RETURN quantidade; END $$ DELIMITER ;
true
9e5d02a82175e83812dae7f34876d731749d26ca
SQL
gladiopeace/digital-data-syn
/documents/oms/TB_BILIC.sql
GB18030
2,302
3.375
3
[]
no_license
/* ================================================================================ ṹ:TB_BILIC ṹ:ɱ˵ӱ ṹĿ: ================================================================================ */ drop sequence SEQ_TB_BILIC; drop index AK_TB_BILIC; drop table TB_BILIC; create table TB_BILIC ( BILIC_ID INTEGER ...
true
6dafb7da0f6e4ab08311315f3d7e05c6c9c15602
SQL
edwardAGE4/LO51-Project
/scripts jad/prod_restore.sql
UTF-8
1,462
3.15625
3
[]
no_license
set echo off set pagesize 0 set linesize 255 set heading off set feedback off col file_name format a50 spool F:\scripts\prod_restore.cmd SET SERVEROUTPUT ON DECLARE CURSOR cur_datafile IS SELECT SUBSTR(file_name,28,INSTR(file_name,'.',1) -1) as subdatafile -- pour extraire le nom du fichier seulement FROM db...
true
86255d141b495d25fa3e2e9dcc173f9c8720ec4c
SQL
ReneNyffenegger/oracle-patterns
/Installed/dynamic-performance-views/sql/bind/capture/ex.sql
UTF-8
1,029
3.609375
4
[]
no_license
declare c integer; r integer; begin c := dbms_sql.open_cursor; dbms_sql.parse(c, q'{ select -- sql bind capture test * from user_objects where object_name like :obj_name and object_type like :obj_type }', dbms_sql.native); dbms_sql.bin...
true
5e2baf245ed89597cdeb28adeac960ebea8f8889
SQL
narek725/AutoTrading-Bitcoin-Backend
/sql/fixes/price_bought.sql
UTF-8
749
3.765625
4
[]
no_license
START TRANSACTION; # Create temp table CREATE TEMPORARY TABLE temp_trades ( id INT UNSIGNED, parent_trade_id INT UNSIGNED, original_trade_id INT UNSIGNED, target_percent DOUBLE, target_shrink_differential DOUBLE ); INSERT INTO temp_trades (id, parent_trade_id, original_trade_id, target_percent, target_shrink_...
true
2908593f3803b98bdf78013bd3bc78c2c930c1c1
SQL
yefc/CBOE
/subprojects/Classic/ChemInv/config/oracle_install_scripts/Create_blank_ChemInv_DB/sql/Patches/Patch 11.0.4/patch.sql
UTF-8
3,702
2.890625
3
[]
no_license
--Copyright 1999-2010 CambridgeSoft Corporation. All rights reserved @"Patches\Patch &&nextPatch\parameters.sql" prompt ******************************* prompt **** Applying Patch &&CurrentPatch **** prompt ******************************* prompt Starting "patch.sql"... prompt --########################################...
true
5159e207da81ca34d5a606cec7f323e184529b12
SQL
charlesvhe/spring-cloud
/oauth/src/main/resources/schema.sql
UTF-8
706
3.21875
3
[]
no_license
DROP TABLE IF EXISTS user_details; DROP TABLE IF EXISTS client_details; CREATE TABLE user_details ( id INT NOT NULL AUTO_INCREMENT, username VARCHAR(64) NOT NULL, password VARCHAR(64) NOT NULL, authority VARCHAR(256) NOT NULL, status INT NOT NULL DEFAULT 0, PRIMARY KEY (id), UNIQUE KEY uk_...
true
23ad3d6d688615d4141c821418ff3bb25536049a
SQL
houxcnj/udacityFSND
/database/tournament/tournament.sql
UTF-8
1,615
4.34375
4
[]
no_license
-- Table definitions for the tournament project. -- -- Put your SQL 'create table' statements in this file; also 'create view' -- statements if you choose to use it. -- -- You can write comments in this file by starting them with two dashes, like -- these lines here. -- delete the exist tournament database DROP DATAB...
true
edd3b1f15c6ae338aa0b5ed09b17a28b52c75265
SQL
JNM-2T17/WEBAPDE-MP
/tmi.sql
UTF-8
17,810
3.984375
4
[]
no_license
SET @OLD_FOREIGN_KEY_CHECKS = @@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS = 0; SET @OLD_UNIQUE_CHECKS = @@UNIQUE_CHECKS, UNIQUE_CHECKS = 0; SET @OLD_SQL_MODE = @@SQL_MODE, SQL_MODE = 'TRADITIONAL,ALLOW_INVALID_DATES'; CREATE SCHEMA IF NOT EXISTS `tmi`; USE `tmi`; --- -----------------------------------------------------...
true
b73b8f25041f1f3ed19808b81a80ca45d72e7e96
SQL
kudjieRaymond/sql-project
/9-Self-join.sql
UTF-8
3,434
4.53125
5
[]
no_license
/*Self join */ /* 1 How many stops are in the database. */ SELECT COUNT(id) FROM stops /* 2Find the id value for the stop 'Craiglockhart' */ SELECT id FROM stops WHERE name ='Craiglockhart' /* 3 Use a different JOIN so that all teachers are listed. */ SELECT DISTINCT id,name FROM stops JOIN route ON id = stop ...
true
7d3fbd3825f4def28d129f0f253e5df25d136f61
SQL
CarlCr/crud-pdo
/crud.sql
UTF-8
1,546
3.03125
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.7.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1:3306 -- Generation Time: 19-Ago-2018 às 19:24 -- Versão do servidor: 5.7.19 -- PHP Version: 7.1.9 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHA...
true