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
55d9e6749be118db97e43d8c8b93ce4f6521bccc
SQL
todokku/streams-2
/sql/system/getUploadLimits.sql
UTF-8
707
4.09375
4
[ "MIT" ]
permissive
SELECT IFNULL(a.`id`, 0) as `account_id`, COUNT(DISTINCT r.`scope`) as `scopes` FROM `Tokens` t INNER JOIN `Account` a ON t.`account_id` = a.`id` INNER JOIN `AccountRoles` r ON a.`id` = r.`account_id` INNER JOIN `Roles` s ON r.`scope` = s.`scope` WHERE t.`is_deleted` = 'N' and s....
true
f015df23ba01d838bbc8dad9950f73ac1354700f
SQL
NadiaTahiri/INF3180_Laboratoire_E2015
/Lab/Lab7_sol/creParc.sql
UTF-8
1,565
3.390625
3
[]
no_license
DROP TABLE Segment; DROP TABLE Salle; DROP TABLE Poste; DROP TABLE Logiciel; DROP TABLE Installer; DROP TABLE Types; CREATE TABLE Segment ( seqSeg NUMBER(5), indIP VARCHAR2(11), nomSegment VARCHAR2(20) CONSTRAINT nn_nomSegment NOT NULL, etage NUMBER(2), CONSTRAINT pk_Segment PRIMARY KEY (seqSeg)); CR...
true
1d46fb3a538b6b3b973b9a5070a1c667662616b2
SQL
flywithmeLi/OraclePractice
/OraclePractice.sql
ISO-8859-7
3,793
3.28125
3
[]
no_license
/*w\*/ #drop table cocostudent; create table cocostudent ( sno varchar2(10) primary key not null, sname varchar2(20), sage number(2), ssex varchar2(5) ) /*?\*/ create table cocoteacher ( tno varchar2(10) primary key, tname varchar2(20) ) /*?\*/ create table c...
true
d5b012aa23f65d3c471a10ef7410865bfe7006b4
SQL
sdbs-uni-p/usage-of-not-replication
/sql-queries/query_08.sql
UTF-8
572
3.828125
4
[ "CC-BY-4.0" ]
permissive
-- counting the amount of user-defined keywords with keyTypes as (select key, case when (key in (select keyword from keywords where kclass in ('s','dollar'))) then 'standard keyword' when key = '$' then 'root object' when key like '\_\_\_%' then 'property name' when key similar t...
true
5207aeec07c3e989de5d902f2ea713180c899c09
SQL
olga-dorogan/JavaTraining
/JavaWeb/JavaEE__Hometasks/DepartmentWithEJB/src/main/resources/META-INF/sql/data-develop.sql
UTF-8
1,178
2.515625
3
[]
no_license
INSERT INTO department(id, description) VALUES (-1,'Department 1'); INSERT INTO department(id, description) VALUES (-2,'Department 2'); INSERT INTO department_group(id, name, course, DEPARTMENT_id) VALUES (-1, 'Group 1 (dep_1)', 1, -1); INSERT INTO department_group(id, name, course, DEPARTMENT_id) VALUES (-2, 'Group 2...
true
c32997d5d7b2c846d857252d5912144e4f0596bf
SQL
angel-utn/laboratorio3-20211c
/Semana 08/Solucion_2.4.sql
UTF-8
6,500
4.46875
4
[]
no_license
-- 6) Listado con ID, nombre y costo estimado de proyectos cuyo costo estimado sea menor al costo estimado de cualquier proyecto de clientes nacionales (clientes que sean de Argentina o no tengan asociado un país). select * from Proyectos where CostoEstimado < ( select Min(pr.CostoEstimado) from Proyectos as pr ...
true
365a53e53fc2b3f07cc3c82d33cb20282304da74
SQL
ruebush/bamazon
/schema.sql
UTF-8
620
3.421875
3
[]
no_license
DROP DATABASE IF EXISTS bamazon; CREATE DATABASE bamazon; USE bamazon; CREATE TABLE products ( item_id INTEGER AUTO_INCREMENT, product_name VARCHAR(255) NOT NULL, department_name VARCHAR(255) NOT NULL, price DECIMAL(10, 2) NOT NULL, stock_quantity INTEGER(10) NOT NULL, product_sales DECIMAL(10, ...
true
8cb12564307c952259ae8903eeb6ebecea3fb6d7
SQL
nuckle10curve/python_code
/python_coding/sql_3_C_running_total.sql
UTF-8
128
3.28125
3
[]
no_license
SELECT id,actual, (SELECT SUM(actual) FROM target_actual b WHERE b.id <= a.id) AS b FROM target_actual a
true
433583ca2eb77776e6fd52daaa42d38151357326
SQL
Pruthviraj98/TravelX
/train_reservation.sql
UTF-8
215,946
2.765625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1:3307 -- Generation Time: Jan 24, 2018 at 09:24 AM -- Server version: 10.1.19-MariaDB -- PHP Version: 5.6.28 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_S...
true
7263c06d8f6ee84e5b4daf09fe27a11d6796cea3
SQL
phoenix6561/goalert
/alert/queries.sql
UTF-8
596
3.578125
4
[ "Apache-2.0" ]
permissive
-- name: LockOneAlertService :one SELECT maintenance_expires_at notnull::bool AS is_maint_mode, alerts.status FROM services svc JOIN alerts ON alerts.service_id = svc.id WHERE alerts.id = $1 FOR UPDATE; -- name: RequestAlertEscalationByTime :one UPDATE escalation_policy_state SET force_escalation = TRUE WHERE ...
true
220b691822a36c699073c7f4211ca6ee7d9368d8
SQL
parkervoit/database-exercises
/order_by_exercises.sql
UTF-8
1,227
3.6875
4
[]
no_license
USE employees; -- 2 SELECT first_name, last_name, emp_no FROM employees WHERE first_name IN ('Irena','Vidya','Maya') ORDER BY first_name; -- 1st name is Irena Reutenauer, last is Vidya Simmen -- 3 SELECT first_name, last_name, emp_no FROM employees WHERE first_name IN ('Irena','Vidya','Maya') ORDER BY first...
true
4acb2a170c35e008386a44732c6ebd3436d30579
SQL
CommerceRack/backend-static
/ebay/sql/database01.sql
UTF-8
653
3.484375
3
[ "MIT" ]
permissive
--- last 10 categories for user/subuser pair ---DROP TABLE IF EXISTS `users`; ---CREATE TABLE `users` ( --- `id` int(10) NOT NULL PRIMARY KEY AUTO_INCREMENT, --- `username` varchar(64) NOT NULL default '', --- `subuser` varchar(64) NOT NULL default '', --- `create_timestamp` TIMESTAMP NULL ---) ENGINE=MyISAM DEFAUL...
true
9c666e13663508251aeeb00288605ebb4901529e
SQL
mandy331/sql-practicing
/[#184]Department Highest Salary.sql
UTF-8
1,567
4.40625
4
[]
no_license
/*184. Department Highest Salary Write a SQL query to find employees who have the highest salary in each of the departments. (must have department) Input: Employee +----+-------+--------+--------------+ | Id | Name | Salary | DepartmentId | +----+-------+--------+--------------+ | 1 | Joe | 70000 | 1 ...
true
fa1aebc2d070428f3160946032a966b664f6f02b
SQL
rafiq/codeWars
/aug2021/exists.sql
UTF-8
333
3.9375
4
[ "MIT" ]
permissive
SELECT * FROM departments WHERE EXISTS (SELECT price FROM sales WHERE price > 98) SELECT D.id, D.name FROM departments AS D WHERE EXISTS (SELECT * FROM sales AS S WHERE D.id = S.department_id AND S.price > 98) SELECT d.* FROM departments d WHERE EXISTS (SELECT 1 FROM sales s WHERE s.price>98 and s.departm...
true
ea4c934a3e6892ea8e3bd4a32b3a20d842e3a148
SQL
Bootz/IceCreamdb
/arctic_world/ai_threattospellid.sql
UTF-8
3,387
2.609375
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : arcticdev Source Server Version : 50509 Source Host : localhost:3306 Source Database : arctic_world Target Server Type : MYSQL Target Server Version : 50509 File Encoding : 65001 Date: 2012-04-04 17:26:19 */ SET FOREIGN_KEY_CHECKS=0; ...
true
341b35000ee0bebe1b25a18916efecff4d74bcc1
SQL
mikestevenson86/SQL-Repository
/Mike S Queries/Archives/00 Archive 2014/11 November/Citation Phone Numbers.sql
UTF-8
339
2.953125
3
[]
no_license
SELECT Name, telephoneNumber, Department, Title FROM OPENQUERY( ADSI, 'SELECT Name, TelephoneNumber, Department, title FROM ''LDAP://CITATION/ DC=citation,DC=co,DC=uk'' WHERE objectCategory = ''Person'' AND objectClass = ''user''') WHERE telephoneNumber is not null and telephoneNumber <> 'Leaver' ORDER...
true
8435b27c01d1f72c4a4adc2352c19be95dbced72
SQL
Mdasker/pos
/POS.sql
UTF-8
4,148
3.234375
3
[]
no_license
-- MySQL dump 10.13 Distrib 8.0.18, for Win64 (x86_64) -- -- Host: 127.0.0.1 Database: pos -- ------------------------------------------------------ -- Server version 8.0.18 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!4010...
true
d7251d63712855b8892c59b58ce8c8271da062a4
SQL
RafaelP9113/SQL_Server
/Scripts/Acerto de CFOP Quantitativo.sql
UTF-8
819
2.640625
3
[]
no_license
--SELECT * UPDATE LOJA_NOTA_FISCAL SET NATUREZA_OPERACAO_CODIGO = '1913' --1913 5912 FROM LOJA_NOTA_FISCAL WHERE NF_NUMERO IN ('000001814') AND SERIE_NF = '4' AND CODIGO_FILIAL = '000144' --SELECT * UPDATE LOJA_NOTA_FISCAL_ITEM SET CODIGO_FISCAL_OPERACAO = '1913' FROM LOJA_NOTA_FISCAL_ITEM WHERE NF_NUMERO IN ('0000...
true
003d2ea17e9348bb44f5aa19d988987afacb6c41
SQL
aspineon/GTC-all-repo
/xo-opportunity-trader/src/main/resources/db/opportunity-trader/migrations/V1_34__StaticFunds.sql
UTF-8
717
3.3125
3
[ "MIT" ]
permissive
CREATE TABLE static_wallet ( id INT(11) PRIMARY KEY AUTO_INCREMENT NOT NULL, client_name VARCHAR(64) NOT NULL, currency VARCHAR(64) NOT NULL, balance NUMERIC(40, 20) NOT NULL, status_updated TIMESTAMP ...
true
6db1fd531feeed2adaba13dd2d23409c711529b8
SQL
palutin53/CopyCat
/SQL/SP_Upd_Credenciales.sql
UTF-8
280
2.71875
3
[]
no_license
DROP PROCEDURE IF EXISTS Actualiza_PASS; DELIMITER // CREATE PROCEDURE Actualiza_PASS(ID_Empleado INT, NuevoPass VARCHAR(25), Llave VARCHAR(5)) BEGIN UPDATE usuario SET Pswd_Usuario = AES_ENCRYPT(NuevoPass,Llave) WHERE Empleado_ID_Empleado = ID_Empleado; END// DELIMITER ;
true
62772965ad0295f78f286722f5a95e25152e3d38
SQL
jrovalino/data607wk5
/data607wk5.sql
UTF-8
637
3.390625
3
[]
no_license
#drop table fltbycity create table fltbycity ( id int not null, airline varchar(45), time_perf varchar(45), la_rpt int(10), phi_rpt int(10), sd_rpt int(10), sf_rpt int(10), sea_rpt int(10), Unique key (id) ); insert into fltbycity values (1, 'ALASKA', 'on time', 497, 221, 212, 503, 1841); select * from fltbycity; i...
true
aa387ab00fca8602653e0043f374eb33037adfb5
SQL
964918654/MySQL
/10-mysql数据库管理.sql
UTF-8
758
3.484375
3
[]
no_license
# 14-mysql数据库管理 CREATE DATABASE myemp; USE myemp; CREATE TABLE emp1( id INT, NAME VARCHAR(15) ); INSERT INTO emp1(id,NAME) VALUES(1,'Tom'); SELECT * FROM emp1; INSERT INTO emp1(id,NAME) VALUES(1,'张三'); #查看当前数据库的字符集 SHOW VARIABLES LIKE 'character%'; #显示数据库的字符集 SHOW CREATE DATABASE myemp; #显示表的字符集 SHOW CREATE ...
true
3f22798460f121a56c767626d80a784148b7965b
SQL
miths1108/PiGen
/codd-data-gen/resources/cdgclient/postgresOld/dkTpcdsProjQueries/query4_1_1.sql
UTF-8
174
3.15625
3
[]
no_license
select d_year from customer ,store_sales ,date_dim where c_customer_sk = ss_customer_sk and ss_sold_date_sk = d_date_sk and d_year >= 1900 group by d_year;
true
5415247d239ac5aca9d90a61c6a72b220b73658a
SQL
juanmafx/UTN
/111Mil/sql.sql
UTF-8
457
3.0625
3
[]
no_license
CREATE TABLE ramallo_tipos_DNI( id_tipo_doc int IDENTITY (1,1) NOT NULL, description varchar(10), CONSTRAINT _ramallo_pk_tipo_doc PRIMARY KEY (id_tipo_doc) ) create table ramallo_Personas ( documento int not null, nombre varchar(50), fecha_nac datetime, altura numeric (3,3), id_tipo_doc int, CONSTRAINT ramallo_pk...
true
84499b07834b356e4cb8dad95a14f3d30601dede
SQL
alex617180/Chat
/marlin.sql
UTF-8
3,276
3.375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.9.0.1 -- https://www.phpmyadmin.net/ -- -- Хост: 127.0.0.1:3306 -- Время создания: Ноя 02 2019 г., 16:38 -- Версия сервера: 8.0.15 -- Версия PHP: 7.3.9 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARAC...
true
645c900f5e96af2c37e1ee26a4fb1fde30b095ac
SQL
WZVCoST/ipv6
/vod/gyhx/gyhx.sql
UTF-8
6,755
2.859375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: 2018-04-22 17:35:46 -- 服务器版本: 10.1.19-MariaDB -- PHP Version: 5.6.28 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40...
true
1e7b4b2a7a35c015f3b285f37c568d6a4e2f7aea
SQL
Darova93/Training.NET
/3er Modulo/SQL/Examples/02. Select Samples.sql
WINDOWS-1252
4,330
4.5625
5
[]
no_license
use [inventario] /** SELECT Samples */ /*********************************************************** A. Using SELECT to retrieve rows and columns *************************************************************/ --This section shows three code examples. This first code example returns all rows (no WHERE clause is specif...
true
5a2a2a63222f64edb6edcf19a04e749c39ad1c82
SQL
RianLimeira/WebBasico
/bd_webbasico.sql
UTF-8
1,461
2.84375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.9.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1:3306 -- Tempo de geração: 12-Jun-2021 às 14:43 -- Versão do servidor: 8.0.18 -- versão do PHP: 7.4.0 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_...
true
775b6a17f2d5d3c3e344c8cc988401a77b4db0ca
SQL
soon14/isap-parent
/isap-dao/dao/1.CreateTable/t_role.sql
UTF-8
367
2.984375
3
[]
no_license
-- t_role DROP TABLE IF EXISTS t_role; CREATE TABLE t_role ( id bigint NOT NULL AUTO_INCREMENT, name varchar(128) NOT NULL COMMENT '角色名称', add_time timestamp NOT NULL default CURRENT_TIMESTAMP, update_time timestamp NOT NULL default CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, CONSTRAINT pk_t_role PRIMARY ...
true
34eff9ff1d8ae801562ed81fd606a761cd2f68a7
SQL
suneil/lnav
/test/simple-db.sql
UTF-8
305
2.796875
3
[ "BSD-2-Clause" ]
permissive
CREATE TABLE IF NOT EXISTS person ( id integer PRIMARY KEY, first_name text, last_name text, age integer ); INSERT INTO person (id, first_name, last_name, age) VALUES (0, "Phil", "Myman", 30); INSERT INTO person (id, first_name, last_name, age) VALUES (1, "Lem", "Hewitt", 35);
true
90b767720b06c0e40236928c3c5e845b8d31224b
SQL
kpav33/GalaXQL-3.0
/19-Triggers.sql
UTF-8
262
3.265625
3
[]
no_license
/* Create a trigger which, when a new star is created, clears the hilight table and inserts the new star id to the hilight table. */ CREATE TRIGGER newStar AFTER INSERT ON stars BEGIN DELETE FROM hilight; INSERT INTO hilight (starid) VALUES (NEW.starid); END;
true
9a7288a696dfcca4caf4fe993cbf2598dfe3b1eb
SQL
craiggib/Tempo
/TEMPO.DB/dbo/Stored Procedures/EmployeeTimeSheetReport.sql
UTF-8
1,277
3.5
4
[]
no_license
CREATE proc [EmployeeTimeSheetReport] @tid int as SELECT dbo.timesheet.tid, dbo.timeentry.sunday, dbo.timeentry.monday, dbo.timeentry.tuesday, dbo.timeentry.wednesday, dbo.timeentry.thursday, dbo.timeentry.friday, dbo.timeentry.saturday, dbo.client.clientname, dbo.project.jobnumyear, dbo...
true
9f18fd7592567d9719acea501eee942d3053f316
SQL
kim123/InventorySystem
/WebRoot/scripts/procedures/CheckOut.sql
UTF-8
847
3.015625
3
[]
no_license
DELIMITER $$ CREATE DEFINER=`root`@`localhost` PROCEDURE `CheckOut`(in p_onduty_id int(11), in p_eloadDailyBalanceid int(11), in p_userid int(11), in p_totalcash decimal(22,2), in p_handovercash decimal(22,2), in p_endingbalglobe decimal(22,2), in p_endingbalsmart decimal...
true
22c37b226307ecb3990a8b9db0f29162005c5c0a
SQL
ub-digit/bibmet-red19
/title_sort_na.sql
UTF-8
1,493
3.796875
4
[]
no_license
/* PUBLICATION OUTPUT BASED ON GENDER */ SELECT prop.title, COUNT(prop.id) FROM ( SELECT p18.category as title, p.id FROM publications p JOIN publication_versions pv ON pv.id=p.current_version_id JOIN people2publications p2p ON p2p.publication_version_id=pv.id JOIN departments2people2publications d2p2p ON d2p2p....
true
6d0f14feddce3a58682668fb0c061515bda6157f
SQL
blingbilng/student
/ljx_student.sql
UTF-8
19,867
3.203125
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : 47.107.78.58_3306 Source Server Version : 50725 Source Host : 47.107.78.58:3306 Source Database : ljx_student Target Server Type : MYSQL Target Server Version : 50725 File Encoding : 65001 Date: 2019-06-01 11:58:11 */ SET FOREIGN_KEY_...
true
d88d31e245f6d91d303c7d2417a647601c420782
SQL
cristma/PersonalBlogPHP
/sql/post_category_rel.sql
UTF-8
449
3.640625
4
[]
no_license
CREATE TABLE `post_category_rel` ( `id` INT(10) NOT NULL AUTO_INCREMENT, `post` INT(10) NOT NULL, `category` INT(10) NOT NULL, FOREIGN KEY(`post`) REFERENCES `posts`(`id`) ON DELETE CASCADE, FOREIGN KEY(`category`) REFERENCES `categories`(`id`) ON DELETE CASCADE, PRIMARY KEY(`id`)); CR...
true
ed1cbbe191cf27387328d04b436c9a626faf901a
SQL
ysabelgarcia10/BootcampX
/1_queries/9_outer_join.sql
UTF-8
1,078
4.25
4
[]
no_license
SELECT students.name as student_name, email, cohorts.name as cohort_name FROM students FULL OUTER JOIN cohorts ON cohorts.id = cohort_id; -- 1. FROM students LEFT OUTER JOIN cohorts ON cohorts.id = cohort_id; -- 2. FROM students RIGHT OUTER JOIN cohorts ON cohorts.id = cohort_id; -- 3. FROM students FULL OUTER JOIN ...
true
b69bcce5f1dbcf5766589ee0422d6e3b54108062
SQL
afsys/ICMGR
/ohd_v2/install/kb.sql
UTF-8
1,642
3.15625
3
[]
no_license
CREATE TABLE `#PREF_kb_categories` ( `cat_id` int(11) NOT NULL auto_increment, `cat_parent_id` int(11) NOT NULL default '0', `cat_caption` varchar(100) NOT NULL default '', `cat_notes` varchar(255) NOT NULL default '', PRIMARY KEY (`cat_id`) ) TYPE=MyISAM; INSERT INTO `#PREF_kb_categories` VALUES (1...
true
4694bb92eb64fdb2ba08e8bb775d33657d3ef74a
SQL
shadow-27/Data-Modelling-and-Analysis
/Movie_catalog_Indexs.sql
UTF-8
1,369
3.609375
4
[]
no_license
---Indexes-------------- --1.For query searches regarding Movie title on original title of the movie Create Nonclustered Index [IDX_Title_title_original] on Title (title_original ASC) INCLUDE (title_english); --2.For query searches regarding movie of specific language Create Nonclustered Index [IDX_Movie_Character...
true
a59ba71f05c6f3adb2c7db540e02ba0a79b2a35f
SQL
heisedebaise/clivia
/clivia-weixin/src/main/resources/org/lpw/clivia/weixin/media/create.sql
UTF-8
773
3.25
3
[ "MIT" ]
permissive
DROP TABLE IF EXISTS t_weixin_media; CREATE TABLE t_weixin_media ( c_id CHAR(36) NOT NULL COMMENT '主键', c_key VARCHAR(255) NOT NULL COMMENT '微信key', c_app_id VARCHAR(255) NOT NULL COMMENT 'App ID', c_type VARCHAR(255) DEFAULT NULL COMMENT '类型:image-图片;voice-语音;video-视频;thumb-缩略图', c_name VARCHAR(255) DEFAULT ...
true
69676643f9c51b598113e23580f0797a0c41e219
SQL
NikkiE-Dev/holbertonschool-higher_level_programming
/0x0E-SQL_more_queries/9-cities_by_state_join.sql
UTF-8
227
3.296875
3
[]
no_license
-- Lists all cities contained in the database hbtn_0d_usa. -- Results must be sorted in ascending order by cities.id SELECT cities.id, cities.name, states.name FROM cities LEFT OUTER JOIN states ON cities.state_id = states.id;
true
406a7ae9ec3f6ca23ed005c643c63c84fa7807ff
SQL
CUBRID/cubrid-testcases
/sql/_17_sql_extension2/_02_full_test/_01_replace_insert_with_trigger/_02_insert_duplicate_update/cases/insert_update_011.sql
UTF-8
1,119
3.984375
4
[ "BSD-3-Clause" ]
permissive
--insert multiple rows. --trigger: 1) before update 2) after update --trigger action: insert. CREATE TABLE with_trigger(a int unique, b char(10), c int); INSERT INTO with_trigger VALUES (1, 'AAA', 1), (2, 'BBB', 2), (3, 'CCC', 3); SELECT * FROM with_trigger order by a; CREATE TABLE with_trigger2(a int unique, b cha...
true
6db4d809b1bc312e6ec568bec6a5b97c028f9a91
SQL
blankoslo/floq-db
/functions/projects_info_for_employee_in_period.sql
UTF-8
612
3.921875
4
[]
no_license
CREATE OR REPLACE FUNCTION public.projects_info_for_employee_in_period(employee_id integer, date_range text) RETURNS TABLE( id text, name text, active boolean, customer_id text, customer_name text ) LANGUAGE sql IMMUTABLE STRICT AS $function$ SELECT p.id AS id, p.name AS name, p.active AS active, c....
true
44e4ae95d9f8a06c32421ad7961874a06db99ac2
SQL
shengtudai2/mySqlClsaaCode
/第三次课/test.sql
GB18030
1,958
4.65625
5
[]
no_license
-- ûѡѧѧѧ select Sno from Student except select Sno from Course, SC where Course.Cno= SC.Cno and Cname='ѧ'; select Sno from Student where Sno not in (select Sno from Course, SC where Course.Cno= SC.Cno and Cname='ѧ'); -- ѯѡ˿γ̵ѧѧ select distinct Sno from SC; --1ſγ̵ѧƽɼ߷ֺͷ select avg(Grade), max(Grade...
true
03f1b729f325b8ab1d0d85ea5f9b831b55d0443d
SQL
anarch-ist/view_transport
/web_viewer/trunk/sbat.logist.ru/common_files/dao/SQL/patchsets/0021/main.sql
UTF-8
2,273
3.484375
3
[]
no_license
GRANT ALL ON TABLE clients TO 'andy'@'localhost'; CREATE PROCEDURE selectClients(IN `_startEntry` INT, IN `_length` INT, IN `_orderby` VARCHAR(255), IN `_isDesc` TINYINT(1), IN `_search` TEXT) BEGIN SET @searchString = CONCAT('%', _search, '%'); SELECT SQL_CALC_FOUND_ROWS...
true
b8ba4136d1e8d1f335a12c27270f35d0f51828ef
SQL
keipham/e-commerce_website_PL-SQL
/non-apex/api/PACKAGES/SOK_PRODUCT_PRICE_UTIL.sql
UTF-8
1,169
2.890625
3
[ "MIT" ]
permissive
CREATE OR REPLACE PACKAGE SOK_PRODUCT_PRICE_UTIL AS /* FUNCTION current_price ** Displays the current price of a given product ** returns the current price; */ FUNCTION get_current_price( val_product_id IN SOK_PRODUCT_PRICE_LU.product_id%TYPE) RETURN SOK_PRODUCT_PRICE_LU.product_price_amount%TYPE; ...
true
eed450adb76ac24e7c49ad9c2cf208ce95d50bb5
SQL
streamuj/wse_latest
/setup/sql/database.sql
UTF-8
45,794
3.375
3
[]
no_license
SET foreign_key_checks = off; DROP TABLE IF EXISTS `ci_sessions`; CREATE TABLE `ci_sessions` ( `session_id` VARCHAR(40) COLLATE utf8_general_ci NOT NULL DEFAULT '0', `ip_address` VARCHAR(45) COLLATE utf8_general_ci NOT NULL DEFAULT '0', `user_agent` VARCHAR(120) ...
true
b126378fd9ae0c22495ea6593c17a214cff0089c
SQL
gbouzioto/data_management_master_2020
/project_1/sql/2016_queries.sql
UTF-8
2,150
4.375
4
[]
no_license
-- a) An SQL query that counts all the comic books in your database. -- b) An SQL query that returns the average review score for the comic book with title “Feynman”. -- c) An SQL query that returns the ISBNs and titles for all books authored by “Alan Moore” (in any role). -- d) An SQL transaction that modifies a user’...
true
5cc7b13ddf078bd071e0b83b8bbf50f9411e97a4
SQL
MarceloShirayama/dtona
/src/ep05/model_churn/data_prep/train/criacao_abt.sql
UTF-8
1,014
3.953125
4
[]
no_license
DROP TABLE IF EXISTS tb_abt_churn; CREATE TABLE tb_abt_churn AS SELECT T2.*, T1.flag_churn FROM ( SELECT T1.dt_ref, T1.seller_id, min(coalesce(T2.vda, 1)) AS flag_churn FROM tb_book_sellers AS T1 LEFT JOIN ( SELECT strftime('%Y-%m',T1.order_approved...
true
b1d5effeb34c33fb2174bf92f2f9b1202b9d24e3
SQL
SupreethBaliga/DBMS_Assignment
/queries/MariaDB/populate.sql
UTF-8
736
3.578125
4
[]
no_license
CREATE DATABASE IF NOT EXISTS test; USE test; drop table if exists B; drop table if exists A; create table A( A1 integer primary key, A2 text ); LOAD DATA LOCAL INFILE '../../data/A-10000.csv' INTO TABLE A FIELDS TERMINATED BY ',' IGNORE 1 LINES; create table B( B1 integer primary key, B2 integer, ...
true
90c073f611f1666ba0118660bd1f23e5b4fb44ed
SQL
maxinspace/sql-pdp
/sql_3.sql
UTF-8
208
3.734375
4
[]
no_license
/* What teachers read only one course? */ SELECT teacher.name FROM teachers teacher INNER JOIN courses course ON course.teacher_id = teacher.id GROUP BY teacher.name HAVING COUNT(course.teacher_id) = 1;
true
2802131bc07ed85de3b5b48c891eaa42ac229ee7
SQL
richaru/Covid19-Database
/covid_19_ddl.sql
UTF-8
4,997
3.78125
4
[]
no_license
CREATE TABLE admin ( AdminId varchar(10) NOT NULL, LoginId varchar(10) DEFAULT NULL, PRIMARY KEY (AdminId), KEY LoginId (LoginId), CONSTRAINT admin_ibfk_1 FOREIGN KEY (LoginId) REFERENCES login (LoginId) ); CREATE TABLE assign ( AssignId int NOT NULL, PId int DEFAULT NULL, DId int DEFAULT ...
true
b2f193fbc6aa5d6fc86da897547e608250f74c12
SQL
Isaifo/MySql
/Introducao/Funcionarios.sql
UTF-8
660
3.390625
3
[]
no_license
CREATE DATABASE db_rh; USE db_rh; CREATE TABLE tb_funcionarios( id_funcionario INT NOT NULL AUTO_INCREMENT, nome VARCHAR(255), sobrenome VARCHAR(255), email VARCHAR(255), salario float, PRIMARY KEY (id_funcionario) ); INSERT INTO tb_funcionarios(nome,sobrenome,email,salario) VALUES ("Isadora","Fernandes","isa@gmail...
true
cf97ba2b10a4931c60ab73f13b46b332b8369f39
SQL
parkersullivan77/Travel-Planning-Web-Application
/server/src/test/resources/continent.sql
UTF-8
1,593
3.09375
3
[]
no_license
-- MySQL dump 10.13 Distrib 8.0.15, for Linux (x86_64) -- -- Host: 127.0.0.1 Database: cs314 -- ------------------------------------------------------ -- Server version 5.5.5-10.2.21-MariaDB /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RE...
true
c13df80d6aa8364c7de291b24266c48aecda8a8e
SQL
YeasirArafatZim/Mobile-Banking-System-Distributed-Database---Oracle-10g-
/Site 2/Main/mHistory.sql
UTF-8
844
3.4375
3
[]
no_license
SET VERIFY OFF; SET SERVEROUTPUT ON; CREATE OR REPLACE PROCEDURE mainHistory(id in main.m_id%TYPE, pass in main.mpass%TYPE) IS pass1 main.mpass%TYPE; BEGIN select mpass into pass1 from main where m_id = id; DBMS_OUTPUT.PUT_LINE('Type AccountNo Date Time Amount'); DBMS_OUTPUT.PUT_LINE('---- ...
true
01fcb453a49bf2fc20b8af1e692ddc4643271392
SQL
wikimedia/mediawiki-extensions-PollNY
/sql/poll_user_vote.sql
UTF-8
529
2.75
3
[]
no_license
CREATE TABLE /*_*/poll_user_vote ( pv_id int(11) NOT NULL PRIMARY KEY auto_increment, pv_poll_id int(11) NOT NULL default 0, pv_pc_id int(5) default 0, pv_actor bigint unsigned NOT NULL, pv_date datetime default NULL -- MW standard version for timestamps: --`pv_date` binary(14) NOT NULL default '' ) /*$wg...
true
30d84167a5c19cbebc3b1aaccebff4ba0323eaa6
SQL
hamidkreaa/MySql_projeckt
/material/create_genres_laender_load.sql
UTF-8
502
2.671875
3
[]
no_license
CREATE TABLE IF NOT EXISTS genres ( id INT(5) PRIMARY KEY AUTO_INCREMENT, genre VARCHAR(50) NOT NULL ); LOAD DATA INFILE "C:\\xampp\\htdocs\\dsql\\data\\genres.csv" INTO TABLE genres FIELDS TERMINATED BY "," LINES TERMINATED BY "\r\n"; CREATE TABLE IF NOT EXISTS laender ( id INT(5) PRIMARY KEY AUTO_...
true
8a5814ba59ffda96abc43468201f2f516b0ce063
SQL
yinyanlv/data-postback
/tasks/lac/sqls/question.sql
UTF-8
1,508
3.078125
3
[]
no_license
select LAC_Question.AutoId, LACQuestionCode as LacQuestionCode, replace(replace(replace(LACQuestionNote,char(10),' '),char(13),' '),char(9),' ') as LacQuestionNote, DeliverDate, ReceiveDate, DealerCode, DealerDescription, DeliverNumber, ResponsiblePerson, ResponsiblePersonCallNumber, WarehouseCode, LAC_Warehouse.Descri...
true
3ac2021239f4f6292e671395da243dc0300d1c84
SQL
mrkoushikroy/travel.com
/database/simla.sql
UTF-8
8,325
3.578125
4
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.3 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jan 03, 2021 at 10:52 AM -- Server version: 10.4.14-MariaDB -- PHP Version: 7.2.34 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIE...
true
7ecd2e203eda151449881bfd3d1581f86957678e
SQL
XariZaru/DynastyMS
/Dump20150801/maplesolaxia_events.sql
UTF-8
2,544
2.875
3
[]
no_license
-- MySQL dump 10.13 Distrib 5.6.24, for Win64 (x86_64) -- -- Host: localhost Database: maplesolaxia -- ------------------------------------------------------ -- Server version 5.6.17 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */...
true
3a2136ce3030f45e297820b840f2b41bbca9cd94
SQL
RamiroBenz/sistem-school
/escuela.sql
UTF-8
8,810
2.921875
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 3.5.1 -- http://www.phpmyadmin.net -- -- Servidor: localhost -- Tiempo de generación: 23-07-2020 a las 12:18:05 -- Versión del servidor: 5.7.14-log -- Versión de PHP: 5.4.3 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARA...
true
04f18b3685d015f741003603be6b3faf48b5b805
SQL
azimemory/oracle
/DB수업자료/h_object/b_PL_SQL.sql
UHC
14,838
4.1875
4
[]
no_license
1. PL/SQL (Procedural Language extension to SQL) - Ŭ ü Ǿִ (Procedual Language) - SQL , ó(IF), ݺó(LOOP, FOR, WHILE) Ͽ SQL 2. з PL/SQL (Anonymous Block) : ̸ ̶ Ҹ block . -- ν(Procedure) : ̸ ִ PL/SQL ܵ ǰų ٸ ν ȣǾ . -- Լ(Function) : Procedure Ǵ ϳ ȯ ο ̰ . -- TRIGGER : Ư ̺ INSERT, UPDATE,...
true
443e8a085483e26785cf3706c04c99b62ea8c73d
SQL
tanbinh123/WebBankingApp
/BankingApplication/src/main/resources/data.sql
UTF-8
876
2.78125
3
[]
no_license
insert into Customer(customer_id, first_name) values(1, 'Adam Smith'); insert into Customer(customer_id, first_name) values(2, 'Caroline Smith'); insert into Customer(customer_id, first_name) values(3, 'Junior Junior'); insert into Account(account_number, balance, cid) values(10001, 1200, 1); insert into Account(ac...
true
b2410e69457dab9069168631e8bdbdc7c24b196c
SQL
joaophi/FixIt
/fixit.sql
UTF-8
8,755
3.359375
3
[]
no_license
-- MySQL Script generated by MySQL Workbench -- Fri Nov 24 13:41:23 2017 -- 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='TR...
true
6354a54889ba392eccfb00000b09fcdbf8051872
SQL
dion-ricky/future-data-1
/scripts/etls/mart_customer_order_frequency.sql
UTF-8
374
3.703125
4
[]
no_license
TRUNCATE warehouse.mart_customer_order_frequency RESTART IDENTITY; WITH fact_order_clean AS ( SELECT * FROM warehouse.fact_order fo WHERE fo.order_status_sk NOT IN (-1, 2, 8) ) INSERT INTO warehouse.mart_customer_order_frequency ( user_sk, count_order ) SELECT foc.user_sk, count(DISTINCT foc.order_legacy_id) ...
true
5ad2472d39ff4431871ef5a51baf8097a5bcaaff
SQL
Dagon0577/sql-coverage-test-suite
/src/sqls/sql_cover/sqls_mixed/syntax/select_literals.sql
UTF-8
2,638
3.3125
3
[ "MIT" ]
permissive
#!default_db:schema1 # Created by zhaohongjie at 2019/1/15 #!share_conn #String Literals use schema1; select _latin1'a string'; #select _latin1"a string" COLLATE latin1_danish_ci; select _latin1'a string' COLLATE latin1_danish_ci; select _utf8'a' ' ' 'string'; #select 'a string' COLLATE utf8_general_ci; select 'a\'b', ...
true
67044645b0029cfe9bc441adf938ca3fee41dc77
SQL
awslabs/aws-well-architected-labs
/static/Cost/300_CUR_Queries/Code/End_User_Computing/workspaceswrid.sql
UTF-8
2,069
3.734375
4
[ "Apache-2.0", "MIT-0", "CC-BY-SA-4.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
-- modified: 2021-04-25 -- query_id: workspaces -- query_description: This query will provide unblended cost and usage information per linked account for Amazon WorkSpaces. -- query_columns: bill_payer_account_id,line_item_resource_id,line_item_unblended_cost,line_item_usage_account_id,line_item_usage_amount,line_item_...
true
d567f40250baa3add3dbbbb81b6bc3582ef4eb59
SQL
PEDSnet/pedsnetcdms
/pedsnetcdms/ddloutput/itwobtwocdm/I2B2_CDM_pgsql.ddl
UTF-8
7,519
3.015625
3
[ "BSD-2-Clause" ]
permissive
-- running migrations for 'I2B2 CDM'; CREATE TABLE alembic_version ( version_num VARCHAR(32) NOT NULL ); -- Running upgrade -> 1a2b15a3ecfc CREATE TABLE observation_fact ( provider_id VARCHAR(50) NOT NULL, nval_num NUMERIC(18, 5), confidence_num NUMERIC(18, 5), encounter_num NUMERIC(38, 0) NO...
true
4f18de9b6d23fb433bf0ab2fdd29d7181db2638d
SQL
byungsujeong/projectNo2
/all.sql
UTF-8
1,328
3.046875
3
[]
no_license
use project2; CREATE TABLE calendarlist( schedulenum int(11) auto_increment primary key, mid varchar(50), checkdate date, content varchar(100) ); CREATE TABLE members( mid varchar(20) primary key, pw varchar(20), name varchar(20), birth varchar(20), gender varchar(20), email varchar(20), te...
true
17791e0b5ad966e1abf5b12060c9dfb4b15ddb84
SQL
yunkangmin/sql
/Effective-SQL-master/IBM DB2/Chapter 01/Listing 1.004.sql
UTF-8
609
3.21875
3
[]
no_license
-- Ensure you've run Item04StructureAndData.sql in the -- Sample Databases folder and Listing 1.003.sql in order -- to run this example. SET SCHEMA Item04Example; SELECT AuthorID AS AuthID, AuthFirst || CASE WHEN AuthMid IS NULL THEN ' ' ELSE ' ' || AuthMid || ' ' END || AuthLast AS AuthName, Au...
true
341406055c6cd86d4f00b56b11d6d34b5d367751
SQL
mishazh23/EPUM_DB_MMF_2_4
/MMF_2_4/upgrade/upgrade001/create_DV.sql
UTF-8
1,414
3.578125
4
[]
no_license
DEFINE USER_NAME = &&1 DEFINE INDEX_TABLESPACE = '&&USER_NAME._IDX' ALTER TABLE "Box" ADD CONSTRAINT "Box_Product" FOREIGN KEY ("product_id") REFERENCES "Product"("id") ON DELETE CASCADE; ALTER TABLE "Box" ADD CONSTRAINT "Box_Type" FOREIGN KEY ("type_id") REFERENCES "Type_of_box"("id") ON DELETE CASCADE; create i...
true
1fc41df307d93b751b3a6813a2e2e17939cfa3a8
SQL
Wubuntu88/COSC540WebProgramming
/hw09MidtermProject/Query_5_2.sql
UTF-8
369
3.546875
4
[]
no_license
SELECT Client.fName, Client.lName FROM Client, Viewing, (SELECT propertyNo FROM PropertyForRent, (SELECT min(rent) minRent FROM PropertyForRent) CheapestRent WHERE PropertyForRent.rent=CheapestRent.minRent) CheapestProperty WHERE Client.clientNo=Viewing.clientNo AND Viewing.propertyNo=CheapestProperty.propertyN...
true
60862617a1cf15c4e47c3fd300794bb35446e96f
SQL
dan22000/heroku-example
/initdb_postgres.sql
UTF-8
488
2.625
3
[]
no_license
DROP TABLE IF EXISTS example; CREATE TABLE example ( id SERIAL PRIMARY KEY, name text DEFAULT NULL, description text DEFAULT NULL, author text DEFAULT NULL, language text DEFAULT NULL, code text DEFAULT NULL, tags text DEFAULT NULL ); INSERT INTO example (name, description, author, language, code, tags)...
true
d90e6e371ec7b91b70c9e0526881f5d23a8d6bee
SQL
uniqravi/CDMSConfig
/app/cmds_dump.sql
UTF-8
30,789
3.03125
3
[]
no_license
-- -- PostgreSQL database dump -- -- Dumped from database version 9.6.2 -- Dumped by pg_dump version 9.6.2 SET statement_timeout = 0; SET lock_timeout = 0; SET idle_in_transaction_session_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings = on; SET check_function_bodies = false; SET client_min...
true
127219a7c9afa5e61db072abe632c6ef593cf093
SQL
trashflash/BusRasporedRada2
/rasporedrada(4).sql
UTF-8
16,396
3.390625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.1.14 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Aug 26, 2018 at 01:53 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
d1eb2372b2f4d29c263ebccdcec123bbe452ea33
SQL
silence-do-good/stress-test-Postgres-and-MySQL
/dump/high/day11/select1049.sql
UTF-8
178
2.609375
3
[]
no_license
SELECT timeStamp, temperature FROM ThermometerOBSERVATION o WHERE timestamp>'2017-11-10T10:49:00Z' AND timestamp<'2017-11-11T10:49:00Z' AND temperature>=48 AND temperature<=99
true
cb9e4a475f63155d786ca30bec552c500677d180
SQL
LabKey/wnprc-modules
/WNPRC_EHR/resources/queries/study/Current Blood.sql
UTF-8
4,536
3.921875
4
[ "Apache-2.0" ]
permissive
/* * Copyright (c) 2010-2013 LabKey Corporation * * Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0 */ SELECT bq.*, cast(CASE WHEN bq.species = 'Marmoset' THEN round(bq.weight*0.15*60, 1) ELSE round(bq.weight*0.2*60, 1) END as numeric) AS ...
true
a1c3e5694644ef7ab9dbaace2ca09a62a3bfb29e
SQL
ShyamSundarShankar/SQL
/Exercises/WiseOwl - Setting Criteria using Where.sql
UTF-8
1,582
4.1875
4
[]
no_license
--List out events to do with Teletubbies or Andy Pandy-- Select EventName, EventDate from WorldEvents.dbo.tblEvent WHERE EventName LIKE '%Teletubbies%' OR EventName LIKE '%Pandy%'; --List all the events in the Love/Relationships category-- Select EventName, EventDate from WorldEvents.dbo.tblEvent Where CategoryID = 11...
true
b7bd2144e52c6eea0172390b02d8c021e7df387d
SQL
mmNalaka/next-prisma-graphql-typescript-starter
/db/migrations/20210108101815_permissions/migration.sql
UTF-8
425
3.671875
4
[]
no_license
-- CreateTable CREATE TABLE "permissions" ( "id" SERIAL, "code" TEXT NOT NULL, "label" TEXT NOT NULL, "created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, "updated_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, "user_id" INTEGER, PRIMARY KEY ("id") ); -- AddForeignKey ALTER TABL...
true
ba60a3ae5b142c154d287c2a90ac21cb7d446c9c
SQL
annabengel/sql
/Purchase Request System/PRS_DB.sql
UTF-8
6,225
3.28125
3
[]
no_license
Drop Database If Exists prs; Create Database prs; Use prs; Create Table User ( ID int primary key auto_increment, UserName varchar(20) not null unique, Password varchar(10) not null, FirstName varchar(20) not null, LastName varchar(20) not null, PhoneNumber varchar(12) not null, Email ...
true
c92d2954bd4b2d65c37aea812c935dccc0b7b4c5
SQL
micro-plat/wetoken
/modules/const/sql/mysql/wechat_app_info.sql
UTF-8
835
2.609375
3
[]
no_license
drop table wechat_app_info; create table wechat_app_info( appid varchar(64) not null PRIMARY KEY comment 'appid' , secret varchar(32) not null comment 'secret' , token varchar(32) not null comment 'token' , aes_key varchar(32) not null comment 'aes key' , update_time datetime default curren...
true
efe4cfffc54deb4dd67899740cd1ed7ba62d85c5
SQL
SuperTikuwa/docker_test
/mariadb/db/init.sql
UTF-8
1,817
3.515625
4
[]
no_license
use production_db; create table user_parameters( id int auto_increment not null primary key, hp int not null, updated_datetime datetime not null ); create table users( id int auto_increment not null primary key, name varchar(128) not null, email varchar(128) not null, password varchar(128)...
true
a515bda24045c40ee3b236036b814845a722c2fb
SQL
fmorales86mb/Programacion_3
/03-TP/DB/la_comanda_db_v1.0.sql
UTF-8
5,015
3.109375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 19-06-2019 a las 01:11:10 -- Versión del servidor: 10.1.38-MariaDB -- Versión de PHP: 7.3.2 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; ...
true
65a24bb9f196393d9434f925cdd528b05eddd254
SQL
pendi/nadi_watch
/database/nadi_watch.sql
UTF-8
20,520
2.890625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.4.2 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: 03 Nov 2015 pada 14.07 -- Versi Server: 5.5.44-0+deb8u1 -- PHP Version: 5.6.13-0+deb8u1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_S...
true
a3f3e500d79d2e7a79239c58adec937ae08dc3af
SQL
smltrs0/Intelcost-solucion-master
/Database.sql
UTF-8
1,127
2.671875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.9.5 -- https://www.phpmyadmin.net/ -- -- Servidor: localhost:3306 -- Tiempo de generación: 24-08-2020 a las 05:34:47 -- Versión del servidor: 5.7.24 -- Versión de PHP: 7.4.8 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*...
true
520bb5ac675c36334963779eed71a48feee60cc2
SQL
FontevaRecruiting/NewCareerSite
/assets/fiops.meetup.sql
UTF-8
6,590
3.09375
3
[]
no_license
-- MySQL dump 10.13 Distrib 5.7.16, for Win64 (x86_64) -- -- Host: localhost Database: fiops -- ------------------------------------------------------ -- Server version 5.7.16-log /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /...
true
00bff38b93c7e83480ef38f0af203e0f5732c275
SQL
sibuliao/wpdrc
/src/main/resources/db_init.sql
UTF-8
2,738
3.53125
4
[]
no_license
CREATE DATABASE `wpdrc`; USE `wpdrc`; CREATE TABLE `tb_order` ( `id` int(11) NOT NULL AUTO_INCREMENT, `order_type` varchar(2) DEFAULT NULL, `desk_num` int(2) DEFAULT NULL, `remarks` varchar(100) DEFAULT NULL, `create_time` datetime, `status` tinyint(1) COMMENT '0进行中,1已买单,2删除,3已付款待取货,4已付款已取货', PRIMARY KEY...
true
b34f6ba50db6431c6a377ae0dded0f6b2635c2f3
SQL
TaiJi-team/effectCode
/primary-db-data/宏观经济库.sql
UTF-8
25,217
3.21875
3
[ "MIT" ]
permissive
/* Navicat MySQL Data Transfer Source Server : 127.0.0.1 Source Server Version : 50724 Source Host : 127.0.0.1:3306 Source Database : macro-economy Target Server Type : MYSQL Target Server Version : 50724 File Encoding : 65001 Date: 2020-10-15 19:35:13 */ SET FOREIGN_KEY_CHECKS=0;...
true
6afa52ec02467a4fc0288d9956b35639b73be91a
SQL
mrcouthy/Sql
/SQLTechniques/Find Subtotals/SubtotalLevel5 .sql
UTF-8
2,270
3.8125
4
[]
no_license
with pureQuery (City,StateProvinceID,PostalCode,AddressLine1,rgg) AS( SELECT [City],StateProvinceID,PostalCode,AddressLine1, SUM ( [AdventureWorks].[Person].[Address].[AddressID] ) AS [rgg] FROM [AdventureWorks].[Person].[Address] GROUP BY City ,StateProvinceID,PostalCode,AddressLine1 ) , rcntQuery (rcnt,City,Stat...
true
25e8b9606b033044c1235e241494f79f6f8b09b5
SQL
amaldonado1215/DataWarehouse
/OnlineReports/view_DashReaderDaysSignOff.sql
UTF-8
435
3.59375
4
[]
no_license
ALTER VIEW dbo.view_DashReaderDaysSignOff AS SELECT DATEPART(YEAR, DOS) AS Year, DATEPART(MONTH, DOS) AS Month, ROUND(AVG(CAST(Reader_Days_to_SignOff AS FLOAT)), 3) AS Average FROM vwCases WHERE Reader_Days_to_SignOff IS NOT NULL AND DOS >= DATEADD...
true
0f3e06967e808c8eeb71ace45131cf54407c7ebf
SQL
abuenrostro62/ETL-Project-
/ETLProject/Housing Resources/presentation.sql
UTF-8
2,364
3.921875
4
[]
no_license
--Create Tables CREATE TABLE housing_price_table( FIPS INTEGER PRIMARY KEY, stateFIPS INTEGER, per_sqft NUMERIC, CountyName VARCHAR(255), StateName VARCHAR(255) ) CREATE TABLE us_fips( stname VARCHAR(255), stateFIPS INTEGER, stateAbbrv VARCHAR(255) ) CREATE TABLE crime_rates_fips( count...
true
486d87dcda74d3cea42ad448ac710bb5d7e0ee7d
SQL
anam5233/backend-projects
/E-Commerce/Database/e-commerce.sql
UTF-8
18,670
3.125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.0.4.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Jul 22, 2014 at 10:46 AM -- Server version: 5.6.11 -- PHP Version: 5.5.3 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;...
true
a2762cc9541f9e9574151439b8db3fd599ef53b3
SQL
jomadmann/lagbot
/create_db.sql
UTF-8
469
2.515625
3
[ "MIT" ]
permissive
CREATE TABLE overwatch ( id bigint PRIMARY KEY, btag text, mode text, region text ); CREATE TABLE xkcd ( num integer PRIMARY KEY, safe_title text, alt text, img text, date date ); CREATE TABLE prefixes ( guild_id bigint PRIMARY KEY, prefix text, allow_default boolean ); C...
true
93cc7c9c6ca84b5e8d8e45c0191ccf8162e35273
SQL
swilliamson70/sqldev_working_files
/sqldev/PROD.sql
UTF-8
5,319
3.015625
3
[]
no_license
SELECT ac1.SRCE , ac1.PIDM , ac1.TERM , ac1.LVL , ac1.SUBJ , ac1.CRS_NUM , ac1.GRADE -- , shrgrde_numeric_value GRD_WT , ac1.GMOD , ac1.chrs , ac1.REP_IND -- , ar.ctr -- , ( -- SELECT -- MAX(shrdgmr_term_code_grad) -- FROM -- ...
true
9a0626b13bc914baa83da4ff60cd85aa3a2d6f6e
SQL
timetable-ka/rozklad-hpc
/src/main/resources/db/migration/data/course/1/V12__ПМ-202.sql
UTF-8
3,381
2.75
3
[]
no_license
# ПМ-202 (ауд.127) = 12 12 INSERT INTO timetable (group_id, lesson_room_id, lesson_week, day_number, lesson_number, teacher_id, teacher_id_optional, lesson_id) VALUES # Monday (12, 12, 2, 1, 1, 52 /* Палій Н.В. */, null, 6 /* Фізика */), (12, 12, 1, 1, 2, 34 /* Бондаренко О.П*/ , null...
true
2e95c9a11b7d8f46130425c860280a10fdebced1
SQL
jtcarlos/WebTechnologies.Project
/Online-Tech Project/Back End/event_registration_datastore.sql
UTF-8
4,988
3.328125
3
[]
no_license
Create Database OnlineTechDataStore; use OnlineTechDataStore; CREATE TABLE users_account ( id INT NOT NULL PRIMARY KEY AUTO_INCREMENT, account_username VARCHAR(50) NOT NULL, account_password VARCHAR(255) NOT NULL, account_email VARCHAR(50) NOT NULL, account_created_at DATETIME DEFAULT CURRENT_TIMES...
true
3086c42a405d046e8dfb4e2aee0377157bc4d0e1
SQL
iod-ine/mars-remote-sensing-utils
/database/initialization_scripts/a_roles_database_extensions.sql
UTF-8
1,210
3.4375
3
[]
no_license
-- Create a role for read-only access to the database: explorer CREATE ROLE explorer; -- Get the passwords from the environment \set markwatney_pass `echo $MARKWATNEY_PASSWORD` \set markwatney_pass :'markwatney_pass' -- for some reason, PyCharm is bitching about using :'var' in CREATE USER \set tester_pass `echo $TES...
true
f0774fd2b288871c7cf4a5ec4b1a60db41c76dc8
SQL
rpizarrog/DBA-Scripts-SQL
/crear vistas.sql
ISO-8859-10
3,099
3.265625
3
[]
no_license
/* Crear vistas en Tienda */ CREATE VIEW vventas2010 AS SELECT ventas.NOVENTA, ventas.fecha, ventas.CLIENTE, ventas.EMPLEADO, ventas.TIENDA, ventas.total FROM VENTAS WHERE EXTRACT(YEAR FROM fecha) = 2010; CREATE VIEW vventas2011 AS SELECT ventas.NOVENTA, ventas.fecha, ventas.CLIENTE, ventas.EMPLEA...
true
f6ece894db65db294bff5dd1bffd6d4d7960eb7b
SQL
kanedasam/SIGES
/resource/scriptdb.sql
UTF-8
4,521
3.53125
4
[]
no_license
SET SQL DIALECT 3; CREATE TABLE TIPO_ENDERECO ( ID INTEGER NOT NULL, DSC_ENDERECO VARCHAR(15)); COMMIT WORK; ALTER TABLE TIPO_ENDERECO ADD PRIMARY KEY (ID) USING INDEX RDB$PRIMARY5; COMMIT WORK; CREATE TABLE ENTIDADE_ENDERECO ( ID INTEGER NOT NULL, COD_ENTIDADE INTEGER NOT NULL, COD_TIPO_ENDERECO INTE...
true
906c67a722d22a6596000829bb8bba557f1519aa
SQL
tn841/JAVA_Spring
/post_trend/src/main/webapp/WEB-INF/others/news_table.sql
UTF-8
1,131
3.546875
4
[]
no_license
DROP TABLE keyword CASCADE CONSTRAINTS; DROP TABLE news CASCADE CONSTRAINTS; /**********************************/ /* Table Name: news */ /**********************************/ CREATE TABLE news( news_no NUMBER(10) NOT NULL, news_date VARCHAR2(20) NULL , ...
true