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
0e1ff72f58f32eadb4c43e892f80751bec1c712b
SQL
russellsalcido/Eat-Your-Feels
/db/schema.sql
UTF-8
185
2.953125
3
[ "MIT" ]
permissive
### Schema CREATE DATABASE feel_db; USE feel_db; CREATE TABLE feels ( id int NOT NULL AUTO_INCREMENT, name varchar(500) NOT NULL, downs BOOLEAN DEFAULT false, PRIMARY KEY (id) );
true
124d219c9240bd117950c9b71ef0de76a159ad0b
SQL
Aibek21/DatabaseSamples
/join.sql
UTF-8
810
3.4375
3
[]
no_license
SELECT * FROM t1; SELECT * FROM t2; SELECT * FROM t1 CROSS JOIN t2; SELECT * FROM t1 INNER JOIN t2 ON TRUE; SELECT * FROM t1, t2; SELECT * FROM t1 INNER JOIN t2 ON t1.num = t2.num AND t1.test = t2.test; SELECT * FROM t1 INNER JOIN t2 USING (num, test); SELECT * FROM t1 NATURAL JOIN t...
true
1c050ab0035058f4e86b92b6318dc577e7e08589
SQL
Alagiavanan/Relational-Database-Support-for-Data-Warehouse
/Assignment_2/Query4.sql
UTF-8
566
3.796875
4
[]
no_license
--4. Inventory Transactions by Transaction Description, Company, and Branch Plan select c.CompanyName, b.BPName,t.TransDescription, sum(i.ExtCost) as TotalCost, count(i.InventoryKey)as Total from inventory_fact i join branch_plant_dim b on i.BranchPlantKey = b.BranchPlantkey join company_dim c on b.Companykey = c.Com...
true
e41c1c9fc3510d381d3894ddcbafe1b149d6ee79
SQL
Matthew-W-G/cs3200-assignment2-matthew-giuliano
/cs3200-fall-giuliano.sql/page_roles.sql
UTF-8
712
3.515625
4
[]
no_license
CREATE TABLE `page_roles` ( `id` int(11) NOT NULL, `role` varchar(45) DEFAULT NULL, `page_id` int(11) DEFAULT NULL, `developer_id` int(11) DEFAULT NULL, PRIMARY KEY (`id`), KEY `page_role_enumeration_idx` (`role`), KEY `developer_role_idx` (`developer_id`), KEY `page_role_idx` (`page_id`), CONSTRAINT ...
true
19a506ab3bf71147aa2e1db4894f3d5adac21a5a
SQL
SaimaAkter-CSECU/kgmc
/nu_admin (1).sql
UTF-8
3,604
2.90625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jul 28, 2021 at 09:19 PM -- Server version: 10.4.17-MariaDB -- PHP Version: 8.0.2 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIEN...
true
cbdeb8ef0c382c573d92f5e9bddf8f9f85f1af32
SQL
silence-do-good/stress-test-Postgres-and-MySQL
/dump/low/day15/select2345.sql
UTF-8
191
2.796875
3
[]
no_license
SELECT timeStamp, temperature FROM ThermometerObservation WHERE timestamp>'2017-11-14T23:45:00Z' AND timestamp<'2017-11-15T23:45:00Z' AND SENSOR_ID='7af4b310_75dd_4a6a_a89a_126e69fcbef8'
true
3008f56afc010fc1a5c904b52ed04c4a19f30291
SQL
joaoalves16/scripts-sql
/consultas/sistema/imoveis-disponiveis-ongoing-listing.sql
UTF-8
524
4.1875
4
[]
no_license
SELECT CURDATE() AS imovel_disponivel_em, bairro.nome AS bairro, cidade.nome AS cidade, uf.sigla AS uf, COUNT(*) AS imoveis FROM imovel JOIN bairro ON bairro.id = imovel.bairro_id JOIN cidade ON cidade.id = bairro.cidade_id JOIN uf ON cidade.uf_id = uf.id ...
true
c119a1ca18e2d7b1458d3d3debd875a7771717fe
SQL
miaowb91/ganesha
/cube-sql/tables.sql
UTF-8
3,023
4.0625
4
[]
no_license
#建表和初始化数据语句 CREATE TABLE `ganesha_asset` ( `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID', `asset_code` varchar(255) NOT NULL DEFAULT '' COMMENT '资产ID', `asset_name` varchar(50) NOT NULL DEFAULT '' COMMENT '资产名称', `asset_unit` varchar(50) NOT NULL DEFAULT '' COMMENT '资产单位', `asset_unit_code` tinyint(4)...
true
297d0573be409e86033b3112f5ecb733d17a531c
SQL
dgopstein/atoms-of-confusion
/snippet_study/sql/unclustered_contingency.sql
UTF-8
650
3.859375
4
[]
no_license
select t.tag as atom, uc.codeid as codeid, uc.userid as userId, uc.correct||uc2.correct as response, SUM(CASE WHEN uc.correct||uc2.correct = 'TT' THEN 1 ELSE 0 END) as TT, SUM(CASE WHEN uc.correct||uc2.correct = 'TF' THEN 1 ELSE 0 END) as TF, SUM(CASE WHEN uc.correct||uc2.correct = 'FT' THEN 1 ELSE 0 END) as FT, SUM(CA...
true
67d759e4169018562a388e37fc804f4efa8d894f
SQL
27032377/practice-note
/MySQL/sql/my_query10_process.sql
UTF-8
2,351
4.28125
4
[]
no_license
-- --存储过程,delimiter防止分号执行 -- delimiter $$ -- CREATE PROCEDURE show_emp() -- BEGIN -- --声明变量 -- DECLARE avg VARCHAR(255) DEFAULT ''; -- DECLARE x,y INT DEFAULT 0; -- DECLARE avgRes DOUBLE DEFAULT 0; -- --变量赋值 -- SET x = 3; -- --查询并赋值 -- SELECT AVG(salary) INTO avgRes FROM employee; -- END$$ -- delimiter ; -- CALL show_...
true
e1f9eb03e42fbf146b1fe4e73dd1d10797620fe5
SQL
SahidMiller/HttpFlipstarterServer
/sql/database_schema.sql
UTF-8
3,015
3.78125
4
[ "MIT" ]
permissive
CREATE TABLE IF NOT EXISTS users ( user_id INTEGER NOT NULL, user_url TEXT NULL, user_image TEXT NULL, user_alias TEXT NULL, user_address TEXT NULL, data_signature TEXT NULL, PRIMARY KEY (user_id) ); CREATE TABLE IF NOT EXISTS campaigns ( campaign_id INTEGER NOT NULL, title TEXT NOT NULL, starts INTEGER NOT ...
true
56ca3768b3913cac44e888f39987bb248b4f40fe
SQL
SixShoot/Lgd-Server-1
/Databases/127_0_0_1_mu_online_login.sql
UTF-8
11,390
3.3125
3
[]
no_license
-- -- Bază de date: `mu_online_login` -- DROP DATABASE IF EXISTS `mu_online_login`; CREATE DATABASE IF NOT EXISTS `mu_online_login` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; USE `mu_online_login`; -- -------------------------------------------------------- -- -- Structură tabel pentru tabel `accounts`...
true
c456b5040130b5a59cfd8cd9243549cbc6ef21db
SQL
rockywu/icons-platform
/sql/icons_2017-07-25.sql
UTF-8
5,233
3.375
3
[ "MIT" ]
permissive
# ************************************************************ # Sequel Pro SQL dump # Version 4096 # # http://www.sequelpro.com/ # http://code.google.com/p/sequel-pro/ # # Host: 127.0.0.1 (MySQL 5.6.20) # Database: icons # Generation Time: 2017-07-25 09:38:33 +0000 # ***************************************************...
true
e0ba7fed20d7a8cc9610b88446ef0877cba882b7
SQL
bitna1031/TeamMarket
/attach.sql
UTF-8
1,031
3.53125
4
[]
no_license
CREATE TABLE attach( filename VARCHAR2(300) NOT NULL, bno NUMBER NOT NULL, regdate DATE DEFAULT SYSDATE, CONSTRAINT fk_attach_bno FOREIGN KEY(bno) REFERENCES board(bno) ) SELECT * FROM AAA delete FROM attach CREATE OR REPLACE VIEW v_member AS SELECT * FROM member DROP TABLE bbb DROP TABLE aaa d...
true
55a5ce20e47d36437ab4b11e9bfc49bb2b5098cf
SQL
mumja92/mumjolandia
/data/schemes/view_tags.sql
UTF-8
202
3.390625
3
[]
no_license
--DROP VIEW v_tags; CREATE VIEW v_tags AS SELECT game.name as game, tag.name as tag FROM game_tags INNER JOIN game ON game.id_game = game_tags.fk_game INNER JOIN tag ON tag.id_tag = game_tags.fk_tag
true
a7701491ac084b34280f87a912a707030ea6443c
SQL
womu67/liqubaseLocalTest
/12-create_view_vw_number_range_protocol.sql
UTF-8
486
2.609375
3
[]
no_license
-- View: vw_number_range_protocol -- DROP VIEW vw_number_range_protocol; CREATE OR REPLACE VIEW vw_number_range_protocol AS SELECT t1.id, t1.last_modification_date, t1.created_on, t1.first_entry, t1.interval_end_counter, t1.interval_start_counter, t1.last_entry, t1.mail_center, t1.po...
true
bfbb6a0ebc58504a487033836c6e56b18a4c1309
SQL
prakashgithub4/chatExample
/chat.sql
UTF-8
3,055
3.109375
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.8.3 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jun 11, 2020 at 06:42 AM -- Server version: 10.1.37-MariaDB -- PHP Version: 7.2.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OL...
true
a968d79de3cdddebe4703a62ef604ca930b50b22
SQL
Rishav267/SQL
/PATINDEX.sql
UTF-8
131
2.65625
3
[]
no_license
--PATINDEX FUNCTION select Email, PATINDEX('%@gmail.com',Email) as FirstOccurance from employee where PATINDEX('%@gmail.com',Email) >0
true
a286953013e780762be80755cb70959a8f9349e1
SQL
sshyran/gpdb
/src/test/tinc/tincrepo/mpp/gpdb/tests/storage/aoco_alter/aoco_alter_sql_test/sql/multivarblock_part_dropcol_nonnull.sql
UTF-8
708
2.5625
3
[ "Apache-2.0", "PostgreSQL", "LicenseRef-scancode-rsa-md4", "OLDAP-2.8", "HPND-sell-variant", "BSD-4-Clause-UC", "BSD-3-Clause", "Zlib", "LicenseRef-scancode-zeusbench", "LicenseRef-scancode-mit-modification-obligations", "OpenSSL", "MIT", "LicenseRef-scancode-other-copyleft", "bzip2-1.0.6"...
permissive
-- -- @created 2014-04-14 12:00:00 -- @modified 2014-04-14 12:00:00 -- @tags storage -- @description AOCO multivarblock partition table : drop column with default value non NULL alter table multivarblock_parttab ADD COLUMN added_col11 character varying(35) default 'this is default value of non null'; select count(*) a...
true
f16dbc9e7ae69f8f84c8e72dcfba02e0b9579176
SQL
ai-zelenin/base
/res/migrations/pg_dbname/3_a_b.up.sql
UTF-8
521
3
3
[]
no_license
create table if not exists table_a_table_b ( id serial not null constraint table_a_table_b_pk primary key, table_a_id integer not null constraint table_a_table_b_table_a_id_fk references table_a on update restrict on delete restrict, table_b_id in...
true
c76a7faa74f244f9ae71057cb3b1de5ada4fa790
SQL
refset/2019-PVLDB-Reproducibility-Snapshot-Semantics-For-Temporal-Multiset-Relations
/experiment-scripts/queries/pg_nat/q5.sql
UTF-8
3,286
3.734375
4
[]
no_license
WITH _temp_view_2 AS ( SELECT n_name AS "n_name", sum(l_extendedprice * (1 - l_discount)) AS "revenue",ts AS "t_b",te AS "t_e" from ( SELECT * FROM ( (SELECT * FROM ( (SELECT * FROM ( (SELECT * FROM ( (SELECT * FROM (time_supplier a PERIOD JOIN WITH (ACTIVE_TIME_BEGIN, ACTIVE_TIME_E...
true
f1dbf7facff64de9a2160057ed34aa31a7662bed
SQL
MarcceloSelv/DBA
/Análise/Objetos Nao usados.sql
UTF-8
1,507
4.25
4
[]
no_license
SELECT A.name AS [object_name], A.type_desc, C.name AS index_name, ( SELECT MAX(Ultimo_Acesso) FROM (VALUES (B.last_user_seek),(B.last_user_scan),(B.last_user_lookup),(B.last_user_update)) AS DataAcesso(Ultimo_Acesso) ) AS last_access, B.last_user_seek, B.last_user_scan, ...
true
d79586c073dbb131cbc8ea7f8db679c3a9d37b39
SQL
edi334/Amdaris_2021
/Module 2/Module 2 - Transactions/Deadlock2.sql
UTF-8
177
2.5625
3
[]
no_license
BEGIN TRANSACTION UPDATE dbo.Country set Capital = 'Cluj' where Name = 'Romania' BEGIN TRANSACTION UPDATE dbo.Person set Income = 1200 where Name = 'Bill' ROLLBACK TRANSACTION
true
65d2e07a3d88463b3eb8ef05f2f5b1d8a5ffcdd6
SQL
matifabrizzi77/Ferremaq
/usuarios.sql
UTF-8
256
2.8125
3
[]
no_license
CREATE TABLE `usuarios` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `usuario` varchar(45) NOT NULL, `password` varchar(32) NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `usuario` (`usuario`) ) ENGINE=MyISAM AUTO_INCREMENT=10 DEFAULT CHARSET=utf8;
true
a96bf7788533dc833004825b2e2834a138e78294
SQL
B24Development/b24crmBase
/build/sql/sms_patterns_list_view.sql
UTF-8
476
3.53125
4
[]
no_license
-- View: sms_patterns_list_view --DROP VIEW sms_patterns_list_view; CREATE OR REPLACE VIEW sms_patterns_list_view AS SELECT p.id, p.sms_type, get_sms_types_descr(p.sms_type) AS sms_type_descr, l.name AS lang_descr, l.id AS lang_id, p.pattern, array_to_string(p.fields, ',') as fields ...
true
6dc5e097d8c3ecdba987c1649848835b1688bed4
SQL
BaobabHealthTrust/bart2_triggers
/procedures/sub-procedures/inserts/proc_insert_side_effects.sql
UTF-8
11,866
2.9375
3
[]
no_license
DELIMITER $$ DROP PROCEDURE IF EXISTS `proc_insert_side_effects`$$ CREATE PROCEDURE `proc_insert_side_effects`( IN in_patient_id INT, IN in_visit_date DATE, IN in_field_concept INT, IN in_field_value_coded INT, IN in_field_value_coded_name_id INT, IN in_field_other VARCHAR(25), IN in_vi...
true
c69a167793d4034c12f8ebf8ccec1d1ecbf3300d
SQL
isabelgemahitamartinez/repo
/agenciaViajes.sql
UTF-8
3,762
3.65625
4
[]
no_license
-- 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='TRADITIONAL,ALLOW_INVALID_DATES'; -- ----------------------------------------------------- -- Schema AgenciaVi...
true
c675b6f4e2330d615659b8ab823196a4edd0bb9d
SQL
almina-orange/heroku-tutorial
/db_init.sql
UTF-8
382
2.921875
3
[]
no_license
DROP TABLE IF EXISTS sample CREATE TABLE sample ( id INTEGER NOT NULL, name VARCHAR(100) NOT NULL, age INTEGER, password VARCHAR(20), PRIMARY KEY (id) ); INSERT INTO sample VALUES (1, '山田太郎', 26, 'yamada'), (2, '佐藤隆', 34, 'sato'), (3, '斎藤達弘', 45, 'saito'), ...
true
a000247bf9a316545d84bd1abc41e248700cf3e0
SQL
Edvinas-Smita/DBVS
/plus.sql
UTF-8
363
3.515625
4
[]
no_license
SELECT col.table_name AS "lentele", col.column_name AS "stulpelis", col.data_type AS "stulpelio tipas" FROM information_schema.tables AS tbl, information_schema.columns AS col WHERE tbl.table_catalog = col.table_catalog AND tbl.table_catalog = 'biblio' AND tbl.table_schema = col.table_schema AND tbl.table_schema = '...
true
acbb7fea6b64a3b885b6ce4a6eb215b02635f453
SQL
jasonlovescoding/UofT-IntroductionToDatabases
/hw3/q3.sql
UTF-8
1,848
4.375
4
[]
no_license
-- correct responses to t-f questions DROP VIEW IF EXISTS tfqCorrects CASCADE; CREATE VIEW tfqCorrects AS ( SELECT r.sID, r.qID FROM Response r JOIN tfResponse tfr ON r.tfrID = tfr.tfrID JOIN tfQuestion tfq ON r.qID = tfq.tfqID WHERE tfr.response = tfq.answer ); -- correct responses to m-c question...
true
8f090b027d2566da2b18884807820429ac1c86f8
SQL
MichelPinho/exerciciosMySQL_SQLServer
/Exercícios resolvidos.sql
UTF-8
2,063
4.21875
4
[ "MIT" ]
permissive
-- Exercícios -- -- Exercício 1 -- -- Através de um select, mostre na tabela gafanhotos a soma de todos os alunos do sexo feminino. -- select sexo, count(*) from gafanhotos where sexo = 'f'; -- Exercício 2 -- -- Através de um select, mostre na tabela gafanhotos os alunos que nasceram entre 01/01/2011 e 31/12/2020. --...
true
01282728fde525adb300ec9e82bf90be08435946
SQL
Dezent001/Eksamenpolygonprojekt2016
/polygonMySQL.sql
UTF-8
1,210
3.328125
3
[]
no_license
CREATE DATABASE IF NOT EXISTS polygon; USE polygon; Drop table if exists report; Drop table if exists building; Drop table if exists users; Drop table if exists zip; create Table zip ( zipcodes int(10), city varchar(255), primary key (zipcodes) ); create Table users ( buildingID int(100), userID int(100), zipID in...
true
63e024b1f3833cecc5596c902697278b871bd314
SQL
FabioHolocheski/Banco-de-dados-2
/Curso_funcionarios.sql
UTF-8
751
3.15625
3
[]
no_license
create database Curso_funcionarios; create table funcionario (id integer, id_curso integer, matricula integer(50), nome varchar(50), data_nascimento date, primary key (id), foreign key (id_curso) references curso(id)); create table dependente (id integer,id_funcionario integer, nome varchar(50), primary key (id...
true
c07efc4fdfdc7421e2d5b64ace4f5457a4874e80
SQL
kaamiel/zbd
/zad2/sql-one-table-example.sql
UTF-8
846
3.5625
4
[]
no_license
DROP TABLE IF EXISTS csv_data; CREATE TABLE csv_data ( date date NOT NULL, category text NOT NULL, value_1 int NOT NULL, value_2 int NOT NULL, value_3 int NOT NULL, value_4 int NOT NULL, value_5 int NOT NULL, value_6 int NOT NULL, value_7 int NOT NULL, value_8 int NOT NULL, ...
true
bc00ce09df158f7404ca506387696d9166e612f2
SQL
enriquecatala/SQLServerScalarUDFPerformance
/SQLServerScalarUDFPerformance/dbo/Functions/fn_nums.sql
UTF-8
777
3.265625
3
[]
no_license
 -- -- Enrique Catala is Mentor at SolidQ: http://www.solidq.com -- Microsoft Data Platform MVP: https://mvp.microsoft.com/es-es/PublicProfile/5000312?fullName=Enrique%20Catala -- Blog: http://www.enriquecatala.com -- Twitter: https://twitter.com/...
true
b1af9fc810606b7129c409e19868b1b26ae4cff1
SQL
jason-bourne-512/pl_sql
/oracle9i_pl_sql_programming/ch4/ch4_fig4_30_declare_error.sql
UTF-8
875
3.359375
3
[]
no_license
/* Figure 4-30 A DECLARE section error propagates immediately The lv_junk2_num variable is declared in the nested block as a number, tey the code attempts to initialize it with a character string, which raises an error. Because the error occurs in the DECLARE section, the process moves immediately to ...
true
82f40ca5df48f2afc8c112e8a318c2e1cbfda1ef
SQL
brokenq/itsnow
/backend/common-services/common-gui-service/src/test/resources/META-INF/setup/20140825140057_insert_msc_menu_items.sql
UTF-8
946
2.921875
3
[]
no_license
TRUNCATE TABLE menu_items; INSERT INTO menu_items(id, parent_id, name, state, position) VALUES (1, null, '用户', 'index.user', 0), (2, null, 'SLA', 'index.sla', 2), (3, null, '合同', 'inde...
true
643478281c43f640dfe1bd8afd014df84f302529
SQL
ortofone24/SqlZoo
/04_SelectWithinSelect.sql
UTF-8
2,857
4.4375
4
[]
no_license
/* List each country name where the population is larger than that of 'Russia'. */ SELECT name FROM world WHERE population > (SELECT population FROM world WHERE name='Russia') /* Show the countries in Europe with a per capita GDP greater than 'United Kingdom'. */ SELECT name FROM world WHERE (contine...
true
13db1641fd90f30c00394445524658e824335eb1
SQL
phoniex-fly/wkscrm-cloud
/wkscrm-cloud/sql/wk_system/wkscrm_system_sys_user_role.sql
UTF-8
350
3
3
[ "MIT" ]
permissive
create table sys_user_role ( user_id bigint not null comment '用户ID', role_id bigint not null comment '角色ID', primary key (user_id, role_id) ) comment '用户和角色关联表'; INSERT INTO wkscrm_system.sys_user_role (user_id, role_id) VALUES (1, 1); INSERT INTO wkscrm_system.sys_user_role (user_id, role_id) VALUES (...
true
eb83200df48750cf70ff0fab270042e5450719a4
SQL
xtito/SshProjectAnnotation
/build/classes/sql/SshProject.sql
GB18030
2,129
3.46875
3
[]
no_license
-- ű create table ssh_department( -- id id number(10) constraint dept_FK primary key, -- department_name varchar2(50) ); -- Ա create table ssh_employee( -- Աid id number(10) constraint emp_PK primary key, -- Ա last_name varchar2(50), -- Ա email varchar2(50), -- Ա birth date, -- ʱ create_ti...
true
25c1f026fb44a448542e5cc7c7419620f305c05b
SQL
sikhlana/cse310
/db/migration/V15__added_status_column_to_orders_invoices_and_rentals_tables.sql
UTF-8
363
2.6875
3
[]
no_license
ALTER TABLE `orders` ADD COLUMN `status` ENUM('pending', 'completed', 'cancelled', 'returned') NOT NULL AFTER `user_id`; ALTER TABLE `invoices` ADD COLUMN `status` ENUM('pending', 'paid', 'expired', 'refunded') NOT NULL AFTER `order_id`; ALTER TABLE `rentals` ADD COLUMN `status` ENUM('pending', 'active', 'ended...
true
39066a70d7391196037399a4df1afe6c735e2d90
SQL
BrittanyDilts/addressbook
/database/addresstable.sql
UTF-8
2,154
3.15625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.7.9 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Apr 01, 2018 at 08:41 AM -- Server version: 10.1.31-MariaDB -- PHP Version: 7.2.3 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
true
fed273befb669975bb128e39503fb42448d07a15
SQL
dombcn/JavaDevCIFO_Spring
/P09AA_BD.sql
UTF-8
2,122
3.4375
3
[]
no_license
CREATE DATABASE IF NOT EXISTS segurweb; USE segurweb; -- Table: users -- ------------------------------------------------------ DROP TABLE IF EXISTS users; CREATE TABLE users ( username VARCHAR(50) NOT NULL PRIMARY KEY, password VARCHAR(68) NOT NULL, enabled TINYINT(1) NOT NULL ); -- Table: authorities -- ----...
true
2b6bd6f889c1de80ffaa65915c90701922edfb26
SQL
JobVil/HCI_Final_Project
/HCI_Proj.sql
UTF-8
70,237
2.671875
3
[]
no_license
CREATE TABLE IF NOT EXISTS DoorPanels ( `PanelID` NUMERIC(2, 1), `NumPanels` NUMERIC(2, 1) ); INSERT INTO DoorPanels VALUES (1.0,1.0), (2.0,2.0), (3.0,3.0), (4.0,4.0), (5.0,5.0), (6.0,6.0), (7.0,9.0), (8.0,0.0), (9.0,8.0); CREATE TABLE IF NOT EXISTS Doors ( ...
true
e4e7f103a52f1145fcc6f2db1f3bf3d72ca2cee4
SQL
khanishvili/QueryDatabase-Refresh
/T-SQL/UNION TABLES.sql
UTF-8
1,032
3.515625
4
[]
no_license
CREATE TABLE Employee ( EID INT NOT NULL, FirstName VARCHAR(10) NOT NULL, LastName VARCHAR(25) NOT NULL, StreetAdress VARCHAR(70) NOT NULL, City VARCHAR(12) NOT NULL, State CHAR(2) ) CREATE TABLE Costumers ( CID INT NOT NULL, FirstName VARCHAR(10) NOT NULL, LastName VARCHAR(25) NOT NULL, StreetAdress VARCHAR(70) NOT N...
true
6f55639fb1341a0452ba19f37ec01b59d9aa6237
SQL
SiamSarker/DataBase
/211 - DBMS/aggregate_grp_prac.sql
UTF-8
3,500
4.4375
4
[]
no_license
-- 1. Show each region_id and corresponding -- no of countries in that region from countries table. SELECT region_id, COUNT(*) FROM countries GROUP BY region_id; -- 2. Show the location_id and corresponding -- no of departments in that location from departments table. SELECT location_id, COUNT(*) FROM de...
true
73f92f4b53cccc8a2f790ca0b5b31cd9faed4268
SQL
seet61/one
/schema.sql
UTF-8
440
2.515625
3
[ "BSD-2-Clause" ]
permissive
drop table if exists tracks; drop table if exists users; drop table if exists users_info; create table tracks ( id integer primary key autoincrement, artist text not null, title text not null ); create table users ( id integer primary key autoincrement, login text not null, password text not null ); create table ...
true
c48443025ac81a79672255ec00146c8f80b5192e
SQL
costeldragu/mockito_with_spring
/spring_boot.sql
UTF-8
2,599
3.0625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.5.3.1 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Oct 04, 2017 at 06:03 PM -- Server version: 5.7.19-0ubuntu0.16.04.1 -- PHP Version: 7.1.10-1+ubuntu16.04.1+deb.sury.org+1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OL...
true
ec94fd0ea68dbd93972c52172f4a11e81707d51b
SQL
nconforti93/cheatsheets
/Import Demo Data/chicago_taxi.sql
UTF-8
4,259
3.28125
3
[]
no_license
-- BASED ON CHICAGO_TAXI schema in demodb CREATE OR REPLACE CONNECTION EXASOL_DEMO_DATA TO '' --Need to fill in where this data resides USER '' -- hope it's not needed IDENTIFIED BY '' -- hope it's not needed CREATE SCHEMA CHICAGO_TAXI; CREATE TABLE "CENSUS_TRACTS" ( "CENSUS_TRACT_ID" DECIMAL(11,...
true
99ab836b1f7d9b2734fc879d45d03d5ba2c99d21
SQL
kyle-d-pearce/ISTA420
/Week-2-SingleTableQueries/Exercises/EX 2G.sql
UTF-8
378
3.84375
4
[]
no_license
--EX 2G - PG 95 --EXERCISE 7 SELECT TOP (3) shipcountry, AVG(freight) AS avgfreight FROM Sales.Orders WHERE orderdate >= '20150101' AND orderdate < '20160101' GROUP BY shipcountry ORDER BY avgfreight DESC; --EXERCISE 8 SELECT custid, orderdate, orderid, ROW_NUMBER() OVER(PARTITION BY custid ORDER BY orderdate, ord...
true
a772247aed155301db06d6e38a113248a7398522
SQL
Dah106/Grocery-App-Project-for-CS1555
/createSchemaUpdated.sql
UTF-8
3,289
3.84375
4
[]
no_license
drop table warehouses cascade constraints; drop table distStations cascade constraints; drop table customers cascade constraints; drop table orders cascade constraints; drop table lineItems cascade constraints; drop table items cascade constraints; drop table stock cascade constraints; purge recyclebin; create table ...
true
6d0cc7d0e55118e71710bc8a9774abf65959c335
SQL
apppoint-release/BizAPP-Public
/BizAPP/Patches/StoredProcedures/SQLSERVER/bizapp_asminfo.sql
UTF-8
381
2.578125
3
[]
no_license
CREATE PROCEDURE bizapp_asminfo AS BEGIN -- SET NOCOUNT ON added to prevent extra result sets from -- interfering with SELECT statements. SET NOCOUNT ON; SELECT a1.uniqueid,a1.object_name as "objecttype",a1.uniqueid as "objecttypeid",a1.extends,a1.hierarchy,a1.[references],a1.defaultview,a1.defaultform,a1.quickcre...
true
f492a548d5aeed23186398cf8af6735e79ae23d0
SQL
saswatsk/LeetCode-Solutions
/MySQL/the-number-of-seniors-and-juniors-to-join-the-company.sql
UTF-8
1,048
4.1875
4
[ "MIT" ]
permissive
# Time: O(nlogn) # Space: O(n) WITH senior_cte AS ( SELECT 'Senior' AS experience, IFNULL(MAX(salary_accu), 0) AS salary, IFNULL(MAX(rn), 0) AS rn FROM ( SELECT SUM(salary) OVER(ORDER BY salary, employee_id) AS salary_accu, ROW_NUMBER() OVER(ORDER BY sala...
true
3601b6e3b07085179ffe9c72659a41edb3e6edae
SQL
nachad0ng/e-proll
/E_PROLL.sql
UTF-8
18,567
3.21875
3
[ "LicenseRef-scancode-unknown-license-reference", "MIT" ]
permissive
-- -------------------------------------------------------- -- Host: 127.0.0.1 -- Server version: 10.4.8-MariaDB - mariadb.org binary distribution -- Server OS: Win64 -- HeidiSQL Version: 11.0.0.5919 -- ------------------------------------------------...
true
222eae31433db5a6475a61293da13c8ff968677c
SQL
AndrewH2O/SudokuSimpleSolver
/Sudoku/scratchScripts/test setReset digitsCandidates.sql
UTF-8
2,058
3.359375
3
[]
no_license
--set digit and clear possible candidate by cellID and digit update cd set cd.value=0 from candidate_digits as cd inner join candidates as ca on cd.cellID = ca.cellID where ca.cellID = 7 and cd.digit=8 --update numberPossibles update ca set ca.numberPossibles=(select count(*) from candidate_digits where cellID=7 an...
true
1d699e375a9d0a6d2280f302da08c8cf5f3b1bc4
SQL
sundusdincc/sql-notes
/T-SQL Training Material/Exercises/DERS_2.sql
UTF-8
5,359
3.46875
3
[ "MIT" ]
permissive
 -- DML - Data Manupulation Language -- SELECT , AS , PRINT USE Northwind SELECT 3 SELECT 'YunusEmreKeskin' SELECT 1,2,3,4 SELECT 'TEST',7 PRINT 'YunusEmreKeskin' SELECT * FROM dbo.Categories SELECT * FROM Categories SELECT CategoryName FROM Categories SELECT CategoryName AS Kategori FROM Categories SELECT Cat...
true
577063917abda0a0a9fab619a25b8d4e08828772
SQL
kwicz/rating-rainbow
/tables.sql
UTF-8
383
3.109375
3
[ "MIT" ]
permissive
CREATE TABLE books ( id SERIAL PRIMARY KEY, title VARCHAR NOT NULL, author VARCHAR NOT NULL, year VARCHAR NOT NULL, isbn VARCHAR NOT NULL ); CREATE TABLE users ( id SERIAL PRIMARY KEY, username TEXT UNIQUE, hash TEXT NOT NULL, reviewed VARCHAR ); CREATE TABLE reviews ( id SERIAL PRIMARY KEY, user_id INT NO...
true
507d3d59c47c449b890bd8252183d76547b1263e
SQL
mclods/MusiX-Website-Project
/ccl_project_database.sql
UTF-8
3,303
3.125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jan 14, 2020 at 11:13 PM -- Server version: 10.1.38-MariaDB -- PHP Version: 7.1.27 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OL...
true
fa5ac883d6bdb976b9b7ff69b1620f0568a22ca0
SQL
SamaherD/FinalProject
/TeethProject/TethProj2/RealDataBase 20170217 1736.sql
UTF-8
5,188
3.1875
3
[]
no_license
-- MySQL Administrator dump 1.4 -- -- ------------------------------------------------------ -- Server version 5.5.17 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; ...
true
ca8c49a8a7e7b0b9d3ae2cbc5c0d554d52e8ba52
SQL
pdadhich/hbc-ddw-o5
/SQL/o5_bi_promo_parse.sql
UTF-8
1,039
2.921875
3
[]
no_license
REM ############################################################################ REM SAKS, INC. REM ############################################################################ REM REM SCRIPT NAME: o5_bi_promo_parse.sql REM DESCRIPTION: It creates a data file with promo details REM REM CODE...
true
9e996c541f53b7858a83ab80c80ee16aafb7365e
SQL
leonardoalves14/agendafut
/proj/API/SocietyAgendor.DataBase/dbo/Stored Procedures/speCargo.sql
UTF-8
320
3.265625
3
[ "MIT" ]
permissive
CREATE PROCEDURE speCargo @Cargo_Id INT AS BEGIN SELECT @Cargo_Id AS Cargo_Id INTO #TabParametros SELECT (CASE WHEN (SELECT a.Cargo_Id FROM Cargo a JOIN #TabParametros b ON a.Cargo_Id = b.Cargo_Id) > 0 THEN 1 ELSE 0 END) AS [Exists] END
true
8bb2180bf81b654c53f0ec30eeba71d0abc0fe0f
SQL
PiBoyadzhieva/SoftUni-Software-Engineering
/MS SQL Exams/ExamPreparationExam16042019/1.CreateDatabase.sql
UTF-8
1,541
3.609375
4
[]
no_license
CREATE TABLE Planes (Id INT PRIMARY KEY IDENTITY, [Name] VARCHAR(30) NOT NULL, Seats INT NOT NULL, [Range] INT NOT NULL ); CREATE TABLE Flights (Id INT PRIMARY KEY IDENTITY, DepartureTime DATETIME2, ArrivalTime DATETIME2, Origin VARCHAR(50) NOT NULL, Destination VARCHAR(50...
true
bf67e120d7f04506930e4b071580b7447c6e7d40
SQL
gcoronelc/PLSQL-2019-08
/Proyectos/CENTENO_MASGO_PEÑA/1_2_CREACION_ESQUEMA_CARGA_DATOS_TEMPORAL1.sql
ISO-8859-10
1,380
2.734375
3
[]
no_license
-------------------------------------------------------- -- Archivo creado - domingo-septiembre-15-2019 -------------------------------------------------------- -------------------------------------------------------- -- DDL for Table TBL_INFORME -------------------------------------------------------- CREATE G...
true
e5610213aa166a4824b30a0edd694bb9997d7c65
SQL
ninjacoandtheforce/MvcKendoUi
/EvolutionDB/StoredProcedures/GetEmployeeByID.sql
UTF-8
180
3.140625
3
[]
no_license
CREATE PROC GetEmployeeByID @EmployeeID int AS select EmployeeID, EmployeeName, [Status], StatusDescription from Employee where [Status] = 'Active' AND EmployeeID = @EmployeeID
true
8bdd01fab5e9551de2b707cc099b044f62d6d7b5
SQL
chidieberejoel/circle-payments-api
/migrations/sqls/20210430205151-add-user-table-up.sql
UTF-8
429
2.890625
3
[ "MIT" ]
permissive
/* Replace with your SQL commands */ CREATE TABLE IF NOT EXISTS users ( id uuid NOT NULL PRIMARY KEY, email VARCHAR(320) NOT NULL, first_name VARCHAR(32) NOT NULL, last_name VARCHAR(32) NOT NULL, hash VARCHAR(100) NOT NULL, salt VARCHAR(100) NOT NULL, is_active boolean NOT NULL default true, level VARCH...
true
75d06690364423ed0d35bdb5eea2a4ec68a56e57
SQL
D93/sql2stan
/SQL2STAN/example_models/LDA/createTable/3_token.sql
UTF-8
149
2.71875
3
[]
no_license
CREATE TABLE token ( token_id integer not null, PRIMARY KEY (token_id), CONSTRAINT SortingOrder_Position_1 CHECK (argument_column('token_id')) );
true
6052618b32a4b5954d3a5578ba00f26da3b4bdf5
SQL
JoezerSmaniotto/ProjetoBlog
/blog.sql
UTF-8
2,164
3.21875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: 15-Maio-2019 às 01:35 -- Versão do servidor: 10.1.38-MariaDB -- versão do PHP: 7.3.3 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @...
true
76cc9cb6d738fd91e002ec8fe12e583fa1abacd8
SQL
Jdoublee/CodingTestPractice
/programmers/SQL/STRING,DATE/루시와엘라찾기.sql
UTF-8
407
3.1875
3
[]
no_license
-- 동물 보호소에 들어온 동물 중 이름이 Lucy, Ella, Pickle, Rogan, Sabrina, Mitty인 동물의 아이디와 이름, 성별 및 중성화 여부를 조회하는 SQL 문을 작성해주세요. 이때 결과는 아이디 순으로 조회해주세요. SELECT ANIMAL_ID, NAME, SEX_UPON_INTAKE FROM ANIMAL_INS WHERE NAME IN('Lucy', 'Ella', 'Pickle', 'Rogan', 'Sabrina', 'Mitty') ORDER BY ANIMAL_ID;
true
fc2d4156c68f323c8fa69b89b85e39d7a5227092
SQL
Zlatov/lab
/phpbb3/acl/who_has_access_to_forum.sql
UTF-8
497
3.671875
4
[]
no_license
USE forum; SELECT ag.*, g.group_name, ao.auth_option, ard.* FROM forum_acl_groups ag LEFT JOIN forum_groups g ON g.group_id = ag.group_id LEFT JOIN forum_acl_options ao ON ao.auth_option_id = ag.auth_option_id LEFT JOIN forum_acl_roles_data ard ON ard.role_id = ag.auth_role_id AND ( ard.auth_option_id = 14 OR ard.auth...
true
4f323934cf41028db69d7f45e503cdb92cafb4ca
SQL
softlog/postgresql_scripts
/romaneios/fechamento/00_scr_relatorio_viagem_ab.sql
UTF-8
833
3.0625
3
[]
no_license
CREATE TABLE scr_relatorio_viagem_ab ( id serial NOT NULL, id_relatorio_viagem integer, id_ab integer, valor numeric(12,2) DEFAULT 0.00, descontar integer DEFAULT 1, CONSTRAINT scr_relatorio_viagem_ab_id_pk PRIMARY KEY (id), CONSTRAINT scr_relatorio_viagem_ab_id_relatorio_viagem_fk FOREIGN KEY (id_relatorio_...
true
0565e316c0e59b9285fbb9d19658cb7ef2407ade
SQL
aminbaz/projetweb
/scriptsql.sql
UTF-8
3,511
3.421875
3
[]
no_license
CREATE TABLE categorie ( id_categorie serial, lib_categorie varchar(50) not null, CONSTRAINT pk_categorie PRIMARY KEY("id_categorie") ); CREATE TABLE role ( id_role serial, lib_role varchar(50) not null, CONSTRAINT pk_role PRIMARY KEY("id_role") ); CREATE TABLE utilisateur ( id_utilisateur...
true
ee053f39d8fcf53824261d1c38acd8a8e1fda3e6
SQL
blackburn3333/Library-Management-System-JavaFX
/DATABASE FILE/readwithus.sql
UTF-8
3,593
3.265625
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.6.5.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Oct 20, 2017 at 10:02 AM -- Server version: 10.1.21-MariaDB -- PHP Version: 5.6.30 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SE...
true
cc6b0cac3fc8c366e8fa24f54aa08d8f8c09a1ca
SQL
fanik041/SQL_Excercises
/question3.sql
UTF-8
352
3.15625
3
[]
no_license
delete from employee; INSERT INTO employee (name, dob) select name, to_date(birth_date, 'DD-MM-YYYY') from student; create table question3 ( name varchar2(32) not null, date_of_birth date not null ); INSERT INTO question3 (name, date_of_birth) select name, to_date(birth_date, 'DD-MM-YYYY') from st...
true
45ed52f0e2d1f80c6d2db92fb47505a03a26b136
SQL
valecantu04/PersonalProjects
/DormDDL.sql
UTF-8
851
3.53125
4
[]
no_license
CREATE TABLE dorm ( dorm_id INT NOT NULL, dorm_name VARCHAR(100) NOT NULL, year_built DATE NOT NULL, PRIMARY KEY (dorm_id) ); CREATE TABLE room ( room_id INT NOT NULL, sqaure_footage FLOAT NOT NULL, floor INT NOT NULL, dorm_id INT NOT NULL, PRIMARY KEY (room_id), FOREIGN KEY (dorm_id) REFERENCES dorm(dorm_id) ON DELETE...
true
7b0519731a5cb85a0b206ec42acd1d504c2dc27b
SQL
ppolxda/restkit
/restkit/gen/mdbs/template/init_sql/insert_select_tmpl.sql
UTF-8
784
3.15625
3
[ "MIT" ]
permissive
{% for tablename, table in tables.items() %}{% if tablename in ['coin_umfee_log'] or 'options' not in table or 'snapshot' not in table['options'] or not table['options']['snapshot'] %}{% continue %}{% end %} -- ---------------------------- -- Table structure for `{{dbname}}`.{{ tablename }} -- ------------------------...
true
479d50ae2b2470147ced2fdb6d987912d276cfed
SQL
clement-berard/school-cpe-jee
/dump.sql
UTF-8
2,634
3.328125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.0.4 -- http://www.phpmyadmin.net -- -- Client: localhost -- Généré le: Mar 20 Mai 2014 à 21:25 -- Version du serveur: 5.6.12-log -- Version de PHP: 5.4.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIEN...
true
8e2d4263580dc53e7b57944e1ec38ec4ad0a5846
SQL
raoulmadayag/facultyAttendance
/Desktop/project/facultyAttendance-v12.sql
UTF-8
5,603
3.421875
3
[]
no_license
CREATE DATABASE IF NOT EXISTS `facultyattendance` /*!40100 DEFAULT CHARACTER SET latin1 */; USE `facultyattendance`; -- MySQL dump 10.13 Distrib 5.7.17, for Win64 (x86_64) -- -- Host: localhost Database: facultyattendance -- ------------------------------------------------------ -- Server version 5.7.19 /*!40101 ...
true
b53b28bded153e9d13f01f855497fc52f67f7913
SQL
opensas/BackboneBootstrap
/webservice/conf/evolutions/default/16.sql
UTF-8
509
2.59375
3
[ "Apache-2.0" ]
permissive
# --- First database schema # --- !Ups INSERT INTO Ayuda VALUES (01, 'Provincia.ProvinciaId', 'Ayuda contextual del campo Provincia.ProvinciaId') , (02, 'Provincia.Codigo', 'Ayuda contextual del campo Provincia.Codigo') , (03, 'Localidad.LocalidadId', 'Ayuda contextual del campo Localidad.LocalidadId') , (04,...
true
015407ccb7d507253e85ffbe67a112c302854dc3
SQL
kjh0816/php_blog3
/php_blog.sql
UTF-8
3,423
3.609375
4
[]
no_license
DROP DATABASE IF EXISTS php_blog; CREATE DATABASE php_blog; USE php_blog; CREATE TABLE `member`( id INT(10) UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT, delStatus INT(1) UNSIGNED NOT NULL, regDate DATETIME NOT NULL, updateDate DATETIME NOT NULL, loginId CHAR(20) NOT NULL, loginPw CHAR(100) NOT NULL, `name` ...
true
f0c2cf18de965524f6a7427693fddd8d952945f0
SQL
rummelj/wahlinfo
/wahlinfo/src/main/resources/sql/ElectoralDistrictWinnersPerElection.sql
UTF-8
743
3.84375
4
[]
no_license
with StateWinners as ( select pv.federalStateId, max(pv.receivedVotes) as maxVotes from WIPartyVotes pv, WIParty p where pv.partyId = p.id and p.electionYear = ':electionYear' group by pv.federalStateId ) select ed.name as edName, p.name as directVoteWinner, p1.name as listVoteWinner from DirectMandatesView2009 ...
true
5e2b92366a2142b9557e6535415380f80e7490e2
SQL
QuantumKane/database-exercises
/more_exercises.sql
UTF-8
454
3.46875
3
[]
no_license
# What languages are spoken in Santa Monica? SELECT language, percentage FROM countrylanguage WHERE countrycode = 'USA' ORDER BY percentage; # How many different countries are in each region? SELECT region, COUNT(name) as num_countries FROM country GROUP BY region ORDER BY num_countries ASC; # What is the populati...
true
d0320702bdad884f3df9f319008ec1ab3c7bc1d1
SQL
b-bok/STS
/spring.sql
UTF-8
240
2.703125
3
[]
no_license
select board_no , board_title , board_writer , count , create_date , origin_name from board where status = 'Y' order by board_no desc; ALTER TABLE BOARD modify ORIGIN_NAME VARCHAR2(200); commit;
true
bf26204617290d7763a9efe7116a7035e1facfd2
SQL
AurlinD/BootcampX
/0_selects/1_students_without_github.sql
UTF-8
228
3.28125
3
[]
no_license
-- We need a list of all of the students that haven't added their Github username to their account yet, so that we can tell them to add it. SELECT id, name, email, cohort_id FROM students WHERE github IS NULL ORDER BY cohort_id
true
772d6e7ba4a0dd8312af72519f9d2368a856067c
SQL
IMarchenkov/php2
/data/mi_db.sql
UTF-8
20,134
2.90625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.7.7 -- https://www.phpmyadmin.net/ -- -- Хост: 127.0.0.1:3306 -- Время создания: Мар 25 2018 г., 13:06 -- Версия сервера: 5.6.38 -- Версия PHP: 7.1.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACT...
true
c729b24d4f1f55617b18430eb790a98911b920be
SQL
15831944/WebAthl
/Projects/WebAthl/sql/GetRules.SQL
UTF-8
372
3.546875
4
[ "Apache-2.0" ]
permissive
SELECT %s FROM Rules, RuleSubType, RuleType WHERE RuleSubType.RuleSubTypeID = Rules.RuleSubTypeID AND RuleSubType.RuleTypeID = Rules.RuleTypeID AND RuleType.RuleTypeID = Rules.RuleTypeID AND RuleType.RuleTypeID = RuleSubType.RuleTypeID AND ((Rules.SeriesID=%d) AND (RuleType.RuleTypeDescription='%s') ...
true
7de27686907ffc7023d7bd979869cff6f7cc3b19
SQL
CBIIT/onedata-mdr
/od-db-sprints/sprint42/S42_DE_EXCEL_GENERATOR_VIEW.sql
UTF-8
28,595
3.34375
3
[]
no_license
--Related to JIRA859 -- create or replace function get_concepts859(v_item_id in number, v_ver_nr in number) return varchar2 is cursor con is select c.item_long_nm, cai.NCI_CNCPT_VAL from cncpt_admin_item cai, admin_item c where cai.item_id = v_item_id and cai.ver_nr = v_ver_nr and cai.cncpt_item_id = c.item_id a...
true
e6131ad883c2dd2d3c6a8c0cc18664e049c39940
SQL
soo-pecialist/Practical-SQL
/Chapter_04.sql
UTF-8
8,793
3.78125
4
[]
no_license
-------------------------------------------------------------- -- Practical SQL: A Beginner's Guide to Storytelling with Data -- by Anthony DeBarros -- Chapter 4 Code Examples -------------------------------------------------------------- -- Listing 4-1: Using COPY for data import (example syntax) COPY table_name FR...
true
76feaf78d6b8be263e107df6ce8dcec0e2733494
SQL
Kayzer1713/STRI_Database
/TP3/TP3.sql
UTF-8
5,257
3.90625
4
[ "MIT" ]
permissive
-- TP3: Gestion des exceptions -- Q1: CREATE OR REPLACE PROCEDURE ajoutConcert (pIdConcert Concert.idConcert%TYPE, pNomConcert Concert.nomConcert%TYPE, pLieuConcert Concert.lieuConcert%TYPE, pDateConcert Concert.dateConcert%TYPE, pNomArtiste Artiste.nomArtiste%TYPE, pPrenomArtiste Artiste.prenomArtiste%TYPE) AS vNbCon...
true
fd7af0d1329b68d5af4901ff9bdb4d433d3c7304
SQL
samszo/jardindesconnaissances
/bdd/query/extractionHisto.sql
UTF-8
289
2.828125
3
[]
no_license
/* select sum(eT.nb)/count(*) Moyenne from( */ SELECT -- d.pubDate temps, -- DATE_FORMAT(d.pubDate, "%d-%c-%y %H h") temps, DATE_FORMAT(d.pubDate, "%d-%c-%y") temps, count(*) nb FROM flux_doc d WHERE d.tronc = "" GROUP BY temps ORDER BY temps -- ) eT
true
3c30ea326dd3d148c51d36bf1d23ade35f03bce9
SQL
Nakkat/1s2020-t2-sprint-2-banco-de-dados
/ExercicioBancoDeDados/OPTUS/DML.sql
UTF-8
1,485
3.03125
3
[]
no_license
-- DML (Linguagem de Manipulacao de Dados) -- INSERIR INSERT INTO Estilos VALUES ('Pop'); INSERT INTO Estilos VALUES ('Reggae'); INSERT INTO Estilos VALUES ('Funk'); INSERT INTO Estilos VALUES ('Rock'); INSERT INTO Estilos VALUES ('Samba'); INSERT INTO Artistas VALUES ('Katy Perry'); INSERT INTO Artistas VALUES ('B...
true
09eba9a313187409c6055c091eba2f870bf646b1
SQL
EthanPrentice/COMP3005_Project
/SQL/queries/publisher/get_publisher_phones.sql
UTF-8
212
3.21875
3
[]
no_license
SELECT phone.* FROM phone NATURAL JOIN phone_is_type NATURAL JOIN phone_type INNER JOIN publisher_phone on publisher_phone.phone_id = phone.phone_id WHERE publisher_phone.publisher_id = ?
true
ff6532dd5cd4f80d931d3cf9da68585d780a6628
SQL
EduardoLarios/FIMIAP
/labs and related/entrega3/SQL/noticia.sql
UTF-8
654
3.015625
3
[]
no_license
SET DATEFORMAT dmy CREATE TABLE Noticia ( ID_Noticia numeric(5) NOT NULL, nombreUsuario varchar(20) NOT NULL, titulo varchar(50), descripcion varchar(MAX), fecha_publicacion datetime ) ALTER TABLE Noticia ADD CONSTRAINT valorUnicoNoticia UNIQUE (ID_Noticia); ALTER TABLE Noticia ADD CONSTRAINT llavePrimariaNot...
true
8951928e729eee702ddca65aef7af8e7e127806e
SQL
fikri100/FastLes
/fastles.sql
UTF-8
6,531
2.953125
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.9.0.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Waktu pembuatan: 11 Okt 2019 pada 18.23 -- Versi server: 10.3.15-MariaDB -- Versi PHP: 7.3.6 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHA...
true
ffa8d0b5ae0b503985a549a94cdfad16a23f8ee2
SQL
etallen127/SQL3
/challenge_unf.sql
UTF-8
375
4.1875
4
[]
no_license
--(Challenge) What's the length of the longest -- trip for each day it rains anywhere? with df as ( select date, events from weather where events like 'Rain' group by date ) select d.date, d.events, t.duration from df d join weather w on d.date = w.date join trips t o...
true
a2a945acd29a6bde6a7c9b3a989557b0e4b9efce
SQL
wildflower/SCMTurboCharge
/RD_ES_RV_units.sql
UTF-8
14,742
2.546875
3
[]
no_license
select champion_registry.icp, concat(lat, ',', lng) as location, addressnumber, addressstreet, addresstown, sum(if(strcmp(status, 'RD'), 0, units) * (1 - abs(sign(reportmonth - 200801)))) as 'RD-200801', sum(if(strcmp(status, 'RD'), 0, units) * (1 - abs(sign(reportmonth - 200802)))) as 'RD-...
true
0d24f70061f87735e2ee82020cd1e384add51f07
SQL
MiguelCosta/bd-farmacia
/Farmacia-BD/src/anexos/SQL/11 - procedures.sql
WINDOWS-1250
1,037
3.359375
3
[]
no_license
-- Procedures -- actualiza os precos de todos os produtos CREATE OR REPLACE PROCEDURE actualizar_preco_geral (perc IN number) IS perc_final NUMBER; BEGIN perc_final := perc/100; UPDATE produtos SET preco = preco * (1 + perc_final); END actualizar_preco_geral; / -- actualizar os produtos de u...
true
29e65490f84e3076bccd0787ca66b1ddba9c3f6d
SQL
corneliahd/dsjfbjewbfjewbf
/Q1.sql
UTF-8
235
3.21875
3
[]
no_license
SELECT U.first_name, LENGTH(U.first_name) as lengthofFirstname FROM USER1 U GROUP BY U.first_name ORDER BY LengthofFirstname DESC; SELECT U.first_name, COUNT(*) as numofName FROM USER1 U GROUP BY U.first_name ORDER BY numofName DESC;
true
21efc50678ebe8fccb2c4f2da15ff74631744e48
SQL
silence-do-good/stress-test-Postgres-and-MySQL
/dump/high/day27/select0247.sql
UTF-8
191
2.71875
3
[]
no_license
SELECT timeStamp, temperature FROM ThermometerObservation WHERE timestamp>'2017-11-26T02:47:00Z' AND timestamp<'2017-11-27T02:47:00Z' AND SENSOR_ID='9448486b_5a2c_4be1_8413_25e4c63f91c5'
true
cac2c823cb36714d06516d86cc2ec6164b5e9471
SQL
bellmit/cmusv-practicum
/scripts/slurp/articles.sql
UTF-8
529
3.515625
4
[]
no_license
/* Parameters: (0) The name of the table (string). (1) The maximum length of article identifiers (integer). (2) The name of the AUIDs table. References the AUIDs table. */ /* Create the articles table */ CREATE TABLE IF NOT EXISTS %s ( /* A reference to a row ID in the AUIDs table */ aid INT UN...
true
8a3b9e3f635aed87a9b745bd8c803b9141bc22a6
SQL
gcoronelc/SISTUNI-ORACLE-SQL-003
/Clase02/02_GAMARRA -SALHUANA-LEYVA.sql
UTF-8
1,842
3.671875
4
[]
no_license
/* 1. DESARROLLE UNA SENTENCIA SELECT PARA CALCULAR EL IMPORTE DE LA PLANILLA DEL DEPARTAMENTO DE VENTAS. DEBE INCLUIR EL SUELDO Y LA COMISION. ESQUEMAS SCOTT Y RH*/ SELECT SUM(SUELDO_TOTAL)PLANILLA_TOTAL FROM( SELECT S.*,(SAL+NVL(COMM,0))SUELDO_TOTAL FROM SCOTT.EMP S WHERE DEPTNO='30' ) SELECT SUM(SUELDO_TOTAL...
true