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
e49509e500a0fb2a98aef8673b0bdc01a6b9591d
SQL
maiha/facebook.cr
/src/cli/bundled/sql/AdsInsights.sql
UTF-8
5,011
2.640625
3
[ "MIT" ]
permissive
CREATE TABLE ads_insights ( account_id String, account_currency Nullable(String), account_name Nullable(String), actions_per_impression Nullable(String), activity_recency Nullable(String), ad_bid_type Nullable(String), ad_bid_value Nullable(String), ad_delivery Nullable(String), ad_format_asset Nullab...
true
c89f37e09e536ca98106ef5dc1ac555ea247e9f4
SQL
zzhenyanglu/Git
/SAS/Code written@work/1210_NEWMOVER/000_initiate_cogensia_movers_onetime.sql
UTF-8
2,202
2.8125
3
[]
no_license
/* INITIATE COGENSIA_MOVERS TABLE AS OF 06/22/2015 */ drop table if exists cogensia_movers; drop sequence if exists cac_nm_sequence; create sequence cac_nm_sequence start 1; create table cogensia_movers ( CAC_NM_AREA_CODE_WITH_SUPP_APPL varchar(3), CAC_NM_CARRIER_ROUTE varchar(4), CAC_NM_C...
true
dda106870d62b024be1c8dd13f9c2dd2d75aef69
SQL
redr7ddle/Vietnam-Database-Project
/Database/createdb.sql
UTF-8
2,695
3.109375
3
[]
no_license
-- Adair Kelley, Javier Soza -- adair.kelley@vanderbilt.edu, roberto.j.soza@vanderbilt.edu -- Project 2 SET GLOBAL sql_mode = 'NO_ENGINE_SUBSTITUTION'; DROP DATABASE IF EXISTS vietnamOperations; CREATE DATABASE IF NOT EXISTS vietnamOperations; USE vietnamOperations; -- CREATE TABLE DROP TABLE IF EXISTS vietnam_bombi...
true
a193bce09b5fd201cbf1fdaaabc8fb51aab4adfd
SQL
BillyHao/Azure_DataEngineer
/SQLQuery #Q9 xx.sql
UTF-8
946
4.28125
4
[]
no_license
---9.List of StockItems that the company purchased more than sold in the year of 2015.*** USE WideWorldImporters SELECT sq.StockItemName, pq.purchaseQuantity, sq.saleQuantity FROM ( SELECT ws.StockItemName,SUM(Quantity) AS saleQuantity FROM Warehouse.StockItems AS ws JOIN Sales.OrderLines AS ol...
true
123d20b6893ff56063090ef63fe9e6a30a571c25
SQL
seasarorg/s2buri
/sample/s2buri-orderSample/WEB-INF/db/createdb_maxdb.sql
UTF-8
4,063
3.015625
3
[]
no_license
DROP SEQUENCE BuriBranchID // DROP SEQUENCE BuriDataID // DROP SEQUENCE BuriHistoryID // DROP SEQUENCE BuriPathID // DROP SEQUENCE BuriStatusID // CREATE SEQUENCE BuriBranchID NOMAXVALUE NOMINVALUE NOCACHE NOCYCLE NOORDER // CREATE SEQUENCE BuriDataID NOMAXVALUE NOMINVALUE NOCACHE NOCYCLE...
true
c3eab0331d334c2fb8f16996a863a42ac62ea471
SQL
Yunkong690/PHP_Swoole_Shop
/Sql/php_shop.sql
UTF-8
11,188
3.109375
3
[]
no_license
/* Navicat Premium Data Transfer Source Server : VM-CentOS Source Server Type : MySQL Source Server Version : 50728 Source Host : localhost:3306 Source Schema : php_shop Target Server Type : MySQL Target Server Version : 50728 File Encoding : 65001 Date: 10/06/2021 1...
true
4af20831dc9d11821ed58e0882aeeeab106b8b7d
SQL
Nietzschecat/MessageBoard
/messageboard/db_database.sql
UTF-8
4,801
2.921875
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : db_database14 Source Server Version : 50624 Source Host : localhost:3306 Source Database : db_database16 Target Server Type : MYSQL Target Server Version : 50624 File Encoding : 65001 Date: 2016-01-02 15:37:00 */ SET FOREIGN_KEY_CHECK...
true
0677e8883658f8a7e17711d1e01af621df234562
SQL
837477/MODAKBUL
/database/table/table_post_tag.sql
UTF-8
319
3.375
3
[]
permissive
CREATE TABLE IF NOT EXISTS post_tag( post_id INT NOT NULL, tag_id VARCHAR(20) NOT NULL, PRIMARY KEY(post_id, tag_id), FOREIGN KEY(post_id) REFERENCES post(post_id) ON DELETE CASCADE ON UPDATE CASCADE, FOREIGN KEY(tag_id) REFERENCES tag(tag_id) ON DELETE CASCADE ON UPDATE CASCADE )ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
true
1f20f3b253e89e334a0e26318461f6a9fe60ebf0
SQL
andyfusniak/villasforrent-zend-framework
/schema/Advertisers.sql
UTF-8
1,651
3.359375
3
[]
no_license
CREATE TABLE IF NOT EXISTS Advertisers ( idAdvertiser int(10) unsigned NOT NULL AUTO_INCREMENT, iso2char char(2) CHARACTER SET ascii NOT NULL, idAdministrator int(10) unsigned NOT NULL DEFAULT '100000', username varchar(16) NOT NULL, hash varchar(60) CHARACTER SET ascii DEFAULT NULL, emailAddres...
true
decc96b33fc394cbb57aa57f49ff19aef1ab7d32
SQL
balachandar-paulraj/leetCode_SQL
/shortest_distance_in_a_plane.sql
UTF-8
175
3.65625
4
[]
no_license
select round(min(sqrt(pow((a.x-b.x),2)+pow((a.y-b.y),2))),2) as 'shortest' from (select x,y from point_2d) a inner join (select x,y from point_2d) b on (a.x!=b.x or a.y!=b.y)
true
4fe8851960cd0fefbf1987366b8cdfa7037d9aa6
SQL
jerryzu/aml-sql
/src/07rpt_fxq_tb_ins_gpol_ms.sql
UTF-8
10,515
3.34375
3
[]
no_license
-- ********************************************************************************* -- 文件名称: 07rpt_fxq_tb_ins_gpol_ms.sql -- 所属主题: 中国人民银行反洗钱执法检查数据提取接口 -- 功能描述: 本功能为获取非自然人保单,通过提取得到保单信息,被保人个数,保单标的信息 -- 处理逻辑 -- 由保单中间表(x_rpt_fxq_tb_ins_rpol_gpol),通过保单相关方信息表(edw_cust_ply_party)过滤非自然人保单 -- 通过保单相关方信息表(edw_cust_ply_part...
true
6905ff1a3f12a2c559639715a3dc4e7254d5e182
SQL
reyjrar/DreamCatcher
/sql/schema/upgrade/20150330/plugins/anomaly_question/anomaly_question.sql
UTF-8
349
3.171875
3
[ "BSD-3-Clause" ]
permissive
CREATE TABLE anomaly_question ( question_id bigint NOT NULL, score integer NOT NULL DEFAULT 0, analysis jsonb, CONSTRAINT pki_anomaly_question PRIMARY KEY (question_id), CONSTRAINT fki_anomaly_question FOREIGN KEY (question_id) REFERENCES question (id) MATCH SIMPLE ON UPDATE CASCADE ON DELETE CASC...
true
a677da4c209f904f4cbbce6ffeff531ee2266194
SQL
thirtist/jsp20201103
/WebContent/WEB-INF/sql/record(dml)/dmlEx2.sql
UTF-8
3,082
3.375
3
[]
no_license
CREATE TABLE data_type_ex1( num1 NUMBER, num2 NUMBER(2), num3 NUMBER(3,2) ); INSERT INTO data_type_ex1 (num1) VALUES (0); INSERT INTO data_type_ex1 (num1) VALUES (0.01); INSERT INTO data_type_ex1 (num1) VALUES (9999999999999999); INSERT INTO data_type_ex1 (num2) VALUES (0); INSERT INTO data_type_ex1 (num2)...
true
866bb2aa0bcac8cc8dbc19d506ff68dfa680c12b
SQL
LogLaDog/DatabaseSystemsProject
/examples/constraints.sql
UTF-8
1,053
3.546875
4
[]
no_license
CREATE TABLE albums_bak ( AlbumId INTEGER PRIMARY KEY, Title NVARCHAR(160), ArtistId INTEGER ); CREATE TABLE albums_bak( AlbumId INTEGER, Title NVARCHAR(160), ArtistId INTEGER, PRIMARY KEY (AlbumId, Title) ); CREATE TABLE albums_bak ( AlbumId INTEGER NOT NULL PRIMARY KEY, ...
true
6dc4c5d38bd87371aaaf4609c484a8140d2e334e
SQL
batego/Soporte_Fintra
/Ticket# 3307_MODICICACION APLICATIVO ADMINITRATIVO TODAS LAS EMPRESAS.sql
UTF-8
3,322
3.171875
3
[]
no_license
select * from administrativo.aseguradora limit 100 --Carga Macroproceso SELECT id, descripcion FROM proceso_meta WHERE descripcion!='' ORDER BY descripcion 14 'ADMINISTRATIVO' 22 'APRENDIZ SENA' 10 'DIRECCIÓN' 21 'ERP' 11 'FINANCIERO' 12 'GESTIÓN COMERCIAL' 15 'GESTIÓN HUMANA' 20 'OPERACIONES' 13 'TI' --Carga Proce...
true
eea18a2dc9ee0b4d755c2550094bb3fccff5245d
SQL
Nolikzero/semvetrov
/semvetrov.sql
UTF-8
1,634
3.09375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.6.6 -- https://www.phpmyadmin.net/ -- -- Хост: localhost -- Время создания: Дек 05 2017 г., 19:09 -- Версия сервера: 5.7.19 -- Версия PHP: 5.6.30 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!...
true
d92f2b5d28f7df6c3d805e9b1e07d10e3b9558dd
SQL
LuisCarlosJaramillo/SQL
/practica.sql
UTF-8
441
3.46875
3
[]
no_license
-- ejercicios SQL -- crear la base de datos tienda cuyas entidades sean fabricantes(codigo, nombre) y articulos(codigo,nombre,precio,fabricante). CREATE DATABASE tienda; use tienda; CREATE TABLE fabricantes (codigo int not null, nombre varchar(100),primary key(codigo)); CREATE TABLE articulos (codigo int not null, no...
true
f382cf7aff9320b213b9cef1d3de954f51225aaf
SQL
fairuzzamrody/ProgWeb_B01_Aplikasi-LowonganKerja_disabilitas_Kota_Surabaya
/Database/user_login.sql
UTF-8
1,860
2.953125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.3 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jan 04, 2021 at 03:59 AM -- Server version: 10.4.14-MariaDB -- PHP Version: 7.4.11 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIE...
true
b5db5a9fa3511774ce98e96e73ced7ff3dd92117
SQL
FabioSousaFBS/HelpCards
/HelpCards/dd.sql
UTF-8
317
2.546875
3
[]
no_license
CREATE DATABASE helpcard /*!40100 COLLATE 'utf8mb4_0900_ai_ci' */ ; CREATE TABLE OrdemServicos ( Id INT UNSIGNED NOT NULL AUTO_INCREMENT, Municipio VARCHAR(80) NULL, Provedor VARCHAR(80) NULL, Situacao VARCHAR(80) NULL, Problema TEXT NULL, Solucao TEXT NULL, PRIMARY KEY (Id) ) COLLATE='utf8mb4_0900_ai_ci' ;
true
6d0ea551e8f94fd36569426cb2fc2bb0e3a5ab1d
SQL
prateekskit/SQL
/Batch_Jan_2021/SQL/Sort_Case.sql
UTF-8
638
3.625
4
[]
no_license
-- by default order by is ascending select * from DimCustomer ORDER BY FirstName select * from DimCustomer ORDER BY FirstName desc select * from DimCustomer where firstname like '%ay%' ORDER BY FirstName desc,lastname desc ----- TOP clause SELECT TOP 3 CUSTOMERKEY,FIRSTNAME,LASTNAME,YEARLYINCOME FROM DimCusto...
true
2f172484d2497d80ef81dbfc5f880178f5c3fe12
SQL
amir-toly/php_tutorial
/ex4/db.sql
UTF-8
418
2.9375
3
[]
no_license
CREATE TABLE test.posts ( id INT PRIMARY KEY AUTO_INCREMENT, title VARCHAR(255), content TEXT, created_at DATETIME ); CREATE TABLE test.comments ( id INT PRIMARY KEY AUTO_INCREMENT, post_id INT, author VARCHAR(255), comment TEXT, comment_date DATETIME ); CREATE TABLE test.members ( id INT PRIMARY KEY AUTO_I...
true
7669afe02edf460e7e2a67525eccd90184c166d4
SQL
jjoshkan/HackerRank
/SQL/Basic Join/Average Population of Each Continent.sql
UTF-8
148
3.25
3
[]
no_license
--MySQL select co.continent, floor(avg(ci.population)) as avg from city as ci join country as co on co.code = ci.countrycode group by co.continent;
true
4223bf3daddd77d1567c8aa6edf6ffaf2a71d8f3
SQL
ABMI/DQUEEN_OMOP_CDM_Version
/inst/sql/sql_server/Shiny_SQL/countBarPlot.sql
UTF-8
1,447
3.203125
3
[ "Apache-2.0" ]
permissive
--countBarPlot1 (CDM Contion Occurence : Monthly trend of Condition occurrence) select 'condition_occurrence' as table_nm ,stratum3 as visit_year ,cast(count_val as int) as count_val ,p_25 ,p_75 ,median from @resultSchema.dq_result_statics where check_id = 'C193' and stratum3 is not null order by visit_year; --countB...
true
68763d2f1f7972f455e7421731edc753e93cef78
SQL
enova/pgl_ddl_deploy
/schema/2.0_post.sql
UTF-8
1,071
3.125
3
[ "MIT" ]
permissive
-- Now re-deploy event triggers and functions SELECT id, pgl_ddl_deploy.deploy(id) AS deployed FROM ddl_deploy_to_refresh; DROP TABLE IF EXISTS ddl_deploy_to_refresh; DROP TABLE IF EXISTS tmp_objs; -- Ensure added roles have write permissions for new tables added -- Not so easy to pre-package this with default privil...
true
0884090e56517842f1acb4c38f61d927103c08f2
SQL
yzj2019/database_learning
/data/testdata.sql
UTF-8
2,364
3.25
3
[ "MIT" ]
permissive
use db_lab3; insert into `支行` values ('云银行中科大支行', 300000); INSERT INTO `客户` VALUES (372301200000000000,'于子健',19912345678,'安徽省合肥市中国科学技术大学中校区','于子健',18887654321,'name@example.com','本人'),(372301200000000001,'张三',19912345678,'安徽省合肥市中国科学技术大学中校区','张三',18887654321,'name@example.com','本人'),(372301200000000002,'李四',1991234567...
true
6e540502b43772df7f4c9a7e04c19bd1f7d6785e
SQL
rwinch/finance
/finance-webapp/src/main/resources/db/oauth.sql
UTF-8
1,003
2.671875
3
[]
no_license
create table oauth_client_details ( client_id VARCHAR(256) PRIMARY KEY, resource_ids VARCHAR(256), client_secret VARCHAR(256), scope VARCHAR(256), authorized_grant_types VARCHAR(256), web_server_redirect_uri VARCHAR(256), authorities VARCHAR(256), access_token_validity INTEGER, refresh_token_validity INTEGER, ...
true
06e508c77e1598270eafec24fc55ca1c1e8011bb
SQL
opensrp/dhis2-fhir-adapter
/fhir/src/main/resources/db/migration/production/V1.1.0.25_0_0__Immunizations_2.sql
UTF-8
10,221
2.671875
3
[ "BSD-3-Clause" ]
permissive
/* * Copyright (c) 2004-2019, University of Oslo * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this * list o...
true
af65cdb23814186d1b0b90220df97e1f0ba314cd
SQL
recepayddogdu/SQL
/Temel_SQL_Komutlari/update.sql
UTF-8
217
2.65625
3
[]
no_license
--Yas hesaplayip AGE kolonuna yazdirmak istiyoruz. --SQL'in kendi fonksiyonlarindan olan DATEDIFF fonksiyonunu kullanacagiz. UPDATE CUSTOMER SET AGE=DATEDIFF(YEAR,BIRTHDATE,GETDATE()) SELECT * FROM CUSTOMER
true
23cc1a17d5f0f483b50179d3eaffae6c9c6a5d25
SQL
robertoneves92/antoniodw
/monitoramento.sql
UTF-8
1,847
3.3125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.0.4 -- http://www.phpmyadmin.net -- -- Máquina: localhost -- Data de Criação: 27-Ago-2014 às 16:13 -- Versão do servidor: 5.6.12-log -- versão do 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_CL...
true
dc411afeabca1312d6e720ca8d32cac6f9c490cc
SQL
silence-do-good/stress-test-Postgres-and-MySQL
/dump/low/day16/select0341.sql
UTF-8
191
2.71875
3
[]
no_license
SELECT timeStamp, temperature FROM ThermometerObservation WHERE timestamp>'2017-11-15T03:41:00Z' AND timestamp<'2017-11-16T03:41:00Z' AND SENSOR_ID='73454eb1_5648_4438_aba1_1676cca5442b'
true
77ac876918d9c6988e4c9e48e251e7f453eb00f2
SQL
Shubhk209/mySql
/SQL in Sixty Seconds/028_Identify Most Resource Intensive Queries.sql
UTF-8
2,067
4.1875
4
[]
no_license
/* During performance tuning conversation the very first question people often ask is what are the queries offending the server or in another word let us identify the queries which are the most resource intensive. The resources are often described as either Memory, CPU or IO. When we talk about the queries the same ...
true
39afbb6b0035712fd44abb39328e890611639dde
SQL
xp137221357/sql_personal_business
/yangxujia/按终端充值人数去重.sql
UTF-8
3,424
3.4375
3
[]
no_license
set @beginTime:='2016-06-10'; set @endTime:='2016-07-11'; set @system_model:='ios'; ## 按终端人数去重 select count(distinct tt.receiver) from ( select receiver from ( select '赏金' type_,receiver, sum_in_actual from ( ## 币商主动给下级用户金币 select '币商主动给下级用户金币' type_, o.USER_ID sender, o.OFFER_PRIZE, o.OFFER_GRATUITY, if...
true
85f5f53bef7d7dca24fd8d942a8c3c5db57fbc89
SQL
jcelder/movie-genres
/db/schema.sql
UTF-8
552
3.546875
4
[]
no_license
CREATE TABLE movies( id SERIAL PRIMARY KEY, title TEXT NOT NULL, ratingAverage REAL NOT NULL, releaseDate DATE NOT NULL ); CREATE TABLE genres( id INT PRIMARY KEY, name TEXT UNIQUE NOT NULL ); CREATE TABLE users( id SERIAL PRIMARY KEY, email TEXT UNIQUE NOT NULL, password TEXT NOT NULL ); CREATE TA...
true
e5289690ce6512eb6587a273a894297ca8d9335f
SQL
tomy0000000/NCHU-Introduction-to-Database-Management-System
/Homework 1/6. (c).sql
UTF-8
222
3.46875
3
[ "MIT" ]
permissive
SELECT "students"."name" FROM "students" NATURAL JOIN "borrow", "books" WHERE "students"."gender" = FALSE and "books"."publisher" = 'MIT' and EXTRACT(year from "borrow"."date") = 2020 and "students"."age" > 20;
true
dd6387a9784122a7ad221d21a892f2eee4a386f1
SQL
prodigasistemas/gsan-migracoes
/comercial/scripts/20161104190304_remove_constraints_da_tabela_de_performance.sql
UTF-8
436
2.53125
3
[]
no_license
-- // remove constraints da tabela de performance -- Migration SQL that makes the change goes here. ALTER TABLE desempenho.medicao_performance ALTER COLUMN medp_difconsumoagua DROP NOT NULL, ALTER COLUMN dcst_id DROP NOT NULL; -- //@UNDO -- SQL to undo the change goes here. ALTER TABLE desempenho.me...
true
e0dcbad3bf8fb64901d1970d4605704c2ef8a3a1
SQL
haflinger/agrixchange-api
/sql/campagne.sql
UTF-8
1,748
2.921875
3
[ "BSD-3-Clause", "MIT" ]
permissive
# ************************************************************ # Sequel Pro SQL dump # Version 4096 # # http://www.sequelpro.com/ # http://code.google.com/p/sequel-pro/ # # Hôte: 127.0.0.1 (MySQL 5.6.23-1~dotdeb.3) # Base de données: agrigestion # Temps de génération: 2015-06-13 23:52:11 +0000 # ***********************...
true
a0223343288798963e804cb38cae5578516f70a5
SQL
xdatafun/IMDB_MovieLens_SQL
/takeALook.sql
UTF-8
945
4.125
4
[]
no_license
USE moviedb; # see how many movies were rated in MovieLens data SELECT COUNT(DISTINCT movieId) FROM rating; # the number of tags created by users SELECT COUNT(*) FROM tagLink; # the tags assigned to movies over 1000 times SELECT COUNT(*) AS 'amount', tag FROM tag GROUP BY tag HAVING amount > 1000 ORDER ...
true
849f5056456e2ed5a4d9c74d6e84c665fd6f6bb6
SQL
plopin/plopin_git
/conf/evolutions/default/1.sql
UTF-8
596
2.8125
3
[ "Apache-2.0" ]
permissive
# --- Created by Ebean DDL # To stop Ebean DDL generation, remove this comment and start using Evolutions # --- !Ups create table public.user ( pk bigint not null, first_name varchar(255), last_name varchar(255), email varchar(255), p...
true
24a6639656e3b003491028e04e3562025fd0947a
SQL
CMRushing/employee-management-system
/db/schema.sql
UTF-8
1,757
4.21875
4
[]
no_license
-- Drops the "employee_management_system_db" if it currenlty exits. DROP DATABASE IF EXISTS employee_management_system_db; -- Create the "employee_management_system_db" database. CREATE DATABASE employee_management_system_db; -- Makes it so all of the following code will affect the "employee_management_system_db" dat...
true
c17b98ecbbcb6d028fc947d4dc3da7d9d7dcfd05
SQL
ZW-Hao/demo_study
/数据库期末作业/PLSQL2.sql
UTF-8
5,295
3.296875
3
[]
no_license
-- set ServerOutput ON; -- declare -- cursor mycur(v number) is -- select productId,v_productName -- from productTable -- where price>5000; -- begin -- --查信息 -- for var_record in mycur(1) -- loop -- dbms_output.put_line(var_record.productId); -- dbms_output.put_line(var_...
true
4165722ba69821c98618d46eef075021c87e04c8
SQL
jasminekay505/Employee-Tracker
/db/seeds.sql
UTF-8
999
3.109375
3
[ "MIT" ]
permissive
INSERT INTO department (dept_name) VALUES ('Management'), ('Sales'), ('Administration'), ('Accounting'), ('Quality Control'), ('Supplier Relations'), ('Customer Relations'), ('Temporary'), ('Human Resources'); INSERT INTO role (title, salary, department_id) VALUES ('Regional Manager', 65, 1), ('Salesman', 39, 2), ('Re...
true
44353cb491412fd7bcb93f4afcc5707fb5080455
SQL
stanleywolf/CSharp-Database-MS-SQL
/15.MyExam/15.MyExam/02.DML.sql
UTF-8
853
2.984375
3
[]
no_license
INSERT INTO Accounts(FirstName,MiddleName,LastName,CityId,BirthDate,Email) VALUES ('John','Smith','Smith',34, '1975-07-21','j_smith@gmail.com'), ('Gosho',NULL,'Petrov', 11, '1978-05-16','g_petrov@gmail.com'), ('Ivan','Petrovich','Pavlov',59 ,'1849-09-26','i_pavlov@softuni.bg'), ('Friedrich','Wilhelm','Nietzsche',2,'184...
true
b14935f7e9a08e1d854e45e6ae1677c9522b18dd
SQL
dev-blogs/spring-mvc
/online-shop/src/main/resources/scripts/test-data.sql
UTF-8
9,251
2.765625
3
[ "Apache-2.0" ]
permissive
INSERT INTO USERS (ID, LOGIN, PASSWORD, USER_NAME, EMAIL, DATE_OF_REGISTRATION, DESCRIPTION) VALUES (1, 'admin', 'admin', 'admin', 'admin@dev-blogs.com', '2016-07-01', 'Java developer'); INSERT INTO USERS (ID, LOGIN, PASSWORD, USER_NAME, EMAIL, DATE_OF_REGISTRATION, DESCRIPTION) VALUES (2, 'user', 'user', 'user', 'use...
true
ec79e12e02f134938f7507fb0d049014614d9cfb
SQL
MaciejLaczynski/BazyDanych
/Projekt/Komendy/PROCEDURA_Zmienjsz_cene.sql
UTF-8
242
2.671875
3
[]
no_license
CREATE DEFINER=`root`@`localhost` PROCEDURE `Zmniejsz cene biletow o 2 Euro`(IN Podaj_ID INT) BEGIN UPDATE festiwal SET CenaEuro = CenaEuro - 2.00 WHERE ID_Festiwalu = Podaj_ID; SELECT * FROM Muzyka.festiwal WHERE ID_Festiwalu = Podaj_ID; END
true
5a97769277068c6bc0e5f311f7e405ee37559386
SQL
tulikasharma368/32address_book_ER
/address_book_er.sql
UTF-8
1,665
4.0625
4
[]
no_license
CREATE DATABASE address_book_er; use address_book_er; CREATE TABLE person( person_id INTEGER NOT NULL PRIMARY KEY AUTO_INCREMENT, name VARCHAR(50) NOT NULL, address VARCHAR(150) NOT NULL, gender CHAR(6) ); INSERT INTO person (name, address, gender) VALUES ('Rachel', 'Taxes', 'Female'), ('Ross', 'New York', ...
true
ac1c74dc1e3dc5b09f50304984ba2db7499fa443
SQL
jgarzonext/plsql-testing
/script_plsql/bd_iaxis/script/disparadores/ACT_PAGOGARANTIA.sql
ISO-8859-2
1,652
3.109375
3
[]
no_license
-------------------------------------------------------- -- DDL for Trigger ACT_PAGOGARANTIA -------------------------------------------------------- CREATE OR REPLACE EDITIONABLE TRIGGER "AXIS"."ACT_PAGOGARANTIA" after update on pagogarantrami for each row begin -- Faltaria controlar el canvi de la clau i...
true
d37a28b7336c5fda447fb5cc1d8407c05896f16a
SQL
vijaydairyf/TimelyFish
/SolomonApp/dbo/Stored Procedures/dbo.PJCOSUBH_SSUBSTAT.sql
UTF-8
342
2.546875
3
[]
no_license
 create procedure PJCOSUBH_SSUBSTAT @parm1 varchar (16) , @parm2 varchar (16) , @parm3 varchar (1) as select * from PJCOSUBH where PJCOSUBH.project = @parm1 and PJCOSUBH.subcontract = @parm2 and PJCOSUBH.status1 LIKE @parm3 order by PJCOSUBH.project, PJCOSUBH.subcontract, PJCOSUBH...
true
a861ef9a0eabea15f54fa984b80de504b5ce47cc
SQL
tenchoklang/T-SQL-notes-Excercise
/Query/Presentation query.sql
UTF-8
2,578
4
4
[]
no_license
--Players that didnt make it in the league or are not in the Players table SELECT * FROM Group1.Draft as D LEFT JOIN Group1.Players as P ON D.fullName = P.playerName WHERE P.playerID IS NULL --Players that did make it in the league or are in the players table Draft and Player SELECT * FROM Group1.Draft as D INNER JOI...
true
bfad4a44c9c95fc17e72d52ddb66f6be82206539
SQL
Rut-Patel/CallCenterApp
/sql/clients.sql
UTF-8
614
3.0625
3
[]
no_license
--Name: Rut Patel --Date: 22-10-2020 --Course Code: WEBD3201 - 02 DROP SEQUENCE IF EXISTS clients_id_seq CASCADE; CREATE SEQUENCE clients_id_seq START 1000; DROP TABLE IF EXISTS clients; CREATE TABLE clients( Id INT PRIMARY KEY DEFAULT nextval('clients_id_seq'), EmailAddress VARCHAR(255) UNIQUE, FirstName VARCHAR...
true
ebfc1f4a790413dea287bf9136df64e4e437b2d4
SQL
Kongaloosh/hubbub-a-loosh
/hub/dbms/hub.sql
UTF-8
232
2.90625
3
[]
no_license
drop table if exists subscribers; create table subscribers ( id integer primary key autoincrement, topic text not null, callback text not null, lease integer, secret text, CONSTRAINT sub_unique UNIQUE(topic,callback) );
true
c42cd2e3852bab817986aed67ab56c9f4a524211
SQL
CristianManosalva/v-shop-server-side
/Backend/sql/v-shopSql.sql
UTF-8
13,654
3.15625
3
[]
no_license
--NOMBRE: V-ShopBD --AUTOR: Luis Alberto Gómez --PROPOSITO: Basé de datos para el proyecto. --TABLAS: 15 --> [rol, usuario, categoria, subcategoria, producto, comentario, descuento, catalogo_productos, sede, catalogo, factura, -- detalle_factura, detalles_del_pago, modo_de_pago, pago]. --Versión: 1....
true
f5805c661c0d0295c168dbac985cb27ba009894f
SQL
BloomBooks/analytics-postgreSQL
/2019 notes which may be obsolete/06 IP2CityRegionCountry Setup&Populate/01 Create Tables for ip2loc/CreateCountryRegionCityLUTable.sql
UTF-8
1,280
3.53125
4
[ "MIT" ]
permissive
-- Table: public.CountryRegionCityLU -- DROP TABLE public.CountryRegionCityLU; CREATE TABLE public.CountryRegionCityLU ( loc_uid bigint NOT NULL, country_code character(2) COLLATE pg_catalog."default" NOT NULL, country_name character varying(64) COLLATE pg_catalog."default" NOT NULL, region character ...
true
2e1f596efd2c8fcb367f722c2f2c31d50eeeaa4b
SQL
blacklike/something
/SchoolCanteenMeal/tb_shopping.sql
UTF-8
1,371
2.921875
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : link Source Server Version : 50617 Source Host : localhost:3306 Source Database : test1 Target Server Type : MYSQL Target Server Version : 50617 File Encoding : 65001 Date: 2017-05-23 20:16:19 */ SET FOREIGN_KEY_CHECKS=...
true
7cf16cd43e77337822f3f9f7376c6226e4878622
SQL
cridf-openassemblee-orgarif/orgarif
/orgarif-server/src/main/resources/data/schema/log/mail_log.sql
UTF-8
514
2.953125
3
[]
no_license
CREATE TABLE mail_log ( id UUID PRIMARY KEY, deployment_log_id UUID NOT NULL, recipient_type VARCHAR(255) NOT NULL, user_id UUID NOT NULL, reference VARCHAR(255) NOT NULL, -- [doc] kept here, mainly because the user can change his mail recipient_mail VARCHAR(255) NOT NULL, data TEXT NOT NULL...
true
4fcf9a9324b00a6818e02af8ab467f11b85f9579
SQL
SuzanaRistova/tday
/database/Posledna_baza.sql
UTF-8
4,918
2.84375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.0.4 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Jan 20, 2014 at 12:01 AM -- Server version: 5.6.12-log -- PHP Version: 5.4.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT ...
true
686a05a6ff911a371df5a86681da4da27543e76e
SQL
aarondebruin/angular
/angular/angularjs/Inleveropdrachten/OpdrachtC/bedrijf.sql
UTF-8
1,415
2.78125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Sep 14, 2020 at 09:10 AM -- Server version: 10.4.11-MariaDB -- PHP Version: 7.4.2 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
true
fbbadc98f283ad6e20db47b5fc16ae6774eb0742
SQL
Guilherme-santos-silva/SQL-Basico
/EstudosSQL/40ºProcedure_Parametro_Entrada.sql
WINDOWS-1252
628
3.03125
3
[]
no_license
--definindo qual banco usar use Banco_Estudos --PROCEDURE VALOR PADRAO - PARAMETRO DE ENTRADA --definimos um parametros ja com valor padrao para ser usado caso um novo valor nao informado --criamos a procedure com um parametro com valor padrao create procedure Procedure_Valor_Padrao (@Nome varchar(30), @Idade ...
true
69011ff2091c0c0bb75f599febc86978cd3f400c
SQL
sungwhikim/jpe2
/database/migrate-data/variants.sql
UTF-8
727
3.734375
4
[ "MIT" ]
permissive
SELECT 'INSERT INTO "variant1_migrate" (id, product_id, "name", active) VALUES (' + CAST( dl.id AS varchar(50) ) + ', ' + CAST( dl.productId AS varchar(50) ) + ', ''' + dl.Dlot + ''',' + CASE WHEN dl.IsActive = 1 THEN 'true' ELSE 'false' END + ');' FROM tblDLot dl INSERT INTO variant1 (id...
true
785d75a902d4532073e3fd1ae5d381367f2efe30
SQL
JakeOh/201908_itw_bdml11
/lab-oracle/ex16.sql
UTF-8
1,187
4.09375
4
[]
no_license
-- 레코드 수정/삭제 select * from ex_emp3; -- ex_emp3 테이블에서 사번이 7369인 사원의 급여를 2000으로 변경 update ex_emp3 set sal = 2000 where empno = 7369; -- update 문장에서 where 절을 생략하면 테이블의 모든 행을 수정하게 됨! update ex_emp3 set sal = 1234; rollback; -- 바로 이전의 commit 상태(최종 commit 상태)로 데이터들을 되돌리는 명령어 -- ex_emp3 테이블에서 부서번호가 10번인 직원...
true
6c2eaedb4337d256ba5f77b756cdb213210868bc
SQL
SourDumplings/CodeSolutions
/Book practices/《Database System Concepts》6th 练习代码/3/3.10.sql
UTF-8
873
3.53125
4
[]
no_license
# a UPDATE employee SET city = 'Newton' WHERE employee_name = 'Jones'; # b # m1 UPDATE works SET salary = CASE salary * 1.1 <= 100000 THEN salary * 1.1 ELSE salary * 1.03 END WHERE employee_name IN ( SELECT manager_name FROM manages ...
true
5ff2f851236f007e1c914ffff3d43914abf1e81d
SQL
nicolasmiddi/suscripciones_motivar
/vista/assets/js/motivar/untitled.sql
UTF-8
22,738
2.640625
3
[]
no_license
CREATE TABLE sus_usuario_gral ( sug_id int(11) DEFAULT NULL, sug_nombre varchar(120) DEFAULT NULL, sug_apellido varchar(120) DEFAULT NULL, sug_nacimiento date DEFAULT NULL, sug_dni int(11) DEFAULT NULL, sug_actualizacion timestamp DEFAULT CURRENT_TIMESTAMP sug_ejemplos varchar(120) DEFAULT NULL, sug_comentario_aideas_1...
true
efcf3b9762f7dd0b817071c20fd5bd688d63acfd
SQL
MKHSKH003/focus
/sql/generics/drop table column.sql
UTF-8
429
3.515625
4
[]
no_license
USE `-- DATABASE NAME --`; SET @table__name = '-- TABLE NAME --'; SET @column_name = '-- COLUMN NAME --'; SELECT Count(*) INTO @exists FROM information_schema.COLUMNS WHERE table_name = @table__name AND column_name = @column_name; SET @alter_statment = concat('ALTER TABLE ',@table__name,'` DROP COLUMN `',@column_na...
true
912d1f480bfed9c103affa7af481f9dbfc1a2d03
SQL
AtillaToy/sql-challenge
/challenge-queries.sql
UTF-8
2,440
4.5
4
[]
no_license
---1: List employee number, last name, first name, gender, and salary. select employees.emp_no, employees.last_name, employees.first_name, employees.gender, salaries.salary from employees inner join salaries on employees.emp_no = salaries.emp_no; ---2: List employees who were hired in 1986. select empl...
true
e504a5ee939f39285bb8b029777b4be770fe38ca
SQL
altamira/visualstudio
/Sistema de Informação Altamira/EGISSQL.Database/dbo/Stored Procedures/Procs2/pr_resumo_desconto_setor_categoria.sql
UTF-8
3,615
3.65625
4
[]
no_license
--pr_resumo_desconto_setor_categoria -------------------------------------------------------------------------------------- --Polimold Industrial S/A 2000 --Stored Procedure : SQL Server Microsoft 2000 --Lucio Vanderlei --Resumo de Descon...
true
d9f0c7c1192c90fa939edf45c43e9b0c4a9c726e
SQL
fmaestre/AX-SSC
/RocioReport.sql
UTF-8
4,494
3.671875
4
[]
no_license
SELECT DISTINCT it.ITEMID ITEM, trans.NAME [DESCRIPTION], CASE eprd.ProductType WHEN 1 THEN 'ITEM' ELSE 'Service' END [ITEM TYPE], CASE iexp.ProductSubtype WHEN 1 THEN 'PRODUCT' WHEN 2 THEN 'PRODUCT MASTER' WHEN...
true
678a856dd8c479811fd407ebc9e12643f389a198
SQL
LeonenkoPavel1985/DBMS
/SQLAcademy3/HomeWoek 4/SQLQuery3 - student computer graphics and design.sql
WINDOWS-1251
298
3.15625
3
[]
no_license
USE SQLAcademy3 SELECT last_name+ ' ' +first_name+ ' ' + middle_name AS N'', speciality_name AS N' ' FROM students,specialities WHERE study_group = speciality_id AND speciality_name = N' '
true
205b0aeb39af7df407c5c839a9067efef0194c85
SQL
ilyamazein-spbu/HogwartsDB
/Hogwarts Queries.sql
UTF-8
10,904
3.71875
4
[]
no_license
"Самые ранние года поступления на каждый факультет из имеющихся учеников" SELECT "House_ID", MIN("Admission_Year") "Admission_Year" FROM "Students" GROUP BY "House_ID"; "Оптимизация" EXPLAIN SELECT "House_ID", MIN("Admission_Year") "Admission_Year" FROM "Students" GROUP BY "House_ID"; "Seq ...
true
18d7fd09895be668a5719d42371f0ee3b9af6f16
SQL
ShijunWangMTL/database-course
/SQL Server practice/practice-round.sql
GB18030
1,373
3.53125
4
[]
no_license
------------round()---------------- /* ROUND ( numeric_e-xpression , length [ , function ] ) function: optional. default: 0. ҪִеIJ͡function tinyintsmallint intʡ function function ֵΪ 0Ĭϣnumeric_e-xpression 롣ָ 0 ֵʱnumeric_e-xpression ض */ SELECT ROUND(925.678, 2) -->925.680 ֻλСDZλЧС SELECT ROUND(925.678, 0) -->926.0...
true
915b6b761c814a452d87588c11788116c6e805e4
SQL
dougreisss/Cuida-Em-Casa
/banco/scriptHomecare.sql
UTF-8
26,703
3.25
3
[]
no_license
DROP SCHEMA IF EXISTS prjcuidaemcasa; CREATE SCHEMA prjcuidaemcasa; use prjcuidaemcasa; CREATE TABLE tipo_especializacao ( cd_tipo_especializacao INT, nm_tipo_especializacao VARCHAR(100), CONSTRAINT pk_tipo_especializacao PRIMARY KEY (cd_tipo_especializacao) ); insert into tipo_especializacao values(1,'...
true
c250bafba7e7076b7e22256284bbce3c2c40d3cf
SQL
jaynav/MySqlDump
/query2/SQLQuery2text.txt
UTF-8
344
3.390625
3
[]
no_license
select productNo as 'product No',productDescription as 'Product Description', productUnitPrice as 'Unit Price', inventoryQty as 'unsold Inventory', (productUnitPrice * inventoryQty) as 'total value' from product where productNo NOT IN (select productNo from orderLineItem, salesOrder where orderLineItem.orderI...
true
470b10105717d23fb2be929508e7a2b401e4cb7c
SQL
LuGeorgiev/SoftUniDBBasicMSSQL
/ExamPrep240618/DML/P14.sql
UTF-8
374
3.84375
4
[ "MIT" ]
permissive
SELECT at.TripId AS Id, h.Name AS HotelName, r.Type AS RoomType, CASE WHEN t.CancelDate IS NULL THEN SUM(h.BaseRate+r.Price) ELSE 0 END AS [Revenue] FROM Trips AS t JOIN Rooms AS r ON r.Id=t.RoomId JOIN Hotels AS h ON h.Id=r.HotelId JOIN AccountsTrips AS at ON at.TripId=t.Id GROUP BY at.TripId, h.Nam...
true
ab277ba31322db69b2b591e52108bafe4deeb194
SQL
eldar0608/reception-office-kotlin-original
/src/main/resources/db/migration/V1__init_table.sql
UTF-8
16,077
3.078125
3
[]
no_license
/****** Object: Table [ EnrolleeParents] Script Date: 28.05.2019 17:05:45 ******/ /* SET ANSI_NULLS ON */ /* SET QUOTED_IDENTIFIER ON */ CREATE SEQUENCE EnrolleeParents_seq; CREATE TABLE EnrolleeParents( id int DEFAULT NEXTVAL (' EnrolleeParents_seq') NOT NULL PRIMARY KEY, enrollee_id int NULL, fio_mot...
true
2d4e0e9e1b28f0bc820e62ad9b72ac3538df3847
SQL
Grompokstar/krujeva
/migrations/market/tables/market.dealerprices/20160225134413.sql
UTF-8
307
3
3
[]
no_license
create table if not exists market.dealerprices ( id bigserial primary key, dealerbrandid int not null references market.dealerbrands(id) on delete cascade on update cascade, productid int not null references market.products(id) on delete cascade on update cascade, price double precision not null );
true
35d68574d6e666ecf0d5f6275514bcd0779cc40e
SQL
vildkatt/SQL-StarterKit
/grant and revoke.sql
UTF-8
612
3.171875
3
[]
no_license
-- Create users, grant privileges, revoke privileges -- CREATE USER 'user_ro'@'localhost' IDENTIFIED BY 'user_ro'; GRANT SELECT ON TABLE `mydb`.* TO 'user_ro'@'localhost'; REVOKE SELECT ON TABLE `mydb`.* FROM 'user_ro'@'localhost'; CREATE USER 'user_rw'@'localhost' IDENTIFIED BY 'user_rw'; GRANT SELECT, INSERT, UPDA...
true
31a0990b97979c63edece623011363016f200846
SQL
Dovyski/scifibot
/src/api/resources/scifibot.sql
UTF-8
1,471
3.1875
3
[ "MIT" ]
permissive
CREATE TABLE `titles` ( `id` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, `type` INTEGER NOT NULL DEFAULT 1, `name` TEXT NOT NULL, `publisher` TEXT, `year` INTEGER, `released` INTEGER, `runtime` INTEGER, `plot` TEXT, `plot_source_name` TEXT, `plot_source_url` TEXT, `teaser` TEXT, `imdb_rating` REAL, `imdb_u...
true
be1445d2ba1792bc265528fabbbc8b5b6b37422a
SQL
Juchnowski/FunctionalProgramming-LINQ
/Tutorial.Shared/LinqToEntities/Loading.sql
UTF-8
17,817
3.375
3
[ "MIT" ]
permissive
-- ImplicitLazyLoading SELECT TOP (1) [c].[ProductSubcategoryID] AS [ProductSubcategoryID], [c].[Name] AS [Name], [c].[ProductCategoryID] AS [ProductCategoryID] FROM [Production].[ProductSubcategory] AS [c] exec sp_executesql N'SELECT [Extent1].[ProductCategoryID] AS [ProductCategoryID], ...
true
55ae2131dda835df54a05f843ef903d7c929f65f
SQL
mcasx/WorkoutTrackingMobileApp
/muscle_db/Muscle_procedure.sql
UTF-8
733
3.234375
3
[]
no_license
/*DELIMITER $$ CREATE PROCEDURE muscle2.GET_MY_PLAN_EXERCISE_COUNT(User VARCHAR(255)) BEGIN SELECT Count(Plan_id) AS Plan_Exercise_Count FROM EXERCISE_HISTORY WHERE Plan_id = (SELECT ID FROM PLAN_HISTORY WHERE User_email = User AND End_Date = 0000-00-00); #Current exercise END; $$*/ DE...
true
e8608b3acfe9b702238b4e2abf68fb0b1926d45f
SQL
renato2099/PrestoTpch
/sql/tpch_query9.sql
UTF-8
979
3.90625
4
[]
no_license
select nation, o_year, sum(amount) as sum_profit from ( select nation, year(o_orderdate) as o_year, l_extendedprice * (1 - l_discount) - ps_supplycost * l_quantity as amount from ...
true
095a13a6f8e44598acc9dcef1b76fa23b0fadb43
SQL
MavonCmc/smzdm
/schema/sqlInit/ccgold.sql
UTF-8
918
3.4375
3
[]
no_license
DROP TABLE IF EXISTS `ccgold_goods_detail`; CREATE TABLE `ccgold_goods_detail` ( `id` int(11) NOT NULL AUTO_INCREMENT, `good_id` int(11) NOT NULL COMMENT '电商系统商品编号', `good_name` varchar(255) NOT NULL COMMENT '商品名称', `cate_id` smallint(6) DEFAULT NULL COMMENT '商品分类', `weight` double DEFAULT NULL COMMENT '重量', ...
true
cc95924172db85b40d7c1e82c2ecd5707a2d41e6
SQL
zhangxx19940204/laravel58
/sql/email_data.sql
UTF-8
1,242
3.296875
3
[ "MIT" ]
permissive
/* Navicat MySQL Data Transfer Source Server : localhost_laravel58 Source Server Version : 50726 Source Host : localhost:3306 Source Database : laravel58 Target Server Type : MYSQL Target Server Version : 50726 File Encoding : 65001 Date: 2020-04-17 15:31:00 */ SET FOREIGN_KEY_CHE...
true
486faa6f120ea1f18579d7b184ac6df94db0f82b
SQL
ajb5d/oxygenation_kc
/data-extraction/MIMIC/icd_codes.sql
UTF-8
3,382
3.09375
3
[]
no_license
WITH icd_presence AS ( SELECT icd.hadm_id, SAFE_CAST(SUBSTR(icd.icd9_code, 0, 3) as INT64) AS icd_num, icd.icd9_code AS icd_num_string FROM `physionet-data.mimiciii_clinical.diagnoses_icd` AS icd) SELECT icd_presence.hadm_id AS hadm_id, COUNT(CASE WHEN icd_presence.icd_num BETWEEN 001 AND 139 THEN 1 END) > 0 AS has_inf...
true
89d72834591f13c4f241c6032d2ec4bc5f9e3417
SQL
humingk/netease_music_cat
/my_tools/music.sql
UTF-8
6,621
3.859375
4
[ "MIT" ]
permissive
DROP DATABASE IF EXISTS netease_music; CREATE DATABASE IF NOT EXISTS netease_music DEFAULT CHARSET utf8mb4 COLLATE utf8mb4_general_ci; use netease_music; CREATE TABLE user ( user_id char(20) NOT NULL, user_name varchar(100) NOT NULL default "", primary key (user_id), index (user_name) ) ENGINE = ...
true
4b219c2ee9b9bdd5d1782476edf303e7b66fa4fc
SQL
biocore/microsetta-private-api
/microsetta_private_api/db/patches/0060.sql
UTF-8
502
3.046875
3
[ "BSD-3-Clause" ]
permissive
-- set sample-is-valid for existing samples that for all intents and purposes -- appear valid UPDATE barcodes.barcode SET sample_status = 'sample-is-valid' WHERE barcode IN (SELECT barcode FROM ag.ag_kit_barcodes LEfT JOIN barcodes.barcode USING (barcode) WHER...
true
7ea838fc00524c83d10e6bd35d0482b91f1133f8
SQL
BhargaviBittu/OnlineGroceries
/ecommerce/ecommerce.sql
UTF-8
4,342
3.140625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Apr 10, 2019 at 02:38 PM -- Server version: 10.1.38-MariaDB -- PHP Version: 7.3.3 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
true
6e9de2ba5f5036804fa2aef1905e56df57e934c3
SQL
heoeun1015/dbSql
/2019_11_11.sql
UHC
11,986
4.5625
5
[]
no_license
-- SMITH, WARD ϴ μ ȸ SELECT * FROM emp WHERE deptno IN (20, 30); SELECT * FROM emp WHERE deptno = 20 OR deptno = 30; SELECT * FROM emp WHERE deptno IN (SELECT deptno FROM emp -- WHERE ename IN ('SMITH', 'WARD')); ...
true
b34e93781d7b0c965b8418ed6b693f40e3bb04a6
SQL
CUBRID/cubrid-testcases
/sql/_17_sql_extension2/_02_full_test/_05_date_time_function/_19_make_date/cases/makedate_002.sql
UTF-8
2,991
3.140625
3
[ "BSD-3-Clause" ]
permissive
--pass unmatched types of values to the 2nd parameter create class coo( col1 char(20), col2 nchar(20), col3 nchar varying(20), col4 bit(8), col5 bit varying(8), col6 numeric, col7 integer, col8 smallint, col9 monetary, col10 float, ...
true
81780d305d85623bda0ac614f0a1dfab80dfcb8a
SQL
johnescamargo/GerGarage
/gerScript.sql
UTF-8
4,520
3.546875
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='ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTI...
true
005c3905cf5a2af063e904c165ce5859070124f0
SQL
som143/trysis
/Dump20191222-1.sql
UTF-8
5,414
3.09375
3
[]
no_license
CREATE DATABASE IF NOT EXISTS `blr` /*!40100 DEFAULT CHARACTER SET latin1 COLLATE latin1_general_ci */; USE `blr`; -- MySQL dump 10.13 Distrib 5.7.28, for Linux (x86_64) -- -- Host: localhost Database: blr -- ------------------------------------------------------ -- Server version 5.7.28-0ubuntu0.18.04.4 /*!40101...
true
8d19dbcfdd4b05d069aa912ce8e7f1459fa63796
SQL
leiyang-mids/zillow
/test.sql
UTF-8
1,847
2.890625
3
[]
no_license
CREATE TABLE submissions (submission_date date, submission_id integer, hacker_id integer, score integer); INSERT INTO "submissions" VALUES('2016-03-01',8494,20703,0); INSERT INTO "submissions" VALUES('2016-03-01',22403,53473,15); INSERT INTO "submissions" VALUES('2016-03-01',23965,79722,60); INSERT INTO "submissions" V...
true
58e50527a0d85f118ddebfe0201fe84887c31845
SQL
feriel214/Project2
/ven.sql
UTF-8
9,796
3.265625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.1 -- https://www.phpmyadmin.net/ -- -- Hôte : localhost:3306 -- Généré le : sam. 28 mars 2020 à 23:56 -- Version du serveur : 5.7.24 -- Version de PHP : 7.2.19 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET ...
true
2c717c8ce238056f31bbdecf3c6633fa8b8ef671
SQL
AndrewKhitrin/antlr_psql
/src/test/resources/sql/select/67cf11a7.sql
UTF-8
200
2.703125
3
[ "MIT" ]
permissive
-- file:window.sql ln:361 expect:true SELECT sum(unique1) over (partition by four order by unique1 range between 5::int8 preceding and 6::int2 following), unique1, four FROM tenk1 WHERE unique1 < 10
true
0744d6ec8d952d0a39e051123125e0d20efceb91
SQL
Vlpalamar/BD_DZ_3
/University/Query-01/query4.sql
UTF-8
367
2.703125
3
[]
no_license
--. Вывести имена и фамилии преподавателей, которые читают --лекции у группы “PU911” SELECT DISTINCT [Teachers].name,[Teachers].surname FROM [Teachers],[Groups], [GroupsLectures],[Lectures] WHERE Teachers.Id=[Lectures].teacherId AND [Lectures].Id= [GroupsLectures].lectureId AND Groups.Id=6
true
91df6def549c27512f49cf927ec42f38d0f99d4f
SQL
softd3v/fastapi_oracle_test
/db.sql
UTF-8
9,986
3.0625
3
[ "MIT" ]
permissive
begin for rec in (select table_name from user_tables where regexp_like(table_name, '^(BADGE|DEPARTMENT|JOB_TITLE|EMPLOYEE)') ) loop execute immediate 'drop table '||rec.table_name||' CASCADE CONSTRAINTS PURGE'; end loop; end; / CREATE TABLE "BADGE" ( "BADGE_NUMBER...
true
3a2f6d64e21a41702214287da3aed134a7672998
SQL
aslv1224/prueba
/prueba.sql
UTF-8
3,522
3.125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.1.1 -- https://www.phpmyadmin.net/ -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 11-09-2021 a las 02:44:23 -- Versión del servidor: 10.4.20-MariaDB -- Versión de PHP: 8.0.9 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_...
true
d89225730af8266e26e4764ad263c1ba8050b6a3
SQL
shimia90/management
/database/2015/11/management-empty.sql
UTF-8
7,916
3.171875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.1.14 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Dec 09, 2015 at 04:57 AM -- Server version: 5.6.17 -- PHP Version: 5.5.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;...
true
d8468e3bee544c4828e0aa967d176c0a4f600b60
SQL
demisgomes/itimalia
/src/main/resources/db/migration/V1.0__create_users_table.sql
UTF-8
417
2.53125
3
[]
no_license
CREATE TABLE IF NOT EXISTS USERS ( ID INT AUTO_INCREMENT PRIMARY KEY, EMAIL VARCHAR(255) NOT NULL, PASSWORD VARCHAR(255) NOT NULL, BIRTH_DATE DATETIME(9) NULL, GENDER VARCHAR(255) NOT NULL, NAME VARCHAR(255) NOT NULL, PHONE VARCHAR(255) NOT NULL, ROLE VARCHAR(255) NOT NULL, CREATION_...
true
da0a210651db24f9026d67ed6fbe8de44a8ed19a
SQL
HUADevs/databases
/1_1.sql
UTF-8
970
2.96875
3
[]
no_license
DROP TABLE ALLSTARS; DROP TABLE PLAYERS_TEAMS; DROP TABLE TEAMS; DROP TABLE PLAYERS; DROP TABLE duplicate_player_stats; DROP PROCEDURE FIX_PLAYER_METRICS; DROP PROCEDURE FIX_DUPLICATE_PLAYER_STATS; CREATE TABLE ALLSTARS AS SELECT * FROM XSALES.ALLSTARS; CREATE TABLE PLAYERS AS SELECT * FROM XSALES.PLAYERS; CREATE...
true
8bf09d9aab242c6346ecbd88472b2653bed9d354
SQL
zjz1993/javascript_leetcode
/Sql/not_boring_movies.sql
UTF-8
279
3.4375
3
[]
no_license
# Write your MySQL query statement below # 这道题有两个要点,一是使用MOD函数,这个函数用来计算a%b,二是要按照rating的降序排列 SELECT id,movie,description,rating FROM `cinema` WHERE description != 'boring' AND MOD(id,2) = 1 ORDER BY rating DESC;
true
af27ff6637712606a4620478e0d2a7010427e5a8
SQL
VictorIranzo/TGD_Hospital
/relational/history.sql
UTF-8
680
3.921875
4
[]
no_license
SELECT PE.NAME, PE.DNI, PE.FIRSTSURNAME, PE.SECONDSURNAME, PE.TELEPHONE, PE.ADDRESS, PA.SIPNUMBER FROM person PE INNER JOIN patient PA ON PE.Id = PA.Id WHERE PE.DNI = '22543281Z'; SELECT * FROM hospitalization H WHERE H.PATIENTID = (SELECT P.Id FROM person P WHERE P.DNI = '22543281Z' AND rownum = 1); SELECT * FROM ob...
true
832dd7602c03df54dccee9cfbca87d36ab6a812b
SQL
Jccommander/mySQLWork
/JCC_Homework_8.sql
UTF-8
4,232
4.1875
4
[]
no_license
USE sakila; -- 1.a SELECT first_name, last_name FROM actor; -- 1.b SELECT CONCAT(first_name, ' ', last_name) AS "Actor Name" FROM actor; -- 2.a SELECT actor_id, first_name, last_name FROM actor WHERE first_name = "JOE"; -- 2.b SELECT actor_id, first_name, last_name FROM actor WHERE last_name LIKE "%GEN%"; -- 2.c S...
true