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
a8741f659b3e9a4ab3c51b24e68857e7518a69a9
SQL
AmamMcMam/Team-A-Agile
/SQLScripts/CreateTables_ATeam.sql
UTF-8
2,058
3.859375
4
[]
no_license
CREATE DATABASE Kainos_A; use Kainos_A; CREATE TABLE `capability` ( `capabilityID` tinyint NOT NULL AUTO_INCREMENT, `capability` varchar(40) DEFAULT NULL, `capabilityLeadName` varchar(200) NOT NULL, `capabilityLeadPhoto` varchar(1000) NOT NULL, `capabilityLeadMessage` text NOT NULL, PRIMARY KEY (`capabili...
true
5bfdca603d9143f08deada6809882650fc3316b7
SQL
kondi171/Technikum-Informatyczne
/3Ti/Master.web/SQL/masterweb.sql
UTF-8
3,882
3.203125
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.6.5.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Czas generowania: 11 Cze 2017, 19:44 -- Wersja serwera: 10.1.21-MariaDB -- Wersja PHP: 5.6.30 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIE...
true
5ff3f6b1e769f31444cd25b3a02f941741c6b446
SQL
watermoonlx/sql-analyzer
/src/test/resources/ddl.sql
UTF-8
7,194
3.65625
4
[ "MIT" ]
permissive
CREATE TABLE `cart` ( `id` int(11) NOT NULL AUTO_INCREMENT, `user_id` int(11) NOT NULL, `product_id` int(11) DEFAULT NULL COMMENT '商品id', `quantity` int(11) DEFAULT NULL COMMENT '数量', `checked` int(11) DEFAULT NULL COMMENT '是否选择,1=已勾选,0=未勾选', `create_time` datetime DEFAUL...
true
6e50d830cffedafabe11d5c1924c53da0250fc05
SQL
fearlessxmm/mybook
/a_book.sql
UTF-8
7,015
3.1875
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : book Source Server Version : 50617 Source Host : localhost:3306 Source Database : a_book Target Server Type : MYSQL Target Server Version : 50617 File Encoding : 65001 Date: 2019-01-13 13:36:44 */ SET FOREIGN_KEY_CHECKS=0; -- -------...
true
69c6619f3a7aa477460e72dca47444ad6afff392
SQL
liuhuayun/springboot-lcn
/db/order.sql
UTF-8
1,340
3.1875
3
[]
no_license
/* Navicat Premium Data Transfer Source Server : localhost Source Server Type : MySQL Source Server Version : 50617 Source Host : localhost:3306 Source Schema : order Target Server Type : MySQL Target Server Version : 50617 File Encoding : 65001 Date: 13/04/2019 20:2...
true
853532d064c4a842830159ed0bfb5eb7b4c2ff00
SQL
raghavaravu/DatabaseBackup
/OCC_DEV/OCC_DEV/Tables/T_CUST_EVENT_DAY_TOPIC.sql
UTF-8
1,218
3.40625
3
[]
no_license
CREATE TABLE occ_dev.t_cust_event_day_topic ( "ID" NUMBER NOT NULL, event_day_id NUMBER, duration NUMBER, room NUMBER, event_type_activity_id NUMBER, topic VARCHAR2(4000 BYTE), sub_topic VARCHAR2(256 BYTE), optional_topic VARCHAR2(4000 BYTE), unique_id VARCHAR2(256 BYTE) NOT NULL, created_by VARCHAR...
true
72c78f7c7fa02feeb7c535149ef286f609de69dd
SQL
BDE-Polytech-MTP/1t-2020
/migrations/002.pk.sql
UTF-8
123
2.59375
3
[]
no_license
ALTER TABLE challenges ADD uuid VARCHAR(36) PRIMARY KEY; ALTER TABLE admins ADD CONSTRAINT admins_pk PRIMARY KEY (token);
true
5c73aacb12d73dbaeca3fc0d7557f24f178ff1a4
SQL
pls13/sigeeq_laravel5
/database/db_sigeeq.sql
UTF-8
11,151
3.328125
3
[ "MIT" ]
permissive
/* Navicat MySQL Data Transfer Source Server : local Source Server Version : 50709 Source Host : localhost:3306 Source Database : db_sigeeq Target Server Type : MYSQL Target Server Version : 50709 File Encoding : 65001 Date: 2016-03-17 21:02:39 */ SET FOREIGN_KEY_CHECKS=0; -- ---...
true
eea76351ba8d0e26931636f932767747e7270bc6
SQL
Rich0595/Proyecto
/sql/proyecto.sql
UTF-8
9,905
3.21875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 06-07-2018 a las 08:57:39 -- Versión del servidor: 10.1.13-MariaDB -- Versión de PHP: 5.6.21 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT...
true
e9b368434061f6f45d1d0c6d70b2e5032990cf2f
SQL
opengauss-mirror/openGauss-server
/src/test/regress/sql/dfs_orc_vec_expression.sql
UTF-8
54,208
2.875
3
[ "LicenseRef-scancode-mulanpsl-2.0-en", "LicenseRef-scancode-unknown-license-reference", "PostgreSQL", "BSD-3-Clause", "LGPL-2.0-or-later", "LicenseRef-scancode-unicode", "LicenseRef-scancode-warranty-disclaimer", "curl", "GPL-1.0-or-later", "LGPL-2.1-or-later", "LGPL-2.1-only", "CC-BY-4.0", ...
permissive
set enable_global_stats = true; /* * This file is used to test the function of vecexpression.cpp */ /******************************* Expression Type: T_Var, T_Const, T_Param, T_Aggref, T_WindowFunc, T_ArrayRef, T_FuncExpr, T_NamedArgExpr, T_OpExpr, T_DistinctExpr, T_NullIfExpr, T_ScalarArrayOpExpr, T_Boo...
true
8991dd83cb0fdae0886579e5b92d737aa1fb9276
SQL
qhit2017/GR1701_01
/④SQLServer数据库/IT011215/第三组/巨天赐/employee 文本.sql
UTF-8
390
2.8125
3
[]
no_license
create table tb_employee( id tinyint primary key, name nvarchar(32) not null, salary money default 300000, remark ntext, recommend bit) alter table tb_employee add age tinyint alter table tb_employee drop column age alter table tb_employee alter column salary money not null alter table tb_employee alter column recomme...
true
ddfec21a0f46ae348d97227e0e52035b37088fca
SQL
devdazed/dbt_shopify
/models/shopify__products.sql
UTF-8
1,736
4.28125
4
[ "Apache-2.0" ]
permissive
with products as ( select * from {{ var('shopify_product') }} ), order_lines as ( select * from {{ ref('shopify__order_lines') }} ), orders as ( select * from {{ ref('shopify__orders')}} ), order_lines_aggregated as ( select order_lines.product_id, order_lines.source...
true
5db551595d0ea49f9ba2f475d278ac4fc5e13be5
SQL
nsharova/final-project
/src/script.sql
UTF-8
1,102
3.40625
3
[]
no_license
CREATE TABLE IF NOT EXISTS electives.users ( id INT AUTO_INCREMENT PRIMARY KEY, login VARCHAR(50) NOT NULL UNIQUE , password VARCHAR(50) NOT NULL, firstName VARCHAR(100) NOT NULL, lastName VARCHAR(100) NOT NULL, ...
true
be0eab76d445f2d212e0baed1e16dd2721093d73
SQL
Healbadbad/NotSoSafeLanding
/client/dbfiles/CREATION/TRIGGERS/TerrainImpactTrig.sql
UTF-8
687
2.984375
3
[]
no_license
use NotSoSafeLanding Delimiter // DROP TRIGGER IF EXISTS TerrainImpactIns; Create trigger TerrainImpactIns AFTER INSERT ON Terrain FOR EACH ROW BEGIN Set @randPolitical = FLOOR(RAND() * (6 - 2 + 1)) + 2; Set @randInternational= FLOOR(RAND() * (10 - 5 + 1)) + 5; Set @randMonetary = FLOOR(RAND() * (5 - 2 + 1)...
true
ffeb39bcff82fbaf0b6a10d6d56d1ff545231b00
SQL
Lexkane/TravelService
/src/migrations/00008_add_restaurants_table.sql
UTF-8
1,989
3.3125
3
[]
no_license
-- +goose Up -- SQL in this section is executed when the migration is applied. CREATE TABLE restaurants ( id uuid DEFAULT uuid_generate_v1(), name VARCHAR(100) NOT NULL, location VARCHAR(100) NOT NULL, stars int, prices int, description TEXT, PRIMARY KEY (id) ); INSERT INTO restaurants (id, nam...
true
5f75b179af36f4b2638fb1cce4c19c0976a82162
SQL
aidanr67/wazimap-za
/sql/citizenship.sql
UTF-8
486,038
2.890625
3
[ "MIT" ]
permissive
-- -- 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; ALTER TABLE IF EXISTS ONLY public.citizenship DROP CONSTRA...
true
7992af5ec3b5fd27fe50a4cec63257ba104e33d8
SQL
PerroneAndrea/prova
/php_app/basket.sql
UTF-8
5,158
3.015625
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.8.3 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Creato il: Set 09, 2019 alle 16:02 -- Versione del server: 10.1.36-MariaDB -- Versione PHP: 7.2.10 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*...
true
1e5018bd9d87ddc89d5a9fef6b1100072e897701
SQL
ProfDema/uam
/pam/examples/anon_data/student58/q3.sql
UTF-8
293
3.265625
3
[]
no_license
truncate query3; INSERT INTO Query3( SELECT customer.cid AS cuid, customer.cname AS cuname, sum(orders.price * orders.quantity) AS totalsales FROM customer, orders WHERE customer.cid = orders.cid AND orders.status = 'S' GROUP BY cuid ORDER BY totalsales DESC); select * from query3;
true
9dcd32baf59d124b142b8bb82c6d90ccb98266b9
SQL
Ala-Indexing/ala-indexing
/db_draft_postgres.sql
UTF-8
10,823
3.125
3
[]
no_license
CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; CREATE TABLE Conference ( ConferenceCode INT NOT NULL, Name VARCHAR(30) NOT NULL, Subdivision VARCHAR(5) NOT NULL, PRIMARY KEY (ConferenceCode) ); CREATE TABLE Stadium ( StadiumCode INT NOT NULL, Name VARCHAR(100) NOT NULL, City VARCHAR(30) NOT NULL, State V...
true
fc384ef4b6edaf87e83076ed442003e949885943
SQL
tienphan1096/video-manager-back-end
/database/schemas/movieactors.sql
UTF-8
194
3.203125
3
[]
no_license
CREATE TABLE movieactors ( movieId INT, actorId INT, PRIMARY KEY(movieId, actorId), FOREIGN KEY (movieId) REFERENCES movies(id), FOREIGN KEY (actorId) REFERENCES actors(id) )
true
7c65b93fb66284ba4b15b2b34457cb6ed7c43c39
SQL
min-pro/SQL
/20200707.sql
UTF-8
8,056
3.921875
4
[]
no_license
시도, 시군구별, 햄버거 도시발전지수 ==> (kfc + 버거킹 + 맥도날드)/ 롯데리아 한행에 다음과 같이 컬럼이 구성되면 공식을 쉽게 적용할 수 있다 시도, 시군구, kfc개수, 버거킹 개수, 맥도날드 개수, 롯데리아 개수 주어진 것 : 점포 하나 하나의 주소 1. 시도, 시군구, 프렌차이즈 별로 GROUP BY * 4 1.1 시도, 시군구, kfc 개수 1.2 시도, 시군구, 버거킹 개수 1.3 시도, 시군구, 맥도날수 개수 1.4 시도, 시군구, 롯데리아 개수 1.1~1.4 4개의 데이터셋을 이용해서 컬럼 확장이 가능 ==> join 시도...
true
36ca286e4944ea47277edf765eff9e10afee1fd9
SQL
shwteams/centralize
/test/angular/tbl_customer.sql
UTF-8
3,183
2.90625
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.7.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Apr 24, 2018 at 01:02 PM -- Server version: 10.1.30-MariaDB -- PHP Version: 5.6.33 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OL...
true
81e3f2226e38d450f710966ce866486e8755ba30
SQL
pyroface/team-pineapple
/catchcoins.sql
UTF-8
2,495
3.34375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.7.4 -- https://www.phpmyadmin.net/ -- -- Värd: 127.0.0.1 -- Tid vid skapande: 23 feb 2018 kl 15:02 -- Serverversion: 10.1.30-MariaDB -- PHP-version: 7.2.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHA...
true
314354c92650db5b62be0396aba968f5e7d99fd4
SQL
microsoft/AzureSynapseScriptsAndAccelerators
/Assessment/Scripts/APS/UsersToScript_V2.sql
UTF-8
374
3.046875
3
[ "LicenseRef-scancode-generic-cla", "MIT" ]
permissive
select '1' as Active, db_name() as DatabaseName, '' SchemaName, '\' + db_name() + '\Users\' as OutputFolderPath, principals.name as FileName, principals.name as 'ObjectName', 'USER' as ObjectsToScript from sys.database_principals principals where is_fixed_role<>1 and principal_id<>0 and type_desc='SQL_USER' and nam...
true
73d47021c8b08cfa75d83147edec2ab7cc4a52cf
SQL
vikasjena/SQL
/paydb/Vw_School_Students.sql
UTF-8
181
3.171875
3
[]
no_license
select snsdb_new.education.school_id as school_id, count(distinct snsdb_new.education.profile_id) as students_count from snsdb_new.education GROUP BY snsdb_new.education.school_id
true
722e442258b63d43813df89520ea4cc6aa6c2170
SQL
bradybyrd/REPO
/postgres/rlm/INDEX/index_procedures_on_created_by.sql
UTF-8
181
2.515625
3
[]
no_license
-- Name: index_procedures_on_created_by; Type: INDEX; Schema: public; Owner: deploy -- CREATE INDEX index_procedures_on_created_by ON public.procedures USING btree (created_by); --
true
2ec4ce4b1d773ef23ea5dae9cf60b14a142521a4
SQL
IlyaRapoport/Bookshelf
/DB/bookshelf_books.sql
UTF-8
2,679
3.1875
3
[]
no_license
-- MySQL dump 10.13 Distrib 8.0.16, for Win64 (x86_64) -- -- Host: localhost Database: bookshelf -- ------------------------------------------------------ -- Server version 8.0.16 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /...
true
edbc5614161919d7af44689d041ada89d058be19
SQL
simonpane/Logger
/source/contexts/logger_context.sql
UTF-8
695
3.171875
3
[ "MIT" ]
permissive
declare -- the following line is also used in a constant declaration in logger.pkb l_ctx_name varchar2(35) := substr(sys_context('USERENV','CURRENT_SCHEMA'),1,23)||'_LOGCTX'; begin execute immediate 'create or replace context '||l_ctx_name||' using logger accessed globally'; merge into logger_prefs p using (selec...
true
78fd2cbf8f398d4b89b2646d8d735eed46e2546b
SQL
ryusei1031/p02-famisns
/p02famisns.sql
UTF-8
29,734
3.265625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 3.3.9 -- http://www.phpmyadmin.net -- -- ホスト: localhost -- 生成時間: 2016 年 7 月 20 日 07:08 -- サーバのバージョン: 5.5.8 -- PHP のバージョン: 5.3.5 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER...
true
f0e09e9905456e978d37b3e7fe80e55e0fd46fa2
SQL
VALE46GP/mini-apps-1
/challenge_3/database/schema_old.sql
UTF-8
828
3.25
3
[]
no_license
-- create database customer_data (drop if exists) DROP DATABASE IF EXISTS cutomer_data; CREATE DATABASE cutomer_data; USE cutomer_data; CREATE TABLE customer_info ( id INT AUTO_INCREMENT PRIMARY KEY, first_name VARCHAR(30) NOT NULL, last_name VARCHAR(30) NOT NULL, email VARCHAR(70) NOT NULL, pw VARCHAR(16) ...
true
dc7ddd245ddb76d867b7d354205ea2114b2a052f
SQL
scionaltera/agony-forge-core-old
/src/main/resources/db/migration/V0003__creature_schema.sql
UTF-8
636
3.1875
3
[ "MIT" ]
permissive
CREATE TABLE connection ( id BINARY(16) NOT NULL, session_username VARCHAR(36), session_id VARCHAR(36), http_session_id VARCHAR(36), remote_address VARCHAR(16), name VARCHAR(191), primary_state VARCHAR(191), secondary_state VARCHAR(191), PRIMARY KEY (id) ) ENGINE=InnoDB CHARACTER SET=utf8mb4, COLLATE=...
true
bc09cdf2f2808d3e406b1e8143ddad94491cbf9c
SQL
yitianyedegithub/DataV
/大屏-3-产品-有效订单数量.sql
UTF-8
593
2.65625
3
[]
no_license
-- 错峰 select count(*) as sNum from stagger_peak_parking_sale_rec where endTime>NOW() and (parkingCode = 'jd31011400037' or parkingCode = 'pd31011500586' or parkingCode = 'pt31010700210' or parkingCode = 'hk31010900121' or parkingCode = 'JH00490') -- 月卡 select count(*) as lNum from long_rent_sale where endTime>NOW...
true
edec16edf5c73a80be27567f015d33a394ac7527
SQL
ajanisse/ajanisse_HW1_VideoApp
/videoapp.sql
UTF-8
3,623
3.421875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.7.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1:3306 -- Generation Time: Mar 10, 2018 at 03:06 AM -- 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
f0964184c20da7de499f89bcf6c85175cf0cc66a
SQL
ilevmedis/alters
/alters/alters_2013/ALTER_2013_08_27_PBL_PARAMETERS.sql
UTF-8
244
2.6875
3
[]
no_license
alter table pbl_parameters add finitemdrugschargeid number(38); alter table pbl_parameters add constraint finitemdrugs_pbl_parms_fk foreign key(finitemdrugschargeid, companyid, fyearid) references fin_item(finitemid, companyid, fyearid);
true
f5f791cea6405d581369a053ad1332c366a4a300
SQL
ugwusomto/dream-team-php
/session5/Db.sql
UTF-8
781
3.28125
3
[]
no_license
DROP DATABASE `foodstore_db`; CREATE DATABASE `foodstore_db`; CREATE TABLE `foodstore_db`.`customers`( id int , username varchar(100), password varchar(150), email varchar(150) UNIQUE, created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY(id) ); CREATE TABLE `foodstore_db`.`admins`( id int not null...
true
c6a447f9da5b94ba79fa10e821a9757f2b06325a
SQL
Hemant6ht/ecommerce
/shopify.sql
UTF-8
43,150
2.90625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1:3306 -- Generation Time: Jun 25, 2020 at 11:41 AM -- Server version: 5.7.24 -- PHP Version: 7.2.14 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CH...
true
374d1480810f33385fc60317bce5bdb28c4e0790
SQL
EcePanos/Museum-Website
/museumnewscript.sql
UTF-8
1,878
3.484375
3
[]
no_license
-- ----------------------------------------------------- -- Table `mydb`.`department` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `mydb`.`department` ( `iddepartment` INT NOT NULL, `name` VARCHAR(45) NULL, PRIMARY KEY (`iddepartment`)) ENGINE = InnoDB; -- ---------------...
true
a32c557b3ab92747f2d48224260b0c80261767ed
SQL
icedeng/recipes
/doc/db2/sql/book_select.sql
UTF-8
770
3.015625
3
[]
no_license
select * from book_bfee_zqqr_zg where id <= 100; select * from book_cost_bfee_zg where id <=100; select distinct period from book_bfee_zqqr_zg ; select distinct period from book_cost_bfee_zg ; select max(id) from book_bfee_zqqr_zg ; select max(id) from book_cost_bfee_zg ; select * from sum_bfee_zqqr_zg; se...
true
04d6aed30c71e051cbf485fdda5d3e1a89d8bace
SQL
phacility/phabricator
/resources/sql/autopatches/20160928.tokentoken.sql
UTF-8
654
2.625
3
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
CREATE TABLE {$NAMESPACE}_token.token_token ( id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, phid VARBINARY(64) NOT NULL, name VARCHAR(64) NOT NULL COLLATE {$COLLATE_TEXT}, flavor VARCHAR(128) NOT NULL COLLATE {$COLLATE_TEXT}, status VARCHAR(32) NOT NULL COLLATE {$COLLATE_TEXT}, builtinKey VARCHAR(32)...
true
541515860fc61c9c4c1c2eae65cb359814373c16
SQL
apache/ctakes
/ctakes-ytex/scripts/data/mssql/umls/insert_view.sql
UTF-8
1,969
3.171875
3
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
-- -- Licensed to the Apache Software Foundation (ASF) under one -- or more contributor license agreements. See the NOTICE file -- distributed with this work for additional information -- regarding copyright ownership. The ASF licenses this file -- to you under the Apache License, Version 2.0 (the -- "License"); you ...
true
9abd12068558f3dc3181e9571398d1aa844435fd
SQL
MadisD/materjalide-plugin
/base.sql
UTF-8
417
3.828125
4
[]
no_license
create table category ( id int auto_increment primary key, parent_id int null, name varchar(150) null, content longtext null, type enum('node', 'leaf') not null, `order` tinyint(3) unsigned default '0' not null, constraint category_category_id_fk foreign key (parent_id) references category (id) on update ...
true
f3073cb66fdb0814e328e25aaf769c8f43bd687f
SQL
Sir-Baconn/Bar-Buddies
/sql/insert_sells.sql
UTF-8
1,759,754
2.9375
3
[]
no_license
CREATE TABLE IF NOT EXISTS sells( bar VARCHAR(73) NOT NULL ,beer VARCHAR(58) NOT NULL ,price NUMERIC(5,2) NOT NULL ,PRIMARY KEY(bar,beer), FOREIGN KEY (bar) REFERENCES bars (name), FOREIGN KEY (beer) REFERENCES beers (beer) ); INSERT INTO sells(bar,beer,price) VALUES ('barharhar','Budweiser',5.76); INSE...
true
0eb58f2ec053cab6ba6f5307218b47411a29d0f4
SQL
LrBrK33/qa-api
/etl/etl_questions.sql
UTF-8
371
2.765625
3
[]
no_license
\c q_a \COPY questions (id, product_id, question_body, epoch_date, asker_name, asker_email, reported, question_helpfulness) from '/Users/coryellerbroek/Desktop/HackReactor/sdc-questions-and-answers/datasets/sample_questions.csv' DELIMITER ',' CSV HEADER; UPDATE questions SET date = to_timestamp(floor(epoch_date / 100...
true
567be018bdf91d5d554cc6dca5c1afdc86ce04e2
SQL
attrung/Simple-Blog
/SQL files/3. createLikeTable.sql
UTF-8
238
2.625
3
[]
no_license
use `introflaskblogapp`; CREATE TABLE `tbl_likes` ( `like_id` int NOT NULL auto_increment, `blog_id` int DEFAULT NULL, `user_liked` int DEFAULT NULL, primary key (`like_id`) ) ENGINE = InnoDB AUTO_INCREMENT =3 DEFAULT CHARSET= latin1;
true
0d9b26cb1e0888417e03ba46b03df2333bda3cc9
SQL
albertomattos/SQL_gerais
/LOG.SQL
UTF-8
573
3.484375
3
[]
no_license
select modulo, funcao, apelido, sistema, data, complemento from falogcad t, fausucad u --select * from falogcad t, fausucad u where t.matricula = u.matricula --and sistema not in ('LAB','VIS', 'EST') --and sistema in ('EST') --and funcao = 'EXC' --and funcao not in ('AUD','TAA','IAX','QUD') --and modulo in ('FAPRD','ES...
true
efa607c9de2cad086eaeb26e562226a3f8b0f8d0
SQL
buyulian/myblog-java-ssm
/src/main/java/SQL/myblog.sql
UTF-8
1,742
3.171875
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : root Source Server Version : 50553 Source Host : localhost:3306 Source Database : myblog Target Server Type : MYSQL Target Server Version : 50553 File Encoding : 65001 Date: 2017-05-17 21:43:33 */ SET FOREIGN_KEY_CHECKS=0; -- -------...
true
94a49be98e29ecf7071d859f864afb62713e5722
SQL
Aleksiysh/stepic_trenager_SQL
/internet_store/2.4.06.sql
UTF-8
744
3.71875
4
[]
no_license
/* Посчитать, сколько раз была заказана каждая книга, для книги вывести ее автора (нужно посчитать, в каком количестве заказов фигурирует каждая книга). Результат отсортировать сначала по фамилиям авторов, а потом по названиям книг. Последний столбец назвать Количество. */ SELECT name_author, title, COUNT(b...
true
24c0c4df105f9c3ff667503996a92f5138ff659b
SQL
mdemaster/mdemaster_w205_repository
/exercise_1/transforming/transformations.sql
UTF-8
664
3.3125
3
[]
no_license
DROP TABLE Provider_Procedure_Scores; CREATE TABLE Provider_Procedure_Scores AS SELECT Provider_ID,Hospital_Name,State,Measure_ID,Measure_Name,Score FROM Hospital_Scores where substring(Score,1,1) not in ('H','L','M','N','V'); DROP TABLE State_Procedure_Scores; CREATE TABLE State_Procedure_Scores AS SELECT State, Meas...
true
cd9f9039b1dc19e199d77c856fb8d7f8a9cb4f7d
SQL
FahmiKadarmanto/prpl
/database.sql
UTF-8
930
2.5625
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
/*==============================================================*/ /* DBMS name: MySQL 5.0 */ /* Created on: 21/05/2019 09:55:22 */ /* Created by: Muhammad Alwan Andika */ /*==================================================...
true
bf2b207200e8cc2ebf812abf1557dce42f544259
SQL
hotheat/LeetCode
/184. Department Highest Salary/184.sql
UTF-8
279
3.796875
4
[]
no_license
select d.Name Department, e.Name Employee, t1.maxSalary Salary from Employee e, Department d, (select e1.DepartmentId, max(e1.Salary) maxSalary from Employee e1 group by e1.DepartmentId) as t1 where e.Salary=t1.maxSalary and e.DepartmentId=t1.DepartmentId and e.DepartmentId=D.Id
true
9e7820c412f48fda03c2e75761a087e13183bc7a
SQL
smgemelos/boomer
/caprica.sql
UTF-8
4,355
3.140625
3
[]
no_license
DROP TABLE IF EXISTS `topos`; DROP TABLE IF EXISTS `vnfs`; DROP TABLE IF EXISTS `cpes`; DROP TABLE IF EXISTS `users`; -- -- Table structure for table `user` -- CREATE TABLE `users` ( `id` int(64) NOT NULL AUTO_INCREMENT, `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', `updated_at` timestamp NOT N...
true
32d362b9745301128188c183a951894b431b826d
SQL
future4code/cruz-LAMA14
/Tables.sql
UTF-8
881
3.796875
4
[]
no_license
CREATE TABLE IF NOT EXISTS Bands ( id VARCHAR(255) PRIMARY KEY, name VARCHAR(255) UNIQUE NOT NULL, music_genre VARCHAR(255) NOT NULL, responsible VARCHAR(255) UNIQUE NOT NULL ); CREATE TABLE IF NOT EXISTS Shows ( id VARCHAR(255) PRIMARY KEY, week_day ENUM("FRIDAY","SATURDAY","SUNDAY"), start_time INT NO...
true
86093c0fbc2b5cbef73ea0de42e6d43517d1bd70
SQL
GoPlaceIn/siacc
/sql/publicacoes/p_002_9_OK.sql
ISO-8859-1
1,190
2.953125
3
[]
no_license
CREATE TABLE mescasoconfigs ( CodCaso int(11) NOT NULL COMMENT 'Cdigo do caso clnico', Secao varchar(20) COLLATE latin1_general_ci NOT NULL COMMENT 'Parte do caso clnico', Configuracao varchar(40) COLLATE latin1_general_ci NOT NULL COMMENT 'O que ser configurado', Valor varchar(100) COLLATE latin1_general_ci NOT NU...
true
fd583de89cb5ab20c2b325917dfcd7225e2790f5
SQL
MouseWeb/Banco-Dados
/Banco - Oracle/Oracle PL-SQL/25 - Triggers de DDL.sql
UTF-8
595
3.25
3
[]
no_license
CREATE TABLE log_ddl ( -- awner -> system DATA DATE, usuario VARCHAR(40), SCHEMA VARCHAR2(30), operacao VARCHAR2(100), objeto VARCHAR2(1000) ); -- criar a trigger DDL CREATE OR REPLACE TRIGGER tri_lo_ddl BEFORE DDL ON DATABASE DECLARE v_oper VARCHAR2(30); v_schema VARCHAR2(30); v_obj VARCHAR2(30); ...
true
2da2a75f3bf30adfa255cafcb6498b5d6eb30ff1
SQL
Heideo/Examination-System-With-Score-Mailing
/SetEnvironment/database.sql
UTF-8
825
3.09375
3
[ "MIT" ]
permissive
DROP DATABASE ExamManagement; CREATE DATABASE ExamManagement; USE ExamManagement; CREATE TABLE STUDENT( ID INT PRIMARY KEY NOT NULL AUTO_INCREMENT, FIRSTNAME VARCHAR(40) NOT NULL, LASTNAME VARCHAR(40) NOT NULL, EMAIL VARCHAR(40) NOT NULL, PASSWORD VARCHAR(40) NOT NULL ); CREATE TABLE ADMIN( USER...
true
702b59374e996f9536654871eb3b4b7e1345d076
SQL
bellmit/flexdb
/2.HOST/3.Procedure/cf9903.sql
UTF-8
1,677
3.3125
3
[]
no_license
CREATE OR REPLACE PROCEDURE cf9903 ( Pv_Refcursor In Out Pkg_Report.Ref_Cursor, Opt In Varchar2, Brid In Varchar2, Custodycd In Varchar2, Careby IN VARCHAR2 ) IS -- --danh sach khach hang dang ky chuyen tien truc tuyen -- --------- ------ -...
true
8f3304b09fb8418cf5ecbd7d64bb9fcc564456ea
SQL
haoranzeus/scmdb
/schema/test_schema/scmdb_test.sql
UTF-8
17,430
3.390625
3
[]
no_license
-- MySQL Script generated by MySQL Workbench -- Wed Dec 27 16:32:15 2017 -- Model: New Model Version: 1.0 -- 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='TR...
true
be6cac1aab153d09832fef05562d6ccb110bb2d8
SQL
mhp8338/sqlExercise
/ch27.sql
UTF-8
627
3.53125
4
[]
no_license
SHOW CHARACTER SET; SHOW COLLATION; SHOW VARIABLES LIKE 'character%'; SHOW VARIABLES LIKE 'collation%'; CREATE TABLE mytable ( column1 INT, column2 VARCHAR(10) ) DEFAULT CHARACTER SET hebrew COLLATE hebrew_general_ci; CREATE TABLE mytable( column1 INT, column2 VARCHAR(10), column3 VARCHAR(10) ...
true
0cf0ee59b6a6f3eb9d448c094cb89faac4efe6a0
SQL
charudatta10/docdb
/temp/dependencies.sql
UTF-8
186
2.765625
3
[]
no_license
select * from all_dependencies where owner = 'OWNER' and name = 'PACKAGE_NAME' and type = 'PACKAGE BODY' and referenced_owner = owner order by referenced_type , referenced_owner;
true
a4722f52873622fc137f222075a0239b12c7cb5a
SQL
Palmirafilipe/MySQL
/lista1/atividade1.sql
UTF-8
849
3.234375
3
[]
no_license
create database db_rh; use db_rh; create table tb_funcionarios( id bigint auto_increment, nome varchar(200), idade int, salario decimal, setor varchar(100), primary key(id) ); insert into tb_funcionarios(nome, idade, salario, setor) values("Palmira Filipe", 25, 1500, "TI"); insert into tb_funcionarios(nome, idade, sa...
true
05a032f75eaf2d828065bb92bca220587ed2d20d
SQL
DaliaChavez/hospital
/hospital.sql
UTF-8
13,949
2.90625
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.9.2 -- https://www.phpmyadmin.net/ -- -- Servidor: 127.0.0.1:3306 -- Tiempo de generación: 07-08-2021 a las 04:09:15 -- Versión del servidor: 10.4.10-MariaDB -- Versión de PHP: 7.3.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00...
true
f5414c2238efb43a4eaa6c4798f801a6c2451fc4
SQL
Goodbo/POC-HowToUseFrameworkParentBackend
/To_Zhihua.sql
UTF-8
2,779
3.09375
3
[ "MIT" ]
permissive
CREATE DATABASE MicroServiceDev; CREATE TABLE IF NOT EXISTS `MicroServiceDev`.`Training` ( `ID` int NOT NULL, `Training_Plan_ID` int NOT NULL, `Training_STATE_IND` INT NOT NULL DEFAULT 0 comment '0-planned 1-in-progress 2-cancelled 3-confirmed 4-train started 5-train finished 6-send feedback to trainee/comple...
true
5348015c11b9ec5b08ff30a9f7dabc5b96f5ac0d
SQL
Bassiljuly/Swap
/SQL/swap.sql
UTF-8
14,072
3.109375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: Jul 17, 2021 at 01:43 PM -- Server version: 8.0.15 -- PHP Version: 7.4.13 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACT...
true
7983e3433aff4154427e78d4ef3f960d758ee670
SQL
AimeeTan/ZPSGateway
/Zebra.DB.ZPS.Gateway/svc/Functions/Parcel_ClearanceForXpd.sql
UTF-8
568
2.921875
3
[]
no_license
--bd.he, Smile CREATE FUNCTION [svc].[Parcel$ClearanceForXpd](@idsInCsv nvarchar(max)) RETURNS TABLE WITH SCHEMABINDING--, ENCRYPTION AS RETURN ( select p.ID, t.MawbNbr, f.FlightNbr, f.POA, f.POD, f.ETA, f.ETD, p.Weight , p.RefNbrs, p.RefInfos, r.BrokerID from tvp.I64#Slice(@idsInCsv) x join shpt.SackMft#Base(...
true
c23c9364e61b15980a71770c668044e5df3b433d
SQL
ruanhq/Leetcode
/SQL/1193.sql
UTF-8
343
3.71875
4
[]
no_license
#Monthly Transactions I: SELECT substring(trans_date, 1, 7) AS month,country, COUNT(DISTINCT id) AS trans_count, SUM(CASE WHEN state = 'approved' THEN 1 ELSE 0 END) AS approved_count, SUM(amount) AS trans_total_amount, SUM(CASE WHEN state = 'approved' THEN amount ELSE 0 END) AS approved_total_amount FROM Transactions G...
true
b0b3677559efe6793bbaf1f354536f5c813d386a
SQL
serong/proje
/sql/eskiler/galeri-11-05-2015.sql
UTF-8
3,240
3.28125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.3.9 -- http://www.phpmyadmin.net -- -- Anamakine: localhost -- Üretim Zamanı: 11 May 2015, 12:10:17 -- Sunucu sürümü: 5.5.40-log -- PHP Sürümü: 5.3.28 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */...
true
d2222be4754eb6473f3c147301097f5ebcdc5006
SQL
goandget/goQuizBase
/install/assets/install.sql
UTF-8
6,765
3.234375
3
[ "Unlicense" ]
permissive
-- phpMyAdmin SQL Dump -- version 3.4.10.1deb1 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Jan 25, 2013 at 12:46 PM -- Server version: 5.5.29 -- PHP Version: 5.3.10-1ubuntu3.5 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER...
true
ebdfeb6b13a91ceee0a847111dbec32fc6b77077
SQL
srilakshmikr/SQL_code
/SQL_count_graduation.sql
UTF-8
2,698
2.78125
3
[]
no_license
describe stud_enrollments; select A.std_id,ac_yr, A.enr_st_dt, A.enr_end_dt, A.district_res,B.StudentID, B.SchoolName, B.ProjectedProficiencyLevel2, B.Grade from stud_enrollments as A inner join map_fall as B ON A.std_id = B.StudentID where B.Grade = '10' and B.ProjectedProficiencyLevel2 ='AYP Pass' and A.ac_yr ...
true
78066846331802a8654f3f4d85a6005c839533e8
SQL
qingbing/php-db-cache
/src/sql/cache.sql
UTF-8
675
3.203125
3
[ "MIT" ]
permissive
-- -------------------------------------------------------- -- 数据库缓存信息表 -- -------------------------------------------------------- CREATE TABLE IF NOT EXISTS `test_cache` ( `id` CHAR(32) NOT NULL COMMENT '缓存ID', `namespace` varchar(30) NOT NULL COMMENT '缓存区名', `data` text COMMENT '缓存内容', `expire_at` d...
true
9d52a5645c2be28c686396bcd6c387f71a554417
SQL
tema9984/Test
/taskSQL/sqltask.sql
UTF-8
123
3.59375
4
[]
no_license
SELECT Prod.name, Cat.name FROM Prod LEFT JOIN ProdCat ON ProdCat.ProdID= Prod.ID LEFT JOIN Cat ON ProdCat.CatID = Cat.ID
true
031d387ddc161c79563c19c75e28046ba2f87fda
SQL
emi90/DATA514
/Homework/hw3/hw3-q4.sql
UTF-8
660
3.015625
3
[]
no_license
WITH DirFlight AS (SELECT DISTINCT origin_city, dest_city FROM FLIGHTS WHERE origin_city = 'Seattle WA') SELECT DISTINCT F.dest_city FROM FLIGHTS AS F JOIN DirFlight AS DF ON F.origin_city = DF.dest_city WHERE F.dest_city NOT IN (SELECT dest_city FROM DirFlight) AND F.dest_city != DF.origin_city ORDER BY F....
true
ebedd5818c72b93483695852ce3610507408f00c
SQL
Sanchitraina1999/DBMSL
/8/file.sql
UTF-8
1,453
3.5625
4
[ "MIT" ]
permissive
CREATE DATABASE eight31155; USE eight31155; CREATE TABLE Student ( Rollno int NOT NULL, Name varchar(16) NOT NULL, DateofAdmission DATE NOT NULL, branch VARCHAR(16) NOT NULL, percent DOUBLE NOT NULL, Status varchar(16) NOT NULL, PRIMARY KEY (Rollno) ); CREATE TABLE Alumni ( Rollno in...
true
0aeaf80c48301d54d6f611cefee55ceb1b7931fa
SQL
fredyns/ppjk
/development/dbchangelog/201701252232_create-relationship.sql
UTF-8
2,252
3.203125
3
[ "BSD-3-Clause" ]
permissive
-- MySQL Workbench Synchronization -- Generated: 2017-01-25 22:32 -- Model: New Model -- Version: 1.0 -- Project: Name of the project -- Author: Fredy 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=...
true
5f366799f8ba0863330039f90bf1d69e5f8c142b
SQL
archeocs/qazp
/sql/postgis/ekspozycje.sql
UTF-8
1,289
3.125
3
[]
no_license
drop table ekspozycja_dane; CREATE TABLE EKSPOZYCJA_DANE( id integer not null, stanowisko integer not null, eksponowany varchar(1) check (eksponowany in ('T','N')), kraw_stoki varchar(1) check (kraw_stoki in ('T','N')), sfaldowania_cyple varchar(1) check (sfaldowania_cyple in ('T','N')), cyple_...
true
9db574b2a03355344f192027b265de4b646e33bf
SQL
Xiuzhen-Bairen/idleCultivate
/idleCultivate-doc/sql/create_table/monster.sql
UTF-8
1,483
3.171875
3
[]
no_license
CREATE TABLE `monster` ( `id` int(20) NOT NULL AUTO_INCREMENT COMMENT '怪物id', `map_id` varchar(20) NOT NULL DEFAULT '' COMMENT '地图id', `map_name` varchar(20) NOT NULL DEFAULT '' COMMENT '地图名称', `name` varchar(20) NOT NULL DEFAULT '' COMMENT '名字', `race` int(11) NOT NULL DEFAULT 0 COMMENT '种族', `job` i...
true
77b346c5a46034c2ccdf95ab4960650cf444d120
SQL
jacobadler-dutchie/dbt_hubspot_source
/models/stg_hubspot__deal_company.sql
UTF-8
644
2.796875
3
[ "Apache-2.0" ]
permissive
{{ config(enabled=fivetran_utils.enabled_vars(['hubspot_sales_enabled','hubspot_deal_enabled','hubspot_deal_company_enabled'])) }} with base as ( select * from {{ ref('stg_hubspot__deal_company_tmp') }} ), macro as ( select {{ fivetran_utils.fill_staging_columns( sou...
true
bb66865524a605479d2489a393d071beb3013564
SQL
dyxj/migrate-exp
/cmd/single/migrations/3_create_event.up.sql
UTF-8
551
3.171875
3
[]
no_license
CREATE TABLE IF NOT EXISTS `event` ( id BIGINT(20) NOT NULL AUTO_INCREMENT, admin_id BIGINT(20) NOT NULL, name VARCHAR(255), description TEXT, created_by VARCHAR(20) NOT NULL, created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, updated_by VARCHAR(20) NOT NULL, ...
true
83ff2dfca085b5cee5dfaa967b1d7582179ebee5
SQL
Kang-Dongseok/jspstudy
/workspace/InterfaceProject/WebContent/sql/person.sql
UTF-8
166
2.5625
3
[]
no_license
DROP TABLE PERSON; CREATE TABLE PERSON ( SNO VARCHAR2(6) PRIMARY KEY, NAME VARCHAR2(32), AGE NUMBER, BIRTHDAY VARCHAR2(10), REGDATE DATE ); select * from person;
true
7643231eaafaaf7e7c363ee5a31634b20d3c5da3
SQL
fabestine1/MyThing
/Fontys-Courses-master/EDB4/Set_1/1.3.sql
UTF-8
610
2.625
3
[]
no_license
DECLARE v_to_multiply NUMBER(4) := '&What_number'; x NUMBER(2) := 0; BEGIN DBMS_OUTPUT.PUT_LINE('With a basic loop:'); LOOP x := x + 1; DBMS_OUTPUT.PUT_LINE(x || ' * ' || v_to_multiply || ' = ' || x*v_to_multiply); IF x = 10 THEN exit; END IF; END LOOP; x := 0; DBMS_OUTPUT.PUT_LINE('With a while loop:'); WHILE x...
true
af83e5bde913437d54f3d60f577ea74b0fc7cdde
SQL
deraxcode/easy-ticket-back
/sql/easy-ticket_postgres_create.sql
UTF-8
5,145
3.359375
3
[]
no_license
CREATE TABLE "user_host" ( "user_host_id" serial NOT NULL, "user_status_id" integer NOT NULL, "first_name" VARCHAR(100) NOT NULL, "last_name" VARCHAR(100) NOT NULL, "email" VARCHAR(100) NOT NULL UNIQUE, "password" VARCHAR(100) NOT NULL, "google" BOOLEAN NOT NULL, "bank_account_id" integer NOT NULL, CONSTRAINT ...
true
6e5a0d2f42e6b7282e2bb07929f2190d054b6e23
SQL
lishanling/GGZY
/数据库设计/大数据-疑似违规点分析.sql
GB18030
13,412
3.34375
3
[]
no_license
/*==============================================================*/ /* DBMS name: ORACLE Version 11g */ /* Created on: 2020/7/28 20:19:27 */ /*==============================================================*/ drop table BD_INQUIRE_RECORD cascade constraints; ...
true
03b1724ed586a01c10171cc74e3a9d72d98d11ab
SQL
clearos/app-network-detail-report
/deploy/db_tables.sql
UTF-8
1,709
3.3125
3
[]
no_license
drop table if exists network_detail; create table network_detail ( id int(11) NOT NULL auto_increment, ip varbinary(16) default NULL, hostname VARCHAR(128) default NULL, username VARCHAR(64) default NULL, device_type VARCHAR(64) default NULL, device_vendor VARCHAR(64) default NULL, latitude...
true
7a9db66177daa889da3055a698046a550ed030b0
SQL
anandeka/my-project
/DBScripts/ObjectsScripts/MV_BI_PHY_CONT_JOURNAL_EOD.sql
UTF-8
1,769
2.84375
3
[]
no_license
DROP materialized view MV_BI_PHY_CONT_JOURNAL_EOD; DROP table MV_BI_PHY_CONT_JOURNAL_EOD; create materialized view MV_BI_PHY_CONT_JOURNAL_EOD refresh force on demand as select pcj.catogery, pcj.book_type, pcj.corporate_id, pcj.corporate_name, pcj.contract_ref_no, pcj.del_ite...
true
1b4d1042e25fb7194c07fe1c7d8c3d5c10057d6a
SQL
hefeleal/A-Conceptual-Model-for-Ethereum-Blockchain-Analytics
/database_model/create.sql
UTF-8
14,548
3.4375
3
[ "MIT" ]
permissive
CREATE USER IF NOT EXISTS 'ethuser'@'localhost' IDENTIFIED BY 'wEXaJV266kpCZm09EU8H'; CREATE DATABASE IF NOT EXISTS eth; CREATE TABLE IF NOT EXISTS eth.block ( blockNumber INTEGER PRIMARY KEY, hash CHAR(66) NOT NULL UNIQUE, timestamp DATETIME NOT NULL ); CREATE TABLE IF NOT EXISTS eth.contractTransaction ( ...
true
4ae5827c42869e7ae0dbb9f2dcd96c1685c1d35f
SQL
fivetran-soumyaranjan/dbt_jira
/models/intermediate/field_history/int_jira__daily_field_history.sql
UTF-8
1,953
3.90625
4
[ "Apache-2.0" ]
permissive
{{ config( materialized='incremental', partition_by = {'field': 'valid_starting_on', 'data_type': 'date'}, unique_key='issue_field_day_id' ) }} with combined_field_histories as ( select * from {{ ref('int_jira__combine_field_histories') }} {% if is_incremental() %} wh...
true
14bed42cb3fff1a1744181cdd0ef7ae1b3738acb
SQL
XingXing2019/MySql
/sql/Sql_92.sql
UTF-8
1,410
4.15625
4
[]
no_license
DESC employees; DESC departments; SELECT last_name, department_name FROM employees e JOIN departments d ON e.department_id = d.department_id; SELECT last_name, department_name FROM employees e, departments d WHERE e.department_id = d.department_id; SELECT d.department_id, d.department_name, l.city FROM departments...
true
fd7374a0ed6889a8d3a2e00009b5e8c558ba6f48
SQL
myrp-alexandre/FarmApp.DB
/2.Tables/2_14_db_farmapp_conta_mensagem_sistema.sql
UTF-8
947
3.53125
4
[]
no_license
-- ----------------------------------------------------- -- Schema db_farmapp -- ----------------------------------------------------- USE `db_farmapp` ; -- ----------------------------------------------------- -- Table `db_farmapp`.`conta_mensagem_sistema` -- ----------------------------------------------------- CREA...
true
b983ea3198d9a538a5db73e65dcbe3dc6b732ab1
SQL
xbackupx/peqXdb
/Dev_Updates/Rev198.sql
UTF-8
1,310
3.078125
3
[]
no_license
ALTER TABLE `character_` ADD `lfp` TINYINT( 1 ) UNSIGNED NOT NULL DEFAULT '0'; ALTER TABLE `character_` ADD `lfg` TINYINT( 1 ) UNSIGNED NOT NULL DEFAULT '0'; INSERT INTO `commands` VALUES ('melody', '0', 'A supplement for /melody until the OP code is found.'); Insert into rule_values values (1, 'World:AccountSessionL...
true
503a3635514c0ee19b4a956befed1412201663fe
SQL
DawidBochenek/ProjektZaliczeniowy11263
/SalonSamochodowy/SalonSamochodowy/Produkt/Tables/Zamownienie.sql
UTF-8
872
2.765625
3
[]
no_license
CREATE TABLE [Produkt].[Zamownienie] ( [ZamownienieId] INT NOT NULL, [ZamownienieKey] INT IDENTITY (1, 1) NOT NULL, [KlientId] INT NOT NULL, [PracownikId] INT NOT NULL, [CenaSprzedazy] MONEY NULL, [DataZlozenia] DATE NULL, [DataOdbioru] DATE NULL, ...
true
4fc4ee6d79fde3f6a355fb41b173021eb8331f1f
SQL
gamaamaral98/FEUP-LTW
/database/create.sql
UTF-8
1,158
3.46875
3
[]
no_license
drop table if exists Person; drop table if exists Account; drop table if exists Post; drop table if exists Comment; drop table if exists SubComment; create table Person( personID integer primary key, personName text(20) not null, personAge integer not null ); create table Account( account...
true
844befefbbe914e7b466235c7fd6398293df146b
SQL
CS3141Wads/code
/update_team_stats.sql
UTF-8
1,384
3.890625
4
[ "BSD-3-Clause" ]
permissive
CREATE DEFINER=`aeciesla`@`%.mtu.edu` PROCEDURE `update_team_stats`() BEGIN -- declares a done variable for when the loop ends -- declare done int default 0; -- declares variables to hold the team names and winners - declare t1 varchar(25); declare t2 varchar(25); declare win varchar(25); -- de...
true
ab759c090563e41d68a299c3469fb6fae5721010
SQL
kleg26315/TIL
/CODE/SQL/1_SCOTT/scott_practice.sql
UHC
2,909
4.28125
4
[]
no_license
SELECT * FROM EMP; --1. EMP̺ COMM NULL ƴ ȸ SELECT * FROM EMP WHERE COMM IS NOT NULL; --2. EMP̺ Ŀ̼ ϴ ȸ SELECT * FROM EMP WHERE COMM IS NULL OR COMM = 0; --3. EMP̺ ڰ ȸ SELECT * FROM EMP WHERE MGR IS NULL; --4. EMP̺ ޿ ޴ ȸ SELECT * FROM EMP ORDER BY SAL DESC; --5. EMP̺ ޿ Ŀ̼ ȸ SELE...
true
0dff6db3cb9f9cce65094650f05ce902fc29e3c0
SQL
nsachi822/favorite-api
/src/main/resources/db/migration/V1__create_table.sql
UTF-8
391
2.859375
3
[]
no_license
create table common( id bigint unsigned not null auto_increment, contentname varchar(64) not null, type varchar(10) not null, primary key(id)) engine=InnoDB default charset=utf8; create table book( id bigint unsigned not null auto_increment, booktitle text not null, author text not null, about text, date date, image t...
true
bec78ca7805b6844eac5573620d5c7a625135530
SQL
ksr19/Databases
/L6/les6_0210.sql
UTF-8
4,418
4.34375
4
[]
no_license
use snet1509; -- 1. По запросам с вебинара вопросов нет, все понятно. Предложений по улучшению/корректировкам нет. -- 2. Пусть задан некоторый пользователь. Из всех друзей этого пользователя найдите человека, который больше всех общался с нашим пользователем. SELECT -- Выводим полную информацию по найденному пользов...
true
592e1a050766eefdcdf5e88d3fef6ed3eb5bd1a8
SQL
b-cube/metadata-pg-pipeline
/local/pg_schema.sql
UTF-8
8,556
3.046875
3
[ "MIT" ]
permissive
-- -- 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; -- -- Name: plpgsql; Type: EXTENSION; Schema: -; Owner: -- CREATE EXTENSION IF NOT EXISTS plpgs...
true
884577b9166d4751f8461493b304e46f2cc2c732
SQL
caasjj/databases
/SQL/schema.sql
UTF-8
980
3.265625
3
[]
no_license
-- --- -- Globals -- --- -- SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; -- SET FOREIGN_KEY_CHECKS=0; -- --- -- Table 'messages' -- -- --- USE chat; DROP TABLE IF EXISTS `messages`; CREATE TABLE `messages` ( `id` TINYINT NULL AUTO_INCREMENT DEFAULT NULL, `message` TINYINT NULL DEFAULT NULL, PRIMARY KEY (`id`) )...
true
6b5edb40767ab94a85fa3163b01d1a3c2c3641fd
SQL
Jentar/School
/Andmebaasid/yl21_6.sql
UTF-8
207
3.625
4
[]
no_license
SELECT COUNT(book_id) AS "Tellimuste arv", ROUND(SUM(price), 2) AS "Summa" FROM yl21_Orders LEFT JOIN yl21_Books ON yl21_Books.id=yl21_Orders.book_id WHERE YEAR(order_date)=2017 ORDER BY order_date ASC;
true
55fd3e0ebc46aafc3abf2f08334b3194a7ad60ac
SQL
viviancan/Database_Exercises
/update_exercises.sql
UTF-8
725
3.1875
3
[]
no_license
USE codeup_test_db; -- SELECT record_name as "All records" FROM albums; -- SELECT record_name as "Records released before 1980" FROM albums WHERE release_date < 1980; -- SELECT record_name as 'Albums released by Michael Jackson' FROM albums WHERE artist_name = 'Michael Jackson'; SELECT * FROM albums; UPDATE ...
true
83fd25f88d1e0c98f7835e9a4f3ceb7239b21e7f
SQL
hollax/csa
/application/sch.sql
UTF-8
27,690
3.21875
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.1.14 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Jan 25, 2017 at 06:50 PM -- Server version: 5.0.27-community-nt -- 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_S...
true
9877cf1c2086f49ace4b8f7f25f01f483f5e1001
SQL
ACEinfinity7/stable_marriage
/stable_marriage_setup.sql
UTF-8
1,128
3.78125
4
[]
no_license
DROP TABLE IF EXISTS proposers_pref; CREATE TABLE proposers_pref( id INTEGER NOT NULL UNIQUE PRIMARY KEY, proposer_id INTEGER, accepter_id INTEGER, preference INTEGER, FOREIGN KEY (proposer_id) REFERENCES proposer_info(proposer_id), FOREIGN KEY (accepter_id) REFERENCES accepter_info(accepter_id) ); DROP TABLE ...
true