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
59750d916a3f8c5ec563218f815fe9116f90a131
SQL
1newstar/KKDiveIntoMysqlBook
/ch16/02--traditionalMode.sql
UTF-8
519
3.078125
3
[]
no_license
#### #传统模式:验证日期合法性 ### #查询默认的SQL模式 SELECT @@sql_mode; #创建表 t DROP TABLE IF EXISTS t; CREATE TABLE t( d DATETIME ); #查询表 t SELECT * FROM t; #设置模式为 ANSI SET SESSION sql_mode='ANSI'; #插入无效日期 #——》可以插入,但插入的是零值 INSERT INTO t VALUES('2007-04-31'); #设置模式为 TRADITIONAL SET SESSION sql_mode='TRADITIONAL'; #插入无效日期 #——》不可以...
true
18ecafe962d05333084e92e84152d1c2d9f79165
SQL
plengSPK/evaluation-system
/evaluation-system.sql
UTF-8
8,108
3.453125
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
CREATE DATABASE `evaluation-system` CHARACTER SET utf8 COLLATE utf8_general_ci; -- -- Table structure for table `approves` -- CREATE TABLE `approves` ( `approve_id` int(11) NOT NULL, `approve_user_id` int(11) NOT NULL, `reason` text DEFAULT NULL, `request_id` int(11) NOT NULL, `last_update` date NOT NULL ) ...
true
976c3c545570ed4f077a04bb5d00038e3cc4245b
SQL
soyuz90/codesa_prueba
/script-bd/bd_codesa.sql
UTF-8
696
3.59375
4
[]
no_license
/* * Script de creacion de base datos, tablas e insert * en la tabla rol * */ CREATE DATABASE codesa; USE codesa; CREATE TABLE IF NOT EXISTS ROL ( ID_ROL int(11) NOT NULL AUTO_INCREMENT, NOMBRE varchar(50), PRIMARY KEY (ID_ROL) ); INSERT INTO codesa.rol (ID_ROL, NOMBRE) VALUES (1, 'ADMINISTRADOR'); ...
true
b1d2eeac76310f941ca2da1af1449c666e701daa
SQL
netonneettoo/p4tr1m0n10
/db_patrimonio.sql
UTF-8
166,920
3.078125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.0.4.2 -- http://www.phpmyadmin.net -- -- Máquina: localhost -- Data de Criação: 29-Jul-2014 às 17:56 -- Versão do servidor: 5.6.13 -- versão do PHP: 5.4.17 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "-03:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIE...
true
a3c24b0f0ee18d4d1e3db3e665837fb28798e39a
SQL
lkyero/DotNetAll
/08Demos/Orms/IBatisNetWinformDemo/IBatisNetWinformDemo/database.sql
UTF-8
5,341
2.796875
3
[ "MIT" ]
permissive
-- Create table P_SAMPLE create table P_SAMPLE ( fid VARCHAR2(32) default sys_guid() not null primary key, fname VARCHAR2(50) not null, fremark VARCHAR2(200) ); -- Create table P_SAMPLE_DETAIL create table P_SAMPLE_DETAIL ( fentity_id NUMBER(12) not null, fid NUMBER(12) not null, fvalue V...
true
9a7394fdff811610522739cb2163f81a121c049b
SQL
BostjanOb/QueuePlatform
/table.sql
UTF-8
270
2.640625
3
[ "MIT" ]
permissive
CREATE TABLE IF NOT EXISTS tasks ( `id` INT NOT NULL AUTO_INCREMENT , `name` VARCHAR NOT NULL , `params` TEXT NULL , `result` TEXT NULL , `started_at` INT NULL , `completed_at` INT NULL , `status` VARCHAR NOT NULL DEFAULT 'QUEUED' , PRIMARY KEY (`id`) );
true
0ed58d1150f7c7276ed07f2747a4717dc3d81216
SQL
florinvasilie/Oracle-PL-SQL
/Package.sql
UTF-8
1,016
3.15625
3
[]
no_license
set serveroutput on create or replace package manage_utilizatori is --Verifica daca un email este in BlackList return true, daca este nu se mai poate inregistra function isBlacklist(v_email in utilizatori.email%type) return integer; --Verifica daca un mesaj e primti de la un utilizator, daca da afiseaza utiliza...
true
c5dc2bbea2802e65c9de5f9e12285c25e57b6071
SQL
kostadinlambov/Trading-Bot
/TradingBot/Server/src/main/resources/db/migration/V001__init-default.sql
UTF-8
1,297
3.609375
4
[ "MIT" ]
permissive
create table roles ( id varchar(255) not null, authority varchar(255) not null, primary key (id) ); create table users ( id varchar(255) not null, is_account_non_expired BOOLEAN DEFAULT TRUE not null, is_account_non_locked BOOLEAN DEFAULT TRUE not...
true
6324695a6af1b9ec7fdade4ec660e592c2cb93af
SQL
qiuyesuifeng/tpcc-mysql
/add_idx.sql
UTF-8
339
2.984375
3
[]
no_license
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0; CREATE INDEX idx_customer ON customer (c_w_id,c_d_id,c_last,c_first); CREATE INDEX idx_orders ON orders (o_w_id,o_d_id,o_c_id,o_id); CREATE INDEX idx_stock ON stock (s_i_id); CREATE INDEX idx_order_line ON order_line (ol_supply_w_id,ol_i_id); SET UNIQUE_CHECKS=...
true
7cde718ca17977557cdb9f27f897930a20e6a4f5
SQL
svetlinyotov/pmu-server-side
/database/schema.sql
UTF-8
10,197
3.75
4
[]
no_license
-- MySQL Workbench Forward Engineering SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0; SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0; SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL,ALLOW_INVALID_DATES'; -- ----------------------------------------------------- -- Schema time_trav...
true
7a0ac149297fae0e709a3be1e3ed41c3a773def4
SQL
kylemichaelsullivan/codefights-mysql
/Databases/02 Always Leave Table in ORDER/08-contestLeaderboard.mysql
UTF-8
221
2.65625
3
[ "MIT" ]
permissive
/* https://codefights.com/arcade/db/always-leave-table-in-order/WJ2bsam6YCAqgxFS9 */ CREATE PROCEDURE contestLeaderboard() BEGIN SELECT name FROM leaderboard ORDER BY score DESC LIMIT 5 OFFSET 3; END
true
b90d89c4cb346257b79d52080efdc049217729bf
SQL
reidpd/codefights
/arcade/databases/01_welcome_to_the_table/02_countriesSelection/sql/index.sql
UTF-8
149
2.703125
3
[]
no_license
/*Please add ; after each select statement*/ CREATE PROCEDURE countriesSelection() BEGIN SELECT * FROM countries WHERE continent LIKE "Africa"; END
true
3fc1dcb7282175c845a9f27b10d13554c1d3e1ab
SQL
devmyqi/sql-bookdb
/sql/insert-data.sql
UTF-8
3,855
3.140625
3
[]
no_license
/* meta information filename: sql/insert-data.sql description: bookdb data entries definition version: v0.0.1 author: Michael Wronna, Konstanz created: 2019-10-10 modified: 2019-10-10 */ -- fix that damn character encoding problem SET character_set_client = 'utf8'; USE bookdb; -- delete exisiting...
true
ed00976c243a4017d0cd00bf1ad4d7e438e3529c
SQL
LoonyJester/hr-tools
/Database1/StoredProcedures/core_employee_delete.sql
UTF-8
215
2.78125
3
[]
no_license
DROP procedure IF EXISTS `core_employee_delete`; CREATE PROCEDURE core_employee_delete(IN EmployeeId CHAR(36)) BEGIN UPDATE `core_employee` SET IsDeleted = 1 WHERE `core_employee`.`EmployeeId` = EmployeeId; END
true
4e9e94f023c257e7dd3d8a1a5943b56bd10571de
SQL
atinvento100/SmartGraceMarkCalculator
/Dump20210510/grace_marks_student.sql
UTF-8
3,505
2.75
3
[]
no_license
-- MySQL dump 10.13 Distrib 8.0.23, for Win64 (x86_64) -- -- Host: localhost Database: grace_marks -- ------------------------------------------------------ -- Server version 8.0.23 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;...
true
cf3d5c513dc7f019ea8d4100bf996ce192ffcd18
SQL
fnwiya/pgexercises
/aggregation/rollingavg.sql
UTF-8
438
3.96875
4
[]
no_license
SELECT dategen.date, (SELECT SUM(CASE WHEN memid = 0 THEN slots * facs.guestcost ELSE slots * membercost END) AS rev FROM cd.bookings bks INNER JOIN cd.facilities facs USING(facid) WHERE bks.starttime > dategen.date - interval '14 days' AND bks.starttime < dategen.date + interval '1 day' )/15 AS revenue FROM (SELECT CA...
true
78af4e61bd7e02054b40d1188484bb3e943ac93b
SQL
Saipriyatarsine/boxigo
/database/boxigo.sql
UTF-8
8,282
2.796875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.3 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3306 -- Generation Time: Aug 11, 2019 at 07:48 AM -- Server version: 5.6.44-cll-lve -- PHP Version: 7.2.7 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET ...
true
e51726754ec6672722859521a5c21025eafb6f4d
SQL
kvsystems/ibc-example
/ibc_example.sql
UTF-8
21,738
3.125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.1 -- https://www.phpmyadmin.net/ -- -- Хост: mysql.kv-sys.ru -- Время создания: Авг 06 2018 г., 10:02 -- Версия сервера: 5.5.60-log -- Версия PHP: 5.6.35 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CH...
true
15311a18ba859b9dfe735aa1cd95f264be6b9d15
SQL
jemcafe/personal-project
/db/read_user_posters.sql
UTF-8
289
3.359375
3
[]
no_license
SELECT p.id, p.name, description, date_posted, price, poster_category_id, product_category_id, product_category, user_id, p.image_url, username FROM Posters p JOIN ProductCategories pc ON p.product_category_id = pc.id JOIN Users u ON p.user_id = u.id WHERE user_id = $1 ORDER BY p.id DESC;
true
b38217984f3c1ee260be8e97807074ca949c7486
SQL
Slyvia2000/selfex
/2_mysql/day03/xuezishangcheng/xuezishangcheng.sql
UTF-8
3,277
3.78125
4
[ "MIT" ]
permissive
SET NAMES UTF8; DROP DATABASE IF EXISTS xz; CREATE DATABASE xz CHARSET=UTF8; USE xz; #用户信息表xz_user CREATE TABLE xz_user( uid INT PRIMARY KEY AUTO_INCREMENT,#用户的ID,为用户的唯一标识,由系统自动生成 uname VARCHAR(32), upwd VARCHAR(32), email VARCHAR(64), phone VARCHAR(16) UNIQUE NOT NULL,#手机号码 avatar VARCHAR(128),#头像图片路径 user_nam...
true
1767df5e1a16e8d99a637c08d342cb09b51afa8f
SQL
MMeaney/General-Code
/SQL/Aquarius/AQ Monitored Entities + Stations - Update.sql
UTF-8
7,532
3.828125
4
[ "Apache-2.0" ]
permissive
-- ************************************************** -- *** Update station / monitored entity details -- ************************************************** USE [EPACentral_Aquarius] USE [EPACentral_Aquarius] SELECT DISTINCT STA.Station_Name , STA.EdenNationalCode , MON.MonEnt_Code , BOD.River_Code...
true
2fdfed077076bfefac5e412512eb04d242200f15
SQL
SakshiSonawane/Project
/backup.sql
UTF-8
6,245
2.890625
3
[]
no_license
-- MySQL dump 10.13 Distrib 8.0.19, for Win64 (x86_64) -- -- Host: localhost Database: java_project -- ------------------------------------------------------ -- Server version 8.0.19 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */...
true
cfb9294214cc0c249e41b245efd1fef3cf3ed6f3
SQL
bravesoftdz/CommServ
/Model_FB/DBScript.sql
UTF-8
15,834
3.078125
3
[]
no_license
/******************************************************************************/ /*** Generated by IBExpert 2017.7.2.1 11/08/2017 14:54:09 ***/ /******************************************************************************/ CREATE DOMAIN D$BOOL AS BOOLEAN; CREATE DOMAIN D$CHAR_1 AS CHAR(1); CREAT...
true
b19f922a8f22c54f9138b0ec2347dc5b58aa27ea
SQL
eltonmesquita87/test
/jose-typeScript-nodeJS/sql/schedule/billing_center/30-Duplicated PolicyChange on SAP.sql
UTF-8
610
3.75
4
[]
no_license
select * from (select policynumber,count(id) as 'qtd' from ( select distinct pp.policynumber, bi.id from bc_policyperiod pp inner join bc_invoiceitem ii on pp.id = ii.policyperiodid inner join bc_charge c on c.id = ii.chargeid inner join bc_billinginstruction bi on bi.id = c.billinginstructionid inner join bcx_eventwo...
true
26d3c55e77e0b4d92ea5fa985935943389c65100
SQL
dbbrandt/social-grails
/scripts/esmtransaction_create.sql
UTF-8
582
2.765625
3
[]
no_license
CREATE TABLE `esmtransaction` ( `id` bigint(20) NOT NULL auto_increment, `version` bigint(20) NOT NULL, `cleared` bit(1) NOT NULL, `content_id` int(11) default NULL, `date_created` datetime NOT NULL, `last_updated` datetime NOT NULL, `member_id` bigint(20) default NULL, `message` varchar(255) de...
true
d00e5802d6e64e412bc9af4da63fd1c5eb9f9b93
SQL
choieb9519/jsp-web2
/WebContent/WEB-INF/sql/CONSTRAINT03.sql
UTF-8
181
2.75
3
[]
no_license
-- PRIMARY KEY -- 각 레코드(ROW)를 유일하게 구분할 수 있는 컬럼 -- 각 테이블에 최대 한개 CREATE TABLE MyTable11 ( id INT PRIMARY KEY, name VARCHAR(255) );
true
6baf360c00c40d161939cfaa6daccf949fe872dd
SQL
gwhitworth/BCA-SQL
/RG117/Working/SQLQuery7.sql
UTF-8
3,311
4.0625
4
[]
no_license
SELECT AV.[Roll Year], PC.[Property Class], PC.[Property Sub Class], SUM(AV.[Actual Building Value]) AS [Total Building Value], SUM(AV.[Actual Land Value]) AS [Total Land Value], SUM(AV.[Actual Building Value]) + SUM(AV.[Actual Land Value]) AS [Total Actual Value], COUNT(...
true
d2b29ab51c205cdf46b32ce1c863211684d911c6
SQL
p300g611/PostgresDB
/dba-master/data_support/db/rally_requests/US19548_IncidentFile_batch1.sql
UTF-8
5,150
3.4375
3
[]
no_license
create temporary table tmp_EEcode(cc text,grf text); --GRF match EE codes \COPY tmp_EEcode FROM 'Contentframeworkdetailcode_EE_correspondence.csv' DELIMITER ',' CSV HEADER ; --States to include in Batch 1: Miccosukee Indian School, Colorado, Kansas, Illinois, Wisconsin, Alaska --Issue code:1. First testlet re-admini...
true
14fafb47ad5e6e7c8c45c0a4cf4f191c4c745d97
SQL
samtreetw/TW-DI
/allfoot/src/main/resources/sql/game/getOneRandomRoomThatPlayerNeverBeenTo.sql
UTF-8
132
3.03125
3
[]
no_license
SELECT room_id FROM room WHERE room_id not in ( SELECT room_id FROM room_record WHERE player_esn = ? ) ORDER BY RANDOM() LIMIT 1;
true
8425edc3238b399a5db901283de74f662cbf71a1
SQL
Xiumin-Lin/mediatek-app
/WEB-INF/mediatek.sql
UTF-8
4,736
3.53125
4
[]
no_license
DROP TABLE IF EXISTS `user`; DROP TABLE IF EXISTS `document`; DROP TABLE IF EXISTS `type`; DROP TABLE IF EXISTS `book`; DROP TABLE IF EXISTS `dvd`; DROP TABLE IF EXISTS `cd`; CREATE TABLE `user` ( `id_user` INT PRIMARY KEY AUTO_INCREMENT, `login` VARCHAR(50) NOT NULL UNIQUE, `pwd` VARCHAR(256) NOT NULL, `name` VARCHAR...
true
72998dd5c9d0f3b653c041a607fa2ee5d03c946d
SQL
JoaoPauloLeal/toolbox
/packages/ipm_cloud_postgresql/protocolo/sql_padrao/pessoaFisica.sql
UTF-8
1,051
2.875
3
[]
no_license
SELECT t.unicodigo as key1, t.unicodigo as id, t.uninomerazao as nome, case t.unitipopessoa when 1 then 'FISICA' else 'ESTRANGEIRA' end as tipo_pessoa, translate(t.unicpfcnpj, './-', '') as cpf_cnpj, case t.unisituacao when 0 then false when 5 then false ...
true
54542ea491690860addcc9c6ef1ccf9bcd735e1b
SQL
PriMon-07/Ekart
/ekartMS-master/cart_MS/src/main/resources/TableScript.sql
UTF-8
602
3.03125
3
[]
no_license
/*written for oracle db*/ DROP TABLE cart; CREATE TABLE cart ( cart_id int NOT NULL, cart_offer_price float DEFAULT NULL, category varchar(255) DEFAULT NULL, date1 date DEFAULT NULL, delivery_charge float DEFAULT NULL, display_name varchar(255) DEFAULT NULL, price float DEFAULT NULL, quantity int DEFA...
true
46dbc29428eb71538999263b9d9a5df64f04945f
SQL
stephanieplopez/java-blue-lecture
/m2-04_INSERT_UPDATE_and_DELETE-lecture/lecture.sql
UTF-8
2,389
4.3125
4
[]
no_license
--Using Assessing -- INSERT SELECT * FROM countrylanguage; -- 1. Add Klingon as a spoken language in the USA INSERT INTO countrylanguage (countrycode, language, isofficial, percentage) VALUES ('USA', 'Klingon', false, 99); -- 2. Add Klingon as a spoken language in Great Britain INSERT INTO countrylanguage(isofficial,...
true
0336db27585c5e8a727d78e8d5d14c31a0a3fc4e
SQL
nss-day-cohort-13/chinook-CoryTohill
/total_sales_{year}.sql
UTF-8
223
3.46875
3
[]
no_license
--What are the respective total sales for each of those years? SELECT strftime('%Y', i.InvoiceDate) as Year, SUM (i.Total) FROM Invoice i WHERE i.InvoiceDate LIKE "2009%" OR i.InvoiceDate LIKE "2011%" GROUP BY Year
true
180d43cd1aa4a0819725387c2f6d8b68b50073e1
SQL
RudyWg/Trust_DWBI
/02_数据核对/中航信托业务简表数据核对/1.查询简表数据.sql
GB18030
8,890
3.046875
3
[]
no_license
truncate table temp_20180222_01; drop table temp_20180222_01; create table temp_20180222_01 as select c_proj_code,sum(f_cxgm) as f_cxgm from ( with temp_xmbm as (select t1.d_file, t1.c_file_code, t1.l_row_axis, replace(t1.c_value,' ','') as c_proj_code from datadock.tsg_file_value t1 where (t1.c_item...
true
c23153512bb32cbe34b59998d3ceb5fae509a410
SQL
c3037/upcomcms.ru
/DB-SERVER/2.sql
UTF-8
2,577
4.4375
4
[]
no_license
-- ---------------------------- -- Procedure structure for get_analytics -- ---------------------------- DROP PROCEDURE IF EXISTS `get_analytics`; DELIMITER ;; CREATE DEFINER=`remote`@`%` PROCEDURE `get_analytics`(IN `x_start_date` date, IN `x_days` int(10)) BEGIN SELECT FORMAT(`companies`.`program_company_id`,0) as '...
true
5a6d9c90b8f9b1e274b0e0f5a47a6d5481ec7b16
SQL
naveeniitbhu/AlbumPhotos-JSON
/create_table.sql
UTF-8
373
3.109375
3
[]
no_license
-- create database `ngnaven@gmail.com`; -- USE ngnaven@gmail.com CREATE TABLE album( id INT, userId INT, title VARCHAR(100), PRIMARY KEY(id) ); CREATE TABLE photo( id INT, albumId INT, photoId INT AUTO_INCREMENT, title VARCHAR(100), url VARCHAR(255), thumbnailUrl VARCHAR(255), ...
true
ab6fbc3fd575ff1e1ae027cbb2a0e602a7a57b3f
SQL
amandajuhl95/CupCake
/cupcakeScript.sql
UTF-8
2,300
3.6875
4
[]
no_license
/*CREATE SCHEMA `Cupcakes` ; */ DROP TABLE IF EXISTS `Cupcakes`.`invoice_has_items`; DROP TABLE IF EXISTS `Cupcakes`.`invoice`; DROP TABLE IF EXISTS `Cupcakes`.`user`; DROP TABLE IF EXISTS `Cupcakes`.`cupcake_Bottoms`; DROP TABLE IF EXISTS `Cupcakes`.`cupcake_Toppings`; CREATE TABLE `Cupcakes`.`user` ( `user_id` IN...
true
57c65227e5eaf87c6e4910d8c6c5d6284847908f
SQL
873191303/iclouds
/db/migration/db/V1_4_73__Drop_monitor_item_table_foreign_key.sql
UTF-8
676
2.578125
3
[]
no_license
/** 时间: 2017年7月5日 说明: 修改监控项templateid外键关联;新增字段外键关联本身 前置版本: ICloudsV4.9.pdm 当前版本: ICloudsV4.9.pdm */ ALTER TABLE public.ipm_pft_items ADD templetid INT8 NULL; ALTER TABLE public.ipm_pft_items DROP CONSTRAINT ipm_pft_items_ipm_pft_templates_templateid_fk; ALTER TABLE public.ipm_pft_items ADD CON...
true
b295ca959ddc6be40378e01db0fa291b008caa4c
SQL
DavidAlphaFox/casino_server
/game_server/db/create_table_smxx/temp_task_factor.sql
GB18030
878
3.359375
3
[]
no_license
-- ---------------------------- -- Table structure for `temp_task_factor` -- ---------------------------- DROP TABLE IF EXISTS `temp_task_factor`; CREATE TABLE `temp_task_factor` ( `task_type` tinyint(4) NOT NULL COMMENT '' , `grade` tinyint(4) NOT NULL DEFAULT 0 COMMENT 'Ʒ' , `fact1` float NOT NULL DEFAULT 0 COMMEN...
true
25d0a017c6a3f77f44d136abe4b8edc5c8df9623
SQL
cspace-deployment/cinefiles_jsp
/src/main/scripts/sql/denorm_nightly/doclanguagestring.sql
UTF-8
1,076
3.703125
4
[]
no_license
-- doclanguagestring table used in cinefiles denorm -- -- CRH 2/22/2014 -- -- this script creates a temporary table, which will be renamed -- after all of the denorm tables have been successfully created. -- -- Modified, GLJ 6/16/2014 DROP TABLE IF EXISTS cinefiles_denorm.doclanguagestringtmp; CREATE TABLE cinefiles...
true
bc58707d9b816bfc1577d2cc80e06c1226ab9767
SQL
TYPO3-svn-archive/hype_store
/ext_tables.sql
UTF-8
16,177
3.046875
3
[ "CC-BY-3.0", "CC-BY-2.5" ]
permissive
# Category CREATE TABLE tx_hypestore_domain_model_category ( uid int(11) NOT NULL auto_increment, pid int(11) DEFAULT '0' NOT NULL, tstamp int(11) DEFAULT '0' NOT NULL, crdate int(11) DEFAULT '0' NOT NULL, cruser_id int(11) DEFAULT '0' NOT NULL, sys_language_uid int(11) DEFAULT '0' NOT NULL, l10n_parent int(11) ...
true
630c56147081413bbb72c0295c25bb7ab4a265af
SQL
SAIFX86/tasks
/test_database.sql
UTF-8
3,102
3.203125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.1.0 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jul 05, 2021 at 10:07 AM -- Server version: 10.4.18-MariaDB -- PHP Version: 7.3.27 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIE...
true
9eb87eeb80b4b55ed55a2bfb8f0312baa71eb0ee
SQL
MykolaGalian/SQL
/Query10.sql
UTF-8
1,459
3.984375
4
[]
no_license
--10. Перевести проекты в состояние закрыт, для которых все задачи закрыты и -- задать время закрытия временем закрытия задачи проекта, принятой последне update Project set ProjectFinishDate =ProjectDate.maxDate, ProjectStatus = 'Closed' from (SELECT sub2.ProjectId,sub3.maxDate FROM (select pr.ProjectId, ...
true
e6f82348bde3352e87343ef2e4199dce55ae09c1
SQL
milos01/news_backend
/src/main/resources/db/migration/V30__content_add_rrole_field.sql
UTF-8
183
2.890625
3
[]
no_license
ALTER TABLE `content` ADD COLUMN `r_user_role` VARCHAR(256) NULL DEFAULT NULL AFTER `r_username`; UPDATE content c INNER JOIN user u on c.user_id = u.id SET c.r_user_role = u.role;
true
c3ae063af1fb6de4ace07aaa6120f6aac2e063b6
SQL
J-Zhang104/project3
/contact.sql
UTF-8
1,742
2.921875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.4.15.5 -- http://www.phpmyadmin.net -- -- Host: localhost:3306 -- Generation Time: Dec 21, 2016 at 09:36 PM -- Server version: 5.5.49-log -- PHP Version: 7.0.9 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_...
true
8d8c6de5adbd3c76853a77df330d74e346f3ce53
SQL
shadmin/sporthenon
/sql/Table-WinLoss.sql
UTF-8
1,216
3.84375
4
[]
no_license
-- Table: "WinLoss" -- DROP TABLE "WinLoss"; CREATE TABLE "WinLoss" ( id integer NOT NULL, id_league integer NOT NULL, id_team integer NOT NULL, type character varying(35) NOT NULL, count_win smallint NOT NULL, count_loss smallint NOT NULL, count_tie smallint, count_otloss smallint, id_contributor i...
true
b506c84fbc7f26cd3e62a3ae5c646bff1f932477
SQL
da99/okdoki
/Server/Consume/migrates/001-Consume-table.sql
UTF-8
1,270
3.84375
4
[ "MIT" ]
permissive
CREATE TABLE consume ( id serial NOT NULL PRIMARY KEY, class_id INTEGER NOT NULL, -- Screen_Name :id pub_owner integer NOT NULL, pub_id integer NOT NULL, pub_class_id smallint NOT NULL, -- Scree...
true
367b72ddecaa594dc1596be5af0c2ea3d4f9634f
SQL
gexiangfeng/sell
/tables.sql
GB18030
6,247
3.890625
4
[]
no_license
-- Ŀ create table `product_category` ( `category_id` int not null auto_increment, `category_name` varchar(64) not null comment 'Ŀ', `category_type` int not null comment 'Ŀ', `create_time` timestamp not null default current_timestamp comment 'ʱ', `update_time` timestamp not null default current_times...
true
6ffd74e1c5cc864f447af591d9d2591ef85d6a53
SQL
Cyber-eyes/psifofories
/ballotdb.sql
UTF-8
4,877
3.046875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.1.0 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jul 03, 2021 at 11:31 PM -- Server version: 10.4.18-MariaDB -- PHP Version: 7.3.27 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIE...
true
0cf0d391a6e6a652d4391dd9ef9dae76ef14e125
SQL
simonc99/sql
/tempsegs.sql
UTF-8
538
3.28125
3
[]
no_license
break on report compute sum of MB extents blocks on report set linesize 140 column username for a15 column tablespace for a10 column MB for 999,999.99 column extents for 999,999 column initial_extent for 999,999,999 column next_extent for 999,999,999 column blocks for 999,999,999 select vtu.username, vtu.tablespace, ...
true
d6e8bf4a2afcaf4b6ea37762097a4cde74a8afe7
SQL
rachaelbaumann/SSMS_Student_Files
/Chapter_7/CH 7 LAB 1/CH 7 Scripts/CH 7 Scripts/SubquerySelect.sql
UTF-8
301
3.640625
4
[]
no_license
USE HealthCareSample; -- Get columns from Patient table. -- Count number of visits from OV as correlated subquery SELECT P.PatientID, P.FirstName, P.LastName, (SELECT COUNT(*) FROM OutpatientVisit AS OVInner WHERE OVInner.PatientID = P.PatientID) AS [Visit Count] FROM Patient AS P;
true
34a3e1d5f6f03844f7b5e9f00e6d2bc2cef3bf50
SQL
j120foredeck/bezlio-apps
/roles/sales-rep/trip-planner/sql/Prophet21/trip-planner/GetCustomersWithAddress.sql
UTF-8
1,630
4.1875
4
[ "MIT" ]
permissive
SELECT c.CustID , c.customer_id As CustNum , c.customer_name As Name , c.phys_address1 + ' ' + c.phys_city + ', ' + c.phys_state + ' ' + c.phys_postal_code + ' ' AS Address , gl.Geocode_Location AS Geocode_Location , ct.customer_type AS CustomerType , t.territory_id AS Territory , c.date_acct_opened AS EstDat...
true
dcabf92a2793b4817fa75291cd62cf578f4b75e0
SQL
icesaw/COMP269
/hw_ch7.sql
UTF-8
1,438
4.09375
4
[]
no_license
-- Milovanov Alexey -- comp269 -- hw ch7 -- Solution for ex.1 select category_name from categories c where category_id in (select category_id from products p where c.category_id = p.category_id) order by category_name; -- Solution for ex.2 select product_name, list_price from products where ...
true
fb88da82d08285eab2d78fe29889e2c89dd5f261
SQL
fpbarthel/GLASS
/sql/heatmap/heatmap_clinical.sql
UTF-8
822
3.171875
3
[ "MIT" ]
permissive
SELECT cp.tumor_pair_barcode, cp.case_barcode, (CASE WHEN recurrence_location = 'Distal' THEN 1 WHEN recurrence_location = 'Local' THEN 0 ELSE NULL END) location_distal, (CASE WHEN grade_change = 'Grade up' THEN 1 WHEN grade_change IN ('Grade up', 'Grade stable') THEN 0 ELSE NULL END) grade_change, (CASE WHEN rece...
true
f4f66f7f5e29d7cdf760ef1bc6f7aa7f4d0ed7e7
SQL
mdurular/SQL
/session-3 en.sql
UTF-8
7,725
4.59375
5
[]
no_license
SELECT C.brand_name as Brand, D.category_name as Category,B.model_year as Model_Year, ROUND (SUM (A.quantity * A.list_price * (1 - A.discount)), 0) total_sales_price INTO sale.sales_summary -- Creates New table FROM sale.order_item A -- total sales JOIN product.product B ON A.product_id = B.product_id-- model year...
true
aa7ca2a09f5ff402f5cd9123a70c24a54d640a72
SQL
jzxsWZY/Music-Django
/music_db.sql
UTF-8
23,559
3.34375
3
[]
no_license
/* Navicat Premium Data Transfer Source Server : autotest Source Server Type : MySQL Source Server Version : 80011 Source Host : 127.0.0.1:3306 Source Schema : music_db Target Server Type : MySQL Target Server Version : 80011 File Encoding : 65001 Date: 06/06/2019 10...
true
eaba39152aa96b0a71b7f989419809d0889b3695
SQL
ventsislav04/mssql_dba_scripts
/dmv_missing_indexes.sql
UTF-8
427
3.4375
3
[]
no_license
--SQL Server 2012/2014 select gs.user_seeks, gs.user_scans, gs.last_user_seek, gs.last_user_scan, gs.unique_compiles, db_name(id.database_id) 'database', id.equality_columns, id.[statement] from sys.dm_db_missing_index_group_stats gs join sys.dm_db_missing_index_groups g on g.index_group_handle = gs.group_hand...
true
be63858b1bac81ac1a601d2831f906016befaecc
SQL
tobega/aoc2018
/a4.sql
UTF-8
3,159
4.125
4
[]
no_license
create or replace database a4; use a4; create or replace table raw_entries ( entry varchar(50) not null ); load data local infile '/home/setorgan/aoc2018/a4.txt' into table raw_entries (entry) ; create or replace table entries ( time datetime not null, note varchar(50) not null ); insert into entries select *...
true
dd789c454739b97096a154df8d5b1e7e2a01f094
SQL
maximsan/nodejs-aws-be
/product-service/sql/createProducts.sql
UTF-8
486
2.859375
3
[]
no_license
create table products ( id uuid primary key default uuid_generate_v4(), title text not null, description text, price integer ); -- insert into products (title, description, price) values -- ('Guitar 1', 'Guitar 1 description', 1500), -- ('Guitar 2', 'Guitar 2 description', 1200), -- ('Guitar 3', 'Guit...
true
c1a5e6eab76631d4bb7bbe9eb4092bf7258a04e1
SQL
alexshtilman/db_04
/sql/script.sql
UTF-8
2,983
4.75
5
[]
no_license
-- Update table marks such that all marks for those who don’t have “Java Technologies” mark will be decreased on 20 -- only for postgress UPDATE marks set mark=mark - 20 where stid not in (select stid from students_marks_subjects where subject = 'Java Technologies') -- for mysql without temporary table UPDATE marks S...
true
d24e763bbc9182df06b92e7e1940c01e72836709
SQL
kpn2021/fruitbasket-litchi-distributed-transaction
/txlcn/sql/t_tx_exception.sql
UTF-8
1,176
3.21875
3
[]
no_license
/* Navicat Premium Data Transfer Source Server : localhost_5_7 Source Server Type : MySQL Source Server Version : 50730 Source Host : localhost:3306 Source Schema : tx-manager Target Server Type : MySQL Target Server Version : 50730 File Encoding : 65001 Date: 27/08/...
true
7ad0230bcc4e3e8d98d7df6fd7cedd1bcbce3a38
SQL
johnbcable/UoB
/SQL/Oracle/ALTAHRN/Worklink.sql
UTF-8
2,550
3.421875
3
[]
no_license
-- -- WorkLink.SQL -- Version: 1.0 -- -- Master SQL script to run in sequence all WorkLink SQL scripts in Oracle SQL Developer -- Pre-requisite: Connection to ALTAHRN database -- -- N.B. This version assumes all scripts are located in the E:\INETPUB\WWWROOT\UOB\SQL directory -- -- 1. Create Worklin...
true
96c40c10132ad5370c075beaf473b8dac6f1cc60
SQL
TheCAIRN/eduerp
/setup/1_mysql/patch.20190613.mysql
UTF-8
975
2.984375
3
[ "Apache-2.0" ]
permissive
ALTER TABLE item_gtin_master ADD item_type_code char(2) AFTER department_id; UPDATE item_gtin_master SET item_type_code='SI' WHERE manufacturer_id='4000000'; UPDATE item_gtin_master SET item_type_code='PI' WHERE manufacturer_id='4000001'; UPDATE item_gtin_master SET item_type_code='SI',division_id=2 WHERE manufac...
true
4f7e9fc543abc341a7db9b2993686dbf513e28a2
SQL
Schiavi13/Bases-de-datos
/Consultas/consulta4_2.sql
UTF-8
311
2.953125
3
[]
no_license
/*Hallar el importe medio de pedidos, el importe total de pedidos y el precio medio de venta (el precio de venta es el precio unitario en cada pedido).*/ SELECT CAST(AVG(IMPORTE) AS DECIMAL(9,2)) AS "Media importe", SUM(IMPORTE), CAST(AVG(IMPORTE/CANT) AS DECIMAL(9,2)) AS "Media precio de venta" FROM pedidos;
true
d253c4d391c194c6facf46d163027a5c316f5fbd
SQL
jayraikhere/clubs-iiti
/sql/clubs-iiti.ddl
UTF-8
3,685
3.734375
4
[]
no_license
/*!40101 SET NAMES utf8 */; /*!40014 SET FOREIGN_KEY_CHECKS=0 */; /*!40101 SET SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; /*!40111 SET SQL_NOTES=0 */; CREATE DATABASE /*!32312 IF NOT EXISTS*/ heroku_4bac0100237dacf /*!40100 DEFAULT CHARACTER SET utf8mb4 */; USE heroku_4bac0100237dacf; DROP TABLE IF EXISTS approvals; CREATE ...
true
71fccdcd3484b5e97dbffd73033a6c84eec4c524
SQL
Simik31/KIP-7VYDA
/2020-11-12/db/users.sql
UTF-8
3,183
3.265625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Počítač: 127.0.0.1 -- Vytvořeno: Čtv 12. lis 2020, 10:48 -- Verze serveru: 10.4.14-MariaDB -- Verze PHP: 7.4.10 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CH...
true
d43c3ba0d7d2dc90925712c32676bbb6d3eecdca
SQL
LuGeorgiev/SoftUniDBBasicMSSQL
/DataDefinitionAndDataTypes/P07_P013_People/P12_SetUniqueAndCorrectPK.sql
UTF-8
227
3.328125
3
[ "MIT" ]
permissive
ALTER TABLE Users DROP PK_Users ALTER TABLE Users ADD CONSTRAINT PK_ID PRIMARY KEY (ID); ALTER TABLE Users ADD CONSTRAINT uq_Username UNIQUE (Username) ALTER TABLE Users ADD CONSTRAINT Userrname_Len_2 CHECK(LEN(Username)>2)
true
5179753d2ee5fe6d51b76ec02ec1be46a4465ff9
SQL
davidjwyang/data-management-analysis
/loan data analysis sql/queries.sql
UTF-8
2,399
4.5
4
[]
no_license
-- write your queries underneath each number: -- 1. the total number of rows in the database SELECT COUNT(*) FROM loans; -- 2. show the first 15 rows, but only display 3 columns (your choice) SELECT inc_bracket, loan_num, loan_amnt::MONEY FROM loans LIMIT 15; -- 3. do the same as above, but chose a column to so...
true
26b5a5bd74ca1a1ab1ab26cd136e32c6697b1fde
SQL
raficelkouche/bootcampx
/2_queries_joins/1_student_total_assignment_duration.sql
UTF-8
164
3.140625
3
[]
no_license
SELECT sum(duration) AS total_duration FROM assignment_submissions JOIN students ON students.id = assignment_submissions.student_id WHERE students.name = 'Ibrahim Schimmel'
true
dcfb9f83102d12c13f2dc94bdfbdaa07484b86c0
SQL
DanielMuthupandi/FAST
/FAST/vsql/SFDC/SF_Pipeline_Matrix_Development_Plan__c.sql
UTF-8
13,153
3.1875
3
[]
no_license
/**** ****Script Name : SF_Pipeline_Matrix_Development_Plan__c.sql ****Description : Incremental data load for SF_Pipeline_Matrix_Development_Plan__c ****/ /*Setting timing on */ \timing /**SET SESSION AUTOCOMMIT TO OFF;**/ --SET SESSION AUTOCOMMIT TO OFF; \set ON_ERROR_STOP on CREATE LOCAL TEMP TABLE Start_Ti...
true
c5c01bd92838dc11f2c38b832f31fa8fb3273478
SQL
rene-d/pypim
/tools/stats.sql
UTF-8
464
2.90625
3
[ "Unlicense" ]
permissive
attach database 'pypi.db' as A; attach database 'pypi_json.db' as M; .changes on select count(*) from A.package; select count(*) from M.package; --select name from A.package where name not in (select name from A.list_packages); --select name from A.list_packages where name not in (select name from A.package); select...
true
0b79647273528218c85d314b6042b7c82ff7b41f
SQL
vgoel38/PQET
/inputs/really_final_outputs/original/without_mj/19b.sql
UTF-8
6,944
2.6875
3
[]
no_license
QUERY PLAN --------------------------------------------------------------------------------------------------------------------...
true
5af97c81bcabccb13968e10d5b271b537a27ae3b
SQL
paulomilitante2017/paulomilitante.github.io
/mod10-01/blog/blog.sql
UTF-8
3,994
3.140625
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.6.5.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Feb 06, 2018 at 09:41 AM -- Server version: 10.1.21-MariaDB -- PHP Version: 7.1.2 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET...
true
8daf34e32a6cab533401fc0a842ec0f69b1de558
SQL
antiguru/postgres
/contrib/sprocket/sprocket--1.0.sql
UTF-8
656
2.78125
3
[ "PostgreSQL" ]
permissive
/* contrib/sprocket/sprocket--1.0.sql */ -- complain if script is sourced in psql, rather than via CREATE EXTENSION \echo Use "CREATE EXTENSION sprocket" to load this file. \quit CREATE SCHEMA IF NOT EXISTS sprocket; REVOKE ALL ON SCHEMA sprocket FROM public; CREATE TABLE IF NOT EXISTS sprocket.sandboxes ( ...
true
7bf315c5cc556737bec573f91cbd5a9af106f543
SQL
LuzHENRIQUEZ/Parcial-POO
/crud_tareas.sql
UTF-8
1,869
3.046875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.1 -- https://www.phpmyadmin.net/ -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 01-11-2020 a las 00:24:23 -- Versión del servidor: 10.4.11-MariaDB -- Versión de PHP: 7.2.28 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00";...
true
31fb951781af24f208270d4e14cf32899650e3ed
SQL
mattharkness/sixthdev
/buggernaut/buggernaut.sql
UTF-8
469
2.65625
3
[]
no_license
-- MySQL dump 8.8 -- -- Host: localhost Database: zike_plan ---------------------------------------------------------- -- Server version 3.23.23-beta create table bug_area ( ID int not null auto_increment primary key, area varchar(32) ); create table bug_task ( ID int not null auto_increment primary k...
true
7fa2ca565b7e03167617d6d4567446671e34fb85
SQL
imxushuai/erp
/sql/windows/export_sql/storealert.sql
UTF-8
487
3.640625
4
[ "Apache-2.0" ]
permissive
CREATE OR REPLACE FORCE VIEW "ERPUSER"."VIEW_STOREALERT" ("UUID", "NAME", "STORENUM", "OUTNUM") AS select a.uuid,a.name,a.storenum,b.outnum from ( select g.uuid,g.name,sum(nvl(num,0)) storenum from goods g, storedetail s where g.uuid = s.goodsuuid(+) group by g.uuid,g.name ) a, ( select ol.goodsuuid,sum(o...
true
ce44e00e80f5ac9c336417f059b849a7dc4934b1
SQL
happyssun96/JSP_Book_Excersice
/JSPBook/WebContent/ch15/student.sql
UHC
792
3.328125
3
[]
no_license
CREATE TABLE IF NOT EXISTS Student( num int NOT NULL, depart VARCHAR(20), name VARCHAR(30), address VARCHAR(50), phone VARCHAR(20), PRIMARY KEY(num) ); INSERT INTO Student VALUES(2018100001, 'ϰ', 'ȫ', '', '010-9002-1234'); INSERT INTO Student VALUES(2018100002, 'ϰ', 'ȫ浿', '⵵', '010-2009-4321'); INSERT INTO Stude...
true
a976f1b87d400c8f394936cb5160d901e8d3f4ee
SQL
NikBelarus/stock
/core/src/main/resources/db/changelog/2019-08-27-4-add-pricelist-to-company.sql
UTF-8
220
2.84375
3
[]
no_license
ALTER TABLE company ADD COLUMN pricelist_id BIGINT NOT NULL DEFAULT 1; ALTER TABLE company ADD CONSTRAINT company_pricelist_id_foreign FOREIGN KEY (pricelist_id) REFERENCES pricelist(id) ON DELETE RESTRICT;
true
8d0a95f2a6ab8f0234b3f1c4cf12933709d5fa0e
SQL
unepwcmc/SAPI
/db/views/api_common_names_view/20141223160054.sql
UTF-8
228
3.171875
3
[ "BSD-3-Clause" ]
permissive
SELECT taxon_commons.id, taxon_concept_id, languages.iso_code1, common_names.name FROM taxon_commons JOIN common_names ON common_names.id = taxon_commons.common_name_id JOIN languages ON languages.id = common_names.language_id;
true
4a160f21eacf38fc01856bb61a66d3162fc7189d
SQL
CoolCodeTeam/2019_2_CoolCodeMicroServices
/sql/chats_users.sql
UTF-8
225
2.875
3
[]
no_license
DROP TABLE IF EXISTS chats_users CASCADE; CREATE TABLE chats_users ( isAdmin BOOLEAN NULL, chatID BIGINT NOT NULL, userID BIGINT NOT NULL, FOREIGN KEY (chatID) REFERENCES chats (ID) ON DELETE CASCADE );
true
4411eccc70476752f76f7efc36cc6dad0b448084
SQL
lizliu2015/Data-Analyst-SQL-Questions
/183. Customers Who Never Order.sql
UTF-8
113
2.75
3
[]
no_license
select name as Customers from customers c left join orders o on o.customerid = c.id where o.customerid is null;
true
ccd95df87b2ba89a5abb00a183d5e07d288e24ca
SQL
LEEANQIAN/leetcode-practice-SQL
/# 1264. Page Recommendations (Medium).sql
UTF-8
441
4.03125
4
[]
no_license
# 1264. Page Recommendations (Medium) WITH friend_T AS ( SELECT * FROM (SELECT user2_id AS friends FROM Friendship WHERE user1_id = 1) AS T UNION (SELECT user1_id AS friends FROM Friendship WHERE user2_id = 1) ), likes_T AS ( SELECT page_id FROM Likes WHERE user_id = 1 ) SELECT DISTINCT page_id AS reco...
true
39f32f35f6f9ad9242e0af777c2e0c202c18f711
SQL
jrlevine/eaicheckzone
/eaimail.sql
UTF-8
2,194
3.15625
3
[ "BSD-2-Clause" ]
permissive
-- -- Table structure for table eaimail -- -- Copyright 2019-2020 Standcore LLC -- -- Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: -- -- 1. Redistributions of source code must retain the above copyright notice, this list ...
true
f936de7a3ab25a5994d63018ba6d2c14ba396aef
SQL
carlosbRamirez/reto.4
/factura.sql
UTF-8
175
2.703125
3
[]
no_license
create table factura( fac_id integer primary key, fac_nombre_empresa text, fac_fecha text, fac_ciudad text, cli_id integer, foreign key (cli_id) references cliente (cli_id) );
true
a0e3dd879e1e6b9cdb862d5f1efe134d87cad4e9
SQL
anggadarkprince/learn-sql
/dql/explain.sql
UTF-8
249
3.921875
4
[]
no_license
-- explain what query does EXPLAIN SELECT * FROM ( SELECT user_id, SUM(total) AS total FROM transactions GROUP BY user_id ) AS user_transactions WHERE total > 500000; EXPLAIN SELECT * FROM users WHERE id = (SELECT MAX(user_id) FROM user_logs);
true
3f3f9439c21484d42717187d40275f49763ba0d5
SQL
ZJiaYi/ITMO_ICT_DataBases_2020
/students/k3243/Korovin_Daniil/lr3/lab.sql
UTF-8
8,556
3.328125
3
[]
no_license
CREATE SCHEMA enroll_comission; --создание таблиц: --создание таблицы школ CREATE TABLE enroll_comission."School" ( "Name" character varying(40) COLLATE pg_catalog."default" NOT NULL, "Graduation_date" date NOT NULL, "School_location" character varying(50) COLLATE pg_catalog."default" NOT NULL, CONSTRAINT "School...
true
7fc43e3882ffdbbafc885d140a605eee6da354cb
SQL
Zyco-tv/All-project-A2
/lab/BACK/Lyon php todoObjet/doc/sql.sql
UTF-8
842
3.859375
4
[]
no_license
CREATE DATABASE todolist; USE todolist; CREATE TABLE user ( id INT UNSIGNED NOT NULL AUTO_INCREMENT, username VARCHAR(255) NOT NULL UNIQUE, password VARCHAR(255) NOT NULL, user_id INT UNSIGNED NOT NULL, PRIMARY KEY (id) ); CREATE TABLE todo_list ( id INT UNSIGNED NOT...
true
2770e2f432f18cbaa437c49a3c771fc387b60d77
SQL
priyankamergu/MyAllProjects
/sql/onlineshopping (2).sql
UTF-8
8,801
2.78125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.9.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Dec 11, 2019 at 05:36 AM -- Server version: 10.4.8-MariaDB -- PHP Version: 7.3.10 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
true
9c2096fd6a84ceed269a639e526b69df0406d201
SQL
dsdiazm/examenIngreso
/EXAMEN DE INGRESO/database/base de datos.sql
UTF-8
4,180
3
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.1.0 -- https://www.phpmyadmin.net/ -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 16-03-2021 a las 15:39:01 -- Versión del servidor: 10.4.18-MariaDB -- Versión de PHP: 8.0.3 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_...
true
9ebf92b3b55d026fe1a6614e18b522d9fcc53292
SQL
ivany9/Employee-Management-System
/db/schema.sql
UTF-8
777
3.765625
4
[ "ISC" ]
permissive
DROP DATABASE IF EXISTS employee_manager_db; CREATE DATABASE employee_manager_db; USE employee_manager_db; CREATE TABLE IF NOT EXISTS department ( id INT NOT NULL AUTO_INCREMENT, name_department VARCHAR(30), PRIMARY KEY (id) ); CREATE TABLE IF NOT EXISTS roles ( id INT NOT NULL AUTO_INCREMENT, title VAR...
true
b4d35a2ee4d9cd3582897b0b1ef2732c0032aa87
SQL
xfusek08/RegistrationProject
/SQL/Sys/DB/V1_00/Build/V1_00_00_02/tables/sy_tstate.sql
UTF-8
940
3.484375
3
[]
no_license
echo sy_tstate CREATE TABLE sy_tstate ( sytst_pk ND_CODE NOT NULL, sytst_fstdiagram ND_CODE NOT NULL, sytst_vname ND_TEXT NOT NULL, sytst_bstarting ND_BOOL NOT NULL, sytst_bending ND_BOOL NOT NULL ); ALTER TABLE sy_tstate ADD CONSTRAINT pk_sytst PRIMARY KEY (sytst_pk); alt...
true
beb33ffc1a29e2cbb2042655edebc13be8eea59e
SQL
mcarte96/CPSC-4620
/PopulateData.sql
UTF-8
8,741
2.921875
3
[]
no_license
# Matthew Carter Dylan Wilcox # BASE_PRICE TABLE insert statements INSERT INTO BASE_PRICE VALUES ('1','small','Thin','3','0.5'); INSERT INTO BASE_PRICE VALUES ('2','small','Original','3','0.75'); INSERT INTO BASE_PRICE VALUES ('3','small','Pan','3.5','1.0'); INSERT INTO BASE_PRICE VALUES ('4','small','Gluten-Free','4.0...
true
8d4c6b4c716b78df64ef93ff9a3f3bcd6c05b9ca
SQL
MargaretLangley/letting
/db/structure.sql
UTF-8
33,198
3.5625
4
[]
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; -- -- Name: plpgsql; Type: EXTENSION; Schema: -; Owner: - -- CREATE EXTENSION IF NOT EXISTS plpg...
true
edffffe7409975e7c9a0c436db1d36d9dbde8638
SQL
duquettelr/Burger
/seeds.sql
UTF-8
195
2.5625
3
[]
no_license
Create database burgers_db; Use burgers_db; Create Table burgers ( id int(11) NOT NULL AUTO_INCREMENT, burger_name VARCHAR (255) NOT NULL, devoured BOOLEAN NOT NULL default 0, PRIMARY KEY (id) );
true
e3ff481fcdb2572f7d270e72ef4975a411d6b063
SQL
shcho-isle/my-crud
/init_script.sql
UTF-8
1,032
3.78125
4
[]
no_license
CREATE DATABASE IF NOT EXISTS test COLLATE utf8_general_ci; USE test; DROP TABLE IF EXISTS user; CREATE TABLE USER ( id BIGINT NOT NULL UNIQUE AUTO_INCREMENT, name VARCHAR(25) NOT NULL, age INT(3) NOT NULL, is_admin BIT NOT NULL, created_date TIMESTAMP NO...
true
d833f167ceeee056c2f7f523f07d71c9145011a7
SQL
skeema/skeema
/internal/tengo/testdata/views.sql
UTF-8
462
3.09375
3
[ "Apache-2.0", "LicenseRef-scancode-free-unknown" ]
permissive
# This open source package does not support views, but even so, presence of # views generally shouldn't break functions in this package. This test file # contains two views, to be used in tests that confirm behavior with views # present. use testing; CREATE SQL SECURITY INVOKER VIEW view1 AS SELECT curdate() AS `curr...
true
66821ccfdb35370f8b18a93d5f6e1a879ba4fb6d
SQL
s0hv/playlist-checker
/db/migrations/20220109152125_extra_video_files.sql
UTF-8
311
2.875
3
[ "MIT" ]
permissive
-- migrate:up CREATE TABLE extra_video_files ( video_id BIGINT UNIQUE NOT NULL REFERENCES videos(id) ON DELETE CASCADE, thumbnail TEXT DEFAULT NULL, info_json TEXT DEFAULT NULL, other_files JSON DEFAULT NULL ); CREATE INDEX video_file_id_index ON extra_video_files (video_id); -- migrate:down
true
9239bd6d8474baa454d284ed8095df02857afb41
SQL
prjromy/ChannakyaBase
/ChaBase/fin/Tables/StatusChangeLog.sql
UTF-8
453
2.6875
3
[]
no_license
CREATE TABLE [fin].[StatusChangeLog] ( [LogStatusID] INT IDENTITY (1, 1) NOT NULL, [IAccNo] BIGINT NOT NULL, [TDate] SMALLDATETIME NOT NULL, [UserID] SMALLINT NOT NULL, [AccState] SMALLINT NOT NULL, [ChangeOn] DATETIME CONSTRAINT [DF_StatusC...
true