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
84bf3a891dcc4f82e32ed126ae5210aab8b5c585
SQL
samuelnoye/intermediate_book_storei_ndexes
/script.sql
UTF-8
1,432
4.125
4
[]
no_license
SELECT * FROM customers LIMIT 10; SELECT * FROM orders LIMIT 10; SELECT * FROM books LIMIT 10; SELECT * FROM pg_Indexes WHERE tablename = 'customers'; SELECT * FROM pg_Indexes WHERE tablename = 'orders'; SELECT * FROM pg_Indexes WHERE tablename = 'books'; EXPLAIN ANALYZE SELECT customer_id, quantity FROM orders WHERE...
true
1fce3b0eea0ed248e5794a464231b3394fdecc77
SQL
WiamSalaheldin/MySql
/task1.sql
UTF-8
543
2.890625
3
[]
no_license
create table challenge_db.Emplyees (Emp_id int primary key auto_increment not null, First_name varchar(40) not null, Last_name varchar(40) not null, Email varchar(50) not null unique, Job_Title varchar(40) not null, Hire_date date not null, Salary decimal(15000,50000)) create table challenge_db.Customers (Cust_id int ...
true
b991876b9fdeb0fd62ebd0b26611cf7c1665d58f
SQL
maria-aoliveira/ATSuprimentos
/Produtos/src/main/resources/schema.sql
UTF-8
303
2.828125
3
[]
no_license
-- DROP SCHEMA produto; CREATE SCHEMA produto; -- produto.produto definition -- Drop table -- DROP TABLE produto.produto; CREATE TABLE produto.produto ( id bigint NOT NULL, categoria varchar(255) NULL, foto varchar(255) NULL, nome varchar(255) NULL, CONSTRAINT produto_pkey PRIMARY KEY (id) );
true
625fdb63bf6eb3d7fe0898cec0ae0788018da407
SQL
victoryckl/w3cschool
/sql/localhost/test/test.sql
UTF-8
412
2.8125
3
[ "Apache-2.0" ]
permissive
/* CREATE TABLE `account_tbl` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(50) DEFAULT NULL, `money` double DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `u_name` (`name`) ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8; INSERT INTO account_tbl (`id`, `name`, `money`) VALUES ('1', 'tom', ...
true
a7fa95a8e988086389310d98c6f274e1bf5a9ca6
SQL
quasiyoke/ask-pupkin
/conf/sphinx-search-view.sql
UTF-8
350
3.359375
3
[]
no_license
create or replace view search_catalog as select q.id as question_id, r.id as response_id, t.id as tag_id, q.title as question_title, q.text as question, t.text as tag, r.text as response from ask_question q right join ask_response r on r.question_id = q.id right join ask_question_tags qt on qt.question_id = q.id join a...
true
e231e9032b5276b616d732f2f42d2fe6d95ac0bc
SQL
hpminhquan/DKDA
/login/database/qlda.sql
UTF-8
4,677
2.9375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.6.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Nov 19, 2017 at 02:52 PM -- Server version: 5.7.14 -- PHP Version: 5.6.25 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */...
true
a216901676219c1bcc9c51cb3724561fa9c74be1
SQL
maduhu/MARLO-CIAT
/marlo-ciat/marlo-ciat-web/src/main/resources/database/migrations/V1_0_0_20161124_1140__AddTable_Research_Impact_Beneficiaries.sql
UTF-8
1,613
3.578125
4
[]
no_license
SET FOREIGN_KEY_CHECKS=0; -- ---------------------------- -- Table structure for research_impact_beneficiaries -- ---------------------------- DROP TABLE IF EXISTS `research_impact_beneficiaries`; CREATE TABLE `research_impact_beneficiaries` ( `id` int(11) NOT NULL AUTO_INCREMENT, `impact_id` int(11) DEFAULT NULL,...
true
c20f3a88f9814febbd592722b6efb612370983ee
SQL
n-app/booking-service
/database/schema.sql
UTF-8
1,236
3.5
4
[]
no_license
use nappbooking; DROP TABLE IF EXISTS users; CREATE TABLE users ( id INT NOT NULL AUTO_INCREMENT, userName VARCHAR(100) NOT NULL, PRIMARY KEY (id) ); DROP TABLE IF EXISTS owners; CREATE TABLE owners ( id INT NOT NULL AUTO_INCREMENT, ownerName VARCHAR(100) NOT NULL, PRIMARY KEY (id) ); DROP TABLE IF EXI...
true
47339b854fa3e33a3b87476c20c1c276bfd9f018
SQL
tingley/globalsight
/main6/tools/install/data/ERs/8.6.4.0/GlobalSight_8.6.4.0.3.sql
UTF-8
4,020
3.8125
4
[]
no_license
# GBS-3956: add last usage date to tm. # GBS-3676: Record job name at TUV level in Translation Memory. # GBS-3650: context matching needs review. DELIMITER $$ DROP PROCEDURE IF EXISTS upgradeForGBS3676$$ CREATE PROCEDURE upgradeForGBS3676() BEGIN DECLARE done INTEGER DEFAULT 0; DECLARE companyId BIGINT(20) DEFAULT...
true
c3e10eb510c41c305c339c363c8116b07511d864
SQL
SONGYI-chen123/spring-student-manage
/src/main/resources/db/migration/V202104062120__Create_course_Info_table.sql
UTF-8
403
2.96875
3
[]
no_license
DROP TABLE IF EXISTS `course`; CREATE TABLE `course` ( `id` VARCHAR(32) NOT NULL COMMENT '主键', `student_id` VARCHAR(32) NOT NULL COMMENT '学生id', `name` VARCHAR(32) NOT NULL COMMENT '课程名称', `semester` VARCHAR(32) NOT NULL COMMENT '课程所上学期', PRIMARY KEY (`id`) USING BTREE ) ENGINE=InnoD...
true
cea9fc3f6e46e96ac9c3e4d45813931581dda6f4
SQL
kpse/web-1
/conf/evolutions/default/68.sql
UTF-8
1,040
3.5
4
[]
no_license
# --- !Ups -- case class Goods(id: Option[Long], name: Option[String], short_name: Option[String], unit: Option[String], max_warning: Option[String], -- min_warning: Option[String], warehouse_id: Option[Long], stock_place: Option[String], memo: Option[String]) CREATE TABLE goods ( uid INT(1...
true
c7e4116860baaba2b5b7b4e8ee8b174a1cf9ec95
SQL
InkaH/paarma
/paarma/src/test/resources/db/sql/create.sql
UTF-8
346
3.296875
3
[]
no_license
CREATE TABLE users ( id INTEGER IDENTITY PRIMARY KEY, firstname VARCHAR(30), lastname VARCHAR(50) ); CREATE TABLE reservations ( id INTEGER IDENTITY PRIMARY KEY, userId INTEGER, startDate DATE, endDate DATE, numPeriods INTEGER, tablenum VARCHAR(20), tableprice DOUBLE, FOREIGN KEY (userId) ...
true
87d10836670c2b86fe64c030c3130b6dfe95989a
SQL
radtek/abs3
/sql/mmfo/bars/Table/ins_deal_scans.sql
WINDOWS-1251
4,155
3.328125
3
[]
no_license
PROMPT ===================================================================================== PROMPT *** Run *** ========== Scripts /Sql/BARS/Table/INS_DEAL_SCANS.sql =========*** Run ** PROMPT ===================================================================================== PROMPT *** ALTER_POLICY_INFO...
true
ab77846771ea05c713b5328a69349d28b08499ac
SQL
SEKA1981/DE_SnowFlake
/DE_CUSTOMER_DATA_LOAD.sql
UTF-8
567
2.703125
3
[]
no_license
USE WAREHOUSE CUST_WH; USE DATABASE DE_DB; put file://D:\SFE\customer_data_3.csv @DE_STAGE auto_compress=true; USE WAREHOUSE CUST_WH; USE DATABASE DE_DB; CREATE or REPLACE file format CUSTFORMAT type = 'CSV' field_delimiter = ',' skip_header = 1; COPY INTO TDW_DW.CUSTOMER ( CUSTOMER_ID, GENDER, AGE, ANNUAL_INCOM...
true
bbe36631628305b43230985e92163f4d4ad3d4c2
SQL
HUMANIAM/OS_DB_NW
/DB/SQL/networkQueries.sql
UTF-8
3,676
4.875
5
[]
no_license
-- all those queries written without using views and that results in queries with inefficient execution /*Q : Find the name and grade of the student(s) with the greatest number of friends. */ select name, grade from Highschooler join (select ID1, count(*) as frsPerstd from Friend group by ID1) on ID = ID1 where not exi...
true
7c7fd9a93de7a7334fd9081251e55408c2e5aee2
SQL
josueolvera/respaldo
/Dump/BID_NEW_TABLES_FIELD.sql
UTF-8
2,723
3.140625
3
[]
no_license
CREATE DATABASE IF NOT EXISTS `BID_NEW` /*!40100 DEFAULT CHARACTER SET utf8 */; USE `BID_NEW`; -- MySQL dump 10.13 Distrib 5.6.27, for debian-linux-gnu (x86_64) -- -- Host: 192.168.1.149 Database: BID_NEW -- ------------------------------------------------------ -- Server version 5.5.41-MariaDB /*!40101 SET @OLD_...
true
840ac23a316434c22d8141b3dffcb5df5096c6f0
SQL
fernandovb/ERP-RCP
/BancoDeDados/log_rcp.sql
UTF-8
3,880
2.890625
3
[]
no_license
-- MySQL dump 10.13 Distrib 8.0.11, for Win64 (x86_64) -- -- Host: localhost Database: log_rcp -- ------------------------------------------------------ -- Server version 8.0.11 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!...
true
a320b3c6f3a069cce91526b74f46c19ee4097743
SQL
vira-romanko/herku_test_data
/database/db_favthings.sql
UTF-8
3,463
3.515625
4
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.9.0.1 -- https://www.phpmyadmin.net/ -- -- Host: localhost:8889 -- Generation Time: Oct 31, 2019 at 07:49 PM -- Server version: 5.7.26 -- PHP Version: 7.3.8 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLI...
true
44356225fc956e022e9a0214d1187b9ceb479120
SQL
cintyafransisca/proyek
/proyek.sql
UTF-8
5,545
3.328125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.1.12 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Jul 28, 2020 at 04:34 PM -- Server version: 5.6.16 -- PHP Version: 5.5.11 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;...
true
7d944a9d3a056d6e0594d435ec33c7c7b5d93d5a
SQL
sea-kg/seakgWebHomeCollections
/sql/full_20130504_collection_books.sql
UTF-8
2,306
3.359375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 3.4.10.1deb1 -- http://www.phpmyadmin.net SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COL...
true
db6db37cfec29ba4cc89abc78158eec8d1d09c85
SQL
fandashtic/arc_chennai
/Sivabalan-SQL/SQL_STORED_PROCEDURE/Sp_InsertInvoiceReasons.sql
UTF-8
471
3.125
3
[]
no_license
Create Procedure Sp_InsertInvoiceReasons (@Type Nvarchar(255),@Reason Nvarchar(255),@Active Int) As Begin If Not Exists(Select 'x' From InvoiceReasons Where [Type] = @Type And Reason = @Reason) Begin Insert Into InvoiceReasons ([Type],Reason,Active,CreationDate,ModifiedDate) Select @Type,@Reason,@Active,Get...
true
40416c0fa0a45020dbd93e337a7b30221d9191e2
SQL
lavoisierkai/Airflow-Dags
/SQL/cbo_report_order.sql
UTF-8
6,626
4
4
[]
no_license
/* ----- params start ----- database : access_aus_bi table_name : cbo_report_order if_exist : replace schedule_interval : 5 8 * * * ----- params end ----- */ -- @@ v3 order -- add seller count -- @@@ Use this WITH t_main AS ( SELECT t_order.created_at, LEFT(t_order.created_at,10) AS `datetime_day`, CONCAT...
true
14a11a7f7d4a654f6dfd42edcf5b89964c5472de
SQL
topcoder-platform/tc-terms-service
/src/main/resources/sql/terms/docusign/get_docusign_envelope.sql
UTF-8
275
2.859375
3
[]
no_license
SELECT docusign_envelope_id AS docusignEnvelopeId, docusign_template_id AS docusignTemplateId, user_id AS userId, is_completed AS isCompleted FROM informixoltp\:docusign_envelope WHERE user_id = :userId AND docusign_template_id = :templateId AND is_completed = 1
true
4c65e4221b3bf4cdbdc84aab552c28a85671809f
SQL
Leonard-Boante-Mensah/SQL_FOR_INTERVIEW_PREPARATION
/trends_in_startups.sql
UTF-8
923
3.40625
3
[]
no_license
SELECT * FROM startups; -- ANSWER: 10 SELECT COUNT(*) FROM startups; -- ANSWER: 70 SELECT SUM(valuation) AS value FROM startups; -- ANSWER: 974455790000 SELECT MAX(raised) AS highest_amount FROM startups; -- ANSWER: 11500000000 SELECT MAX(raised) FROM startups WHERE stage='Seed'; -- ANSWER: 1800000 SELECT MIN(foun...
true
9c61edae25bba8fa1bf5d89bc6a066e422c18640
SQL
yudantoanas/tanijoy-api
/db/migrations/20180726231559_job_positions-table.sql
UTF-8
659
3.484375
3
[]
no_license
-- +goose Up -- SQL in section 'Up' is executed when this migration is applied CREATE TYPE job_position_labels as ENUM ('Internship', 'Career'); CREATE TABLE job_positions( id SERIAL PRIMARY KEY, category_id INTEGER REFERENCES job_position_categories (id) ON DELETE SET NULL, name VARCHAR (50), descrip...
true
5f3e4061d83b16a97b3629c0d0343ac63bc2c361
SQL
fengwenyi/springcloud-alibaba-demo
/sql/user.sql
UTF-8
445
2.75
3
[ "MIT" ]
permissive
CREATE TABLE `t_user` ( `id` bigint(20) NOT NULL, `name` varchar(255) COMMENT '姓名', `balance` decimal(11, 2) COMMENT '余额', `create_time` datetime COMMENT '创建时间', `update_time` datetime COMMENT '更新时间', PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4; INSERT INTO `user...
true
88dd2a322943ecdbfa05a1cb6d03e1e851abb9df
SQL
CUBRID/cubrid-testcases
/sql/_24_aprium_qa/_01_i18n/issue_8393_position/cases/_instr_01.sql
UTF-8
950
2.78125
3
[ "BSD-3-Clause" ]
permissive
--+ holdcas on; set names utf8; drop table if exists t; create table t (i int, s string collate utf8_de_exp_ai_ci); insert into t values (1,'Ae_oE_Ue _ß_Ae_oE_Ue _ß'); insert into t values (2,'AE_OE_UE_SS_AE_OE_UE_SS'); insert into t values (3,'Äx_ö_ü_ss_Äx_ö_ü_ss'); insert into t values (4,'ä_Ö_Ü_ß ä_Ö_Ü_ß '); selec...
true
09d6365c294d10cf7c6abcdc2aed858559e91e74
SQL
Aidyn120202/Database-Project
/SQL part/pkgFinance.sql
UTF-8
1,481
3.28125
3
[ "LicenseRef-scancode-public-domain" ]
permissive
CREATE OR REPLACE TYPE objRetakeProfit AS OBJECT ( retake_count NUMBER, profit NUMBER ); DROP TYPE objRetakeProfit FORCE; ---------------------------------------------- CREATE OR REPLACE TYPE tblRetakeProfit IS TABLE OF objRetakeProfit; ---------------------------------------------- DROP TYPE tblRe...
true
9a8b1e6fe7712cb9e43fa7d67c61022107946613
SQL
yaobozhang/YF_EB
/会员体系/精准营销/电商v2.0/疾病_活动/脚本/高端会员答谢会活动脚本.sql
UTF-8
11,355
3.796875
4
[]
no_license
--主题:高等级会员答谢会 --BY:大数据管理部 姚泊彰 --DATE: 20200212 --STEP1:选择目标区域,特定条件下的会员,得到会员的生命周期、主消费区域、最后一次消费时间等信息 with t1 as ( select member_id --会员ID ,MEMB_LIFE_CYCLE --生命周期 --,'Act_Place' as memb_place --分析地点标识 ,OFFLINE_LAST_CNSM_DATE --最后一次消费时间 ,MAIN_CNSM_PHMC_CODE --主消费门店 from "_SYS_BIC"."YF_BI.EXT_APP.OTHERS/CV_M...
true
6ad031c27d800f1cdde15d781c774e870cc533af
SQL
silence-do-good/stress-test-Postgres-and-MySQL
/dump/high/day28/select2325.sql
UTF-8
178
2.6875
3
[]
no_license
SELECT timeStamp, temperature FROM ThermometerOBSERVATION o WHERE timestamp>'2017-11-27T23:25:00Z' AND timestamp<'2017-11-28T23:25:00Z' AND temperature>=37 AND temperature<=62
true
f2707bf06c0fd9a6ae1c6ee822ee0b491c09876c
SQL
Srujan-DiagonalMatrix/Spark-Scala
/src/main/HIVE/queries/query13.sql
UTF-8
551
2.9375
3
[]
no_license
-- This module is to insert eccr_egl hive table USE ${MBNA_CUS_MIG_HIVE_DB_NAME}; INSERT INTO TABLE ${MBNA_CUS_MIG_HIVE_DB_NAME} PARTITION(month) SELECT trim(urn), trim(record_id), trim(ref_type_no), trim(channel_cd), trim(account_no), trim(prod_account_no), trim(user_id), cast(regex_replace(concat(re...
true
5798cad17d7f9694d5fcf2b26f89d84e9faf6225
SQL
silence-do-good/stress-test-Postgres-and-MySQL
/dump/low/day16/select1852.sql
UTF-8
412
3.609375
4
[]
no_license
SELECT obs.sensor_id, avg(counts) FROM (SELECT sensor_id, date_trunc('day', timestamp), count(*) as counts FROM WiFiAPObservation WHERE timestamp>'2017-11-15T18:52:00Z' AND timestamp<'2017-11-16T18:52:00Z' AND SENSOR_ID = ANY(array['3141_clwa_1431','3145_clwa_5231','3141_clwa_1200','3141_clwd_1100','3141_clwb_...
true
1b55b17200323976bb7eabd7ff57851ac09d4ecc
SQL
DiegoAJS/sistema-antiguos-egresados
/api/_db/procedure_crud_program.sql
UTF-8
4,774
3.84375
4
[]
no_license
USE PGAENG; DELIMITER $$ DROP PROCEDURE `pgaeng`.`crud_table_program`; CREATE PROCEDURE crud_table_program( IN _operation INT, /* operaciones{ 1:create, 2:read, 3:update, 4:delete, 5:find }*/ IN _program_version_id INT, /* id program version */ IN _program_version VARCHAR(120), /* nombre de ...
true
feb069fde10d9425e502a9acfe6e9cd1076eb2ad
SQL
dmitrofanov/orahelper
/db-helper/src/helper/packages/types_s.sql
UTF-8
798
2.828125
3
[]
no_license
CREATE OR REPLACE PACKAGE types AS -- Associative Array of strings TYPE assocstringarray_t IS TABLE OF VARCHAR2(4000) INDEX BY VARCHAR2(4000); -- Associative Array of Associative arry of strings TYPE assocarrayofassocstringarray_t IS TABLE OF VARCHAR2(4000) INDEX BY VARCHAR2(4000); --PROCEDURE asa_add (p_arr assocstri...
true
233d723d8346b4c7f4bfdf671adadadf2aa48528
SQL
LabKey/wnprc-modules
/WNPRC_EHR/resources/queries/study/hematologyMisc.sql
UTF-8
580
2.9375
3
[ "Apache-2.0" ]
permissive
/* * Copyright (c) 2011-2014 LabKey Corporation * * Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0 */ SELECT b.id, b.date, b.testId, --b.runId, b.resultOORIndicator, b.result, b.qualresult, b.remark, b.qcstate, b.taskid FROM study."Hema...
true
a190b1e29689fa4e05410d0c521ac35615e69235
SQL
FeBaumgartel/Programacao-Desktop
/Clinica/cli.sql
UTF-8
1,313
3.15625
3
[]
no_license
CREATE DATABASE Clinica; USE Clinica; CREATE TABLE Endereco( id_Endereco INTEGER NOT NULL AUTO_INCREMENT, cep VARCHAR(9) NOT NULL, Rua VARCHAR(80) NOT NULL, Bairro VARCHAR(90) NOT NULL, Cidade VARCHAR(100) NOT NULL, Complemento VARCHAR(255) NOT NULL, Referencia VARCHAR(255) NOT NULL, Numero INTEGER NOT NULL, ...
true
a4a9107db74c74517505f685446b58ea8907c4c9
SQL
haiquancs/alumni-management-System
/csdl/alumni (1).sql
UTF-8
43,097
3.1875
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.8.3 -- https://www.phpmyadmin.net/ -- -- Máy chủ: 127.0.0.1 -- Thời gian đã tạo: Th12 26, 2018 lúc 04:25 AM -- Phiên bản máy phục vụ: 10.1.35-MariaDB -- Phiên bản PHP: 7.2.9 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*...
true
a411f078a106fc811cbc3751587f063fcd19a4a4
SQL
ak98neon/SmartIOT
/src/main/resources/db/migration/V1_0__init_tables.sql
UTF-8
1,259
3.421875
3
[]
no_license
CREATE TABLE products ( id BIGINT GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY, name VARCHAR(255) NOT NULL, type_product VARCHAR(255), price BIGINT, barcode VARCHAR(255) UNIQUE, created_at DATE, updated_at DATE ); CREATE TABLE users ( id BIGIN...
true
56d1cbe5bc5d0348e5b0a7dd129fe010f93b9ad3
SQL
fgfl/BootcampX
/1_queries/1_total_students_in_cohort.sql
UTF-8
134
2.765625
3
[]
no_license
SELECT COUNT(*) FROM students WHERE cohort_id <= 3; /* can use below WHERE condition as well WHERE cohort_id IN (1,2,3); */
true
5b4504948109c433acdacb6bcae6161f2388ef7c
SQL
edenilson-ruiz/scripts_pospago
/TOOLS/DATA_CLEANING_PAGOHISTORICOCOMISIONES_20190307_1502.sql
UTF-8
618
2.953125
3
[]
no_license
select * update a set A.SUB_CANAL = 'Distribuidor Masivo' from PagoHistoricoComisiones a WHERE SUB_CANAL LIKE '%distri%masivo%' update a set A.SUB_CANAL = 'Distribuidor Corp' from PagoHistoricoComisiones a WHERE SUB_CANAL LIKE '%distri%corp%' update a set A.SUB_CANAL = 'Agencia Tercerizada' from PagoHistoricoComisi...
true
227e35f421d0ae090d5317227b3aadffd224f6e8
SQL
Manousakis01/COVID-19-Case-tracker
/DBManagement/SQLFiles/RandomInserts.sql
UTF-8
999
3.84375
4
[ "MIT" ]
permissive
use CovidDB; create view dates as ( select dateOfTest, Tested.SSN as SSN from Positive, Tested where Positive.SSN=Tested.SSN ); INSERT INTO Tested SELECT SSN, firstName, lastName, dateOfBirth, dateOfTest, location, email, number FROM preTested; INSERT INTO Positive select Tested.SSN from Tested order by dateOf...
true
3063d0722c224595c7aa1619a50c36b635ef30da
SQL
Gabriely-get/code-MySQL
/Stored Procedures/Controle acesso/Procedures-Localidade/sp_selectLocalidade.sql
UTF-8
595
3.390625
3
[]
no_license
delimiter $ create procedure sp_selectLocalidade( in codigo int) begin declare cod int; select cd_localidade from tb_localidade where codigo = cd_localidade into cod; if exists(select cd_localidade from tb_localidade where cd_localidade = codigo) then select l.ds_localidade as Descrição, n.ds_nivel_acesso ...
true
f78d580a1638ee0cd24dfd9ca4ac02534ff2fd92
SQL
rklakshykar/lms
/src/main/resources/db.sql
UTF-8
12,736
3.671875
4
[]
no_license
use library; CREATE TABLE `parameter_types` ( `id` int NOT NULL AUTO_INCREMENT, `name` varchar(255) DEFAULT NULL, `description` varchar(255) DEFAULT NULL, `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY ...
true
abcb92709175e0b3c57b5b9351a89bd5aed6a24f
SQL
ShilinWANG100/dms-smm695
/week-3/webinar-3/whm_3.sql
UTF-8
1,605
4.40625
4
[ "MIT" ]
permissive
-- 1. Get info on rental date by customer: SELECT first_name, last_name, rental_date FROM customer c JOIN rental r ON r.customer_id = c.customer_id; -- 2. Join Actors and Film table: SELECT first_name, last_name, title FROM film_actor fa JOIN actor a ON a.actor_id = fa.actor_id JOIN film f ON fa.film_id = f.film_id L...
true
b70f7ce68ad07ce18d548711beaf5428567902eb
SQL
BytePredator/Ship-Tracker-Server
/ship_tracker.sql
UTF-8
7,461
3.46875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Creato il: Nov 11, 2019 alle 21:54 -- Versione del server: 10.4.8-MariaDB -- Versione PHP: 7.3.11 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_...
true
77b2e8c90ed7ab66ea80deb39925f081c584b35b
SQL
GUSTAVOAZAEL/DesarrolloSoftware1-Lab2
/scriptBDlab2.sql
UTF-8
771
3.453125
3
[]
no_license
create table video( idVideo int primary key, titulo varchar(100), repro int, url varchar(100) ) CREATE PROCEDURE sp_video_insertar @idVideo int, @titulo varchar(100), @repro int, @url varchar(100) AS BEGIN INSERT INTO video VALUES(@idVideo, @titulo, @repro, @url) END EXEC sp_video_insertar 1, 'video 1', 1, '...
true
afc9a4e083b6c70afaaab9fcf5fe73045d7a7e90
SQL
dannyvorton/IS6465-IndividualProject
/database.sql
UTF-8
3,237
3.234375
3
[]
no_license
create table users ( user_id int(11) unsigned auto_increment primary key, first_name varchar(128) not null, last_name varchar(128) not null, email varchar(128) not null, username varchar(128) unique not null, password varchar(128) not null, role varchar(128) not null, points int ) ENGINE...
true
8e392609744142383e88e981888d43ad1520ff60
SQL
ivan196/MySQL
/practicas/tiena_moviles/datos.sql
UTF-8
8,361
2.609375
3
[]
no_license
-- en este otro archivo sql introduciremos los datos -- -- 1 informacion sobre clientes 04897548A 648457856 -- insert into clientes (DNI,nombre,apellidos,telefono,email) values ('72459846X','ivan','tome','692715203','ivantome.ciclos@gmail.com'); insert into clientes (DNI,nombre,apellidos,telefono,email) v...
true
7d5bf1a686677061c197bd5afbf6ed63128ca4d3
SQL
Julian-MJK/CityPop-Lookup
/database/CityPop/data/citypop_database_song.sql
UTF-8
2,382
3.09375
3
[]
no_license
CREATE DATABASE IF NOT EXISTS `citypop_database` /*!40100 DEFAULT CHARACTER SET utf8 COLLATE utf8_bin */; USE `citypop_database`; -- MySQL dump 10.13 Distrib 5.7.17, for Win64 (x86_64) -- -- Host: 127.0.0.1 Database: citypop_database -- ------------------------------------------------------ -- Server version 5.7.2...
true
a9182f0bf2fbccfa1294ddee0b58ad3e1bce10e5
SQL
SKIIII/zm-1
/hpshop/install/goods_sh.sql
UTF-8
1,065
2.734375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.1.8 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: 2019-03-04 08:46:09 -- 服务器版本: 5.6.17 -- PHP Version: 5.5.7 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @O...
true
0d3bf389d8473136083505e6bdb70c5fc19cc479
SQL
GeorgiAnchev/Data-warehouse
/scripts for source db/ClientDistrictForeignKey.sql
UTF-8
193
2.9375
3
[]
no_license
ALTER TABLE dbo.client ADD CONSTRAINT fk_client_district FOREIGN KEY (district_id) REFERENCES dbo.district(district_id); /*ALTER TABLE dbo.client DROP CONSTRAINT fk_client_district; */
true
f5131256952540a388cf68176b51f6416dae8457
SQL
aygalic/Portefeuille-numerique
/Portefeuille Numerique/Premiere Annee/SLAM2/bts/tpemployes/dao/tpemploye.sql
UTF-8
3,704
3.234375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.1.14 -- http://www.phpmyadmin.net -- -- Client : 127.0.0.1 -- Généré le : Jeu 19 Mai 2016 à 18:19 -- Version du serveur : 5.6.17 -- Version de PHP : 5.5.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_...
true
6a6950d751f070674c2ba24cacefb898b45e6e1b
SQL
Lan2010/GitLib
/mining/wakuang-app/code/app-api_php/newSQL/table/d_wx_share.sql
UTF-8
8,282
3.046875
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : 数据库 Source Server Version : 50631 Source Host : 120.25.85.171:3306 Source Database : 20161205 Target Server Type : MYSQL Target Server Version : 50631 File Encoding : 65001 Date: 2018-06-16 10:42:21 */ SET FOREIGN_KEY_CHECKS=0; -- --...
true
3d16641b3bdd5302a5a1bcfbcb17eca00238b6d3
SQL
NavneetPro/Covid19--Data-Exploration-and-Dashboard
/Covid19_DataExploration.sql
ISO-8859-2
5,715
4.15625
4
[]
no_license
/* Covid 19 Data Exploration - avec AlexTheAnalyst (YouTube) Comptences apprises: Joins, CTE's, Temp Tables, Windows Functions, Aggregate Functions, Creating Views, Converting Data Types */ SELECT * From PortfolioProject..CovidDeaths Where continent is not null -- removing values where continent columns has NUL...
true
4e846d64639530c20c0f98c25cd78448765fe769
SQL
sugun-machipeddy/DatabaseDesign
/maxTeamSalaries.sql
UTF-8
102
3
3
[]
no_license
SELECT max(teamSalary) FROM (SELECT avg(salary) as teamSalary FROM Players GROUP BY teamName);
true
6d31413038615edeb39530ffc8906019a8927912
SQL
yashpathack/Learn_SQL
/Aniruddha/21_01_18_V.sql
UTF-8
571
3.875
4
[]
no_license
/* "ROWNUM" clause used in oracle sql versions. Is used to fetch limited number/percentage of records from top or bottom. */ SELECT * FROM Customers WHERE ROWNUM<=3; /* The above query will return top 3 rows. The below query will shop the top 3 rows with country as "Germany". */ SELECT * FRO...
true
cb81eb415cec9c152e762ccfe9465be52280a0bd
SQL
muruiheng/vbp
/vbp-admin/vbp-umc/doc/sql/tb_users.sql
UTF-8
1,208
2.9375
3
[]
no_license
rem tb_users 新增sql语句 rem 2018-4-11 17:00:59 rem mrh rem DROP TABLE tb_users; CREATE TABLE tb_users ( id BigInt not null COMMENT 'ID', userName Varchar (50) not null COMMENT '用户名', password Varchar (100) not null COMMENT '密码', cnName Varchar (50) not null COMMENT '真是中文姓名', cnNamePy Varchar (50) n...
true
683b1203408607aca35b043c22e9bf474f98ef7d
SQL
debanjan2014/osms
/src/main/resources/db/scripts/populateProductionDBMySQL.sql
UTF-8
2,857
3.234375
3
[]
no_license
-- TRUNCATE TABLE products_attr, attr_values, attr, order_items, orders, customers, -- products_to_categories, categories, products, user_roles, users CASCADE; -- ALTER SEQUENCE products_attr_product_attr_id_seq RESTART WITH 1; -- ALTER SEQUENCE attr_values_value_id_seq RESTART WITH 1; -- ALTER SEQUENCE attr_attr_id_s...
true
1d60c1072fb171dc9b72fb39d1d95a242481c8bd
SQL
dolivares14/laboratorio
/laboratorio.sql
UTF-8
4,592
3.0625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 01-04-2021 a las 12:44:40 -- Versión del servidor: 10.4.14-MariaDB -- Versión de PHP: 7.4.10 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
true
cb088d6b967a9ed3b4f7588b6c79c27d71a54a2f
SQL
deividasbarzdenis/Backend-ReactSpring-App
/src/main/resources/db/data.sql
UTF-8
1,132
3.140625
3
[]
no_license
INSERT INTO USER (id, avatar, email, last_name, name, password, phone, username) VALUES (1,'', 'user@email.com', 'useris','useriukas', '{bcrypt}$2y$12$y8uY.LDwuib2e.CFpoEF7.lWcG2P.n33o0jXBBUCc4pykroZn0RvS', '+37060090000', 'user'), (2,'', 'admin@email.com', 'adminas', 'adminukas', '{bcrypt}$2y$12$6C5T4j7HlR8CaokuYbtvMu...
true
574d0fc39cb32f5e0a3645621371cc4836e28cfc
SQL
Benjamin-Jenne/VendorDB
/VendorDB.sql
UTF-8
9,786
4.3125
4
[]
no_license
#Manages the commerce for a chain of small vendors. #Implemented with forward engineering. DROP SCHEMA IF EXISTS `VendorDB`; CREATE SCHEMA `VendorDB`; USE `VendorDB` ; #Item. Items that the vendor sells. CREATE TABLE IF NOT EXISTS `VendorDB`.`ITEM` ( `ItemID` INT NOT NULL AUTO_INCREMENT, `Name` VARCHAR(45) NOT ...
true
4f88573a431bb6845bc26a9cbf0c97cfe655211f
SQL
brentgroves/bpgsql
/howto/mssql/RowNumber.sql
UTF-8
177
3.296875
3
[]
no_license
SELECT first_name, last_name, city, ROW_NUMBER() OVER ( PARTITION BY city ORDER BY first_name ) row_num FROM sales.customers ORDER BY city;
true
19a3339d395e4cc78d2543416c2a343ee4aa073b
SQL
omboub/deployment
/create_tables.sql
UTF-8
11,402
3
3
[]
no_license
SET NAMES utf8; SET time_zone = '+00:00'; SET foreign_key_checks = 0; SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO'; CREATE TABLE `agenda` ( `code_agenda` bigint NOT NULL, `date_debut_agenda` datetime DEFAULT NULL, `date_fin_agenda` datetime DEFAULT NULL, `motif_agenda` varchar(255) COLLATE utf8_bin DEFAUL...
true
46f834219b9d7787c44061c12cf7710ec987d98e
SQL
lfd1109550635/oricle
/test4/实验4.sql
UTF-8
13,414
3.734375
4
[]
no_license
# 实验四 --为用户分配权限和表空间 -- QUOTAS ALTER USER linfuodng233 QUOTA UNLIMITED ON USERS; ALTER USER linfudong233 QUOTA UNLIMITED ON USERS02; ALTER USER linfudong233 QUOTA UNLIMITED ON USERS03; ALTER USER ACCOUNT UNLOCK; --roles GRANT "CONNECT" TO linfuodng233 WITH ADMIN OPTION; GRANT "RESOURCE" TO linfuodng233 WIT...
true
861d979fb6713f17686e09c9eb36fa6d4014aa01
SQL
AungMyoMoeKyi/workflow-system-project
/wfms_new_database.sql
UTF-8
13,833
3.21875
3
[]
no_license
-- MySQL dump 10.13 Distrib 8.0.22, for Win64 (x86_64) -- -- Host: 127.0.0.1 Database: wfms_new_database -- ------------------------------------------------------ -- Server version 8.0.21 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESUL...
true
a04b843fe548ee248d5ee64612a8368bf9204820
SQL
diego0096/holbertonschool-machine_learning
/pipeline/0x02-databases/10-count_shows_by_genre.sql
UTF-8
229
3.703125
4
[]
no_license
-- NUMBER OF SHOWS BY GENRE SELECT tv_genres.name AS genre, COUNT(*) AS number_of_shows FROM tv_genres JOIN tv_show_genres ON tv_genres.id = tv_show_genres.genre_id GROUP BY tv_show_genres.genre_id ORDER BY number_of_shows DESC;
true
fd1b06f5e3ef29254d7afa8aa84ac1c8e2e1f913
SQL
AzzarCM/proyecto-ncapas
/Archivos Extras/basefinalcapas.sql
UTF-8
32,886
3.4375
3
[]
no_license
CREATE TABLE departamento ( id_departamento serial, nombre character varying(150) COLLATE pg_catalog."default", CONSTRAINT id_departamento_pkey PRIMARY KEY (id_departamento) ); CREATE TABLE municipio ( id_municipio serial, nombre character varying(150) COLLATE pg_catalog."default", i...
true
05ff874447bfc8b05e1b47c3e06f97f5f335c02f
SQL
azumarraga/SQLZoo
/sqlzoo.sql
UTF-8
3,754
4.75
5
[]
no_license
-- Using Null -- 1. /* List the teachers who have NULL for their department.*/ SELECT name from teacher where dept IS NULL -- 2. /*Note the INNER JOIN misses the teachers with no department and the departments with no teacher.*/ SELECT teacher.name, dept.name FROM teacher INNER JOIN dept ON (teacher.dept=...
true
3b7186709a5da1918f6b4f6031969c8677aae659
SQL
Olgachis/educa
/src/main/resources/db/migration/V12__add_stats_view.sql
UTF-8
2,914
4.0625
4
[]
no_license
DROP VIEW IF EXISTS progress_data; DROP VIEW IF EXISTS institution_section_data; DROP VIEW IF EXISTS institution_data; DROP VIEW IF EXISTS institution_types; CREATE OR REPLACE VIEW campus_types AS SELECT campus.id, 'internship'::text AS type FROM campus WHERE campus.internship = true UNION ALL SELECT campus....
true
990a016316e0fba888f3820ffb2daf7e93734286
SQL
fabygiacomini/projeto-hamburgueria
/backup.sql
UTF-8
5,432
3.375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.9.0.1 -- https://www.phpmyadmin.net/ -- -- Host: localhost:8889 -- Tempo de geração: 12-Dez-2019 às 01:50 -- Versão do servidor: 5.7.26 -- versão do PHP: 7.3.8 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; -- -- Banco de dados: `banco_hamburgueria` -- CREATE DAT...
true
291f04d7e445c26fe8a70207144cde080f940609
SQL
zz0733/op-gbsql
/history/v1073/companies/V1.0.1.0158__U_api.sql
UTF-8
1,247
3.171875
3
[]
no_license
-- auto gen by bruce 2016-08-23 20:47:11 select redo_sqls($$ ALTER TABLE api ADD COLUMN transferable BOOL; $$); COMMENT ON COLUMN api.transferable IS '开启关闭转账'; DROP VIEW IF EXISTS v_api; CREATE OR REPLACE VIEW "v_api" AS SELECT a1.id, a1.status, a1.order_num, a1.maintain_start_time, a1.maintain...
true
99ea0172e9c4d1b0ff1b0127c9c6977ff79cbf89
SQL
mucollabo/SQLDTest
/p64_48.sql
UTF-8
316
2.671875
3
[]
no_license
-- SQLD yellow book -- p64 48 create table tab1 (c1 number(1), c2 number(1), c3 number(1)); insert into tab1 values(1, 2, 3); insert into tab1 values(null, 2, 3); insert into tab1 values(null, null, 3); desc tab1; select * from tab1; select sum(coalesce(c1, c2, c3)) from tab1;
true
dc0cad4f32faddd3edd5249e35b32c7663f1c847
SQL
8emi95/elte-ik-ab1
/gy/gy02/szeret02.sql
ISO-8859-2
291
2.875
3
[]
no_license
/* SELECT GYUMOLCS FROM SZERET WHERE NEV != 'Micimack'; -- csak gymiket listz... SELECT * FROM SZERET WHERE NEV != 'Micimack'; -- Micimacksakon kvli sorokat listzza */ SELECT distinct GYUMOLCS FROM SZERET MINUS SELECT distinct GYUMOLCS FROM SZERET WHERE NEV = 'Micimack';
true
ec94b2c16d5b7d627a2d992021532d5de102947d
SQL
jcze9/practicas-jcze
/CircularNavigation/hotel.sql
UTF-8
8,373
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: 26-06-2019 a las 03:18:03 -- 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
046294beec150593056be8249cf6af3662da5ee0
SQL
CUBRID/cubrid-testcases
/sql/_04_operator_function/_03_string_op/_002_concatenation/cases/1016.sql
UTF-8
249
2.515625
3
[ "BSD-3-Clause" ]
permissive
--test operator + with varchar and bit, bit varying create class tb( col1 varchar, col2 bit(8), col3 bit varying(8) ); insert into tb values('varchar', b'0001', b'0001'); select col1+col2 from tb; select col1+col3 from tb; drop class tb;
true
9e7b8f359770ffdf66b67f17c821fb1d8499470a
SQL
dobrebogdan/unibuc
/second_year/bd/labs/lab-02/18.sql
UTF-8
122
2.5625
3
[]
no_license
select distinct jobs.job_id, jobs.job_title from jobs, employees where employees.department_id = 30;
true
7fff415aeba906b88ed81dac76c11e5f2b817fd8
SQL
OlafMd/MedCon1.0
/mm-libs/dbaccess/Level 5/CL5_MyHealthClub_Diagnosis/Atomic/Retrieval/SQL/cls_Get_CustomVitals_for_TenantID.sql
UTF-8
1,580
3.109375
3
[]
no_license
Select hec_patient_parameters.Parameter_Name_DictID, hec_patient_parameters.HEC_Patient_ParameterID, hec_patient_parametertype_availableunits.Unit_RefID, hec_patient_parameters.IfFloat_MinValue, hec_patient_parameters.IfFloat_MaxValue From hec_patient_parameters Inner Join hec_patient_parametertypes ...
true
52a00ae8e4bc189c886152e09918e5556a6300b5
SQL
YairPR/Oracle
/Scripts/invalid_obj/inv3.sql
UTF-8
930
3.765625
4
[]
no_license
select 'alter '||object_type||' '||owner||'."'||object_name||'" compile;' from dba_objects where owner = 'OWNER' and object_type = 'MATERIALIZED VIEW' and status <> 'VALID' OR SET SERVEROUTPUT ON BEGIN FOR i IN (SELECT owner,object_name, object_type FROM dba_objects WHERE object_type IN ('MATE...
true
761aab73e14145853edcabb4a8a960f822a8e877
SQL
sethbaldridge87/project2_backup_withoutGIT
/models/schema.sql
UTF-8
327
2.90625
3
[]
no_license
-- Drops the blogger if it exists currently -- DROP DATABASE IF EXISTS my_better_app; -- Creates the "blogger" database -- CREATE DATABASE my_better_app; CREATE TABLE user_info ( id INTEGER NOT NULL AUTO_INCREMENT, name VARCHAR(50), age INTEGER(2), weight INTEGER(3), height INTEGER(7), gender VARCHAR(5), PRIMARY KEY (...
true
2d5c2e04a78d80a699f508b37ad7c99ee9728e7b
SQL
chrispeele79/shoppingList
/challenge-api/prisma/migrations/20211007060559_adding_default_date_time_back/migration.sql
UTF-8
737
3.125
3
[]
no_license
-- RedefineTables PRAGMA foreign_keys=OFF; CREATE TABLE "new_item" ( "id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, "title" TEXT NOT NULL, "description" TEXT NOT NULL, "numberOfItems" INTEGER NOT NULL, "isComplete" BOOLEAN NOT NULL, "createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, ...
true
91f047d03853a37a7ba099798cb61251a7523f96
SQL
helgeh/leonlingua-theme-2016
/mysql-reset-test-tables.sql
UTF-8
2,477
2.6875
3
[]
no_license
# Remove existing test-tables DROP TABLE testll_commentmeta; DROP TABLE testll_comments; DROP TABLE testll_links; DROP TABLE testll_options; DROP TABLE testll_postmeta; DROP TABLE testll_posts; DROP TABLE testll_term_relationships; DROP TABLE testll_term_taxonomy; DROP TABLE testll_termmeta; DROP TABLE testll_terms; DR...
true
23c23203c232525dd3789334290c4c469c6b6bb2
SQL
talitapavlova/AIS
/AIS_Test/transform/Views/Dim_Voyage_T.sql
UTF-8
2,376
3.65625
4
[]
no_license
 /* Change log: 2020-04-21 NP View created */ CREATE VIEW [transform].[Dim_Voyage_T] AS WITH Voyages AS ( SELECT MMSI, ReceivedTime, ETA_month, ETA_day, ETA_hour, ETA_minute, Replace(Destination, '@', '') as Destination, Batch FROM archive.AIS_Data_archive WHERE Destination is not null AND Batch...
true
d06ae1cd7f0c4f1ce63ab7ca4e0e4ce49df5f781
SQL
RaboArchive/Rhudaur
/model/create.sql
UTF-8
651
3.671875
4
[ "MIT" ]
permissive
-- DROP TABLE topics; -- DROP TABLE messages; -- DROP TABLE users; CREATE TABLE IF NOT EXISTS topics ( id INTEGER PRIMARY KEY AUTOINCREMENT, name VARCHAR not null, locked integer, lastMessageDate datetime not null ); CREATE TABLE IF NOT EXISTS users ( username varchar primary key , password varchar not nu...
true
2f254bd698398e494f348b70f39cca11572852d4
SQL
TheLordZee/sql-query-test
/queries_playstore.sql
UTF-8
1,360
3.5625
4
[]
no_license
-- Comments in SQL Start with dash-dash -- -- playstore=# SELECT * FROM analytics WHERE id = 1880; -- playstore=# SELECT id, app_name FROM analytics WHERE last_updated = '2018-08-01'; -- playstore=# SELECT genres, COUNT(*) FROM analytics GROUP BY genres; -- playstore=# SELECT app_name, reviews FROM analytics ORDER B...
true
2a97421184a21c2ec8efa282e17918c84faf39f4
SQL
josgarcam/CursoPythonScriptsBBDD
/11_Join/right_join.sql
UTF-8
89
3.046875
3
[]
no_license
SELECT D.nombre, E.nombre FROM empleados E RIGHT JOIN departamentos D ON E.id_dpto = D.id
true
dc2e8bf50176c77a45ef16566c65307d720af589
SQL
shreyansh-goyal/strapiproject
/dbdump/teacherdb_drives.sql
UTF-8
2,712
3.125
3
[]
no_license
-- MySQL dump 10.13 Distrib 8.0.13, for Win64 (x86_64) -- -- Host: localhost Database: teacherdb -- ------------------------------------------------------ -- Server version 8.0.13 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /...
true
3550923b46673088becd60ce56e9b6788eeae2ae
SQL
williamxin97/SQL-Experience
/RPM Conversion/whirl_inventories.sql
UTF-8
3,620
3.609375
4
[]
no_license
create or replace temporary table whirl_full as ( SELECT A.MEAS_PRD_ID AS STMT_MONTH , a.arr_id_chain as acct , a.bal_eom_amt as bal ,CASE WHEN E.ORG_CDE IN ('226') THEN 'Active - Menards' --RPM1 WHEN E.ORG_CDE IN ('329','222','176','420','800') then 'Inactive - Powersports' --RPM1 when E.ORG_CDE I...
true
570612c9ee82ae46790b87b7b2e1f59dce4447c8
SQL
theproducer/openfortakeout-api
/scripts/migrations/000001_create_businesses_table.up.sql
UTF-8
582
3.0625
3
[]
no_license
CREATE TABLE IF NOT EXISTS public.businesses ( id serial PRIMARY KEY, name TEXT NOT NULL, type TEXT NOT NULL, email TEXT NOT NULL, phone TEXT NOT NULL, details TEXT, hours TEXT, url TEXT, address TEXT, address2 TEXT, city TEXT, state TEXT, zipcode TEXT, location G...
true
ae1000f4a7f86706e3f26846b3a500d6e868ebe1
SQL
sendysucc/z2oSrv
/script/sql/05_proc_loadrobots.sql
UTF-8
384
2.59375
3
[]
no_license
use z2osrv; drop procedure if exists proc_loadrobots; delimiter ;; create procedure proc_loadrobots(IN startIdx INT, IN loadCounts INT) label_loadrob:begin select userid, username, nickname, avatoridx, gender, gold , diamond , disable, isrobot from User where User.isrobot = 1 and User.userid >= ( 900000 + startId...
true
42132a5bd37f336c68a2efc4750f7d906c802dc4
SQL
uhdang/leetcode
/1693_20210504_EASY_SQL_Daily_Leads_and_Partners/solution.sql
UTF-8
163
3.546875
4
[]
no_license
SELECT date_id, make_name, COUNT(DISTINCT lead_id) as unique_leads, COUNT (DISTINCT partner_id) as unique_partners FROM DailySales GROUP BY date_id, make_name;
true
ad39ea21f0ba0a1737932655e1201f3544e60888
SQL
sdwing/lab4
/mysite/bookdb.sql
UTF-8
3,969
3.25
3
[]
no_license
-- MySQL dump 10.11 -- -- Host: localhost Database: bookdb -- ------------------------------------------------------ -- Server version 5.0.96-community-nt /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION...
true
7f73317bec0c70244a53baadb762ff9bd0f2fdc8
SQL
Shukrii/JDBC---DAO
/JDBC-DAO/jdbcuebung.sql
UTF-8
2,560
3.296875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.0.4.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Erstellungszeit: 22. Nov 2013 um 23:16 -- Server Version: 5.5.32 -- PHP-Version: 5.4.19 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET...
true
9cf3932d41ddc63c8479b15807df016590e1aeda
SQL
radtek/Database-3
/oracle/admin/scripts/trigger_onschema.sql
UTF-8
1,081
2.890625
3
[]
no_license
CREATE OR REPLACE TRIGGER trg_logon_dbo_ebalance_reg AFTER LOGON ON dbo_ebalance_regional.schema BEGIN /* 19-FEB-14: Por migracion desde SQL Server, todas las consultas seran case insensitive */ EXECUTE IMMEDIATE ('alter session set NLS_SORT=BINARY_CI'); EXECUTE IMMEDIATE ('alter session set NLS_C...
true
d4213e2928d90002f5bb18dc38a45c8854ae1aec
SQL
joshuanatan/leiter-CRMS
/queries/view_sales_monthly.sql
UTF-8
155
2.640625
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
create view sales_monthly as select sum(total_pembayaran) as total, pembayaran_invoice.* from pembayaran_invoice group by bulan_invoice,tahun_invoice;
true
4fd777b4bc5f2c968706a5ead86da6b77d69eebb
SQL
cornelioroyer/abaco-design
/c_adc_notas_debito.sql
UTF-8
4,247
3.734375
4
[]
no_license
drop table adc_notas_debito_2 cascade; drop table adc_notas_debito_1 cascade; /*==============================================================*/ /* Table: adc_notas_debito_1 */ /*==============================================================*/ create table adc_notas_debito_1 ( compan...
true
08118ebf391b4a7e4c2af4f5e3e14e7b5470043f
SQL
CHUNGCHUNG97/C0221G1-NguyenThiChung
/module3/01_database/exercises/bai_tap_1.sql
UTF-8
472
2.9375
3
[]
no_license
CREATE DATABASE bai_tap; USE bai_tap; drop table class; CREATE TABLE `bai_tap`.`class` ( `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY, `name` VARCHAR(45) null ); CREATE TABLE `bai_tap`.`teacher` ( `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY, `name` VARCHAR(45) null, `age` INT null, `country` VARCHAR(45) null ); drop t...
true
0ba06f9b3b2794889c96b83eb133b557017830b3
SQL
CoreyKoontz/spring-blog
/post-seeder.sql
UTF-8
2,620
3.25
3
[]
no_license
use springblog_db; truncate post_images; truncate post_details; truncate posts; insert into post_details (history_of_post, is_awesome, topic_description) values ('Cras mi pede, malesuada in, imperdiet et, commodo vulputate, justo. In blandit ultrices enim.', true, 'Cat, european wild'), ('In est risus, auctor sed, tr...
true
c19a5ec00955576462a1bf5a24194d24dad64378
SQL
Fukada9905/pythagora
/sql/archives/change_scripts/work/wk_202000_head.sql
UTF-8
1,104
2.984375
3
[]
no_license
delimiter // /** テーブル作成 **/ CREATE TABLE wk_202000_head( work_id int UNSIGNED NOT NULL COMMENT '一時ID' , user_id varchar(20) NOT NULL COMMENT 'ユーザーID' , NOHINYMD date DEFAULT NULL COMMENT '入荷予定日' , JGSCD varchar(10) DEFAULT NULL COMMENT '入荷事業所コード' , JGSNM varchar(50...
true
9a1d44a9c93db9c0357992617ff7c1fd5dd31589
SQL
cqframework/cql-execution
/test/elm/library/data.cql
UTF-8
2,773
3.75
4
[ "Apache-2.0" ]
permissive
// @Test: In Age Demographic parameter MeasurementPeriod default Interval[DateTime(2013, 1, 1), DateTime(2014, 1, 1)) context Patient define InDemographic: AgeInYearsAt(start of MeasurementPeriod) >= 2 and AgeInYearsAt(start of MeasurementPeriod) < 18 // @Test: CommonLib library Common using Simple version '1.0.0' i...
true
0ffb377f663247469b28ade96516977425232f96
SQL
jojo00923/dbSql
/2019_11_05.sql
UHC
9,088
4.0625
4
[]
no_license
-- ĶͰ ־ ش ϼ ϴ -- 201911 --> 30 / 201912 --> 31 -- Ѵ = ϼ -- ¥ --> DD SELECT TO_CHAR(LAST_DAY(TO_DATE(:YYYYMM,'YYYYMM')), 'DD') day_cnt FROM dual; SELECT :yyyymm as param, TO_CHAR(LAST_DAY(TO_DATE(:YYYYMM,'YYYYMM')), 'DD') day_cnt FROM dual; -- ȹ ۼ϶ explain plan for -- ϸ Ǿϴ. SELECT * FROM emp WHERE TO_CHAR...
true