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
80cfb06f161856fc29f86cd6c2ace1113e0d07c9
SQL
quochuy201/MSBA_Projects
/SERG53000_DatabaseArchitecture_AlumniManagement/Milestone2/SQL Scripts/View_NumAlumni_Department.sql
UTF-8
461
3.6875
4
[]
no_license
CREATE VIEW `segr5300`.`noalum_dept` AS select `d`.`department_name` AS `department_name`, `a`.`num_alumni` AS `num_alumni` from ((`segr5300`.`department` `d` left join `segr5300`.`program` `p` on((`d`.`department_id` = `p`.`department_id`))) join ( select `ap`.`program_id` AS `program_id`,count(0) AS `...
true
74f68d0b490d5466ac097381bcc369f1a76a0537
SQL
robTabisula/Leahs-Distribution-System
/src/database/leahs-1 new.sql
UTF-8
40,356
2.8125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.7.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1:3306 -- Generation Time: Jan 30, 2018 at 02:41 PM -- Server version: 5.7.19 -- PHP Version: 5.6.31 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CH...
true
9d0ddadfde232ac537e7b23aef913177845a17bc
SQL
daniel0458/bit_java
/java_db/sql_HW/09.21.sql
UTF-8
1,355
4.25
4
[]
no_license
//테이블 생성 create table users ( id varchar2(10) constraint user_id primary key, password varchar2(10), name varchar2(8), role varchar(10) ); create table board ( seq number(4) constraint board_number primary key, title varchar2(20), content varchar2(1000), regdate date default sysdate, cnt number(4...
true
394dacd246e7c3e5f717adb66f94ed27271c04c4
SQL
snofang/trepub
/db/trepub_db_schema.sql
UTF-8
5,317
3.4375
3
[]
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 trepub --...
true
ced8b086f341bddf2cf4cea35a7b0f2472d50ebd
SQL
bashalex/postgres-docker
/postgres/src/pl/plpgsql/src/sql/plpgsql_varprops.sql
UTF-8
3,979
3.6875
4
[ "PostgreSQL" ]
permissive
-- -- Tests for PL/pgSQL variable properties: CONSTANT, NOT NULL, initializers -- create type var_record as (f1 int4, f2 int4); create domain int_nn as int not null; create domain var_record_nn as var_record not null; create domain var_record_colnn as var_record check((value).f2 is not null); -- CONSTANT do $$ decla...
true
b95dd73c1784ebea06f311bcd686e13de704553d
SQL
Murillofilho86/PySparkRestAPI
/physique_model.sql
UTF-8
756
3.53125
4
[]
no_license
create database spark_api; use spark_api; create table step( id int not null, name varchar(155), description varchar(155), constraint pk_step primary key (id) ); insert into step values (1, 'START', 'Geração do token para identificação da história do workflow do processo') insert into step values (2, 'L...
true
c4126a14c01236434eb0c1f5a16b559620b7d16e
SQL
morfogatos/meneame
/db/dump.sql
UTF-8
17,674
3.078125
3
[ "BSD-3-Clause" ]
permissive
-- -- PostgreSQL database dump -- -- Dumped from database version 9.5.5 -- Dumped by pg_dump version 9.5.5 SET statement_timeout = 0; SET lock_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings = on; SET check_function_bodies = false; SET client_min_messages = warning; SET row_security = off; ...
true
8a6995ba7bafd49b6a6e2882556be98d55927744
SQL
kimmjen/ION_KOSA
/DataBase/class_content/day24/20210928_khy_02.sql
UHC
2,855
4.03125
4
[]
no_license
-- Լ select round(12.345678935, 0), round(12.345678935, 2), round(12.345678935, 3) from dual; select ceil(12.34), ceil(-12.34) from dual; -- ø ȯ select floor(12.34), floor(-12.34) from dual; -- ȯ select trunc(12.3456, 2), trunc(12.3768, 2), trunc(12.7456, 0) from dual; -- ڿ Լ select instr('abcd', 'b') from du...
true
b2fa2985ca81f57e81141b9e799700fc836f65cc
SQL
ericazhou7/6.s080-labs
/lab1/queries/q4.sql
UTF-8
295
3.328125
3
[]
no_license
SELECT CAND_NAME, CMTE_NM, CMTE_ST1 FROM CANDIDATE JOIN COMMITTEE ON CAND_PCC = CMTE_ID WHERE CAND_OFFICE = 'P' AND CAND_STATUS IN ('C', 'N') AND CAND_ELECTION_YR = 2016 AND CAND_NAME LIKE '%HUCK%';
true
f58770dce40477f56e7055ead56e8accddab423a
SQL
radtek/Telecommunication
/GSM/DataBase/TABLES/DB_LOADER_FULL_BILL_MN_ROUMING.sql
WINDOWS-1251
2,178
2.953125
3
[]
no_license
CREATE TABLE DB_LOADER_FULL_BILL_MN_ROUMING( ACCOUNT_ID INTEGER NOT NULL, YEAR_MONTH INTEGER NOT NULL, PHONE_NUMBER VARCHAR2(10 CHAR) NOT NULL, DATE_BEGIN DATE NOT NULL, DATE_END DATE NOT NULL, ROUMING_COUNTRY VARCHAR2(50 CHAR), ROUMING_CALLS NUMBER(15, 4) NOT NULL, ROUMING_GPRS NUMBER(15, 4) NOT NULL, ...
true
fc8d1bc7189a50e50154d447c9ee355f44526148
SQL
allwaysoft/fun
/Databases/DBA/Oracle/MCRS2/client_failover_service.sql
UTF-8
3,005
2.90625
3
[]
no_license
SQL> exec dbms_service.create_service('fap1.mbta.com','fap1.mbta.com'); SQL> exec dbms_service.create_service('fap2.mbta.com','fap2.mbta.com'); exec dbms_service.start_service('fap1.mbta.com'); exec dbms_service.stop_service('fap1.mbta.com'); exec dbms_service.stop_service('fap2.mbta.com'); exec dbms_service...
true
a77bafbee28af56292481d968b8ecc0b519e23cd
SQL
Socha-Alex/databases_Project
/patient_relationships_db.sql
UTF-8
17,491
3.78125
4
[]
no_license
-- ____________________CREATING AND USING DATABASE________________________________________________________________________________________________________________ -- create database if not exists patient_relationships_db; -- show databases; use patient_relationships_db; -- ___________________CREATING "PROVIDER" TABLE...
true
7862ad88b858e228285b12d525c541dfe1780635
SQL
douglasribeiro687/rep-teste-git
/teste_git_2.sql
UTF-8
5,723
3.65625
4
[]
no_license
-- teste git comandos -- git remote add <url do repositorio remoto> = criar um repositorio remoto. git status = verificar status dos arquivos que foram add no repositorio; git log = listas as ultimas atualizações gravadas; git add <nome do arquivo> = adicionar arquivos ao repositório local; git commit = gravar as ...
true
7de35bca0c6b321fb36ac4cb80f610b29bfce406
SQL
contohprogram/cbr
/cbr-python-mysql/db_cbr_python.sql
UTF-8
3,956
3.0625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Waktu pembuatan: 26 Agu 2018 pada 15.26 -- Versi server: 10.1.33-MariaDB -- Versi PHP: 7.2.6 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARA...
true
081fcf50552e94fc8924885ed1a50ffcaa68cca1
SQL
leonardopernett/Crud-NodeJs-Mysql
/src/database/db.sql
UTF-8
323
2.9375
3
[]
no_license
-- create database CREATE DATABASE crudmysql; -- UTILIZANDO LA BASE use crudmysql; -- create a table CREATE TABLE customer ( id INT(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY, name VARCHAR(50) NOT NULL, address VARCHAR(100) NOT NULL, phone VARCHAR(15) ); -- show table SHOW TABLES; -- VER describe custom...
true
66c6342587a6786d0e493eb7d0812c1175a947bc
SQL
ABMI/DQUEEN_OMOP_CDM_Version
/inst/sql/sql_server/DQA_Level_1/cdm/102_CDM_CV_colname_validation.sql
UTF-8
1,197
3.453125
3
[ "Apache-2.0" ]
permissive
/*************************************************************************/ -- Assigment: conformance-value -- Description: check the column name conformance -- Author: Enzo Byun -- Date: 11.Jan, 2020 -- Job name: validation with DB definition describe -- Language: MSSQL -- Target data: cdm --> /****************...
true
f5433d4ce7569561b89dc9a7355ecff429d62324
SQL
liucz25/FSGL
/offline-only/Person.sql
UTF-8
1,016
2.84375
3
[]
no_license
/* Navicat Premium Data Transfer Source Server : rygl Source Server Type : SQLite Source Server Version : 3021000 Source Schema : main Target Server Type : SQLite Target Server Version : 3021000 File Encoding : 65001 Date: 21/09/2020 19:56:41 */ PRAGMA foreign_keys = false; -...
true
ed72ef584509c77d4e5430aa1456b4c63168b7ce
SQL
Shzaidi/DataMining
/Caterpillar_Setup.sql
UTF-8
1,664
3.265625
3
[]
no_license
use Caterpillar; drop table train_set; create table train_set ( tube_assembly varchar(8), supplier varchar(6), quote_date date, annual_usage numeric (12,2), min_order_quantity numeric (12,2), bracket_pricing varchar(3), quantity numeric(12,2), cost numeric (38,16) ); load data local infi...
true
9148acae2c1e4157a48668bbb63fab2fd115eba8
SQL
cycleke/CSHomeworkInHIT
/数据库系统/Assignment2.sql
UTF-8
3,100
4.65625
5
[ "MIT" ]
permissive
-- 1.a SELECT DISTINCT Product.maker FROM Product NATURAL JOIN PC EXCEPT (SELECT DISTINCT Product.maker FROM Product NATURAL JOIN Laptop); -- 1.b SELECT DISTINCT P1.maker FROM (Product AS P1 NATURAL JOIN PC) LEFT JOIN (Product AS P2 NATURAL JOIN Laptop) USING (maker) where P2.model IS NULL; -- 1.c SELECT DISTINCT mak...
true
ee61b160896b5bfa784d293117616a704ca3d5cb
SQL
naggenius/BIP
/BIP_App-master/UX/source/plsql/flisfour.sql
ISO-8859-1
3,166
3.5625
4
[]
no_license
-- pack_liste_fournisseur PL/SQL -- -- Equipe SOPRA -- -- Cree le 5/11/1999 -- -- Objet : retourne la liste des fournisseurs (agence) -- Tables : agence -- Pour le fichier HTML : dtfact -- Pour la gestion de facture, on passe systmatiquement 8 paramtres -- Keylist0 .. Keylist7 -- liste retourner : cllf = agence.soc...
true
1a240027105296aebd557142323c21ae64f379e2
SQL
girino/matvoto
/tse/create_views_1998.sql
UTF-8
2,052
4.09375
4
[]
no_license
create view prefeito_zona as SELECT * FROM candidato WHERE CODIGO_CARGO=9 ORDER BY NOME_MUNICIPIO; create view municipio_2_turnos as select CODIGO_MUNICIPIO, NOME_MUNICIPIO, SUM(QTD_APTOS), SUM(QTD_APTOS_TOT) from detalhe_votacao where CODIGO_CARGO=9 group by CODIGO_MUNICIPIO, NOME_MUNICIPIO having SUM(QTD_APTOS)> 2...
true
3d93e050a90ea8914a34cdcb6035e21826296243
SQL
kopax/spring-data-mybatis-sample
/core/out/production/resources/db/migration/core/V0_0_15__CreateTableLinkRolePrivilege.sql
UTF-8
304
3.078125
3
[]
no_license
CREATE TABLE "LINK_ROLE_PRIVILEGE" ( "ID" BIGSERIAL NOT NULL, "ROLE_ID" BIGINT NOT NULL, "PRIVILEGE_ID" BIGINT NOT NULL, CONSTRAINT role_fk FOREIGN KEY("ROLE_ID") REFERENCES "ROLE"("ID"), CONSTRAINT privilege_fk FOREIGN KEY("PRIVILEGE_ID") REFERENCES "PRIVILEGE"("ID"), PRIMARY KEY ("ID") );
true
f44fb8c3703b7db2872827c67f557bf62d2aab94
SQL
wheely/dbt-event-logging
/integration_tests/macros/create_old_audit_table.sql
UTF-8
613
2.984375
3
[ "Apache-2.0" ]
permissive
{# create_legacy_audit_table creates the audit table with the columns defined in version 0.1.7 #} {% macro create_legacy_audit_table() %} {{ logging.create_audit_schema() }} create table if not exists {{ logging.get_audit_relation() }} ( event_name {{ dbt_utils.type_string() }}, event...
true
b77e984f384501a976e9cd41f21b4ffe75cec48d
SQL
alexisruiz96/Transport-Agency
/c.sql
UTF-8
5,541
3.5625
4
[]
no_license
#DROP DATABASE transportagency; CREATE DATABASE TransportAgency; USE TransportAgency; CREATE TABLE Routes( id_route integer(4), origin varchar(30), destination varchar(30), constraint pk_id_route primary key (id_route) ); CREATE TABLE Locations( c_postal integer(8), id_route integer(4), name...
true
979085c0a6455c07d5b068280b33610e2e41d21b
SQL
BrunoBiluca/Cursos
/ASP.NET/Desenvolvimento-Web-Com-ASPNET-Livro/CadeMeuMedico/CadeMeuMedico/App_Data/Banners.sql
UTF-8
539
2.71875
3
[]
no_license
CREATE TABLE BannersPublicitarios ( IDBanner BIGINT IDENTITY NOT NULL, TituloCampanha VARCHAR(60) NOT NULL, BannerCampanha VARCHAR(200) NOT NULL, LinkBanner VARCHAR(200) NULL, PRIMARY KEY(IDBanner) ); INSERT INTO BannersPublicitarios (TituloCampanha, BannerCampanha, LinkBanner) VALUES ('Campanha Conio', 'logo-conio-c...
true
a75c1ff03383815d5b7200b943a3b959265ea1e8
SQL
madhurivaishnav/SALTWEB
/SALT_NewDesign/Database/Procedure/dbo.prcLessonSession_StartLesson.PRC
UTF-8
1,958
3.765625
4
[]
no_license
SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER OFF GO IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[prcLessonSession_StartLesson]') AND type in (N'P', N'PC')) BEGIN EXEC dbo.sp_executesql @statement = N'/*Summary: -- Check that the lesson has not already been started -- if it has - return false --...
true
ad6eda85b3279697d60904a44eece955a94642b4
SQL
Sylvics/escape-async
/db/initialize/cart.sql
UTF-8
134
2.765625
3
[]
no_license
create table cart(item_id serial primary key, quantity int, product_id int, foreign key (product_id) references products(product_id) )
true
60fc13664a7724dda52421a8899078937575fad0
SQL
alfy32/accent-data
/src/main/resources/db/migration/V1.0.0__CreateTables.sql
UTF-8
398
3.3125
3
[]
no_license
CREATE TABLE employee ( employee_id SERIAL PRIMARY KEY, name VARCHAR (80), phone_number VARCHAR (15), address TEXT ); CREATE TABLE appointment ( appointment_id SERIAL PRIMARY KEY, employee_id INTEGER NOT NULL REFERENCES employee(employee_id) ON DELETE CASCADE, created TIMESTAMP DEFAULT now(), start_tim...
true
57e06f76783a86901ec4d0435aa891621676b555
SQL
eserebry/holbertonschool-higher_level_programming
/0x0E-SQL_more_queries/13-count_shows_by_genre.sql
UTF-8
405
4
4
[]
no_license
-- lists all genres from hbtn_0d_tvshows -- and displays the number of shows linked to each SELECT tv_genres.name AS genre, COUNT(*) AS number_shows FROM tv_show_genres INNER JOIN tv_shows ON tv_show_genres.show_id = tv_shows.id INNER JOIN tv_genres ON tv_show_genres.genre_id = tv_genres.id WHERE tv_show_genr...
true
bf5323e26e8b1fdd0f9299d6d31061c7b5f6207a
SQL
bigdog001/opensource_code
/work/useit/opensource/安卓高仿手机QQ(客户端服务端)/tuliao 20111113 1144.sql
UTF-8
2,180
2.96875
3
[]
no_license
-- MySQL Administrator dump 1.4 -- -- ------------------------------------------------------ -- Server version 5.1.55-community /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNE...
true
d026b7c71df883e74f3d8ee21a7a0caaa2195dae
SQL
nisarg291/Training-Aug-21
/SQL/VipulDabhi/Day8/PracticeDay8.sql
UTF-8
308
3.140625
3
[]
no_license
--!**! INDEXES !**! --1.CLUSTERED INDEX --2.NONCLUSTERED INDEX --1.CLUSTERED INDEX CREATE TABLE DEMOINDEX ( ID INT PRIMARY KEY, --default apply a clustered index NAME VARCHAR(10), ADDRESS VARCHAR(100) ) --2.NONCLUSTERED INDEX CREATE NONCLUSTERED INDEX nonclusteredindex_on_JobId ON Employees (JobId)
true
b0ac4721f4fa626a37cd33e4aeb0ec75cdabe369
SQL
kamalamay/Cloudera
/Oracle/DropFlashback.sql
UTF-8
5,223
2.84375
3
[]
no_license
SQL> SELECT TABLE_NAME FROM USER_TABLES; TABLE_NAME ------------------------------ GSXR_3 GSXR_2 GSXR SQL> DROP TABLE AZIZPW.GSXR; Table dropped. SQL> SELECT OWNER, ORIGINAL_NAME, TYPE, DROPTIME FROM DBA_RECYCLEBIN; OWNER ORIGINAL_NAME TYPE DROPTIME ------------------------------ -------------------...
true
27f5d4f66b1299d2c97bd3ab7cfc4bbe2de38b30
SQL
PatrickCallaghan/datastax-shared-session-example
/src/main/resources/cql/create_schema.cql
UTF-8
359
3.234375
3
[]
no_license
create keyspace if not exists datastax_shared_session_demo with replication = {'class': 'SimpleStrategy', 'replication_factor': 1}; use datastax_shared_session_demo; CREATE TABLE if not exists timeline ( userid uuid, time timeuuid, follower_id uuid, message text, PRIMARY KEY (userid, time) ) WITH CLUSTERING O...
true
77386f57864f5eee68626704b377a575861a2481
SQL
indratbg/code
/Sp_LAP_TRX_HARIAN_Upd.sql
UTF-8
4,441
3.140625
3
[]
no_license
create or replace PROCEDURE Sp_LAP_TRX_HARIAN_Upd( P_UPDATE_DATE LAP_TRX_HARIAN.UPDATE_DATE%TYPE, P_UPDATE_SEQ LAP_TRX_HARIAN.UPDATE_SEQ%TYPE, P_TRX_DT LAP_TRX_HARIAN.TRX_DT%TYPE, P_GRP LAP_TRX_HARIAN.GRP%TYPE, P_SEQNO LAP_TRX_HARIAN.SEQNO%TYPE, P_DESCRIP LAP_TRX_HARIAN.DESCRIP%TYPE, P_BELI LAP_TRX_HARIA...
true
0e5d4f7cee31a3f42cd3d8ce0f2d42f2ec65fe63
SQL
claymodel/oraclescripts
/monitoring/extmap.sql
UTF-8
2,097
3.5
4
[]
no_license
/********************************************************************** * File: extmap.sql * Type: SQL*Plus script * Author: Tim Gorman (Evergreen Database Technologies, Inc.) * Date: 26-Aug-99 * * Description: * Simple report against the DBA_EXTENTS view for Oracle8 * databases. This report is intended to be ...
true
a600df803094aa7bd5349fec597cb318cfaf562f
SQL
Loan7/nbaDB
/game_details/game_details.sql
UTF-8
580
4.21875
4
[]
no_license
-- 5 jogadores mais suspensos entre 2017 e 2019 SELECT gd.player_name as jogador, t.nickname, CASE WHEN gd.not_played LIKE '%sus%' THEN 'SUSPENSO' END as razao, count(*) as quantidade FROM games_details as gd INNER JOIN teams as t ON gd.team_id = t.team_id WHERE gd.not_played LIKE '%sus%' GROUP BY jogador, t.nicknam...
true
4545b3768124a60b98581ccc6f669be91a53dee7
SQL
harrybit/BossWell
/src/DB/pureinit.sql
UTF-8
32,025
2.734375
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : localhost Source Server Version : 50720 Source Host : localhost:3306 Source Database : pureinit Target Server Type : MYSQL Target Server Version : 50720 File Encoding : 65001 Date: 2018-11-21 16:49:54 */ SET FOREIGN_KEY_CHECKS=0; -- ...
true
dff0f00cc5e29fcca0bb87e321d5238b143b86cd
SQL
GenghisZahn/mybatis-read-write-split
/mybatis-read-write-split-demo/src/main/resources/mybatis-demo.sql
UTF-8
889
3.015625
3
[]
no_license
/* Navicat Premium Data Transfer Source Server : localhost Source Server Type : MySQL Source Server Version : 50711 Source Host : localhost:3306 Source Schema : mybatis-demo Target Server Type : MySQL Target Server Version : 50711 File Encoding : 65001 Date: 07/02/20...
true
1720ca7569ae4b20429968dc871e6b488b68f3f8
SQL
thinkful-dsi-grackle/dsi7_student_pair_work
/week02_sql/5_friday/example_multiple_ctes_houseprices.sql
UTF-8
396
4.34375
4
[]
no_license
WITH totals AS ( SELECT customer_id, SUM(transact_amt) AS total FROM transactions t GROUP BY customer_id ), prod_totals AS ( SELECT product_id, AVG(transact_amt) AS prod_total FROM transactions GROUP BY product_id ) SELECT * FROM transactions INNER JOIN totals ON transactions.customer_id = totals.customer_id ...
true
fac07e43e15ed9d2a20841c81383d27af9dc1aff
SQL
ralphreid/c2earth-system
/_sandbox/seed_sql/projects.sql
UTF-8
287
2.78125
3
[]
no_license
SELECT DISTINCT IFNULL(ProjectName1, "TBC") AS "name", IFNULL(ProjectName2, "TBC") AS "name_alternate", IFNULL(ProjectNumber, "TBC") AS "number", IFNULL(ProjectPrefix, "TBC") AS "prefix", IFNULL(ProjectDescription, "TBC") AS "description" FROM all_project_information ORDER BY name asc
true
e9cbf4bbeb9ef8b6120d700e2716dfb36fdbecfc
SQL
iplayoncardboard/Project2
/db/schema.sql
UTF-8
1,223
3
3
[ "MIT" ]
permissive
DROP DATABASE if exists fablib_db; CREATE DATABASE fablib_db; USE fablib_db; CREATE TABLE user( id INTEGER(11) NOT NULL AUTO_INCREMENT, PRIMARY KEY(id), user_name VARCHAR(100), pw_hash VARCHAR(255) ); CREATE TABLE category( id INTEGER(11) NOT NULL AUTO_INCREMENT, PRIMARY KEY(id), category...
true
cd087b023802f7d32cc1e1efe2f22db726720c43
SQL
microsoftbi/SQLServer
/OPS/CheckRestoreHistory.sql
UTF-8
681
3.46875
3
[]
no_license
SELECT bus.server_name AS 'server', rh.restore_date, bus.database_name AS 'database', CAST(bus.first_lsn AS VARCHAR(50)) asLSN_First, CAST(bus.last_lsn AS VARCHAR(50)) asLSN_Last, CASE rh.[restore_type] WHEN 'D' THEN 'Database' WHEN 'F' THEN ...
true
f8b0cecda1e2de46aba9fd5878babbbb56fdb76e
SQL
WillZWL/project
/database/change script/atom/20100303.sql
UTF-8
1,982
3.09375
3
[]
no_license
ALTER TABLE purchase_order ADD COLUMN `eta` date default '0000-00-00' AFTER `amount`; DROP TABLE IF EXISTS `promotion_code`; CREATE TABLE `promotion_code` ( `code` varchar(20) NOT NULL, `description` varchar(255) DEFAULT NULL, `disc_type` varchar(2) NOT NULL COMMENT 'FD = Free Delivery / A = Amount / P ...
true
d95d1bd3434e42c7d40960ffe7da5db9c102ab1b
SQL
ssmcnatt/thinkful-assignments
/sql_drills.sql
UTF-8
1,931
4.53125
5
[]
no_license
SELECT * FROM vehicles; -- How many records are in the vehicles table? SELECT COUNT(*) FROM vehicles; -- What is the count of vehicles in the vehicles table from years 2010 to 2015, inclusive? SELECT COUNT(*) FROM vehicles WHERE year BETWEEN 2010 AND 2015; -- What is the count of all records between 1987 and 2005, e...
true
37a4b29efb5367e753b7e7223975736692445abf
SQL
sanen/wikift
/wikift-server/src/main/resources/schema.sql
UTF-8
15,218
3.8125
4
[ "Apache-2.0" ]
permissive
# CREATE DATABASE wikift DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER DATABASE wikift DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci; USE wikift; SET NAMES utf8mb4; SET FOREIGN_KEY_CHECKS = 0; DROP TABLE IF EXISTS `article`; CREATE TABLE `article` ( `a_id` BIGINT(20) NOT NULL AUTO_INC...
true
31ba614ae178bdb46596e87f09921f623810fbd6
SQL
asu-cis-capstone/sogetiskills
/Source/SogetiSkills.Core/DatabaseMigrations/635482180764715314_Tag_SelectByKeyword.sql
UTF-8
169
2.84375
3
[]
no_license
CREATE PROCEDURE Tag_SelectByKeyword ( @keyword nvarchar(450) ) AS SELECT TOP 1 Id, Keyword, SkillDescription, IsCanonical FROM Tags WHERE Keyword = @keyword;
true
dc9182ae58e4c8174d3c35099dc505c425f13bee
SQL
codyseibert/random
/flash-cards/cards.sql
UTF-8
2,203
2.75
3
[ "MIT" ]
permissive
-- MySQL dump 10.13 Distrib 5.5.38, for debian-linux-gnu (x86_64) -- -- Host: localhost Database: cards -- ------------------------------------------------------ -- Server version 5.5.38-0ubuntu0.14.04.1 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHA...
true
3c528e782372992f2a0aca57d379eb30c5b79fcb
SQL
sramachandran/SQLPractice
/delete duplicates.sql
UTF-8
989
3.703125
4
[]
no_license
--Remove Duplicates DROP TABLE IF EXISTS sales.contacts; CREATE TABLE dbo.contacts( contact_id INT IDENTITY(1,1) PRIMARY KEY, first_name NVARCHAR(100) NOT NULL, last_name NVARCHAR(100) NOT NULL, email NVARCHAR(255) NOT NULL, ); INSERT INTO dbo.contacts (first_name,last_name,email) VALUES (...
true
42ee77ca2fad8d7600cc2a0295824c2f0f325322
SQL
johnwarejunior/apprentice-practice-2
/src/data/schema.sql
UTF-8
253
2.703125
3
[ "MIT" ]
permissive
CREATE TABLE albums ( id SERIAL PRIMARY KEY, title VARCHAR(255) NOT NULL, artist VARCHAR(255) NOT NULL ); CREATE TABLE users ( id SERIAL PRIMARY KEY, name VARCHAR(50), email VARCHAR(100) UNIQUE NOT NULL, password VARCHAR(100) NOT NULL );
true
c3141fa3cbe086c79143cc19ac866166db8bd388
SQL
mbarto/DownloadProcess
/frontend/geoexplorer/data/aoi/aoi.sql
UTF-8
749
3.359375
3
[]
no_license
-- Table: aoi -- DROP TABLE aoi; CREATE TABLE aoi( id serial NOT NULL, glider_name character varying NOT NULL, cruise_name character varying NOT NULL, creation timestamp without time zone NOT NULL, the_geom geometry, CONSTRAINT aoi_pkey PRIMARY KEY (id), CONSTRAINT enforce_dims_the_geom CHECK (st_ndims(...
true
58ebde13a1bb1211c02b5cd7c450b79c674f7b09
SQL
tuis-docs/websystemprogram
/tuis.sql
UTF-8
2,108
3.21875
3
[]
no_license
CREATE TABLE `fruit` ( `no` int(2) DEFAULT NULL, `name` varchar(10) DEFAULT NULL, `price` int(4) DEFAULT NULL ); INSERT INTO `fruit` (`no`, `name`, `price`) VALUES (1, 'apple', 100), (2, 'grape', 130), (3, 'banana', 90), (4, 'peach', 150), (5, 'meron', 600); CREATE TABLE `hanbai_tbl` ( `hanbaicode` varchar(10...
true
9ac2589787aaeda5fb934bdc8fad535a553e7abd
SQL
asjebreen/Interpretable-3-day-ICU-readmission-prediction
/research_database/create_research_database.sql
UTF-8
5,846
3.625
4
[ "MIT" ]
permissive
/* Types of items taken from the PDMS. */ CREATE TABLE public.itemtypes ( ID int NOT NULL, NAME varchar(127) NOT NULL, PRIMARY KEY (ID) ); /* Item definitions taken from the PDMS. */ CREATE TABLE public.items ( ID int NOT NULL, ITEMTYPE smallint DEFAULT NULL, NAME varchar(127) NOT NULL, ITEMCOMMEN...
true
071e7215d6c5323a204198a682357ab41d678d14
SQL
Wrexan/GB_SQL_hw
/lesson03/hw_sql03_wrex.sql
UTF-8
2,193
3.875
4
[]
no_license
-- ====================================================================================== -- Таблица черных списков CREATE TABLE black_list ( ignored_by_user_id BIGINT UNSIGNED NOT NULL, ignored_user_id BIGINT UNSIGNED NOT NULL, PRIMARY KEY(ignored_by_user_id, ignored_user_id), INDEX ignored_by_user_idx (ignore...
true
af6c708251ee2c90db81fd2e5244681fce67e085
SQL
SHERlocked93/FE_Daily
/20200706_mysql/数据库执行文件/test1/01_【案例讲解】排序查询.sql
UTF-8
659
3.71875
4
[]
no_license
use myemployees; #1.查询员工的姓名和部门号和年薪,按年薪降序 按姓名升序 select last_name, department_id, salary * 12 * (1 + IFNULL(commission_pct, 0)) 年薪 from employees order by 年薪 desc, last_name; #2. 选择工资不在 8000 到 17000 的员工的姓名和工资,按工资降序 select last_name, salary from employees where salary not between 8000 and 17000 order by salar...
true
26373ba5f78de8fb7afcd0fc6965454880aa2559
SQL
silence-do-good/stress-test-Postgres-and-MySQL
/dump/low/day25/select1357.sql
UTF-8
225
2.578125
3
[]
no_license
SELECT timeStamp, clientid FROM WiFiAPObservation WHERE timestamp>'2017-11-24T13:57:00Z' AND timestamp<'2017-11-25T13:57:00Z' AND SENSOR_ID=ANY(array['3144_clwa_4051','3145_clwa_5039','wemo_06','3141_clwa_1423','wemo_05'])
true
c27f1d1b4442369387c176bf6e3856e0738c1892
SQL
LeeAnGeun/bitcampProject
/src/schedule.sql
UTF-8
505
3.640625
4
[]
no_license
DROP TABLE SCHEDULE CASCADE CONSTRAINTS; DROP SEQUENCE SEQ_MEMBER; CREATE TABLE SCHEDULE ( SCHEDULESEQ NUMBER CONSTRAINT PK_SCHEDULE_01 PRIMARY KEY, BOOKNUM NUMBER, CONSTRAINT FK_SCHEDULE_01 FOREIGN KEY(BOOKNUM) REFERENCES BOOK(BOOKNUM), MEMBERNUM NUMBER, CONSTRAINT FK_SCHEDULE_02...
true
9aa2b097e92535bfef1ff01da0a5d810080bbee4
SQL
zhoutaiwei/spring_cloud_docker
/schema.sql
UTF-8
593
3.078125
3
[]
no_license
drop table user if exists; create table user ( id bigint generated by default as identity, username varchar(40), name varchar(20), age int(3), balance decimal(10,2), primary key(id) --指定主键 ); insert into user (id,username,name,age,balance) values(1 ,'account1','张三',30,1000.00); insert into user (i...
true
ae3efe85482e01a249b39c4b3ddc8bfa3fe3c25a
SQL
Daniet/PruebasPHP
/db.sql
UTF-8
1,266
3.078125
3
[]
no_license
create database PRUEBAPHP; use PRUEBAPHP; create table T_USER( ID_USER int primary key auto_increment, NAME_USER varchar(100), PASS varchar(100) ); insert into T_USER(NAME_USER, PASS) values('Daniel', '81dc9bdb52d04dc20036dbd8313ed055'); SELECT * FROM T_USER; create table T_VIDEO( ID_VIDEO int primar...
true
1316434a0c5f56821faccc0c5459febf3ffc5f5e
SQL
Kelvin0317/b1-ecom
/b1_ecom (1).sql
UTF-8
5,860
3.359375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Oct 02, 2020 at 10:16 AM -- Server version: 10.4.13-MariaDB -- PHP Version: 7.4.8 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIEN...
true
411206e67ea26c8cdbc2947055d319a55353208c
SQL
Aleaksandr/hirsapp
/src/main/resources/db/migration/V2__create_user_tables.sql
UTF-8
308
2.828125
3
[]
no_license
CREATE TABLE IF NOT EXISTS `user` ( `ID` INT NOT NULL AUTO_INCREMENT, `LOGIN` VARCHAR(95) NOT NULL, `PASSWORD` VARCHAR(95) NULL, `TYPE` VARCHAR(45) NOT NULL, `VENDOR_ID` VARCHAR(45) NOT NULL, UNIQUE INDEX `ID_UNIQUE` (`ID` ASC), PRIMARY KEY (`ID`)) ENGINE = InnoDB DEFAULT CHARACTER SET = utf8;
true
b881c3412abe22aef35f1d3eeec5126f04c77fff
SQL
CDE-UNIBE/lokp_custom_spm
/scripts/update_db-0.6-0.61.sql
UTF-8
7,877
2.953125
3
[]
no_license
-- Replace 8 (deleted) with Water, change key, update order /* ACTIVITIES */ UPDATE data.a_values SET "value" = 'Water', fk_a_key = 83, "order" = 11 WHERE id = 8; -- Add new 190 (DRR or emergency relief) --INSERT INTO data.a_values (id, fk_a_value, fk_language, value, fk_a_key, "order") VALUES -- (190, NULL, 1, '...
true
26cd1550979e62fafa739164b49beb3d93ccc63b
SQL
JessicaDao/UWBC-EmployeeTracker
/seed.sql
UTF-8
326
2.984375
3
[ "MIT" ]
permissive
USE employee_db; INSERT INTO department (name) VALUES ("HR"), ("Accounting"), ("IT"); INSERT INTO roles (title, salary, department_id) VALUES ("Accountant", 80000, 1), ("HR", 70000, 2), ("IT", 90000, 3); INSERT INTO employee (first_name, last_name, role_id, manager_id) VALUES ("John", "Doe", 1, 1), ("Jane", "Doe", 2...
true
799e0bfad73ae0dbf400ac78844ff45b7cb8fbb5
SQL
krissanjaya/ayoantre
/db-ayoantre.sql
UTF-8
20,941
3.25
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
/* SQLyog Ultimate v10.42 MySQL - 5.5.5-10.1.33-MariaDB : Database - ayoantre ********************************************************************* */ /*!40101 SET NAMES utf8 */; /*!40101 SET SQL_MODE=''*/; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KE...
true
bb50917099ec4caa40246fd59245a2607aa7fed6
SQL
Stoyan610/toyshop
/toyshop.sql
UTF-8
4,215
3.53125
4
[]
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 */; CREATE TABLE `a_catalog` ...
true
860b531b1dce5c75d901251d919d360b34949e61
SQL
x-cpu/SQL
/Athena_MTV.sql
UTF-8
1,442
3.75
4
[]
no_license
SELECT Received, CustomerName, JobName, ProcessType, BatchName, [Status], ImageCount, DocCount, CompleteDate, Vertical = 'Public Sector', Region = 'NA', Country = 'US', BillType = 'NA', [Sub-Process] = 'Scan' FROM ( SELECT CONVERT(DATETIME, DATEADD(hh, DATEDIFF(hour, GETUTCDATE(), GetDate(...
true
d180a284fd9bd5b447141ce6c7b30caf253b636e
SQL
tranquilinho/germanFlashcards
/load_nouns.sql
ISO-8859-1
3,755
2.578125
3
[]
no_license
/* Cargamos la tabla "sustantivo" con las correspondientes declinaciones */ INSERT INTO Sustantivo VALUES ('Blume','Blume','Blumen','femenino','/images/llimonera-flor.jpg','flor',default,'/sounds/die_Blume.wav','primera'); INSERT INTO Sustantivo VALUES ('Bus','Bus','Bus','masculino','/images/tekening-autobus-03.j...
true
65c7d9a0f597d3dda2f8cc289823574cc18a564c
SQL
pushk11/GL_POC
/schema.sql
UTF-8
743
3.203125
3
[]
no_license
DROP DATABASE IF EXISTS memo; CREATE DATABASE memo CHARACTER SET utf8 COLLATE utf8_general_ci; DROP TABLE IF EXISTS memo.idea; CREATE TABLE memo.idea ( id int not null auto_increment primary key, title varchar(500), body text, created_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP ); ...
true
029352efe263f887f96216b92c97b688bdc3495a
SQL
king1600/Skwygle
/schema.sql
UTF-8
3,032
3.203125
3
[]
no_license
DROP TABLE IF EXISTS users; DROP TABLE IF EXISTS posts; DROP TABLE IF EXISTS communites; DROP TABLE IF EXISTS modules; DROP TABLE IF EXISTS community_modules; CREATE TABLE users ( id BIGINT(18) UNSIGNED NOT NULL PRIMARY KEY, name VARCHAR(32) NOT NULL COLLATE 'utf8mb4_unicode_ci', pass VARCHAR(256) NOT NULL...
true
0917c3792e0fb1fc80c727798404ac77660cd9f0
SQL
pinedamg/users
/sql/dumps/user-admin.sql
UTF-8
2,193
3.578125
4
[ "MIT" ]
permissive
/* Navicat MySQL Data Transfer Source Server : User Admin (local) Source Server Type : MySQL Source Server Version : 50717 Source Host : localhost Source Database : user-admin Target Server Type : MySQL Target Server Version : 50717 File Encoding : utf-8 Date: 02/19/20...
true
ebf1d565d8600c9957778c76912373d3e3604856
SQL
bellmit/flexdb
/2.HOST/1.View/v_citype.sql
UTF-8
599
3.03125
3
[]
no_license
CREATE OR REPLACE FORCE VIEW V_CITYPE AS SELECT ACTYPE, CCYCD, TYPENAME,GLGRP,A0.CDCONTENT STATUS,A1.CDCONTENT CIGROUP,GLBANK,SUBCD, MINBAL,CRINTCD,CRINTRATE,ODINTCD,ODRATE,A2.CDCONTENT DRATE,CHGFEECD, A3.CDCONTENT STMCYCLE, DORMDAY,TPR,DESCRIPTION FROM CITYPE, ALLCODE A0,ALLCODE A1,ALLCODE A2,ALLCODE A3 WHERE...
true
3bf10f8df6b49557d5467c9aeeedb9e2baa2f3b5
SQL
Lersgeeb/IS601-BDII
/scripts de clase/Semana 7/Clase_5_SP_pt2.sql
UTF-8
367
2.546875
3
[]
no_license
-- CREAR UN SP QUE OBTENGA LA CANTIDAD TOTAL DE PRODUCTOS CREATE OR REPLACE PROCEDURE SP_CANT_PRODUCTOS IS CANTIDAD NUMBER; BEGIN SELECT COUNT(*) INTO CANTIDAD FROM PRODUCTS; DBMS_OUTPUT.PUT_LINE('LA CANTIDAD DE PRODUCTOS GUARDADOS ES: ' || CANTIDAD); END; EXECUTE SP_CANT_PRODUCTOS; --! NO SE PUEDE USAR ...
true
6b1a8597ded2c01e455919ec6babbfcdb7bde289
SQL
CUBRID/cubrid-testcases
/sql/_22_news_service_mysql_compatibility/_02_zero_date_time_conversion/cases/zero_date_time_date_sub.sql
UTF-8
1,873
3.03125
3
[ "BSD-3-Clause" ]
permissive
--TEST: pass zero date/time values to date_sub function --TEST: pass zero datetime value select date_sub(datetime'0000-00-00 00:00:00', interval 1500 millisecond); select date_sub('0000-00-00 00:00:00.000', interval 80 second); --TEST: pass zero datetime value, munus interval value select date_sub(datetime'00/00/0000...
true
98f009b7cdd7d07090c64f898c53072c9fb72fd3
SQL
Kasspers/homework12.07
/test/migrations/20210808130922_create_roles.postgres.up.sql
UTF-8
268
2.6875
3
[]
no_license
CREATE TABLE IF NOT EXISTS roles ( id serial PRIMARY KEY, role VARCHAR ( 20 ) UNIQUE NOT NULL ); insert into roles (role) values ('reader'); insert into roles (role) values ('librarian');
true
61df5e4190e284f08d02d0df758513496ae2c3bc
SQL
antiadp/D3-Demo
/presentation/db/venues.sql
UTF-8
78
2.765625
3
[]
no_license
select city, count(city) from venues group by (city) order by 2 DESC LIMIT 5;
true
1e7747dff96c267d7a10c3e567b5f58a798f573e
SQL
nCrvenkov/laravelProject
/bowen/bowen.sql
UTF-8
10,465
3.109375
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.8.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Apr 05, 2019 at 04:48 PM -- Server version: 10.1.34-MariaDB -- PHP Version: 7.2.8 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
true
54610c7ecd38ec1133d5e0b13706df3c7d050bc6
SQL
gwachhamit/ProjectOne
/laravel_server/projectone.sql
UTF-8
26,814
3.09375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.9.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Nov 18, 2019 at 03:53 AM -- Server version: 10.4.8-MariaDB -- PHP Version: 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
2e7626b67414064e32161b238567e594a5b32548
SQL
WillZWL/project
/database/change script/we.eservicesgroup.com.cn/20161027.sql
UTF-8
811
2.640625
3
[]
no_license
ALTER TABLE `user_merchant` ADD `company_name` VARCHAR(255) NULL DEFAULT NULL AFTER `password`, ADD `is_crossborder_user` TINYINT(1) NULL DEFAULT 0 COMMENT 'Cross-border electronic business users' AFTER `verify_date`, ADD `is_esg_user` TINYINT(1) NULL DEFAULT 0 COMMENT 'ESG users' AFTER `is_crossborder_user`, AD...
true
f2d17f6fbc2200769497c1e4498abde64701b916
SQL
adirachmadi/daelerklassik
/otomotif.sql
UTF-8
2,416
2.75
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.9.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Dec 27, 2019 at 06:37 AM -- 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
a6331b350e54d33d8849eff1a7ffef614ecade2a
SQL
demokratikollen/demokratikollen
/demokratikollen/data/create_tables.sql
UTF-8
6,528
2.671875
3
[]
no_license
CREATE TABLE dokument ( hangar_id integer, dok_id varchar(255), rm varchar(255), beteckning varchar(255), doktyp varchar(255), typ varchar(255), subtyp varchar(255), typrubrik varchar(255), dokumentnamn varchar(255), debattnamn varchar(255), tempbeteckning varchar(255), organ varchar(255), mottagare varchar(255), numm...
true
9c8e49481a820ba92998a94ba7ae48430d278fd7
SQL
blakepeterson441/solo-project
/database.sql
UTF-8
1,458
3.703125
4
[]
no_license
CREATE TABLE users ( id SERIAL PRIMARY KEY, username VARCHAR(20), password VARCHAR(64) ); INSERT INTO users (username, password) VALUES ('blake', '1234'), ('aRealPerson', '1234'), ('bot', '1234'); CREATE TABLE friends ( id SERIAL PRIMARY KEY, user_id_one int REFERENCES users, user_id_two int REFERENCES users, ...
true
435c20f5cb143543a81769cc42be1bfc71110db5
SQL
OvidiuEDSgrup/TET
/IMPORT/130527/SQLQuery5.sql
UTF-8
257
3.03125
3
[]
no_license
select * from sys.columns c inner join sys.objects o on o.object_id=c.object_id where o.name='yso_vIaTargetag' select * from INFORMATION_SCHEMA.COLUMNS c inner join INFORMATION_SCHEMA.VIEWS v on v.TABLE_NAME=c.TABLE_NAME where v.TABLE_NAME='yso_vIaTargetag'
true
bb207b86a5f3dfceaa0e4cb05e112ba6640d619b
SQL
inoc603/KanColleNode
/scripts/init-game.sql
UTF-8
1,213
3.484375
3
[]
no_license
CREATE TABLE IF NOT EXISTS ships ( id INT PRIMARY KEY, name TEXT, type INT, yomi TEXT, FOREIGN KEY type REFERENCES ship_types(id) ); CREATE TABLE IF NOT EXISTS ship_types ( id INT PRIMARY KEY, name TEXT ); CREATE TABLE IF NOT EXISTS equipment ( id INT PRIMARY...
true
55296502539cd69102b5a4f5e0c39680c343a46a
SQL
bellmit/origin
/family_order/sql/TF_F_USER_DISCNT/UPD_DISCNT_BY_TAG.sql
UTF-8
561
3.1875
3
[]
no_license
UPDATE tf_f_user_discnt a SET a.end_date =(SELECT b.end_date FROM tf_b_trade_discnt_bak b WHERE b.trade_id=TO_NUMBER(:TRADE_ID) AND b.accept_month=TO_NUMBER(SUBSTR(:TRADE_ID,5,2)) AND b.discnt_code=(:DISCNT_CODE) AND b.start_date =to_date(:START_DATE,...
true
7354f996017a0619596172ee20963ba132724433
SQL
HYH-00/Xiaoxiang-pharmacy-2020-12-29
/back/src/main/resources/static/SQL/goods.sql
UTF-8
2,408
3.25
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : Shop Source Server Version : 80012 Source Host : localhost:3306 Source Database : shop Target Server Type : MYSQL Target Server Version : 80012 File Encoding : 65001 Date: 2020-12-19 16:16:36 */ SET FOREIGN_KEY_CHECKS=0; -- ---------...
true
75cc004b9dfbeda79e2f275573bdb08582ef5ef5
SQL
d-bf/server
/database/dbf_server.sql
UTF-8
11,397
3.34375
3
[ "BSD-3-Clause" ]
permissive
-- -- Database: `dbf_server` -- # CREATE DATABASE IF NOT EXISTS `dbf_server` DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci; # USE `dbf_server`; -- -------------------------------------------------------- -- -- Table structure for table `algorithm` -- CREATE TABLE `algorithm` ( `id` int(10) UNSIGNED NOT NULL, ...
true
4673c68e8e14199eb854e9e4a6764626a98c4b12
SQL
poma-prs/HotelManagment
/src/sql/VisitorCountReport.sql
UTF-8
341
3.953125
4
[]
no_license
select min(ht.Title) as HotelTitle, Count(*) as Count from Reservations rs join Rooms rm on rs.RoomId = rm.Id join Hotels ht on ht.Id = rm.HotelId where rs.ArrivalDate < 'from' and rs.DepartureDate > 'from' or rs.ArrivalDate < 'to' and rs.DepartureDate > 'to' or rs.ArrivalDate >= 'from' and rs.DepartureDate <=...
true
39587f0c0781b0528bd1218ecf47aebbfaa004e9
SQL
otrofree/prueba
/problema3/server/prisma/migrations/20210310213256_init/migration.sql
UTF-8
2,874
4.0625
4
[]
no_license
/* Warnings: - You are about to drop the `Post` table. If the table is not empty, all the data it contains will be lost. - You are about to drop the `User` table. If the table is not empty, all the data it contains will be lost. - Added the required column `prestamoId` to the `Libro` table without a default va...
true
f884d9e04e5890c89b9ab89888348306159e956c
SQL
ryhanai/teachingplugin
/share/DB/20180211UpdateTables.sql
UTF-8
1,021
3.078125
3
[ "MIT", "BSD-3-Clause" ]
permissive
ALTER TABLE T_TASK_INST_PARAMETER ADD COLUMN type integer not null default 0; ALTER TABLE T_TASK_INST_PARAMETER ADD COLUMN model_id integer; ALTER TABLE T_TASK_INST_PARAMETER ADD COLUMN model_param_id integer; ALTER TABLE T_MODEL_INFO RENAME TO tmp_T_MODEL_INFO; CREATE TABLE T_MODEL_INFO ( task_inst_id integer not n...
true
d60a801d3f3a3e2c6a5a0f13e301f1403a634914
SQL
pyadmitrij/GoJavaOnline
/JavaEE/module006_01/RESTAURANT_INSERT.sql
UTF-8
1,127
2.78125
3
[]
no_license
insert into positions values (1, 'Director'), (2, 'Chief cook'), (3, 'Cook'), (4, 'Waiter'), (5, 'Washer'), (6, 'Cleaner'); insert into employee values (1, 'Lysyy', 'Sergey', '1990-09-14', '0978883223', 6000.0, 3), (2, 'Guralnik', 'Vladislav', '1991-12-04', '0635553669', 4000.0, 4), (3, 'Tyurin', 'Aleksandr', '...
true
ddd34791f492ec28d5d0097f074f5495d1dc217f
SQL
daniubolt/integracion_batch_extrae_carga
/repr_db_certa_txt/repr_db_certa_txt_historic/red_h.new.query.sql
UTF-8
415
3.046875
3
[]
no_license
select netTypeId id_red, netTypeCaption nombre, nettypePrefix alias, nettypeparent fk_padre, logIdFrom id_inc_desde, logIdTo id_inc_hasta, to_char(dateFrom,'YYYY-MM-DD HH24:MI:SS')fec_inc_desde, to_char(dateTo,'YYYY-MM-DD HH24:MI:SS' )fec_inc_hasta from netTypes_h where (logIdFrom > $logIdSyncMin and logIdFrom <= $log...
true
59ba9c9cb13205ef0da3653bde8aab1945682ddc
SQL
GSystems/BiMr
/WebContent/WEB-INF/resources/script/script.sql
UTF-8
1,114
3.421875
3
[]
no_license
GRANT ALL PRIVILEGES ON BIMR.* TO bimruser@localhost; # get the duplicates SELECT * FROM tweets WHERE tweetMessage IN (SELECT tweetMessage FROM tweets GROUP BY tweetMessage HAVING count(*) > 1 ); CREATE TABLE tweets ( id bigint(100) NOT NULL AUTO_INCREMENT, tweetId bigint(100), tweetMessage varchar(200), latit...
true
b5bc2b8543a295ac93460c3175dc7192afbcb2fc
SQL
moriarty-verana/sql-scripts
/Regions.sql
UTF-8
3,011
3.21875
3
[]
no_license
/* 7,861 rows on 1/19/19*/ select --IDENTIFY SERVICE AREA-- case when sa.serv_area_id in (11,13,16,17,18,19) then '19' else sa.serv_area_id end as 'SERV_AREA_ID' ,case when sa.serv_area_id in (11,13,16,17,18,19) then 'MERCY HEALTH' else upper(sa.serv_area_name) end as 'SERV_AREA_NAME' --IDENTIFY REG...
true
5307373e4da42edd78ebadd0728b26b09afcdb33
SQL
wajones/samples
/Accounting/accounting_db_setup.sql
UTF-8
10,252
3.34375
3
[]
no_license
DROP TABLE IF EXISTS `affiliate_cash_balance`; CREATE TABLE `affiliate_cash_balance` ( `id` int(10) unsigned NOT NULL auto_increment, `affiliate_id` int(10) unsigned NOT NULL default '0', `balance` decimal(12,2) NOT NULL default '0.00', PRIMARY KEY (`id`), KEY `affiliate_id` (`affiliate_id`) ) ENGINE=InnoDB ...
true
f661428e57e74b491617827f57ca372ff8cf19f0
SQL
nazomeku/codefights
/arcade/databases/04_projects_team.sql
UTF-8
277
3.65625
4
[]
no_license
/*Given the table projectLog, build a new results table with a single name column that contains the names of the project's contributors sorted in ascending order.*/ CREATE PROCEDURE projectsTeam() BEGIN SELECT distinct name as name FROM projectLog ORDER BY name; END
true
23476ea6a652a7c4cc24014d524a0bf18319eeff
SQL
iwanabdi/Adamart
/Adamart/database/pos_sep.sql
UTF-8
7,601
3.125
3
[]
no_license
/* Navicat Premium Data Transfer Source Server : bram Source Server Type : MySQL Source Server Version : 100411 Source Host : localhost:3306 Source Schema : pos_sep Target Server Type : MySQL Target Server Version : 100411 File Encoding : 65001 Date: 18/04/2021 17:26...
true
b36e0226a141e3efa6bb087426be7c01fc777bc9
SQL
koreahong/bigquery
/ch09/38-.sql
UTF-8
650
3.171875
3
[]
no_license
CREATE OR REPLACE MODEL ch09eu.bicycle_model_longrental_balanced TRANSFORM(* EXCEPT(start_date) , IF(EXTRACT(dayofweek FROM start_date) BETWEEN 2 AND 6, 'weekday', 'weekend') AS dayofweek , ML.BUCKETIZE(EXTRACT(HOUR FROM start_date), [5, 10, 17]) AS hourofday , start_date ) OPTIONS(input_label_cols=['biketype'], ...
true
9cfcbf190ff307a15591b6f71caa487f0e094e6e
SQL
th0masm/bikes
/databases/dbBikes_combinando_motos_equipos.sql
UTF-8
5,836
3.65625
4
[]
no_license
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'; CREATE SCHEMA IF NOT EXISTS `dbBikes` DEFAULT CHARACTER SET utf8 ; USE `dbBikes` ; -- -------------------------------------------------...
true
b084cee868baf15e3446158e0b0444f913332731
SQL
menasbeshay/ivalley-svn
/I_Finance/sql/ar_EG-8digits.sql
UTF-8
90,756
3.015625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 3.4.10.1deb1 -- http://www.phpmyadmin.net -- -- Host: localhost -- Czas wygenerowania: 14 Lis 2012, 14:38 -- Wersja serwera: 5.5.28 -- Wersja PHP: 5.3.10-1ubuntu3.4 -- -- Baza danych: `fa_comp2` -- -- -------------------------------------------------------- -- -- Struktura tabeli dla...
true
741e8a85e9c394ba1d043ba1aeb9fc61c0d71958
SQL
joelb95/dutchdevelopment
/db/dutch_development.sql
UTF-8
2,588
3.03125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.5.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Gegenereerd op: 05 mei 2016 om 19:31 -- Serverversie: 5.7.11 -- PHP-versie: 5.6.19 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!401...
true
2e7374552ee8426de490a37cec59c20f897de86b
SQL
radtek/EaglePicher
/ExportPackageAndEvent/exportpackage.sql
UTF-8
15,292
3.578125
4
[]
no_license
SET SERVEROUTPUT ON SIZE 100000; SET ECHO ON; SET LINES 100; SET PAGES 999; column db new_value db noprint SELECT LOWER(name) AS "db" FROM v$database; column runtime new_value runtime noprint SELECT to_char(sysdate, 'mmddyyyyhhmmss') as "runtime" from dual; spool ../logs/ExportShipmentCheck_&db._&runtime...
true