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
cfa93616dc2df7148f0026a8f39b9974459d803d
SQL
Shirl16/Shirley_DA_Homework
/09_SQL/09_SQL_Shirley_Quintana_4.sql
UTF-8
943
4.09375
4
[]
no_license
-- 4a. list last names of actors as well as how many actors have that last name use sakila; select last_name, count(last_name) from sakila.actor group by last_name; -- 4b. list last names of actors and number of actors who have that last name, but only -- for names that are shared by at least 2 actors select last_name...
true
8d989fc8d519c8abcb0d3207b3665a60e902abb0
SQL
naztar0/UcodeWebSprint
/sprint08/t03/join.sql
UTF-8
540
2.96875
3
[]
no_license
USE ucode_web; SELECT `heroes`.`name`, `teams`.`name` FROM `heroes` LEFT JOIN `teams` ON `heroes`.`id`=`teams`.`hero_id`; SELECT `heroes`.`name`, `powers`.`name` FROM `heroes` LEFT JOIN `powers` ON `heroes`.`id`=`powers`.`hero_id` UNION ALL SELECT `heroes`.`name`, `powers`.`name` FROM `heroes` RIGHT JOIN `powers` ...
true
4d9c550517dd8af7d448b6f34bed1c15bc1b2f84
SQL
Gaston-Paz/Lab3
/EJERICIO 2.1/consultas.sql
UTF-8
5,124
3.953125
4
[]
no_license
Use Blueprint -- 1) Listado de todos los clientes. SELECT * FROM Clientes -- 2) Listado de todos los proyectos. SELECT * FROM Proyectos -- 3) Listado con nombre, descripción, costo, fecha de inicio y de fin de todos los proyectos SELECT Nombre, Descripcion, Costo, FechaInicio, FechaFin FROM Proyectos -- 4) Lista...
true
cef9731aca9f98b48242d6ccd1e89be4b57fd595
SQL
alexurumov/MySql
/ExamRetake/9.sql
UTF-8
202
3.8125
4
[]
no_license
SELECT CONCAT(LEFT(c.comment, 20), "...") AS 'summary' FROM comments c WHERE id NOT IN ( SELECT c.id FROM comments c JOIN likes l ON c.id = l.comment_id ) ORDER BY c.id DESC;
true
ff3068352931c7f419034516ac682fa82dbcbe04
SQL
Rage-cmd/Hospital-DBMS
/functions.sql
UTF-8
1,964
4.28125
4
[]
no_license
-- Create an appointment by the consultant DELIMITER # CREATE OR REPLACE FUNCTION create_appointment (doctor int, patient_id int, start_datetime datetime) RETURNS int BEGIN DECLARE created int; IF (SELECT start_time FROM Appointment WHERE `date` = DATE(start_datetime) AND doctor_id = doctor AND start_time ...
true
34dfe34aec445e5630f6a318953c8bfd759fb980
SQL
goodsong/ApiManager
/db.sql
UTF-8
2,792
3.46875
3
[]
no_license
SET NAMES utf8; SET foreign_key_checks = 0; SET time_zone = 'SYSTEM'; SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO'; DROP TABLE IF EXISTS `api`; CREATE TABLE `api` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '接口编号', `aid` int(11) DEFAULT '0' COMMENT '接口分类id', `num` varchar(100) DEFAULT NULL COMMENT '接口编号', ...
true
6ac0eea25a96ec109b0e6aa66186fe41dc2e59eb
SQL
christianselig/apollo-backend
/migrations/000001_create_accounts.up.sql
UTF-8
694
2.734375
3
[]
no_license
-- Table Definition ---------------------------------------------- CREATE TABLE accounts ( id SERIAL PRIMARY KEY, reddit_account_id character varying(32) DEFAULT ''::character varying, username character varying(20) DEFAULT ''::character varying UNIQUE, access_token character varying(64) DEFAULT ''::ch...
true
7b895c9379e5408abcd6d69e9f0c8c7df95e26af
SQL
zhixingheyi666/isbnSpider
/fc/s0216.sql
UTF-8
361
3.03125
3
[]
no_license
use spider; create table if not exists originurl ( url_id int not null auto_increment, url char(255) not null, stars int default 0, primary key ( url_id ) ) engine = myisam; insert into originurl( url ) values( 'test http' ); delete from originurl where url_id != 1; select count(url) , count( distinct url)...
true
9e8c5ea58a2f01ac9f30a63ec3eed609ef662d2a
SQL
autumnalkitty/web_work
/Step17_MyBatis_My/WebContent/WEB-INF/table.sql
UTF-8
876
3.859375
4
[]
no_license
CREATE TABLE board_cafe( num NUMBER PRIMARY KEY, writer VARCHAR2(100) NOT NULL, title VARCHAR2(100) NOT NULL, content CLOB, viewCount NUMBER, regdate DATE ); CREATE SEQUENCE board_cafe_seq; SELECT result1.* FROM (SELECT num, writer, title LAG(num, 1, 0) OVER(ORDER BY num DESC) prevNum, L...
true
851122b213b44235e32780264229126264045f87
SQL
amitpriyasingh/Boutiqaat
/boutiqaat-etl-master/firebase/queries/bigquery/firebase_impressions_trends.sql
UTF-8
356
2.9375
3
[]
no_license
SELECT PARSE_DATE('%Y%m%d',event_date) as event_date, store, store_id, country, platform, app_version, event_name, catalog_page_type, catalog_page_id, catalog_page_name, sku, count(1) as impressions FROM `boutiqaat-online-shopping.firebase.fact_impressions` WHERE DATE(_PARTITIONTIME) = PARSE_DATE('%Y%m%d','{{DATE}}'...
true
65df05c061dfb84989c965c7eece7e2d6551cd56
SQL
J-Russell329/experimental_JS
/sql-ddl-design/soccer-schema.sql
UTF-8
2,651
3.75
4
[]
no_license
-- Exported from QuickDBD: https://www.quickdatabasediagrams.com/ -- NOTE! If you have used non-SQL datatypes in your design, you will have to change these here. -- Modify this code to update the DB schema diagram. -- To reset the sample schema, replace everything with -- two dots ('..' - without quotes). CRE...
true
d757cc7116aa2721700962931f5e870d01578289
SQL
oagbeja/ecounsel
/db.sql
UTF-8
12,671
2.953125
3
[]
no_license
/* SQLyog - Free MySQL GUI v5.02 Host - 5.0.51b-community-nt : Database - ecounsel ********************************************************************* Server version : 5.0.51b-community-nt */ create database if not exists `ecounsel`; USE `ecounsel`; /*Table structure for table `conversation` */ DRO...
true
9d6855e3e38236c23d00645ac89b8f345d9a3f75
SQL
AndrewPonyk/StudyDB
/MySQL/MySQL_Usage_and_Administration/chap5_UsingTransactions/transactions1.sql
UTF-8
841
3.25
3
[]
no_license
drop table test.usingtransactions; create table test.usingtransactions (id int primary key, name varchar(20)); truncate table test.usingtransactions; -- for testing transactions open two instances of MySQL workbench =) start transaction; insert into test.usingtransactions values (1, '1'); insert into test.usingtransa...
true
33e49923a2f55e129f63e61eb2317b89aecc61e3
SQL
jeganad/pastehub
/restricted/database_scripts/generate_db.sql
UTF-8
1,396
3.359375
3
[]
no_license
-- Adminer 4.6.2 MySQL dump SET NAMES utf8; SET time_zone = '+00:00'; SET foreign_key_checks = 0; SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO'; CREATE DATABASE `tip_db` /*!40100 DEFAULT CHARACTER SET utf8 COLLATE utf8_bin */; USE `tip_db`; CREATE TABLE `DB_FILES` ( `id` varchar(10) COLLATE utf8_bin NOT NULL, `location...
true
f3818a0e7a4fadae635212b4e25d4bbb26666790
SQL
dhanani94/crypto-coin-counter
/init.sql
UTF-8
661
3.140625
3
[]
no_license
CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; CREATE SCHEMA crypto_counter; CREATE TABLE IF NOT EXISTS crypto_counter.cc_current_price ( id uuid PRIMARY KEY DEFAULT uuid_generate_v1(), currency varchar(25) NOT NULL, price numeric NOT NULL, created_at timestamp DEFAULT NOW() ); CREATE T...
true
6067d54f2773c5ad5efd90d4c7794bcf9cb8863e
SQL
lanfengof/myShop
/my-shop-web-admin/src/main/resources/SQL/a.sql
UTF-8
2,458
4.6875
5
[]
no_license
-- 查询“001”课程比“002”课程成绩高的所有学生的学号; SELECT a.S_ID FROM ( SELECT s_id, c_id, score FROM STU_SCORE ) a INNER JOIN ( SELECT s_id, c_id, score FROM stu_score ) b ON a.s_id = b.s_id WHERE a.c_id = 1 AND b.c_id = 2 AND a.score > b.score; -- 查询平均成绩大于60分的同学的学号和平均成绩; select s_id,avg(score) from stu_score group by s_id having avg(...
true
d41f5290e9ef44bc523e66a8bc80593e047550a5
SQL
avaretto/trivia
/trivia.sql
UTF-8
1,690
2.65625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.4 -- https://www.phpmyadmin.net/ -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 25-03-2021 a las 01:12:33 -- Versión del servidor: 10.4.17-MariaDB -- Versión de PHP: 8.0.2 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_...
true
9d74b7f5396729183b18e244dbf444a5040f676c
SQL
robertopostma/SQL
/test.sql
UTF-8
238
3.15625
3
[]
no_license
--non compliant example (missing PK) CREATE TABLE employee ( employee_id INTEGER NOT NULL, first_name VARCHAR(42) NOT NULL, last_name VARCHAR(42) NOT NULL ); --select from mthis table select * FROM myTable where nonExistingCol=1;
true
8954b1c53cce0f4b61bd073312d9cdb16ca6a7c9
SQL
dearcode2018/database
/oracle/src/test/java/com/hua/test/sql/ProcedureTest.sql
UTF-8
5,046
3.59375
4
[]
no_license
/** * @filename ProcedureTest.sql * @description Sql 存储过程- 测试 * @author qye.zheng * @version 1.0 */ /* ==================== ==================== */ dbms_output.put_line(''); /* 存储过程创建 - 例子 */ /* 无参 存储过程 */ CREATE OR REPLACE PROCEDURE testProcedure01 is begin null; end; /* 有参 存储过程 */ CREATE OR REPLACE PROCED...
true
6bba9065bea405d6f9f4545bdb386523633bff4a
SQL
xiaotian1991/actual-10-homework
/05/yangruiyou/reboot10.sql
UTF-8
810
3.375
3
[]
no_license
create database reboot10 default charset=utf8; use reboot10; drop table users; create table users( id int AUTO_INCREMENT primary key comment '用户id' ,name varchar(20) not null comment '用户名' ,name_cn varchar(50) not null comment '中文名' ,password varchar(50) not null comment '用户密码' ,email varchar(50) comment...
true
8c75c71029ecec242f283fddab0d8651095ae3b7
SQL
china-university-mooc/mysql-basics-atguigu
/03-ddl/resources/demo/constraint.sql
UTF-8
4,429
4.21875
4
[]
no_license
SHOW DATABASES ; CREATE DATABASE IF NOT EXISTS students; USE students; DROP TABLE IF EXISTS stuinfo; CREATE TABLE stuinfo( id INT PRIMARY KEY, # 主键 name VARCHAR(20) NOT NULL, # 非空 gender CHAR(1) CHECK(gender = '男' OR gender = '女'), # 检查 seat INT UNIQUE, # 唯一 age INT DEFAULT 18, # 默认 majorId I...
true
2934a9556e6d1843a97b3cfbab698388f74b9a2c
SQL
fzwhdira/TStore.io
/Simulation of Transaction.sql
UTF-8
769
3.265625
3
[]
no_license
USE TStore --Ketika seorang customer dengan ID CU004 --Membeli Produk TStore dengan ID CL003 --Dilayani oleh staff dengan ID ST005 --Pada tanggal 1 Desember 2020 INSERT INTO SalesTransaction VALUES('SA016', 'ST005', 'CU004', '2020-12-1') INSERT INTO DetailSalesTransaction VALUES('SA016', 'CL003', 1) UPDA...
true
6f060fb6478c6a1534dadc0417bad4be3f3e320d
SQL
ReportsAdmin/MissLEgypt
/models/Missl_Egypt/Tables/fUAInsights.sql
UTF-8
670
2.8125
3
[]
no_license
select parse_date("%Y%m%d",D_ga_date) date_start, cast(a.M_ga_sessions as float64) sessions, cast(a.M_ga_impressions as float64) Impressions, cast(a.M_ga_adClicks as float64) Adclickss, cast(a.M_ga_productAddsToCart as float64) Addtocarts, cast(a.M_ga_avgPageLoadTime as float64) avgPageLoadTime , cast(a.M_ga_bounceRate...
true
58e5d89746807cfa7a5154f5f583d41810bc3446
SQL
Apisajan/ITP
/DB Script/HR Management/HRDBSCRIPTS.sql
UTF-8
3,571
4.15625
4
[]
no_license
--Creating tables for HRManagement CREATE TABLE `employee` ( `EmpId` int(11) NOT NULL AUTO_INCREMENT, `FirstName` varchar(45) DEFAULT NULL, `LastName` varchar(45) DEFAULT NULL, `Gender` char(1) DEFAULT NULL, `Address` varchar(45) DEFAULT NULL, `NIC` char(10) DEFAULT NULL, `DOB` tinytext, `Nationality`...
true
638255386552605edcd1380b942028d948df796b
SQL
DonaldOkwuone/pictureUploader
/myblog.sql
UTF-8
22,106
2.921875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Dec 16, 2016 at 04:36 AM -- Server version: 10.1.13-MariaDB -- PHP Version: 7.0.6 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLI...
true
e0c2af966708c9fc5da2d3ec34d017fbf9f1d89f
SQL
darionmh/intelligent-employee-scheduling
/sql/create-employee-table.sql
UTF-8
1,487
3.625
4
[]
no_license
DROP TABLE IF EXISTS EMPLOYEE_SHIFT_CORRELATION; DROP TABLE IF EXISTS EMPLOYEE_AVAILABILITY; DROP TABLE IF EXISTS SHIFTS; DROP TABLE IF EXISTS EMPLOYEES; DROP TABLE IF EXISTS SCHEDULES; CREATE TABLE EMPLOYEES ( EMPLOYEE_ID int not null PRIMARY KEY, LAST_NAME varchar(255) not null, FIRST_NAME varchar(255) n...
true
df3c39c999364d3a2adef2df70640bb5ae1ff3c0
SQL
with-sahan/jentest
/database/CreateDatabase/Functions/psm/getactivationdate.sql
UTF-8
291
2.765625
3
[]
no_license
DELIMITER $$ CREATE DEFINER=`root`@`%` FUNCTION `getactivationdate`(orgid int) RETURNS date BEGIN DECLARE response date; select activationday into response from subscription.organization where id=orgid; /* select '2016-06-08' into response; */ RETURN response; END$$ DELIMITER ;
true
28d8204ebb602bc1707d2d910a127509bc99680f
SQL
rsanttos/bancodedados-sql
/DUVIDAS/Questão_03-2-DUVIDA.sql
UTF-8
200
3.078125
3
[]
no_license
SELECT s.sid FROM gradebook.students s JOIN gradebook.enrolls e ON e.students_sid = s.sid JOIN gradebook.courses c ON e.courses_secno = c.secno AND e.courses_term = c.term AND c.cno = 'csc226';
true
613823de2be3a676ae4bdc0a6ae5e968cf03df06
SQL
cmooreitrs/monitor-ninja
/sql/mysql/ninja_db_v13_to_v14.sql
UTF-8
744
3.34375
3
[ "BSD-3-Clause" ]
permissive
CREATE TABLE saved_reports ( id int(11) NOT NULL auto_increment, type varchar(255) NOT NULL, report_name varchar(255) NOT NULL, created_by varchar(255) NOT NULL, created_at int NOT NULL DEFAULT 0, updated_by varchar(255) NOT NULL, updated_at int NOT NULL DEFAULT 0, PRIMARY KEY (id) ) ENGINE=InnoDB; CREATE TABL...
true
b2ed9076d0285989f26d6cc2e552751949920f56
SQL
fandashtic/arc_chennai
/Sivabalan-SQL/SQL_STORED_PROCEDURE/spr_Vendor_Rating_Items.sql
UTF-8
1,127
3.734375
4
[]
no_license
CREATE Procedure spr_Vendor_Rating_Items (@Vendor nvarchar(20), @FromDate Datetime, @ToDate Datetime) As Select Distinct GRNDetail.Product_Code, "Item Code" = GRNDetail.Product_Code, "Item Name" = Items.ProductName, "Quantity Supplied" = Isnull(sum(case Batch_Products.Free when 0 then IsNull(Batch_P...
true
a6800d51e65c96f8d7bf5c2a8d1e4317805c3b10
SQL
woodroof/babcom
/db/data/attribute_values_idx_oi_ai_voi.sql
UTF-8
207
2.6875
3
[]
no_license
-- drop index data.attribute_values_idx_oi_ai_voi; create unique index attribute_values_idx_oi_ai_voi on data.attribute_values(object_id, attribute_id, value_object_id) where (value_object_id is not null);
true
ef4548676f16540861d7bf3504e34654985a9bcf
SQL
alumnoIdat/openack
/openack.sql
UTF-8
5,904
3.03125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.0.10deb1 -- http://www.phpmyadmin.net -- -- Servidor: localhost -- Tiempo de generación: 04-12-2014 a las 09:29:14 -- Versión del servidor: 5.5.40-0ubuntu0.14.04.1 -- Versión de PHP: 5.5.9-1ubuntu4.5 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @O...
true
d7e447f24d78047f2528cc545d954f0f927a2fa6
SQL
biocore/microsetta-private-api
/microsetta_private_api/db/patches/0114.sql
UTF-8
34,630
3.578125
4
[ "BSD-3-Clause" ]
permissive
-- Add sleep-related questions to the end of the General Lifestyle and Hygiene Information section -- Create the questions INSERT INTO ag.survey_question (survey_question_id, american, question_shortname, retired, spanish, spain_spanish, japanese) VALUES (344, 'On days you have school or work, what time do you get ...
true
c7670fe50836937e60cb8f9d028bfc1dc1f620c5
SQL
thepricetoday/thesisgithub
/pricetoday (2).sql
UTF-8
18,269
3.296875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.1.14 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Jan 16, 2016 at 05:36 PM -- Server version: 5.6.17 -- 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
fc6090f1642c8d91f7fdfe2ce270219fd9972f33
SQL
jetmc/express-admin-examples
/fixtures/examples/insert.sql
UTF-8
9,610
2.90625
3
[ "MIT" ]
permissive
SET FOREIGN_KEY_CHECKS=0; -- One to Many truncate table `user`; truncate table `item`; truncate table `purchase`; insert into `user` set `firstname` = 'Jeff', `lastname` = 'Cox'; insert into `user` set `firstname` = 'Ann', `lastname` = 'Hart'; insert into `user` set `firstname` = 'Jack', `lastname` = 'Dean'; insert...
true
2b93761aa13376381c4d0a3b261f32a2fcaee8c5
SQL
Joe123123/BootcampX
/2_queries_joins/1_students_total_assignment_duration.sql
UTF-8
143
3.09375
3
[]
no_license
SELECT SUM(duration) AS total_duration FROM students JOIN assignment_submissions ON students.id = student_id WHERE students.name = 'Ibrahim Schimmel'
true
5988fdc03973525ff3e5af1db7a38a635e4a9642
SQL
Menziesprf/codeclan_homework_PeterM
/week_03/day_03/hw_lab_day3.sql
UTF-8
3,678
4.34375
4
[]
no_license
--MVP --Q1 SELECT local_account_no, iban FROM pay_details WHERE local_account_no IS NULL AND iban IS NULL; -- NO! --Q2 SELECT first_name, last_name, country FROM employees ORDER BY country NULLS LAST, last_name NULLS LAST; --Q3 SELECT * FROM employees ORDER BY salary DESC NULLS LAST LIMIT 10; --Q...
true
32f050be45a0c3392a17d84cb8a0b502edc16e42
SQL
asyraf795/legacy-movieaddits
/SQLDump/movieaddicts_bookings.sql
UTF-8
2,515
2.765625
3
[]
no_license
-- MySQL dump 10.13 Distrib 5.7.12, for Win64 (x86_64) -- -- Host: 127.0.0.1 Database: movieaddicts -- ------------------------------------------------------ -- Server version 5.7.15-log /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET...
true
107bf04dba65454644e7135b6d50f5f7ca9d630b
SQL
CRISTIANLOPEZ16/Documentacion
/latinscorts2.sql
UTF-8
19,111
3.390625
3
[]
no_license
CREATE TABLE `pais` ( `id_pais` int NOT NULL AUTO_INCREMENT COMMENT 'Es la llave que identifica el pais ', `Nombre` varchar(70) NOT NULL COMMENT 'Este es el nombre del pais ', PRIMARY KEY (`id_pais`) ); CREATE TABLE `departamento` ( `id_departamento` int NOT NULL AUTO_INCREMENT, `id_pais` int NOT NULL, `nombre...
true
cedfe2fdb4d8b3e7ac0173bcea203361d4f72fad
SQL
hattallipuneet/hibernate-basics
/sql_scripts/value_type_mapping_script/hb_learning_tracker.sql
UTF-8
2,976
3.609375
4
[]
no_license
CREATE DATABASE IF NOT EXISTS `hb_learning_tracker`; USE `hb_learning_tracker`; -- -- Used for mapping Set collection -- Table structure for tables `student` and `image` -- DROP TABLE IF EXISTS `student`; CREATE TABLE `student` ( `id` int(11) NOT NULL AUTO_INCREMENT, `first_name` varchar(45) DEFAULT NULL, `l...
true
60a81f4e07a39832d717d5e00020716cf537b318
SQL
sjtu-se-3dprint/3dprint
/doc/数据库/2015-07-19.sql
UTF-8
2,203
3.546875
4
[]
no_license
use 3dprint3; drop table if exists floor_comment; drop table if exists article_comment; drop table if exists article; create table article( article_id int unsigned not null auto_increment, article_name varchar(128) not null, article_content varchar(20000) not null, article_type varchar(128) not null, user_id int...
true
6993b7d9eaf69adc23686f2bc64ab9436a98dc50
SQL
KatrineTY/rehabilitationClinic
/src/main/resources/db/migration/V1_2__fill_in_tables.sql
UTF-8
9,075
2.9375
3
[]
no_license
-- ------------------------------- -- INSERT INTO prescription_times (prescription, time) -- VALUES (1, '2012-10-11'); -- INSERT INTO prescription_times (prescription, time) -- VALUES (2, '2012-10-12'); -- INSERT INTO prescription_times (prescription, time) -- VALUES (1, '2012-10-13'); -- INSERT INTO prescription_times...
true
ee07498142a4a517c2c62fbc830587f6b08154fd
SQL
John-Ryan-Johnson/Northwind
/Northwind_answer4.sql
UTF-8
443
4.3125
4
[]
no_license
--4. I need a list of sales figures broken down by category name. Include the total $ amount sold over all time and the total number of items sold. select c.CategoryName as [Category Name], sum(od.quantity) as [Total Items Sold], sum(od.quantity * od.unitprice) as [Total Sales] from Categories c join Product...
true
9798ed6eda9b50345009c71fadcb2d0fb069c1a2
SQL
silverorange/Chiara_PEAR_Server
/data/upgrade-0.12.0_0.13.0.sql
UTF-8
1,198
3.21875
3
[]
no_license
# # Table structure for table `categories` # CREATE TABLE categories ( id int(6) NOT NULL default '0', channel varchar(255) NOT NULL default '0', name varchar(255) NOT NULL default '', description text NOT NULL, alias varchar(50) default NULL, PRIMARY KEY (id) ); # ----------------------------------------...
true
824756f28ffdbb199a68921d14b7b049d58f6f5c
SQL
mseong123/protocount-nodejs-mysql
/mysql_files/STORED PROCEDURES/DEBTOR/INSERT_DEBTOR.sql
UTF-8
733
2.828125
3
[]
no_license
DELIMITER // CREATE PROCEDURE INSERT_DEBTOR (IN DEBTOR_NUM_PARAM VARCHAR(20),IN DEBTOR_NAME_PARAM VARCHAR(255), IN DEBTOR_ADDRESS_PARAM VARCHAR(255), IN DEBTOR_POSTCODE_PARAM VARCHAR(5), IN DEBTOR_PHONE_PARAM VARCHAR(15),IN DEBTOR_FAX_PARAM VARCHAR(15),IN DEBTOR_OTHER_DESC_PARAM VARCHAR(255),IN DEBTOR_CREDIT_TERM_PARAM...
true
58f950b9c15ffa443d33e8874d99a9828ff3c5d0
SQL
Mattw46/CPT375-A2
/init_db/tables.sql
UTF-8
3,022
3.578125
4
[]
no_license
-- Table bids CREATE TABLE bids ( bid_id int NOT NULL AUTO_INCREMENT, listing_id int NOT NULL , bid_user_id int NOT NULL , bid_tmstmp timestamp NOT NULL , bid_amnt decimal(15,2) NOT NULL , CONSTRAINT bids_pk PRIMARY KEY (bid_id) ); -- Table feedback CREATE TABLE feedback ( feedback...
true
1fd954340766a53a3c0f75f5708ec0f57567bf99
SQL
supervermiceau/Pimp
/Projet/BDD2/CreationBase.sql
WINDOWS-1252
8,266
3.421875
3
[]
no_license
#------------------------------------------------------------w # Creation Gestion recette #------------------------------------------------------------ #------------------------------------------------------------ # Table: Recette #------------------------------------------------------------ CREATE TABLE Rec...
true
33f1df3cc96e3cdabaca1f9d804263d7de2ee539
SQL
alekxey51/SQL_3_Course
/Горецкий/SQL 9 lab.sql
WINDOWS-1251
2,102
4.09375
4
[]
no_license
use school; SELECT firstname AS [], birthday AS [ ], class AS [], classnumber AS [], [name] AS [] FROM cityes JOIN students ON cityes.ID = students.cityID WHERE firstname LIKE '%' SELECT firstname AS [], class AS [], classnumber AS [], housenumber AS [ ], roomnumber AS [o ], variant.ID AS [] FROM students JOIN vari...
true
c8463231d6d12bba3d1c504d270ea8d019970f5a
SQL
shikhagoyal96/http5101_final_project
/data/seasondatabase.sql
UTF-8
2,625
3.484375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.3 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3306 -- Generation Time: Dec 03, 2019 at 09:52 PM -- Server version: 5.7.24-log -- 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 @OL...
true
6ec69b09986796bfc7045af294730f47b4a1f7a0
SQL
Nivedita30-mishra/Basic-Banking-System
/user.sql
UTF-8
2,718
3.28125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jan 14, 2021 at 01:51 PM -- Server version: 10.4.17-MariaDB -- PHP Version: 8.0.0 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARA...
true
622a87eeba3e126bcbfcaf08a5c5708f45777117
SQL
LuisFernandoSandovalParra/ScriptsDB_MySql_Oracle-Empresa_Seguridad_Privada
/SCRIPTS DB - EMPRESA SEGURIDAD PRIVADA/cccursos_vigilantes.sql
UTF-8
263
2.75
3
[]
no_license
-- CREACION DE LAS RESTRICCIONES DE LA TABLA CURSOS_VIGILANTES ALTER TABLE CURSOS_VIGILANTES ADD( CONSTRAINT CUV_FK_IDE FOREIGN KEY (ID_EMP) REFERENCES EMPLEADOS(ID_EMP), CONSTRAINT CUV_FK_IDC FOREIGN KEY (ID_CURSO) REFERENCES CURSOS(ID_CURSO) );
true
0abc9ec9b669803e5a16f3fc0a724fef13bba35a
SQL
olegTervo/FastReserve
/database/schema.sql
UTF-8
1,435
4.03125
4
[]
no_license
CREATE TABLE IF NOT EXISTS Users ( id SERIAL PRIMARY KEY NOT NULL, name VARCHAR(128) NOT NULL, secondName VARCHAR(128) NOT NULL, email VARCHAR(128) NOT NULL, phoneNumber BIGINT, password TEXT NOT NULL, isModerator BIT ); CREATE TABLE IF NOT EXISTS Item ( id SERIAL PRIMARY KEY NOT NULL, name VARCHAR(128) NOT...
true
61ccbe0c0e3f307b16bccf571ebacc4a7ed93ee8
SQL
deflaux/bigquery-examples
/1000genomes/sql/sample-variant-hotspots.sql
UTF-8
985
4.125
4
[ "Apache-2.0" ]
permissive
# Summarize the variant counts for a particular sample by 10,000 start-wide windows # in order to identify variant hotspots within a chromosome for a particular sample. SELECT reference_name, window, window * 10000 AS window_start, ((window * 10000) + 9999) AS window_end, MIN(start) AS min_variant_start, MA...
true
8dbf88fca995b61332179b63345731de85c09388
SQL
MuriloMilani8870/2s2019-t2-hroads-sprint-1-bd
/M_MuriloRafaelGiovanni_hroads_manipulacao_02.sql
ISO-8859-1
1,427
3.09375
3
[ "MIT" ]
permissive
Use SENAI_HROADS_MANHA Insert Into Classes (NomeClasse) Values ('Brbaro') ,('Cruzado') ,('Caadora de Demnios') ,('Monge') ,('Necromante') ,('Feiticeiro') ,('Arcanista'); Insert Into Habilidades (NomeHabilidade , IdTipoHabilidade , DescricaoHabilidade , CustoDeMana) Values ('Lana Mo...
true
23e31c55161d3c577045c29a3b1dac83ddaceeb3
SQL
san1j/springboot_poetHub
/src/main/resources/data.sql
UTF-8
3,370
2.953125
3
[ "MIT" ]
permissive
INSERT INTO USER (email,enabled,first_name,last_name,password,role,username,user_id) VALUES ('asdf@fs.sf',true,'firstName','lastName','$2a$06$OAPObzhRdRXBCbk7Hj/ot.jY3zPwR8n7/mfLtKIgTzdJa4.6TwsIm', 'USER','anonymous',1); INSERT INTO USER(email,enabled,first_name,last_name,password,role,username,user_id) VALUES ('ella...
true
59a2cf934720e98f7fdd1ca6b8291e5bcade7a39
SQL
francis-andrade/feup-tbda
/T2/ex4_queries_verification.sql
UTF-8
7,275
4.03125
4
[]
no_license
-- The results of each query in this file must be equal to the results of the corresponding query in the file "ex4_queries.sql" ---------------------------------- --a)------------------------------ ---------------------------------- SELECT p.sigla, sum(l.mandatos) FROM GTD7.partidos p, GTD7.listas l WHERE p.sigla = l.p...
true
b5052464fd2f4411631cf19d606b822a8a8695a9
SQL
TaleLearnCode/CPL20ArchiveSite
/src/SQL/uspRetrieveSpeakersForSession.sql
UTF-8
419
4.125
4
[ "MIT" ]
permissive
CREATE PROCEDURE dbo.uspRetrieveSpeakersForSession ( @SessionId INT ) AS BEGIN SELECT DISTINCT Speaker.AspNetUserId, Contact.FirstName, Contact.LastName, Speaker.Biography FROM Speaker INNER JOIN Contact ON Contact.Id = Speaker.ContactId WHERE Speaker.AspNetUserId IN (SELECT SpeakerId ...
true
1ba28404db858182aa6c5d6ac1e93b2cd7df0b4b
SQL
Gnana119/Database
/GeneralScripts/ComparePreviousRow_value_withCurrentRow.sql
UTF-8
1,878
4.28125
4
[]
no_license
--Select * from UserActivity -----------till SQL Server 2018 R2 -------------------- ;with UserActivitySplit (rownumber,[user],activity,activitytime,activitydate) AS ( Select ROW_NUMBER() OVER (Order by [user],activitytime) As RowNumber ,[user] ,Activity ,ActivityTime ,CAST(Activitytime as date) activitydate From User...
true
85f77e974ab8afad8acd1cfd9dbfc7850d1ec02e
SQL
bruc3yan/lacdb
/sql/final.sql
UTF-8
16,443
3.25
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 3.3.10.4 -- http://www.phpmyadmin.net -- -- Host: mysql.claremontbooks.com -- Generation Time: May 15, 2014 at 05:05 AM -- Server version: 5.1.56 -- PHP Version: 5.3.27 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 S...
true
067235329638211143e6518cf5462f1cfcfc76ee
SQL
gouldju1/r2sql
/cosql/resources/database/soccer_2/schema.sql
UTF-8
1,668
3.59375
4
[]
no_license
/* * SQL scripts for CS61 Intro to SQL lectures * FILENAME SOCCER2.SQL */ DROP TABLE IF EXISTS Player; DROP TABLE IF EXISTS Tryout; DROP TABLE IF EXISTS College; CREATE TABLE College ( cName varchar(20) NOT NULL, state varchar(2), enr numeric(5,0), PRIMARY KEY (cName) ); CREATE TA...
true
09a620aac574a165d5bbb2122f558f9df06bcc6c
SQL
naysolange/students-payment-preferences
/db/create-tables.sql
UTF-8
1,388
3.53125
4
[]
no_license
USE students; CREATE TABLE payment_option ( id INTEGER NOT NULL AUTO_INCREMENT, description VARCHAR(100) NOT NULL, PRIMARY KEY (id) ); INSERT INTO payment_option(description) VALUES("Credit card (1 installment)"); INSERT INTO payment_option(description) VALUES("Credit card (3 installments)"); INSERT IN...
true
c194b667627eaada33afcb5dde801e01336728c8
SQL
BayMaxx2001/Summer2021_term3
/DBI/PE SAMPLE/PE 02/3.sql
UTF-8
207
3.984375
4
[]
no_license
with t as( select c.name, count(fc.category_id) as 'Number of films' from film_category fc, category c where fc.category_id = c.category_id group by c.name) select t.* from t order by t.[Number of films] asc
true
8b825b604a78bc7503323b33c1d830dfa6bb6163
SQL
praveen-sivadasan/Spring
/SpringRest/Movieflix/database/tables_create.sql
UTF-8
3,613
3.640625
4
[]
no_license
/* Schema creation script */ /* 1. Code */ create table code( code_id_pk integer not null primary key auto_increment, value varchar(30) not null ); /* 2. */ create table code_master( code_master_id_pk integer not null primary key auto_increment, code_id_fk integer, value varchar(30) not null, foreign key(code_id_fk) ...
true
cd67d701fa47fc223d4f2c19526050fefd43e47d
SQL
edgar-code-repository/spring-boot-movies-rest-api
/sql/procedures/insert_genre.sql
UTF-8
215
2.640625
3
[]
no_license
CREATE PROCEDURE insert_genre (OUT genreId INT, IN name VARCHAR(150)) BEGIN declare genreId INT default 0; insert tbl_genre(name) values (name); set genreId = last_insert_id(); select genreId; END
true
fb8ef56c28bf572d6b5f3b9439b85a523445dcd6
SQL
andysarbini/new_hris
/db/mdl_office.sql
UTF-8
2,643
2.71875
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.8.3 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jul 22, 2019 at 03:27 AM -- Server version: 10.1.36-MariaDB -- PHP Version: 7.2.11 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OL...
true
55e79ac21a9bc32706faeb09bf65687358df0be0
SQL
alexferdinansyah/Inet2-DataAuditPSA
/DataAuditPSA/Query/DI_AUDIT_PSA01_DA.sql
UTF-8
2,137
2.59375
3
[]
no_license
-------------------------------------------------------- -- File created - Senin-Maret-25-2019 -------------------------------------------------------- -------------------------------------------------------- -- DDL for Table DI_AUDIT_PSA01 -------------------------------------------------------- CREATE TABL...
true
80fba5baf2e22461ea661a3c944811de33cc694a
SQL
Jamie0810/grpc-api
/migration/13_update-channels.sql
UTF-8
523
2.796875
3
[]
no_license
-- +goose Up -- SQL in this section is executed when the migration is applied. INSERT INTO `order_channels` (`id`, `channel_id`, `channel_name`, `is_enable`) VALUES (8, 'vgam', 'VGAM', 1), (9, 'atp', 'VATP', 1); INSERT INTO `order_channels` (`id`, `channel_id`, `channel_name`, `is_enable`) VALUES (10, 'sha...
true
c7557524f7e73a5354e835877f90a52531482938
SQL
zz0733/op-gbsql
/history/v1073/stat/V1.0.1.0051__C_player_transfer_collection.sql
UTF-8
1,110
3.328125
3
[]
no_license
-- auto gen by wayne 2016-11-30 19:53:11 CREATE TABLE IF NOT EXISTS player_transfer_collection ( id serial NOT NULL, transfer_type character varying(32) NOT NULL, api_id integer, comp_id integer, master_id integer, site_id integer NOT NULL, site_name character varying, transfer_date date, total_num integer, ...
true
d76b26e4dedbc7a2ca9eea6e1a0708e357beb12d
SQL
szintakacseva/datascience_for_webshops
/sql/kpi.sql
UTF-8
3,591
3.8125
4
[]
no_license
/*kpi.csv*/ WITH rfm_sid AS ( SELECT clientid, count(*) CountOfAllInteractions, count(distinct sid) CountOfSessions, sid, currency, sum(DISTINCT IF(status IN ('OS', 'OJ', 'OO', 'QS', 'QJ', 'QO', 'RS', 'RJ', 'RO'),1,0)) CountOfSales, sum(DISTIN...
true
23a8d3975a535af1bd53ce2bdb9985cd37123793
SQL
ApurboRahman/spring-office-employee
/src/main/resources/db/20200404/db_create_script.sql
UTF-8
2,389
3.671875
4
[]
no_license
CREATE TABLE IF NOT EXISTS MENUS( MENU_ID SERIAL, MENU_NAME VARCHAR(100), DESCRIPTION VARCHAR(255), CREATE_USER VARCHAR(6), CREATE_DATE TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP NOT NULL, CREATE_PGID VARCHAR(6), UPDATE_USER VARCHAR(6), UPDATE_DATE TIMESTA...
true
f56653da9099814a18a82505133c0c9a96164455
SQL
haochenprophet/database
/biosecurity.sql
UTF-8
7,455
3.21875
3
[]
no_license
CREATE DATABASE IF NOT EXISTS `biosecurity` /*!40100 DEFAULT CHARACTER SET utf8 */; USE `biosecurity`; -- MySQL dump 10.13 Distrib 8.0.13, for Win64 (x86_64) -- -- Host: localhost Database: biosecurity -- ------------------------------------------------------ -- Server version 8.0.13-commercial /*!40101 SET @OLD_...
true
9aacd9b1dbbdfdc803b33e4df3311c0c9eadd0c9
SQL
zhangjunfang/nsp
/MyEclipse 10/auditworks/target/classes/schema.sql
UTF-8
1,442
3.6875
4
[]
no_license
-- ============ mybatis ============ -- drop table account; create table account ( userid varchar(80) not null, email varchar(80) not null, name varchar(80) not null, constraint pk_account primary key (userid) ); -- ============ shiro ============ --users create table users ( username varchar(255) p...
true
49c581f346de946fa09501fdb7d51bd5d8665d4e
SQL
meldig/SQL
/modification/correction_erreurs_geometrie_ta_sur_topo_g.sql
UTF-8
4,318
3.625
4
[]
no_license
SET SERVEROUTPUT ON DECLARE BEGIN SAVEPOINT POINT_SAVE_TA_SUR_TOPO_G; /* Cette procédure a pour objectif de corriger les erreurs de géométrie présentes dans la table TA_SUR_TOPO_G. Les erreurs corrigées ci-dessous sont celles identifiées dans la table, ça ne veut pas dire que tous les types d'erreurs sont corrigés. Se...
true
2fd63992c07486df1345d03af06f6ce4ac3f8c6f
SQL
michaellee2245/group-project
/db/task/get_by_name.sql
UTF-8
736
4.09375
4
[]
no_license
/* Get the latest task with the given name */ SELECT task.id AS id, task.board_id AS board_id, task.owner_id AS owner_id, task.name AS name, task.priority AS priority, task.status AS status, to_char(task.start_date, 'MM/DD/YYYY') AS start_date, task.position AS position, task.group_name AS group, to...
true
1eb9801b63b4f53013edbbeda300ff9810d9a221
SQL
romulovieira777/Curso_Mysql
/Aula_41.sql
UTF-8
801
3.421875
3
[]
no_license
/* Escolhendo um Banco de Dados */ USE db_biblioteca; /* Criando uma Tabela */ CREATE TABLE camisas ( idCamisa TINYINT PRIMARY KEY AUTO_INCREMENT, nome VARCHAR(25), tamanho ENUM('Pequena', 'Média', 'Grande', 'Extra-Grande') ); /* Inserindo Dados na Tabela */ INSERT INTO camisas ( nome, t...
true
42c915241afbcebc73cc7eec2f062e6ccac67e36
SQL
MariaAlonsoLopez/Proyecto_BBDD
/Listado_socios.sql
ISO-8859-10
1,943
3.40625
3
[]
no_license
SET SERVEROUTPUT ON; /** ##### REQ 3: LISTADO DE SOCIOS Y SUS ABONADOS ###################################################################################### **/ SET SERVEROUTPUT ON; CREATE OR REPLACE PROCEDURE listado_socios IS --Cursor que almacena los socios CURSOR c_socios IS SELECT n...
true
7b4456e47e094535076e8da6c4172c00212828f6
SQL
sabbccc/GameShop
/Queries(Main DB_No fragments)/Main.sql
UTF-8
417
2.765625
3
[]
no_license
--main SET VERIFY OFF; SET SERVEROUTPUT ON; accept x char prompt 'Please enter operation: '; accept y char prompt 'Please enter search type(product/publisher): '; accept z char prompt 'Please enter product/publisher name: '; DECLARE a varchar2(10); b varchar2(10); c product.ptitle%Type; BEGIN a := '&x'; b := '...
true
fd0ac06d4dbe2adda058e04f495d3b89e4040df0
SQL
CUBRID/cubrid-testcases
/sql/_13_issues/_11_2h/cases/bug_bts_6314.sql
UTF-8
589
2.734375
3
[ "BSD-3-Clause" ]
permissive
create table t1 (c char(10), unique key uk1 (c)); create table t2 (c char(10), unique key uk2 (c)); create table t3 (c char(10), unique key uk3(1)); create table t4 (c char(10), unique key uk4 (c(1))); create table t5 (a int, b int, unique key uk5 (a,b)); create table t6 (a int, b int, unique key uk6 (1,2)); crea...
true
0075706a2e1e8d602935b24a4f26478dc9aa4394
SQL
JeongYunu/SQL
/Ex/Ex01.sql
UTF-8
4,115
4.3125
4
[]
no_license
--select절 from절 --모든 컬럼들 조회하기 select * from employees; select * from departments; --원하는 컬럼만 조회하기 select employee_id, first_name, first_name, last_name from employees; --출력할때 컬럼에 별명 사용하기/원컬럼은 변하지않음 select employee_id as empNO, --as키워드 는 대문자로만 표기 됨 first_name "F-name", --as는 누락해도 상관없음 ...
true
c21ca2bb999ccd30fd37f48bbe5b21e403fadbe9
SQL
silence-do-good/stress-test-Postgres-and-MySQL
/dump/high/day26/select0025.sql
UTF-8
403
3.546875
4
[]
no_license
SELECT obs.sensor_id, avg(counts) FROM (SELECT sensor_id, date_trunc('day', timestamp), count(*) as counts FROM WiFiAPObservation WHERE timestamp>'2017-11-25T00:25:00Z' AND timestamp<'2017-11-26T00:25:00Z' AND SENSOR_ID = ANY(array['thermometer7','3146_clwa_6049','3141_clwa_1420','wemo_01','3145_clwa_5231']) ...
true
fd812bd7f33ab7729c6f960b9718ad70864cf246
SQL
50minutos/MOC-10776
/SSMS/10776/020.sql
ISO-8859-1
1,404
3.40625
3
[]
no_license
USE DB SELECT * FROM SYS.fulltext_languages CREATE TABLE EXEMPLO_FULLTEXT ( COD_EXEMPLO_FULLTEXT INT IDENTITY PRIMARY KEY, DADOS_EXEMPLO_FULLTEXT TEXT ) INSERT EXEMPLO_FULLTEXT VALUES ('ABC DO TRUCO'), ('BATATINHA QUANDO NASCE'), ('PLANTAO DE BATATA SEM MESTRE'), ('TRUCO SEM MESTRE') SELECT * FROM EXEMP...
true
cfd0e14efc5469f2eab526374ea7915bcff6ac3f
SQL
JZuegg/CastDB_SQL
/DataModel/Run_Tbl_ScreenRun.sql
UTF-8
3,058
2.953125
3
[]
no_license
-- ==================================================================== -- Definition -- ==================================================================== @../Schema/CastDB_Define.sql -------------------------------------------------- -- Table Definition -------------------------------------------------- DEFINE xTa...
true
4f3bccb79bb0275b07b76d8c0322baf47ad95552
SQL
risingvivek/gs-spring-boot-complete
/src/main/resource/data.sql
UTF-8
327
2.765625
3
[]
no_license
DROP TABLE IF EXISTS Book; CREATE TABLE Book ( id INT AUTO_INCREMENT PRIMARY KEY, author VARCHAR(250) NOT NULL, name VARCHAR(250) NOT NULL, price VARCHAR(250) DEFAULT NULL ); INSERT INTO Book (author, name, price) VALUES ('Aliko', 'Dangote', '111'), ('Bill', 'Gates', '222'), ('Folrunsho', 'Alakija', ...
true
6f5ae97b3c6cef586101eda26dfb6179e01acf81
SQL
CoolHatsker3000/JavaSpringNTProject
/DB/db.sql
UTF-8
2,294
3.625
4
[]
no_license
drop table tariff_info; drop table tariff_attrs; drop table user_info; drop table user_attrs; drop table users; drop table tariffs; create table tariffs( tariff_id INT PRIMARY KEY, tariff_name VARCHAR(20) unique, payment decimal(10,2) ); create table tariff_attrs( attr_id int CONSTRAINT attributes_pk prim...
true
67867cb1cc019c4e000dc065112c63716ee3fd4b
SQL
moesandar213511/edms_gov
/government.sql
UTF-8
13,669
2.8125
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.8.4 -- https://www.phpmyadmin.net/ -- -- Host: localhost:4306 -- Generation Time: Jul 23, 2021 at 06:36 AM -- Server version: 10.1.37-MariaDB -- PHP Version: 7.3.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SE...
true
61bebcb7d93a93cd76b6a4a2d00065a639a5194a
SQL
DavidJNoh/sql
/business.sql
UTF-8
1,292
4.09375
4
[]
no_license
SELECT SUM('billing.amount'), charged_datetime FROM billing WHERE billing.charged_datetime >='2012/03/01' AND billing.charged_datetime<'2012/04/01' SELECT clients.client_id, SUM('billing.amount') as revenue FROM clients LEFT JOIN billing ON clients.client_id = billing.client_id WHERE clients.client_id=2 GROUP BY clien...
true
dfd35007e734b507a3d8f73b4a90b2e85868a440
SQL
dstreev/big-data-apps
/apps/retail/schema/spark-retail-schema.sql
UTF-8
929
3.5625
4
[ "Apache-2.0" ]
permissive
CREATE DATABASE IF NOT EXISTS ${TARGET_DB}; USE ${TARGET_DB}; DROP TABLE IF EXISTS CUSTOMER; CREATE TABLE IF NOT EXISTS CUSTOMER ( ID STRING, FULL_NAME STRING, ADDRESS STRING, STATE STRING, CONTACT_NUM STRING ) USING ORC; DROP TABLE IF EXISTS VISIT; CREATE TABLE IF NOT EXISTS...
true
229cf94c292f20206dd0eb89aa3c8a47bfb5f821
SQL
idrisabdul/withus
/database/withus.sql
UTF-8
13,785
2.625
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.7.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jul 02, 2021 at 12:37 PM -- Server version: 10.1.28-MariaDB -- PHP Version: 7.1.11 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OL...
true
4c3afd4afddd794fa35d61bfb5957b1ff5144308
SQL
daniiel/cursos
/Oracle 11g - Introduction to SQL/courselabs/plpu/solns/sol_08_03_e.sql
UTF-8
166
2.53125
3
[]
no_license
UPDATE employees set job_id = 'ST_MAN' WHERE employee_id = (SELECT employee_id FROM employees WHERE last_name = 'Beh');
true
3903b7a38065fc0ecb28bc8b096a17545750c1ac
SQL
arunkpatra/athena
/subprojects/athena-data/queries/ytd-gross-breakage-by-merchant.sql
UTF-8
1,785
4.40625
4
[ "MIT" ]
permissive
-- YTD Top merchants with breakage -- Description: Find out the total breakage by merchant -- Verified: OK -- Approach -- 1. Which cards have expired as of today in the last one year? -- 2. What was the breakage on each such card? -- 3. Group by card type and sum ALL breakages. That gives the total breakage for a car...
true
9f3e96b21eb81c1fb078d11b1fdf9b92ae30518f
SQL
XCentium/NBF
/src/DBScripts/Test Scripts/images 02.sql
UTF-8
1,572
2.96875
3
[]
no_license
select productid from products where number like '56289%' and statusid = 1 select * from products where Number = '41899' select * from ProductSKUs where ProductId = 222479 and OptionCode = '11' select * from ProductSKUs where productid = 115815 and IsWebEnabled > 0 select * from ProductWebImages where productid = ...
true
9ac2d3ea572e9275e9aa0ea5c285a117d427fd1a
SQL
cboy868/lion
/modules/install/data/install.sql
UTF-8
140,935
3.09375
3
[]
no_license
-- MySQL dump 10.13 Distrib 5.6.17, for Win32 (x86) -- -- Host: localhost Database: lion_test -- ------------------------------------------------------ -- Server version 5.6.17 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!4...
true
2fb0f600d82727c4d5c3b1adceeaa26aa23c4c36
SQL
silviabooks/SIoT-Blockchain-Platform
/db/social_iot_platform_sve.sql
UTF-8
80,454
2.609375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.5.2 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Sep 28, 2018 at 06:56 -- 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_CLIE...
true
28ebf6a3d9fac19c054969d492e36d0fc9933b1c
SQL
zhouyongguo1/lequ-db
/mysql/V20160110_1700__create_table.sql
UTF-8
2,475
3.546875
4
[ "Apache-2.0" ]
permissive
CREATE TABLE core_role ( `id` int unsigned NOT NULL AUTO_INCREMENT, `team_id` int unsigned NOT NULL, `name` nvarchar(100) NOT NULL, `status` varchar(100) NOT NULL DEFAULT 'ACTIVE', PRIMARY KEY (`id`), FOREIGN KEY (`team_id`) REFERENCES core_team(`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; CREATE TABLE core_user ...
true
520c958dab8b5dd317afabdfaf17a89bf3e11753
SQL
HDBISG/TradeTrustGateway
/resource/mysql.sql
UTF-8
3,806
3.140625
3
[]
no_license
drop table T_TTGW_WALLET; CREATE TABLE `T_TTGW_WALLET` ( `WALLET_ACCN_ID` varchar(35) NOT NULL, `WALLET_PRIVATE_KEY` varchar(256) DEFAULT NULL, `WALLET_ADDR` varchar(128) DEFAULT NULL, `WALLET_PASSWORD` varchar(128) DEFAULT NULL, `WALLET_JSON` VARCHAR(2048) DEFAULT NULL, `WALLET_STATUS` varchar(10) NOT NU...
true
87467e10b1d2e3940f0c340b189d07b8bb02b0e7
SQL
ju5t1nhhh/niitblogsystem
/sql/data.sql
UTF-8
2,161
3.09375
3
[]
no_license
#添加假数据 USE niitblog; #添加管理员 INSERT INTO bsuser(username,email,password) VALUES('root','root@niit.com','root'); #添加用户 INSERT INTO bsuser(username,email,password) VALUES ('Apple','apple@niit.com','apple'), ('Banana','banana@niit.com','banana'), ('Cat','cat@niit.com','cat'), ('Doctor','doctor@niit.com','doctor'), ('Egg','...
true
c9e04dc1b6a1a9549178f9ff1ebc45a2ba0d4611
SQL
rusli-nasir/smsempresayii
/protected/extensions/gtc/_dev/demo_schema.sql
UTF-8
3,105
3.6875
4
[]
no_license
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'; -- ----------------------------------------------------- -- Table `demo_category` -- -------------------------------------------...
true
bf5e2c2ebcf4fc700c2796d622343c60f9528d37
SQL
elhuss/webline
/weblinedb.sql
UTF-8
3,182
2.921875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 3.5.2 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Oct 09, 2019 at 10:28 AM -- Server version: 5.5.25a -- PHP Version: 5.4.4 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*...
true
2e437739431e182ecb724ead41368f35135dff45
SQL
georgelzh/SQL-Server-Notes
/chap8_joins_versus_subqueries/more_eg.sql
UTF-8
1,160
4.4375
4
[]
no_license
--------more examples --find name of all departments that offers a course with INTRO in the title select d2m.dname from Department_to_major d2m where d2m.Dcode in (select c.OFFERING_DEPT from Course c where c.COURSE_NAME like '%INTRO%') --eg 2 --find students name, student major code, section id of students -...
true
e8cb5ff46f697a940a8277648ae0fd33a0737b17
SQL
viveksacademia4git/auction
/sqldata/auction_auction_item.sql
UTF-8
2,401
3.125
3
[]
no_license
-- MySQL dump 10.13 Distrib 8.0.16, for Win64 (x86_64) -- -- Host: localhost Database: auction -- ------------------------------------------------------ -- Server version 8.0.16 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!...
true