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
2b00e816280e0a2aeaed51bd87f0570892bbb1d2
SQL
Noobaseem/stigma
/stimuli-server/src/main/resources/ddl.sql
UTF-8
421
3.375
3
[]
no_license
CREATE TABLE users ( id BIGSERIAL PRIMARY KEY, user_name VARCHAR(50) NOT NULL, password VARCHAR(255), first_name VARCHAR(100), last_name VARCHAR(100), email VARCHAR(100), enabled INTEGER, last_password_reset_date TIMESTAMP ); CREATE TABLE authority ( id BIGSERIAL PRIMARY KEY, name VARCHAR(50) ); CREATE TA...
true
260b6783b1db7be4c0549dfa3357b3c9140df8a1
SQL
soitun/taiga
/OpenSim/Data/MSSQL/Resources/006_EstateStore.sql
UTF-8
633
3.78125
4
[ "BSD-3-Clause" ]
permissive
BEGIN TRANSACTION CREATE TABLE dbo.Tmp_estate_users ( EstateID int NOT NULL, uuid uniqueidentifier NOT NULL ) ON [PRIMARY] IF EXISTS(SELECT * FROM dbo.estate_users) EXEC('INSERT INTO dbo.Tmp_estate_users (EstateID, uuid) SELECT EstateID, CONVERT(uniqueidentifier, uuid) FROM dbo.estate_users WITH (HOLDLOCK TA...
true
e44be996d4a92948df8bc080b7e3f7f829c2a784
SQL
mitalimn/Bamazon
/bamazon.sql
UTF-8
1,893
4.03125
4
[]
no_license
create database bamazon_DB; use bamazon_DB; create table products( item_id INTEGER(10) NOT NULL auto_increment primary key, product_name VARCHAR(50) NOT NULL, department_name VARCHAR(50) NOT NULL, price decimal(10,2) NOT NULL, stock_quantity integer(10) NOT NULL ); alter table products auto_increment(item_id); se...
true
c151871bbea8cdbfae669b18c6723104d190773a
SQL
RaquelSBarahona/ejercicio
/producto.sql
ISO-8859-1
747
2.5625
3
[]
no_license
Aqu estoy modificando otra vez algo en el segundo usuario Table structure for table `producto` -- DROP TABLE IF EXISTS `producto`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `producto` ( `idproducto` int(11) NOT NULL, `fabricante` tinyt...
true
956bc6c0b777d95d20e9746c592fff8caea0ef9a
SQL
pabolojo/UAM-EPS-GII_Bilingual-CS
/2_Sophomore/Semester_1/EDAT/P1/query4.sql
UTF-8
381
3.296875
3
[]
no_license
SELECT name FROM language WHERE language_id IN(SELECT language_id FROM film GROUP BY language_id HAVING Count(*) IN(SELECT Count(*) FROM film GROUP BY langu...
true
e8f71a400a6b48a923032685c2b4941c8fc8489c
SQL
heeras11/MYSQL
/MYSQL /Basic/MYSQL 1.3.sql
UTF-8
222
3.5
4
[]
no_license
use world; select Country.Name, City.Name, City.Population From Country left join City on City.CountryCode = Country.Code Where Country.name= "Mexico" AND City.Population > 500000 Order By City.Population DESC
true
69810e34de0fad2c8dcefb5b956c9399aae60cf9
SQL
lileiuu/sql
/缴费到账子表2划款通知明细.sql
GB18030
922
2.71875
3
[]
no_license
create table eprk_corpcharge_roamlist_b2 ( pk_corpcharge_roamlist_b2 char(20), pk_corpcharge_roamlist char(20), real_plan_code char(20), real_plan_name varchar2(64), transfer_banlance number(18,4), actual_cash number(18,4), ts char(19) ); comment on table eprk_corpcharge_roamlist_b2 is '֪ͨϸ'; comment on column eprk_co...
true
1b9ebda846d106eab35b1fc05a1ed483520d37cb
SQL
emborden/Hackathon-2019-Public
/database/table_creation.sql
UTF-8
671
3.34375
3
[]
no_license
CREATE TABLE users ( user_id serial PRIMARY KEY, password char(60), username text, karma integer ); CREATE TABLE gathering ( gathering_id serial PRIMARY KEY, name text ) CREATE TABLE photo ( photo_id serial PRIMARY KEY, location text ); CREATE TABLE video ( video_id serial PRIMARY KEY, location text ); CRE...
true
9953fb363b606a230fedcac0bb2150f0ca5701ea
SQL
imedsaoud/Project1-Sql-Db
/Db-imed.sql
UTF-8
1,480
4.21875
4
[]
no_license
CREATE TABLE subj ( id INT UNSIGNED AUTO_INCREMENT, title VARCHAR(100) NOT NULL, content TEXT NOT NULL, auteur_id INT UNSIGNED NOT NULL, date_publication DATETIME NOT NULL, PRIMARY KEY(id) ); CREATE TABLE User ( id INT UNSIGNED AUTO_INCREMENT, pseudo VARCHAR(100) NOT NULL, email VARCHAR(100) NOT NULL, pa...
true
747cb769e2995b879858ec692146db3680e0516a
SQL
yefc/CBOE
/subprojects/Classic/ChemInv/config/oracle_install_scripts/Create_blank_ChemInv_DB/sql/PLSQL/Functions/f_UpdateAllContainerFields.sql
UTF-8
6,408
2.609375
3
[]
no_license
-- Create procedure/function UPDATEALLCONTAINERFIELDS. CREATE OR REPLACE FUNCTION "&&SchemaName"."UPDATEALLCONTAINERFIELDS" (pContainerID in Inv_Containers.Container_ID%Type, pBarcode in Inv_Containers.Barcode%Type, pLocationID in Inv_Containers.Location_ID_FK%Type, pUOMID in Inv_Cont...
true
7deefa0046d5591bf1f58367db01f6fb21cbc306
SQL
LuciaCL/trucks-management
/src/main/resources/database-update/script01.sql
UTF-8
3,511
3.640625
4
[ "MIT" ]
permissive
--liquibase formatted sql --changeset lucia:script01cs001 drop table if exists c_interval; drop table if exists expense; drop table if exists carrier; drop table if exists journey; drop table if exists customer; drop table if exists section; drop table if exists trailer; drop table if exists truck; create table carrie...
true
43e077a1a56ff66f4507c75b1f97d40b74a4d9d2
SQL
Zouzou-kh/gestion-vols
/gestion-vols (1).sql
UTF-8
4,785
3.390625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.4 -- https://www.phpmyadmin.net/ -- -- Hôte : localhost -- Généré le : mer. 10 mars 2021 à 16:22 -- Version du serveur : 10.4.16-MariaDB -- Version de PHP : 7.4.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_S...
true
b7e5e3ed4c19e99dd402404cf788f6d74a7249bf
SQL
MoToSh99/MiniTwit
/schema.sql
UTF-8
492
2.828125
3
[ "MIT" ]
permissive
drop table if exists users; create table users ( user_id integer primary key autoincrement, username string not null, email string not null, pw_hash string not null, image_url string ); drop table if exists followers; create table followers ( who_id integer, whom_id integer ); drop table if exists messa...
true
55fc6936df943a06f105bb4cba55591344ec4141
SQL
EPMS3POC/EPMS3POC1
/EPMS3POC1API/INS/Tables/CoverageLimit.sql
UTF-8
1,341
3.15625
3
[]
no_license
CREATE TABLE [INS].[CoverageLimit] ( [CoverageLimitId] BIGINT IDENTITY (1, 1) NOT NULL, [LimitAmount] MONEY NULL, [UsedAmount] MONEY NULL, [RemainingAmount] MONEY NULL, [CoverageNetworkTypeId] BIGINT NULL, [CoveragePlanTypeId] ...
true
68b3d80cb429db3c88fb952c9753c4bded9e11c5
SQL
iarakshana/hw7
/atus3.sql
UTF-8
522
3.703125
4
[]
no_license
--Education. State with the lowest fraction of high school graduates. Refer to the table in the "twisty" above -- HS is 39. --If you haven't memorized the FIPS codes, you can find them here. --lowest fraction of hs graduates SELECT state_code, AVG(educational_attainment > 39) AS Hs FROM cps JOIN roster ON ...
true
4e2de51ef9c0f8df343d2bff6dae658aa30b96a5
SQL
imavishek/StairSupplies
/db/changes/2013/2013-01-16 - cleanup.sql
UTF-8
2,790
2.8125
3
[]
no_license
DROP TABLE `z_unused_TblProductVendors`; ALTER TABLE `Customers` DROP INDEX `Customers_idx8`, DROP INDEX `IX_Customers`, DROP INDEX `Customers_idx3`, DROP FOREIGN KEY `Customers_fk4`, DROP FOREIGN KEY `Customers_fk5`; ALTER TABLE `Customers` DROP COLUMN `old_Email`, DROP COLUMN `old_Password`, DROP COLUMN `ol...
true
af33592cf254b41e20b499a70c46989069d7968f
SQL
EugeneBogush/PStatus
/status.sql
UTF-8
3,753
3.140625
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.5.4.1deb2ubuntu2 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Dec 14, 2017 at 04:01 PM -- Server version: 5.6.35-1+deb.sury.org~xenial+0.1 -- PHP Version: 7.0.22-0ubuntu0.16.04.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 S...
true
25d0143316aaceb30a53ebd713adffc8768b39ed
SQL
CUBRID/cubrid-testcases
/sql/_04_operator_function/_07_case_func/_005_nvl/cases/1011.sql
UTF-8
752
2.640625
3
[ "BSD-3-Clause" ]
permissive
--[er]test nvl, nvl2 with char and other type select nvl(n'sss', 10.11) from db_root; select nvl2(n'sss', 10.11, 20.11) from db_root; select nvl('sss', 10.11) from db_root; select nvl2('sss', 10.11, 20.11) from db_root; select nvl({1,2}, 10.11) from db_root; select nvl2({1,2}, 10.11, 20.11) from db_root; select nvl(...
true
7c07ffd6952f708af25b9a79819be028c18e10b6
SQL
paul-rogers/drill-test-framework
/framework/resources/Functional/limit0/aggregates/aggregation/group_by_expression/plan/with_string_functions.sql
UTF-8
464
3.71875
4
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
-- coalesce with columns from side that does not produce nulls -- mix case (drill-2168) explain plan for select * from ( select count(*), substr(lower(UPPER(to_char(t1.c1, 'MMM-DD-YY'))), 5, 2) from t1_v t1 left outer join t2_v t2 on t1.a1 = t2.a2 left outer join t3_v t3 on t1.c1 = t3.c3 group by ...
true
7758dd0915c261166a590202e00806c984afbd14
SQL
mugoweb/BlendCalendar
/sql/mysql/schema.sql
UTF-8
990
3.03125
3
[]
no_license
SET NAMES utf8; -- ---------------------------- -- Table structure for `BlendEvent` -- ---------------------------- CREATE TABLE `BlendEvent` ( `ezcontentobjectattribute_id` int(11) NOT NULL, `version` int(11) NOT NULL DEFAULT '1', `start_time` int(11) DEFAULT NULL, `duration` int(11) DEFAULT NULL, `recurre...
true
486f293979babee91334b98ca20a08e7c8de2894
SQL
felex67/tcpip_server
/scripts/pgsql.sql
UTF-8
1,213
2.90625
3
[]
no_license
DROP TABLE users, msgs, baned_ip; CREATE TABLE users ( id SERIAL PRIMARY KEY, fname varchar(20) NOT NULL, lname varchar(20) NULL, sname varchar(20) NULL, phone varchar(12) NOT NULL, email varchar(39) NOT NULL, driver varchar(1) NULL, pass bytea NOT NULL, wLat fl...
true
3b902a4328ac71e3f224f52e8615fa4eb9d82d8f
SQL
claytond10/SCC
/sql/sp_GetLocationTypes.sql
UTF-8
466
2.546875
3
[]
no_license
-- -------------------------------------------------------------------------------- -- Routine DDL -- Note: comments before and after the routine body will not be stored by the server -- -------------------------------------------------------------------------------- DELIMITER $$ CREATE DEFINER=`scc_dba`@`%` PROCEDURE...
true
21a6b5fb84f112159b3aa9a93bcb62fc7c26f17b
SQL
yayayaka/TestDB
/CompanyDB.sql
UTF-8
2,200
4.5625
5
[]
no_license
-- 12. Сделай таблицу компаний. Учти, что у компаний могут быть филиалы, у которых тоже могут быть свои филиалы. CREATE DATABASE CompanyDB; USE CompanyDB; -- Создаем таблиwe компаний. CREATE TABLE Companies ( id TINYINT NOT NULL AUTO_INCREMENT, compName VARCHAR(20) NOT NULL DEFAULT 'company name', PRIMARY KEY ...
true
8d1e963ee3742b218f0ebaa1c7ac16ee8a23efb4
SQL
lucasmenezes/projetoTotaliza
/src/app/infra/scripts/script-000.sql
UTF-8
7,668
3.265625
3
[]
no_license
/* Script para criação do banco de dados do projeto totaliza e suas respectivas tabelas */ CREATE DATABASE `totaliza` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci */; /*DROP DATABASE `totaliza`; */ USE `totaliza`; /* DROP TABLE quociente_partidario; DROP TABLE quociente_eleitoral; DROP TABLE vo...
true
2cabed743fb0258d41ca005ed90e031649495e19
SQL
lauraolivas/School-Marks-Manager
/school_marks.sql
UTF-8
4,648
3.125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.7.0 -- https://www.phpmyadmin.net/ -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 20-01-2019 a las 17:02:24 -- Versión del servidor: 5.7.17 -- Versión de PHP: 5.6.30 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!401...
true
a0147c6b440e8a47fa04c932ae0f9558fd70b64e
SQL
evrimulgen/Oracle-DBA-Life
/INFO/Books Codes/Oracle PLSQL Tips and Techniques/OutputChapter02/2_36.sql
UTF-8
662
2.53125
3
[ "MIT" ]
permissive
-- *************************************************************************** -- File: 2_36.sql -- -- Developed By TUSC -- -- Disclaimer: Neither Osborne/McGraw-Hill, TUSC, nor the author warrant -- that this source code is error-free. If any errors are -- found in this source code, please repo...
true
f4ade8d394f205a6a35a6e9c853ceb635a20b0b8
SQL
radtek/abs3
/sql/mmfo/bars/Function/f_branchtocoderaj.sql
WINDOWS-1251
2,361
2.84375
3
[]
no_license
PROMPT ===================================================================================== PROMPT *** Run *** ========== Scripts /Sql/BARS/function/f_branchtocoderaj.sql =========*** PROMPT ===================================================================================== CREATE OR REPLACE FUNCTION BA...
true
88b8f8cc876de0e2484737a593ee07ef8ff5c480
SQL
Detrivinog/BasesDeDatos1
/Parcial3.sql
UTF-8
2,499
4.65625
5
[]
no_license
# 6. Mostrar por usuario la cantidad de playlists que posee, pero solo para aquellos que tengan más de 1 playlist creada en el año 2021. select u.nombre, count(p.idPlaylist) as cantidad from usuario u left join playlist p on u.idUsuario = p.Usuario_idUsuario where year(p.fechaCreacion) = 2021 g...
true
d2c93b8ab2116050c6562fb304020ed7faef4638
SQL
justin-w-soto/TardyGram
/sql/setup.sql
UTF-8
780
3.6875
4
[]
no_license
DROP TABLE IF EXISTS users CASCADE; DROP TABLE IF EXISTS posts CASCADE; DROP TABLE IF EXISTS comments; CREATE TABLE users ( github_username TEXT NOT NULL PRIMARY KEY, github_avatar_url TEXT NOT NULL ); CREATE TABLE posts ( id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, photo_url TEXT NOT NULL, ...
true
ae5f4786ea7140ea87b1859e5fef09911c48c630
SQL
dangvandat15021997/HelloWorld
/DB system concepts/Part 1/Chap 3/3.12.sql
UTF-8
1,031
3.8125
4
[]
no_license
insert into section(course_id, sec_id, semester, year, building, room_number, time_slot_id) values ('CS-001', 1, 'Fall', 2017, null, null, null); insert into takes(ID, course_id, sec_id, semester, year, grade) select student.ID, section.course_id, sec_id, semester, year, null from student, section where stud...
true
5ff29bd3a01ab581df058fed59f9e006115028f4
SQL
danfreak/cakephp-newsletter-plugin
/config/sql/schema.sql
UTF-8
2,183
3.5
4
[]
no_license
CREATE TABLE `newsletter_subscriptions` ( `id` int(10) unsigned NOT NULL auto_increment, `name` varchar(250) default NULL, `email` varchar(250) default NULL, `opt_out_date` datetime default NULL, `confirmation_code` varchar(250) default NULL, `created` datetime default NULL, `modified` datetime default N...
true
0b4a7b9e350f7c8c15e48554d3f5f69f7d18b1f8
SQL
joshenlim/crisis-management-system
/schema/ssad_crisis_db_v1.sql
UTF-8
1,069
3.1875
3
[ "CC-BY-SA-4.0", "MIT", "CC-BY-4.0" ]
permissive
-- Dump of Table: users ------------------------------------------------------------ DROP TABLE IF EXISTS `users`; CREATE TABLE `users` ( `id` int(11) NOT NULL AUTO_INCREMENT, `username` varchar(255) NOT NULL, `password` varchar(255) NOT NULL, `name` varchar(255) NOT NULL, `created_at` datetime NOT NULL, ...
true
867748cf6bb85eee137f913f24b59480fc477569
SQL
5OH-HO5/practice_python
/python/191127/실습용HR(그룹~조인).sql
UHC
8,247
4.46875
4
[]
no_license
-- ϴ AVG Լ / ÷ NULL̸ ϰ select avg(sal) from emp; select round(avg(sal),4) -- round Լ = ڸ ǥ / 4° ڸ ݿø from emp; select round(avg(sal),-2) -- round Լ = ڸ ǥ / 10ڸ ݿø from emp; select ename, max(sal) -- ename max(÷) ƾ / ޶ from emp; select ename, sal from emp; select ename, sal from emp; select min(ename), ma...
true
c0aaf6004609408506a715d35da2ceaa8b5cbaac
SQL
PB-Utech/playing-cypress
/picking.sql
UTF-8
954
3.609375
4
[]
no_license
select iu.order_no, vb.product_no, vb.product_qty, vb.product_unit, vb.customer_name from vact_prep_order_to_booking as vb left join act_trn_order_input_upload as iu on iu.order_id = vb.order_id where vb.order_Id in ( select order_id from act_trn_order_input_upload where order_no = 'ORD202104270001' ) SELECT * ...
true
dbc63b22ff55685ed135eaa6a09d8780f4a437e6
SQL
trycrmr/Find.state.gov
/api/lib/sample_query.sql
UTF-8
1,793
4.28125
4
[]
no_license
# This is what a data viz query looks like SELECT COUNT(gdp_growth__denorm.geom_time_id) AS "count", AVG(gdp_growth__denorm.amount) AS "gdp_growth__avg", MAX(gdp_growth__denorm.amount) AS "gdp_growth__max", MIN(gdp_growth__denorm.amount) AS "gdp_growth__min", gdp_growth__denorm.name AS "geo__name", gdp_gro...
true
0588a42db0ac71cbe3369b4e6473cb12c3dd111c
SQL
radtek/Telecommunication
/SIM_TRADE/DataBase/TABLES/EVENT_DESCRIPTIONS.sql
WINDOWS-1251
438
3.140625
3
[]
no_license
CREATE TABLE EVENT_DESCRIPTIONS ( EVENT_CODE VARCHAR2(50) CONSTRAINT PK_EVENT_DESCRIPTION PRIMARY KEY, DESCRIPTION VARCHAR2(100), IMAGE_BMP BLOB ); COMMENT ON TABLE EVENT_DESCRIPTIONS IS ' '; -- : begin EXECUTE IMMEDIATE 'GRANT SELECT ON EVENT_DESCRIPTIONS TO &MAIN_SCHEMA'||'_ROLE'; EXECUTE IMMEDIATE 'GRA...
true
ac41b3af11fb78c220bf21ae311ca8738ab1527f
SQL
mariosangiorgio/SEminer
/queries/InfluentialAffiliations.sql
UTF-8
1,234
4
4
[]
no_license
SELECT externalCitations.affiliation_title, externalCitations.externalCitations + internalCitations.internalCitations as totalCitations FROM (SELECT affiliation_title, count(*) as externalCitations FROM `ARTICLES` JOIN `Article_Author` ON `ArticleId` = `Article_Author`.`ARTICLES_ArticleID` JOIN `AUTHORS` ON `auth...
true
9a9f044db3f2edb00a3c154691cc33428b79eb07
SQL
boey6172/cbr
/sql/old/remark_reservation_added_01_04_17.sql
UTF-8
1,845
3.09375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Jan 04, 2017 at 10:09 AM -- Server version: 10.1.13-MariaDB -- PHP Version: 5.6.23 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHA...
true
c116794ee4294e4b2385ff372e75abbd68dc9216
SQL
alibaba/innodb-java-reader
/innodb-java-reader/src/test/resources/testsuite/mysql56/pk/tb23.sql
UTF-8
1,311
2.84375
3
[ "Apache-2.0" ]
permissive
DROP TABLE IF EXISTS tb23; CREATE TABLE tb23 ( c1 VARCHAR(30) NOT NULL, c2 VARCHAR(30), c3 VARCHAR(30) NOT NULL, c4 VARCHAR(30), c5 VARCHAR(30) NOT NULL, c6 VARCHAR(30), c7 VARCHAR(30) NOT NULL, c8 VARCHAR(30), c9 VARCHAR(30) NOT NULL, c10 VARCHAR(30), c11 VARCHAR(30) NOT NULL, c12 VARCHAR(30), PRIMARY KEY (c5, c3, c9)...
true
82dbc705059c168fb30efc33c25d14ed5a5c070d
SQL
gicadmin/allo
/PHENIX/Tables/CUSTOMER_PROMOTIONS.sql
UTF-8
8,701
2.71875
3
[]
no_license
CREATE TABLE phenix.customer_promotions ( cpr_id NUMBER(15) NOT NULL, cpr_type VARCHAR2(2 BYTE) NOT NULL CONSTRAINT cpr_type_ck CHECK (CPR_TYPE IN ('PR', 'BA')), cpr_prf_prd_code VARCHAR2(10 BYTE) NOT NULL, cpr_prf_fmt_code VARCHAR2(7 BYTE) NOT NULL, cpr_pty_code NUMBER(3) NOT NULL, cpr_allocation_amount NU...
true
209004d47dbbb460af9ab0bc07cb41a20d1674e2
SQL
ndqk/web_ndqk_master
/laravel .sql
UTF-8
27,901
3.125
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: Aug 31, 2020 at 06:46 PM -- Server version: 10.4.11-MariaDB -- PHP Version: 7.2.30 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIE...
true
fafce508b48250c5e5b493caff87a2795b422aa3
SQL
surfingonrails/sql
/kpi.sql
UTF-8
861
3.765625
4
[]
no_license
-- KPIs - key performance indicators for a company /* ================= Database Schema purchases id int user_id int price real refunded_at text created_at text gameplays id int user_id int created_at text platform text ================= */ -- purchases select * from purchases order by id limit 10; -- game...
true
ec7b26ecc3ceccc3cd0fd5b2d6d52351012c175e
SQL
rodrigo-palermo/ppi1-2019-trforum
/dbforum.sql
UTF-8
5,290
3.78125
4
[]
no_license
-- -- Base de Dados: `forum` -- CREATE DATABASE IF NOT EXISTS `forum` DEFAULT CHARACTER SET utf8 COLLATE utf8_bin; USE `forum`; -- -------------------------------------------------------- -- -- Estrutura da tabela `usuario` -- /*CREATE TABLE IF NOT EXISTS `usuario` ( `id` int(3) NOT NULL AUTO_INCREMENT, `nome` v...
true
df1b93fa636ddc52a011fcdef144fbc773a52c01
SQL
MasayukiOzawa/QueryInsight
/sql/CollectQuery.sql
UTF-8
1,061
3.859375
4
[]
no_license
SET NOCOUNT ON; SELECT SYSDATETIME() AS collect_date, s.session_id, s.status, r.start_time, DB_NAME(s.database_id) AS connect_database_name, DB_NAME(r.database_id) AS request_database_name, s.login_name, s.host_name, s.program_name, r.blocking_session_id, r.wait_type, r.last_wait_type, r.wait_resource, r....
true
39a59579993a8376f78e37c190f6bd528ee1baf1
SQL
mauryarohit002/CI
/crud1/rohit.sql
UTF-8
1,557
2.9375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.2.7.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Aug 03, 2018 at 07:01 AM -- Server version: 5.6.20 -- PHP Version: 5.5.15 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */...
true
bce65b55074794d93ef5ded5447e4da0d858ff18
SQL
njmube/CSE_PL-SQL
/20160708 - Pago Anticipado con Reparto de Ahorro/Reestablecer registros.sql
UTF-8
3,097
3.75
4
[]
no_license
DELETE FROM ATET_SB_SAVINGS_TRANSACTIONS WHERE ATTRIBUTE7 = 'REPARTO DE AHORRO'; DELETE FROM ATET_SB_SAVINGS_TRANSACTIONS WHERE ELEMENT_NAME = 'INTERES GANADO'; DELETE FROM ATET_SB_MEMBERS_ACCOUNTS WHERE ACCOUNT_DESCRIPTION = 'INTERES GANADO'; COMMIT; SELECT LOAN_ID, MEMBER_ID, MEMBER_ACCOUNT_ID, ...
true
6996c5f16aabef4713782c897e8a250a5c9ca4df
SQL
wasantos/dlkbigdata
/dl-scala/src/main/resources/pe/com/belcorp/datalake/resources/analytics/dwh/DEbelista/update_new.sql
UTF-8
1,573
3.5
4
[]
no_license
UPDATE ?tableName SET ANIOCAMPANAPRIMERPEDIDOWEB = update_source.ANIOCAMPANA, FLAGCORREOVALIDADO = update_source.FLAGCORREOVALIDADO FROM ( SELECT tmp.CODEBELISTA, tmp.CODPAIS, agg_flagcorreovalidado.FLAGCORREOVALIDADO, agg_aniocampanaprimerpedidoweb.ANIOCAMPANA FROM ?tableName tmp LEFT JOIN ?f...
true
9d94fac761f735fb03469345ebda085ea247a47d
SQL
senorspielbergo/db_repo
/Abgabe/SQLStatements/Q6.sql
ISO-8859-1
2,765
4.3125
4
[]
no_license
/* * Berechnet pro Wahljahr die hchstens zehn Direktkandidaten jeder Partei, die mit knappstem Vorsprung an Erststimmen gewonnen haben; wenn eine Partei keinen Wahlkreis gewonnen hat, werden stattdessen die Direktkandidaten zurckgegeben, die am knappsten verloren haben. * Eingabe: %partei% = {p | p in Partei.name} , %w...
true
c293c7882a97d1b7ff904df38763353b77fd1d86
SQL
E7su/vulpix
/vulpix.sql
UTF-8
1,386
3.875
4
[]
no_license
-- active AK SELECT COUNT(vul.CUS) FROM (SELECT DISTINCT v.CUS FROM Vulpix AS v WHERE v.date_last_login_ak IS NOT NULL AND v.date_last_login_ak > STR_TO_DATE('2016-07-01', '%Y-%m-%d')) vul; -- todo -- active AM SELECT COUNT(vul.CUS) FROM (SELECT DISTINCT v.CUS FROM Vulpix AS v WHERE v.date_las...
true
caf54448ea71e21af3d861b6c9b11986fbe79b77
SQL
silence-do-good/stress-test-Postgres-and-MySQL
/dump/high/day19/select0245.sql
UTF-8
178
2.671875
3
[]
no_license
SELECT timeStamp, temperature FROM ThermometerOBSERVATION o WHERE timestamp>'2017-11-18T02:45:00Z' AND timestamp<'2017-11-19T02:45:00Z' AND temperature>=31 AND temperature<=78
true
bf43aa3210073e43cae717266b8b1e5e6f8363cc
SQL
theseventhman/mybatis-learn
/src/main/resources/static/student.sql
UTF-8
337
2.578125
3
[ "Apache-2.0" ]
permissive
CREATE TABLE `student` ( `id` INT ( 11 ) NOT NULL AUTO_INCREMENT, `name` VARCHAR ( 255 ) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL, `note` VARCHAR ( 255 ) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL, PRIMARY KEY ( `id` ) ) ENGINE = INNODB DEFAULT CHARSET = utf8mb4 COLLATE = ut...
true
e30910c6e4cf00b6122e87e7889ca10319427828
SQL
tcooper-uk/jdbi-example
/src/main/resources/sql/data.sql
UTF-8
1,039
3.890625
4
[]
no_license
CREATE TABLE services ( id BIGSERIAL PRIMARY KEY NOT NULL, name VARCHAR(100) NOT NULL ); CREATE TABLE organisation ( id BIGSERIAL PRIMARY KEY NOT NULL, name VARCHAR(150) NOT NULL ); CREATE TABLE users ( id BIGSERIAL PRIMARY KEY NOT NULL, user_name VARCHAR(50) ...
true
684606f9ae8c0ee71201fd475589f08d251cd40b
SQL
djones01/CHub
/STG_PER_DELIVERY_METHOD_N1.sql
UTF-8
395
2.53125
3
[]
no_license
-------------------------------------------------------- -- DDL for Index STG_PER_DELIVERY_METHOD_N1 -------------------------------------------------------- CREATE INDEX "HCM_ADMIN"."STG_PER_DELIVERY_METHOD_N1" ON "HCM_ADMIN"."STG_PER_DELIVERY_METHOD" ("PERSON_ID", "COMM_DLVRY_METHOD", "COMM_DLVRY_ADDRESS") PCT...
true
c7b0c42892e7a3e2171035874f1595474ef8509d
SQL
alquifran/Ejercicios-telefonica
/SQL/cp-final-consultas.sql
UTF-8
2,750
4
4
[]
no_license
1: Listado de clientes con sus datos bancarios SELECT `clientes`.`nombre` AS 'Nombre', `cuenta_bancaria`.`banco` AS 'Banco', `cuenta_bancaria`.`sucursal` AS 'Sucursal', `cuenta_bancaria`.`digito_control` AS 'Dígito de control', `cuenta_bancaria`.`n_cuenta` AS 'Número de cuenta' FROM `clientes` JOIN `cuenta_bancaria...
true
ef61dcbdeae1527fa972e88ff8792e3b720ebb0f
SQL
gustav2775/practicalDataBase
/final_project/camands_chat.sql
UTF-8
966
3.921875
4
[]
no_license
SELECT * FROM crm.chat; -- сортировка по дате создания к другим таблицам тоже подойдет SELECT * FROM crm.chat where date(at_create) = date(now()); -- вывод чата, текст, дата, имени и фото SELECT c.id AS id, c.`text`, c.to_user_id AS 'to_user', CONCAT_WS(' ', p.first_name, p.last_name) AS name_to, ...
true
5a61ff8a94fee426aebfef2fb01b2c424431f2e2
SQL
LindsayPink/info2180-project3
/schema.sql
UTF-8
1,749
3.484375
3
[]
no_license
DROP DATABASE IF EXISTS scheme; CREATE DATABASE scheme; USE scheme; CREATE TABLE Users( id INT PRIMARY KEY AUTO_INCREMENT, firstname VARCHAR(32) DEFAULT NULL, lastname VARCHAR(32) DEFAULT NULL, password VARCHAR(256) DEFAULT NULL, telephone CHAR(10), email VARCHAR(32) DEFAULT NULL, date_joined DATE ); CREATE TABLE Jo...
true
295214295829ff75b828336a4f16b0e6722d45fe
SQL
federicobozzini/unige-data-warehouse
/project/olapQueries.sql
UTF-8
2,199
4.125
4
[ "MIT" ]
permissive
-- q10 -- select c.name as country, sm.name as shipmethod, round(100.0 * sum(sum (quantity)) over (partition by c.name, sm.name)/ sum(sum (quantity)) over (partition by c.name), 2) from rolap.salebycountry s join rolap.country c on s.countryid = c.countryid join rolap.shipmethod sm on s.shipmethodid = sm.sh...
true
bb01a8488008d09365b86dfc56af586e024940b6
SQL
bftanase/train-my-ear
/src/main/resources/ro/btanase/tests/scripts/lessons.sql
UTF-8
11,698
2.65625
3
[]
no_license
TRUNCATE TABLE LESSON RESTART IDENTITY AND COMMIT NO CHECK; TRUNCATE TABLE LESSON_CHORD RESTART IDENTITY AND COMMIT NO CHECK; INSERT INTO LESSON VALUES(19,'Stage 1 SSR',5,'SINGLE',NULL,NULL); INSERT INTO LESSON VALUES(20,'Stage 2 CQR (A-Am)',5,'SINGLE',NULL,NULL); INSERT INTO LESSON VALUES(21,'Stage 2 CQR (D-Dm)',5...
true
ddc65e6b81d49ed1565013f4c88790909f999a9f
SQL
willansehl/Chicago-Police-Department-Analysis
/Checkpoint 1/src/q1.sql
UTF-8
273
3.796875
4
[]
no_license
-- Select the number of allegations over time, aggregated by year select oa.officer_id, extract(year from oa.start_date) as year, count(*) from data_officerallegation oa join officer_gt gt on oa.officer_id = gt.id group by oa.officer_id, year order by oa.officer_id, year;
true
479d102e65f6105829e3a1d80ee56707d48eea13
SQL
younguoon/Java
/JavaBasic/MettingDay0420/DB/Hyelim.sql
UHC
1,715
3.75
4
[]
no_license
DROP TABLE MEMBER; CREATE TABLE MEMBER ( HAKBUN VARCHAR2(4) PRIMARY KEY, NAME VARCHAR2(15), ADDR VARCHAR2(4), PHONE CHAR(14) ); INSERT INTO MEMBER VALUES('A001', '̱', '', '010-1111-1111'); INSERT INTO MEMBER VALUES('A002', '', '', '010-2222-2222'); INSERT INTO MEMBER VALUES('A...
true
b5fd0d4588875c0c8955131980e1ec93d89a28f3
SQL
gabrielalextx/Sistema-de-Gerenciamento-de-Parque-Tematico
/SQL_Codes/SUBCONSULTA1.sql
UTF-8
181
2.5625
3
[]
no_license
USE parquetematico; SELECT PRO_IdProdutos, PRO_Nome FROM sgpt_produtos WHERE PRO_IdProdutos = (SELECT VENPRO_IdProduto FROM sgpt_prodsvendas WHERE VEN_TipoProdVenda = 'Comida');
true
e9e54482dd48eda2dc1bb978a296da3998df66dd
SQL
NaturalNode/natural
/spec/test_data/wordnet_mini.sql
UTF-8
8,781
3.125
3
[ "LicenseRef-scancode-wordnet", "BSD-3-Clause", "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
PRAGMA foreign_keys=OFF; BEGIN TRANSACTION; CREATE TABLE adjpositions (synsetid integer not null, wordid integer not null, position varchar(2) not null, primary key (synsetid, wordid)); CREATE TABLE adjpositiontypes (position varchar(2) not null, positionname varchar(24) not null, primary key (position)); CREATE TABLE ...
true
948a1dc280a51e1bfd904c28dd1bb177077bb5fe
SQL
zolagz/Tableau
/PostgreSQL/1.2 get_datasource_refresh_and_wait_times.sql
UTF-8
1,773
2.96875
3
[]
no_license
SELECT job.id as job_id, job.progress as progress, CAST(job.args as TEXT) as args, CAST(job.notes as TEXT) as notes, job.updated_at as updated_at, job.created_at as created_at, job.completed_at as completed_at, job.started...
true
ac2934c7bef6228236bb247b271636d1c1200339
SQL
k2y2/trading
/sql/ReportCommission2.sql
UTF-8
756
3.65625
4
[]
no_license
with t (TxnID,ReferenceNo,TradeDate,ClientTradingProfileID,ClientTradingProfileName,ClientCurrencyNameIn,ClientAmountIn,ClientCurrencyNameOut,ClientAmountOut, IntroducerID,IntroducerCommissionRate) as ( select t.id, t.ReferenceNo, t.TradeDate, t.ClientTradingProfileID,t.ClientTradingProfileName,t.ClientCu...
true
717447efab4f9ce0ab2b938edc168e15dab745fb
SQL
StringLiu2/java-las-notas-and-code
/day2/完整性以及。。。.sql
UTF-8
1,911
3.71875
4
[]
no_license
CREATE TABLE student( Id INT PRIMARY KEY, NAME VARCHAR(50) NOT NULL, Sex VARCHAR(10) DEFAULT '女' ); INSERT INTO student VALUES(1,'tom','女'); INSERT INTO student VALUES(2,'jerry',DEFAULT); INSERT INTO student VALUES(3,'zcw',DEFAULT); CREATE TABLE student( id INT PRIMARY KEY, NAME VARCHAR(50) NOT NULL, ...
true
6d96d7c95e10f9acf203300e4d2b89a21a95e8a0
SQL
CrazyRocks/EvaUser
/sql/tables.sql
UTF-8
4,726
3.28125
3
[ "BSD-3-Clause", "Zend-2.0", "PHP-3.01" ]
permissive
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; CREATE DATABASE IF NOT EXISTS `scrapy` DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci; USE `scrapy`; DROP TABLE IF EXISTS `eva_user_profiles`; CREATE TABLE IF NOT EXISTS `eva_user_profiles` ( `userId` int(10) NOT NULL, `site` varchar(255) COLLAT...
true
0cbaaccb9327d1ca79ae1e0714aee84caea8bf27
SQL
AdrielModollo/Aula-MySql
/MySql.sql
UTF-8
3,854
4.1875
4
[]
no_license
SELECT * FROM itens_notas_fiscais WHERE QUANTIDADE > 60 AND PRECO <= 3 SELECT * FROM tabela_de_clientes WHERE NOME LIKE '%Mattos' /* (NOT ((3 > 2) OR (4 >= 5)) AND (5 > 4) ) OR (9 > 0) (NOT ((Verdadeiro) OR (Falso)) AND (Verdadeiro) ) OR (Verdadeiro) (NOT (Verdadeiro) AND (Verdadeiro) ) OR (Verdadeiro) (Falso AND Ver...
true
6b3ece601f4988fa788f40a1e6cdaac21d851aa5
SQL
zmovirzynski/URI-Python
/SQL/2740.sql
UTF-8
159
3.015625
3
[ "MIT" ]
permissive
(SELECT concat('Podium: ', team) as name FROM league WHERE position <= 3) UNION ALL (SELECT concat('Demoted: ', team) as name FROM league WHERE position >= 14)
true
57e88936247b18e60a2d2c4cc47c0fbd55b04205
SQL
DiegoRodriguezTandil/dolibarr_customs
/htdocs/install/mysql/data/llx_c_actioncomm.sql
UTF-8
3,106
2.75
3
[]
no_license
-- Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org> -- Copyright (C) 2003 Jean-Louis Bergamo <jlb@j1b.org> -- Copyright (C) 2004-2009 Laurent Destailleur <eldy@users.sourceforge.net> -- Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be> -- Copyright (C) 2004 G...
true
672535b67ce770d299919f6d582f490fd7f2ee20
SQL
eznibe/north-stock
/db-scripts/upgrade-diciembre11-02.sql
UTF-8
2,143
2.84375
3
[]
no_license
drop table dg_transito_negativo; CREATE TABLE `dg_transito_negativo` ( `id_log` int(11) NOT NULL AUTO_INCREMENT, `id_item` int(11) NOT NULL DEFAULT '0', `id_orden` int(11) NOT NULL DEFAULT '0', `stock_transito_actual` int(11) NOT NULL DEFAULT '0', `stock_transito_nuevo` int(11) NOT NULL DEFAULT '0',...
true
6e80661ef8106701a3d60786fb02f4f61b12d61a
SQL
radtek/Telecommunication
/K7/DataBase/VIEW/V_DISCR_ABON_ADD.sql
UTF-8
1,506
3.421875
3
[]
no_license
CREATE OR REPLACE VIEW V_DISCR_ABON_ADD AS SELECT C.CONTRACT_ID, C.PHONE_NUMBER_FEDERAL, GET_DISCR_ABON_ADD(C.PHONE_NUMBER_FEDERAL) NEW_ABON_ADD, GET_DISCR_ABON_ADD_OPTIONS(C.PHONE_NUMBER_FEDERAL) NEW_ABON_ADD_OPTS, NVL(L.BLOCK_LIMIT, 0) BLOCK_LIMIT, I.BALANCE FROM V...
true
fa8ea7b2ea6e5038de4f8b72271e6d81b5faae5c
SQL
ikibardin/DepositBot
/database/selection/select_history.sql
UTF-8
722
3.703125
4
[]
no_license
SELECT e.event_id AS event_id, b.chat_id AS chat_id, u.user_id AS user_id, u.first_name AS u_first_name, u.last_name AS u_last_name, u.username AS u_username, e.type AS type, e.what AS what, e.descr AS descr, e.date AS datetime, e.is_deleted AS is_deleted FROM e...
true
f8362f479d1f2cc549da482f4eb511d41733bc62
SQL
ZainabIftikhar/CinemaManagementSystem
/Database/StaticData.sql
UTF-8
1,799
2.546875
3
[]
no_license
INSERT into Hall values ('Monachopsis', 50, 0); INSERT into Hall values ('Rubatosis', 50, 0); INSERT into Hall values ('Chrysalism', 50, 0); INSERT into Hall values ('Anecdoche', 50, 0); INSERT into Hall values ('Nodus Tollens:', 50, 0); select *from Hall; insert into Movies values ('Kung Fu Panda 3', 'Animated',...
true
7e7500c6393126ca8b26c99ad4ee485ea742c2d3
SQL
tchenkov/JavaDB-Basics-MySQL
/04. Basic CRUD - Exercise/16. Create View Employees with Job Titles.sql
UTF-8
410
3.546875
4
[ "MIT" ]
permissive
# 16. Create View Employees with Job Titles # # Write a SQL query to create view v_employees_job_titles with full employee # name and job title. When middle name is NULL replace it with empty string (''). USE soft_uni; CREATE VIEW v_employees_job_titles AS SELECT CONCAT_WS(' ', first_name, IFNULL(middle_name, ''),...
true
9c5b25def4c55c6b3299559ece7198e0e1533534
SQL
jqyp/csc-databases
/contest/task4.sql
UTF-8
1,269
4.21875
4
[]
no_license
-- Условие -- Для каждого капитана, выполнявшего полёты найти: -- 1) Суммарное расстояние выполненных им полётов; -- 2) дату, когда суммарное расстояние полётов капитана -- стало равно или превысило половину его суммарного -- расстояния по всем записям. -- -- Результат -- commander TEXT, total_distance NUMERIC, half_di...
true
a3d98fba19c34d6fd8405be8dbb9c6516d4fb316
SQL
ricardorodab/DB
/ProyectoFinal/Entregables/FBD_usuarios_Jimenez_Rodriguez_Taboada.sql
UTF-8
591
3.296875
3
[]
no_license
CREATE USER MIGMOR WITH NOSUPERUSER PASSWORD 'abreu' VALID UNTIL '2099-07-04'; CREATE USER ATD WITH NOSUPERUSER PASSWORD 'jimenez' VALID UNTIL '2099-09-25'; CREATE USER DOR WITH NOSUPERUSER PASSWORD 'taboada' VALID UNTIL '2015-10-11'; GRANT SELECT,DELETE ON juguete,marca TO MIGMOR WITH GRANT OPTION; GRANT SELECT,I...
true
bbc7a5487e61dbb0b2805f2f4457386fdb8cf109
SQL
NSS-Day-Cohort-42/chinook-justha
/8_total_invoices_{year}.sql
UTF-8
302
3.46875
3
[]
no_license
-- 8. How many Invoices were there in 2009 and 2011? -- COUNT all invoices in 2009 and 2011 combined SELECT strftime("%Y", i.InvoiceDate) AS Year, COUNT(i.InvoiceId) AS TotalInvoiceCount FROM Invoice i WHERE i.InvoiceDate LIKE '2009%' OR i.InvoiceDate LIKE '2011%' GROUP BY Year;
true
6c3c2da857061a60adeec3e64d4105ca3dfd5edd
SQL
novikovav2/geekbrains
/DB/lesson10/homework.sql
UTF-8
2,658
4.375
4
[]
no_license
use vk; -- 1. Проанализировать какие запросы могут выполняться наиболее часто в процессе работы приложения и добавить необходимые индексы. -- Так как индекс автоматически создается при использии внешних ключей, то на такие столбцы я индексы не создавал desc target_types; CREATE INDEX cities_name_idx ON cities(name...
true
6b353da83f6d86cbe74127ff7b3d6bc72bb394e5
SQL
CheapestPrice/CheapestPrice
/cheapestPriceMySQL_create.sql
UTF-8
5,490
3.71875
4
[]
no_license
-- Created by Vertabelo (http://vertabelo.com) -- Last modification date: 2017-05-08 04:31:43.022 -- tables -- Table: HORARIOS CREATE TABLE HORARIOS ( id int NOT NULL AUTO_INCREMENT, TIENDAS_id int NOT NULL, horaInicio int NOT NULL, horaFin int NOT NULL, minutosInicio int NOT NULL, minutosFin i...
true
30668dbb4f19c49cd0ecd37eb96fee4b6303ed4d
SQL
louis-li/SQLPA
/SQLDiagConfigurationManager/Source/2008R2SQL2012/SqlDiagWorkFolder/End/SqlScripts/PlanCacheUse.sql
UTF-8
428
3.453125
3
[]
no_license
SELECT 'Single_Used_Plan' as [Type], SUM(CAST(size_in_bytes AS bigint))/1024/1024 AS Size_MB, Count(*) as Total_Plans FROM sys.dm_exec_cached_plans (NOLOCK) WHERE cacheobjtype LIKE '%Plan%' AND usecounts = 1 UNION ALL SELECT 'Multiple_Used_Plan' as [Type], SUM(CAST(size_in_bytes AS bigint))/1024/1024 AS Size_MB, Count(...
true
33d36bd24d356af1984ece3fa250d4e3a3eed428
SQL
pstutz/ldbc_snb_implementations
/postgres/queries/bi/query23.sql
UTF-8
407
3.78125
4
[]
no_license
select dest.pl_name, extract(month from ps_creationdate) as mm, count(*) as cnt from person, post, place dest, country resid where resid.ctry_name = '--1--' and dest.pl_name <> '--1--' and p_placeid = resid.ctry_city and ps_locationid = dest.pl_placeid and p_personid = ps_creatorid group by dest.pl_name, ...
true
36710d226948cf95402597efd4705282961b3487
SQL
arunchaganty/hypatia
/third-party/corenlp/schema.sql
UTF-8
757
2.9375
3
[ "Apache-2.0" ]
permissive
-- Additional SQL things. -- Search Index Triggers (https://www.postgresql.org/docs/current/static/textsearch-features.html#TEXTSEARCH-UPDATE-TRIGGERS) CREATE TRIGGER sentence_searchable_trigger BEFORE INSERT OR UPDATE ON corenlp_sentence FOR EACH ROW EXECUTE PROCEDURE tsvector_update_trigger(searchable, 'pg_...
true
b24bc04c178f26edc0bd6c9f5b2f1770e8ab5a00
SQL
zhengchy/lexadmin
/out/artifacts/FHADMINM_war_exploded/admin/ftl/code/mysql数据库脚本/LEX_QUESTIONMESSAGE.sql
UTF-8
940
3.171875
3
[]
no_license
SET FOREIGN_KEY_CHECKS=0; -- ---------------------------- -- Table structure for `LEX_QUESTIONMESSAGE` -- ---------------------------- DROP TABLE IF EXISTS `LEX_QUESTIONMESSAGE`; CREATE TABLE `LEX_QUESTIONMESSAGE` ( `QUESTIONMESSAGE_ID` varchar(100) NOT NULL, `LAUNCH_USER_ID` varchar(100) DEFAULT NULL C...
true
b14661d5c23bb54ee7770b81a8679bae6a22b36f
SQL
nhemerling/considerate-server
/migrations/003.do.create_considerate_likes.sql
UTF-8
325
3.5625
4
[]
no_license
ALTER TABLE IF EXISTS considerate_friends DROP COLUMN likes; CREATE TABLE considerate_likes ( id SERIAL PRIMARY KEY, like_name TEXT NOT NULL ); CREATE TABLE friend_likes ( friend_id INTEGER REFERENCES considerate_friends(id), like_id INTEGER REFERENCES considerate_likes(id), PRIMARY KEY (friend_id, like_i...
true
d2a095cfe8332e2de664a3bf3a30a9ad9282e0db
SQL
tsabunkar/db_sql_practice
/operators/in.sql
UTF-8
988
4.125
4
[]
no_license
--------------! IN ----------------- -- Allows us to provide a set of values, and check a given column is in that set -- Select all books written by carver or lahiri or smith SELECT * FROM books WHERE author_lname = 'carver' OR author_lname = 'lahiri' OR author_lname = 'smith'; -- both the queries are same SELECT...
true
ed38f829c803dd0df997ab7f9857123eda48b3ab
SQL
perlmaster/RESTAPI
/create_catalog.sql
UTF-8
609
2.703125
3
[]
no_license
###################################################################### # # File : create_catalog.sql # # Author : Barry Kimelman # # Created : November 23, 2017 # # Purpose : Create catalog table # # Notes : (none) # ###################################################################### c...
true
2ccbfbb7b5326bc0e01cd079cbf4da6269e98dbb
SQL
JBdunks/stuff
/third/tarverns3.sql
UTF-8
1,914
4.0625
4
[]
no_license
DROP DATABASE IF EXISTS taverns; CREATE DATABASE taverns; USE taverns; CREATE TABLE locations( location_id INT AUTO_INCREMENT, address INT NOT NULL, street VARCHAR(50) NOT NULL, city VARCHAR(50) NOT NULL, state VARCHAR(2) NOT NULL, PRIMARY KEY(location_id) ); CREATE TABLE taverns( tavern_id...
true
287b1e9c9cc5ac35ffc56bae103df333bda26b4f
SQL
tautvydascoding/2017-06-kurso-medziaga-tautvydas
/uzduotys/MAMP/PROJEKTAI/Paulius/samoningai.sql
UTF-8
8,750
2.921875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.7.0 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3306 -- Generation Time: Jul 18, 2017 at 01:51 PM -- Server version: 5.6.34-log -- PHP Version: 7.0.19 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OL...
true
2cba137123cc391930c8592123a841077d4032d4
SQL
Ngan111/C0620G1-Module-3
/3.Thao_tac_CSDL/Bai_tap/library_management.sql
UTF-8
1,519
4.25
4
[]
no_license
create database library_management; use library_management; create table student ( student_IDnumber int auto_increment, student_name varchar(30), email varchar(20), image varchar(50), primary key (student_IDnumber) ); create table book ( book_id int primary key, book_name varchar(20), category_number int, foreign key ...
true
1714340f831b2541355258794a2a25431214c459
SQL
InsideCI/sus
/cinside.sql
UTF-8
1,454
3.328125
3
[ "MIT" ]
permissive
-- noinspection SqlNoDataSourceInspectionForFile CREATE DATABASE sigaa_ufpb; \c sigaa_ufpb; CREATE TABLE centros ( id INT NOT NULL PRIMARY KEY, nome VARCHAR (100) NOT NULL ); CREATE TABLE departamentos ( id INT NOT NULL PRIMARY KEY, nome VARCHAR (100) NOT NULL, id_centro INT ...
true
9e77b82d2393f9e98adc58f382c23cbec8052e52
SQL
Kirito055/TalgatAdilkhan
/sqlcode/sql.sql
UTF-8
6,317
3.625
4
[]
no_license
# CREATE TABLE `javalastfinal`.`question` # ( # `question_id` BIGINT(10) NOT NULL AUTO_INCREMENT, # `question` TEXT NOT NULL, # `answerA` VARCHAR(255) NOT NULL, # `answerB` VARCHAR(255) NOT NULL, # `answerC` VARCHAR(255) NOT NULL, # `answerD` VARCHAR(255) NOT NULL, #...
true
fafc317a65590eccdb78a1e8cbfcfeea211c4ff6
SQL
JeremyBakker/chinook-JeremyBakker
/top_3_artists.sql
UTF-8
274
4.375
4
[]
no_license
SELECT ar.Name "Artist", COUNT(il.InvoiceLineId) "Sales Count" FROM Artist ar LEFT JOIN Album al ON ar.ArtistId = al.ArtistId LEFT JOIN Track t ON al.AlbumId = t.AlbumId INNER JOIN InvoiceLine il ON t.TrackId = il.TrackId GROUP BY ar.Name ORDER BY "Sales Count" DESC LIMIT 3
true
d4bb453f25430535059bbf42c82e63020a7ff078
SQL
sangdon1984/sql
/고급SQL문제01.sql
UTF-8
204
2.984375
3
[]
no_license
use employees; desc titles; select * from titles; select * from titles where to_date = '9999-01-01'; alter table titles add index idx_ysd (to_date); select * from titles where to_date = '9999-01-01';
true
3845435e4f9d1801e8ceff0da1b07d3ffa4a4317
SQL
edelay12/graphql-budget
/migrations/001.do.create_expenses_table.sql
UTF-8
195
2.515625
3
[]
no_license
create TABLE expenses ( id SERIAL PRIMARY KEY, expense_name Text not null, category text, amount NUMERIC, user_id NUMERIC, date_created TIMESTAMP NOT NULL DEFAULT now() )
true
984bcb123f7255c5ab1024b6417bc800245ed069
SQL
sunil10000/GeoSpatialCarNetwork
/GenerateData/ddl.sql
UTF-8
2,878
3.796875
4
[ "MIT" ]
permissive
--enable postgis CREATE EXTENSION if not exists postgis; --enable hstore CREATE EXTENSION if not exists hstore; /* WILL BE ADDED ONLY IF NEEDED -- enable raster support (for 3+) CREATE EXTENSION if not exists postgis_raster; -- Enable Topology CREATE EXTENSION if not exists postgis_topology; -- Enable PostGIS Advance...
true
54a71a9a48354f261d9af2a9625d632daacaf159
SQL
ldantes/Database_Ass1
/enter_review.sql
UTF-8
560
3.1875
3
[]
no_license
SET SERVEROUTPUT ON DECLARE u_ID users.id%type:= '&Enter_UserID'; t_ID title.id%type:='&Enter_title_Id'; u_Score review.score%type:='&Enter_score'; u_Rev review.review%type:='&Enter_Review'; u_count number; BEGIN select count(*) into u_count from review where user_id = u_ID and title_id = t_id; if(U_c...
true
6f83e923b205a90fb19f6f9927ef235c0b4076a3
SQL
andreneves/BDII
/arquivo/TEMP.sql
UTF-8
12,182
4.40625
4
[]
no_license
SET NAMES utf8mb4; SET FOREIGN_KEY_CHECKS = 0; -- ---------------------------- -- Table structure for perfil -- ---------------------------- DROP TABLE IF EXISTS `perfil`; CREATE TABLE `perfil` ( `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'identificador com autoincremento', `nome` varchar(255) CHARACTER SET lat...
true
8b07d19c9f44820e121fb5a34406feaa695ce85a
SQL
Rajagunasekaran/Code-Backup
/OLD PROJECT SQL/CMTS REMOVED SP'S/USER/WITHOUT CMT/SP_LOGIN_TERMINATE_SAVE_VER0.3_14052014.SQL
UTF-8
2,646
3.921875
4
[]
no_license
DROP PROCEDURE IF EXISTS SP_LOGIN_TERMINATE_SAVE; CREATE PROCEDURE SP_LOGIN_TERMINATE_SAVE (IN LOGINID VARCHAR(40), IN ENDDATE DATE, IN REASON TEXT, IN USERSTAMP VARCHAR(50), OUT SUCCESS_FLAG INTEGER) BEGIN DECLARE RECVER INTEGER; DECLARE MINID INTEGER; DECLARE MAXID INTEGER; DECLARE TEMPTBL_LOGINID TEXT; DECLARE TEMP_...
true
75437105b961355aaad58399442984105d7bcb2c
SQL
Ahmed-Hussein-Karam/Employees-System
/employees-system.sql
UTF-8
4,580
3.28125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.3 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Oct 22, 2018 at 03:13 AM -- Server version: 8.0.11 -- PHP Version: 7.2.9 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTE...
true
62a6b364e810243b03ade4c26652a34ecd1a7ebc
SQL
silence-do-good/stress-test-Postgres-and-MySQL
/dump/high/day10/select1209.sql
UTF-8
178
2.609375
3
[]
no_license
SELECT timeStamp, temperature FROM ThermometerOBSERVATION o WHERE timestamp>'2017-11-09T12:09:00Z' AND timestamp<'2017-11-10T12:09:00Z' AND temperature>=40 AND temperature<=49
true