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
7d5f6cbadd322b370262a8bb649beecc4e45bb66
SQL
miye235/data_factory
/dataprocess/oracleprocess/mes/sqls/销售面积.sql
UTF-8
302
3.359375
3
[]
no_license
SELECT DISTINCT A.ITEM_CODE, B.UNIT_LENGTH/1000 长, B.UNIT_WIDTH/1000 宽,B.UNIT_LENGTH*B.UNIT_WIDTH/1000000 面积 FROM APPS.YWMS_ONHAND_QUANTITY A INNER JOIN APPS.MTL_SYSTEM_ITEMS B ON A.INVENTORY_ITEM_ID = B.INVENTORY_ITEM_ID WHERE A.CATEGORY_SEG1 = '成品' AND A.SUBINVENTORY_CODE = 'F1FGA'
true
36fb585ffb3ca759bdf5f3a4fa2f89e00de387ea
SQL
Han-Burger/Leetcode
/177-Nth-Highest-Salary/solution.sql
UTF-8
315
3.578125
4
[]
no_license
CREATE FUNCTION getNthHighestSalary(N INT) RETURNS INT BEGIN RETURN ( # Write your MySQL query statement below. select e1.Salary from (select distinct Salary from Employee) e1 where (select count(*) from (select distinct Salary from Employee) e2 where e2.Salary > e1.Salary) = N-1 ); END
true
05cba26d216458daf3b109dd40e3acff8d4b3810
SQL
okwang1979/eval_grid
/project_067_65tbb_add_cubedata/ORACLE/00001/tb_tb_rule.sql
UTF-8
2,043
2.875
3
[]
no_license
/* tablename: tb_imp_data */ create table tb_imp_data (pk_obj char(20) not null /*pk_obj*/, cube_code varchar2(20) null /*cube_code*/, user_code varchar2(50) null /*user_code*/, remark varchar2(500) null /*remark*/, def1 varchar2(500) null /*def1*/, def2 varchar2(500) null /*def2*/, def3 varchar2(500) null /*def...
true
dfbe609f22dc0f0df751dc5627f45614e7475d19
SQL
asliusar/ReactiveChat
/backend/src/main/resources/schema.sql
UTF-8
301
3.453125
3
[ "MIT" ]
permissive
CREATE TABLE USER ( ID bigint auto_increment primary key, NAME varchar NOT NULL ); CREATE TABLE MESSAGE ( ID bigint auto_increment primary key, TEXT varchar, DATE TIMESTAMP DEFAULT CURRENT_TIMESTAMP, OWNER_ID int NOT NULL, foreign key (OWNER_ID) references USER(ID) );
true
e175f8f9160b61419b525a25ffb08c86b78ee241
SQL
gergelyk/pforum
/forum.sql
UTF-8
2,314
3.796875
4
[]
no_license
DROP TABLE IF EXISTS POSTS; DROP TABLE IF EXISTS THREADS; DROP TABLE IF EXISTS USERS; DROP TABLE IF EXISTS HISTORY; CREATE TABLE POSTS ( pid INTEGER PRIMARY KEY AUTOINCREMENT UNIQUE, /* post ID > 0 */ uid INTEGER, /* user ID */ tid INTEGER, ...
true
741d8403859f2729d078bee8db1bfb8455522f96
SQL
seriouslag/multitenant-db
/service/src/main/java/com/nullspace/multitenant/modules/store/sql/build.sql
UTF-8
33,110
3.109375
3
[]
no_license
create table currencies ( id bigserial not null constraint currencies_pkey primary key, currency_code varchar(255) constraint uk_jekn45c17p62ja9i4g7xj1st8 unique, currency_currency_code varchar(255) not null constraint uk_o10hj594ximk9mmmwbnnajwsp unique, currency_name varchar(255) constraint uk_8m...
true
fe6fcb259598ec4eb3b6c314f2cf1cb6005d6941
SQL
aurelianoHose/docflow
/sql/tables/0060_flow.sql
WINDOWS-1251
4,827
2.96875
3
[]
no_license
-- Table: flow -- DROP TABLE flow; CREATE TABLE flow ( id bigserial NOT NULL, flow character varying, link character varying, codec_id bigint NOT NULL, bitrade numeric, icon character varying(256), user_id bigserial, added timestamp NULL, modified timestamp NULL, del boolean DEFAULT false, actua...
true
60e836dcd14e012fbb8b154a783420e2579d03cd
SQL
Jamaxack/HackerrankPractice
/SQL/Basic Join/Asian Population.sql
UTF-8
222
3.90625
4
[]
no_license
--Problem: https://www.hackerrank.com/challenges/asian-population/problem --Max Score: 10 Select Sum(City.Population) From City Join Country on City.CountryCode = Country.Code Where Continent = 'Asia'
true
b17e5f3682db471638f1bd37a5b766baf4a2c3c4
SQL
yfengl/address
/sql/classlist.sql
UTF-8
1,463
2.96875
3
[]
no_license
/* Navicat Premium Data Transfer Source Server : mysql Source Server Type : MySQL Source Server Version : 80021 Source Host : localhost:3306 Source Schema : classlist Target Server Type : MySQL Target Server Version : 80021 File Encoding : 65001 Date: 28/11/2020 15:3...
true
ac975402fdef61c8d7bc53c5eaa17d1079467118
SQL
wabp/dba
/oracle/abf/real_pick.sql
ISO-8859-1
45,447
2.65625
3
[]
no_license
CREATE OR REPLACE PACKAGE APPS.b2w_om_real_picking_pkg IS -- +=================================================================+ -- | Copyright (c) 2010 F2C, Rio de Janeiro, Brasil | -- | All rights reserved. | -- +=================================...
true
9a87b03531b92b73efa3e4d8fd5561ba5134d9d5
SQL
qgzhao/contact
/contact.sql
UTF-8
2,827
3.515625
4
[ "MIT" ]
permissive
/* Navicat Premium Data Transfer Source Server : mysql-localhost Source Server Type : MySQL Source Server Version : 80017 Source Host : localhost:3306 Source Schema : contact Target Server Type : MySQL Target Server Version : 80017 File Encoding : 65001 Date: 19/11/2...
true
6bcd9db81457e5bb7945a2de6ebf9951ce53a817
SQL
devscoutsweden/aktivitetsbanken-android
/app/src/main/res/raw/db_migrate_1_category_icon.sql
UTF-8
237
3.28125
3
[]
no_license
ALTER TABLE "category" ADD COLUMN "icon_media_id" INTEGER CONSTRAINT "fk_categories_media1" REFERENCES "media" ("id") ON DELETE SET NULL ON UPDATE RESTRICT; CREATE INDEX "fk_categories_media1_idx" ON "category" ("icon_media_id" ASC);
true
bcf9732ecc491db5a00e790e08f4e5e4921c4f2d
SQL
UCLALibrary/sql-scripts
/Voyager/Cataloging/Marcive bibs with Law and Internet holdings SILSLA-40.sql
UTF-8
1,166
3.71875
4
[]
no_license
/* Marcive bibs with Internet and Law holdings. SILSLA-40. */ with bibs as ( select bs.record_id as bib_id from vger_subfields.ucladb_bib_subfield bs where tag = '910a' and subfield like '%marcive%' ) , law as ( select distinct b.bib_id , bm.mfhd_id , l.location_code from bibs b inner join b...
true
2ee73133bf2d46357e8b59ff39190c18d86f7994
SQL
FelipeLeonardo98/API_PraiaGrande_ADRESS
/native_MySQL/native_MySQL_Procedure.sql
UTF-8
927
3.34375
3
[]
no_license
-- Procedure for to automatize insert into table 'streets', field foreign key use db_api_praiagrande; -- Altering fields to default value now(), cause they're will insertings through of MySQL ALTER TABLE streets modify COLUMN createdAt datetime default now(); ALTER TABLE streets modify COLUMN updatedAt datetime defaul...
true
57fb9fc46ccd24c94b87769c2077ef9c13e37923
SQL
yichengjie/spring-cloud-study3
/is-server-auth/src/main/resources/db/schema.sql
UTF-8
2,953
3.09375
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 COMMENT '令牌有效期'...
true
5320eea799743cab7257bec975dcf07f9d27a37e
SQL
youcef-86/projet_wazaa_immo
/back-end/script_bd_wazaaimmo.sql
UTF-8
5,996
3.25
3
[]
no_license
DROP DATABASE IF EXISTS wazaaimmo; CREATE DATABASE wazaaimmo; -- -- Table: waz_options -- CREATE TABLE waz_options( opt_id INT Auto_increment NOT NULL, opt_libelle VARCHAR(50) NOT NULL, PRIMARY KEY(opt_id) ); -- -- Table: waz_agent -- CREATE TABLE waz_agent( agent_id INT Auto_increment NOT NULL, ...
true
684f09c0bd26a2598e776827b47693dd22893f1b
SQL
dhall2211/CodingCampus2020bb
/src/Bokhee/SQL/CarFactorySQL/Gyula_Engine.sql
UTF-8
260
3.3125
3
[]
no_license
SELECT min(power) FROM carfactory.engine; select car.brand, car.type, engine.power as power from engine join carengine on carengine.engineid = engine.id join car on car.id = carengine.carid where power = (select min(power) from engine );
true
630e86ee0899e7c4ce301f1b776bea0f07d35e39
SQL
juanifabrega/ProyectoBdD
/SQL/parquimetros.sql
UTF-8
11,053
3.90625
4
[]
no_license
#creo de la Base de Datos CREATE DATABASE parquimetros; #selecciono la base de datos sobre la cual voy a hacer modificaciones USE parquimetros; #----------------------------------------------------------------------------------------------- #creación Tablas para las entidades CREATE TABLE conductores( dni INT UNSIG...
true
49f8b0fd35ce9a1fc426545706af39dd6ba842f4
SQL
AhsanRiyad/adbms_nodejs_new
/sql files/node_project.sql
UTF-8
10,947
2.859375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.3 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Mar 07, 2019 at 04:10 PM -- Server version: 10.1.36-MariaDB -- PHP Version: 7.2.10 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OL...
true
cb3f6de650d3888c83af0f78d95c506dfdf44970
SQL
zhouyb126/springboot
/mybatis-mutil-datasource/sql.sql
UTF-8
958
3.125
3
[]
no_license
################ cluster DB ################ CREATE DATABASE springbootdb_cluster; use springbootdb_cluster; CREATE TABLE user( id INT(10) unsigned PRIMARY KEY NOT NULL COMMENT '用户编号' AUTO_INCREMENT, user_name VARCHAR(25) COMMENT '用户名称', description VARCHAR(100) COMMENT '描述' )ENGINE=InnoDB AUTO_INCREMENT=1 DE...
true
e27591b044df3e848e899a926b95397d0d14c84c
SQL
DEFRA/water-abstraction-tactical-crm
/migrations/sqls/20190905133546-crm-v2-structure-up.sql
UTF-8
5,360
3.84375
4
[ "LicenseRef-scancode-unknown-license-reference", "OGL-UK-3.0" ]
permissive
CREATE SCHEMA IF NOT EXISTS crm_v2; CREATE EXTENSION IF NOT EXISTS pgcrypto WITH SCHEMA public; CREATE TABLE IF NOT EXISTS "crm_v2"."roles" ( "role_id" varchar NOT NULL DEFAULT public.gen_random_uuid(), "name" varchar NOT NULL, "date_created" timestamp NOT NULL DEFAULT NOW(), "date_updated" timestamp NOT NULL ...
true
f2c1b0aa31a033f5f13dc022bedad541904ab25e
SQL
polenzdakota/SJSU-CS160-160ZAIBATSU
/Hoardr/Chris_WorkSpace/Hoardr/nbproject/db.sql
UTF-8
1,094
3.6875
4
[]
no_license
CREATE TABLE `Library` ( `PK` INT NOT NULL AUTO_INCREMENT, `Name` VARCHAR(40), `Type` VARCHAR(15), `Cost` INT, `Color` VARCHAR, PRIMARY KEY (`PK`) ); CREATE TABLE `Collection` ( `ID` INT NOT NULL AUTO_INCREMENT, `Card_Id` INT, `Card2_Id` INT, PRIMARY KEY (`ID`) ); CREATE TABLE `Users` ( `ID` I...
true
f92ddbe32d531979339a3555433d48974c8b1e3c
SQL
MrHangVIP/TicketSeller
/zybishe.sql
UTF-8
11,556
3.078125
3
[]
no_license
-- MySQL dump 10.13 Distrib 5.5.39, for Win64 (x86) -- -- Host: localhost Database: zybishe -- ------------------------------------------------------ -- Server version 5.5.39 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40...
true
c0aeafd3953f08232c061ffde819bb811cfb0e30
SQL
seasonfall27/FrankFund
/BigQuery/Queries/View_Account_Category_Percentage_Breakdown.sql
UTF-8
799
4.59375
5
[]
no_license
SELECT a.accountID, t.TransactionCategory, SUM(t.amount) AS CategoryTotal, total.TotalExpenses, ROUND(100 * (SUM(t.amount) / total.TotalExpenses), 2) AS CategoryPercentage FROM FrankFund.Transactions t INNER JOIN FrankFund.Accounts a ON t.AccountID = a.AccountID -- Subquery to determine each accounts total expenses I...
true
9bad1a665c4e798d74a20ee9ceeaccb240e60d1c
SQL
kjellwinblad/wordlisttrainer
/database_info/databasecreate.sql
UTF-8
781
3.171875
3
[]
no_license
connect 'jdbc:derby:LocalDB;create=true'; connect 'jdbc:derby://localhost:1527/NetworkDB;create=true;user=me;password=mine'; DROP TABLE WORDS; DROP TABLE WORD_LISTS; DROP TABLE WORD_LIST_WORDS; connect 'jdbc:derby:LocalDB;create=true'; CREATE TABLE WORD_LIST_WORDS ( id INTEGER GENERATED ALWAYS AS IDENTITY, wo...
true
9e5373666353fcd11dbe25cf8021cc8793ec0d85
SQL
nvanhai/tct2013
/Source/NTKCC3.1.7/TaxProjectServer/Scripts/QLT/rcv_v_pluc_qtoan_tndn_01ab.sql
UTF-8
3,428
3.640625
4
[]
no_license
CREATE OR REPLACE VIEW rcv_v_pluc_qtoan_tndn_01ab ( hdr_id, loai_dlieu, row_id, nam_psinh, so_psinh, lo_chuyen_01, lo_chuyen_02, lo_chuyen_03, lo_chuyen_04, lo_chuyen_05, lo_chuyen_06, kieu_dlieu, so_tt ) AS SELECT dtl.hdr_id , dtl.loai_dlieu , dtl.row_i...
true
e3cb1d06100738dd706b058226805fe1414ddbdd
SQL
Buzachero/cursos-app-backend
/src/test/resources/schema-integration-test.sql
UTF-8
642
4
4
[]
no_license
DROP TABLE IF EXISTS CATEGORIA; DROP TABLE IF EXISTS CURSO; CREATE TABLE CATEGORIA ( CODIGO INTEGER NOT NULL, DESCRICAO VARCHAR(255), PRIMARY KEY(CODIGO) ); CREATE TABLE CURSO ( ID INTEGER AUTO_INCREMENT, DESCRICAO VARCHAR(50) NOT NULL, DATA_INICIO DATE NOT NULL, DATA_TERMINO DATE NOT NULL...
true
32d346d2c255afcd435ac9dc6ed6fe6f9369670d
SQL
j0hnnyhuang/dvd-sql-proj
/queries.sql
UTF-8
3,232
4.25
4
[]
no_license
/* Query 1 - query used for first insight*/ SELECT DISTINCT(film_title), category_name, rental_count FROM ( SELECT f.title film_title, c.name category_name, COUNT(r.rental_id) OVER main_window AS rental_count FROM film f JOIN film_category fc ...
true
a4d0cc2699f29ff1ab11d978b5edd2d717794931
SQL
kevind3v/flash
/db.sql
UTF-8
393
2.953125
3
[]
no_license
CREATE DATABASE flash; USE flash; CREATE TABLE products ( `id` INT NOT NULL AUTO_INCREMENT, `name` VARCHAR(255) NOT NULL, `description` TEXT NOT NULL, `price` VARCHAR(255) NOT NULL, `image` VARCHAR(255) NOT NULL, `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` timesta...
true
57538ed97dd8a8aefff4150f028047703f1791a6
SQL
PacktWorkshops/The-MySQL-Workshop
/Chapter14/Exercise16.03/ch16_excercise_16_03.sql
UTF-8
1,134
3.21875
3
[ "MIT" ]
permissive
--disable_warnings DROP ROLE IF EXISTS 'manager'; DROP ROLE IF EXISTS 'webdeveloper'; DROP ROLE IF EXISTS 'appdeveloper'; DROP USER IF EXISTS 'linda'@'%'; DROP USER IF EXISTS 'john'@'%'; DROP USER IF EXISTS 'vladimir'@'%'; DROP USER IF EXISTS 'jack'@'%'; --enable_warnings CREATE ROLE 'manager'; GRANT ALL ON employees....
true
944fdc301eeab1904cc0b65e08e7878a140e42e8
SQL
altamira/visualstudio
/Sistema de Informação Altamira/EGISSQL.Database/dbo/Views/vw_sintegra_cat95_reg88C.sql
UTF-8
2,254
3.53125
4
[]
no_license
 --vw_sintegra_cat95_reg88C ----------------------------------------------------------------------------------------- --GBS - Global Business Solution 2002 --Stored Procedure: Microsoft SQL Server 2000 --Autor(es): Elias P. Silva --Banco de Dados: EgisSql --Objetivo: ...
true
372ab6680982238d740a324e5f2c8f4459e4492f
SQL
ManuelTorrestrs13/Complete-SQL-Database-Bootcamp-Zero-to-Mastery
/SQL Deep Dive/Aggregate Functions/exercises.sql
UTF-8
1,356
3.9375
4
[]
no_license
-- BEFORE YOU START /* * What database should I use for these exercises? * Name: Employees */ -- -- Question 1: What is the average salary for the company? -- Table: Salaries select avg(salary) from employees; -> 63810.744836143706 -- Question 2: What year was the youngest person born in the company? -- Table: e...
true
2b59eaa003f703276912aa7d3481e4baf7d81347
SQL
larissaoliveiragithub/MySQL
/Projeto Integrador/MER Projeto.sql
UTF-8
994
3.46875
3
[]
no_license
CREATE DATABASE db_banco_MAH; CREATE TABLE `tb_usuario` ( `id` bigint NOT NULL AUTO_INCREMENT, `nome_completo` varchar(255) NOT NULL, `email_usuario` varchar(255) NOT NULL, `senha` varchar(255) NOT NULL, PRIMARY KEY (`id`) ); CREATE TABLE `tb_tema` ( `id` bigint NOT NULL AUTO_INCREMENT, `titulo` varchar(255) N...
true
7a0608426cf6e32dcbbcd612521d2612b4e4453a
SQL
macorifice/translated-test
/sql-scripts/createtable.sql
UTF-8
350
2.875
3
[ "MIT" ]
permissive
CREATE TABLE `test`.`project` ( `id` INT NOT NULL AUTO_INCREMENT, `title` VARCHAR(45) NULL, `jobs` VARCHAR(45) NULL, PRIMARY KEY (`id`)); CREATE TABLE `test`.`job` ( `id` INT NOT NULL AUTO_INCREMENT, `creationDate` DATETIME NULL DEFAULT CURRENT_TIMESTAMP, `price` DECIMAL(6,2) NULL, `status` VARCHAR(45)...
true
20c27bc6c6115cbb878822e593b5df16b8c3e912
SQL
delaware19/team-8
/loginpage.sql
UTF-8
594
2.828125
3
[ "LicenseRef-scancode-warranty-disclaimer" ]
no_license
CREATE TABLE `users` ( `username` varchar(50) DEFAULT NULL, `passwrd` varchar(50) DEFAULT NULL, `user_role` int(11) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; /* 0=admin 1= user */ INSERT INTO `Team_8`.`users` (`username`, `passwrd`, `user_role`) VALUES ({username: 'John...
true
9749c4778574d6e87c170820fb08fffaaeb3440f
SQL
ethanrmcdowell/Employee-Tracker
/schema.sql
UTF-8
1,773
3.84375
4
[]
no_license
DROP DATABASE IF EXISTS employee_DB; CREATE DATABASE employee_DB; USE employee_db; CREATE TABLE department ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name VARCHAR(30) ); CREATE TABLE role ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, title VARCHAR(30), salary INT, department_id INT, FOREIGN KEY (dep...
true
126764ad67b477ec336b74908f70e1912daaa3a4
SQL
joelcjunior/question
/defaults.sql
UTF-8
3,642
2.8125
3
[]
no_license
SELECT CD_FILIAL as CD_FILIAL, CD_ATIVIDADE, CD_CANAL, CD_CIDADE, CD_CLIENTE, CD_CLSCLI, CD_EMPRESA, CD_ESTADO, CD_GERENTE, CD_LOJA, CD_REPRESENTANTE, CD_SEGMERCADO, ID_PEDIDO, CD_FILIAL_DESC, ANO_EMISSAO, MES_EMISSAO, DT_TRANSACAO, CASE WHEN SUM(VL_VENCIDO) < 0 THEN SUM(VL_VENCIDO) WHEN SUM(V...
true
ecaaacecc1a170b199676f2147d863e86e5eb908
SQL
erinijapranckeviciene/annotate-with-vcfanno
/omim-orpha-ensg-annotations.sql
UTF-8
2,254
3.796875
4
[]
no_license
DROP TABLE IF EXISTS ginfoomim; CREATE TABLE ginfoomim AS SELECT g.GeneID, g.Symbol, g.description, o.MIM_number, o.Ensembl_Gene_ID, o.Gene_Symbols, o.Approved_Symbol, o.Phenotypes FROM geneinfo g LEFT JOIN genemap2 o ON g.GeneID=o.Entrez_Gene_ID; DROP TABLE IF EXISTS ginfoomimorpha; CREATE TABLE...
true
f669f4b8f51552964a3421468b3e7f956634303b
SQL
amigosdobart/gpp
/scripts/CONSULTA_ANATEL.sql
UTF-8
2,066
3.546875
4
[]
no_license
SELECT * FROM ( SELECT A.IDT_MSISDN, A.DAT_ATIVACAO, (SELECT SUM(VLR_CREDITO_PRINCIPAL) FROM TBL_REC_RECARGAS B WHERE B.IDT_MSISDN = A.IDT_MSISDN AND B.tip_transacao = '08001' AND B.dat_recarga BETWEEN '01-OUT-2004' AND '31-OUT-20...
true
7d0a3b15e6ab325a4c5b26f898890bfb1bc2def4
SQL
Tsurani-Nevericy/Tech-Elevator-Coursework
/module-2/02_Aggregate_Functions_and_GROUP_BY/student-lecture/mssql/lecture.sql
UTF-8
5,612
4.65625
5
[]
no_license
-- ORDERING RESULTS select * from country; select * from city; -- Populations of all countries in descending order select name, population from country order by population desc; select name, population from country order by population asc; --Names of countries and continents in ascending order select name, continen...
true
566392c2b02711d362b690601a31aa6f72fba7fe
SQL
Philchoi17/dicelatte
/extra/dicelatte_saveto_db.sql
UTF-8
1,794
3.34375
3
[]
no_license
<?php $chatAppConn = new PDO('mysql:host=localhost;dbname=diceLatteGamesDB;charset=utf8mb4', 'root', ''); ?> CREATE TABLE `diceLatteGamesDB` ( `id` int(11) AUTO_INCREMENT PRIMARY KEY, `name` varchar(255), `pubYear` int, `minNumPlayers` int, `maxNumPlayers` int, `recNumPlay...
true
b3f23f0cb5f9e0cbeddd2df8d0179c3e9bd85f34
SQL
z20905547/httpInterface
/src/main/resources/sql/h2.sql
UTF-8
12,439
3.375
3
[]
no_license
-- 删除所有表 DROP TABLE tb_data_dictionary if EXISTS; DROP TABLE tb_dictionary_category if EXISTS; DROP TABLE tb_group if EXISTS; DROP TABLE tb_group_resource if EXISTS; DROP TABLE tb_group_user if EXISTS; DROP TABLE tb_resource if EXISTS; DROP TABLE tb_user if EXISTS; -- 创建系统字典表 CREATE TABLE tb_data_dictionary (id BIGINT...
true
992f9297e48a6c394193721adf869f1e5f9a69fe
SQL
openforis/fra-platform
/src/server/db/migration/migrations/sqls/20180313124456-add-fra-user-reset-password-table-up.sql
UTF-8
655
2.890625
3
[]
no_license
CREATE TABLE fra_user_reset_password ( user_id BIGINT NOT NULL, uuid UUID DEFAULT uuid_generate_v4() NOT NULL, created_time TIMESTAMP WITHOUT TIME ZONE DEFAULT (now() ...
true
469d1da60a9072676db76df1b953e15e6934f801
SQL
serve-and-volley/atp-world-tour-tennis-data
/sql/deprecated_v3/tourney_surfaces_by_year.sql
UTF-8
1,974
3.90625
4
[ "CC-BY-4.0" ]
permissive
select tournaments.tourney_year as tourney_year, count(tournaments.tourney_name) as grass, foo_clay.clay as clay, foo_clay.hard as hard, foo_clay.carpet as carpet from ( select tournaments.tourney_year as tourney_year, count(tournaments.tourney_name) as clay, foo_hard...
true
3ac2766af58d7e81ee7c95f1b4216d1096f0d379
SQL
sdrew712/sql-2
/join.sql
UTF-8
1,036
3.90625
4
[]
no_license
-- 1 SELECT * FROM invoice JOIN invoice_line ON invoice.invoice_id = invoice_line.invoice_id WHERE unit_price > .99 -- 2 SELECT i.invoice_date, c.first_name, c.last_name, i.total FROM invoice i JOIN customer c ON i.customer_id = c.customer_id -- 3 SELECT c.first_name, c.last_name, e.first_name, e.last_name FROM custo...
true
e996695142616ee7268e49affc7201671ebd6f5f
SQL
x87-va/sputnik
/src/db/migrations/000004_friends.up.sql
UTF-8
135
2.609375
3
[ "MIT" ]
permissive
CREATE TABLE IF NOT EXISTS starwars.friends( character_id INTEGER, friend_id INTEGER, PRIMARY KEY (character_id, friend_id) );
true
33ae89ff7f1591e2314385acadfd753d893ee7d6
SQL
thona-seguros/Repositorio-Sicas
/Objetos-BD/Paquetes/oc_grupo_economico.sql
UTF-8
4,706
3.078125
3
[]
no_license
CREATE OR REPLACE PACKAGE SICAS_OC.OC_GRUPO_ECONOMICO IS -- FUNCTION NOMBRE_GRUPO_ECONOMICO(nCodCia NUMBER, cCodGrupoEc VARCHAR2) RETURN VARCHAR2; -- FUNCTION VALIDA_CREA(nCodCia NUMBER, cTipo_Doc_Identificacion VARCHAR2, ...
true
4aca8960d70ced980fcbee1dd5df88afa820c56e
SQL
gamingrobot/Raptor-RSVP
/rsvp.sql
UTF-8
1,566
2.9375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 3.1.1 -- http://www.phpmyadmin.net -- -- Host: db4free.net:3306 -- Generation Time: Jan 14, 2009 at 04:27 PM -- Server version: 5.1.30 -- PHP Version: 5.2.6 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHAR...
true
529c7c718cd24284b14ec772c6808ff27cdccad6
SQL
philson-philip/Code-Lab
/PL-SQL/9 - Salary Increase.sql
UTF-8
515
2.875
3
[ "MIT" ]
permissive
DECLARE sal number(7,2); newsal number(7,2); change number(7,2); BEGIN sal := &sal; IF sal>30000 THEN newsal := sal + (0.20*sal); change := newsal-sal; dbms_output.put_line('New salary : '||newsal); dbms_output.put_line('Change in salary : '||change); ELSIF sal>25000 THEN newsal := sal + (0.25*sal); ...
true
b1df02df496c83f6672a0a6004aa08f70114b59f
SQL
jacobadler-dutchie/dbt_hubspot_source
/models/stg_hubspot__contact_property_history.sql
UTF-8
793
2.875
3
[ "Apache-2.0" ]
permissive
{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_marketing_enabled', 'hubspot_contact_property_enabled'])) }} with base as ( select * from {{ ref('stg_hubspot__contact_property_history_tmp') }} ), macro as ( select {{ fivetran_utils.fill_staging_columns( source...
true
56a1b9d343bbc99ae87458785ff3b2264a8aa59e
SQL
itpop/BotFactory
/data/1_db_schema.sql
UTF-8
1,860
3.359375
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
-- COMP4711 Team Durian -- BotFactory schema -- bots table DROP TABLE IF EXISTS `bots`; CREATE TABLE IF NOT EXISTS `bots` ( `id` INT AUTO_INCREMENT, `model` CHAR(1) NOT NULL, -- a, b, c `pieces` VARCHAR(30) NOT NULL, -- parts `isValid` CHAR(1) DEFAULT '1', PRIMARY KEY(`i...
true
a1d2606fe52eade0828b6ac7862c5afa2ae9a7a2
SQL
radtek/abs3
/sql/mmfo/bars/ForeignKey/customer_update.sql
UTF-8
6,979
2.890625
3
[]
no_license
PROMPT ===================================================================================== PROMPT *** Run *** ========== Scripts /Sql/Bars/ForeignKey/CUSTOMER_UPDATE.sql =========*** PROMPT ===================================================================================== PROMPT *** Create constrain...
true
abad8e1fd5e325ddf283f4bdfab0546cf4641797
SQL
vijaydairyf/TimelyFish
/SolomonApp/dbo/Stored Procedures/dbo.ADG_GetSkipToFunction.sql
UTF-8
334
2.65625
3
[]
no_license
 create proc ADG_GetSkipToFunction @cpnyid varchar(10), @sotypeid varchar(4), @skipto varchar(4) as select functionid, functionclass from sostep where cpnyid = @cpnyid and sotypeid = @sotypeid and seq >= @skipto and status <> 'D' -- Copyright 1998 by Advanced Distribution Group, Ltd. All rights ...
true
9f02c4fea5e594861368d58954d94f645c3e24f4
SQL
ironheadniubi/git_test
/mysql笔记/数据库设计的三大范式.sql
UTF-8
2,976
3.953125
4
[]
no_license
-- 1.第一范式 --1NF --数据表中的所有字段都是不可分割的原子值? create table student2( id int primary key, name varchar(20), address varchar(30) ); insert into student2 values(1,'张三','中国上海杨浦1100'); insert into student2 values(2,'王五','中国上海杨浦516'); insert into student2 values(3,'李四','中国上海杨浦580'); -- 字段值还可以继续拆分的,就不满足第一范式 mysql> select *f...
true
ef9d77db5b6484cc60bb549304eb98ccdae28dc4
SQL
vvysmile/smile
/Install/data/1/sml_remark.sql
UTF-8
1,733
2.953125
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : MySQL__[127.0.0.1] Source Server Version : 50505 Source Host : 127.0.0.1:3306 Source Database : smile Target Server Type : MYSQL Target Server Version : 50505 File Encoding : 65001 Date: 2017-01-12 22:12:12 */ SET FOREIGN_KEY_CHECKS=0...
true
2af2c1e0232aec3f4cb81e8997b4cd3cd7958a92
SQL
mamiaox/StaffingSystem
/WebContent/WEB-INF/allSql.sql
UTF-8
1,656
2.75
3
[]
no_license
create database StaffingSystem; user StaffingSystem; create table t_admin ( adminId varchar(32) primary key, adminNo varchar(32), adminNum varchar(32), adminPwd varchar(32), recentLogin datetime ) engine=innoDB default charset=utf8; create table t_user ( userId varchar(32) primary key, userName va...
true
33daec2fa44b665931d3bc632d11bb1413f6b222
SQL
IGarrido1996/Proyecto_Arquitectura
/Base de datos/tablas.sql
UTF-8
5,217
3.578125
4
[]
no_license
use arquitecturaweb; create table empresa( name varchar(30), empresaID char(5)primary key); create table usuarios( usuario varchar(20)primary key, tipo varchar(20) check(tipo='recursos humanos' or tipo='empleado'), contraseña varchar(30)); create table proyecto( name varchar(30), proyectoID char(5)primary key, empre...
true
63803248657b32b9988d9e266b277c40def44b13
SQL
kelvingraddick/administration-panel-website
/setup/create_database_tables.sql
UTF-8
6,566
3.390625
3
[]
no_license
CREATE TABLE `blog_posts` ( `id` bigint(30) NOT NULL AUTO_INCREMENT, `title` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL, `description` varchar(300) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'none', `content` varchar(10000) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'none', `url` varchar(300) COLLATE ...
true
930116a32416906a39c66499313671b89211262e
SQL
Buddhikalak/spring-angular
/sql.sql
UTF-8
1,718
3.28125
3
[]
no_license
/* SQLyog Ultimate - MySQL GUI v8.2 MySQL - 5.5.31 : Database - banglore ********************************************************************* */ /*!40101 SET NAMES utf8 */; /*!40101 SET SQL_MODE=''*/; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_CHE...
true
379d93f5478cdebd70cb1c5a74f6978a2d81fb3a
SQL
dba-kosova/OracleScripts
/work/lh.sql
UTF-8
1,015
3.40625
3
[]
no_license
set linesize 100 set pagesize 30 set heading on set ver off set feedback on set scan on col sid format a5 col ser# format a5 col pid format a5 col username format a8 col machine format a15 col program format a13 col name format a25 col request format a7 select rpad(s.sid,5) sid, ...
true
abadeb46758cd334660be0acf13cd0b894e0ea38
SQL
sm50405445/oracle_Query_study
/join.sql
UHC
2,958
4.375
4
[]
no_license
select a.employee_id, a.emp_name, a.department_id, b.department_name from employees a,departments b where a.department_id=b.department_id; /*exists*/ select department_id, department_name from departments a where exists(select * from employees b where a.department_id=b.department_id and b.salary>3000) order by a.depar...
true
7bf35c3542b5530ec66cb9471a0b1bc3172f2210
SQL
hackoregon/urbandev-etl
/json/queries/census_persons_by_race_blkgrp-SELECT.sql
UTF-8
3,427
3.484375
3
[ "MIT" ]
permissive
-- U.S. Census Persons by Race 2000, 2010 by Zillow Region with category -- values given as a percentage of the total population. -- The race categories and values come from the U.S. Decennial Census -- aggregated by Block Groups. The numbers given here for -- Zillow Regions are estimated by calculating the percentage ...
true
90dd88988b17d72db9065c8a828c5849d0f7a8e9
SQL
carolfly86/altar
/sql/golden_record/moderate_gr.sql
UTF-8
1,291
2.84375
3
[]
no_license
-- -- PostgreSQL database dump -- 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 search_path = public, pg_catalog; SET default_tablespace = ''; SET default_with_oids = fals...
true
46a5252cbc80e6a76fe9ea4dcbcd307cb4e486ce
SQL
fluca1978/fluca1978-pg-utils
/PWC/pwc-136-ch-2.sql
UTF-8
656
3.6875
4
[ "BSD-3-Clause", "LicenseRef-scancode-other-permissive" ]
permissive
CREATE OR REPLACE FUNCTION fibonacci_sum( l int DEFAULT 16 ) RETURNS bigint AS $CODE$ WITH RECURSIVE fibonacci( n, p ) AS ( SELECT 1, 1 UNION SELECT p + n, n FROM fibonacci WHERE n < l ) , permutations AS ( SELECT n::text AS current_value, n as total_sum FROM fib...
true
c0c83a96d67c856b6a39db38342baa7f7cd03ea2
SQL
JimmyGeorgeK/Courier_Management_System
/Database/couriermanagmentsystem.sql
UTF-8
12,818
2.875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jan 27, 2021 at 02:22 PM -- Server version: 10.1.38-MariaDB -- PHP Version: 7.1.26 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OL...
true
14cbdba5cc56bc9feceba40851d2afa0eca1757a
SQL
bryanhonof/pxlairquality-heroku-nodered
/database.sql
UTF-8
1,299
2.703125
3
[]
no_license
CREATE TABLE particle_sensor ( id SERIAL PRIMARY KEY, posting_time TIMESTAMP, PM1_0 SMALLINT, PM2_5 SMALLINT, PM10 SMALLINT ); CREATE TABLE gps ( id SERIAL PRIMARY KEY, posting_time TIMESTAMP, lat DOUBE PRECISION, long DOUBE...
true
5fdd7581b8894fb34acecc2d36a89d4b419d9f1d
SQL
ArthurKhairutdinov/IT2020-2021
/it.sql
UTF-8
4,103
3.90625
4
[]
no_license
select model,speed,hd from PC where price<500 select maker from product where type='Printer' group by maker select model,ram,screen from laptop where price>1000 select * from printer where color='y' select model,speed,hd from pc where (cd='12x' or cd='24x') and price<600 select distinct p.maker, l.speed ...
true
67935beb07692287cb6f8d2120d228b0b3f6e4d2
SQL
TareqJudehGithub/SQL_ZTM
/Adv_SQL/UNION.sql
UTF-8
656
4.21875
4
[]
no_license
/* - UNION combine multiple SELECT statements results removing duplicates. - UNION vs UNION ALL - UNION removes duplicates. - UNION ALL does not remove duplicates. - We must include an alias for column names when using UNION. */ SELECT NULL AS prod_id, SUM(quantity) AS total_sales FROM orderlines UNION SELE...
true
e9953a5608ebca5396cab40bbdbf6aca6cb2b2fd
SQL
sendoh1212/prueba
/drump.sql
UTF-8
1,913
2.984375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.3 -- https://www.phpmyadmin.net/ -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 14-01-2019 a las 07:22:16 -- Versión del servidor: 10.1.37-MariaDB -- Versión de PHP: 7.2.10 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00";...
true
a8aa0b8b5fe4bab37a513338875e5af4c820f479
SQL
flauzz/oraclesql
/Avançado - Objetos do Banco de Dados/aula38 - objetos do banco de dados user.sql
ISO-8859-1
677
3.296875
3
[]
no_license
--objetos do banco de dados --divididos em: schema objects e nonschema objects --schema objects: esquema do usurio tem o mesmo nome do usurio --coleo de estruturas lgicas de objetos - tabelas, views, suquences, procedures, synonym, constraints --nonoschema objects: objetos que no pertencem a um schema de usurio. so o...
true
6e35998d67a6b11dbd255f7bc6135035d4a68491
SQL
mbenetti/SAP-HANA-Express-Workshops
/02Text FOR PRESENTATION 2020.sql
UTF-8
20,118
3.796875
4
[ "MIT" ]
permissive
######################################################################################################### -- This document was created with the purpose of provide the code snippers necessary to follow the text -- processing workshop. A PowerPoint presentation with other learning material will be provide after the -...
true
937acbfb3fb050eb354477cddd8bc4f9122b81d5
SQL
mocamanda/SQL
/album.sql
UTF-8
372
3.46875
3
[]
no_license
.mode COLUMN .header ON -- Show all albums SELECT * FROM album; -- Show all albums made between 1975 & 1990 SELECT * FROM album WHERE release_year > 1974 and release_year < 1991; -- Show all albums whose names start with Super D SELECT * FROM album WHERE title IS 'Super D'; -- Show all albums that have no release y...
true
4568180fe6a490673c8f7c157be9a3909fd015b7
SQL
gkcom123/UI-Tech
/toilPortal/toil.sql
UTF-8
23,678
3.203125
3
[]
no_license
use toil; describe toil; CREATE TABLE toilUser( user_id INT(10) UNSIGNED PRIMARY KEY AUTO_INCREMENT, email_id VARCHAR(70) NOT NULL, f_name VARCHAR(40), l_name VARCHAR(40), company VARCHAR(40), phoneNumber VARCHAR(40), isActive TINYINT(1) UNSIGNED NOT NULL DEFAULT 1, passwd VARCHAR(32) NOT NULL, isadmin TINYINT(1) U...
true
9e3c1a5dd4cb7c0041d0a074b86572958a35bfc5
SQL
huyulin111/inoma
/ProjectBussHongfuZhenmu/sql/kf_hongfu_zhenmu_wms/allocation_area_info.sql
UTF-8
3,335
3.203125
3
[]
no_license
-- -------------------------------------------------------- -- 主机: 127.0.0.1 -- 服务器版本: 10.3.7-MariaDB - mariadb.org binary distribution -- 服务器OS: Win64 -- HeidiSQL 版本: 10.1.0.5577 -- ------------------------------------------------...
true
01901fe407b0a16343b46384a1600d3bedb107c8
SQL
tlvb25/holbertonschool-higher_level_programming
/0x0D-SQL_introduction/100-move_to_utf8.sql
UTF-8
444
2.65625
3
[]
no_license
-- Go to UTF8 -- script that converts hbtn_0c_0 database to UTF8 USE hbtn_0c_0; -- used notes from https://dev.mysql.com/doc/refman/8.0/en/charset-conversion.html ALTER TABLE first_table MODIFY name VARCHAR(256) CHARACTER SET utf8mb4; -- used notes from Stack Overflow on ALTAR TABLE ALTER TABLE first_table CONVERT TO C...
true
eb7e82a9373c54bb97b7051c54333a4fd4b6b7f1
SQL
MeGaDeTH91/SoftUni
/C# DB/Databases Basics/15 Exerc Subqueries And Joins/Subqueries And Joins/Subqueries And Joins/06 Employees Hired After.sql
UTF-8
302
3.84375
4
[]
no_license
SELECT * FROM Employees SELECT * FROM Departments SELECT e.FirstName, e.LastName, e.HireDate, d.[Name] AS DeptName FROM Employees AS e JOIN Departments AS d ON e.DepartmentID = d.DepartmentID WHERE HireDate > '1-1-1999' AND d.[Name] = 'Sales' OR d.[Name] = 'Finance' ORDER BY HireDate
true
8ac08ccccc1642e94563b40d9e48cefc03327026
SQL
doanhieucodegym/MySql_ThucThiCauLenh
/thucthi_table.sql
UTF-8
2,011
3.8125
4
[]
no_license
create table contacts ( contact_id int (11) not null auto_increment, last_name varchar(30) not null, first_name varchar(25), birthday date, constraint contacts_pk primary key (contact_id) ); drop table customer; -- sửa bảng ta dùng câu lệnh alter -- them một cột alter table contacts add last_name varchar (40...
true
c438c626d28a4ed78013d139e2e215e466e07b08
SQL
gittysachin/dbt-normalization
/models/generated/airbyte_tables/airmeet_chargebee/invoices.sql
UTF-8
707
2.671875
3
[]
no_license
{{ config( tags=["top-level-intermediate"]) }} -- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema select (_airbyte_data ->> 'total') as amount, (_airbyte_data ->> 'subscription_id') as subscription_id, (_airbyte_data ->> 'id') a...
true
472b12f770c83f9b98d7e35bcb35d0d6f8cafa8b
SQL
Paras-C/sinatra-video-site
/seed.sql
UTF-8
938
3.40625
3
[]
no_license
DROP TABLE IF EXISTS video; CREATE TABLE video( id SERIAL PRIMARY KEY, title VARCHAR, description TEXT, url VARCHAR, genre VARCHAR ); INSERT INTO video (title, description, url, genre) VALUES ('How to tie a shoe lace in once second','In this video the youtuber "MrYazzyB" demonstrates on a pair of shoes, a w...
true
ca8d9b0d0ac150f8f6cebaab688fcc534c73d09a
SQL
HojinChuu/Eshop
/shop.sql
UTF-8
2,066
3.734375
4
[]
no_license
CREATE TABLE users ( id INT auto_increment PRIMARY KEY, name VARCHAR(255) NOT NULL, email VARCHAR(255) NOT NULL UNIQUE KEY, password VARCHAR(255) NOT NULL, money INT DEFAULT 0, isAdmin INT DEFAULT 0, created_at datetime DEFAULT CURRENT_TIMESTAMP ); CREATE TABLE user_info ( id INT auto_increment PRIMARY KEY, user_id IN...
true
c3edf5361cb044dbacc426251992464ea29793cd
SQL
nathanlim45/IS607
/week4/W4_assign_organization.sql
UTF-8
1,213
3.234375
3
[]
no_license
-- Database: organization -- DROP DATABASE organization; CREATE DATABASE organization WITH OWNER = postgres ENCODING = 'UTF8' TABLESPACE = pg_default LC_COLLATE = 'C' LC_CTYPE = 'C' CONNECTION LIMIT = -1; CREATE TABLE etm ( employee_id serial NOT NULL, name character varying...
true
c93b99341df1864c537fce0d71600b4099ae1a12
SQL
Monkeybusinesss/kleineOpdrachten
/I.L & M/statements.sql
UTF-8
295
2.796875
3
[]
no_license
CREATE DATABASE brokenauth; USE brokenauth; CREATE TABLE user( id int NOT NULL auto_increment, email varchar(255) NOT NULL, password varchar(255) NOT NULL, PRIMARY KEY(id) ); ALTER TABLE user ADD COLUMN( IP_adrress VARCHAR(80), datum DATETIME DEFAULT CURRENT_TIMESTAMP );
true
d7bda089194111d6c5afeb136039663ded5207d9
SQL
khandielas/his_cn
/postgreSQL_src/create_table_pat_stable.sql
UTF-8
2,029
3.234375
3
[]
no_license
--=============================================================================== -- -- FILE: create_table_pat_stable.sql -- -- USAGE: psql -U username -W password -f create_table_pat_stable.sql -- DESCRIPTION: -- pat_stable table holds unchanged information of a patient, such as a unique -- file_n...
true
4a89c8770b29f18913ec9b6e5302f3c446ba84db
SQL
tomekzaw/agh_sem5_bd
/lab1_oracle/7_dodaj_rezerwacje_2.sql
UTF-8
944
2.828125
3
[]
no_license
CREATE OR REPLACE PROCEDURE dodaj_rezerwacje_2( arg_id_wycieczki wycieczki.id_wycieczki%TYPE, arg_id_osoby osoby.id_osoby%TYPE ) AS inserted_nr_rezerwacji rezerwacje.nr_rezerwacji%TYPE; inserted_status rezerwacje.status%TYPE; BEGIN sprawdz_czy_wycieczka_istnieje(arg_id_wycieczki); sprawdz_czy_wycieczka_jeszcze_si...
true
b8212e608180298803fb49449e53fda63cd2e3df
SQL
apiman/apiman
/distro/data/src/main/resources/ddls/apiman-gateway_oracle19.ddl
UTF-8
1,385
3.09375
3
[ "Apache-2.0" ]
permissive
CREATE TABLE gw_apis (org_id VARCHAR2(255) NOT NULL, id VARCHAR2(255) NOT NULL, version VARCHAR2(255) NOT NULL, bean CLOB NOT NULL); ALTER TABLE gw_apis ADD PRIMARY KEY (org_id, id, version); CREATE TABLE gw_clients (api_key VARCHAR2(255) NOT NULL, org_id VARCHAR2(255) NOT NULL, id VARCHAR2(255) NOT NULL, version VAR...
true
c654b767b30a2b800e5a6f5de8798fe999f6679d
SQL
ivanlutov/C-Database
/09. Additional Exercises/09. Additional Exercises/11. Count of Countries by Currency.sql
UTF-8
294
4
4
[]
no_license
SELECT cur.CurrencyCode, cur.Description, COUNT(c.CountryCode) AS [NumberOfCountries] FROM Currencies AS cur LEFT JOIN Countries AS c ON c.CurrencyCode = cur.CurrencyCode GROUP BY cur.CurrencyCode, cur.Description ORDER BY COUNT(c.CountryCode) DESC, cur.Description ASC
true
2bf8c531738952ba0b5fb34b6034ff68160c0843
SQL
brcmd/usaairlineflights
/Queries_USAirlineFlights.sql
UTF-8
1,665
4.21875
4
[]
no_license
use USAirlineFlights; /*Number of records in the flights table.*/ SELECT COUNT(*) FROM Flights; /*Average delay of departure and arrival according to the airport of origin.*/ SELECT Origin, AVG(DepDelay), AVG(ArrDelay) FROM Flights GROUP BY Origin; /*Average delay of arrival, by months and according to the airport o...
true
06685e2a9a92fae2474f5c52baf462eac2f8c65c
SQL
873191303/iclouds
/db/migration/db/V1_4_19__Add_storagecCapa_table.sql
UTF-8
1,166
2.640625
3
[]
no_license
/** 时间: 2017年2月28日 说明: 新增存储容量管理表 当前版本: ICloudsV3.9.pdm */ drop table if EXISTS cmdb_cap_storage2ovelflow; /*==============================================================*/ /* Table: cmdb_cap_storage2ovelflow */ /*=======================================================...
true
341ecf49305197c96de2d0b7f01de20cd366f7fd
SQL
PNNL-Comp-Mass-Spec/DBSchema_PgSQL_DMS
/dms/v_organism_entry.sql
UTF-8
951
2.875
3
[ "Apache-2.0" ]
permissive
-- -- Name: v_organism_entry; Type: VIEW; Schema: public; Owner: d3l243 -- CREATE VIEW public.v_organism_entry AS SELECT org.organism_id AS id, org.organism, org.organism_db_name AS default_protein_collection, org.description, org.short_name, org.storage_location, org.ncbi_taxonomy_...
true
c58abc99d1ba0cadb393d4b1477ec56e5fa1341c
SQL
microsoft/Nonprofit_Data_Warehouse_Quickstart
/legacy/NonprofitDataWarehouseQuickstartWithCDM/Warehouse/Warehouse/Persisted/Tables/Persisted.Transaction.sql
UTF-8
3,509
2.671875
3
[ "MIT" ]
permissive
-- Copyright (c) Microsoft Corporation. -- Licensed under the MIT License. CREATE TABLE [Persisted].[Transaction] ( TransactionKey INT NOT NULL, TransactionChangeHash BINARY(32) NOT NULL, MsnfpAdjustmentComment NVARCHAR(500) NULL, MsnfpAdjustmentReason NVARCHAR(500) NULL, Msn...
true
77c21f044d866f5c1f7745d4cda462a265707e33
SQL
armandodelcol-coder/efficient-training
/src/main/resources/db/migration/V005__create-table-task-resource-reference.sql
UTF-8
397
3.625
4
[]
no_license
CREATE TABLE task_resource_reference ( id bigint not null auto_increment, link varchar(255) not null, description text not null, task_resource_id bigint not null, primary key (id) ) engine=InnoDB default charset=utf8; ALTER TABLE task_resource_reference ADD CONSTRAINT fk_task_resource_ref...
true
84905ec64fb1201cb5739fe597a0c766bfcabeeb
SQL
biabulinxi/Python-ML-DL
/MySQL/Day01/studb.sql
UTF-8
356
2.609375
3
[]
no_license
create database studb; use studb; create table stuInfo(id int,name char(10),age tinyint unsigned,height float(5,2),weight (6,3)); desc stuInfo; show create table stuInfo; insert into stuInfo values(1, 'Jack',10,121.34,182.234); insert into stuInfo(id,name) values(2,'Rose'),(3,'liming'); select * from stuInfo; select id...
true
aeddc225a5993e2a6c208c331f764b43c4b6609f
SQL
borgymanotoy/betpals
/etc/update_0.9.2.sql
UTF-8
382
2.6875
3
[]
no_license
create table user_log ( id BIGINT NOT NULL IDENTITY PRIMARY KEY, userId bigint, created timestamp, message varchar ); create table competition_log ( id BIGINT NOT NULL IDENTITY PRIMARY KEY, competitionId bigint, created timestamp, message va...
true
eb3f9eaf819a95867140261a7bb6733870e3607b
SQL
vnalmenara/Projetos-MySQL-Generation-Brasil-Bloco2
/Atv1/Atv2-ECommerce.sql
UTF-8
819
3.21875
3
[]
no_license
create database e_commerce; use e_commerce; create table produtos( id bigint (5) auto_increment, tipo varchar(30) not null, valor float not null, pais_fabricacao varchar(20) default 'China', peso decimal (5,2), primary key (id) ); select * from produtos; insert into produtos values (default, 'caixa de som', '550', ...
true
7d5bc6cbe55d46f2a0ed275132f1b26934b5ba94
SQL
ahmedemad2051/marketplaces_a2z
/emaildb.sql
UTF-8
2,993
3.15625
3
[ "LicenseRef-scancode-unknown-license-reference", "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.0.10deb1 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Nov 16, 2016 at 07:45 PM -- Server version: 5.5.49-MariaDB-1ubuntu0.14.04.1 -- PHP Version: 5.5.9-1ubuntu4.20 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACT...
true
244172a50b75b0685dbabb309f309b04904fe315
SQL
buurent/Scripts
/SQL/DatabasesUsersSchemasRoles.sql
UTF-8
322
3.0625
3
[]
no_license
--- list databases select datname,datacl from pg_database; -- List Schemas select nspname from pg_catalog.pg_namespace; -- List User Roles select usename as username from pg_user; -- List Group Roles select distinct rolname as group_role from pg_roles join pg_auth_members on (pg_roles.oid=pg_auth_members.roleid)...
true
737100ede17a35feeb0ed1f2837c591fbed25660
SQL
IsFilimonov/Interviews
/CodeWars/PostgreSQL/015-SQL_Statistics-MIN,MEDIAN,MAX.sql
UTF-8
147
3.296875
3
[ "MIT" ]
permissive
SELECT min(score), percentile_cont(0.5) WITHIN GROUP (ORDER BY score) AS median, -- 50 percentile is a median max(score) FROM result;
true
ea7ba5b5beb0b4f7603189756b741adc36c30405
SQL
ajzenhamernikola/PDb2BP
/primeri/poglavlje_8/src/zadatak_8_4/upit.sql
UTF-8
739
3.53125
4
[]
no_license
WITH BROJ_POLOZENIH_ISPITA AS ( SELECT INDEKS FROM ISPIT WHERE OCENA > 5 AND STATUS_PRIJAVE = 'o' GROUP BY INDEKS HAVING COUNT(*) = ? ) SELECT D.INDEKS, IME, PREZIME, S.NAZIV, P.NAZIV, I...
true
dda8808cf5cea3da232b5dec01539be2cb78dc82
SQL
manoel-ats/atsfinanceiro
/script/tunover250219.sql
UTF-8
1,934
3.734375
4
[]
no_license
CREATE OR ALTER PROCEDURE TUNOVER RETURNS ( RAZAOSOCIAL VARCHAR( 50 ) , GRUPO_CLIENTE VARCHAR( 30 ) , RA CHAR( 10 ) , CONTAR DOUBLE PRECISION , ENTROU DOUBLE PRECISI...
true
058988331da73e41081732a924dc395cdc53eca7
SQL
awebb8/employee-tracker
/database/seed.sql
UTF-8
720
3.078125
3
[]
no_license
INSERT INTO department (dept_name) VALUES ("Human Resources"), ("Accounting"), ("Marketing"), ("Research and Development"); -- Add content to the role table INSERT INTO role (title, salary, department_id) VALUES ("HR Manager", 78000.00, 1), ("Accountant", 67000.00, 2), ("Director of Marketing", 108000.00, 3), ("Marke...
true