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
7c664a93903d9944e5e2ed977f53c705239b3b6a
SQL
linxscc/Jenkins-test
/spec/20180523_CREATE_ENTRY_MAIL.sql
UTF-8
1,560
3
3
[]
no_license
-- Table `moveup`.`entry_mail` //応募メール CREATE TABLE IF NOT EXISTS `moveup`.`entry_mail` ( `id` INT UNSIGNED NOT NULL AUTO_INCREMENT, -- ID `entry_id` INT UNSIGNED NOT NULL, -- アイテムID `category` TINYINT(2) NOT NULL, ...
true
0e77ff82ec4987dc6673810b4e25e44c79f33d9e
SQL
brandonalexis1112/testTATA
/sql/table.sql
UTF-8
1,070
3.203125
3
[]
no_license
CREATE TABLE `character` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(40) DEFAULT NULL, `height` decimal DEFAULT NULL, `mass` INT DEFAULT NULL, `hair_color` varchar(10) DEFAULT NULL, `skin_color`varchar(10) DEFAULT NULL, `eye_color`varchar(10) DEFAULT NULL, `birth_year`date DEFAULT NULL, `ge...
true
7987905399374d890a7568be3b74152abe854e6d
SQL
algeriastartupjobs/algeriastartupjobs.com
/api/db/search/migrations/0001_create_word_table.sql
UTF-8
366
3
3
[ "MIT" ]
permissive
-- SQLite CREATE TABLE word ( id INTEGER PRIMARY KEY, word TEXT NOT NULL, model_type TEXT NOT NULL, model_id INTEGER NOT NULL, appear_in TEXT NOT NULL ); CREATE INDEX idx_word_word ON word (word); CREATE INDEX idx_word_model_type ON word (model_type); CREATE INDEX idx_word_model_id ON word (model_id); CREATE ...
true
93b86a0ec915f6947b96f6aef0ace4993507adb2
SQL
DieterKoblenz/scue_bank
/require/install.sql
UTF-8
1,151
3.078125
3
[]
no_license
CREATE TABLE IF NOT EXISTS `bankaccounts` ( `username` text collate latin1_bin, `userpass` text collate latin1_bin, `funds` decimal(10,2) default '0.00', `subdivision` text collate latin1_bin, `country` text collate latin1_bin, `type` text collate latin1_bin NOT NULL, `owner` text collate latin1_bin NOT N...
true
19591adb4b429173ad75a0178ec3edf9904ae123
SQL
didkovskiy/TTTBot
/database/tttbot_db.sql
UTF-8
402
3.53125
4
[]
no_license
create database tttbot_db; create table player ( id int, nickname varchar(60) not null, points bigint default 0 null ); create unique index player_id_uindex on player (id); create unique index player_nickname_uindex on player (nickname); alter table player add constraint player_p...
true
0cc21195bd261ee9ec987daa0cca575ccc72531e
SQL
aalmunia/mock-server-drivers
/export.sql
UTF-8
14,899
3.078125
3
[]
no_license
-- -- File generated with SQLiteStudio v3.2.1 on mar jul 31 13:16:26 2018 -- -- Text encoding used: UTF-8 -- PRAGMA foreign_keys = off; BEGIN TRANSACTION; -- Table: driver CREATE TABLE driver (id INTEGER PRIMARY KEY UNIQUE NOT NULL, name VARCHAR (255) NOT NULL, is_ranked BOOLEAN NOT NULL, type INTEGER NOT NULL); INSER...
true
1fd3ca8f62a3d41092faa48dc640a79936f5042a
SQL
maryletteroa/azure-databricks-spark
/formula1/demo/9.sql_joins_demo.sql
UTF-8
2,378
3.734375
4
[]
no_license
-- Databricks notebook source USE f1_presentation; -- COMMAND ---------- DESC driver_standings -- COMMAND ---------- CREATE OR REPLACE TEMP VIEW v_driver_standings_2018 AS SELECT race_year, driver_name, team, total_points, wins, rank FROM driver_standings WHERE race_year = 2018; -- COMMAND ---------- SELECT * F...
true
e85a76855506db0f9c7992227ffa2cdfb58395a4
SQL
Alpistinho/trabalhoBD
/Q14 - Trigger.sql
UTF-8
469
2.984375
3
[]
no_license
CREATE TRIGGER atualizar_pgt ON Duplicata FOR UPDATE AS BEGIN IF UPDATE(vl_pagamentoduplicata) BEGIN UPDATE Duplicata SET Duplicata.dt_pagamentoduplicata = GETDATE() From Inserted, Duplicata WHERE Duplicata.Cd_Duplicata = inserted.Cd_Duplicata; END END select * from duplicata du where du...
true
08ac5f3bbda1b50c7cf0b7f136981d0bfb3c4459
SQL
giannini5/fields
/trunk/src/db/schedule/upgrade/038_addTimeBetweenGamesToDivision.sql
UTF-8
638
3.046875
3
[ "MIT" ]
permissive
drop procedure if exists 038_addMinutesBetweenGamesToDivision; delimiter $$ create procedure 038_addMinutesBetweenGamesToDivision() begin if not exists( select * from information_schema.columns where TABLE_SCHEMA = DATABASE() and TABLE_NAME = 'divi...
true
e7832590502a2f59d074b989ff2bdff7a16b30fd
SQL
Shubhamfulare/Edacmay2021
/Mysql/assignment/assignment01.sql
UTF-8
1,537
3.671875
4
[]
no_license
use spj; create table s(Sno char(4), Sname char(20), Status int, City char(20)); create table p(Pno char(4), Pname char(20), Color char(20) , Weight int, City char(20)); create table j (Jno char(4), Jname char(20), City char(20)); create table spj (Sno char(4) ,Pno char(4) ,Jno char(4),Qty char(4)); ; insert into...
true
a8528ae6e7b1fbd7113f07f35e5373df214c735c
SQL
devaga/Football_Database
/SQLQuery2.sql
UTF-8
7,186
2.921875
3
[]
no_license
CREATE TABLE Team ( id INTEGER PRIMARY KEY , team_api_id INTEGER UNIQUE, team_fifa_api_id INTEGER UNIQUE NOT NULL, team_long_name VARCHAR(500), team_short_name VARCHAR(500) ); CREATE TABLE Player ( id INTEGER PRIMARY KEY , player_api_id INTEGER UNIQUE, player_name VARCHAR(500), player_fifa_api_id INTEGER UNIQUE, bi...
true
f4424f83c8da409e9c50f5f2bc61aeb2726d4a6c
SQL
evrimulgen/FCR
/T_B_ACCOUNT.sql
WINDOWS-1251
1,437
3.109375
3
[]
no_license
-------------------------------------------------------- -- DDL for Table T#B_ACCOUNT -------------------------------------------------------- CREATE TABLE "FCR"."T#B_ACCOUNT" ( "C#ID" NUMBER(*,0), "C#BANK_ID" NUMBER(*,0), "C#NUM" VARCHAR2(20 BYTE), "C#NAME" VARCHAR2(100 BYTE), "C#INN_NUM" VARCHAR2(1...
true
ae5d794ccc08a94dc3afb0dab76a9f84f0083109
SQL
Nguyen-Thi-Hong-Hanh/baithuchanhphp
/Bai7/tintuc.sql
UTF-8
1,831
3.0625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.1.0 -- https://www.phpmyadmin.net/ -- -- Máy chủ: 127.0.0.1 -- Thời gian đã tạo: Th8 25, 2021 lúc 10:52 AM -- Phiên bản máy phục vụ: 10.4.18-MariaDB -- Phiên bản PHP: 8.0.3 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARA...
true
9c7768c8ea102de6096115ed07a55bb3c6f77465
SQL
ed-chin-git/SQL_Research
/advanced_SQL/Query09.sql
UTF-8
2,160
4.46875
4
[]
no_license
/** Query 9: Find the top 2 accounts with the maximum number of unique patients on a monthly basis. Note: Prefer the account if with the least value in case of same number of unique patients Approach: First convert the date to month format since we need the output specific to each month. Then group together all da...
true
9696d9da445ddfd41abd6862582c706ff57ad4cf
SQL
eurospent/eurospent
/1_scraping/ireland/4_geocode.sql
UTF-8
316
2.671875
3
[ "MIT" ]
permissive
SELECT DISTINCT beneficiary_id, 'IE' AS query_country_code, 'Ireland' AS query_country, 'project' AS query_type, NULL AS query_state, NULL AS "query_region", NULL AS "query_county", NULL AS "query_city", NULL AS "query_postal_code", NULL AS "query_address" FROM ie_final as t WHERE project_lau2 is NULL;
true
06ccca04386ca1cc06fe8a53a54e99fcca01cab1
SQL
Lezh1k/NewsService
/db/initial.sql
UTF-8
591
3.15625
3
[]
no_license
/*создаем единственную таблицу news.*/ create table news ( id INT AUTO_INCREMENT, registered DATE NOT NULL, header TEXT, PRIMARY KEY(id) ); /* скорей всего ещё нужно будет выбирать новости за определенную дату. вообще говоря обычно такие вещи выносятся в миграции, но из-за ограничений по времени пусть по...
true
0ddc7494d88f5f14b13aca33202a71ba2009c4ad
SQL
jheintel/IT2351_JonHeintel
/Assignment2/Assignment2Part2G.sql
UTF-8
292
3.90625
4
[]
no_license
select concat(c.customer_first_name, ' ', c.customer_last_name) as "Name", i.title from customers c inner join orders o on o.customer_id = c.customer_id inner join order_details od on o.order_id = od.order_id inner join items i on i.item_id = od.item_id where c.customer_state = "OH"
true
b8dd14213ac77943b6d3ef9eb926757e0e3b7d87
SQL
Kaleo-Stark/Node-e-MySQL
/scriptDatabase.sql
UTF-8
535
3.3125
3
[]
no_license
-- Cria a base de dados "crud" que recebera a tabela de cliente. CREATE DATABASE crud; -- Seleciona a tabela "crud". USE crud; -- Cria a tabela clientes que recebera os dados de cleintes e será manipulada pelo NodeJS. CREATE TABLE clientes ( id INT PRIMARY KEY AUTO_INCREMENT NOT NULL, nome VARCHAR(30), id...
true
cdec244a8cc9b5f417fc1af9d13cf5c46817662e
SQL
Johnzhou321/hexin
/智融链/2019-06-27信汇宝/2019-07-17档案查询.sql
UTF-8
1,314
4.03125
4
[]
no_license
explain select ea.id id,ea.archive_no archiveNo,e.id enterpriseId,e.name enterpriseName,e.type enterpriseType,ea.tag tag, (select eu.name from ENTERPRISE_USER eu where eu.id=ea.creator) creatorName,ea.created_at createdAt from (select max(id) id,archive_no,max(enterprise_id) enterprise_id,tag,max(creator) creator,min(c...
true
3d925ec3c80e05a4be18fa6cadd6c6bd3d2273e2
SQL
vgoel38/PQET
/inputs/really_final_outputs/original/original/25b.sql
UTF-8
6,029
2.625
3
[]
no_license
QUERY PLAN ----------------------------------------------------------------------------------------------------------------...
true
9d94f9531bdba278aceda9306f712eb32ca461d6
SQL
luisroel/soccersoft
/dbobjects/MySQL/Stats/vwStats_Get_RawOverall_Tmp.sql
UTF-8
1,312
3.109375
3
[]
no_license
-- -- Overall Raw Stats -- DROP VIEW IF EXISTS vwStats_Get_RawOverall_Tmp; CREATE VIEW vwStats_Get_RawOverall_Tmp AS SELECT T.SeasonId , T.Time , T.Round , T.TeamId , T.Played AS PLH , T.Wins AS WNH , T.Draws AS DRH , T.Losses AS LSH , T.Scored AS SCH , T.Against AS AGH , T.D...
true
bd72751af044001c36d314750ca2fb067f86331d
SQL
Lebogang-cloud/SQL-Project
/tables.sql
UTF-8
2,635
3.53125
4
[]
no_license
create database Umuzi; create table Customers( CustomerID serial primary key, FirstName varchar(50), LastName varchar(50), Gender varchar, Address varchar(200), Phone integer, Email varchar(100), City varchar(20), Country varchar(50) ); create table Employees( EmployeeID serial primary key, FirstName varchar(50), Las...
true
348db7f8423a48f1ade054cd4824f23a46abe82e
SQL
awansik/sql-instruction-20
/BankDB/bank_db_join.sql
UTF-8
328
3.625
4
[]
no_license
select * from account order by accountHolder desc; select * from transaction order by amount; select amount, txnType,accountId from transaction t join account a on .accountHolder = t.accountHolder; select a.id, accountholder, amount, txntype from transaction t join account a on t.AccountID ...
true
19e2df4cb4267865895c6d88f9051fb174e424bd
SQL
apache/db-jdo
/tck/src/main/resources/sql/derby/applicationidentity/schema.sql
UTF-8
292,150
3.25
3
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
-- Licensed to the Apache Software Foundation (ASF) under one or more -- contributor license agreements. See the NOTICE file distributed with -- this work for additional information regarding copyright ownership. -- The ASF licenses this file to You under the Apache License, Version 2.0 -- (the "License"); you may not...
true
8a3779818d20ab70973194212f68616c030fee90
SQL
evrimulgen/cub-ctp-sql-scripts
/Testing scripts/Archived/token added to deny list on every tap.sql
UTF-8
2,706
3.453125
3
[]
no_license
define timezone_mod = 10; select nlh.negativelistid, nlh.tokenid, nlh.listaction, nlh.statuschangeddtm + &timezone_mod/24, nlh.emvinserteddtm from emv.ctp_negative_list_history nlh where tokenid = 1347146 order by nlh.tokenid, nlh.STATUSCHANGEDDTM; select negative_list_id, token_id, list_action, status_changed_dtm + 1...
true
504749feeb15efd958b2aecd71ebafea92cd38f6
SQL
wf539/LearningTree925SQLProgrammingLanguageIntro
/925_HOCD1_H1_708_G2/Course925Solutions/ho72-3.sql
UTF-8
449
3.421875
3
[ "MIT" ]
permissive
SELECT UPPER(LastName) ||'/' ||UPPER(FirstName) ||CASE GENDER WHEN 'M' THEN 'MR' WHEN 'F' THEN 'MS' END AS TicketName FROM Employees ORDER BY EmployeeID; -- In SQL Server the concatenation operator is + SELECT UPPER(LastName) +'/' +UPPER(FirstName) +CASE GEN...
true
823ff5aec7e4bd509743edb8c02f7c7552bd137d
SQL
JeffersonLab/ceddb
/sql/createSchema.sql
UTF-8
65,355
2.625
3
[]
no_license
/** * NOTE: This schema is maintained through ERWin. Do not hand-edit!!!! * Any changes made directly to this file will be lost!. * */ -- These procedures are created via the enable DROP MATERIALIZED VIEW mv_cmpnt_prop_val_live; -- If versioning is still enabled, the drops at the beginning ...
true
2cd05c5cb65d113a65a1cf83c54494bef62db69a
SQL
ceeeeedd/oct172018
/Daily Statistics scripts AHMC_DataAnalyticsDB/Service Count per Service ALL/Dataset 1 - Service Count per Service ALL.sql
UTF-8
1,309
4.09375
4
[]
no_license
--Dataset 1 - Service Count per Service ALL SELECT * FROM( SELECT transaction_date_year_rcd = YEAR(transaction_date_time) ,transaction_date_month_rcd =month(transaction_date_time) ,transaction_date_month_name = DATENAME(MONTH,transaction_date_time) ,admission_type ,department ,service_provider ,service_categ...
true
ababdedb74fa225263c3c5535c5e5e576ee3826c
SQL
MYCourseWorks/softuni-hw
/SoftUniHomeWorks_DBs/01.SqlBasics/07.FunctionsTriggersAndTransactions/23.AllUsersAndGamesInfo.sql
UTF-8
351
3.796875
4
[]
no_license
select G.Name as [Game], GT.Name as [Game Type], U.Username, UG.Level, UG.Cash, C.Name as [Character] from Users as U join UsersGames as UG on UG.UserId = U.Id join Games as G on G.Id = UG.GameId join GameTypes as GT on GT.Id = G.GameTypeId join Characters as C on C.Id = UG.CharacterId order by UG.Level d...
true
99bdeb25ba3657b05419619eb9093b3c10762182
SQL
ViktorZykov12/MySQL
/Homework lesson 6.2-5.sql
UTF-8
3,359
4.375
4
[]
no_license
-- 2. Создать все необходимые внешние ключи и диаграмму отношений. ALTER TABLE profiles ADD CONSTRAINT profiles_user_id_fk FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE; ALTER TABLE messages ADD CONSTRAINT messages_from_user_id_fk FOREIGN KEY (from_user_id) REFERENCES users(id)...
true
af6582298daecee86afc68e2b9558c06a90d8ac3
SQL
hukaibo/crawler
/src/main/resources/db/migration/V1__Create_tables.sql
UTF-8
289
2.78125
3
[ "Apache-2.0" ]
permissive
create table NEWS( id bigint primary key auto_increment, title text, content text, url varchar(1000), created_at timestamp, modified_at timestamp )default charset=utf8mb4; create table LINKS_TO_BE_PROCESSED( link varchar(1000) ); create table LINKS_ALREADY_PROCESSED( link varchar(1000) );
true
e524fb0fc046f40de54768fae58900c05085b3c1
SQL
neilinglese/SQL_CSharp_Console_Week1
/SQLQuery2.sql
UTF-8
4,002
4.40625
4
[]
no_license
/* NOTE: All of the queries (SELECT statements) use the SalesOrdersExample.mdf database. Your first step is to create a console project that uses SalesOrdersExample.mdf as a local database. */ --1. Get month and year as numbers from ztblMonths select monthNumber, YearNumber from ztblMonths /* 2.Get the starting day...
true
fc5ca11490d8c99f11cdf638d74b38290ba33acf
SQL
ZHANG-FENGTAO/elasticsearch-demo
/src/main/java/com/zft/elasticsearch/common/new.sql
UTF-8
1,257
3.65625
4
[]
no_license
-- we don't know how to generate schema test (class Schema) :( create table t_book_bar ( id int not null primary key, bar_num varchar(20) not null comment '书吧编号', name varchar(50) default '' null comment '书吧名称', address varchar(50) default '' null comment '书吧地址', lng double(10,6) null comment '经度', lat double(1...
true
4fe45e50ca12fef9c9311b77d67594606afd7660
SQL
intarsV/library
/src/integration-test/resources/data.sql
UTF-8
2,655
3.71875
4
[]
no_license
drop table if exists authors, authorities, books, reservations, users; create table authors( author_id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, author_name VARCHAR(100) NOT NULL, enabled BOOLEAN ) AUTO_INCREMENT=4; CREATE INDEX author_name ON authors(author_name); create table authorities( authority_id BIGINT NOT...
true
e73e59eeb3e4c28fccb641a027eb8322bddfc64c
SQL
angel-hernandez91/spt
/part1.sql
UTF-8
5,849
3.640625
4
[]
no_license
drop table items; CREATE TABLE items ( id SERIAL NOT NULL CONSTRAINT items_pkey PRIMARY KEY ,upc INT ,name TEXT ,size TEXT ,price FLOAT ,taxable BOOLEAN ,sold_by TEXT ); CREATE UNIQUE INDEX items_id_uindex ON items (id); INSERT INTO items (id, upc, name, size, price, taxable, sold_by) VALUES (4, 30273, 'App...
true
8fe41e5be1fdad869510169bf917ab1e51654a53
SQL
Wonderful23/Web
/database/4.sql
UTF-8
776
2.578125
3
[]
no_license
create table orders(username varchar(50),ordid int,ord_time varchar(10),total int,primary key(username,ordid)); insert into orders(username,ordid,ord_time,total) values("wzy",1,"2017-01-01",4); insert into orders(username,ordid,ord_time,total) values("wzy",2,"2017-02-01",40); insert into orders(username,ordid,ord_time,...
true
8d2059fe7b190769737fd863382fa96e73c6ada3
SQL
klys/Sispub2
/sql/servicios_publicos.sql
UTF-8
6,051
3.171875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 3.5.1 -- http://www.phpmyadmin.net -- -- Servidor: localhost -- Tiempo de generación: 14-11-2014 a las 18:26:07 -- Versión del servidor: 5.5.24-log -- Versión de PHP: 5.3.13 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHAR...
true
047f661e16d99b6b131fde3537d6119b7693b7dd
SQL
HKuz/MYSQL_Practice
/CodeFights/WouldYouLikeTheSecondMeal/suspectsInvestigation.mysql
UTF-8
176
2.5625
3
[ "MIT" ]
permissive
CREATE PROCEDURE suspectsInvestigation() BEGIN SELECT id, name, surname FROM Suspect WHERE height <= 170 AND lower(name) LIKE 'b%' AND lower(surname) LIKE 'gre_n'; END
true
ce5339f9d40bc998b447e080591656ef6cdc1447
SQL
LyunJ/CoupangReview
/csv_to_mysql/save_csv_to_other_tables_trigger.sql
UTF-8
3,520
3.75
4
[]
no_license
# 테이블 전체 데이터 삭제 delete from review_content; delete from review_analyzing_data; delete from product_review; delete from product; delete from product_category; delete from csv_save; alter table product_category auto_increment = 0; alter table product auto_increment = 0; # 트리거 삭제 drop trigger if exists insertTrigger; # ...
true
ca8e32a6b0d3da45f5e3bc19457341f5f00777ff
SQL
AndreasRC/projeto-integrador_grupo02_digitalhouse
/bd_mysql/veduta.sql
UTF-8
3,088
3.46875
3
[]
no_license
CREATE SCHEMA `veduta` DEFAULT CHARACTER SET utf8 ; CREATE TABLE `veduta`.`users` ( `id` INT NOT NULL AUTO_INCREMENT, `name` VARCHAR(45) NOT NULL, `surname` VARCHAR(45) NOT NULL, `sex` VARCHAR(45) NOT NULL, `birthdate` DATE NOT NULL, `cpf` INT(11) NOT NULL, `email` VARCHAR(45) NOT NULL, `password` VARC...
true
d1b2df5065d791677f48fc052569bed61376e870
SQL
bhavsarvishwa/DurhamCollegeStudentPortal
/sql/deliverable2_db.sql
UTF-8
762
2.796875
3
[]
no_license
DROP TABLE IF EXISTS customers; CREATE TABLE customers( phoneNumber VARCHAR(15) PRIMARY KEY, address VARCHAR(30) NOT NULL, name VARCHAR(30) NOT NULL ); ALTER TABLE customers OWNER TO db_user; INSERT INTO customers(phoneNumber, address, name) VALUES ('123-4567','Toronto','Eleanor'); INSERT INTO customers(phoneNum...
true
042e0dae9d02f9d02db51d94e91a19731b29cb63
SQL
momadison/eatDaBurger
/schema.sql
UTF-8
357
2.984375
3
[]
no_license
DROP DATABASE IF EXISTS burger_db; CREATE DATABASE burger_db; USE burger_db; -- Create the table plans. CREATE TABLE burgers ( id int NOT NULL AUTO_INCREMENT, burger VARCHAR(255) NOT NULL, devoured BOOLEAN NOT NULL, PRIMARY KEY (id) ); -- Insert one set of records INSERT into burgers (burger, devoured) VALUES ('Bacon...
true
8d7d2d4e9957a8ef8894e5e8a496ed82339ff541
SQL
mituja/sda-db-programming
/jdbc-app/target/classes/scripts.sql
UTF-8
434
3.546875
4
[]
no_license
CREATE TABLE IF NOT EXISTS POSITION ( id INT AUTO_INCREMENT PRIMARY KEY, name VARCHAR(255) NOT NULL ); CREATE TABLE IF NOT EXISTS EMPLOYEE ( id INT AUTO_INCREMENT PRIMARY KEY, position_id INT NOT NULL, name VARCHAR(255) NOT NULL, surname VARCHAR(255) NOT NULL, hire_date D...
true
9fe685415bbbd2295d5246d78143696c2efe66d6
SQL
noahmelngailis/database-exercises
/3.11.More_Exercises.sql
UTF-8
4,305
4.21875
4
[]
no_license
--What languages are spoken in Santa Monica? SELECT LANGUAGE, Percentage FROM countrylanguage WHERE CountryCode IN ( SELECT CountryCode FROM city WHERE NAME = "Santa Monica") ORDER BY Percentage; -- How many different countries are in each region? SELECT region Region, count(region) num_countries FROM country G...
true
177d02d9e958f1d96247d179b720ab4b72b6a591
SQL
hwpwk/SQL
/1度に複数の文字列を削除する.sql
UTF-8
258
2.640625
3
[]
no_license
-- 例えば値の1つがNVARCHAR型の「5,700%」のようなカラムをNUMERIC型の「57.0」のような数値型に変換する SELECT  CAST(REPLACE(REPLACE([利益率], ',',''), '%', '') AS NUMERIC(25,1)) / 100 AS [利益率] FROM  tbl ;
true
7ea420d1cefd14832a0cc89bbf82a97149031346
SQL
neurotech/edumate-extensions
/sql/enrolment/counts-of-status-and-priority.sql
UTF-8
4,635
4.09375
4
[]
no_license
-- Counts of Status and Priority -- A list of all priority levels, how many future students are at what priority and with what status. WITH STATUS_PRIORITY_CAPTURE AS ( SELECT EXP_FORM_RUN, STUDENT_ID, GENDER.GENDER_ID, STUDENT_STATUS_ID, PRIORITY_ID, PRIORITY_ID AS "PRIORITY_ORDER" FROM ...
true
3c7ab9f7bf937146ea331952a31f16b1d1f9b502
SQL
dburdick/fhirbase
/test/jsonbext_spec.sql
UTF-8
1,462
2.671875
3
[ "MIT" ]
permissive
-- #import ../src/tests.sql -- #import ../src/jsonbext.sql jsonbext._is_array('[1,2]'::jsonb) => true jsonbext._is_array('"a"'::jsonb) => false jsonbext.json_get_in('{"a": 1}'::jsonb, ARRAY['a', 'b']) => ARRAY[]::jsonb[] jsonbext._is_array('[{"a":"b"}]'::jsonb) => true jsonbext._is_array('{"a":"b"}'::jsonb) => fa...
true
dac969c56784f5aa6436dec9fcfc1eff901981db
SQL
RandyllBearer/Portfolio
/CourseWork/Database Management Systems/Recitations/rec7/exampleProcedure.sql
UTF-8
1,037
3.71875
4
[]
no_license
--Function + stored procedure --FUNCTION --Must drop functions just like triggers --IN in first line defines a read only, cannot give size constraint to varchar2 --IS in second line begins our function/procedure --:= used to assign a value to a variable CREATE OR REPLACE FUNCTION compute_balance(c_ssn IN varchar2) ret...
true
ad2c109fb97ae5a076957d3f9130e814e4f7513c
SQL
MiraThakkar/Content-Management-System
/employee-tracker_db.sql
UTF-8
2,044
4.4375
4
[]
no_license
DROP DATABASE IF EXISTS employeeTracker_DB; CREATE DATABASE employeeTracker_DB; USE employeeTracker_DB; CREATE TABLE employee( id INT NOT NULL AUTO_INCREMENT, first_name VARCHAR(30) NOT NULL, last_name VARCHAR(30) NOT NULL, role_id INT NOT NULL, manager_id INT, PRIMARY KEY (id) ); CREATE TABLE rol...
true
b58e0cac57546b571f1ccb42d189f08f69f315b7
SQL
156420591/sql
/19_procudure.sql
UTF-8
770
3.171875
3
[]
no_license
--存储过程。它就相当于编程中的函数,它可以有变化和if,else,case等。 --- 例子参考的是http://www.cnblogs.com/chenpi/p/5136483.html --- 没有用书本的。 --实例1 : 创建存储过程(函数),计算两个数的和 -- ---------------------------- -- Procedure structure for `proc_adder` -- ---------------------------- DROP PROCEDURE IF EXISTS 'proc_adder'; DELIMITER ;; CREATE PROCEDURE 'proc_adde...
true
c8406e8e48ab0d081f1b87b54963e81b6dcbb64b
SQL
evnurm/project_manager_app
/sql/create_member.sql
UTF-8
222
3
3
[]
no_license
CREATE TABLE Member( project_id CHAR(8), user_id CHAR(6), PRIMARY KEY(project_id, user_id), FOREIGN KEY (project_id) REFERENCES Projects(project_id), FOREIGN KEY (user_id) REFERENCES Users(user_id) );
true
ace4d57772c0da6ad42f9bbfb5d5af0ce670ddac
SQL
FaithZX/mysql_jdbc
/mysqlJDBC07/db/test1.sql
UTF-8
3,419
3.265625
3
[ "Apache-2.0" ]
permissive
CREATE DATABASE test1; USE test1; SET FOREIGN_KEY_CHECKS=0; -- ---------------------------- -- Table structure for department -- ---------------------------- DROP TABLE IF EXISTS `department`; CREATE TABLE `department` ( `dep_id` int(11) NOT NULL AUTO_INCREMENT, `dep_name` varchar(50) NOT NULL COMMENT '部门名称', P...
true
6216fa2d3d6298b580aa47e237edcd1707c5e1f9
SQL
Neverous/ii-db13
/Lista 1/16.sql
UTF-8
308
3.1875
3
[]
no_license
-- 6 SELECT COUNT(DISTINCT kod_grupy) FROM grupa JOIN przedmiot_semestr USING(kod_przed_sem) JOIN przedmiot USING(kod_przed) JOIN uzytkownik USING(kod_uz) WHERE przedmiot.nazwa LIKE 'Logika dla informatyków' AND uzytkownik.nazwisko = 'Charatonik';
true
ec50389bd57e801971fc2707ef30ffb0cadb182f
SQL
Fly-76/ALB-POO
/data_shema/banquePHP.sql
UTF-8
4,042
3.765625
4
[ "MIT" ]
permissive
/*****************************************************************************/ /* Project S16 ; Updated database schema for the bank application */ /* */ /*****************************************************************************/ ...
true
0e3197b53c21ffa6dbf5dbfc7801bb8faeb9cd77
SQL
S6infoTinderRoulette/Database
/SQL/CreateDB.sql
UTF-8
21,244
3.4375
3
[]
no_license
/*==============================================================*/ /* DBMS name: PostgreSQL 8 */ /* Created on: 2018-10-30 09:00:43 */ /*==============================================================*/ SET SCHEMA 'tinderroulette'; /*===================...
true
1dc40ab6fc1f465b4a0508cff0fd72daf7e931de
SQL
prd-dahal/sem4_lab_work
/database/lab4_sqlfile.sql
UTF-8
2,243
4.34375
4
[]
no_license
use lab2; show tables; desc employees; desc offices; desc customers; desc orderdetails; desc orders; select * from orders where status='Shipped'; desc orderdetails; -- 1. Find the product name and product vendor information for orders made by customer number 103. select p.productName,p.productVendor from products p, or...
true
d467a4577d54c713fbff893078941c1fc07de1f7
SQL
xyrholl/OracleStudy
/example004.sql
UTF-8
10,973
4.9375
5
[]
no_license
-- 문제1) emp 테이블에서 kochhar의 급여보다 많은 사원의 정보를 사원번호, 이름, 담당 업무, 급여를 출력하라. SELECT employee_id, last_name, job_id, salary FROM employees WHERE salary > (SELECT salary FROM employees WHERE last_name = 'Kochhar'); -- 문제2) emp테이블에서 급여의 평균보다 적은 사원의 정보를 사원번호, 이름, 담당 업무, 급여, 부서번호를 출력하여라. SELECT employee_id, last_name, job_id, sal...
true
2e1f1b0a0dd2799ff7c3c076daf75aaf236cb0d1
SQL
DataScientists/OccIDEAS
/data_migration/createviews.sql
UTF-8
2,808
3.96875
4
[ "MIT" ]
permissive
DROP VIEW IF EXISTS ModuleRule; CREATE VIEW ModuleRule AS SELECT concat(m.idNode, ':',nr.idRule, ':',r.agentId, ':',n.idNode) as primaryKey, m.idNode as idModule, m.name as moduleName, nr.idRule, r.level as ruleLevel, r.agentId as idAgent, a.name as agentName, n.idNode, n.number as nodeNumber FROM Node n ...
true
b200d16909f00ba7c50d3f498941a33d7da0dab1
SQL
vinicius-vasconcelos/tecnicoInformaticaSenac
/UC_4/MER/aula_6/sala_v3_atividades.sql
UTF-8
3,723
3.34375
3
[]
no_license
/*ATIVIDADES*/ INSERT INTO alunos VALUES (null, 'Mané', '1998-05-01', '18997606666', '101434'), (null, 'Pelé', '2001-02-22', '18997607777', '101435'), (null, 'josé', '1996-01-13', '18997608888', '101436'), (null, 'Joséfina', '1998-05-23', '18997609999', '10143...
true
10296e2abe73947463e11484d64f2a6b06508340
SQL
Rayeeskha/mlm-binary-project-ci4
/mlmsoftware.sql
UTF-8
6,735
2.78125
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 5.1.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Nov 04, 2021 at 07:15 PM -- Server version: 10.4.21-MariaDB -- PHP Version: 8.0.11 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIE...
true
e72aba1ff5a652e2db09bc6669a886c939c55e65
SQL
Farfallaa/major-assignment
/data/procedures.sql
UTF-8
2,106
4.25
4
[]
no_license
/* EDIT THIS FILE SO THAT IT CONTAINS PROCEDURES WHICH CAN BE IMPORTED INTO YOUR MYSQL SCHEMA You will need to have sufficent procedures to facilitate menu options 1 to 6 Informaiton on the correct formation of procedures can be found here Note: do not use the key words "BEGIN" and "END" as they are not recogni...
true
3b08208e39a17d3b5af9beda167833d7c05eccc9
SQL
ahfpca/CD_Python_The_Wall
/wall_queries.sql
UTF-8
4,200
3.46875
3
[]
no_license
USE the_Wall_DB; -- SELECT * FROM messages; # Dummy Post Records -- INSERT INTO messages (user_id, user_msg, created_at, updated_at) VALUES (1, 'As with bootstrap’s own plugins, datepicker provides a data-api that can be used to instantiate datepickers without the need for custom javascript. For most datepickers, si...
true
d4fa07d3d4452eb7f704693fe7f9cd1e6ead42e9
SQL
RahulValupadasu/Smart-Mart
/project.sql
UTF-8
6,066
3
3
[]
no_license
CREATE DATABASE IF NOT EXISTS `project`; USE `project`; -- MariaDB dump 10.17 Distrib 10.4.10-MariaDB, for Win64 (AMD64) -- -- Host: localhost Database: project -- ------------------------------------------------------ -- Server version 10.4.10-MariaDB /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SE...
true
69d9cc03188372e2251cd8cd5658b700af77668a
SQL
NDK2509/MySQL_Animal_Rescue_Center
/Animal_Rescue_Center/Query_Ani_rescue_center.sql
UTF-8
2,070
4.15625
4
[]
no_license
use Animal_Rescue_Center; -- --------------------Some example for queries------------------------- -- ------------------------Rescued_animal--------------------------- # Number of animal of each kind select K.ani_kind, count(R.ani_ID) as num_of_ani from kinds_animal as K left join rescued_animal as R on K.ani_ID = R.a...
true
8f7781cd8664929f2df14ed7b2e4f67f8b7f3774
SQL
CUBRID/cubrid-testcases
/sql/_27_banana_qa/issue_9830_drop_cascade_constraints/cases/_002_fk_action2.sql
UTF-8
787
4.28125
4
[ "BSD-3-Clause" ]
permissive
--test fk referential action: on delete restrict, composed pk CREATE TABLE a_tbl ( id INT NOT NULL DEFAULT 0, name VARCHAR(20) NOT NULL, phone VARCHAR(10), CONSTRAINT pk_idx PRIMARY KEY(id, name) ); CREATE TABLE b_tbl ( ID INT NOT NULL, name VARCHAR (10) NOT NULL, CONSTRAINT pk_idx PRIMARY KEY (id), C...
true
7ea35e520434dda9010e4098c4c4819dc3c03ccd
SQL
dmytro-bilokha/xmbt
/xmbt-main/src/main/resources/db-script/V0.0.1__Create_tables.sql
UTF-8
580
2.796875
3
[ "Apache-2.0" ]
permissive
CREATE TABLE scheduled_message ( id BIGINT NOT NULL AUTO_INCREMENT , schedule_time TIME NOT NULL , week_days TINYINT NOT NULL , next_datetime DATETIME NOT NULL , request_id BIGINT NOT NULL , request_sender VARCHAR(120) NOT NULL , request_receiver VARCHAR(120) NOT NULL , sender_address VARCHAR(120) NOT NULL , message_te...
true
3cb1c8245f5adc3029259bf0a45b46f3ad4cfeec
SQL
vvEii/lightBnB
/1_queries/5_all_my_reservations.sql
UTF-8
549
4.0625
4
[]
no_license
--show all reservations for user with id = 1 SELECT properties.id AS id, title, cost_per_night, start_date, AVG(rating) AS average_rating FROM reservations JOIN properties ON property_id = properties.id JOIN property_reviews ON reservations.id = property_reviews.reservation_id WHERE end_date < now() ::date AND reserv...
true
e79a1b000e7c582996d3916c8bac9384e76543d8
SQL
AnitaAnnaStephen/COMP606A2
/assignment2.sql
UTF-8
8,960
3.171875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.9.0.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Nov 04, 2019 at 10:23 AM -- Server version: 10.3.16-MariaDB -- PHP Version: 7.3.7 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @O...
true
4a8a84a6ecc93b47815624c4bc94a6278e83e2ee
SQL
Velsu/SQL
/day1.sql
UTF-8
1,763
4.28125
4
[]
no_license
pragma foreign_keys = on; CREATE TABLE album ( id INTEGER PRIMARY KEY AUTOINCREMENT, title VARCHAR(128) NOT NULL, release_year INTEGER ); CREATE TABLE artist ( id INTEGER PRIMARY KEY AUTOINCREMENT, name VARCHAR(128) NOT NULL ); CREATE TABLE track ( id INTEGER PRIMARY KEY AUTOINCREMENT, title ...
true
57edbebcf33ff1f8b9d335a87ef33f80fe9a2a91
SQL
tyomik-mnemonic/geo_data_tricks
/parametric.sql
UTF-8
991
3.28125
3
[]
no_license
--SELECT ogc_fid,id, -- CASE -- WHEN %zoom%<5::integer THEN ST_SimplifyPreserveTopology(wkb_geometry, 24::double precision) -- WHEN %zoom%<8 and %zoom%>4::integer THEN ST_SimplifyPreserveTopology(wkb_geometry, 48::double precision) -- ELSE wkb_geometry -- end wkb_geometry --FROM --alter table input.fed_city_and_re...
true
e6ce06ec569771ece835a8d8de0dde1231fcfdfa
SQL
PappLevente/sql-project
/task-6.sql
UTF-8
337
4.15625
4
[]
no_license
SELECT company_name, COUNT(orders.order_id) AS orders, STRING_AGG(cast(orders.order_id AS VARCHAR), ',') AS order_ids FROM customers JOIN orders ON customers.customer_id = orders.customer_id WHERE orders.ship_country = 'USA' GROUP BY customers.company_name HAVING COUNT(orders.order_id) < 5 ORDER BY COUNT(order...
true
bed0eea685dfd1ba7717747377ce53127ce83ee9
SQL
ProjectGroupP2/VirtualClassroom
/Tables/subjectdetails.sql
UTF-8
1,354
3.078125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 3.4.5 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Apr 07, 2015 at 06:30 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
e514effe9a2679d576a4f4075063f65b35329e15
SQL
masterofpubbets/top_sql_db
/sewa/PIPING.sp_ValidateNewIsos.sql
UTF-8
2,674
3.0625
3
[]
no_license
ALTER PROC PIPING.sp_ValidateNewIsos AS -- Unknown Line SELECT 'Unknown Line' AS [Staging Status], PIPING.tblIsos_temp.PDSLINEID AS [Line KKS],PIPING.tblIsos_temp.iso AS ISO,PIPING.tblIsos_temp.systemKKS AS [System KKS],PIPING.tblIsos_temp.bore AS Bore, PIPING.tblIsos_temp.designArea AS [Design Area],PIPING.tbl...
true
f380b1861a52ce5b6347e8f6efe3ebfd49c5bd1c
SQL
mohantyabhijit074/Hotel-Bidding-System
/src/components/api/requestsTrigger.sql
UTF-8
287
3.015625
3
[]
no_license
create trigger update_requestsHotels_on_request after insert on requests begin insert into requestsHotels (requestId, hotelId) select requestId, id from requests, hotels where requestId = new.requestId and id = (select id from hotels where locationId = new.localityId); end
true
8dddfbde81b02e5883421a766a7b3e01bdb3c980
SQL
wu6660563/framework
/WebRoot/sql/sql.sql
UTF-8
3,192
2.890625
3
[]
no_license
/* SQLyog Community v11.01 (32 bit) MySQL - 5.1.55-community : Database - opencart_testing ********************************************************************* */ /*!40101 SET NAMES utf8 */; /*!40101 SET SQL_MODE=''*/; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OL...
true
d54c4d8c7d0d2eaa47b2c814f63ad98f4281391c
SQL
MustafizurRU/Database-Management-System
/SQL/Discu_1/pb1.sql
UTF-8
1,112
3.640625
4
[]
no_license
use pubs --1 select * from sysobjects select Name from sysobjects where xtype ='u' --2 select * from authors select au_lname,state from authors select * from authors where state='ca' select * from authors where au_lname='white' and state='ca' --Task-1 select * from titles select * from titles whe...
true
4e9cb4b710f824c83ae17080bb9859135c436068
SQL
SnowyWolf7/Archangel
/Site/Users.sql
UTF-8
367
2.515625
3
[]
no_license
create table users( userID int(1) not null auto_increment, username varchar(40) not null, password varchar(30) not null, primary key (userID) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=5; insert into users (userID, username, password) values (1,'nergigante@gmailcom','Omae'), (2,'thelegend27@hotmail.com', 'Wa'...
true
c789ec00b8bde93b1af3aef0296d986b5ee61839
SQL
nuaa/spark-streaming-kafka-template
/sql/kafka_offset.sql
UTF-8
1,081
3.234375
3
[]
no_license
/* Navicat Premium Data Transfer Source Server : 1 Source Server Type : MySQL Source Server Version : 80011 Source Host : localhost:3306 Source Schema : test Target Server Type : MySQL Target Server Version : 80011 File Encoding : 65001 Date: 17/12/2019 15:05:12 */ ...
true
96ddda19bb4c1b54ef329cda98f1609263f5b4f0
SQL
SosaToledo/elrapidothinco
/thinkinc_transporte-24-8-2020.sql
UTF-8
40,193
2.671875
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.9.5 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3306 -- Generation Time: Aug 24, 2020 at 10:10 PM -- Server version: 10.0.38-MariaDB-cll-lve -- PHP Version: 7.3.6 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!4...
true
8ab4346d5165d4defa0ae6cc66626b4514241ca7
SQL
biblelamp/SQLExercises
/LightComp/elza_delete_template_by_fund.sql
UTF-8
107
2.6875
3
[]
no_license
DELETE FROM arr_output_template WHERE output_id IN (SELECT o.output_id FROM arr_output o WHERE o.fund_id=2)
true
a884e79b34e665e8e0730dd8f2000f15aca1e250
SQL
JohnathanALves/Siagri-ERP-Database
/Vendas-ver1.0.1.sql
UTF-8
2,999
3.203125
3
[]
no_license
select NF.CODI_EMP, NF.CODI_TRA, TR.RAZA_TRA, TR.CGC_TRA, case when ( nf.PROP_PRO is null ) then mu.ESTA_MUN else mu1.ESTA_MUN end as ESTA_MUN, case when ( nf.PROP_PRO is null ) then mu.DESC_MUN else mu1.DESC_MUN end as DESC...
true
d0bb0e3ba7ef2600ebf15120b16e47a2d667786e
SQL
BTMichalowicz/E-Commerce
/Ben-SQL/insertion.sql
UTF-8
4,773
3.28125
3
[]
no_license
INSERT INTO Customer VALUES(1, "Ben", "Michalowicz", "b@gmail.com", 2019612280, "102 Spring Valley Road"); INSERT INTO Customer VALUES(2, "Praveen", "Tripathi", "bestProf@yahoo.com", 1234567890 ,"park Ridge New Jersy, 12"); INSERT INTO Customer VALUES (3, "Jack", "Sparrow", "vq@vq.com", 9914343870, "Mike Mangini Lane...
true
c275827aa0cc8b8e17e60676ccfa009f5a95d083
SQL
Health-Union/dbt-xdb
/test_xdb/models/under_test/override_ref_with_swap_schema_test.sql
UTF-8
719
3.203125
3
[ "Apache-2.0" ]
permissive
-- depends_on: {{ ref('override_ref_test') }} {{config({ "tags":["exclude_bigquery", "exclude_bigquery_tests"], "pre-hook": [{"sql": "CREATE SCHEMA test_xdb_ref_schema_two;"}, "{{ xdb.swap_schema('test_xdb_ref_schema_one', 'test_xdb_ref_schema_two') }}"], "post-hook": [{"sql": "DROP SCHEMA...
true
86400aeaa7e655f88a334f3e8ee7b3bf150089e1
SQL
Llunch4w/AirPlane
/sql/insert.sql
UTF-8
1,573
2.609375
3
[]
no_license
create database common; use common; insert into takeOffPlace values ("","",""), ("湖南","长沙","黄花机场"), ("吉林","长春","龙嘉机场"), ("江苏","南京","禄口机场"), ("广东","广州","白云机场"), ("湖北","武汉","天河机场"), ("四川","成都","双流机场"), ("辽宁","大连","周水子机场"), ...
true
f897bf251216e0cf5fead678e42b9d3e10ba4e54
SQL
iandrosov/Food-Bank
/datasets/sample.sql
UTF-8
1,492
2.515625
3
[]
no_license
BEGIN TRANSACTION; CREATE TABLE "Account" ( sf_id VARCHAR(255) NOT NULL, "Name" VARCHAR(255), parent_id VARCHAR(255), PRIMARY KEY (sf_id) ); INSERT INTO "Account" VALUES('0015D00000dIyxEQAS','Socrates Cafe',''); INSERT INTO "Account" VALUES('0015D00000dIypGQAS','Fort DeSoto shelter',''); INSERT INTO "Account" VA...
true
a16080e0bc5052df148bd3837878b77351890b8c
SQL
douglasrz/SiGORB
/biblioteca.sql
UTF-8
6,709
3.328125
3
[]
no_license
-- MySQL Script generated by MySQL Workbench -- 11/27/16 02:24:27 -- Model: New Model Version: 1.0 -- MySQL Workbench Forward Engineering SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0; SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0; SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITION...
true
84e726299f28502cd9a320e6316a1d46ced68dbe
SQL
brianjeong-lab/dgk_kb_lookml6
/mart/keyword_list.sql
UTF-8
1,129
3.703125
4
[]
no_license
# for bank INSERT INTO `kb-daas-dev.mart_200723.keyword_list` ( TYPE, ID, CHANNEL, S_NAME, SB_NAME, WRITE_DAY, KEYWORD ) SELECT 1 AS type , A.ID AS id , A.CHANNEL AS channel , A.S_NAME AS s_name , A.SB_NAME AS sb_name , CAST(FORMAT_DATE('%Y%m%d', DATE(A.WRITESTAMP, 'Asia/Seoul')) as INT64) as day , K...
true
7f797084599660788c00bcfe50d161178b70ea81
SQL
gfis/joeis-lite
/internal/fischer/sql/sqrtext.sql
UTF-8
495
2.578125
3
[ "Apache-2.0" ]
permissive
-- Patches for sqrtext -- @(#) $Id$ -- 2021-06-07, Georg Fischer UPDATE seq4 SET offset1=1, parm3= 1 WHERE aseqno IN ('A079280','A104268','A137591','A230122'); UPDATE seq4 SET offset1=2, parm3= 2 WHERE aseqno IN ('A059348','A152173'); UPDATE seq4 SET parm3=-1 WHERE aseqno IN ('A137398'); UPDATE seq4 SET offs...
true
43b19082ab5134d665640f0b2b1117d92503ca13
SQL
Beaver-G5c/APP-isep-2017-groupe-5c
/type_device.sql
UTF-8
1,469
3.125
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 : lun. 22 jan. 2018 à 14:01 -- Version du serveur : 5.7.19 -- Version de PHP : 5.6.31 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SE...
true
392227ad453f6a737390e1934891a534b3dbaecf
SQL
stancu-mihai/BDproject
/Snippets/LIMIT no of rows.sql
UTF-8
120
2.703125
3
[]
no_license
select * from employees WHERE rownum <= 3 order by employee_id; SELECT * FROM EMPLOYEES WHERE ROWNUM=1 --SELECT ONE
true
0ef54e2855f0775a8b2dcf7c76f210c38afe9fe8
SQL
LetUsWriteCode/CVDatabase
/CVDatabase/Scripts/Lookup.StatementType.sql
UTF-8
341
3.390625
3
[]
no_license
CREATE TABLE #StatementType ( StatementType NVARCHAR(100) ); INSERT INTO #StatementType VALUES ('Personal Statement'); INSERT INTO #StatementType ( StatementType ) SELECT src.StatementType FROM #StatementType AS src LEFT JOIN Lookup.StatementType AS tgt ON src.StatementType = tgt.StatementType WHERE tgt.State...
true
ff81da5980424c3f27eb763b1756da30086d94aa
SQL
ylgn/ProjetWebServeur
/tripmylife (1).sql
UTF-8
160,921
3.109375
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 : ven. 09 mars 2018 à 09:31 -- Version du serveur : 5.7.19 -- Version de PHP : 5.6.31 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SE...
true
53f7a312de5bb5a0b46a7e87150eaacb117fff1d
SQL
rakshak1010/Fill_Red
/DB/bloodbank.sql
UTF-8
7,071
3.28125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Nov 26, 2018 at 10:54 PM -- Server version: 10.1.33-MariaDB -- PHP Version: 7.2.6 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
true
d7abf930c70985a6ea1853d054da046e0c848026
SQL
NicolaCrawshaw/03-exercise-sql-manipulations
/Part-B/5-alter-table.sql
UTF-8
255
2.59375
3
[]
no_license
-- -- Task: It would be useful to know when reviews were recorded. So, write a -- SQL statement to alter the reviews table to add a 'review_date' -- column which should take a 'date' data type. -- ALTER TABLE reviews ADD review_date DATE;
true
69e14f06c588f9038621c39739060c89607049d4
SQL
fzapfack/x-datascience
/9-database-management/rdbms_intro/Homework/Parts-Suppliers/q9.sql
UTF-8
154
3.625
4
[]
no_license
SELECT DISTINCT S.sname, count(C.pid) FROM suppliers S, catalog C WHERE S.sid = C.sid GROUP BY S.sid HAVING count(C.pid) >=2 ORDER BY S.sname;
true
39b1b6d00aa584b0a6db978244c4a74f93782190
SQL
tomilidzons20/projekt_zaliczeniowy_bd
/pkt4/wszystkie widoki.sql
UTF-8
2,664
4.28125
4
[]
no_license
/*Wyswietla czolg i jego silnik dla silnikow o mocy powyzej sredniej */ CREATE VIEW widok1 AS SELECT czolgi.nazwa_czolgu, silnik.nazwa_silnika, silnik.moc_silnika FROM czolgi INNER JOIN silnik ON czolgi.silnik_czolgu = silnik.id_silnika WHERE moc_silnika > (SELECT AVG(moc_silnika) FROM silnik); /*Wyswietla czolg i jeg...
true
1b793862c85c6408738edb6c680c42fdb731f8ba
SQL
gkrait/Courses
/Database/TP-1/scripts-1.sql
UTF-8
1,258
3.890625
4
[]
no_license
/* A) Creating and deleting database */ create database Company; # Creating the database Company use Company; #Using the database Company drop database Company; # Deleting the database Company drop database if exists Company; /* B) Tables */ # 1 )  Creating a table (without a primary key ) create ...
true
a34866613be0f95829f2cd24276796f4e14707ec
SQL
ChristopherDinh/side-work
/loyalty.sql
UTF-8
980
3.5
4
[]
no_license
DROP DATABASE IF EXISTS loyalty; CREATE DATABASE loyalty; USE loyalty; CREATE TABLE Membership ( ID INT PRIMARY KEY AUTO_INCREMENT, Number INT NOT NULL Unique, FirstName VARCHAR(25) NOT NULL, LastName VARCHAR(25) NOT NULL, Address VARCHAR(50) NOT NULL, City VARCHAR(30) NOT NULL, State VARCHAR(25) NOT NULL, Zip VARCHAR...
true
9d99570e93197206c979e2b4a6b07b0ef3f59579
SQL
Ghz4070/symfony_api_section4
/symfony_api_section4.sql
UTF-8
48,732
2.890625
3
[]
no_license
INSERT INTO `nationalite` VALUES (1, 'Russe'); INSERT INTO `nationalite` VALUES (2, 'Espagnol'); INSERT INTO `nationalite` VALUES (3, 'Américain'); INSERT INTO `nationalite` VALUES (4, 'Français'); INSERT INTO `nationalite` VALUES (5, 'Irlandais'); INSERT INTO `nationalite` VALUES (6, 'Britannique'); INSERT INT...
true
766c1ee902ebdb0b9dc22b9f5898e0c8d39d5c86
SQL
Chandrashekarrao/spring-microservices
/account-service/src/main/resources/data.sql
UTF-8
308
2.625
3
[]
no_license
--CREATE TABLE customer_account(Customer_ID INT, -- Account_Number INT PRIMARY KEY); insert into customer_account(Customer_id,account_number) values(10001,2000),(10001,2001),(10001,2002),(10001,2003), (10002,3000),(10002,3001),(10002,3002),(10002,3003), (10003,4001),(10003,4002),(10003,4003),(10003,4004);
true