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
9abdfab47b00d52c038cef9dc57888d5ed115b04
SQL
SEG4910-11/project
/palis3/db/createMetadata.sql
UTF-8
2,372
2.65625
3
[]
no_license
--create table palis.dbo.metadata(meta_key int primary key identity NOT NULL); --alter table palis.dbo.metadata --add column_name varchar(50) not null; --alter table palis.dbo.metadata --add input_name varchar(50) not null; --alter table palis.dbo.metadata --add fact_name varchar(50) not null; --alter tabl...
true
d7ffedc07e3fa4d33d2816d07925407afc989f74
SQL
vichayas/VIR
/SQL/Receipt.sql
UTF-8
1,688
3.71875
4
[]
no_license
Select * from FinancialAccount select top 1 * from FinancialAccountRole where FinancialAccount_Id = '3B9E83DB-6F35-4BBD-AAD7-01FF50DDF050' select * from InsuranceApplicationRoleItem where FinancialAccountRole_Id is not null select a.ReferenceNumber,d.DueDate as permit_date, f.ThruDate as expire_date, f.AccountName, f...
true
db18110c91f364ef80df332a8cf8bab39e913b3a
SQL
18918090402/MZJF_Work
/MZJF_Work/0038 网贷机构数据上报/SQL_20190509/4.1.3 散标状态.sql
UTF-8
13,366
3.078125
3
[]
no_license
set mapreduce.job.name = pdw_report_03_status; set mapreduce.job.queuename = etl-dw; set hive.exec.parallel = true ; set hive.groupby.skewindata = true ; set hive.map.aggr = true ; set hive.enforce.bucketing = true; set hive.exec.dynamic.partition = true; set hive.exec.dynamic.partition.mode = nonstrict; set hive....
true
4345dcd2b74895db5f6d2f7178ef3ba20f67ba66
SQL
shihyuch/W205_exercise_1
/transforming/EffectiveCare_Table.sql
UTF-8
615
3.453125
3
[]
no_license
-- Create a new table based on effective_care by selecting proper columns for -- questions requirements DROP TABLE IF EXISTS EffectiveCare; CREATE TABLE EffectiveCare AS SELECT PROVIDERID as PROVIDER_ID, HOSPITALNAME as HOSPITAL_NAME, STATE as STATE, MEASUREID as MEASURE_ID, ...
true
31b716443935b2fba850704fed81f15d9f4cbc54
SQL
group-scooby-gang/chipper
/db/WalkerSearch.sql
UTF-8
249
3.296875
3
[]
no_license
SELECT u.firstname, u.lastname, u.user_id, u.profileimg, u.city, u.state, w.user_id, w.experience, w._15minprice, w._30minprice, w._45minprice, w._60minprice FROM users u INNER JOIN walkers AS w ON w.user_id = u.user_id WHERE state = $1 OR city = $2
true
22caa00bee1fb1f2c71c84479451ba34e30d37f1
SQL
PengJi/DBtest
/Greenplum/python/queries/create_view.sql
UTF-8
1,909
3.375
3
[]
no_license
-- CREATE VIEW PhotoPrimary ---------------------------------------------------------------------- --/H These objects are the primary survey objects. -- --/T Each physical object --/T on the sky has only one primary object associated with it. Upon --/T subsequent observations secondary objects are generated. Since ...
true
c19c548d0dacb370443b9ea7a838d33c9dcd27b7
SQL
daofuzhang/WantPy
/CODE/WantData/01-MariaDB/03-DW/DWWANT/04-SP_KA_ORDER_30101_ORDR_KA_SYS.sql
UTF-8
4,803
3.125
3
[]
no_license
DROP PROCEDURE IF EXISTS DWWANT.SP_KA_ORDER_30101_ORDR_KA_SYS; CREATE PROCEDURE DWWANT.SP_KA_ORDER_30101_ORDR_KA_SYS ( VAR_EDI_NO CHAR(12), VAR_DATA_DATE CHAR(8), OUT VAR_SP_RESULT CHAR(1) ) BEGIN INSERT INTO DWWANT.ORDR_KA_SYS SELECT VAR_EDI_NO AS EDI_NO, VAR_DATA_DATE AS DATA_DATE , K.ID AS ORD...
true
82000b1a937572ccb64507cb0ca76f5042519db8
SQL
Peter-The-Great/CMS
/cms.sql
UTF-8
5,870
3.140625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Gegenereerd op: 01 mrt 2021 om 10:48 -- Serverversie: 10.4.14-MariaDB -- PHP-versie: 7.4.10 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHA...
true
e83f05e8da7b19bb431b9e558226e6cc20cb5e99
SQL
vorarukhsar/Sem-1
/DBMS/dbmsassignment.sql
UTF-8
5,703
3.9375
4
[]
no_license
SELECT * FROM `12008137`.sp; SELECT * FROM `12008137`.emp; ## P table create table p( pno char(3), pname varchar(10), color varchar (15), weight varchar(55), p_city varchar(25), primary key(pno)); select * from p; insert into p values ('p1','nut','red','12','london'); insert into p values ('p2','bolt','...
true
0aafe02cdfa44301171125eba670a1a00f89fddf
SQL
sohagjone/farm-ecommerce
/product.sql
UTF-8
7,360
3.203125
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Aug 26, 2020 at 05:27 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
9dbd56cffc4febcaa85288caa2abf898382e5c83
SQL
shubhamsinghrathi/twitter-cache-server
/src/main/resources/sql/cache-example.sql
UTF-8
1,762
4.375
4
[]
no_license
drop database if exists `cache-example-db`; create database `cache-example-db`; use `cache-example-db`; create table if not exists `users` ( `id` int not null auto_increment, `name` varchar(50) not null, `creation_time` timestamp default current_timestamp, primary key (`id`) ) auto_increment = 1, engine =...
true
9b8594487d53a7b05feba70781f2eb72698c42bd
SQL
PhotonAlpha/liferay7.1
/guestbook-7.1/modules/guestbook-svc/guestbook-svc-service/src/main/resources/META-INF/sql/indexes.sql
UTF-8
638
2.71875
3
[]
no_license
create index IX_16312B2A on gb_FriendEntry (uuid_[$COLUMN_LENGTH:75$], companyId); create unique index IX_B57E742C on gb_FriendEntry (uuid_[$COLUMN_LENGTH:75$], groupId); create index IX_A97F2947 on gb_Guestbook (groupId); create index IX_3635ADF7 on gb_Guestbook (uuid_[$COLUMN_LENGTH:75$], companyId); create unique i...
true
985d0b9e5c00867454379eb213b8c66d5386457f
SQL
alexiscomte/SQL
/OPTIMISE_TRACE.sql
ISO-8859-1
2,101
3.265625
3
[]
no_license
/* Optional replacement for "String or binary data would be truncated" message with extended information in SQL Server 2016 and 2017 Rfrence: https://support.microsoft.com/en-us/help/4468101/optional-replacement-for-string-or-binary-data-would-be-truncated https://docs.microsoft.com/en-us/sql/relational-dat...
true
4c4f0446992e7a9b3b8d1c55f33b04e014ad64cf
SQL
nikolaykolevk/small_apps
/php/storeApp/database.sql
UTF-8
13,448
2.796875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.9.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Dec 15, 2019 at 02:36 PM -- Server version: 10.4.8-MariaDB -- PHP Version: 7.1.32 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
true
56919ef9a1e5913929e54385ab622690fe6b3370
SQL
estelakrein/apresentacao
/banco_teste.sql
UTF-8
3,263
3.203125
3
[]
no_license
-- MySQL Script generated by MySQL Workbench -- 03/18/20 20:12:32 -- 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
19e957eb60d025ed5d4861fd5150b38f24b42240
SQL
LoonyJester/hr-tools
/Database1/StoredProcedures/core_jobTitle_update.sql
UTF-8
210
2.53125
3
[]
no_license
DROP procedure IF EXISTS `core_jobtitle_update`; CREATE PROCEDURE core_jobtitle_update( IN Id int(11), IN Name varchar(255) ) BEGIN UPDATE core_jobtitle j SET j.Name = Name WHERE j.Id = Id; END
true
5a0430980b3263c4346850286090d47f5aaecf48
SQL
liyuntang/NOS
/support-files/metadata.sql
UTF-8
628
3.203125
3
[]
no_license
CREATE TABLE `nos_metadata` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `object_name` varchar(150) NOT NULL DEFAULT '' COMMENT '对象名称', `sha256_code` varchar(300) NOT NULL DEFAULT '' COMMENT '对象数据的sha256加密码', `is_del` tinyint(1) NOT NULL DEFAULT '0' COMMENT '该对象是否已删除,0:未删除,1:已删除', `add_time` datetime DEFA...
true
45d18f50e009ed48a5aed36474275db5492cb744
SQL
chrisray108/gshop
/script/ini.sql
UTF-8
1,670
3.15625
3
[]
no_license
ALTER USER 'root' @'localhost' IDENTIFIED WITH mysql_native_password BY 'rootroot'; CREATE SCHEMA IF NOT EXISTS `gshop` DEFAULT CHARACTER SET utf8; USE gshop; CREATE TABLE IF NOT EXISTS `spu` ( `pid` INT ( 11 ) NOT NULL AUTO_INCREMENT, `title` text, `prise` INT (11) NOT NULL, `sub_title` text, `spu_desc` text,...
true
ed3d10581254c465a1db7289b30c5b632c62b3af
SQL
perno902/webbprog
/lab2/schema.sql
UTF-8
502
3.28125
3
[]
no_license
drop table if exists users; drop table if exists loggedInUsers; create table users( email text primary key, password text, firstname text, familyname text, gender text, city text, country text ); create table loggedInUsers ( token text primary key, email text, foreign key(email) references users(e...
true
36b8ced7d84538c6a6c9e1f3b4804bc4171f5f0e
SQL
fanmengying/octans
/queries.sql
UTF-8
1,770
4
4
[]
no_license
INSERT INTO user (email, password, role, name) VALUES ("august@lautt.com", "august", "user", "August Lautt"), ("catherine@filus.com", "catherine", "user", "Catherine Filus"), ("mengying@fan.com", "mengying", "user", "Mengying Fan"); INSERT INTO user (email, password, role) VALUES ("admin@company.com", "admin", "...
true
fb5f8303caa950d0fd91bf91de0062e052da03d1
SQL
bloomfieldj/BootcampX
/4_queries/teacher_assistance_requests.sql
UTF-8
196
3.65625
4
[]
no_license
SELECT COUNT(assistance_requests.*) as total_assistances, teacher.name as name FROM assistance_requests JOIN teachers ON teachers.id = teacher_id WHERE name IS 'Waylon Boehm' GROUP BY teachers.name;
true
56c7df59199c0a1ef03fe1ae50e047412d02ff8f
SQL
AndoniAlonso/GesCom
/DataBase/GestionComercial/dbo.vPedidoCompraPendientes.VIW
UTF-8
1,002
3.15625
3
[]
no_license
SET QUOTED_IDENTIFIER OFF GO SET ANSI_NULLS ON GO /****** Objeto: vista dbo.vPedidoCompraPendientes fecha de la secuencia de comandos: 13/09/2001 20:09:21 ******/ /****** Objeto: vista dbo.vPedidoCompraPendientes fecha de la secuencia de comandos: 10/09/2001 18:06:20 ******/ CREATE VIEW dbo.vPedidoCompraPen...
true
e7f5597d29f114483a34e3689ad0463913f4f131
SQL
Allan-Sanchez/SQL_Oracle
/DEFINICION_DATOS/FOREIGN_KEY.sql
UTF-8
1,291
2.96875
3
[]
no_license
/*CONTRAINT FOREIGN KEY POR MEDIO DE ESTE CONSTRAIN Y POR MEDIO DE LA LLLAVE PRIMARIA ES COMO SE RELACIONAN DOS O MAS TABLAS*/ --TABLA PADRE CREATE TABLE PROVEEDOR ( ID_PRO number(6) PRIMARY KEY, NOMBRE VARCHAR(20) NOT NULL, APELLIDO VARCHAR(20...
true
53498cd0e07ca3a8a77548f96e0605cb0ae3d3ef
SQL
walkstudio/Anagrafica-Dealer
/AnagraficaDealerDatabase/Utenti/Stored Procedures/SP_Utenti_Exists.sql
UTF-8
384
2.875
3
[]
no_license
-- ============================================= -- Author: Diego Fronda -- Create date: 08/05/2015 -- ============================================= CREATE PROCEDURE [Utenti].[SP_Utenti_Exists] @UserID nvarchar(50), @Esiste bit output AS BEGIN SET NOCOUNT ON; Set @Esiste = (SELECT COUNT(*) As Esiste ...
true
710e05237d3e8566e1a5020c303d0a90071aafc8
SQL
myrzakulovadilet99/Database
/lab4.2/Lab4.2.sql
UTF-8
2,283
3.8125
4
[]
no_license
Create database lab4; CREATE table Warehouses( code serial primary key, location varchar(255), capacity integer ); create table Boxes( code character(4), contents character varying(255), value real, warehouse integer, foreign key (warehouse) references Warehouses(code) ); INSERT INTO Warehouses(Code,Lo...
true
cb668d2b76d1fd880794341299d6d9bb2c46e95b
SQL
aseemwr10/UMD-Alumni-Association-Event-Insights
/SQL and Tableau/SQL Scripts/Project0506_07_DDL_Insert.sql
WINDOWS-1252
77,880
2.6875
3
[]
no_license
USE Project0506_07 --Location INSERT INTO [UMDAlumni.Location] VALUES ('PDES','CP DMV-Eastern Shore'), ('POWE','CP Online-Webinar'), ('PNNJ','CP Northeast-NNJ'), ('PNPH','CP Northeast-Philadelphia'), ('PDDC','CP DMV-Washington DC'), ('PWLA','CP West Coast-Los Angeles'), ('PDNA','CP DMV-General'), ('PNBO','...
true
d2b82cad7d77df68413cee73e1e6d803f40ef9bc
SQL
leafo/saltw-bot
/stats_server/saltw.sql
UTF-8
1,337
2.890625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 3.5.1 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Oct 20, 2012 at 04:23 PM -- Server version: 5.5.25a-log -- PHP Version: 5.4.5 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */...
true
7d06d2d3bcf25bd98268f9b12d239a00f37e6e49
SQL
karna1995/core
/memory/resources/database/migrations/schemas/create_permission_view.sql
UTF-8
1,409
3.96875
4
[ "BSD-3-Clause" ]
permissive
CREATE ALGORITHM = UNDEFINED DEFINER = `root`@`localhost` SQL SECURITY DEFINER VIEW `permissions` AS SELECT `tc`.`id` AS `id`, `tp`.`brand_id` AS `brand_id`, `tc`.`name` AS `name`, `tc`.`full_name` AS `full_name`, `tc`.`status` AS `status`, `tc`.`path`...
true
d936b308efc2cc593ddaec3ab8ecb03e6fe5ed26
SQL
cgm42/BootcampX
/3_queries_group-by/4_tot_submissions.sql
UTF-8
272
3.140625
3
[]
no_license
SELECT cohorts.name, count(assignment_id) as total_submissions FROM cohorts JOIN students ON cohorts.id = students.cohort_id JOIN assignment_submissions ON assignment_submissions.student_id = students.id GROUP BY cohorts.name ORDER BY total_submissions DESC
true
b7fbd5e5ff877b214bc0ab6b6e3bfada711667f1
SQL
jacklinenassozi/week1_homework_databases
/databases_week1_homework.sql
UTF-8
1,253
4.28125
4
[]
no_license
use hyf1; /*qn 1* find out how many tasks are in the task table/ -- SELECT *FROM task; -- SELECT COUNT(id) FROM task ; /*qn2 Find out how many tasks in the task table do not have a valid due date*/ -- SELECT count(id) FROM task -- WHERE due_date = null; -- SELECT task.title, task.status_id FROM task ;(shows all the ...
true
cc0ac00681695bdd501683136a3969e5e311a09f
SQL
marikullom/CISC4900_Portfolio-Projects-for-Business-Analysis
/Project 3/Personal_Liabilities.sql
UTF-8
1,557
3.171875
3
[]
no_license
mysql> CREATE TABLE CH3_Personal_Liabilities( -> Type VARCHAR(255), -> Name VARCHAR(255), -> Amount INT); Query OK, 0 rows affected (0.01 sec) mysql> INSERT INTO CH3_Personal_Liabilities(Type, Name, Amount) VALUES ("Loans", "Car#1 Loan", 5000); Query OK, 1 row affected (0.01 sec) mysql> INSERT INTO CH3_Pe...
true
45386c05a4c20c69087c7621e52a895675362e4d
SQL
silence-do-good/stress-test-Postgres-and-MySQL
/dump/high/day18/select0236.sql
UTF-8
178
2.671875
3
[]
no_license
SELECT timeStamp, temperature FROM ThermometerOBSERVATION o WHERE timestamp>'2017-11-17T02:36:00Z' AND timestamp<'2017-11-18T02:36:00Z' AND temperature>=37 AND temperature<=53
true
9208c447405d980113b80e575928b38666493a1f
SQL
Taeseong-429/All_workspace
/sql_workspace/lecture/chap06/sample5.sql
UTF-8
2,700
4.4375
4
[]
no_license
-- sample5.sql -- ****************************************************** -- SELECT 문의 기본구조와 각 절의 실행순서 -- ****************************************************** -- - Clauses - - 실행순서 - -- -- SELECT clause (5) -- FROM clause (1) -- [ WHERE clause ] ...
true
c3f456e4ef8c03c639b483a6902ac63a30eff0e5
SQL
DuongVu089x/RDPlayFramework
/conf/evolutions/default/1.sql
UTF-8
2,350
3.578125
4
[ "Apache-2.0" ]
permissive
# --- Created by Ebean DDL # To stop Ebean DDL generation, remove this comment and start using Evolutions # --- !Ups create table clazz ( id integer auto_increment not null, name varchar(255) not null, create_name varchar(255), update_name ...
true
de10aae9801dd74c1451a8d57ca6a4d7c1b012f9
SQL
radtek/Oracle-4
/SQL/Administração/!Script_Andre/ScriptOracle/SqlSga.sql
UTF-8
1,070
3.359375
3
[]
no_license
rem rem FUNCTION: Generate a report of SQL Area Memory Usage rem showing SQL Text and memory catagories rem rem sqlmem.sql rem column sql_text format a60 heading Text word_wrapped column sharable_mem heading Shared|Bytes column persistent_mem heading Persistent|Bytes column l...
true
e7cbea4402a2f9195576ade04a029d1ab0a42ade
SQL
jawozele/Oracle-in-21-Days
/21 DAYS SQL/CREATES.SQL
UTF-8
1,016
4.21875
4
[]
no_license
/* THESE ARE THREE TABLES: BILLS, BANK_ACCOUNTS AND COMPANY THE PAYMENTS DATABASE WILL HAVE ALL THE TABLES SAVED IN IT FOR EASE OF REFERENCING */ -- CREATE DATABASE CREATE DATABASE PAYMENTS; USE DATABASE PAYMENTS; -- BILLS TABLE CREATE TABLE BILLS ( NAME CHAR(30), AMOUNT INT, AMOUNT_ID INT NOT NULL); -- BANK_ACCOU...
true
77597ecb8cb775583a6bdc38341272932029f90a
SQL
FranciscoMan/TestDB2
/PRD/Functions/F_GET_WORK_ORDER_FROM_JDEDWARDS.sql
UTF-8
2,526
3.25
3
[]
no_license
-- ============================================= -- Proyecto: Plaskolite -- Copyright (c) - Acrux - 2017 -- Author: Julio Tavares -- CREATE date: 07/06/2018 -- Description: Funtion obtain forms by a work order -- ============================================= CREATE FUNCTION [PRD].[F_GET_WORK_ORDER_FROM_JDEDWARDS] (@PI...
true
289468036d95a623ab80cf07cb202029ba185bdb
SQL
SW618/DBS-SelfStudy
/sql/6.sql
UTF-8
177
3.328125
3
[]
no_license
select p.name, p.birthdate from person as p join involved as i on p.id = i.personId join movie as m on m.id = i.movieId where m.title = 'Pulp Fiction' order by p.birthdate;
true
0484331118426e98bb3d3c6b0d468be54b5cc025
SQL
nickxmassa/codeacademymidterm
/tables.sql
UTF-8
242
2.59375
3
[ "MIT" ]
permissive
DROP TABLE IF EXISTS articles; CREATE TABLE articles ( id smallint unsigned NOT NULL auto_increment, publicationDate date NOT NULL, category varchar(255) NOT NULL, title varchar(255) NOT NULL, summary text NOT NULL, PRIMARY KEY (id) );
true
ee0e8a7a2887bd0e75fd2c5b96ffafd950779304
SQL
Dinlou/SQL_Query_-Product-Category-
/Query.sql
UTF-8
126
3.15625
3
[]
no_license
SELECT p.Name as 'Продукт' , c.name as 'Категория' FROM products p LEFT JOIN categories c ON p.Category=c.id
true
0fa009b2a6c57c43d37aac8c84361947eee77fea
SQL
satish259/SQL
/4g.sql
UTF-8
301
3.65625
4
[]
no_license
-- Wording Query for female athletes is quite confusing so I have assumed all data in Athletes table. I would say fewer columns may have been better. SELECT A.* FROM Athletes AS A INNER JOIN City as C ON A.athlete_birthplace= C.city_id WHERE A.athlete_sex = 'F' AND C.city_population >5000000;
true
a458c598d7be7f47c35be12bf8aa1bbabe0c74b8
SQL
narendratreddi/cscripts
/cli 2/cli_spbl_fix_corrupt.sql
UTF-8
1,358
3.71875
4
[]
no_license
SET FEED ON; MERGE INTO sys.sqlobj$plan t USING (SELECT o.signature, o.category, o.obj_type, o.plan_id, 1 AS id FROM sys.sqlobj$ o WHERE o.category = 'DEFAULT' AND o.obj_type = 2 AND...
true
d2665529d3ea41d45ed60d0a3ec66edeb1b576e5
SQL
jamiels/pythonmasterclass
/15_sql.sql
UTF-8
2,839
3.65625
4
[]
no_license
USE myfirstdb; CREATE TABLE orders ( order_id int, description varchar(255) ); SELECT * FROM orders; INSERT INTO orders (order_id, description) values (1,'hello!'); INSERT INTO orders (order_id, description) values (2,'sky!'); INSERT INTO orders (order_id, description) values (2,'sky!'); INSERT INTO orders (ord...
true
63ddb3a5eec4b10892d1d180802ff2c0eb9a89a5
SQL
CameronVarenas/Bargain-Bin-Newegg
/db/products/get_featured_products.sql
UTF-8
126
2.546875
3
[]
no_license
SELECT * FROM bbn_products JOIN bbn_product_img ON bbn_products.product_id = bbn_product_img.product_id WHERE featured = true;
true
2f51c761265805b39042b258209ae1bf6ae193cd
SQL
CloudyPadmal/Internship-Management-System
/WebContent/resources/db/new_tables.sql
UTF-8
2,450
3.3125
3
[ "Apache-2.0" ]
permissive
CREATE TABLE IF NOT EXISTS password_table ( username VARCHAR(50) NOT NULL, password VARCHAR(300) NOT NULL, user_type VARCHAR(50) NOT NULL, active BOOL, PRIMARY KEY(username) ); CREATE TABLE IF NOT EXISTS user_table ( id INT(5) AUTO_INCREMENT, name VARCHAR(50) NOT NULL, surname VARCHAR(50) NOT NULL, gender VA...
true
d4d656bb776a8056ba19e6067ab98b6a5a721ee0
SQL
gustavogodinho/ProAgilUdemy
/api/db/Lote.sql
UTF-8
229
2.765625
3
[]
no_license
CREATE TABLE Lote ( Id INT PRIMARY KEY IDENTITY (1, 1), Nome VARCHAR(200), Preco DECIMAL(12,2), DataInicio DATETIME, DataFim DATETIME, Quantidade INT, EventoId INT FOREIGN KEY REFERENCES Eventos(Id) )
true
d3831bd96cec47ae6fbd9dcde4072316459200d7
SQL
rpavani1998/incubyte_assessment
/country.sql
UTF-8
334
3.0625
3
[]
no_license
CREATE DATABASE IF NOT EXISTS incubyte; USE incubyte; CREATE TABLE IF NOT EXISTS Country (code varchar(5) NOT NULL, name varchar(25), PRIMARY KEY (code)); INSERT INTO Country values ('IND', 'India'), ('USA', 'America'), ('PHIL', 'Philippines'), ('NYC', 'NewYork'), ('AU', ...
true
07fbf51eb92da7fec3a1d4cf60098859b8a8b962
SQL
marcinrogacki/magento-quiz-api
/app/user/sql/mysql/user.sql
UTF-8
1,288
2.6875
3
[ "MIT" ]
permissive
CREATE TABLE user ( email VARCHAR(255) PRIMARY KEY NOT NULL, password BINARY(64) NOT NULL, name VARCHAR(255), surname VARCHAR(255) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; INSERT INTO user VALUES('mrogacki@nexway.com', sha2('yQxTv3drRkM=no_rainbow_please', 256), 'Marcin', 'Rogacki'); INSERT INTO user VALUES('mta...
true
662d5d4f5634ad677b3d4063319e559e402506bb
SQL
SocialGouv/code-du-travail-backoffice
/db/migrations/20200220134628_drop_tags_table.sql
UTF-8
2,240
3.625
4
[ "Apache-2.0" ]
permissive
-------------------------------------- UP -------------------------------------- DROP TABLE api.answers_tags; DROP TABLE api.questions_tags; DROP TABLE api.tags; DROP TABLE api.tags_categories; ------------------------------------- DOWN ------------------------------------- CREATE TABLE api.tags_categories( id u...
true
555b05fa2dc4b7df740a0a65918ec20e742305c5
SQL
dael-victoria-reyes/data-act-broker-backend
/dataactvalidator/config/sqlrules/b4_object_class_program_activity_2.sql
UTF-8
486
3.5
4
[ "CC0-1.0" ]
permissive
-- ObligationsDeliveredOrdersUnpaidTotal (CPE) = USSGL(4901 + 4981). This applies to the program activity and object -- class level. SELECT row_number, obligations_delivered_orde_cpe, ussgl490100_delivered_orde_cpe, ussgl498100_upward_adjustm_cpe FROM object_class_program_activity WHERE submission_id = ...
true
6d5ec34daab6885f410a493928a59c24237770a1
SQL
yinlqin/yinlqin.github.io
/ckgl/qf_ck.sql
UTF-8
42,268
3.1875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.1.14 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: 2021-05-20 18:23:53 -- 服务器版本: 5.6.17 -- PHP Version: 5.5.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET ...
true
48e5077e62ec0204101740b6bd1a185bc10e124c
SQL
iharbelsky/monitoring_system
/src/main/resources/db/migration/postgres/V2__add_project_desc.sql
UTF-8
377
2.734375
3
[ "Apache-2.0" ]
permissive
-- Add column description to table projects ALTER TABLE monitoring.projects ADD COLUMN description VARCHAR(511) DEFAULT NULL; -- Update tests projects UPDATE monitoring.projects SET description='This test project internet-shop' WHERE name_project='internet-shop'; UPDATE monitoring.projects SET description='This test p...
true
6f285d4a540ccc6f09610049b025bbe12da989f6
SQL
doctorstal/db_course
/views.sql
UTF-8
2,080
4.125
4
[]
no_license
CREATE OR REPLACE VIEW executor_list AS SELECT executor_id, executor_name, COUNT(DISTINCT task_id) AS "Tasks" FROM executors NATURAL LEFT JOIN tasks GROUP BY executor_id, executor_name; CREATE OR REPLACE VIEW contracts_list AS SELECT contracts.contract_id, companies.company_id, company_name AS "Co...
true
958552061e30ae1cfb12a8facbb2964de4557e67
SQL
dzhelek/Programming-101-Python
/Week 09.1/ships.sql
UTF-8
907
4.3125
4
[]
no_license
-- name; country; numguuns; launched SELECT name, country, numguns, launched FROM (SELECT * FROM ships JOIN classes ON classes.class = ships.class); ----- ----- SELECT name, country, numguns, launched FROM (SELECT * FROM classes LEFT JOIN ships ON classes.class = ships.class) WHERE (SELECT COUNT(...
true
e9fe9cf9fe02069d686c5a95f39cdc0c3bdb414b
SQL
UCLALibrary/sql-scripts
/Voyager/Cataloging/LSC Manuscript Collections RR-282.sql
UTF-8
3,316
3.84375
4
[]
no_license
/* LSC Manuscript collections, with separate reports for Biomed and not-Biomed. RR-282 */ -- Create working table for performance/analysis create table vger_report.tmp_vbt282 as select distinct l.location_code , mm.display_call_no , mm.suppress_in_opac as mfhd_suppr , bm.mfhd_id , bm.bib_id -- subquery didn't fi...
true
e809aa7bf817f103be6c29874c53c3abc4bd8912
SQL
stoicdavid/webship
/config/cat_locations.sql
UTF-8
10,408
2.671875
3
[]
no_license
INSERT INTO locations (name, description, state_id) VALUES ('WAL MART', 'SUPERAMA ', 15), ('SORIANA', 'GUADALAJARA', 14), ('WAL MART', 'CHALCO BAE', 15), ('WAL MART', 'CHALCO', 15), ('Walmart Prueba', 'Gomez Palacio', 10), ('Walmart Prueba 3', 'Destino Prueba', 99), ('Walmart Prueba 4', 'Destino Prueba 2', 99), ('Wal...
true
71bded4f54f159b091cff637363d2bc7efa24a36
SQL
southday/mnrmp-ssmdemo
/MNRMP-DB-SQL/MNRMP_mnrmp_user_session_t.sql
UTF-8
2,684
2.90625
3
[]
no_license
-- MySQL dump 10.13 Distrib 5.7.9, for linux-glibc2.5 (x86_64) -- -- Host: localhost Database: MNRMP -- ------------------------------------------------------ -- Server version 5.7.11 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS *...
true
0589f89ec91692a73c03f42a632445ed12fca6aa
SQL
ProjectSidewalk/SidewalkWebpage
/conf/evolutions/default/144.sql
UTF-8
907
2.984375
3
[ "MIT" ]
permissive
# --- !Ups ALTER TABLE gallery_task_environment ADD COLUMN user_id TEXT, ADD CONSTRAINT gallery_task_environment_user_id_fkey FOREIGN KEY (user_id) REFERENCES sidewalk_user(user_id); ALTER TABLE gallery_task_interaction ADD COLUMN user_id TEXT, ADD CONSTRAINT gallery_task_interaction_user_id_fkey FOREI...
true
bea9c27e5354ae643be9fc08f20b7827029104d2
SQL
yourant/tt-wiki
/pgsql-source/manager.sql
UTF-8
29,303
2.71875
3
[]
no_license
/* Navicat PGSQL Data Transfer Source Server : uat Source Server Version : 90405 Source Host : 192.168.220.52:5432 Source Database : manager Source Schema : public Target Server Type : PGSQL Target Server Version : 90405 File Encoding : 65001 Date: 2016-06-28 18:13:36 */ ...
true
8ee2d828dd1d84ce0f79a90cc61ea861b02c9d8f
SQL
516134941/cn-universitysrv
/docs/sql.sql
UTF-8
365
3.484375
3
[]
no_license
-- university 大学表 CREATE table university( id SERIAL primary key, --主键 province text not null DEFAULT '', --省份 city text not null DEFAULT '', --城市 name text not null DEFAULT '', --大学名称 UNIQUE(city,name) ); CREATE INDEX university_province_index ON university(province); --...
true
34da2ac9fb2cd1ff280b3329f7dcaaed407e9435
SQL
Eulena/SQL-Homework
/SQL_Data Analysis_ Queries_Table Schemata/Item_7.sql
UTF-8
268
3.421875
3
[]
no_license
SELECT employees_data.emp_no employee_number, employees_data.last_name last_name, employees_data.first_name first_name, departments.dept_name department_name FROM employees_data NATURAL JOIN departments WHERE dept_no in ('d007', 'd005') ORDER BY department_name ASC;
true
a0a8caf643397be366584ae51f5ead47c26b03fb
SQL
wbakerrobinson/CS586_Project
/cs586DBproject/ddlProj.sql
UTF-8
2,743
3.765625
4
[]
no_license
CREATE TABLE student( student_id integer PRIMARY KEY, name varchar(50) NOT NULL, email varchar(50) UNIQUE NOT NULL ); CREATE TABLE availability( availability_id integer PRIMARY KEY, day_of_week integer NOT NULL, mtg_time integer NOT NULL, description integer NOT NULL, CHECK (day_of_week...
true
b7046138c37ecf4d9a22d905b6164bccc605ed0d
SQL
takatori-task/lgtm
/conf/evolutions/default/3.sql
UTF-8
350
3.25
3
[ "Apache-2.0" ]
permissive
# Favorites shema # --- !Ups CREATE TABLE favorite ( user_id varchar(255) NOT NULL, id integer NOT NULL, PRIMARY KEY (user_id, id), FOREIGN KEY (user_id) REFERENCES user(user_id) ON DELETE CASCADE, FOREIGN KEY (id) REFERENCES image(id) ON DELETE CASCADE ); # ---...
true
661cd6bef2dfe59fa3e95e0f2bc26a1aa8d64e82
SQL
Laura9505/CS143
/project1B/violate.sql
UTF-8
1,986
3.890625
4
[]
no_license
-- Primary key constraints -- The primary key 'id' of Movie must be unique INSERT INTO Movie(id, title, year, rating, company) VALUES (2, 'Movie1', 2008, 'R', 'Disney'); -- The primary key 'id' of Actor must be unique INSERT INTO Actor(id, last, first, sex, dob, dod) VALUES (1, 'James', 'Big', 'Male', '1980-1-1', N...
true
d96ed84b7417633f4709fea40fff63433eeccf68
SQL
yz111/master
/table_index_size.sql
UTF-8
359
3.359375
3
[]
no_license
SELECT TableName ,pg_size_pretty(pg_table_size(TableName)) AS TableSize ,pg_size_pretty(pg_indexes_size(TableName)) AS IndexSize ,pg_size_pretty(pg_total_relation_size(TableName)) AS TotalSize FROM ( SELECT ('"' || table_schema || '"."' || table_name || '"') AS TableName FROM information_sche...
true
97d8cf33b1b658fd733b6fd084ccb3eff39d2284
SQL
mattheol/aplikacja-turnieje
/backend/app/src/main/resources/data.sql
UTF-8
4,705
2.6875
3
[]
no_license
# drop table invitations; # drop table tournaments_organizers; # drop table matches_participants; # drop table tournaments_participants; # drop table users; # drop table matches; # drop table tournaments; INSERT INTO users (id, first_name,last_name,gender,birthday,email,login,password) VALUES (1,'Jan','Kowalski...
true
d6317b7dbce7b14ccb672e153978bcf47c69c6ff
SQL
b1a9id/cfp
/src/main/resources/db/migration/mysql/V9.2.0__add-sponsor-credential-reset.sql
UTF-8
366
3.140625
3
[]
no_license
CREATE TABLE sponsor_credential_reset ( reset_id BINARY(16) NOT NULL, sponsor_id VARCHAR(255) NOT NULL, created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (reset_id) ) ENGINE InnoDB; ALTER TABLE sponsor_credential_reset ADD CONSTRAINT fk_sponsor_credential_reset_sponsor FOREIGN KEY...
true
27088c06c8ff2e0aec7e6b0fe620a0ed98eac3dd
SQL
RicardoBergen/heerhugowaard-rijschool
/oudemeuk/rijschool-heerhugowaard.sql
UTF-8
1,654
3
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.9.0.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Gegenereerd op: 15 sep 2020 om 14:22 -- Serverversie: 10.4.6-MariaDB -- PHP-versie: 7.3.9 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARAC...
true
3e4df3d352fc94418b1d623bdebcb8375c288dcd
SQL
pje00427/Oracle_class
/02_함수(FUNCTION)_KH계정.sql
UHC
18,385
4.25
4
[]
no_license
/* <Լ FUNCTION> ÷ о ȯ - Լ : N о N - ׷ Լ : N о 1 * SELECT Լ ׷Լ Բ . * Լ ִ ġ : SELECT, WHERE, ORDER BY, GROUP BY, HAVING */ --------------------------< Լ > ------------------- /* < Լ> * LENGTH / LENGTHB => NUMBER LENGTH(÷|'ڰ') : ȯ...
true
09659ba40d0a64767472ac7251eab6b35de28cdb
SQL
danielhodder/Datacom-CloudSmash
/SQL/schema.sql
UTF-8
355
2.84375
3
[]
no_license
drop database if exists datacom_cloudsmash; create database datacom_cloudsmash; drop table if exists user; CREATE TABLE user ( id int(11) not null auto_increment, username varchar(50) not null, password char(40) not null comment 'SHA1 hash of the password', primary key (`id`), key username (username) ) engin...
true
a1c8e8bc4317dc7964d5fff2ad01bd6f55c64821
SQL
Jaramba/sn_data_sql
/waterpump_sales.sql
UTF-8
7,044
4.3125
4
[]
no_license
WITH waterpump_orders AS ( SELECT orders.id AS "ID", UPPER (TRIM(customers."name")) AS "CustomerName", customers."ref" AS "CustomerReference", customers."phone" AS "CustomerPhone", branches."name" AS "BranchName", employees."name" AS "SalesPerson", DATE (orders...
true
6a6ef3037371770edb9acef5d6cf91db9b9fb5a4
SQL
kamilabandeira/logica
/exercicios/15 - BD/ex7.sql
UTF-8
166
2.875
3
[]
no_license
--Faça uma consulta que calcule a média de preços dos carros lançados após os anos 2000 utilize a função AVG select avg(valor) from carros WHERE ano > 2000
true
6b1ee7dd83db283e59b71dac4a4bd2771eaa4905
SQL
PigletX4/BamazonNodeSql
/database.sql
UTF-8
459
2.890625
3
[]
no_license
DROP DATABASE IF EXISTS bamazon; CREATE DATABASE bamazon; USE bamazon; CREATE TABLE products( position INT NOT NULL, item_id INT NULL, product_name VARCHAR(20) NULL, department_name VARCHAR(20) NULL, price DECIMAL (4,2) NULL, stock_quantity INT NULL, PRIMARY KEY (position) ); INSERT INTO products (position, item_id,...
true
a08baa4d69efd54bd1a6832ffa2d38f89d18c0a6
SQL
654572799/Vuecake
/cakeServer/cake.sql
UTF-8
2,531
2.984375
3
[]
no_license
set names UTF8; drop database if exists cake; create database cake charset=UTF8; use cake; /*轮播图表*/ create table banner( bid int primary key auto_increment, banner varchar(100) ); /*插入轮播数据*/ insert into banner values(null,'http://127.0.0.1:3000/public/img/banner/banner1.jpg'); insert into banner values(null,'http://...
true
d11dc95eb82b32e43fa3db47842b7284ed8d1343
SQL
fennuzhichui/tpcds-for-trino
/tpcds-for-spark/create-table-sql/create-iceberg-tables.sql
UTF-8
2,949
2.609375
3
[]
no_license
create table IF NOT EXISTS icebergtest.iceberg.iceberg_store_sales USING iceberg AS SELECT * from tpcds.et_store_sales; create table IF NOT EXISTS icebergtest.iceberg.iceberg_store_returns USING iceberg AS SELECT * from tpcds.et_store_returns; create table IF NOT EXISTS icebergtest.iceberg.iceberg_catalog_sales USI...
true
464cb58a7013d9cbdf50262c2b152d18ca00cadf
SQL
JohnMaalouf1/cmpt221L
/Labs/Lab_3/create_limbo.sql
UTF-8
413
3.265625
3
[]
no_license
# This file creates the Limbo database. # Author: <John Maalouf, Patrick Peko, Max Tieche, Jackson O'Sullivan> drop database if exists limbo_db; create database limbo_db ; use limbo_db ; create table if not exists stuff( id INT, descr TEXT, name TEXT, age INT, years TEXT ); ALTER TABLE stuff ADD PRIMARY KEY ( id ...
true
3dd2784448e0d9a99a8a5d0dae9002f695291eef
SQL
radtek/Database-3
/oracle/admin/scripts/estadisticas-usuarios.sql
UTF-8
524
3.234375
3
[]
no_license
SELECT B.NAME,DECODE (B.CLASS, 1, 'User', 2, 'Redo', 4, 'Enqueue', 8, 'Cache', 16, 'OS', 32, 'ParallelServer', 64, 'SQL', 128, 'Debug', 72, 'SQL & Cache', 40, '...
true
68887f1a384062bb827bba97eb06bd5df877799d
SQL
mebelousov/antlr_psql
/src/test/resources/sql/explain/63a4eeef.sql
UTF-8
249
3.140625
3
[ "MIT" ]
permissive
-- file:join.sql ln:1973 expect:true explain (verbose, costs off) select t1.unique1, t2.hundred from onek t1, tenk1 t2 where exists (select 1 from j3 where j3.unique1 = t1.unique1 and j3.tenthous = t2.hundred) and t1.unique1 < 1
true
d60a24e3e5dc04e05c7f50de34ddf336218d7395
SQL
robotvilla/pokedex-v1
/src/main/resources/scripts/pokedexDB.sql
UTF-8
431
3.421875
3
[]
no_license
DROP DATABASE if EXISTS PokedexDB; CREATE DATABASE IF NOT EXISTS PokedexDB; USE PokedexDB; CREATE TABLE Pokemon_Set( setId INT PRIMARY KEY AUTO_INCREMENT, setName VARCHAR(50) ); CREATE TABLE Pokemon( cardId INT PRIMARY KEY AUTO_INCREMENT, name VARCHAR(100) NOT NULL, cardNumber VARCHAR(10) NOT NULL, isRare TINY...
true
f6597ddc66d2edbf3d59b3c65b23ded68d842d52
SQL
radtek/Telecommunication
/K7/DataBase/VIEW/V_DETAIL_STATISTICS.sql
UTF-8
9,437
2.75
3
[]
no_license
CREATE OR REPLACE VIEW V_DETAIL_STATISTICS AS SELECT CS.YEAR_MONTH, CS.SUBSCR_NO, SUM(CS.CALL_SUM) ESTIMATE_SUM, SUM(CASE WHEN HC.IS_ROAMING=0 AND HC.SERVICE_ID=1 THEN CS.CALL_SUM ELSE 0 END) CALLS_LOCAL_COST, SUM(CA...
true
49c792ea58bc547f55f75de8e7788dd9a63301e9
SQL
self20/WHMCS-Theme-1
/upload/public_html/resources/sql/upgrade610alpha1.sql
UTF-8
2,429
3.53125
4
[]
no_license
-- Create the product group feature table CREATE TABLE IF NOT EXISTS `tblproduct_group_features` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `product_group_id` int(10) NOT NULL, `feature` text COLLATE utf8_unicode_ci NOT NULL, `order` int(11) NOT NULL DEFAULT '0', `created_at` timestamp NOT NUL...
true
f46bcf38357414d5b5b56a27549104be8d84725d
SQL
ojin0611/Web
/1112/WebContent/telephonemgmt.sql
UTF-8
302
2.59375
3
[]
no_license
CREATE TABLE Telephone ( seq INT AUTO_INCREMENT PRIMARY KEY, --오라클의 시퀀스(일련번호)와 동일. kind TINYINT NOT NULL, tel CHAR(8) NOT NULL, NAME VARCHAR(20) NOT NULL, quantity SMALLINT NOT NULL, defaultfee INT, fee INT, tax INT, total INT )
true
ab763180adf12c85cfa91fad82f16983ec265faf
SQL
blackhadly/web_ng
/sql/iweb.sql
UTF-8
10,510
3.453125
3
[]
no_license
SET NAMES UTF8; DROP DATABASE IF EXISTS iweb; CREATE DATABASE iweb CHARSET=UTF8; USE iweb; /*用户表*/ CREATE TABLE user( uid INT PRIMARY KEY AUTO_INCREMENT,/*用户编号*/ uname VARCHAR(32), /*邮箱*/ phone VARCHAR(11), /*手机号*/ upwd VARCHAR(32), /*密码*/ nickname VARCHAR(32), /*昵称*/ sex VARC...
true
01ae7e95a2065ea764dee83cc30d25e5d13b58df
SQL
martinb91/festapp
/src/main/resources/aaaschema.sql
UTF-8
1,252
3.390625
3
[]
no_license
DROP TABLE ARTISTS_MUSICSTYLES IF EXISTS; DROP TABLE FESTIVALS_FESTIVALSTYLES IF EXISTS; DROP TABLE FESTIVALSTYLES IF EXISTS; DROP TABLE CONCERTS IF EXISTS; DROP TABLE FESTIVALS IF EXISTS; DROP TABLE MUSICSTYLES IF EXISTS; DROP TABLE ARTISTS IF EXISTS; DROP TABLE POSITIONS IF EXISTS; CREATE TABLE ARTISTS ( i...
true
cd2beef7d8d03274a1e25580a39a0db46a509d6d
SQL
mattpaletta/foobar-social
/news_feed_data_access/db/CreateNewsFeedDataAccessDB.sql
UTF-8
1,003
3.65625
4
[]
no_license
CREATE SCHEMA IF NOT EXISTS news_feed_data_access; -- DROP ROLE IF EXISTS docker; -- CREATE ROLE docker LOGIN PASSWORD 'password'; -- DO -- $body$ -- BEGIN -- IF NOT EXISTS ( -- SELECT -- SELECT list can stay empty for this -- FROM pg_catalog.pg_user -- WHERE usename ...
true
ef9da12cd3750d3c58461076cd7093d61f330b8a
SQL
hguzman/ice
/base de datos/ice.sql
UTF-8
749
3.265625
3
[]
no_license
create database ice; use ice; create table perfiles( perfil int not null AUTO_INCREMENT, nombrePerfil varchar(50), primary key(perfil) ); create table usuarios( usuario varchar(20), contrasena varchar(20), perfil int, primary key (usuario), FOREIGN KEY(perfil) REFERENCES perfiles(perfil) ); insert into pe...
true
3f8b7f6d1f13b07f83108757fb1b15a5acca2aa8
SQL
LakshmiPrabhaK12/Basicbankingsystem
/sql/Grip_bank.sql
UTF-8
1,609
3.609375
4
[]
no_license
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; -- -- Table structure for table `transaction` -- CREATE TABLE `transaction` ( `sno` int(3) NOT NULL, `sender_id` int(10) NOT NULL, `sender` varchar(30) NOT NULL, `receiver` varchar(30) NOT NULL, `balance` int(8) NOT NUL...
true
88755d48c30c0b8ef526f0d443e6642a9ec0276f
SQL
HotelQuickly/Holistics-backup
/Reports_and_Dashboards/Dashboards/Retention-KPI/Number-of-Users-per-Number-of-Bookings(Last 365 Days)/query.sql
UTF-8
655
3.859375
4
[]
no_license
#standardsql with bookings_per_user as ( select user_id, count(distinct order_id) number_of_bookings from `analyst.all_orders` where 1=1 and d181_business_platform_code is not null and date(m01_order_datetime_gmt0) between date_sub(current_date(), interval 365 DAY) and current_date() ...
true
414f1aaf0643f893953343ab869876d3809ad004
SQL
dshvedchenko/cinema_learn
/src/main/resources/db/migration/V1_1__add_user.sql
UTF-8
366
2.890625
3
[]
no_license
-- com.cinema.model.User CREATE TABLE user ( id INTEGER AUTO_INCREMENT, login VARCHAR(64) NOT NULL, password VARCHAR(64) NOT NULL, firstname VARCHAR(64), lastname VARCHAR(64), birthdate DATE, role INTEGER, email VARCHAR(64), PRIMARY KEY (id), CONSTRAINT login_uq UNIQUE (logi...
true
4bcf71f408a60dbc9aba3c4e1976338795853b5d
SQL
AntonMiJu/workWithDB
/sql/lesson6/forum/CREATE_TABLE_POLLS_OPTIONS_VOTES.sql
UTF-8
389
2.703125
3
[]
no_license
CREATE TABLE FORUM_POLLS_OPTIONS_VOTES( ID NUMBER, CONSTRAINT POLLS_OPTIONS_VOTES_PK PRIMARY KEY (ID), POLL_OPTION_ID NUMBER, CONSTRAINT POLL_OPTION_FK FOREIGN KEY (POLL_OPTION_ID) REFERENCES FORUM_POLLS_OPTIONS(ID), USER_ID NUMBER, CONSTRAINT USER_VOTES_FK FOREIGN KEY (USER_ID) REFERENCES USERS...
true
81ab48ade9a262889d3299abbf7ff814fbcfc52e
SQL
shengtudai2/mySqlClsaaCode
/第四次课/断言.sql
WINDOWS-1252
144
2.765625
3
[]
no_license
select count(*) from SC where Cno in (select Cno from Course where Cnmae = 'ݿ') select Cno, count(*) num from SC group by Cno;
true
11700e789800ae1ec651d048213aa36f53be53ec
SQL
aenoel90/UAS
/uasweb.sql
UTF-8
3,627
3.140625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Waktu pembuatan: 15 Jan 2021 pada 13.02 -- Versi server: 10.4.14-MariaDB -- Versi PHP: 7.2.33 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@C...
true
ff7c879e7402b89fb65e6a004ab825d40faf7d9d
SQL
iordancatalin/php_restaurant
/mysql-scripts/restaurant.sql
UTF-8
7,487
2.984375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.7.9 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Apr 14, 2018 at 10:26 AM -- Server version: 10.1.31-MariaDB -- PHP Version: 7.2.3 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
true
279eed4ee4841d25bc4d7fabf03d563e7e6fd6f3
SQL
IvanPetrovISP/Java-DB-MySQL
/01. Exercises/03. Data Aggregation/Queries_soft_uni_database.sql
UTF-8
1,755
4.71875
5
[]
no_license
#13. Employees Minimum Salaries SELECT `department_id`, min(`salary`) AS `minimum_salary` FROM `employees` WHERE `department_id` IN (2, 5, 7) AND `hire_date` > '2000-01-01' GROUP BY `department_id` ORDER BY `department_id`; #14. Employees Average Salaries CREATE TABLE `temp_table` AS SELECT `department_id`, avg(`salar...
true
c8295e073aba3c3182e1bb5f16aff303961cf46b
SQL
schmitt89/Walmart_SQL_Assesment
/Q2.sql
UTF-8
1,239
4.40625
4
[]
no_license
---------------------------------------------------------------QUESTION 2-------------------------------------------------- --pull all revenue by chanel for the year 2017 sum bu month to get revenue in each month create table q2_data as select --extract year and month from date to perform quicker calculation YEAR(...
true
9d5d6e5ae5bcb2ff294186548e98ce7a462948de
SQL
k2003/HospitalOSV3
/Report/app/config/rp_18file_clinic08/18file_clinic08_woman.sql
UTF-8
4,182
3.046875
3
[]
no_license
SELECT b_site.b_visit_office_id AS PCUCODE , t_health_family.patient_pid AS CID , CASE WHEN (t_health_family_planing.f_health_family_planing_method_id = '0' OR t_health_family_planing.f_health_family_planing_method_id = '1' OR t_health_family_planing.f_health_family_planing_m...
true
565e092b551f78c1024c60e05463fba84c9799e0
SQL
JunaidAshraf1/Student-Bank
/database/bank_db.sql
UTF-8
13,368
3.171875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Dec 26, 2020 at 10:34 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
c8d89c7b720cd208cbfaa496b6a6bb833a3205b2
SQL
rzdp/springboot-datarouting-basics
/static-datasource-routing/sql-script.sql
UTF-8
904
2.5625
3
[]
no_license
CREATE DATABASE sdsr_bangkokdb; USE sdsr_bangkokdb; CREATE TABLE Employee ( EmployeeId BIGINT IDENTITY(1,1) PRIMARY KEY NOT NULL, Name VARCHAR(50) NOT NULL, Branch VARCHAR(50) NOT NULL ) INSERT INTO Employee VALUES ('Jose Manalo', 'Bangkok'); INSERT INTO Employee VALUES ('Vic Sotto', 'Bangkok'); INSERT INTO Emplo...
true
8f86d9e0d5b50029e0936b2685c83bbfe93e7cae
SQL
prashant9547/portfolio
/resume_site.sql
UTF-8
9,879
3.390625
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.8.4 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: Jun 25, 2019 at 04:42 AM -- Server version: 10.1.37-MariaDB -- PHP Version: 7.2.13 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OL...
true
3acf9b3ed897976f274e951355a7f67a818b449d
SQL
jorgeherrera1/4th-interview
/src/main/database/ddl/06-interview_asked_questions.sql
UTF-8
491
3.40625
3
[]
no_license
CREATE TABLE interview_asked_questions ( interview_id int NOT NULL, question_id int NOT NULL, grade varchar(14) NOT NULL, comments varchar(512), PRIMARY KEY (interview_id, question_id), CONSTRAINT interview_asked_questions_fk01 FOREIGN KEY (question_id) REFERENCES ...
true