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
2aabbe9630485c22154a83d034a190db70011238
SQL
matsumana/isucon5-qualifier-app
/sql/nakashin_edit.sql
UTF-8
134
2.75
3
[]
no_license
ALTER TABLE users ADD `salt` varchar(6) DEFAULT NULL; UPDATE users, salts SET users.salt = salts.salt WHERE users.id = salts.user_id;
true
b892333b0bf28376cbe0f38af2c1334fc0aa099c
SQL
rusheelkurapati30/SQLite
/rusheel.sql
UTF-8
12,264
3.78125
4
[]
no_license
CREATE TABLE `Bill_Detail` ( `Bill_Number` varchar(10) NOT NULL, `Item_ID` varchar(10) NOT NULL, `Sold_Quantity` int(11) DEFAULT NULL, PRIMARY KEY (`Bill_Number`,`Item_ID`) ) LOCK TABLES `Bill_Detail` WRITE; /*!40000 ALTER TABLE `Bill_Detail` DISABLE KEYS */; INSERT INTO `Bill_Detail` VALUES ('BN1201','HL01'...
true
5c8b3845e9962fdf9ab40796723790d95bc0ef5e
SQL
RojdaTunc/SinemaOtomasyonum
/SinemaOtomasyonum/sinemaotomasyonu_film_bilgileri.sql
UTF-8
2,768
3.015625
3
[]
no_license
-- MySQL dump 10.13 Distrib 8.0.20, for Win64 (x86_64) -- -- Host: 127.0.0.1 Database: sinemaotomasyonu -- ------------------------------------------------------ -- Server version 8.0.20 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET...
true
81bd4484010a14b67df37f461ff5f9a72f012eef
SQL
NDCFL/MyProject
/SSMStudy/document/mysqlstudy.sql
UTF-8
5,323
3.03125
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : mysql连接 Source Server Version : 50717 Source Host : 127.0.0.1:3306 Source Database : mysqlstudy Target Server Type : MYSQL Target Server Version : 50717 File Encoding : 65001 Date: 2017-10-07 09:24:40 */ use mysqlstudy; SET FOREIGN_KEY...
true
6589b78d2a055fda914818de1e3cbbf80ef8a24a
SQL
HTTPArchive/almanac.httparchive.org
/sql/2021/media/video_adoption.sql
UTF-8
339
3.03125
3
[ "Apache-2.0" ]
permissive
SELECT client, COUNTIF(num_video_nodes > 0) AS pages, COUNT(0) AS total, COUNTIF(num_video_nodes > 0) / COUNT(0) AS pct FROM ( SELECT _TABLE_SUFFIX AS client, CAST(JSON_VALUE(JSON_VALUE(payload, '$._media'), '$.num_video_nodes') AS INT64) AS num_video_nodes FROM `httparchive.pages.2021_07_01_*`)...
true
418d7a8f9b8568ef62e93f804f71628f969f3628
SQL
cnwans2/REC-reate
/databse/parks_db.sql
UTF-8
425
2.90625
3
[]
no_license
DROP DATABASE IF EXISTS parks_db; CREATE database parks_db; USE parks_db; CREATE TABLE parks ( id INT AUTO_INCREMENT NOT NULL, num INT NULL, facility_name VARCHAR(100) NULL, facility_type VARCHAR(100) NULL, facility_inout VARCHAR(100) NULL, x_coord FLOAT (20) NULL, y_coord FLOAT (20) NULL,...
true
cdf375ea32418ff713d62509504903d4d5897376
SQL
sgchris/models_dates_manager
/api/db/create_db.sql
UTF-8
524
3.5625
4
[ "MIT" ]
permissive
CREATE TABLE "models" ( id integer primary key autoincrement, name text, category text, tags, notes text, private_notes, images text, hash text, display_order number ); CREATE TABLE models_categories (id integer primary key autoincrement, name text); CREATE TABLE "dates_models_categories" ( date_id integer,...
true
64a97c05cf84d6d6141f9de7ce39cf8ecd505f16
SQL
Xhakayoub/IndexationTool
/tiw.sql
UTF-8
1,815
2.96875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.3 -- https://www.phpmyadmin.net/ -- -- Hôte : 127.0.0.1:3306 -- Généré le : ven. 18 jan. 2019 à 15:39 -- Version du serveur : 5.7.23 -- Version de PHP : 7.2.10 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SE...
true
c7cf272a484a947e222d6099564aea1e15a064d6
SQL
DaeguIT-MinSuKim/jdbc_pool_study
/Scripts/init.sql
UTF-8
1,953
3.765625
4
[]
no_license
-- jdbc_pool_study DROP SCHEMA IF EXISTS jdbc_pool_study; -- jdbc_pool_study CREATE SCHEMA jdbc_pool_study; -- department CREATE TABLE jdbc_pool_study.department ( deptno INT(11) NOT NULL COMMENT '부서번호', -- 부서번호 deptname CHAR(10) NOT NULL COMMENT '부서명', -- 부서명 floor INT(11) NULL DEFAULT 0 COMM...
true
b40f9cc4519cc4cc1af6815f8e341aaa26ade78c
SQL
stefism/Projects
/05 C# Entity Framework Core June 2020/03 ADO.NET/Exercises/02.sql
UTF-8
339
3.734375
4
[]
no_license
-- 02 Villain Names SELECT v.[Name], COUNT(m.[Name]) AS MCount FROM Villains AS v JOIN MinionsVillains AS mv ON mv.VillainId = v.Id JOIN Minions AS m ON mv.MinionId = m.Id GROUP BY v.[Name] ORDER BY MCount DESC SELECT * FROM Villains AS v LEFT JOIN MinionsVillains AS mv ON mv.VillainId = v.Id LEFT JOIN Minions AS m ON...
true
92b2706723e6afd6431fb4ee3245ee23e4d81400
SQL
bellmit/dbSmellsData
/data/open-source/extracted_sql/buildbot_buildbot.sql
UTF-8
1,100
3.34375
3
[ "MIT" ]
permissive
CREATE TABLE IF NOT EXISTS test_run( id INT PRIMARY KEY AUTO_INCREMENT, branch VARCHAR(100), revision VARCHAR(32) NOT NULL, platform VARCHAR(100) NOT NULL, dt TIMESTAMP NOT NULL, bbnum INT NOT NULL, typ VARCHAR(32) NOT NULL, info VARCHAR(255), KEY (branch, revision), KEY (dt), KEY (platform, bbnum)) SELECT description ...
true
8cf92e97ee09aeeec2868fcc38381d0bbc182fd4
SQL
tinydalek/manlypenguinwardens
/manlyPenguin.sql
UTF-8
1,042
3.296875
3
[]
no_license
CREATE DATABASE manlypenguin; Use manlypenguin; -- from SQL tab, copy following and GO! CREATE TABLE donation ( id INT NOT NULL PRIMARY KEY AUTO_INCREMENT, donation_name VARCHAR (100), donation_address VARCHAR (255), donation_city VARCHAR (50), donation_state CHAR(3), donation_email VARCHAR(100), donation_tel VARCH...
true
97d82e3afcf3fb365ae07f33f221a9be114b2b55
SQL
davidparker83686/spring21-burgershack
/setup.sql
UTF-8
1,233
3.40625
3
[]
no_license
-- CREATE TABLE accounts( -- id VARCHAR(255) NOT NULL, -- name VARCHAR(255) NOT NULL, -- email VARCHAR(255) NOT NULL, -- picture VARCHAR(255) NOT NULL, -- PRIMARY KEY (id) -- -- ); -- CREATE TABLE burgers( -- id INT NOT NULL AUTO_INCREMENT, -- name VARCHAR(255) NOT NULL, -- cost INT NOT NULL, -- quant...
true
d003e71dde89b0e7e1a097cd9818fd9364822056
SQL
azwarkoto/informasitataruang
/DATABASE/itr_tataruang.sql
UTF-8
9,799
2.90625
3
[ "LicenseRef-scancode-unknown-license-reference", "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3306 -- Generation Time: Nov 01, 2019 at 03:09 PM -- Server version: 5.7.24 -- PHP Version: 7.2.19 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CH...
true
a60e4304a6557b2d02d0f543c46ea7a2841ea83c
SQL
jcketterer/SQL-Master-Class
/Queries/Self Join.sql
UTF-8
1,397
4.3125
4
[]
no_license
--Self Joins --Phase 1, same products supplied by different suppliers, just revealing keys SELECT DISTINCT ps1.ProductKey, ps1.SupplierKey FROM ProductSupplier ps1 INNER JOIN ProductSupplier ps2 ON ps1.ProductKey = ps2.ProductKey AND ps1.SupplierKey != ps2.SupplierKey -- Phase 2, same products supplied by diffe...
true
ecf7a3ed1a3b88be4a736e97cc6b25903e063c56
SQL
RyanTech/yueji
/tools/db/outsource/kangbo/table/change.sql
UTF-8
843
3.171875
3
[]
no_license
--王天良:2012-9-18,应简简单单要求,将优惠券过期时间延长为10.15号 update coupon set gmt_end = to_date('2012-10-15 23:59:59','YYYY-MM-DD HH24:MI:SS'); update coupon_order_rel set gmt_end = to_date('2012-10-15 23:59:59','YYYY-MM-DD HH24:MI:SS') where status <> 'used'; --查询未送优惠券的用户 select id from member where gmt_create > to_date('2012-9-13','y...
true
d4059c04420c394f3bcd2ed0de214b5ee6bc20ee
SQL
robbierayas/spring-tutorial-50
/schema_and_data.sql
UTF-8
397
2.59375
3
[]
no_license
DROP TABLE `offers`; CREATE TABLE IF NOT EXISTS `springtutorial`.`offers` ( `id` INT NOT NULL AUTO_INCREMENT, `text` TEXT NOT NULL, `name` VARCHAR(60) NOT NULL, `email` VARCHAR(60) NOT NULL, PRIMARY KEY (`id`)) ENGINE = InnoDB; INSERT INTO `offers` VALUES (1,'Bob','bob@nowhereatall.com','I will write Java...
true
e4ffaabce05091302531b94b9f49cb97d3674066
SQL
cloudtestsoftware/biderp
/src/com/biderp/sql/oracle/Project/Insert_Project.sql
UTF-8
6,974
3.09375
3
[]
no_license
CREATE OR REPLACE PROCEDURE Insert_Project(pnObjid NUMBER) IS --Constants for status STATUS_OPEN varchar2(20):='1'; STATUS_ACCEPTED varchar2(20):='2'; --Please Modify the cursor as you need CURSOR m_JobMaster_cur IS Select Name, ProjectCode, MainCode, Description, StartDate, EndDate, moduser from ...
true
e3125522cbf67d076629496ac7d7427ea6613a62
SQL
dkbrookie/veeam
/Automate SQL Queries/DKBA - Veeam - VM Not In B&R Backup Job.sql
UTF-8
889
3.609375
4
[]
no_license
SELECT hv.VMName AS TestValue, CONCAT('VM Host: ',c.Name) AS IdentityField, hv.HostComputerID AS ComputerID, acd.NoAlerts, acd.UpTimeStart, acd.UpTimeEnd FROM plugin_vm_hvvirtualmachines hv JOIN AgentComputerData acd ON acd.ComputerID = hv.HostComputerID JOIN computers c ON hv.HostComputerID = c.ComputerID W...
true
0b7caaafab1bbcc69eaff188f10107ee958667d2
SQL
kuc-arc-f/nextjs_3_8promise_mysql
/db/create/task.sql
UTF-8
1,304
3.171875
3
[]
no_license
CREATE TABLE `Task` ( `id` INTEGER NOT NULL AUTO_INCREMENT, `createdAt` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3), `updatedAt` DATETIME(3), `title` VARCHAR(191) NOT NULL, `content` text, `authorId` INTEGER, PRIMARY KEY (`id`) ) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_...
true
cde2e9b15b8c22e3b902f3dc6e3304ffd1aa0ec0
SQL
pl3nny/sql_pl3nny
/section_5/more_practice_with_subqueries.sql
UTF-8
788
4.40625
4
[]
no_license
-- Write a query where you only see unique data, but also show ID CREATE table dupes (id integer, name varchar(10)); INSERT INTO dupes VALUES(1, 'FRANK'); INSERT INTO dupes VALUES(2, 'FRANK'); INSERT INTO dupes VALUES(3, 'ROBERT'); INSERT INTO dupes VALUES(4, 'ROBERT'); INSERT INTO dupes VALUES(5, 'SAM'); INSERT INTO...
true
ca69981b5cc073c2c24b96335dd0a121ecef4b9e
SQL
markdeadline/Privilege-System
/src/privilegesystem.sql
UTF-8
4,249
3.453125
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : localhost_3306 Source Server Version : 50713 Source Host : localhost:3306 Source Database : privilegesystem Target Server Type : MYSQL Target Server Version : 50713 File Encoding : 65001 Date: 2016-08-08 14:31:00 */ SET FOREIGN_KEY_CH...
true
b1c8a6b51653991cb3c8b74ce3ee1038ac35f8cb
SQL
ivan570/code
/sql/Attendance.sql
UTF-8
499
3.203125
3
[]
no_license
CREATE TABLE Demo_attendance ( Attendance_Id BIGINT NOT NULL PRIMARY KEY IDENTITY, Student_Id BIGINT NULL, Teacher_Subject_Id INT NULL, isPresent BIT NULL, LectureDate Date null, StartTime TIME NULL, EndTime TIME NUll, CONSTRAINT FK_Demo_attendance_ToTable_Teacher_Subject FOREIGN KEY (T...
true
54189c8e66e906b1102bd283e1354089713def29
SQL
heiferDevs/infoManglarApi
/db/Tables.sql
UTF-8
34,260
3.609375
4
[]
no_license
CREATE SCHEMA info_manglar AUTHORIZATION postgres; CREATE TABLE info_manglar.organizations_manglar ( organization_manglar_id integer NOT NULL, organization_manglar_status boolean, organization_manglar_name character varying(255), organization_manglar_complete_name character varying(255), orga...
true
8e81b523afe86f54edda33f35b942e7fdbfdf77f
SQL
hiralalgupta/databasescript
/dba-master/monitoring/db_links.sql
UTF-8
675
2.96875
3
[]
no_license
-- ----------------------------------------------------------------------------------- -- File Name : https://oracle-base.com/dba/monitoring/db_links.sql -- Author : Tim Hall -- Description : Displays information on all database links. -- Requirements : Access to the DBA views. -- Call Syntax : @db_link...
true
abb8bd221d21d692f237d8e7ac42de132194b204
SQL
1993hzh/blogV2
/conf/evolutions/blog/5.sql
UTF-8
578
3.75
4
[]
no_license
# --- !Ups CREATE TABLE T_COMMENT ( id SERIAL NOT NULL PRIMARY KEY, content VARCHAR(255), from_id INTEGER NOT NULL, from_name VARCHAR(255) NOT NULL, status VARCHAR(255) NOT NULL DEFAULT 'UNREAD', to_id INTEGER, to_name VARCHAR(255), createTime TIMESTAMP DEFAULT curre...
true
50ea212efa7656057d42602cdd9cee7d5d1b2a50
SQL
alfaben12/ExpressJs-CRUD-Knex
/db.sql
UTF-8
1,997
3.234375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.4 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: Mar 09, 2019 at 02:26 AM -- Server version: 10.1.37-MariaDB -- PHP Version: 5.6.40 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OL...
true
1f9b0c93ffffb625a3627e412fdbd8882c400018
SQL
Noobenheim/techelevator_assignments
/module-2/02_Aggregate_Functions_and_GROUP_BY/student-lecture/postgres/lecture.sql
UTF-8
5,440
4.5625
5
[]
no_license
-- ORDERING RESULTS -- Populations of all countries in descending order SELECT "population" FROM "country" ORDER BY "population" DESC; --Names of countries and continents in ascending order SELECT "name", "continent" FROM "country" ORDER BY "name" ASC, "continent" ASC; -- LIMITING RESULTS -- The name and average lif...
true
780c4c1344625250a4af83a08d7ed1ce45da068b
SQL
evrimulgen/Oracle-DBA-Life
/INFO/Books Codes/Oracle Database 10g PLSQL/Code/Chapter3/Loop.sql
UTF-8
931
3.171875
3
[ "MIT" ]
permissive
/* * Loop.sql * Chapter 3, Oracle10g PL/SQL Programming * by Ron Hardman, Mike McLaughlin, Scott Urman * * This script demonstrates LOOPs */ PROMPT PROMPT ** Simple Loop PROMPT SET SERVEROUTPUT ON DECLARE v_count PLS_INTEGER := 1; BEGIN LOOP DBMS_OUTPUT.PUT_LINE('Ah -- Much better'); v_count ...
true
f59210c2fa516d4556d1e916d224d6b91c44a9b6
SQL
sean-blessing/sql-instruction-bc-201908
/employees_db/dept_w_most_emps.sql
UTF-8
210
3.640625
4
[]
no_license
select * from dept_emp; select d.dept_no, dept_name, count(*) total from dept_emp de join departments d on de.dept_no = d.dept_no where to_date = '9999-01-01' group by dept_no order by total desc;
true
6651cabea0b032be2fe56ca942804e3fb48f303a
SQL
18918090402/MZJF_Work
/MZJF_Work/0002 Git.nonobank.com/archive_20180806/bi-etl.git/04_项目/data-quality-app/src/main/resources/SQL/DQ_RULE_SCRIPT.sql
UTF-8
352
2.53125
3
[]
no_license
CREATE TABLE `DQ_RULE_SCRIPT` ( `ID` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键', `SCRIPT_TEXT` text COMMENT '可以直接执行的SQL内容(SELECT列名和COLUMN_NAME相同)', `IS_VALID` int(1) NOT NULL DEFAULT '1' COMMENT '1:有效,0:无效', PRIMARY KEY (`ID`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='自定义脚步SQL';
true
06139cc2d7cc3db160dfd74923f1f03f85c97109
SQL
Saikiran2306/DBMSAssignments
/Coursera/WEEK-3/Module05Assignment-1.sql
UTF-8
3,297
4.5
4
[]
no_license
-- 1. For event requests, list the event number, event date (eventrequest.dateheld), and -- count of the event plansInterns. Only include event requests in the result if the event -- request has more than one related event plan with a work date in December 2018. SELECT er.EvntNo, er.DateHeld, COUNT(*) AS EvntP...
true
fc3ffff4d51be0152a3ee1b56d6208e3fb2c7607
SQL
bkiers/sqlite-parser
/src/test/resources/triggerC.test_2.sql
UTF-8
1,804
2.609375
3
[ "MIT" ]
permissive
-- triggerC.test -- -- execsql { -- CREATE TABLE t1(a, b, c); -- CREATE TABLE log(t, a1, b1, c1, a2, b2, c2); -- CREATE TRIGGER trig1 BEFORE INSERT ON t1 BEGIN -- INSERT INTO log VALUES('before', NULL, NULL, NULL, new.a, new.b, new.c); -- END; -- CREATE TRIGGER trig2 AFTER INSERT ON t1 BEGIN ...
true
18c580e76a14067a697235f5c03a97e4a8e7cfa8
SQL
MarkChege/micandroid
/mmbook/MyDoc/sql/tg_cms_templet.sql
UTF-8
3,894
3.046875
3
[]
no_license
/* MySQL Data Transfer Source Host: localhost Source Database: mmbook Target Host: localhost Target Database: mmbook Date: 2010-9-13 14:52:49 */ SET FOREIGN_KEY_CHECKS=0; -- ---------------------------- -- Table structure for tg_cms_templet -- ---------------------------- CREATE TABLE `tg_cms_templet` ( ...
true
95d983319a73e31abfc1ebefbf00dba60f40592a
SQL
uconbeton/dinas
/ikm.sql
UTF-8
53,336
2.96875
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.8.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Waktu pembuatan: 17 Jun 2019 pada 11.15 -- Versi server: 10.1.34-MariaDB -- Versi PHP: 7.2.8 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARA...
true
77f201a135fd0a5d069476cc71598b6d9eda0020
SQL
MLClark/Bookmarks
/Vendor specific/Metlife/BA3/ba3-research.sql
UTF-8
472
2.796875
3
[]
no_license
select * from benefit_plan_desc where benefitsubclass in ('2SA','2SL','2EA','2EL'); select * from person_names where personid = '87035'; select * from pspay_etv_list where etv_id in ('VEO', 'VAB', 'VA9', 'VA4', 'VER', 'VES', 'V9A', 'VA3','VAK','VAI','VAJ','VAE') ; select * from pay_schedule_period where date_part('year...
true
5e6739fe56f44e552977d164940fd4f705799443
SQL
randyL78/learning_journal_php
/inc/testQueries.sql
UTF-8
1,537
4.65625
5
[]
no_license
-- SQLite -- Select all information from all entries SELECT * FROM entries; -- Select title, id, and date from all entries sorted by date SELECT id, title, date FROM entries ORDER BY date DESC; -- Update the title of the second entry -- UPDATE entries SET title = 'The Worst Day I Ever Had' WHERE id = 2; -- Select a...
true
f432066371200553bbb83fca9780c66c0c1d5646
SQL
lakhdar-rouibah/garage
/garage/Core/app/kernel/db/garage .sql
UTF-8
16,562
2.921875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.6.6deb5 -- https://www.phpmyadmin.net/ -- -- Client : localhost:3306 -- Généré le : Jeu 11 Octobre 2018 à 15:47 -- Version du serveur : 5.7.23-0ubuntu0.18.04.1 -- Version de PHP : 7.2.10-0ubuntu0.18.04.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!4010...
true
a20eecf0538b6cd910bddeaf25a53c8342d8e587
SQL
HChung2112/SQL_Cleaning_NashvilleHousing
/DataCleaning_NashvilleHousing.sql
UTF-8
4,605
3.96875
4
[]
no_license
--Cleaning data in SQL queries select * from PorffolioProject.dbo.Nashvilehousing ----------------------------------------------------------------------------------------------------------------------------------- -- Standardize Date format select SaleDate, CONVERT(date,SaleDate) from PorffolioProj...
true
439dd67229ebaf016932974a780dc0fe397e24f1
SQL
infosysbot/recipe
/recipedb v4.sql
UTF-8
27,359
2.75
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.1.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Aug 13, 2021 at 06:55 PM -- Server version: 10.4.20-MariaDB -- PHP Version: 8.0.9 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIEN...
true
79be2a17ea82b81967f7b942d726186f376cceaf
SQL
ondrejstefik/L2C-KE-PHP-CMS
/resources/database.sql
UTF-8
728
3.140625
3
[]
no_license
CREATE TABLE Users ( ID int NOT NULL AUTO_INCREMENT, Email varchar(256), password varchar(64), nickname varchar(128), PRIMARY KEY (ID) ); CREATE TABLE Pages ( ID int NOT NULL AUTO_INCREMENT, title varchar(128), User_ID int NOT NULL, content TEXT, menu_label VARCHAR(128), menu_order INT...
true
c950f4e8783a886f23c00c3ab3dad8cfd23a6191
SQL
gromarion/pf
/src/test/resources/db/postgresql-create-tables.sql
UTF-8
4,055
3.984375
4
[]
no_license
DROP TABLE IF EXISTS users CASCADE; CREATE TABLE users ( id serial NOT NULL, fullname character varying(255), username character varying(255), password character varying(255), -- picture character varying(255), CONSTRAINT users_pkey PRIMARY KEY (id) ); DROP TABLE IF EXISTS campaign CASCADE; CREATE TABLE cam...
true
09acacb3de3c93ed6f19ddaf903adf0fe507b809
SQL
hoangvantuan/adtourist
/labor_content.sql
UTF-8
2,528
2.78125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.1.12 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Jul 17, 2015 at 06:24 AM -- Server version: 5.6.16 -- PHP Version: 5.5.11 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;...
true
917d25a99b5c551d575042437acf8d575b03e22f
SQL
FreekDB/transmart-data
/ddl/oracle/biomart/views/ctd_clinical_chars_view.sql
UTF-8
618
3.0625
3
[]
no_license
-- -- Type: VIEW; Owner: BIOMART; Name: CTD_CLINICAL_CHARS_VIEW -- CREATE OR REPLACE FORCE VIEW "BIOMART"."CTD_CLINICAL_CHARS_VIEW" ("ID", "REF_ARTICLE_PROTOCOL_ID", "CLINICAL_VARIABLE", "CLINICAL_VARIABLE_PCT", "CLINICAL_VARIABLE_VALUE") AS select rownum as ID, v."REF_ARTICLE_PROTOCOL_ID",v."CLINICAL_VARIABLE",v....
true
19e22e99e72aebf4f387e8f4a77a53f8cceb6ec0
SQL
silence-do-good/stress-test-Postgres-and-MySQL
/dump/high/day10/select0926.sql
UTF-8
178
2.59375
3
[]
no_license
SELECT timeStamp, temperature FROM ThermometerOBSERVATION o WHERE timestamp>'2017-11-09T09:26:00Z' AND timestamp<'2017-11-10T09:26:00Z' AND temperature>=21 AND temperature<=56
true
90a8a760b104436d36da347ca08d351d1d69b7fe
SQL
alliegatorziggs/PokemonSqlLab
/pokemon_sql/simple_selects_and_counts.sql
UTF-8
159
2.671875
3
[]
no_license
SELECT name FROM pokemon.types; SELECT name FROM pokemon.pokemons WHERE id=45; SELECT COUNT(id) FROM pokemon.pokemons; SELECT COUNT(id) FROM pokemon.types;
true
e8c6a16fd1247974cf0100fdfe0bcc320ecfcd38
SQL
strandtentje/eland
/database/base.sql
UTF-8
10,354
3.34375
3
[]
no_license
-- MySQL dump 10.13 Distrib 5.6.28, for debian-linux-gnu (x86_64) -- -- Host: localhost Database: stortneer -- ------------------------------------------------------ -- Server version 5.6.28-1 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_...
true
9fe9e2771224b9d80e3624e38d1b9893fac67548
SQL
kevinhendra/Simple-Shopping-Using-PHP
/Database/products.sql
UTF-8
3,574
2.734375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.0.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Waktu pembuatan: 09 Nov 2018 pada 16.52 -- Versi server: 10.1.32-MariaDB -- Versi PHP: 5.6.36 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CH...
true
c8681c112b9bdb038cf65cc2a8b0012e063dc708
SQL
renatak12/BDII-tarefas
/<T01/create.sql
UTF-8
1,820
4.21875
4
[]
no_license
drop table if exists empregado cascade; drop table if exists companhia cascade; drop table if exists trabalha cascade; drop table if exists gerente cascade; CREATE TABLE empregado( cod_empregado CHAR(4) NOT NULL, nome_empregado VARCHAR(100) NOT NULL, rua VARCHAR(255) DEFAULT NULL, cidade VARCHAR(50) DEFAULT NUL...
true
c4cbb512aaea0dfb53bdf72c91a3d47ad9522969
SQL
INoobSaibot/helloSpring
/src/main/resources/db/migration/V1.2__customer_table.sql
UTF-8
253
2.921875
3
[]
no_license
create table customer ( `id`int(10) unsigned not null auto_increment, `first_name` VARCHAR(50) not null, `last_name` VARCHAR(50) not NULL, PRIMARY KEY (`id`), UNIQUE KEY (`first_name`, `last_name`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
true
4c66beb7b0f024f3d1d50cc15107f3bc4588bd80
SQL
llwsykll/leetCode
/SQL/CustomerWhoNeverOrdered.sql
UTF-8
156
3.234375
3
[]
no_license
# Write your MySQL query statement below select a.Name as Customers from Customers a left join Orders o on a.Id = o.CustomerId where o.CustomerId is Null;
true
a7c44295465f4b190a56ca081230e04d74c7a9ee
SQL
alvinTaoOps/atlante
/docker/files/db/900_graticule.sql
UTF-8
4,604
2.703125
3
[]
no_license
-- -- PostgreSQL database dump -- -- Dumped from database version 9.5.15 -- Dumped by pg_dump version 9.5.22 SET statement_timeout = 0; SET lock_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings = on; SELECT pg_catalog.set_config('search_path', '', false); SET check_function_bodies = false; S...
true
b66867e57f24d864ebd40e85264333caf6fea209
SQL
RolyEsco/Base_de_Datos_2
/creacion_tables.sql
UTF-8
3,159
3.71875
4
[]
no_license
-- DDL Lenguaje de Defincion de Datos -- ======================================== -- create table, alter table CREATE TABLE persona (id_persona serial PRIMARY KEY, primer_apellido varchar(30) NOT NULL, segundo_apellido varchar(30) NOT NULL, nombre varchar(40) NOT NULL, ci varchar(15) NOT NULL, fecha_nacimiento dat...
true
c76184cc83988b103a81261fe3053b44d5c67722
SQL
evrimulgen/Studies
/M1/HMIN122M/TP1/creation1.sql
UTF-8
5,345
3.578125
4
[]
no_license
DROP TABLE photographie; DROP TABLE utilisateur; DROP TABLE publie; DROP TABLE configuration; DROP TABLE appareilPhoto; DROP TABLE appartenirGalerie; DROP TABLE appartenirAlbum; DROP TABLE collection; DROP TABLE galerie; DROP TABLE album; DROP TABLE contenuNum; DROP TABLE commentaire; DROP TABLE discussion; DROP TABLE...
true
f76c7bbc560fb912e11208027abe663b285c8645
SQL
feluelle/great-data-building
/streaming-platforms/models/marts/movies.sql
UTF-8
2,215
3.390625
3
[ "MIT" ]
permissive
with movies as ( select stg_imdb_movies.title_id as imdb_title_id, stg_imdb_movies.title as imdb_title, stg_imdb_movies.release_year as imdb_release_year, stg_imdb_movies.date_published as imdb_date_published, stg_imdb_movies.genres as imdb_genres, stg_imdb_mo...
true
c9f2219a9fc0a9bc1fe27bc78e261c755a3e233f
SQL
vcappugi/ADESVENCA
/db/ddlutils/mysql/functions/Acct_Balance.sql
UTF-8
3,835
3.765625
4
[]
no_license
/********************************************************************** * This file is part of ADempiere Business Suite * * http://www.adempiere.org * * * * Copyright (C) Trifon ...
true
175931f7056156b10e1273739034dfd3939f081a
SQL
rekharokkam/t-sql
/LearningMicrosoftTransact-SQL/ProgrammingObjects/CreatingUserDefinedFunctions.sql
UTF-8
690
3.640625
4
[]
no_license
/* UDF functions just like the built-in aggregate functions - AVG, SUM UDF behave like StoredProcedure. They run the same code every time. They can accept input parameters. UDFs differ from StoredProcedure They can be used in T-SQL queries They cannot be executed using EXECUTE command. There are 2 t...
true
3ed4dc570ba23bd72d245306c7e2e46a609848d2
SQL
mebelousov/antlr_psql
/src/test/resources/sql/select/96ba5f70.sql
UTF-8
171
3
3
[ "MIT" ]
permissive
-- file:join.sql ln:698 expect:true select t1.q2, count(t2.*) from int8_tbl t1 left join (select * from int8_tbl offset 0) t2 on (t1.q2 = t2.q1) group by t1.q2 order by 1
true
982eca5eb2c6ca5997f41cdff20cae1308ef99dc
SQL
Jeanzw/LeetCode_Practice
/SQL/Medium/578. Get Highest Answer Rate Question.sql
UTF-8
1,069
3.96875
4
[]
no_license
-- # Write your MySQL query statement below select question_id as survey_log from (select question_id,sum(case when action = 'answer' then 1 else 0 end) as que_ans, sum(case when action = 'show' then 1 else 0 end) as que_show from survey_log group by question_id)tmp order by que_ans/que_show desc limit 1 -- 也可以直...
true
a4bda5fcc195108e7f530665fbe114ea94424ff0
SQL
Say-young/Assignments
/데이터베이스/createdb.sql
UTF-8
4,223
3.625
4
[]
no_license
CREATE TABLE FirstCategory ( idx INT NOT NULL PRIMARY KEY AUTO_INCREMENT, first VARCHAR(30) NOT NULL ); CREATE TABLE SecondCategory ( idx INT NOT NULL PRIMARY KEY AUTO_INCREMENT, second VARCHAR(30) NOT NULL ); create table Information ( idx INT NOT NULL PRIMARY KEY AUTO_INCREMENT, name VARCHAR(30) NOT NULL UNIQUE, pr...
true
0a192b2bc7e5b0ec4fb51214890e92fd0ac315f9
SQL
merriammassey/u-develop-it
/db/schema.sql
UTF-8
675
3.609375
4
[]
no_license
DROP TABLE IF EXISTS departments; DROP TABLE IF EXISTS roles; DROP TABLE IF EXISTS employees; CREATE TABLE departments ( id INTEGER AUTO_INCREMENT PRIMARY KEY, name VARCHAR(50) NOT NULL, ); CREATE TABLE employees ( id INTEGER AUTO_INCREMENT PRIMARY KEY, first_name VARCHAR(30) NOT NULL, last_name VARCHAR(30)...
true
47ea47dc45fafafde4d17cb0b1157c46b6c824aa
SQL
mabdelfattahm/ddd-hexagonal-workshop
/postgres-adapter/src/main/resources/db-migrations/V1__init.sql
UTF-8
411
3.125
3
[]
no_license
CREATE TABLE IF NOT EXISTS demo.accounts ( account_id VARCHAR(80) NOT NULL PRIMARY KEY, start_balance DOUBLE PRECISION NOT NULL DEFAULT 0 ); CREATE TABLE IF NOT EXISTS demo.activities ( activity_id SERIAL PRIMARY KEY, source_account VARCHAR(80) REFERENCES accounts(account_id), target_account VARCHAR(80) REFERENCE...
true
e5a60597b5225d5f98684b35e2afd66783c5f6d2
SQL
webtp3/tp3mods
/ext_tables.sql
UTF-8
11,130
2.953125
3
[ "MIT" ]
permissive
# # Table structure for table 'tx_tp3mods_domain_model_tp3mods' # CREATE TABLE tx_tp3mods_domain_model_tp3mods ( uid int(11) NOT NULL auto_increment, pid int(11) DEFAULT '0' NOT NULL, microdata text, konfiguration text, snippet_type text, main_entry text, aggregate_rating varchar(255) DEFAULT '0' NOT NULL, add...
true
49974db6f507e44d5f9d5b5ddb577cb728cb1e81
SQL
jbernier51/Datawarehouse
/Datawarehouse/Datawarehouse/Harsco/Views/vFactARReceipts.sql
UTF-8
301
3.0625
3
[]
no_license
 create view [Harsco].[vFactARReceipts] as select r.*, isnull(i.invoicenumber, 'No Invoice') as [Invoice Number] from harsco.FactARReceipts r left outer join harsco.factarinvoices i on r.InvoiceKey = i.InvoiceKey where r.ReceiptTransactionID not like 'RS%' --and i.AccountCustomerKey = 13212
true
daa91323b91b1740ea3b4296616f5102860004e3
SQL
gaoxiangmax/repo2
/my_q8/Function/Proc_Settlements_SumMiscellaneousPaidUp2.sql
UTF-8
773
3.25
3
[]
no_license
/* 结算中心-已付运杂费,未付运杂费 */ delimiter $ drop procedure if exists Proc_Settlements_SumMiscellaneousPaidUp2 $ create procedure Proc_Settlements_SumMiscellaneousPaidUp2(sInvoiceNO varchar(255)) begin declare fMiscellaneousPaidUp decimal(18,2); set fMiscellaneousPaidUp=(Select Sum(ifnull(PaymentDomesticsDetail.UsedAmo...
true
20efb6c1243aa7f66b6864c2755485698086decb
SQL
TetrisFan/wwthackcodingcolts
/SQL Scripts/pendingclubs.sql
UTF-8
1,818
3.09375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.9.0.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Aug 04, 2019 at 12:03 AM -- Server version: 10.3.16-MariaDB -- PHP Version: 7.1.30 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @...
true
93367652de727e39c85b290ac580639132b5868e
SQL
mychan152000/ChoXau
/laravel.sql
UTF-8
11,211
3.015625
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.9.2 -- https://www.phpmyadmin.net/ -- -- Máy chủ: 127.0.0.1 -- Thời gian đã tạo: Th3 12, 2020 lúc 04:57 PM -- Phiên bản máy phục vụ: 10.4.11-MariaDB -- Phiên bản PHP: 7.4.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!...
true
f2def85608bfec65c7290694a38ae118dc4673ec
SQL
MikeWorthen/Node.js-MySQL
/bamazon.sql
UTF-8
1,680
3.34375
3
[]
no_license
DROP DATABASE IF EXISTS bamazonDB; CREATE DATABASE bamazonDB; USE bamazonDB; CREATE TABLE products ( Item_ID INT NOT NULL AUTO_INCREMENT, Product_Name VARCHAR(45) NULL, Department_Name VARCHAR(45) NULL, Price DECIMAL(10, 2) NULL, Stock_Quantity INT NULL, PRIMARY KEY (Item_ID) ); INSERT INTO products (Pr...
true
bd77263a31b87e2cf80999ee0fb18bc93f24dbed
SQL
zhilangtaosha/BBG
/SQL/2016-10-11_120135门店复购会员.sql
GB18030
1,448
2.828125
3
[]
no_license
--2һݣ2015-07~2016-06 --1. SELECT T.HYK_NO Ա, COUNT(T.SLS_TRX_ID) FROM RADM.BBG_RA_RFM_VIP_F T WHERE T.DT_WID BETWEEN 120150701000 AND 120150831000 AND T.ORG_WID = 122 GROUP BY T.HYK_NO HAVING COUNT(T.SLS_TRX_ID) > 1 ORDER BY 2; SELECT T.HYK_NO Ա, COUNT(T.SLS_TRX_ID) FROM RADM.BBG_RA_RFM_VIP_F T WHERE T.DT_...
true
96495c870aada00b4275988399ccbcb120c074ec
SQL
Daemon-Wiest/sql-scripts
/derived-table-example(unimportant).sql
UTF-8
280
2.765625
3
[]
no_license
use eddb; update student set firstname='gregory' where id in ( select * from ( select id from sutdent where lastname = 'doud' ) as xx) ; -- select in line 5 creates a derived table while the query executes
true
f4bbd0bd4c5ed82a0acee614d6b3d46402606760
SQL
LeticiaAraujo-dev/SPMedGrup
/back-end/SPMedGroup_bd/SPMedGroup_SQL/SPMedGroup_DQL.sql
WINDOWS-1250
2,339
3.515625
4
[]
no_license
USE SPMedGroup; SELECT * FROM tiposUsuarios; SELECT * FROM usuarios; SELECT * FROM paciente; SELECT * FROM especialidade; SELECT * FROM clinica; SELECT * FROM medico; SELECT * FROM situacao; SELECT * FROM consulta; SELECT idMedico, NomeMedico FROM medico WHERE idUsuario = 2 SELECT idPaciente, NomePaciente FROM pacie...
true
949e4d383743727f038a14816bae7fcb4aa53f91
SQL
ammadUmarDev/Pakistan-Post-Courier-Service-POS
/tables.sql
UTF-8
12,278
3.0625
3
[]
no_license
CREATE TABLE Person ( CNIC VARCHAR(15) NOT NULL, Name CHAR(50) NOT NULL, Address VARCHAR(50) NOT NULL, Phone# VARCHAR(12) NOT NULL, DOB DATE NOT NULL, Gender CHAR(13) NOT NULL, CONSTRAINT chk1_Gender CHECK (Gender IN ('Male', 'Female', 'Not Specified')), CONSTRAINT pk_person PRIM...
true
fa0567433e3610bee15b192c78dc1544876b13c9
SQL
redha-boubakour/blog
/sql/article.sql
UTF-8
566
3.4375
3
[]
no_license
CREATE TABLE `article` ( `id` int(11) NOT NULL, `title` varchar(100) NOT NULL, `content` text NOT NULL, `author` varchar(100) NOT NULL, `createdAt` datetime NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; ALTER TABLE `article` ADD PRIMARY KEY (`id`); ALTER TABLE `article` MODIFY `id` int(11) NOT ...
true
9e9bc5f9a1cb526e926f25c4ed6836d61b4b8aaf
SQL
phemi/Techland-
/techland.sql
UTF-8
4,104
3.34375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.3 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Feb 05, 2019 at 12:28 PM -- Server version: 10.1.37-MariaDB -- PHP Version: 7.2.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OL...
true
c6c6d89b5e0c02f4e178181968ab8cc9c64809d1
SQL
vinyldns/vinyldns
/modules/mysql/src/main/resources/db/migration/V3.3__RecordSet.sql
UTF-8
283
2.859375
3
[ "MPL-2.0", "EPL-1.0", "Apache-2.0" ]
permissive
CREATE SCHEMA IF NOT EXISTS ${dbName}; USE ${dbName}; CREATE TABLE recordset ( id CHAR(36) NOT NULL, zone_id CHAR(36) NOT NULL, name VARCHAR(256) NOT NULL, type TINYINT NOT NULL, data BLOB NOT NULL, PRIMARY KEY (id), INDEX zone_id_name_index (zone_id, name, type) );
true
87e111c27575492bfaf3159d3c136914bc86f500
SQL
khoadk/Data_Engineering
/project_5/airflow/plugins/operators/create_tables.sql
UTF-8
1,993
3.28125
3
[]
no_license
DROP TABLE IF EXISTS public.artists; CREATE TABLE public.artists ( artistid varchar(256) NOT NULL, name varchar(256), location varchar(256), lattitude numeric(18,0), longitude numeric(18,0) ); DROP TABLE IF EXISTS public.songplays; CREATE TABLE public.songplays ( playid varchar(32) NOT NULL, start_time timestamp ...
true
d82c12ec1821c55b864d3b408b1ec8dd0fdbdedd
SQL
tomasechague/pruebas
/telegramBot/backup/telegrambot.sql
UTF-8
2,264
2.984375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 12-09-2016 a las 09:27:59 -- Versión del servidor: 10.1.13-MariaDB -- Versión de PHP: 5.6.23 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT...
true
f80a6f04e87040befbddff134182fcd9a612e1dd
SQL
Ni-L/Address-Book-Database
/UC4-Edit-Data.sql
UTF-8
1,028
3.4375
3
[]
no_license
--*********WELCOME TO THE ADDRESS BOOK***********-- CREATE DATABASE AddressBookDataBase; use AddressBookDataBase; ---Creating table Create Table AddressBook ( FirstName varchar(30) not null, LastName varchar(30) not null, Address varchar(150) not null, City varchar(50) not null, State varchar(50) not null, Z...
true
655873e39774c608268c151699ba700003a405ca
SQL
AtilaSalas/Proyecto-Flash
/MySQL/script 23-01.sql
UTF-8
2,016
3.359375
3
[]
no_license
/* BORRANDO ADMIN */ /* ALTER TABLE roles MODIFY idAdmin ; DROP TABLE IF EXISTS administradores;*/ ALTER TABLE `flashtore`.`roles` DROP FOREIGN KEY `roles_administradores`; ALTER TABLE `flashtore`.`roles` CHANGE COLUMN `idAdmin` `idAdmin` INT(10) NULL DEFAULT NULL , DROP INDEX `roles_administradores` ; ALTER TABLE ...
true
1dd332f374885df10a196e82717b268cb13993c3
SQL
anagorko/informatyka
/home/lukom/SQL/malware.sql
UTF-8
1,933
4.1875
4
[]
no_license
USE malware; DROP TABLE IF EXISTS malware; CREATE TABLE malware( data DATE, ip VARCHAR(100), opis VARCHAR(100), asn INT, url VARCHAR(100) ); LOAD DATA LOCAL INFILE '../../../zbior_zadan/111/malware.txt' INTO TABLE malware LINES TERMINATED BY '\r\n' IGNORE 1 LINES; DROP TABLE IF EXISTS asn; CREATE TABLE asn( asn IN...
true
ca2c97f1e5fac76194ca3b2b0c9ea616eb05daaa
SQL
softskandeveloper1/Emergency_Dev_MHealth
/DAL/applicant_document_update_2.sql
UTF-8
1,876
3.53125
4
[]
no_license
create sequence mp_expertise_id_seq; CREATE TABLE public.mp_expertise ( id integer NOT NULL DEFAULT nextval('mp_expertise_id_seq'::regclass), name text COLLATE pg_catalog."default" NOT NULL, CONSTRAINT mp_expertise_pkey PRIMARY KEY (id) ) TABLESPACE pg_default; ALTER TABLE public.mp_expertise OWNER t...
true
eaf375da844d69c93561eb2f8d2d59240a0fd836
SQL
piszewc/python-deep-learning-data-science
/T-SQL/T-SQL Fundaments/Chapter 3 - Joins.sql
UTF-8
2,922
4.9375
5
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
-- Write a query that generates five copies of each employee row: -- Tables involved: HR.Employees and dbo.Nums SELECT e.lastname, e.firstname, e.empid, n.n FROM HR.Employees AS e CROSS JOIN dbo.Nums as n WHERE n.n <= 5 ORDER BY e.empid -- Write a query that returns a row for each employee and day in the range June ...
true
69ce59113aa32c59a6fc7eab34a0627cf608295a
SQL
varundixit/RomaniaDailyLoad
/IB_Settled_Bets_Load.sql
UTF-8
19,882
3.5625
4
[]
no_license
## date change 2016-02-05 ###place file "Settled_Bets2016-02-05.csv" ##Full Run use romaniastg; drop table `stg_settled_bets_csv`; CREATE TABLE `stg_settled_bets_csv` ( `BetId` bigint(20) DEFAULT NULL, `SettleTime` varchar(50) DEFAULT NULL, `BetStatus` varchar(20) DEFAULT NULL, `NumLeg` int(11) DEFAULT NULL, ...
true
b57f14f6576c823b80e1edb11bf3cd115a917cb7
SQL
MarkoLamberg/RESTfulDemo
/src/main/resources/db/migration/V20200310094335__create_tour.sql
UTF-8
462
2.875
3
[]
no_license
CREATE DATABASE IF NOT EXISTS restfuldemodb; CREATE TABLE `tour` ( `id` BIGINT AUTO_INCREMENT, `tour_package_code` CHAR(2) NOT NULL, `title` VARCHAR(100) NOT NULL, `price` VARCHAR(10) NOT NULL, `duration` VAR...
true
717fb0576fa7779517a6fb5ca0bcda05294cc542
SQL
jpaomat/employees-wf
/database/db.sql
UTF-8
717
3.078125
3
[]
no_license
CREATE DATABASE apiemployees; USE apiemployees; CREATE TABLE employees( id SERIAL PRIMARY KEY NOT NULL, idEmployee TEXT NOT NULL, fullname VARCHAR(100) NOT NULL, occupation TEXT NOT NULL, idBoss TEXT NOT NULL ); -- ALTER TABLE employees DROP COLUMN boss; -- ALTER TABLE employees CHANGE boss idBoss; ...
true
a1aed60018ced4c46f62e2133988c42f98e81472
SQL
Shyndard/mspr-cart-api
/src/main/resources/db/migration/V1.0.0__Quarkus.sql
UTF-8
437
3.5
4
[]
no_license
-- POSTGRESQL DATABASE CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; CREATE table product( id UUID PRIMARY KEY DEFAULT uuid_generate_v4(), price NUMERIC(10,2), name varchar(50), tva NUMERIC(4,2) ); CREATE table cart ( user_id UUID PRIMARY KEY, created_at TIMESTAMP DEFAULT current_timestamp ); CREATE table cart_...
true
190110eded1eb2911c36c13265e78d73496b1db0
SQL
geosconsulting/sql_bonanza
/esempi/come_usare_CTE.sql
UTF-8
672
3.90625
4
[]
no_license
SELECT * FROM address WHERE city_id = 70; SELECT * FROM address INNER JOIN city ON address.city_id = city.city_id WHERE address.city_id = 70; WITH selezione_citta_italia AS ( SELECT * FROM city WHERE country_id = 49) SELECT city_id,city FROM selezione_citta_italia WHERE city LIKE 'B%'; WITH selezione_citta_ita...
true
8a2200ad7079fc8d40b7935aaa98e6959b652c6a
SQL
jordanlovato/kohanatut1
/seed.sql
UTF-8
1,884
3.296875
3
[ "BSD-3-Clause" ]
permissive
CREATE TABLE `albums` ( `id` int(11) NOT NULL auto_increment, `name` varchar(50) collate utf8_bin NOT NULL, `author` varchar(50) collate utf8_bin NOT NULL, `genre_id` int(11) NOT NULL, PRIMARY KEY (`id`), KEY `genre_id` (`genre_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin AUTO_INCREMENT=19 ;...
true
01a226b88bc422aa48208232cec479e5986740bd
SQL
adbsjb/isad151
/sql/supplier/procedures/supplier_update.sql
UTF-8
387
3.546875
4
[]
no_license
## UPDATE Supplier Procedure -- -- Parameters: -- id: INT -- name: VARCHAR(100) -- -- Example Usage: -- supplier_update(1, 'Amazon'); DROP PROCEDURE IF EXISTS supplier_update; DELIMITER // CREATE PROCEDURE supplier_update(IN inId INT, IN inName VARCHAR(100)) BEGIN UPDATE Supplier SET Supplier...
true
79393410b4f16a6a6aa4b68348f85785bba700d0
SQL
JhodyDamara/Monitoring_Proyek-_Perumahan
/Database/monitoring_sistem.sql
UTF-8
378,427
2.75
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
-- phpMyAdmin SQL Dump -- version 5.0.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Aug 03, 2020 at 03:56 AM -- Server version: 10.4.11-MariaDB -- PHP Version: 7.4.3 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
true
4b77dbcaf19e2656d521e288d22bbe509525dfd4
SQL
jaypk-104/HSN_Document
/■ ERP/■ UNIERP/■ 영업/철강/철강 - 매출 국내상품매출원가 계정에 들어가는 금액 기준.SQL
UTF-8
7,605
3.796875
4
[]
no_license
/* 철강팀 원가 금액 계산할때 (매출전표 원가계정) 총입고본수량과 총 출고수량이 같은 순간에는 마지막 출고수량이 M GR TO DN STEEL 에 INSERT 되기전에 매입금액 - 여태까지 원가금액(M_GR_TO_DN_STEEL.COG_GL_AMT 의 합계금액) 이 된금액이 마지막 출고수량의 COG_GL_AMT 에 INSERT 되야 한다. 그런 건들이 아닌건들의 원가금액 계산은 SELECT BON_QTY, QTY, LOC_AMT, NVL(DISTR_AMT, 0) INTO V_GR_BON_QTY, V_GR_QTY, V_L...
true
9ac7a9a4dc4152289c8e41dba6430ededb09eae3
SQL
inca2018/SistemaTrajesYa
/trajesya 12-10-2019 v2.sql
UTF-8
173,996
3.53125
4
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Servidor: 127.0.0.1:3306 -- Tiempo de generación: 14-10-2019 a las 20:29:19 -- Versión del servidor: 5.7.26 -- Versión de PHP: 5.6.40 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /...
true
f8cbd14d4f1c9b28a390ce696d177e38ed4ecc0d
SQL
MrLIsharp/CloudCollector
/.sql
UTF-8
1,925
2.90625
3
[]
no_license
create table Category ( Id INTEGER not null primary key identity /*自增长编号*/, Pid INTEGER /*父编号*/, Name VARCHAR(255) /*名称*/, Memo VARCHAR(4000) /*注释*/, CreatorId INTEGER not null /*创建人编号 当前用户ID*/, CreatorName ...
true
3f98bc530fe43c2d420d4975cedcac703487d765
SQL
JamesKid/kidphp
/system/script/reset_visitin_table.sql
UTF-8
248
2.53125
3
[]
no_license
ALTER TABLE `vimkid_visitin` DROP `visit_id`; ALTER TABLE `vimkid_visitin` ADD `visit_id` MEDIUMINT( 9 ) NOT NULL FIRST; ALTER TABLE `vimkid_visitin` MODIFY COLUMN `visit_id` MEDIUMINT( 9 ) NOT NULL AUTO_INCREMENT,ADD PRIMARY KEY(visit_id);
true
23330b49d9386502a36ba03044628ef67c622f18
SQL
Good725/ideabubble-lamp
/plugins/events/model/model-20160701160000.sql
UTF-8
3,248
3.15625
3
[]
no_license
/* ts:2016-06-17 16:00:00 */ CREATE TABLE IF NOT EXISTS `plugin_events_topics` ( `id` INT NOT NULL AUTO_INCREMENT , `name` VARCHAR(45) NOT NULL , `created_by` INT(11) NULL , `modified_by` INT(11) NULL , `date_created` TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP , `da...
true
4721e274c1bf4cfe90999218ea04061aef0036a9
SQL
ty-a/jass
/sql/logs.sql
UTF-8
168
2.765625
3
[]
no_license
CREATE TABLE logs ( LogID int NOT NULL AUTO_INCREMENT PRIMARY KEY, userID int NOT NULL, action varchar(250) NOT NULL, FOREIGN KEY (userID) REFERENCES user(userId) );
true
7da05958cc8521d39a6fd77c1a39c481ac2318d1
SQL
nmfta-repo/nmfta-opentelematics-prototype
/Prototype.Telematics.BridgeServer/dbo/Stored Procedures/AddUserToClient.sql
UTF-8
582
3.328125
3
[ "Apache-2.0" ]
permissive
 -- ============================================= -- Description: Add User To Client -- ============================================= CREATE PROCEDURE AddUserToClient ( @ClientId nvarchar(450), @UserId nvarchar(450) ) AS BEGIN -- SET NOCOUNT ON added to prevent extra result sets from -- interfering with SELECT st...
true
03d495b62a007a6f7ac83a532abb4870a558add0
SQL
Larrylapnguyen/Bamazon
/bamazon.sql
UTF-8
828
2.9375
3
[]
no_license
DROP DATABASE IF EXISTS bamazon; CREATE DATABASE bamazon; USE bamazon; CREATE TABLE products ( item_id int auto_increment not null, product_name varchar(30) not null, department_name varchar(30) not null, price dec(9,2) not null, stock_quantity int not null, primary key(item_id) ); insert into pr...
true
7cdc8393e4cc77ddc8e73f0cf66ff4d49b29ef03
SQL
gleighfield/infinite-mobile-application
/database/users.sql
UTF-8
1,363
2.875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 3.5.5 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Jun 12, 2013 at 01:47 PM -- Server version: 5.1.68-cll -- PHP Version: 5.3.17 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */...
true
1388480c99f7dfb4636a989138dbfdab8f89b488
SQL
491622928/shiro
/short_rental.sql
UTF-8
6,177
3.359375
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : localhost Source Server Version : 80016 Source Host : 127.0.0.1:3306 Source Database : short_rental Target Server Type : MYSQL Target Server Version : 80016 File Encoding : 65001 Date: 2019-06-17 10:15:14 */ SET FOREIGN_KEY_CHECKS=0; ...
true