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
77525e1a3034c7914d6cc5b2abf5615e61263e27
SQL
wsxiansuo/express-loaddata
/sxs_poem_types.sql
GB18030
6,808
2.765625
3
[]
no_license
-- Table: sxs_poem_types CREATE TABLE sxs_poem_types ( id INTEGER PRIMARY KEY ASC AUTOINCREMENT UNIQUE, pid INTEGER NOT NULL DEFAULT ( 0 ), name VARCHAR, count INTEGER ); INSERT INTO [sxs_poem_types] ([id], [pid], [name]) VALUES (1, 0, ''); INSERT INTO [sxs_poem_...
true
1e9e5125fb275dbe8b4a68c3177f1b62686772da
SQL
mediawiki-utilities/python-mwmetrics
/sql/ordered_user_dates.sql
UTF-8
336
3.484375
3
[ "MIT" ]
permissive
SELECT DATABASE() AS wiki_db, user.user_id, user.user_registration, LEAST( IFNULL(MIN(rev_timestamp), MIN(ar_timestamp)), IFNULL(MIN(ar_timestamp), MIN(rev_timestamp)) ) AS first_edit FROM user LEFT JOIN revision ON rev_user = user_id LEFT JOIN archive ON ar_user = user_id ORDER B...
true
8c181c9f1f0172786691039ae7b9559747dc5858
SQL
divmid/StressIntensityFactorDatabase
/sifator.sql
UTF-8
5,699
2.796875
3
[]
no_license
/* SQLyog Ultimate v10.00 Beta1 MySQL - 5.7.28-log : Database - sifator ********************************************************************* */ /*!40101 SET NAMES utf8 */; /*!40101 SET SQL_MODE=''*/; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECK...
true
b5fc0aaa93326353f3eda77d1f04122c04b38c9b
SQL
L-santos/closure-forums
/sql/install.sql
UTF-8
896
2.890625
3
[ "MIT" ]
permissive
INSERT INTO `status` (`id`, `value`) VALUES (1, 'APPROVED'); INSERT INTO `status` (`id`, `value`) VALUES (2, 'PENDING'); INSERT INTO `status` (`id`, `value`) VALUES (3, 'BLOCKED'); INSERT INTO `user_status` (`id`, `value`) VALUES (1, 'ACTIVE'); INSERT INTO `user_status` (`id`, `value`) VALUES (2, 'INACTIVE'); INSERT ...
true
d7880ddc2a352aea5be20778ade6faca8294082b
SQL
Claire0505/MVC5CourseHomework
/客戶資料加聯絡人數量加銀行帳戶數量.sql
UTF-8
303
4.03125
4
[]
no_license
select A.Id, A.[客戶名稱], COUNT(DISTINCT B.Id) AS ContantCount, COUNT(DISTINCT C.ID) AS BankCount from [客戶資料] A left join dbo.[客戶聯絡人] B ON B.[客戶Id] = A.Id left join dbo.[客戶銀行資訊] C ON C.[客戶Id] = A.Id Group by A.Id, A.[客戶名稱]
true
61cf9aaf0954d6ea5bdf8da5badcd019750a4cc2
SQL
jolth/skeleton_pymer
/sql/schema_old.sql
UTF-8
7,463
3.984375
4
[]
no_license
-- sessiones web.py CREATE TABLE sessions ( session_id char(128) UNIQUE NOT NULL, atime timestamp NOT NULL default current_timestamp, data text ); -- usuarios CREATE TABLE users ( id integer primary key asc, username varchar(10) UNIQUE NOT NULL, password varchar(10) ); --** CLIENTES **-- -- Tipos de Docu...
true
ff245b31353011af0699ac715740c6905914da6c
SQL
juniorasmat22/indicadores
/recursos/sql/sp/sp_persona_crud.sql
UTF-8
1,745
4.0625
4
[]
no_license
use enfermeriaunt; DELIMITER $$ DROP procedure if exists sp_persona_crud $$ CREATE PROCEDURE sp_persona_crud( idPersona int, nombre varchar(50), apellido varchar(50), dni varchar(8), estado int, opcion int, pagina int ) BEGIN declare registrosPagina int; declare limiteInferior int; -- crear if o...
true
874148642943670aa438828be44e5136a9acf32d
SQL
BillXu/MJGame
/Server/Bin/dbsql/gamedb/createNewRegisPlayerData.sql
UTF-8
602
2.75
3
[]
no_license
DELIMITER $$ CREATE DEFINER=`root`@`127.0.0.1` PROCEDURE `CreateNewRegisterPlayerData`( IN nNewUserUID int unsigned, IN strName varchar(200) ) BEGIN declare nOutRet tinyint unsigned default 0 ; declare nRowCnt tinyint unsigned default 0 ; declare nInsertCnt tinyint unsigned default 0 ; # inte playerbasedata ins...
true
7bff903804fdf5a80ac4f5d2b3a4ea814149bcf8
SQL
ranakaratoprak/CSharpOOP
/SQLQuery2.sql
UTF-8
1,080
3.9375
4
[]
no_license
select ContactName Adi,CompanyName SirketAdi, City Sehir from Customers select * from Customers where City = 'London' select * from Products where CategoryID=1 or CategoryID=3 select * from Products where CategoryID=1 and UnitPrice<=10 select * from Products where CategoryID=1 order by UnitPrice desc select count...
true
854cc661a5c4bfd5305c2d97e957483203720a71
SQL
Mulodo-Java-Training/miniblog-nguyen.phuc
/doc/backend/db/MiniBlog_DB_NguyenPhuc.sql
UTF-8
3,804
3.421875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.2.10 -- http://www.phpmyadmin.net -- -- Host: localhost:8889 -- Generation Time: Jan 15, 2015 at 03:34 AM -- Server version: 5.5.38 -- PHP Version: 5.6.2 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; -- -- Database: `mini_blog` -- -- ----------...
true
8ba080c6b302ff87be4bc5dcf621c5447069cb69
SQL
moisesfgfgdfg/TareaABD
/POSTGRESQL/POSTGRESQL.sql
UTF-8
5,034
3.859375
4
[]
no_license
/*==============================================================*/ /* Table: ABONOFACTURA */ /*==============================================================*/ create table ABONOFACTURA ( IDABONO INT4 not null, RUCCLIENTE INT4 ...
true
82eb48ddfd1617800095e1ba6eb537b625568762
SQL
PlainSightAnalytics/WCG
/WCG_DW/model/Views/_APP Targets.sql
UTF-8
732
2.53125
3
[]
no_license
 CREATE VIEW [model].[_APP Targets] AS ------------------------------------------------------------------------------------------ -- Author : Generated from Model -- Date Created : 26 May 2018 3:45:41 PM -- Reason : Semantic View for dbo.FactAPPTargets -- Modified By ...
true
da2257d8190815d706c579624ca33751e15fe5e9
SQL
dgalic/BankBDav
/src/creationTables.sql
UTF-8
3,738
3.734375
4
[]
no_license
-- Creation de type CREATE TYPE type_paiement AS ENUM ('especes','cheque','carte','virement'); CREATE TYPE type_compte AS ENUM('AND', 'OR'); -- Creation des tables CREATE TABLE personne ( id_personne SERIAL UNIQUE PRIMARY KEY, nom_personne TEXT NOT NULL, prenom_personne TEXT NOT NULL ); CREATE TABLE banqu...
true
bbe0dcb07af10fdad05816aec04a8b361e46d87c
SQL
intCCP/CCP
/Produzione/Viste/qzv_st_mis_abi.sql
IBM852
2,006
2.84375
3
[]
no_license
/* Formatted on 17/06/2014 17:58:55 (QP5 v5.227.12220.39754) */ CREATE OR REPLACE FORCE VIEW MCRE_OWN.QZV_ST_MIS_ABI ( COD_ABI, ORD_ABI, DES_ISTITUTO, DES_BREVE, ORD_TIPO_ABI, DES_TIPO_ABI, FLG_OUTSOURCING, FLG_OUTSOURCING_DRC, FLG_TARGET ) AS SELECT COD_ABI, ORD_ABI, ...
true
0b785cdf1e0e0fc459ccb067ee886ab9b4cfb8a4
SQL
IntegralDefense/ACE
/sql/create_unittest_db_user.sql
UTF-8
1,167
2.53125
3
[ "Apache-2.0" ]
permissive
DROP USER IF EXISTS 'ace-unittest-user'@'localhost'; FLUSH PRIVILEGES; CREATE USER 'ace-unittest-user'@'localhost' IDENTIFIED BY 'ACE_DB_USER_PASSWORD'; GRANT SELECT, INSERT, UPDATE, DELETE ON `ace-unittest`.* TO 'ace-unittest-user'@'localhost'; GRANT SELECT, INSERT, UPDATE, DELETE ON `brocess-unittest`.* TO 'ace-unitt...
true
0acc675957b15222fcbf3eb57593e7b6c3174aa2
SQL
jschech1/Bamazon
/Bamazon.sql
UTF-8
1,327
3.46875
3
[]
no_license
DROP DATABASE IF EXISTS bamazon_db; CREATE DATABASE bamazon_db; USE bamazon_db; CREATE TABLE products ( id INT NOT NULL AUTO_INCREMENT, product VARCHAR(50) NOT NULL, department VARCHAR (50) NOT NULL, price DECIMAL(6,2) NOT NULL, numLeft INT NOT NULL, PRIMARY KEY (id) ); INSERT INTO products (product, department, pri...
true
469e894ee9f19355f84ad126bae2118ce4465c66
SQL
dbp/housetab
/migrations/1.sql
UTF-8
833
3.171875
3
[]
no_license
DROP TABLE log; CREATE TABLE emails ( id serial PRIMARY KEY, account_id integer NOT NULL REFERENCES accounts(id), email text NOT NULL, verified_at timestamptz NOT NULL, token text NOT NULL DEFAULT md5(random()::text) ); CREATE TABLE authentications ( id serial PRIMARY KEY, created_at times...
true
48bfd0c940edbc3ca5800901e4e68a32f6a33e05
SQL
jamese03/SQLWork
/James SQL/Assignment7.sql
UTF-8
503
3.015625
3
[]
no_license
-- James English Homework 6 -- CREATE TABLE propertyTable(propertyID char(10) unique not null, town varchar(30) not null, lot integer not null, value integer not null, taxmap integer not null, propertyOwner varchar(50), primary key(propertyID, town)); CREATE TABLE townTable(taxrate integer(10) not null, town varc...
true
1060af2eb4f569faeb672ac73f96935466066b50
SQL
Neo2308/ManageRight
/manageright/data.sql
UTF-8
20,974
3.09375
3
[]
no_license
-- MySQL dump 10.13 Distrib 8.0.17, for Linux (x86_64) -- -- Host: localhost Database: manageRight -- ------------------------------------------------------ -- Server version 8.0.17 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;...
true
5c12d1cb14b0738dbc2ff4c8bb3cfec0b7476fc9
SQL
clemabro/GestionEcole
/sql/gestion_ecole_structure.sql
WINDOWS-1250
7,465
3.40625
3
[]
no_license
#------------------------------------------------------------ # Script MySQL. #------------------------------------------------------------ #------------------------------------------------------------ # Table: Niveau #------------------------------------------------------------ CREATE TABLE Niveau( i...
true
add4f3050713b24fc7b8b4eed13d145cbb3a05da
SQL
robertrico/DataManager
/DB/user_instance.sql
UTF-8
318
3.34375
3
[]
no_license
CREATE TABLE users_instances( id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY, user_id INT UNSIGNED NOT NULL, instance_id INT UNSIGNED NOT NULL, created DATETIME DEFAULT NULL, modified DATETIME DEFAULT NULL, FOREIGN KEY (user_id) REFERENCES users(id), FOREIGN KEY (instance_id) REFERENCES instances(id) );
true
6c621c076804df6fcdc66bd62823f7a649207356
SQL
indunilasanka/travel-data-crawler
/ddl.sql
UTF-8
516
2.59375
3
[]
no_license
CREATE TABLE `location` ( `id` int NOT NULL AUTO_INCREMENT, `name` varchar(45) DEFAULT NULL, `parent_id` int DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1; INSERT ...
true
a2762f45b069eb396996e8d601e7be6d449e83d2
SQL
nobregareinaldo/Desafio-Python
/Scripts MySQL/script.sql
UTF-8
746
2.953125
3
[]
no_license
CREATE DATABASE `db_desafio`; USE `db_desafio`; CREATE TABLE `tb_clientes` ( `cliente_id` int NOT NULL AUTO_INCREMENT, `cliente_nome` varchar(35) NOT NULL, `cliente_sobrenome` varchar(35) NOT NULL, `cliente_email` varchar(64) NOT NULL, `cliente_end_com` varchar(45) NOT NULL, `cliente_end_res` var...
true
a5367d5ee2a15fdafc2bbb8a06399d213250c5b5
SQL
mengtest/cao
/整合包/202002/09最新版本佣兵委托任务调整制作一哀嚎神殿/20200224[终焉誓约][任务脚本]最新版本佣兵委托任务调整制作一哀嚎神殿(倪祖伟)V1.0/刷库sql/20200224[终焉誓约][任务脚本]最新版本佣兵委托任务调整制作一哀嚎神殿(倪祖伟)V1.0.sql
UTF-8
2,026
2.625
3
[]
no_license
################################################### #20200224[终焉誓约][任务脚本]最新版本佣兵委托任务调整制作一哀嚎神殿(倪祖伟) #by:倪祖伟 #date:2020-02-24 #论坛链接:http://forum.nderp.99.com/Forum/TopicList-362270.aspx ################################################### #注释部分 #DELETE FROM `gen_event` WHERE `id` in (20010311,20010312,20010313); #DELETE FR...
true
15d2bddaa0603b1fadbc4b10478efc5fae74271f
SQL
ink-rhyme/Object
/Demo/QtDemo/SQL/SQLQuery1.sql
GB18030
1,663
3.515625
4
[]
no_license
use webInfo --Ϣ create table infoTab ( ± nvarchar(255) not null primary key, nvarchar(50), ʱ char(20), ժҪ nvarchar(max), char(10), char(10) ) alter table infoTab alter column char(9) insert into infoTab values('3','','','','00000','11111') insert into infoTab values('ѧϰʵս֮һ ѧϰ','...
true
1c0397bb7bc5612554225803a187a6143fe81e98
SQL
navikt/familie-ba-sak
/src/main/resources/db/migration/V49__ident_tabell.sql
UTF-8
430
3.265625
3
[ "MIT" ]
permissive
CREATE TABLE FAGSAK_PERSON ( ID BIGINT PRIMARY KEY, FK_FAGSAK_ID BIGINT NOT NULL, IDENT VARCHAR(50) NOT NULL, OPPRETTET_AV VARCHAR(512) DEFAULT 'VL', OPPRETTET_TID TIMESTAMP(3) DEFAULT localtimestamp ); CREATE SEQUENCE FAGSAK_PERSON_SEQ INCREMENT BY 50 STAR...
true
60bc1c81666b8a9c160cab0f92eb088b1afb8416
SQL
spradh/HackerRank
/SQL/Aggregation/Weather Observation Station 20.sql
UTF-8
339
3.734375
4
[]
no_license
set @ct := (select count(1) from station); /* Storing count of all records in ct*/ set @row_id := 0; /*Creating an index to keep count of rows so that we can get to the middle value*/ select round(avg(lat_n),4) as median from (select * from station order by lat_n) as t1 where (select @row_id:= @row_id +1) between @ct/...
true
46f2103653cc358346e06e745d5807a769258858
SQL
ByExperience/phalcon-framework
/schemas/example.sql
UTF-8
1,012
2.796875
3
[]
no_license
-- -- Table structure for table `users` -- DROP TABLE IF EXISTS `users`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `users` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `username` varchar(32) COLLATE utf8_unicode_ci NOT NULL, `pass...
true
340c145ba662cc4927018c0db8f336471ee13be1
SQL
leandrolannister/mysql
/FUNÇÕES/FLOOR.sql
UTF-8
350
2.90625
3
[]
no_license
DROP DATABASE IF EXISTS estudos; CREATE DATABASE estudos; use estudos; CREATE TABLE produtos (id int auto_increment primary key, nome varchar(50), quantidade decimal(10,2), preco decimal(10,2)); INSERT INTO produtos(nome, quantidade, preco) values('Caneta',1, 301.99); SELECT FLOOR(preco) AS 'Peço arredondado para ...
true
06cb97d110c8aba9868bd91dc2e6c5eaa1560dc1
SQL
BrandonVA/Employee-Tracker
/db/seed.sql
UTF-8
1,231
2.84375
3
[ "MIT" ]
permissive
INSERT INTO department (department_name) VALUES ('Software'); INSERT INTO department (department_name) VALUES ('Looney Bin'); INSERT INTO role (title, salary, department_id) VALUES ('Software Lead', 200000, 1); INSERT INTO role (title, salary, department_id) VALUES ('Engineer', 100000, 1); INSERT INTO role (title, sal...
true
16a90fb71b625b57d8382e8b438d20742c65b988
SQL
BigDataManagement/Gestion-de-Datos
/Pentaho/Pentaho.sql
UTF-8
1,622
3.828125
4
[]
no_license
CREATE SCHEMA Pentaho; DROP TABLE IF EXISTS Pentaho.dim_time; CREATE TABLE Pentaho.dim_time( date_id int auto_increment, rental_date datetime, is_date date, full_date varchar(256), is_day int, is_month varchar(10), is_year int, is_quarter int, is_week int, day_of_month int, day...
true
16bb7a076b89d702512f75782015c0da7dc34761
SQL
ashanthwal/CS50
/problemset7/movies/13.sql
UTF-8
225
3.390625
3
[]
no_license
SELECT DISTINCT name FROM stars join people ON stars.person_id = people.id WHERE movie_id IN (SELECT movie_id FROM people JOIN stars ON stars.person_id = people.id WHERE birth = 1958 AND name = "Kevin Bacon") AND NAME != "Kevin Bacon";
true
146fad0eb46883b7990892278da3039d018de3f5
SQL
EliasLuiz/ProjetoPW
/documentacao/mydbredux.sql
UTF-8
8,300
3.09375
3
[]
no_license
-- MySQL Script generated by MySQL Workbench -- Mon 29 Dec 2014 05:56:29 PM BRST -- 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_...
true
5874da912bc98ad4d48ad6afbd63b670970ea5cf
SQL
WeltonLSantos/bcc
/Workbanch/code.sql
UTF-8
1,369
3.046875
3
[ "MIT" ]
permissive
-- MySQL Script generated by MySQL Workbench -- 12/15/15 22:19:16 -- 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='TRADITION...
true
051e685b4fba853be8ea0b92885aa749b8b2edb3
SQL
ccwwonebyone/vuelar
/install/gitlar.sql
UTF-8
3,140
3.40625
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : localhost Source Server Version : 50553 Source Host : localhost:3306 Source Database : vuelar Target Server Type : MYSQL Target Server Version : 50553 File Encoding : 65001 Date: 2017-05-03 15:16:21 */ SET FOREIGN_KEY_CHECKS=0; -- --...
true
25b4740b76150d4043e42879346deff65aa02b2f
SQL
mateusleiteaalmeida/trybe
/Back-end/block_21/day_2/exerc12.sql
UTF-8
337
3.671875
4
[]
no_license
SELECT m.title FROM Pixar.Movies AS m INNER JOIN Pixar.BoxOffice AS b ON b.movie_id = m.id WHERE b.international_sales >= 500000000 AND m.length_minutes > 110; SELECT m.title FROM Pixar.Movies AS m WHERE m.id IN ( SELECT b.movie_id FROM Pixar.BoxOffice AS b WHERE b.international_sales >= 500000000 ) AND m.leng...
true
eaaa2156ccb175d9962f4bf7cb1989b21bf21689
SQL
chenwuwen/spring-cloud-sass-demo
/spring-cloud-provider-base/src/main/resources/schema.sql
UTF-8
438
2.828125
3
[]
no_license
-- H2数据库 目前还不完美支持使用UNIX_TIMESTAMP()函数将日期更改为时间戳 DROP TABLE TENANT IF EXISTS; CREATE TABLE TENANT ( ID BIGINT GENERATED BY DEFAULT AS IDENTITY, TENANT_NAME varchar(200) NOT NULL, SIMPLICITY varchar(200) NOT NULL, DOMAIN varchar(200) NOT NULL, DB_URL varchar(200) NOT NULL, DB_USER varchar(200) NOT NULL, DB_PASS varchar(2...
true
18a3f318502053c4c8120d6089988a4409277b49
SQL
wf-oadenaike/TestProject
/TestDBProject/CADIS/Views/Views2/DM_SECURITY_BLOOMBERG_OUT.sql
UTF-8
520
2.921875
3
[]
no_license
CREATE VIEW "CADIS"."DM_SECURITY_BLOOMBERG_OUT" AS SELECT MP.CADISID as "CADIS Id", MP.CADISPRIORITY as "CADIS Priority", SR.*, MP.CADISINSERTED as "CADIS Inserted", MP.CADISUPDATED as "CADIS Updated", MP.CADISCHANGEDBY as "CADIS Changed By", MP.CADISROWID as "CADIS Row Id",...
true
80dac7171ae286e9b954eda03db7ab26b3e974e3
SQL
koheitakahashi/rakuraku_ERD_lesson
/ERD_lesson_3.sql
UTF-8
1,748
3.578125
4
[]
no_license
CREATE TABLE Register ( register_id INTEGER NOT NULL, register_number INTEGER, PRIMARY KEY (register_id) ); CREATE TABLE Package ( package_id INTEGER NOT NULL, package_name VARCHAR(100), PRIMARY KEY (package_id) ); CREATE TABLE "Order" ( order_id ...
true
56dce63a31404c3602053a63dda541a06eb6e6ea
SQL
ferkopar/ToDoSchema
/DM_LANGUAGE.sql
ISO-8859-2
2,132
2.75
3
[]
no_license
-------------------------------------------------------- -- DDL for Table DM_LANGUAGE -------------------------------------------------------- CREATE TABLE "DM_LANGUAGE" ( "LANGUAGE_ID" NUMBER(12,0), "LANGUAGE_NAME" VARCHAR2(50), "LANGUAGE_TYP" VARCHAR2(50) DEFAULT 'Alapnyelv', "RL" VARCHAR2(1) DEFAULT 'L...
true
de2e76f237e2abe5e5cb521c8a89d84f3d1cd8fe
SQL
dareko/ora
/h.sql
UTF-8
3,133
3.265625
3
[ "CC-BY-3.0" ]
permissive
/*------------------------------------------------------------------------------------------------- Usage ----- * HTML Output @h script like_condition[@db_link][#rows_limit] */------------------------------------------------------------------------------------------------- /* Author : Dariusz Owczarek (ma...
true
61a051629f63aa4340ecc589cac81cd89c1b6e1e
SQL
toanht15/moni
/apps/plugins/db_sql/getShippingAddressByBrand.sql
UTF-8
295
3.171875
3
[]
no_license
SELECT relation.id user_id, address.address1, address.address2,address.address3 FROM brands_users_relations as relation LEFT OUTER JOIN shipping_addresses as address ON relation.user_id = address.user_id WHERE relation.del_flg = 0 AND relation.brand_id = ?brand_id? AND relation.withdraw_flg = 0
true
0a3b582037f21f2cc63fa7a096a3b8644252575d
SQL
insanexx/sportsvolunteer
/sql/sportsvolunteer_init.sql
UTF-8
4,264
3.125
3
[]
no_license
-- -------------------------------------------------------- -- 主机: 127.0.0.1 -- 服务器版本: 5.7.4-m14-log - MySQL Community Server (GPL) -- 服务器操作系统: Win64 -- HeidiSQL 版本: 9.5.0.5196 -- -----------------------------------------------...
true
a850de6d1375879be60f975f4a4359cb59e5fd93
SQL
myaa2913/BGxAKM
/code/jobidXskillid.sql
UTF-8
514
3.453125
3
[]
no_license
--create unique bgtjobid X skill_id TEMP_SKILLS sql table SELECT unique_skills_tweak.skill_id, unique_skills_tweak.skill, unique_skills_tweak.skillcluster, unique_skills_tweak.skillclusterfamily, bgtjobid_skills.bgtjobid, maintext.soc, date_part('year',maintext.jobdate) AS year...
true
b3f67b2f2c3d2f5168707d3ea67da8b9e8fdfa2a
SQL
LenimentusAion/Aion2.5
/gameserver/aj_server/player_world_bans.sql
UTF-8
823
2.640625
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : localhost_3306 Source Server Version : 50517 Source Host : localhost:3306 Source Database : aj_server Target Server Type : MYSQL Target Server Version : 50517 File Encoding : 65001 Date: 2011-11-29 15:56:53 */ SET FOREIGN_KEY_CHECKS=0...
true
8594444e74dbc763e61d92622deaa402b3f8dba0
SQL
silence-do-good/stress-test-Postgres-and-MySQL
/dump/low/day25/select1819.sql
UTF-8
191
2.703125
3
[]
no_license
SELECT timeStamp, temperature FROM ThermometerObservation WHERE timestamp>'2017-11-24T18:19:00Z' AND timestamp<'2017-11-25T18:19:00Z' AND SENSOR_ID='71a7e4b3_a191_4d50_a01e_48e1935ca46b'
true
9a34e6645e569514622751588f58565b71f4f06a
SQL
kayzcrack/projects
/m+e/trunk/implementation/BE/proc2.sql
UTF-8
18,190
4.125
4
[]
no_license
DELIMITER // DROP FUNCTION IF EXISTS authenticateUser // CREATE FUNCTION authenticateUser(in_Username VARCHAR(16), in_Password VARCHAR(255)) RETURNS BOOLEAN READS SQL DATA BEGIN RETURN (SELECT COUNT(*) FROM `User` WHERE Username=in_Username AND Password= PASSWORD(in_Password)); END // DELIMITER ; -- -----------...
true
a09ecde5a023ec52cebf2261d9c33cff1a11f5a6
SQL
nguyenhoangvy11/Website_sell_phones
/shoppingdb.sql
UTF-8
4,628
3.203125
3
[]
no_license
CREATE TABLE products( product_id int AUTO_INCREMENT PRIMARY KEY, product_name NVARCHAR(100) NOT NULL, product_des NVARCHAR(255) NOT NULL, product_price FLOAT NOT NULL, product_img_source VARCHAR(255) NOT NULL, product_type VARCHAR(100) NOT NULL, product_brand VARCHAR(100) NOT NULL ); CREATE TABLE orders( orde...
true
7912f89b56e18c845a6c4479f1a23b5a6c6d600b
SQL
520luigi/PHP_Piscine
/Rush00/ecommerce/pokemon.sql
UTF-8
4,534
3.09375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.7.7 -- https://www.phpmyadmin.net/ -- -- Host: localhost:8889 -- Generation Time: Jan 14, 2019 at 04:13 AM -- Server version: 5.6.38 -- PHP Version: 7.2.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; -- -- Database: `ecommerce` -- -- --------------------------...
true
e0e9d35748afb498b08e6ab0f4c658df00b49e7f
SQL
bigin/login_php_js
/db.sql
UTF-8
1,429
3.578125
4
[]
no_license
-- -- Tabellenstruktur für Tabelle `auth` -- CREATE TABLE `auth` ( `id` int(10) UNSIGNED NOT NULL, `salt` char(40) CHARACTER SET ascii NOT NULL, `user_name` varchar(25) DEFAULT NULL, `t_point` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -------------------------------...
true
88ced535b1c21069775d8d515b9e0d0031bdba11
SQL
francescosecci/sp-server-attsw
/server/src/test/travis.sql
UTF-8
495
3.203125
3
[]
no_license
# Create TestUser CREATE USER 'springboot'@'localhost' IDENTIFIED BY 'password'; # Privileges to TestUser GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP ON *.* TO 'springboot'@'localhost'; # Create DB CREATE DATABASE IF NOT EXISTS `db_example` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci; USE `db_example`; # Cr...
true
d657016935ad52ecd7fe16fd3fb3f6f66b191aa1
SQL
uriah2006/CS440-Database-sql-jdbc
/hw/HW2in.sql
UTF-8
3,736
3.953125
4
[]
no_license
/* uriah sypolt CS 440 Assignment 2 January 28, 2013 */ --1 Alter the dept table to have the following deferrable (initially immediate) constraints: -- a. deptno is the primary key -- b. dname is unique and not null --a alter table dept add constraint DEPTNO_PRIME primary key (deptno)deferrable initially immediat...
true
d15414b4ef83b3e7508e7fc6667d6f56089bc9bd
SQL
nibble-arts/database_xh
/queries/juryteam.sql
UTF-8
630
3.5625
4
[]
no_license
SELECT GROUP_CONCAT( CONCAT(ersatz.vorname,' ',ersatz.name)) as ersatz, ersatz.titel as ersatztitel, GROUP_CONCAT( CONCAT(sekret.vorname,' ',sekret.name)) as sekret, sekret.titel as sekrettitel, GROUP_CONCAT( CONCAT(technical.vorname,' ',technical.name)) as technical, technical.titel as te...
true
b5ca0c037ce218f6c737f29c2a129d4289e2b4a4
SQL
BeerInHand/beerinhand
/sql/bihforum.sql
UTF-8
25,315
3.703125
4
[]
no_license
/* MySQL Data Transfer Source Host: localhost Source Database: bihforum Target Host: localhost Target Database: bihforum Date: 3/7/2012 6:58:02 AM */ SET FOREIGN_KEY_CHECKS=0; -- ---------------------------- -- Table structure for forum_conferences -- ---------------------------- CREATE TABLE `forum_conferences` ( `...
true
4b8e0875b0ad205030280eaf15e07c5b95c5dec3
SQL
Enterprise-System-Management-Solutions/Data-pipeline-scripts
/dwhnode03/plsql/functions/F_PARTITION_MSC.sql
UTF-8
449
3.078125
3
[]
no_license
-- -- F_PARTITION_MSC (Function) -- CREATE OR REPLACE FUNCTION DWH_USER03.F_PARTITION_MSC RETURN VARCHAR2 AS VPARTITION_NAME VARCHAR2 (100); BEGIN SELECT PARTITION_NAME INTO VPARTITION_NAME FROM (SELECT PARTITION_NAME, ROW_NUMBER () OVER (ORDER BY PARTITION_POSITION DESC) LS ...
true
80f7f6b5e036fb82fef522d58908a661866002a4
SQL
official-kalyani/add_multiple_data_in_php
/auro_employee.sql
UTF-8
1,657
2.9375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: May 28, 2021 at 11:00 AM -- Server version: 10.4.6-MariaDB -- PHP Version: 7.3.21 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIEN...
true
70ac8a5ed36e502dca453fc322080abd2070e40e
SQL
upself/trails
/deployment/2016_sprint10/46421_software_script_staging.sql
UTF-8
2,463
3.890625
4
[]
no_license
------------------------------------------------ -- DDL Statements for Table "EAADMIN "."SOFTWARE_SCRIPT" ------------------------------------------------ CREATE TABLE "EAADMIN "."SOFTWARE_SCRIPT" ( "ID" BIGINT NOT NULL GENERATED ALWAYS AS IDENTITY ( START WITH +1 INCREMENT BY +1 MINVAL...
true
ee230c48b80f53c6dafc87bb6c4e3b6de56f397c
SQL
Masterming/Chat
/register.sql
UTF-8
426
3.015625
3
[ "Apache-2.0" ]
permissive
CREATE TABLE `register` ( `ID` int(128) NOT NULL, `Name` varchar(64) NOT NULL, `Password` varchar(64) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; INSERT INTO `register` (`ID`, `Name`, `Password`) VALUES (1, 'admin', 'admin'); ALTER TABLE `register` ADD PRIMARY KEY (`ID`), ADD UNIQUE KEY `Name` (`Name`...
true
375e04181ba3487690e48f889e06a1177c3f9dda
SQL
wally-wally/TIL
/05_DB/02_sql_for_data_analysis/01_sql_intermediate/leetcode/02.sql
UTF-8
112
3.40625
3
[]
no_license
SELECT c.Name AS Customers FROM Customers AS c LEFT JOIN Orders AS o ON c.Id = o.CustomerId WHERE o.Id IS NULL
true
f1d91faec4cf2fab08ad5a6001f7442997a9156f
SQL
LightMoney/sprinboot
/shiro_springboot/src/main/resources/shiro_db.sql
UTF-8
4,146
3.28125
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : localhost Source Server Version : 50558 Source Host : localhost:3306 Source Database : shiro_db Target Server Type : MYSQL Target Server Version : 50558 File Encoding : 65001 Date: 2018-11-29 18:03:45 */ SET FOREIGN_KEY_CHECKS=0; -- ...
true
265f819597e35fc8529ab7c911843f124b8b1efc
SQL
Energy0124/web-instagram
/sample_data/main_sqlite_master.sql
UTF-8
1,152
3.375
3
[]
no_license
INSERT INTO sqlite_master (type, name, tbl_name, rootpage, sql) VALUES ('table', 'users', 'users', 3, 'CREATE TABLE "users" ( name TEXT, password_hash TEXT, salt TEXT, session_id TEXT, session_expiry TEXT, id INTEGER PRIMARY KEY AUTOINCREMENT )'); INSERT INTO sqlite_master (type, name, tbl_name,...
true
fdd8d53dbdb0a2df3f7169940ea29bcdfe856722
SQL
esteves-esta/sistema-goodeyes
/bd_goodeyes.sql
UTF-8
4,590
3.28125
3
[]
no_license
create database bd_goodeyes default charset utf8 default collate utf8_general_ci; use bd_goodeyes; -- drop database bd_goodeyes; /* -- NOMENCLATURA no_ = numero nm_ = nome sg_ = sigla cd_ = codigo qt_ = quantidate vl_ = valor ds_ = descricao */ create table tbLogin( email varcha...
true
61bd175abdcf56cb4170af3a1676c171855b63fb
SQL
SWEN90016-T13-04/application
/database/ddl.sql
UTF-8
6,474
3.296875
3
[]
no_license
CREATE DATABASE IF NOT EXISTS `mydb` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci */ /*!80016 DEFAULT ENCRYPTION='N' */; USE `mydb`; -- MySQL dump 10.13 Distrib 8.0.21, for macos10.15 (x86_64) -- -- Host: localhost Database: mydb -- ------------------------------------------------------ -- Ser...
true
534a96fbec56e5410296bc848c4b0d5aa2c5f186
SQL
Tektz/OMSystem
/oms.sql
UTF-8
13,026
3.046875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Aug 28, 2020 at 02:07 PM -- Server version: 10.1.38-MariaDB -- PHP Version: 7.3.4 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
true
206d7f44ade87c35f2a5cfa867ee65f19a3b0199
SQL
fer9917/api-fer
/db.sql
UTF-8
802
3.109375
3
[]
no_license
CREATE DATABASE IF NOT EXISTS `api-fer` /*!40100 DEFAULT CHARACTER SET utf8 */; USE `api-fer`; CREATE TABLE IF NOT EXISTS `products` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(100) NOT NULL, `npc` varchar(30) NOT NULL, `stock` int(11) NOT NULL DEFAULT '0', `price` int(11) NOT NULL DEFAULT '0', ...
true
3b3e9ad0778fdfaffc239a2444515c3dfe4479cf
SQL
avdyushin/bible-docker-postgres
/data/rst_bible_books.sql
UTF-8
3,707
2.921875
3
[]
no_license
-- -- Russian Synodal Translation -- PostgreSQL dump by Grigory Avdyushin <avdyushin.g@gmail.com> -- DROP TABLE IF EXISTS rst_bible_books; CREATE TABLE rst_bible_books ( id SMALLINT NOT NULL PRIMARY KEY, idx SMALLINT NOT NULL, book VARCHAR(40) NOT NULL, alt VARCHAR(20) NOT NULL, abbr VARCHAR(2...
true
85991ffd4fdd3ff2a0ef79b3d2d1d9550c566b0a
SQL
kasia-gra/proman
/data_manager/create_tables.sql
UTF-8
4,235
3.53125
4
[]
no_license
ALTER TABLE IF EXISTS ONLY public.cards DROP CONSTRAINT IF EXISTS pk_id CASCADE; ALTER TABLE IF EXISTS ONLY public.cards DROP CONSTRAINT IF EXISTS fk_board_id CASCADE; ALTER TABLE IF EXISTS ONLY public.cards DROP CONSTRAINT IF EXISTS fk_status_id CASCADE; ALTER TABLE IF EXISTS ONLY public.statuses DROP CONSTRAINT IF E...
true
9f0dc6e4b3bc49e94d59bd83c92e73f6a787302f
SQL
junluo-code/w205-spring-16-labs-exercises
/exercise_1/investigations/hospital_variability/hospital_variability.sql
UTF-8
342
3.4375
3
[]
no_license
SET hive.cli.print.header=true; SELECT m.measure_name Measure ,stddev(pctrank) stddev_pctrank FROM (SELECT measure_id, percent_rank() OVER (partition by provider_id ORDER BY score) pctrank FROM prod.procedures) p JOIN prod.measures m ON p.measure_id = m.measure_id GROUP BY m.measure_name ORDER BY stddev_p...
true
c3163e86ddaef4497aac5d1c44cb26d6c12c7cda
SQL
udaysolanki4/MVC
/Registration/WebContent/database.sql
UTF-8
394
2.8125
3
[]
no_license
create table Users(Username varchar2(20) not null,Password varchar2(20) not null, Name varchar2(50), Country varchar2(20)); select * from USERS; select name,username,country from Users where username='uday'and password='uday' limit=1; DELETE FROM Users WHERE name='uday'; insert into USERS values('uday','uday'...
true
4a069eb639c5a3b8f42490aca256abd80dcbcbbc
SQL
weedkiller/MVC
/AirviewDatabase/dbo/Stored Procedures/TMP_GetTemplates.sql
UTF-8
1,314
3.984375
4
[]
no_license
CREATE PROCEDURE TMP_GetTemplates @Filter NVARCHAR(50), @Value NVARCHAR(50)=NULL, @ProjectId numeric(18, 0)=0 AS BEGIN SET NOCOUNT ON; IF @Filter='GET_ALL' BEGIN SELECT *, def.DefinationId AS 'ModuleId', def.DefinationName as 'ModuleType' FROM TMP_Templates t JOIN dbo.AD_Definations def on d...
true
3cca809d104a70c56114e412f76abcb336dce8a0
SQL
vankanna/dist-java-squirrel-spotter
/dist-java-squirrels-master/src/main/resources/data.sql
UTF-8
3,467
2.859375
3
[]
no_license
insert into squirrel(squirrel_id, species, common_name, habitat, image_file_name) values(1, 'Ratufa macroura', 'Grizzled giant squirrel', 'Sri Lanka', 'ggs.jpg'); insert into squirrel(squirrel_id, species, common_name, habitat, image_file_name) values (2, 'Petaurista philippensis', 'Indian giant flying squirrel', 'Ind...
true
81a29ce6fc504e939d84cb285efba1c098731031
SQL
ponsea/nb-dev-training-sql
/theme-c/49.sql
UTF-8
615
3.546875
4
[]
no_license
SELECT 'クリアした' AS 区分, COUNT(*) AS イベント数 FROM 経験イベント WHERE クリア区分 = '1' UNION SELECT '参加したがクリアしていない' AS 区分, COUNT(*) AS イベント数 FROM 経験イベント WHERE クリア区分 = '0' ; # 回答例(こっちのほうが好ましいと思う) # SELECT CASE クリア区分 WHEN '1' THEN 'クリアした' # WHEN '0' THEN '参加したがクリアしていない' # END AS 区分, # CO...
true
db90e4e71ed6d00be580c5d37ef574163b58db5a
SQL
Joaquim09Castro/modulo2_queries-resilia
/Scripts/Montadoras/Podiums-Construtoras.sql
UTF-8
1,058
3.8125
4
[]
no_license
SELECT cons.name 'Constructor', IFNULL(1st.1_place, 0) '1st Place', IFNULL(sq_2nd.`2nd Place`, 0) '2nd Place', IFNULL(sq_3rd.`3rd Place`, 0) '3rd Place' FROM `vw-1st_con` 1st RIGHT JOIN `constructors` cons ON cons.constructorId = 1st.constructorId RIGHT JOIN (SELECT cons.constru...
true
f86ab86cb2e6eebe55d6b96f1a2c4789c7a878d2
SQL
DFE-Digital/npd-find-and-explore
/db/structure.sql
UTF-8
424
2.546875
3
[ "MIT", "LicenseRef-scancode-proprietary-license" ]
permissive
-- multi-search support added in 20190328115623_create_pg_search_documents.rb CREATE EXTENSION IF NOT EXISTS fuzzystrmatch; CREATE EXTENSION IF NOT EXISTS pg_trgm; CREATE EXTENSION IF NOT EXISTS plpgsql; CREATE OR REPLACE FUNCTION pg_search_dmetaphone(text) RETURNS text LANGUAGE SQL IMMUTABLE STRICT AS $function$ SELEC...
true
1ba94261359ce088788eb2fbbc25fec935332d8d
SQL
chinasofti-project/csii
/doc/db/chinasoft_script.sql
UTF-8
4,426
3.171875
3
[]
no_license
create database csii_db charset=utf8; use csii_db; create table basic( id INT PRIMARY KEY AUTO_INCREMENT, step enum('1','2','3') NOT NULL DEFAULT '1' COMMENT '1.初始录入、2.中软面试、3.客户面试', status enum('1','2','3','4','5') NOT NULL DEFAULT '1' COMMENT '1-progressing、2-CSI-Pass、3-CSI-Failed、4-CUI-Pass、5-CUI-Failed', pe...
true
d2b55cca5777c78f21edd7a1b51a2181b4565f33
SQL
vaz2101/zstore
/db/temp.sql
UTF-8
596
2.625
3
[ "MIT" ]
permissive
CREATE TABLE `prodproc` ( `pp_id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(255) DEFAULT NULL, `detail` LONGTEXT DEFAULT NULL, PRIMARY KEY (`pp_id`) ) engine=InnoDB DEFAULT CHARSET=utf8; CREATE TABLE `empacc` ( `ea_id` int(11) NOT NULL AUTO_INCREMENT, `emp_id` int(11) NOT NULL, ...
true
9339639d38511584b48d0b0375d900106ec2213c
SQL
lechetta/Mysql
/Scripts/trabalhoBD1.sql
UTF-8
1,719
3.625
4
[]
no_license
create database normal use normal create table aluno ( matricula char (50) primary key, nome char (50) ); create table curso ( curso char(50) primary key, matricula char (50), foreign key (matricula) references aluno (matricula) ); create table materia ( matricula char (50), foreign key (matricula) references aluno (...
true
66f790b53e4d4d5074055f869540c4228a0e37fe
SQL
JianBinHuang/nine-web-project
/web/sql/mishop.sql
UTF-8
15,657
3.515625
4
[]
no_license
/* Navicat MySQL Data Transfer Source Server : shop Source Server Version : 50731 Source Host : localhost:3306 Source Database : mishop Target Server Type : MYSQL Target Server Version : 50731 File Encoding : 65001 Date: 2021-08-28 15:37:00 */ SET FOREIGN_KEY_CHECKS=0; -- -------...
true
0c94b9e38234998cc654e9b31d845143f6b9b0ed
SQL
rogierpijpers/Workshop-JPA
/src/main/resources/db/migration/V9.0__add_artist_table.sql
UTF-8
711
3.96875
4
[]
no_license
CREATE TABLE artist( id BIGINT NOT NULL AUTO_INCREMENT, name VARCHAR(255) NOT NULL, genre VARCHAR(255) NOT NULL, PRIMARY KEY (id) ); ALTER TABLE concert ADD COLUMN artist_id BIGINT NOT NULL, ADD COLUMN date DATE DEFAULT NULL, DROP COLUMN artist, DROP COLUMN genre, ADD FOREIGN KEY (artist_id) REFERENCE...
true
8b9b1759bffb5f9fb01653fb88dbfea29fa88453
SQL
Narayana159/SQL
/Activities10.sql
UTF-8
515
3.78125
4
[]
no_license
SELECT * FROM orders WHERE salesman_id=(SELECT DISTINCT salesman_id FROM orders WHERE customer_id=3007); SELECT * FROM orders WHERE salesman_id IN (SELECT salesman_id FROM salesman WHERE city='New York'); SELECT grade, COUNT(*) FROM customers GROUP BY grade HAVING grade>(SELECT AVG(grade) FROM customers WHERE city='N...
true
3a5878c2307f6af9c7610a4bd040e61531bc0cba
SQL
Plaristote/ep-socialnetwork
/conf/evolutions/default/1.sql
UTF-8
2,251
3.453125
3
[ "Apache-2.0" ]
permissive
create table friendships ( id bigint not null, user_id bigint, friend_id bigint, constraint pk_friendships primary key (id)) ; create table messages ( id bigint not null, from_id bigint, to_id ...
true
2cf7246ba4a09b55d25a6558657101703313b453
SQL
oscarLang/breaddit
/sql/ddl.sql
UTF-8
1,049
3.5625
4
[]
no_license
DROP TABLE IF EXISTS Comment; CREATE TABLE Comment ( "id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created" TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL, "content" TEXT, "user_id" INTEGER, "parent_comment_id" INTEGER, "question_id" INTEGER, FOREIGN KEY (user_id) REFERENCES User(id), ...
true
c777722c74839988012555dfb5c9434712796fe5
SQL
detobel36/MobilityDBComparison
/Script/PostgresqlPostTreat-Select.sql
UTF-8
1,757
3.765625
4
[]
no_license
----------- Bus Informations ----------- SELECT position.vehicle_id, position.trip_id, position.route_id, position.direction_id, min(position.moment) AS start_date, max(position.moment) AS last_update, tgeompointseq(anyarray_uniq(array_agg(position.inst)), true, true) AS trip, lengt...
true
5390599d473053da6b01802a1792f656368be132
SQL
MMShep97/fundamentals-of-software-engineering-project
/EDU.sql
UTF-8
3,195
3.9375
4
[]
no_license
create database EDU; create table EDU.instructor( instructor_id varchar(120) PRIMARY KEY not null, username varchar(100), password varchar(30) ); create table EDU.course( course_id varchar(100) primary key not null, instructor_id varchar(120), course_name varchar(150), foreign key (instructor_id) references instructor...
true
6316cd21534cfdcc7f27eb914128e08aee076aa7
SQL
ckomodo/employee-tracker
/employees_db.sql
UTF-8
1,537
4.125
4
[]
no_license
DROP DATABASE IF EXISTS employees_db; CREATE DATABASE employees_db; USE employees_db; CREATE TABLE department ( id INTEGER NOT NULL AUTO_INCREMENT, name VARCHAR (30) NOT NULL, PRIMARY KEY (id) ); CREATE TABLE role ( id INTEGER NOT NULL AUTO_INCREMENT, title VARCHAR (30) NOT NULL, salary DE...
true
81137b3394813fe8564e3c287611d1cad2ec21c8
SQL
wd6608286/Html
/2016Incentive/P_INC2014_RT_W7_SALE3_MON.prc
UTF-8
2,659
3.453125
3
[]
no_license
CREATE OR REPLACE PROCEDURE P_INC2014_RT_W7_SALE3_MON(I_MONTH VARCHAR2,I_POSITION VARCHAR2) IS /***************************************** --功能:行转列 --时间:2013-01-14 --作者:谭超 ******************************************/ V_LOG_ID NUMBER; V_PROC_NAME VARCHAR2(100); V_PARM_VALUS VARCHAR2(100); V_Q ...
true
e98e55f8777d7e98e28c8f065a83f9c8203d0bfa
SQL
jaxsax/projects
/tapeworm/botv2/db/migrations/20220626061405_add_link_contents.up.sql
UTF-8
260
3.15625
3
[]
no_license
CREATE TABLE IF NOT EXISTS link_contents ( id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, uri VARCHAR(1024) NOT NULL, contents TEXT NOT NULL, created_at BIGINT NOT NULL ); CREATE INDEX IF NOT EXISTS link_content_uri_idx ON link_contents(uri);
true
dbea35f831565bad0654764185f03a88a299eac7
SQL
Jobkanis/csrdelft.nl
/sql/1702_maalcie.sql
UTF-8
4,529
3.421875
3
[]
no_license
-- Opschonen vorige keer ALTER TABLE mlt_maaltijden DROP FOREIGN KEY FK_mlt_product; ALTER TABLE mlt_maaltijden DROP COLUMN product_id; ALTER TABLE mlt_repetities DROP FOREIGN KEY FK_mltrep_product; ALTER TABLE mlt_repetities DROP COLUMN product_id; DROP TABLE `CiviBestellingInhoud`, `CiviBestelling`, `CiviPrijs`, `Ci...
true
492897bf0b1e5f542369fa3e0408c28dc41f072d
SQL
hyelim-kim1028/lab_oracle
/3.sql
UHC
1,501
4.03125
4
[]
no_license
--RDBMS (Relational Database Management System: ͺ̽) -- 1. employees ̺ 179 ڵ带 select * from employees where employee_id = 179; --2. 1 ã ؼ 179 å ̸ ٸ ̺ ˻ؼ select job_title from jobs where job_id = 'SA_REP'; -- 3. 1 ã ؼ 179 ϴ μ ٸ ̺ ˻ؼ select department_name from departments where department_id = 80; --...
true
4d71a2c5b43706801ebd1125b21756de878749ad
SQL
RoyalCookie/Gagnasafnsfr-i
/Project5/SQL/CREATE.sql
UTF-8
909
3.5
4
[]
no_license
DROP TABLE IF EXISTS Persons; DROP TABLE IF EXISTS Boats; DROP TABLE IF EXISTS Projects; DROP TABLE IF EXISTS Courses; CREATE TABLE Persons ( ID INTEGER, -- ID AI? PN CHARACTER VARYING, -- Personal Name DID INTEGER, -- DN CHARACTER VARYING, -- SSN CHAR(10), ...
true
61c07caeaa88bc38465e5f17cd9cd9ab68a6b509
SQL
vjssodhi/acc_v1
/sampleData/structureAndData.sql
UTF-8
15,032
3.078125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.0.10deb1 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Mar 17, 2016 at 03:47 AM -- Server version: 10.1.12-MariaDB-1~trusty -- PHP Version: 5.6.18-1+deb.sury.org~trusty+1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_C...
true
41e9ccd115763f957d396e3f0fbcd88bb6fab959
SQL
Febo12345/oracle-18-01
/Disparadores.sql
UTF-8
1,238
3.71875
4
[]
no_license
----------Disparadores tipo before create table mayores (id integer primary key, nombre varchar (60), edad integer); create or replace trigger disp_mayores before insert on mayores for each row -----------Este for each es para garantizar que dispare en cada fila, si s...
true
d6179cd28c246e731c7983d64acb751dfc029d4c
SQL
beans2/ORACLE-WORK
/lunch/procedure_lunch_order_select.sql
UTF-8
453
3.34375
3
[]
no_license
create or replace procedure lunch_order_select( i_order_name in varchar2, i_phone in varchar2, cur_order_list out sys_refcursor) is begin open cur_order_list for select l.lunch_name lunch_name, to_char(o.order_date,'yyyy-mm-dd day hh24:mi:ss') order_date, o.quan quan from ordering o, lunch l where (o.l...
true
cd94041d706a4e965619fecefe0b60e4bcc033e4
SQL
todokku/streams-2
/sql/migrate/v4tov5.sql
UTF-8
7,992
3.796875
4
[ "MIT" ]
permissive
SELECT DISTINCT p.`canonical_url`, REPLACE(LOWER(pt.`name`), ' ', '-') as `slug`, pt.`name` FROM `century`.`User` u INNER JOIN `century`.`Site` s ON u.`id` = s.`user_id` INNER JOIN `century`.`Channel` c ON s.`id` = c.`site_id` INNER JOIN `century`.`Post` p ON c.`id`...
true
edcd0247c1557258334bde4760b108c87b9400b6
SQL
8jeffnine/simon
/stock/WebContent/sql/201906/create_table_news_data.sql
UTF-8
457
2.953125
3
[]
no_license
CREATE TABLE mysql.news_data ( seq INT(11) NOT NULL AUTO_INCREMENT, news_code VARCHAR(30) NULL DEFAULT NULL, dt VARCHAR(8) NULL DEFAULT NULL, title VARCHAR(100) NULL DEFAULT NULL, link LONGTEXT NOT NULL, rrsidno VARCHAR(30) NULL DEFAULT 'SYSTEM', rrt DATETIME NULL DEFAULT NULL, modidno VARCHAR(30) NULL ...
true
4abc0fa4b9b7fc77dccf93b47d550f7ff1d1479f
SQL
subhashsubramanyam-mitel/sqlserver_db_projects
/SkyDB/MWSandbox/Views/VwUserAddOns.sql
UTF-8
1,367
3.65625
4
[]
no_license
CREATE VIEW [MWSandbox].[VwUserAddOns] AS -- MW 12192017 User level Add Ons SELECT AccountId ,LocationId ,TN ,SUM(FAX) AS FAX ,SUM(SCRIBE) AS SCRIBE ,SUM(CR) AS CR ,SUM(CONF) AS CONF ,SUM(MOB) AS MOB FROM ( SELECT a.AccountId ,a.LocationId ,a.TN ,CASE WHEN a.ProductId IN ( --fax 18 ,35...
true
102d7f88ab35986ce30cdd1b8f86de9bc2aaba41
SQL
adam-singer/tilebasedwordsearch
/db/schema.sql
UTF-8
681
3.421875
3
[ "BSD-3-Clause" ]
permissive
DROP TABLE IF EXISTS game; DROP TABLE IF EXISTS player; DROP TABLE IF EXISTS match; DROP TABLE IF EXISTS twoplayermatch; CREATE TABLE IF NOT EXISTS player ( id SERIAL, gplus_id VARCHAR(255) UNIQUE, name VARCHAR(255) ); CREATE TABLE IF NOT EXISTS twoplayermatch ( id SERIAL, board VARCHAR(255), word_bonus_t...
true
6f28becf3aacefe530f692b4a0e4ca61bbe6dd38
SQL
ThiagoOliveira001/smn-atividade-sql
/fernando/Exercicio 19 - Listar o total de vendas por mes.sql
ISO-8859-1
478
3.375
3
[]
no_license
listar o mes/ano, a quantidade total de vendas (pagas) e a quantidade total de vendas (no pagas) no mes/ano de referencia SELECT FORMAT(v.DataVenda,'MM/yyyy') AS Referncia, COUNT(CASE WHEN v.DataPagamento IS NOT NULL THEN 1 ELSE NULL END) AS 'Vendas Pagas', COUNT(CASE WHEN v.DataPagamento IS NULL THEN 1 ELSE NULL E...
true
f5fc24a752b9082811ac6c2d09cd0a70c0897663
SQL
hhtinh/dw-bi
/transact-sql/Ch03.Reporting Region Boundaries.code.sql
UTF-8
582
3.28125
3
[]
no_license
-- Reporting Region Boundaries -- -- Chapter 3 - Data Structures -- Type of content: code -- Date: 2002-1-17 -- Version: 1.0 -- -- Authors: Ales Spetic, Jonathan Gennick SELECT p1.ContainerId RegBeg, p2.ContainerId RegEnd FROM ProductionLine p1, ProductionLine p2 WHERE (p1.ContainerId < p2.ContainerId) AN...
true
b1760e2670c0120c56130ee56b85d58845443284
SQL
Ratul3/Final-Project
/Teacher/views/upload/users.sql
UTF-8
2,491
3.046875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: May 12, 2020 at 01:04 PM -- Server version: 10.1.38-MariaDB -- PHP Version: 7.3.2 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
true