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
ef16853a97ca6b85b1ecac3ecb22f1ea17ec3646
SQL
YanhuiJing/flink-sql-etl
/etl-job/src/main/resources/job-sql-1.12/upsert-kafka.sql
UTF-8
1,148
3.40625
3
[]
no_license
-- create an upsert-kafka table CREATE TABLE pageviews_per_region ( region STRING, pv BIGINT, uv BIGINT, PRIMARY KEY (region) NOT ENFORCED ) WITH ( 'connector' = 'upsert-kafka', 'topic' = 'pageviews_per_region', 'properties.bootstrap.servers' = 'localhost:9092', 'key.format' = 'json', 'val...
true
7c2f0928ea0c422855c2f81d593e5904d4d47d07
SQL
JcGaara/SGA-PLSQL-OPE
/SGA-OPERACION/Scripts/Script_opedd_cambio_deco.sql
UTF-8
1,915
2.734375
3
[]
no_license
DECLARE ln_count NUMBER; BEGIN ln_count := 0; ------------------------------------------------------------------------------------------ -- Actualizar WLL/SIAC - DES. DECO ADICIONAL a WLL/SIAC - BAJA DECO ALQUILER en opedd --------------------------------------------------------------------------------------...
true
a147d3949feed9dbccd018a618f527649c6ad0f3
SQL
hlncrg/sqlPractice
/pgexercises/joins/simplejoin2.sql
UTF-8
605
3.625
4
[]
no_license
/* Work out the start times of bookings for tennis courts Question How can you produce a list of the start times for bookings for tennis courts, for the date '2012-09-21'? Return a list of start time and facility name pairings, ordered by the time. */ SELECT starttime, name FROM cd.bookings JOIN cd.facilities USING(fa...
true
c018aafba2b40e95994648ed33b6a69111084402
SQL
aobandof/SIGEDENT
/BDx/beraudent_mysql.sql
UTF-8
32,149
3.609375
4
[]
no_license
-- MySQL Workbench Forward Engineering SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0; SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0; SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL,ALLOW_INVALID_DATES'; -- ----------------------------------------------------- -- Schema beraudent...
true
327f435b543f3e0a9b6252d05ec914eb5acf7985
SQL
patrickpreuss/ziptie
/org.ziptie.provider.credentials/META-INF/sql/pgsql/creds.sql
UTF-8
3,988
3.546875
4
[]
no_license
-- Define table(s) used by the Credentials Service provider -- ------------------------------- -- Address Set -- ------------------------------- CREATE TABLE address_set ( id INTEGER NOT NULL, dateCreated TIMESTAMP default CURRENT_TIMESTAMP, dateModified TIMESTAMP, primary key (id) ); CREATE TABLE ad...
true
408dbf4605b68820fc762c19a59d4ca08449bff0
SQL
CUBRID/cubrid-testcases
/sql/_01_object/_09_partition/_001_create/cases/1128.sql
UTF-8
1,716
3.078125
3
[ "BSD-3-Clause" ]
permissive
--create list partiition table with a function to_char to change smallint data type to char data type as a partition value create table list_test(id int, test_int int, test_smallint smallint, primary key(id,test_smallint)) PARTITION BY LIST (to_char(test_s...
true
bfb20d9237ee67a9534a6749b7dfb7b08c789946
SQL
YELLADMIN/learningTest
/备份资料/SQL脚本模版/MYSQL/单表分组查询排序后取组内第一条数据.sql
UTF-8
580
3.6875
4
[]
no_license
SELECT pre.* FROM sensor_data_water_meter_dlss AS pre INNER JOIN ( SELECT MAX ( gatherTime ) AS gatherTime, mid FROM sensor_data_water_meter_dlss GROUP BY mid ) lastest ON lastest.gatherTime = pre.gatherTime AND lastest.mid = pre.mid 另一种: SELECT * FROM ...
true
34b3757bbc71f796026ec7845978ac4a86fdb266
SQL
mistermax80/xdisk
/doc/sql/xdisk_modificato.sql
UTF-8
3,779
3.5
4
[]
no_license
-- MySQL Administrator dump 1.4 -- -- ------------------------------------------------------ -- Server version 5.0.24-community -- -- Create schema xdisk -- -- CREATE DATABASE IF NOT EXISTS xdisk; -- USE xdisk; -- -- Definition of table `utente` -- CREATE TABLE `utente` ( `USERID` varchar(20) NOT NULL, `NOME` ...
true
f4bb8efc75946da7dfdc640056115ae6e3442397
SQL
dupeplay/vintage-barber
/vintage-barber.sql
UTF-8
4,756
3.03125
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Jun 26, 2018 at 03:37 AM -- Server version: 10.1.19-MariaDB -- PHP Version: 5.6.28 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CL...
true
a1e51f462df6acf2e5038faf9ae5e60c8c5a85de
SQL
jrjr-randy/backoffice
/sql/build_new_db/prometheus_tables/email_templates.table.sql
UTF-8
890
3.4375
3
[]
no_license
DROP PROCEDURE IF EXISTS table_create_prometheus_email_templates; DELIMITER // CREATE PROCEDURE table_create_prometheus_email_templates() BEGIN IF NOT EXISTS ( SELECT DISTINCT 1 FROM `information_schema`.`TABLES` WHERE `TABLE_SCHEMA` = DATABASE() AND `TABLE_NAME` = 'email_templates' ) THEN CREATE TABLE `...
true
8f65fc53220c15966a7b62aed94e71245baf842e
SQL
Maximedubois31/Projet-3-App-web-entraide-entre-voisins-
/PandAmiParent/PandAmiDao/src/main/resources/import.sql
UTF-8
13,051
2.75
3
[]
no_license
-- Insert des Catégorie Aide INSERT INTO `categorie_aide` (id, nomCategorieAide) VALUES (1, 'Bricolage - Travaux'); INSERT INTO `categorie_aide` (id, nomCategorieAide) VALUES (2, 'Jardinage'); INSERT INTO `categorie_aide` (id, nomCategorieAide) VALUES (3, 'Déménagement'); INSERT INTO `categorie_aide` (id, nomCategorieA...
true
9eba99b1a1a1c6ea865a208f87f7400cf1f6e823
SQL
gabaghul/Curso-PL-SQL
/Join.sql
ISO-8859-1
2,478
4.0625
4
[]
no_license
CREATE TABLE ALUNOS ( id_aluno int not null, nome varchar(20) not null, primary key(id_aluno) ); create table disciplina ( id_disciplina int not null, nome_disc varchar(20), primary key(id_disciplina) ); create table matricula ( id_aluno int not null, id_disciplina int not null, pe...
true
6c10762429b7b07fbb3c18ab654dd01aac5ef7eb
SQL
Taianam/Banco_de_Dados-SERRATEC
/TRABALHO FINAL/tabela_controle_de_aluguel.sql
UTF-8
752
3.0625
3
[]
no_license
--Criação de tabala CREATE TABLE public.controle_de_aluguel ( id serial NOT NULL, data_do_aluguel date NOT NULL, id_filme integer NOT NULL, id_cliente integer NOT NULL, PRIMARY KEY (id) ); ALTER TABLE public.controle_de_aluguel OWNER to postgres; INSERT INTO controle_de_aluguel(data_do_aluguel,...
true
6971917779375ba30e30554a12c7320751399643
SQL
dongduong/rails-chat-tutorial-swam
/tables_dump_October_10_2019.sql
UTF-8
3,280
3.484375
3
[]
no_license
-- ------------------------------------------------------------- -- TablePlus 2.0(200) -- -- https://tableplus.com/ -- -- Database: postgres -- Generation Time: 2019-10-10 23:46:33.6930 -- ------------------------------------------------------------- -- This script only contains the table creation statements and does...
true
8673acf8970234c095a0851622dbc31a2e3b3368
SQL
vijaydairyf/TimelyFish
/SolomonApp/dbo/Stored Procedures/dbo.pCF507PigGroup.sql
UTF-8
680
3.21875
3
[]
no_license
--************************************************************* -- Purpose:Returns PigGroup -- Author: Charity Anderson -- Date: 9/10/2004 -- Usage: PigTransportRecord app -- Parms:ProjectID,BarnNbr,TranDate --************************************************************* CREATE PROC dbo.pCF507PigGroup @parm1 as var...
true
1a842ac60d728e3a1375d711edf0fd0585174a6a
SQL
zhang-jp/approval
/approval.sql
UTF-8
2,168
3.28125
3
[]
no_license
/* SQLyog Ultimate v12.09 (64 bit) MySQL - 5.7.21 : Database - approval ********************************************************************* */ /*!40101 SET NAMES utf8 */; /*!40101 SET SQL_MODE=''*/; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECK...
true
9f547412626c00fb55bc6aec6e4f4a2fcbd19d64
SQL
anadirastogi/Gokak-Power
/gpel.sql
UTF-8
7,807
3.140625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 3.5.1 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Jan 16, 2014 at 07:08 AM -- Server version: 5.5.24-log -- PHP Version: 5.3.13 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */...
true
d898d2b49f751a535471f109cdf54940328b6eb2
SQL
JonathanRH07/Control-de-versiones
/DB ICAAVweb/Suite_mig_demo/Tables/ic_fac_tr_folios_historico_uso_mensual.sql
UTF-8
963
2.625
3
[]
no_license
CREATE TABLE `ic_fac_tr_folios_historico_uso_mensual` ( `id_folios_historico_uso` int(11) NOT NULL AUTO_INCREMENT, `id_grupo_empresa` int(11) NOT NULL, `no_folios_facturas` int(11) NOT NULL DEFAULT '0', `no_folios_nc` int(11) NOT NULL DEFAULT '0', `no_folios_documentos` int(11) NOT NULL DEFAULT '0', `no_fol...
true
4242403e306ebb3979c55f640b2ceef85fc26fc9
SQL
Demonicltu/musicLover
/src/main/resources/dbSQLs/user.sql
UTF-8
424
3.703125
4
[]
no_license
create table if not exists USER ( ID LONG not null, NAME VARCHAR not null, USERNAME VARCHAR not null, PASSWORD VARCHAR not null, UUID VARCHAR not null, constraint USER_PK primary key (ID) ); create index USER_USERNAME_PASSWORD_INDEX on USER (USERNAME, PASSWORD); cr...
true
0f4a53cb704bed21ca16f2939eecf6b78ed994d2
SQL
davidnscott/dbproject
/finalprojectdb.sql
UTF-8
2,965
4.125
4
[]
no_license
drop database if exists MealPlanOrganizer; create database if not exists MealPlanOrganizer; use MealPlanOrganizer; create table User( FirstName varchar(30), LastName varchar(30), Age int, Gender varchar(15), Email varchar(200), primary key(Email) ); create table Instruction( InstructionID ...
true
5cd7aff59b76c830e21c60591d9974c9b82ce3d8
SQL
alexTheMyst/java_classes
/chapter_007/src/main/resources/cars/create_tables.sql
UTF-8
431
2.796875
3
[]
no_license
create table transmissions ( id serial primary key , name varchar(100) ); create table engines ( id serial primary key , name varchar(100) ); create table gears ( id serial primary key , name varchar(100) ); create table cars ( id serial primary key , name varchar(100), transmission_id integer refe...
true
bd20542446e64f79c32007288176d5a5a26f260f
SQL
liuzhi0716/leetcode-practice
/src/com/ecnu/liu/algorithm/leetcode/brutal/sql/test2.sql
UTF-8
1,202
3.640625
4
[]
no_license
题目描述 查找各个部门当前(to_date='9999-01-01')领导当前薪水详情以及其对应部门编号dept_no CREATE TABLE `dept_manager` ( `dept_no` char(4) NOT NULL, `emp_no` int(11) NOT NULL, `from_date` date NOT NULL, `to_date` date NOT NULL, PRIMARY KEY (`emp_no`,`dept_no`)); CREATE TABLE `salaries` ( `emp_no` int(11) NOT NULL, `salary` int(11) NOT NULL, `from_da...
true
4896f6e761485f6e77396579a0b6fb5a3f3f1478
SQL
18918090402/MZJF_Work
/MZJF_Work/0002 Git.nonobank.com/archive_20180806/bi-etl.git/03_DW_HADOOP/08_DMT_MXD/03_SCRIPT/FACT_MXD_NC_DETAIL/FACT_MXD_NC_DETAIL.sql
UTF-8
10,039
3.375
3
[]
no_license
set mapreduce.job.name = IDW_MXD_FACT_MXD_NC_DETAIL; set mapreduce.job.queuename = etl-dw; set hive.exec.dynamic.partition.mode=nonstrict; /*催收相关信息*/ DROP TABLE IF EXISTS TMP.TMP_DUNNING_BO_ID; CREATE TABLE TMP.TMP_DUNNING_BO_ID AS SELECT BO_ID ,CONCAT(FROM_UNIXTIME(UNIX_TIMESTAMP() - 1 * 24 * 60 * 60, 'yyyy-MM')...
true
fe6b63a5740ce323ea9cd8c4143629a0c6464573
SQL
paul-rogers/drill-test-framework
/framework/resources/Advanced/tpcds/tpcds_sf1/original/parquet/query31.sql
UTF-8
2,422
3.96875
4
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
-- start query 31 in stream 0 using template query31.tpl WITH ss AS (SELECT ca_county, d_qoy, d_year, Sum(ss_ext_sales_price) AS store_sales FROM store_sales, date_dim, customer_address WHERE ss_sold_date_...
true
7a7bc0450649f73a61c47f9b9fc0f39290bf0d6e
SQL
DuyTung13/Railway-09
/DB_Facebook.sql
UTF-8
11,928
3.59375
4
[]
no_license
DROP DATABASE IF EXISTS Facebook; CREATE DATABASE Facebook; USE Facebook; -- câu 1: Tạo table với các ràng buộc và kiểu dữ liệu ------ DROP TABLE IF EXISTS `National`; CREATE TABLE `National`( National_id TINYINT UNSIGNED AUTO_INCREMENT PRIMARY KEY, National_Name VARCHAR(50) NOT NULL UNIQUE KEY, Language_Ma...
true
cdcbcaa51f5e4b7b1fc940e5d8163933967fd136
SQL
PNNL-Comp-Mass-Spec/DBSchema_PgSQL_DMS
/dms/pc/pc.t_proteins.sql
UTF-8
1,640
3.53125
4
[ "Apache-2.0" ]
permissive
-- -- Name: t_proteins; Type: TABLE; Schema: pc; Owner: d3l243 -- CREATE TABLE pc.t_proteins ( protein_id integer NOT NULL, sequence public.citext NOT NULL, length integer NOT NULL, molecular_formula public.citext, monoisotopic_mass double precision, average_mass double precision, ...
true
4e954e311c30ee68c815fed004c33a3b23e002b6
SQL
walejandromt/kubo.financiero
/misc/soluciones.sql
UTF-8
3,754
3.5625
4
[]
no_license
-- TABLA PARA RESPALDO CREATE TABLE `PAGARES_BITACORAS` ( `PagareID_Key` int(12) NOT NULL AUTO_INCREMENT, `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `PagareID` int(12) NOT NULL, `CuentaID` int(12) NOT NULL, `ClienteID` int(11) DEFAULT NULL, `TipoInversionID` int(11) ...
true
8166d070f698a9c8f9c4630fc8a8f7b5bb738478
SQL
WesleySiNeves/Scripts_SQL_Server
/2.Conteudo de otimizacao/8.Waits/MonitoraWaits.sql
ISO-8859-1
3,342
3.671875
4
[]
no_license
--- Identifica onde esto as esperas do banco WITH Waits AS ( SELECT wait_type , wait_time_ms / 1000.0 AS WaitS , ( wait_time_ms - signal_wait_time_ms ) / 1000.0 AS ResourceS , signal_wait_time_ms / 1000.0 AS SignalS , ...
true
8abfc52f58bc2300873ee1a9fe5f1cd0bc83de6d
SQL
akm4545/inno
/src/main/resources/static/sql/inquiryReservation.sql
UTF-8
410
3.140625
3
[]
no_license
CREATE TABLE INQUIRYRESERVATION( INQUIRYRESERVATION_IDX INT NOT NULL PRIMARY KEY AUTO_INCREMENT, /* 예약 테이블 인덱스 */ INQUIRY_IDX INT NOT NULL, /* 문의 테이블 주키(외래키) */ INQUIRYRESERVATION_TYPE CHAR(1) NOT NULL DEFAULT 'N', /* 예약 타입 선택안함 = N, 전화 = T, 방문 = V */ FOREIGN KEY (INQUIRY_IDX) REFERENCES INQUIRY (INQU...
true
6fe6fa7727d7f2d272a9976d1c20aa9a2e95cbe6
SQL
daimon5lion/Node.js-MySQL
/bamazon.sql
UTF-8
1,789
3.703125
4
[]
no_license
DROP DATABASE IF EXISTS bamazon_db; CREATE DATABASE bamazon_db; USE bamazon_db; CREATE TABLE products ( item_id INTEGER(10) AUTO_INCREMENT NOT NULL, product_name VARCHAR (50) NOT NULL, department_name VARCHAR (50) NOT NULL, price DECIMAL (10,2) NOT NULL, stock_quantity INTEGER ...
true
f72e740db37c8b2962f778ef4132e8b5c5f11c73
SQL
pavstar619/car_rental
/car_rental/database/cars.sql
UTF-8
5,657
2.953125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.9.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Dec 21, 2020 at 07:25 PM -- Server version: 10.4.8-MariaDB -- PHP Version: 7.3.10 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
true
c32a7de5609d7487f55a69287f95d9863bef0bcc
SQL
arrow812/server-side-project
/pixette.sql
UTF-8
7,552
3.03125
3
[]
no_license
# ************************************************************ # Sequel Pro SQL dump # Version 4541 # # http://www.sequelpro.com/ # https://github.com/sequelpro/sequelpro # # Host: 127.0.0.1 (MySQL 5.5.5-10.1.14-MariaDB) # Database: pixette # Generation Time: 2016-07-26 09:03:20 +0000 # ********************************...
true
263a51e7b7f3a28ab5dd795c7f38aff954fd1973
SQL
sunsunjackson/CSE111-Database-System-SQL
/lab3/sql files/10.sql
UTF-8
231
3.625
4
[]
no_license
SELECT SUM(O.o_totalprice) FROM orders O, customer C, nation N, region R WHERE C.c_custkey = O.o_custkey AND N.n_regionkey = R.r_regionkey AND C.c_nationkey = N.n_nationkey AND R.r_name = 'EUROPE' AND O.o_orderdate LIKE '1996%';
true
be39ca88b8f2d3469922d9f1874ae35daef606ed
SQL
ilfun/Homework-DA
/SQL/lesson_7_homework.sql
UTF-8
1,476
4.1875
4
[]
no_license
--colab/jupyter: https://colab.research.google.com/drive/1j4XdGIU__NYPVpv74vQa9HUOAkxsgUez?usp=sharing --task1 (lesson7) -- sqlite3: Сделать тестовый проект с БД (sqlite3, project name: task1_7). В таблицу table1 записать 1000 строк с случайными значениями (3 колонки, тип int) от 0 до 1000. -- Далее построить гистагр...
true
d8d4c509840f111700218e0900ef102982d42cd0
SQL
hychul/refrigerator-mysql
/docs/3주차/algorithm/solution/jaehyun/solution1.sql
UTF-8
425
3.859375
4
[]
no_license
select player_id , event_date , (select sum(count) from ( select t1.player_id , t1.event_date , sum(t1.games_played) as 'count' from Activity t1 group by t1.player_id, t1.event_date) t3 where t3.player_id = t2.player_...
true
f6ef126d25a3415a987331dd8f5279240a19f065
SQL
better/dbt
/test/integration/004_simple_snapshot_test/check-snapshots/check_cols_cycle.sql
UTF-8
755
2.8125
3
[ "Apache-2.0" ]
permissive
{% snapshot check_cols_cycle %} {{ config( target_database=database, target_schema=schema, unique_key='id', strategy='check', check_cols=['color'] ) }} {% if var('version') == 1 %} select 1 as id, 'red' as color union al...
true
be713c7ac40cdcc328523c44fd9efe78dcc18bb5
SQL
liyi98/cookAPI
/src/db/sql/ddl.sql
UTF-8
5,522
3.84375
4
[]
no_license
CREATE TABLE `user` ( id bigint NOT NULL AUTO_INCREMENT, name varchar(50) NOT NULL, email varchar(256) NOT NULL, password varchar(256) NOT NULL, profile_image varchar(256) NULL, gender int NULL, phone varchar(30) NULL, creation_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, token varchar(256) ...
true
ac970163818bde1d4847455dce3f93ce30357614
SQL
DucauArley/EjerciciosProgramacion3
/Ejercicios php/Clases/clase06/Ejercicio/alumno.sql
UTF-8
1,656
2.9375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 15-05-2019 a las 02:58:32 -- Versión del servidor: 10.1.19-MariaDB -- Versión de PHP: 5.6.28 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT...
true
ac28ad191731e5cf00a1bc99ab03130ed0966d2c
SQL
foomip/developer-profiler
/conf/evolutions/default/8.sql
UTF-8
405
2.90625
3
[ "Apache-2.0" ]
permissive
# insert default indexable pages # --- !Ups INSERT INTO IndexablePages SELECT 0 AS id, 'Home page' AS description, '' AS path, 1 AS active, NULL AS indexableTitle, NULL AS indexableDescription UNION SELECT 1, 'About developer', 'about-me', 1, NULL, NULL UNION SELECT 2, 'This site', 'about-site', 1, NULL, NULL ...
true
22512e6791a85a9f155c79831fb5d00f492002c1
SQL
formationsj4ltechnologies/dwwm-shop
/db/db_dwwmshop_commentaire.sql
UTF-8
589
3.640625
4
[ "MIT" ]
permissive
create table commentaire ( id int auto_increment primary key, client_id int not null, produit_id int not null, contenu longtext not null, note smallint not null, constraint FK_67F068BC19EB6921 foreign key (client_id) references user (id), constrain...
true
f856f8cc68c8c1e3ebed9b4059b1cfb96331c7f2
SQL
ritvik06/DBMS_Assignments
/A2/create_table.sql
UTF-8
700
3.28125
3
[]
no_license
drop table flights; drop table airports; CREATE TABLE airports ( airportid integer NOT NULL, city text, state text, name text, constraint airports_key primary key (airportid) ); CREATE TABLE flights ( flightid integer NOT NULL, originairportid integer, destairportid integer, carrie...
true
a78a9556b8c75a7b38a6f9a7812607f45f63b147
SQL
ChongLynk0611/QuanLyNhaHang
/database/produce.sql
UTF-8
412
3.046875
3
[]
no_license
create proc Report1(@mahd as varchar(10)) as begin select TenNV,HoaDon.MaKH, TenKH ,HoaDon.MaHD, NgayTao,ChiTiet.MaSP, TenSP,ThuongHieu,Donvi, Gia , SLBan, KhuyenMai, TongGia from ChiTiet, HoaDon, KhachHang,NhanVien,SanPham where ChiTiet.MaHD = HoaDon.MaHD and HoaDon.MaKH = KhachHang.MaKH and HoaDon.MaNV = N...
true
6536716977f007fa0c543fbe256c112f937dfa1c
SQL
JordynT/TrimmMe
/schema.sql
UTF-8
1,928
3.28125
3
[]
no_license
DROP DATABASE IF EXISTS Trimmme; CREATE DATABASE Trimmme; USE Trimmme; CREATE TABLE user ( user_id INT AUTO_INCREMENT PRIMARY KEY, first_name VARCHAR(255) NOT NULL, last_name VARCHAR(255) NOT NULL, user_name VARCHAR(255) NOT NULL, password VARCHAR(64) NOT NULL, email VARCHAR(255) NOT NULL, r...
true
8b975ae800c59328b981e48eeaf5b904705a8db5
SQL
zend-patterns/ZendServer-TokenAuthentication
/utils/sqls/gui_mysql_create_database.sql
UTF-8
745
3
3
[]
no_license
/* * We assume that GUI_ACL_* tables have already been created and have been populated * */ set @adminroleid := (SELECT ROLE_ID FROM GUI_ACL_ROLES WHERE name = 'administrator'); set @guestroleid := (SELECT ROLE_ID FROM GUI_ACL_ROLES WHERE name = 'guest'); INSERT IGNORE INTO GUI_ACL_RESOURCES VALUES(NULL, 'route:Token...
true
e107fc9481d1881800318d7b6d14219d4e458d8c
SQL
Hakim2016/30EBS
/R12/INV MMT by Hakim v1.01.sql
UTF-8
8,295
3.125
3
[]
no_license
SELECT mmt.transaction_id, mmt.transaction_date, mmt.costed_flag, mmt.pm_cost_collected, mmt.expenditure_type, --mmt.created_by, --mmt.creation_date, mmt.organization_id orgs_id, msi.segment1, mmt.prior_cost, mmt.new_cost, mtt.transaction_type_name t...
true
ca69a333f11b1be8c4987fc1a4b54a14c6eab36a
SQL
neosuniversity-team/docker-php-petstore
/www/db-scripts/a_init.sql
UTF-8
1,987
3.15625
3
[]
no_license
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=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8 */; -- -- Database: `dbpe...
true
f334d86cee3cad982876a16b7a1b9e09385265c1
SQL
hanshengj/datebase
/datebasess1.sql
UTF-8
2,037
3.890625
4
[]
no_license
给定下表,请完成操作 DROP TABLE IF EXISTS exam_result2; CREATE TABLE exam_result2 ( id INT, name VARCHAR(20), chinese DECIMAL(3,1), math DECIMAL(3,1), english DECIMAL(3,1), qq_mail varchar(20) ); INSERT INTO exam_result2 (id,name, chinese, math, english,qq_mail) VALUES (1,'唐三藏', 67, 98, 56,'1231@qq.com'), (2,'孙悟空', 87....
true
d3d1693b5a8ddb99904716700f051b0f1764b4a2
SQL
ligson/hehuoren
/src/main/java/myFrameU/product/sql/sql.sql
UTF-8
3,216
3.3125
3
[]
no_license
/*产品类型*/ create table product_productType( id int primary key auto_increment, name varchar(200) not null, isLeaf tinyint not null, isROOT tinyint not null, jibie tinyint not null, treeId varchar(100) not null, url varchar(32) not null, rootTypeId int not null, parent_id int, key parent_id(parent_id), constraint product...
true
e763604d9032007044e6e3c598d7f3676f1eb12f
SQL
JinglinLi/northwind_dashboard
/project/northwind_jinglin.sql
UTF-8
202,464
3.421875
3
[ "MIT" ]
permissive
-- -- PostgreSQL database dump -- -- Dumped from database version 13.3 -- Dumped by pg_dump version 13.3 SET statement_timeout = 0; SET lock_timeout = 0; SET idle_in_transaction_session_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings = on; SELECT pg_catalog.set_config('search_path', '', fal...
true
129b8eed5c9b80cecca3053a40b0928397209ac9
SQL
nfrankel/bootvaadinkotlin-demo
/src/main/resources/schema-h2.sql
UTF-8
181
2.546875
3
[]
no_license
DROP TABLE IF EXISTS PERSON; CREATE TABLE PERSON ( ID INT AUTO_INCREMENT PRIMARY KEY, FIRST_NAME VARCHAR2(256) NOT NULL, LAST_NAME VARCHAR2(256) NOT NULL, BIRTHDATE DATE );
true
88f1bbd34613d5ceb418a36e0444f73f00d4efc1
SQL
parthnaik/stanford-cs145
/Constraints and Triggers/SQL_Social_Network_Triggers_Quiz.sql
UTF-8
5,483
4.0625
4
[]
no_license
/* Delete the tables if they already exist */ drop table if exists Highschooler; drop table if exists Friend; drop table if exists Likes; /* Create the schema for our tables */ create table Highschooler(ID int, name text, grade int); create table Friend(ID1 int, ID2 int); create table Likes(ID1 int, ID2 int); /* Popu...
true
faa74c502830bec3dc53e3757fc859f1703e1003
SQL
sun3842/FarmaDevelopment
/application/models/database.sql
UTF-8
20,169
3.359375
3
[]
no_license
/*****************Start Table :user_type **************************/ CREATE TABLE IF NOT EXISTS user_type ( user_type_id int(12) NOT NULL AUTO_INCREMENT, user_type_name varchar(100) NOT NULL, user_type_description varchar(250) DEFAULT NULL, user_type_active tinyint(1) NOT NULL DEFAULT '1', PRIMARY KEY (user_...
true
949403860963234f43d702ad3ad8deaeab611a4e
SQL
eduardox23/pm-trab-2
/TaxiAereo/Docs/sql/5_taxi_aereo_creates.sql
UTF-8
2,214
3.515625
4
[]
no_license
 CREATE DOMAIN cpf AS numeric(11); CREATE DOMAIN dinheiro AS numeric(8,2); -- 6 dígitos antes da vírgula e 2 dígitos depois CREATE DOMAIN breve AS numeric(20); CREATE DOMAIN chassi_aeronave AS varchar(40); CREATE DOMAIN numero_casa AS int CONSTRAINT numero_invalido CHECK (VALUE > 0); CREATE DOMAIN tipo_aeronave AS v...
true
36e65abd2ba47fe4d4599108fcc0a0cb5852231e
SQL
ZLeinwand/hermesORM
/dogs.sql
UTF-8
862
3.65625
4
[]
no_license
CREATE TABLE dogs ( id INTEGER PRIMARY KEY, name VARCHAR(255) NOT NULL, owner_id INTEGER, FOREIGN KEY(owner_id) REFERENCES human(id) ); CREATE TABLE humans ( id INTEGER PRIMARY KEY, fname VARCHAR(255) NOT NULL, lname VARCHAR(255) NOT NULL, house_id INTEGER, FOREIGN KEY(house_id) REFERENCES human(id...
true
5a8e76a8e95930e48cf36abd771ddf150345132a
SQL
youngseo9478/Web
/Web_Servlet&JSP/01_22/board.sql
UTF-8
3,406
3.96875
4
[]
no_license
conn system/1234 drop user 유저네임 cascade create user 유저네임 identified by Password; grant connect,resource,dba to 유저네임; 게시판 프로그램 관련 SQL conn 유저네임/Password users 테이블 생성 sqlplus java01/1234 conn java01/1234 drop table users cascade CONSTRAINT; users 테이블 생성 drop table users; drop table users cascade CONSTRAINT; create ...
true
bca4bbb65083af38419caf71ae659c367c10455b
SQL
fujita0622/-WriteTypeSqlDrill
/cap2/2_1_4.sql
UTF-8
1,400
4.3125
4
[]
no_license
2-1 問4 貸出記録テーブル(rental)とユーザテーブル(usr)からそれぞれのユーザについて、現在何冊を貸出ているかを、貸出数の多い順に取得しましょう。 取得列は、ユーザの氏名、貸出数とします。貸出数0のユーザは出力する必要はありません。 [回答] -- usrテーブルの氏名(l_name,f_name)と利用者(rentalテーブルのuser_id)ごとのカウント数を取得 -- ASキーワードでusrテーブルに'u'、rentalテーブルに'r'と別名をつける SELECT u.l_name, u.f_name, COUNT(r.user_id) FROM usr AS u INNER JOIN ...
true
5ff57f72e08b76e9fc69626a6d5ec3d9e9ea2bcb
SQL
cjwawrzonek/website
/data/schema.sql
UTF-8
325
2.75
3
[]
no_license
-- if want to add a column name that is a keyword, use 'quotes' drop table if exists post_summaries; create table post_summaries ( id integer primary key autoincrement, prefix text not null, type text not null, title text not null, summary text not null, thumbnail_img_url text not null, 'date' text not nu...
true
c4b1c83157e817d04403255032068c5bfc4f54ab
SQL
AlexeyGorobtsov/Futer_test
/gb1.sql
UTF-8
1,871
3.015625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.6.5.2 -- https://www.phpmyadmin.net/ -- -- Хост: 127.0.0.1:3306 -- Время создания: Сен 12 2017 г., 12:48 -- Версия сервера: 5.7.16 -- Версия PHP: 7.1.0 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT *...
true
3bf96c509e03909005f08d4c83a09c0e104c310e
SQL
Hyp8X/lovely
/stok/db/lovely.sql
UTF-8
2,740
3.1875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jul 18, 2020 at 07:37 AM -- Server version: 10.4.13-MariaDB -- PHP Version: 7.4.7 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIEN...
true
2725dc18a56e2bc33b4987eecf09fece51ea5162
SQL
Linok75/TimeGameTmp
/sql/timegame250813.sql
UTF-8
8,568
3.1875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 3.5.8.1 -- http://www.phpmyadmin.net -- -- Client: 127.0.0.1 -- Généré le: Dim 25 Août 2013 à 04:13 -- Version du serveur: 5.6.11-log -- Version de PHP: 5.4.14 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIE...
true
8a93dcb8d315843f5ab1f51950438f0be7e9d73c
SQL
NaviUy/CS_4222_Principles_of_Database_Systems
/Project/INSERT_TO_TABLE.sql
UTF-8
7,606
3.015625
3
[]
no_license
INSERT INTO BRANCH (BranchName) VALUES ('Branch_A'), ('Branch_B'), ('Branch_C'); INSERT INTO UNIVERSITY_PERSON (Type_of_person, Fname, Lname, Gender, Department, Email, Birthdate) VALUES ('Vocational', 'Jeannie', 'Santiago', 'Female', 'Electrical Engineer', 'JSantiago@gmail.com', '1999-02-25'), ('Voc...
true
113cf5b67f7ce47cc136f168c2f7165cbbb354af
SQL
KeatonMacLeod/LeetCodeSolutions
/BigCountries.sql
UTF-8
147
3.203125
3
[]
no_license
# Write your MySQL query statement below SELECT w.name, w.population, w.area FROM World as w WHERE (w.area > 3000000) OR (w.population > 25000000)
true
2ce99aa1fb6d122a206133070bade991cdb911f2
SQL
wil-source/gestion-note
/bdd.sql
UTF-8
3,417
3.515625
4
[ "MIT" ]
permissive
-- -------------------------------------------------------- -- Hôte : localhost -- Version du serveur: 5.7.19 - MySQL Community Server (GPL) -- SE du serveur: Win64 -- HeidiSQL Version: 9.4.0.5125 -- -------------------------------------------------------- /*...
true
f318847d57c5e9ce0bec2e3198f105e439e351ac
SQL
JABE22/divarit
/meta/Raportit/R3.sql
UTF-8
1,895
3.84375
4
[]
no_license
/* Raportti 3 (versio 2) :: Okko Pyssysalo :: muokattu viimeksi 2018-04-18 Haetaan kaikki käyttäjät - lisäksi lasketaan jokaiselle viim. vuoden sisään tehtyjen ERI teosten lukumäärä. Esimerkiksi jos teoksia on tilattu A,B,B ja C, on eri teoksia 3 kpl. Vanha kysely suoritettiin yhdessä kyselyssä. Tämä käytännö...
true
06d1b32c9f8bcbadce285291f58babbcd061bc43
SQL
Jagatmachines/ScanAnsBookletRFIDTag
/rfid.sql
UTF-8
3,532
3.390625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.1.14 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Apr 04, 2017 at 07:39 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
f351178908b78feb81b4371cff553381b68ca8f2
SQL
kirrok/1sem_project
/script.sql
UTF-8
2,794
3.171875
3
[]
no_license
CREATE DATABASE `appDB` /*!40100 DEFAULT CHARACTER SET latin1 */; CREATE TABLE `appDB`.`place` ( `place_id` int(11) NOT NULL AUTO_INCREMENT, `place_name` varchar(45) NOT NULL, `place_weather` int(11) DEFAULT NULL COMMENT '\n\n\n', `place_activity` int(11) DEFAULT NULL, PRIMARY KEY (`place_id`) ) ENGINE=InnoD...
true
481472399d35e391621e20a374ea29e8c30d800a
SQL
zainen/BootcampX
/2_queries_joins/ibrahim_work_time.sql
UTF-8
130
3.234375
3
[]
no_license
SELECT SUM(duration) FROM assignment_submissions INNER JOIN students ON student_id = students.id WHERE students.name = 'Ibrahim Schimmel'
true
b8c88f9c9321373d5e1a86cff11f35d6a6612f6e
SQL
wolfpet/kitchen
/Forum/sql/add_assets.sql
UTF-8
376
2.75
3
[ "BSD-3-Clause" ]
permissive
DROP TABLE IF EXISTS `confa_assets`; SET character_set_client = utf8; CREATE TABLE `confa_assets` ( `id` int(11) NOT NULL auto_increment, `user_id` int(11) NOT NULL, `msg_id` varchar(255) character set latin1 NOT NULL, `URL` text character set latin1, `added` timestamp NOT NULL default CURRENT_TIMESTAMP, PR...
true
56bc27ad102a34dfcfb41afaa716a868a79f6aa8
SQL
ChiRain/snaker
/metadata/sql/metadata_dev.sql
UTF-8
1,685
2.859375
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : 10.10.11.60 Source Server Version : 50616 Source Host : 10.10.11.60:3306 Source Database : metadata_dev Target Server Type : MYSQL Target Server Version : 50616 File Encoding : 65001 Date: 2015-09-01 15:23:42 */ SET FOR...
true
8e0652ea00859de46e26dfc93cb3a053ace3756b
SQL
ihugya1/BAIST
/Business Intelligence/SaleFactQuery(Add Dates).sql
UTF-8
1,161
3.34375
3
[]
no_license
SELECT ihugya1.dbo.CustomerDimension.CustomerKey, ihugya1.dbo.EmployeeDimension.EmployeeKey, ihugya1.dbo.ProductDimension.ProductKey, ihugya1.dbo.ShipperDimension.ShipperKey, ihugya1.dbo.TimeDimension.TimeKey, Northwind.dbo.[Order Details].Quantity, Northwind.dbo.[Order Details].Discount, Northwind.dbo.Orders.F...
true
442afff66d0e54c186296332e760774190978a37
SQL
DHEERAJ264/SQL
/Operations_1.sql
UTF-8
505
3.125
3
[]
no_license
select name from products; select name,price from products; select price from products where price <=200; select price from products where price > 60 and price < 120; select name, price*100 from products; select name , concat(price*100, "cents") as cents_amt from products; select avg(price) from products; selec...
true
7ec72b8f11f9370ca8b5dd9edb09fba79436bf5a
SQL
choi258/Role_Scheme_and_SQL_queries
/ORACLE_SQL/prob_8.sql
UTF-8
599
3.921875
4
[]
no_license
select a2.COURSETITLE as CourseTitle, a2.DEPTNAME as CourseDepartment, replace(a2.ABBREVIATION||'-'||a2.COURSENUM, ' ') as CourseCode , a2.FACULTYNAME as FacultyName, d.DEPTNAME as FacultyDepartment from (select distinct c.COURSETITLE, d.DEPTNAME, d.ABBREVIATION, c.COURSENUM, f.FACULTYNAME, f.DEPTID from(select COURSE...
true
1aea8ec2b4d1daf1983ac945a4579177cc08902c
SQL
jmicko/critical-coordination
/database.sql
UTF-8
4,040
3.734375
4
[]
no_license
-- Drop existing tables to start fresh DROP TABLE IF EXISTS "user", "project", "task", "task_name", "task_status", "company", "company_location" CASCADE; -- Table creation CREATE TABLE "user" ( "id" serial NOT NULL, "email" varchar(255) UNIQUE NOT NULL, "first_name" varchar(255), "last_name" varchar(255), "passwo...
true
d033e43d9a04de5a26c7bff06476973125959b46
SQL
clumsy/Civ5-MP_MODSPACK
/Mods/Nation - Empire of Russia (Peter the Great)/Buildings.sql
UTF-8
3,830
3.03125
3
[]
no_license
--======================================================================================================================= -- BuildingClasses --======================================================================================================================= INSERT INTO BuildingClasses (Type, Defau...
true
24a7cf0ac739f51d4144c5e6e04f0f18fcdc5017
SQL
logankeyes1212/Bamazon
/bamazon.sql
UTF-8
1,560
3.203125
3
[]
no_license
DROP DATABASE IF EXISTS bamazon_DB; CREATE database bamazon_DB; USE bamazon_DB; CREATE TABLE products ( id INT NOT NULL Auto_increment PRIMARY KEY, product_name VARCHAR(255) NOT NULL, department_name VARCHAR(255), price FLOAT NOT NULL, stock_quantity DECIMAL NOT NULL ); INSERT INTO products (product_nam...
true
f756a6b61de1834122d00b16a0b5afa0e6e0fec1
SQL
kesterboy/Single-Page-Application
/premiumlibrary/PremiumLibraryTeam/WebContent/WEB-INF/SQLscript/library_setup.sql
UTF-8
2,497
3.4375
3
[]
no_license
DROP DATABASE IF EXISTS library; CREATE DATABASE IF NOT EXISTS library; USE library; DROP TABLE IF EXISTS book; CREATE TABLE book ( id INTEGER AUTO_INCREMENT NOT NULL PRIMARY KEY, bookName VARCHAR(50) NOT NULL, bookAuthor VARCHAR(50) NOT NULL, bookCategory VARCHAR(50) NOT NULL, bookDescription VARCHAR(255) NOT ...
true
f78621a6a9a48f564413254a5fe4feb8bbd8b94b
SQL
aceoperator/ace
/ace-assembly/src/main/config/.ace/sql/upgrade_from_1.7.0_to_2.0.0.sql
UTF-8
1,804
3.21875
3
[]
no_license
-- Manual Steps -- (1) Convert all the MyIsam tables to InnoDb tables -- (2) In the canned_msg_tbl, manually modify all the message columns (blob). -- Remove <text></text> from text elements. -- Replace <href></href> with actual HTML syntax (use <a> the target attribute). -- Run the following SQL ...
true
e9ef7b666303df41f0b6c94e371e32d82a1dacec
SQL
w0lv3r1nix/Market-Research
/database-script/2018-03-09-dump/obj_ops.operation_log.sql
UTF-8
1,364
2.9375
3
[]
no_license
/* SQLyog Enterprise v12.5.1 (64 bit) MySQL - 5.7.21-log : Database - stock_market ********************************************************************* */ /*!40101 SET NAMES utf8 */; /*!40101 SET SQL_MODE=''*/; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS...
true
c536599369dcfa62c3ed45e0b5ce89f0ebe8a528
SQL
GreenRover/hibernate-log-analyser
/test/hibernateLog/bindingsComplicated.sql
UTF-8
388
2.96875
3
[ "MIT" ]
permissive
select * from ANFRAGE aa0_ left outer join ANFRAGE_TYP at1_ on anfrage0_.TYP_ID = at1_.ID left outer join fooo foo2_ on anfrage0_.FOO_ID = foo2_.ID where anfrage7_.XX = 2166 and anfrage0_.ZZ = 15340 and anfrage7_.ORT = '123-XXYZT-4567-foo' and anfrage0_.ZEIT >= TO_TIMESTAMP('2017-08-10 11:21:0...
true
b1b813060d8013227e24765b100b197bda959906
SQL
fordfrog/apgdiff
/src/test/resources/cz/startnet/utils/pgdiff/loader/schema_2.sql
UTF-8
151
2.53125
3
[ "MIT" ]
permissive
CREATE TABLE contacts(id int PRIMARY KEY, number_pool_id int, name varchar(50)); CREATE INDEX contacts_number_pool_id_idx ON contacts(number_pool_id);
true
1f59c652c9656fc7fce9413b5f0df92668199260
SQL
Sunil2011/growsari1
/data/db/re-dash-queries/12.Daily order update - Delivery.sql
UTF-8
1,271
4.1875
4
[]
no_license
DROP PROCEDURE IF EXISTS daily_store_report_delivery; DELIMITER // CREATE PROCEDURE daily_store_report_delivery(IN days INT) BEGIN SET @@group_concat_max_len=15000; SET @SQL = NULL; SELECT GROUP_CONCAT(DISTINCT CONCAT( 'sum(case when Date_format(o.delivered_by, ''%d-%M'') = ''', dt,...
true
949215d8ffb8c98d952baaae7106277ef765ef8c
SQL
cljoly/telecomnancy-twitter-like
/init_db.sql
UTF-8
1,880
4.4375
4
[]
no_license
-- Table des utilisateurs CREATE TABLE "user" ( "name" TEXT UNIQUE, "password" TEXT, "cookie" INT UNIQUE, PRIMARY KEY("name") ); -- Tables des messages CREATE TABLE "gazou" ( id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "date" TEXT, "author" TEXT, "content" TEXT, FOREIGN KEY...
true
33df29b828a404acc2ce69654441d87534898d38
SQL
MEV-BRUNO/EREDAR
/Baza_arhiva/eredarhr_db.sql
UTF-8
13,046
2.921875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.1.14 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Apr 24, 2018 at 05:50 PM -- Server version: 5.6.17 -- PHP Version: 5.5.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;...
true
e190ba019e2257f4e4ad3aac2310750fc805eb12
SQL
seolminsu90/spring-data-jdbc
/src/main/resources/schema.sql
UTF-8
1,280
3.640625
4
[]
no_license
/* 1 : 1 */ CREATE TABLE SUPER_ONE ( id BIGINT auto_increment, super_name varchar(255), primary key (id) ); CREATE TABLE SUB_ONE ( id BIGINT auto_increment, super_one BIGINT, sub_name varchar(255), primary key (id) ); ALTER TABLE SUB_ONE ADD FOREIGN KEY (super_one) ...
true
f6141c7c539aa91d1edf59355495085b2f75e5c8
SQL
mart2010/archive
/po/db/hsqldb/schema-load_SampleData.sql
ISO-8859-1
4,418
2.546875
3
[]
no_license
/**Useful clean-up code **/ /* delete from po_user_lab; delete from po_user_role; delete from po_lab; delete from po_user; delete from po_item_supplied; delete from po_item; delete from po_product; delete from po_category; delete from po_supplier; */ Insert into po_user(id,version,enabled,name,firstna...
true
cd1643a07213b598ee5f465e3e1bf3950a8940e0
SQL
viqq/FreeAgent
/liquibase/liquibase/structure/init.sql
UTF-8
4,158
3.9375
4
[]
no_license
CREATE TABLE USER ( USER_ID BIGINT(20) NOT NULL AUTO_INCREMENT, EMAIL VARCHAR(50) NULL DEFAULT NULL, PASSWORD VARCHAR(60) NULL DEFAULT NULL, CITY VARCHAR(175) NULL DEFAULT NULL, COUNTRY VARCHAR(175) NULL DEFAULT NULL, R...
true
f278a4f67aaf95cd970f8835885c8f13bf3b089b
SQL
bakink/DBA_Oracle
/altera_what_job.sql
UTF-8
321
3.0625
3
[]
no_license
SELECT 'Exec DBMS_JOB.what( job =>'||J.job||', what => ''DBMS_REFRESH_DURATION('''''||r.rowner||''''','''''||R.RNAME||''''');'')' FROM DBA_jobs J, dba_refresh R WHERE J.JOB=R.JOB AND R.rowner in ('DSITRP','DSAPARP','DNSOMRP','DGCARP','DINTGLRP','DSIGNETRP') AND J.WHAT NOT LIKE '%DBMS_REFRESH_DURATION%' ORDER BY R.RNAME...
true
8f326f2125c0d8f4fceaad3afc532d8920d7dc52
SQL
concourse/concourse
/atc/db/migration/migrations/1602860419_drop_builds_resource_id_unique.down.sql
UTF-8
420
3.828125
4
[ "CC-BY-NC-ND-2.0", "Apache-2.0" ]
permissive
DROP INDEX builds_resource_id_idx; -- prevent conflicts when re-introducing unique constraint by nulling-out all -- but the current check build for each resource UPDATE builds b SET resource_id = NULL WHERE resource_id IS NOT NULL AND NOT EXISTS ( SELECT 1 FROM resources WHERE build_id = b.id ); CREATE UNIQUE ...
true
4eaaab5c42e5b920d0edf426d5ceedc146c6547a
SQL
gauravsji/peexp-assignment
/database/peerxp.sql
UTF-8
2,056
3.078125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.7.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Sep 20, 2020 at 07:42 PM -- Server version: 10.1.26-MariaDB -- PHP Version: 7.1.9 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
true
ad2ad04074cebfae8206b4f4d9b82a168ca5b4c0
SQL
LeonarDev/Autoplay
/2_back-end/oracle_sql/curso5/scripts/PL_SQL_PACK_05.sql
UTF-8
479
2.671875
3
[]
no_license
CREATE OR REPLACE PROCEDURE APP_INCLUIR_CLIENTE (p_ID IN CLIENTE.ID%type, p_RAZAO_SOCIAL IN CLIENTE.RAZAO_SOCIAL%type, p_CNPJ IN CLIENTE.CNPJ%type, p_SEGMERCADO_ID IN CLIENTE.SEGMERCADO_ID%type, p_FATURAMENTO_PREVISTO IN CLIENTE.FATURAMENTO_PREVISTO%type) IS BEGIN INCLUIR_CLIENTE(p_ID, p_RAZAO_SOCIAL, p_CNPJ, p_SEG...
true
ba39f879df265ae8aa73d0f419a03d3d7d6b8dd8
SQL
jhoaquinsito/vet
/backend/web/src/main/resources/database/changelog/changes/2016-05-15_1737.sql
UTF-8
961
2.609375
3
[]
no_license
--liquibase formatted sql --changeset tomas:add_missing_triggers splitStatements:false CREATE TRIGGER auditfieldstriggerforcity BEFORE INSERT OR UPDATE ON city FOR EACH ROW EXECUTE PROCEDURE addauditfields(); CREATE TRIGGER auditfieldstriggerforlegalperson BEFORE INSERT OR UPDATE ON legal_perso...
true
618bbb1c3136fe2a561d47fd0debef585101c675
SQL
m2lawrence/StoredProceduresSQL
/StoredProcedure1.sql
UTF-8
188
2.765625
3
[]
no_license
CREATE PROCEDURE NewOrder1 @Customers_ID CHAR(10) AS -- Insert new order INSERT INTO Orders(Customer_ID) VALUES (@Customers_ID) -- Return order number SELECT order_num = @@IDENTITY;
true
eaae23a483a92b59a58b43771b2e5dbea04fdbb8
SQL
yktaleb/DiplomaWork
/src/main/resources/db/migration/V7__erd3_6_changes.sql
UTF-8
2,201
3.53125
4
[]
no_license
ALTER TABLE "product_characteristic" DROP CONSTRAINT "Ref_product_characteristic_to_data_type"; DROP TABLE "data_type"; ALTER TABLE "product_characteristic" ADD CONSTRAINT "Ref_product_characteristic_to_data_type" FOREIGN KEY ("data_type_id") REFERENCES "category" ("category_id") MATCH SIMPLE ON DELETE NO ACTION...
true
7e249b976e4c7d540c112cade79494a7fdb71f08
SQL
johnm1990/assignment1
/week1.sql
UTF-8
1,914
4.46875
4
[]
no_license
/* Assignment: SQL Select and Aggregations Please use the tables in the flights database. Your deliverable should include the SQL queries that you write in support of your conclusions. 1. Which destination in the flights database is the furthest distance away, based on information in the flights table. Show the SQL que...
true
89734fd4247835ec45a5ce4d0d4111cd0b808392
SQL
kolev9605/Software-Technologies
/09-SqlServer/SQLServer-Exercise-Done.sql
UTF-8
1,556
4.65625
5
[]
no_license
SELECT title, body FROM Posts SELECT username, fullname FROM Users ORDER BY username ASC SELECT username, fullname FROM Users ORDER BY fullname DESC, username DESC SELECT * FROM Users WHERE id IN (SELECT AuthorId FROM Posts) SELECT Users.UserName, Posts.Title FROM Users JOIN Posts ON Users.id = P...
true
f5dc5a47257d531f3d11ce0b6399c4b3f8515ad7
SQL
PLOS/named-entity.service
/database/migrations/V1__ned_schema.sql
UTF-8
14,056
3.734375
4
[ "MIT" ]
permissive
/* * Copyright (c) 2017 Public Library of Science * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, ...
true
243e20c68db81546339cc74ee2768cd5ceadc73e
SQL
rissins/SQL
/INSTR,, SUBSTR Ex.sql
UTF-8
389
2.859375
3
[]
no_license
SELECT profno ,name ,hpage ,INSTR(hpage, '.', 1,2) HTTP FROM professor WHERE hpage is not null; SELECT profno ,name ,SUBSTR (email, 1 , INSTR(email, '@') -1) "email_id" From professor where email is not null; SELECT name ,tel ,REPLACE (tel, SUBSTR(TEL,INS...
true
eb80dede653d2bcf3d6d67dd17f220da4547e02b
SQL
CMU-RDX-Capstone/rdx-s20
/ETL/01_index.ddl
UTF-8
697
2.984375
3
[]
no_license
CREATE INDEX idx_events_map_metric ON events(metric_name); CREATE INDEX idx_map_time ON event_incident_mapping(core_time_num); CREATE INDEX idx_map_metric ON event_incident_mapping(metric_name); CREATE INDEX idx_map_evtcd ON event_incident_mapping(event_code); CREATE INDEX idx_map_recon ON event_incident_mapping(recon...
true
53f77556d87b2e61eeeb3b2adfa41b2877843c33
SQL
Uzumendiz/BR.UZ
/db_estrutura_15_04_20.sql
UTF-8
20,117
2.734375
3
[]
no_license
/* Navicat PGSQL Data Transfer Source Server : localhost Source Server Version : 90426 Source Host : localhost:6432 Source Database : postgres Source Schema : public Target Server Type : PGSQL Target Server Version : 90426 File Encoding : 65001 Date: 2020-04-15 19:36:13 */ ...
true
49d18c4cbf9a4cc117cf028227863bb43b9f5f62
SQL
triggoai/dbt_mailchimp
/models/intermediate/int_mailchimp__automation_recipients.sql
UTF-8
664
3.265625
3
[ "Apache-2.0" ]
permissive
{{ config(enabled=var('mailchimp_using_automations', True)) }} with recipients as ( select * from {{ var('automation_recipient') }} ), automation_emails as ( select * from {{ var('automation_email') }} ), automations as ( select * from {{ var('automation') }} ), joined as ( select ...
true