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
77abbf092a81617d51383dc477fb20367e4738f9
SQL
Lei-Huang/FlanningForFutureYou
/FY-tables1.sql
UTF-8
3,157
3.953125
4
[]
no_license
DROP TABLE IF EXISTS UserEvent CASCADE; DROP TABLE IF EXISTS UserProfile CASCADE; DROP TABLE IF EXISTS UserMilestone CASCADE; DROP TABLE IF EXISTS Badge CASCADE; DROP TABLE IF EXISTS BadgeInfo CASCADE; DROP TABLE IF EXISTS Incentive CASCADE; DROP TABLE IF EXISTS Points CASCADE; DROP TABLE IF EXISTS MainEvent CASCADE; D...
true
d6ac78b3830a8a1a174e521df937e176a558ebb1
SQL
ken-buxton/huron
/db/sql/TwoLevelSelect.sql
UTF-8
1,056
3.765625
4
[]
no_license
 -- Original select distinct dim_date.year_no "Year", dim_date.month_name "Month Name", dim_date.day_of_week "Day of Week" from dim_date where dim_date.year_no in ( '2010') and dim_date.month_name in ( 'January') and dim_date.day_of_week in ( 'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Satur...
true
846bb4d1136ff448e640d6175de526d53f1fa7e7
SQL
josecgra/EjercicioJDBC
/db/viajes.sql
UTF-8
7,508
3.328125
3
[]
no_license
-- MySQL Administrator dump 1.4 -- -- ------------------------------------------------------ -- Server version 5.0.45-community-nt /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CO...
true
f9647a54c980caf03bc0ced5f3565af5b6ec86f2
SQL
daelephant/zerg
/PHPstorm_setting/sqlForZerg/she.sql
UTF-8
21,449
3.65625
4
[ "Apache-2.0" ]
permissive
/* Navicat MySQL Data Transfer Source Server : localhost Source Server Version : 50553 Source Host : localhost:3306 Source Database : she Target Server Type : MYSQL Target Server Version : 50553 File Encoding : 65001 Date: 2018-08-16 22:30:20 */ SET FOREIGN_KEY_CHECKS=0; -- ------...
true
c8b58e3e98756bd7f425f37648344780105eaa78
SQL
GdPaul1234/E-Lift
/creation-table-e-lift.sql
UTF-8
6,701
3.703125
4
[]
no_license
CREATE SCHEMA `e-lift` ; use `e-lift`; #------------------------------------------------------------ # Table: Personne #------------------------------------------------------------ CREATE TABLE Personne( login Varchar (50) NOT NULL , nom Varchar (50) NOT NULL , prenom Varchar (50)...
true
88755ec0526f6b8b76e3befb88088aa989e9f5ac
SQL
viniciusanete/Farm-Shripm
/SQL/Udate.sql
UTF-8
884
3.390625
3
[]
no_license
alter table usuarios alter column id set default nextval('serial_user'); --alter table usuarios add column inactive boolean default false; alter table usuarios alter column perfil type bigint; alter table C001 alter column telefone rename usu_tel alter table usuarios add column name varchar(100); alter table usuar...
true
d7ba8c19cbe27bc000cec705345dc64f62d2b06e
SQL
MapleWorld/iChat
/Phase2/db/create_db.sql
UTF-8
2,703
3.953125
4
[]
no_license
-- Tested with MySQL v5.1.73 create table user ( id int AUTO_INCREMENT PRIMARY KEY, username varchar(40) UNIQUE NOT NULL, password varchar(100) NOT NULL, created_at datetime NOT NULL, banned tinyint default 0 NOT NULL, admin tinyint default 0 NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; create table category ...
true
0bc4b8f046b4e41efddbfca126c57285e6ec90e6
SQL
SrPadilha1/Controlegastos
/controledegastos.sql
UTF-8
7,518
2.875
3
[]
no_license
-- -- PostgreSQL database dump -- -- Dumped from database version 9.5.7 -- Dumped by pg_dump version 9.5.7 -- Started on 2018-07-16 18:36:12 BRT 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_messa...
true
2839002693ffd2a9bddd69f5e99b8769b58b9fe2
SQL
JerrelSogoni/Profile-
/phase1/Profile+_Table_Generator.sql
UTF-8
7,750
3.671875
4
[]
no_license
CREATE TABLE UserPlus ( UserId INTEGER AUTO_INCREMENT, FirstName CHAR(20), LastName CHAR(20), Sex CHAR(2), Email CHAR(50), Password CHAR(20), DOB DATE, Address CHAR(50), City CHAR(60), State CHAR(20), ZipCode INTEGER, Phone CHAR(10), Preferences VARCHAR(1000), Acc...
true
3bcfd4409bc1a2507c0320b7dff07bd85baefd3c
SQL
BartekPrz/ZTPD
/ZTPD_Lab1.sql
UTF-8
19,657
3.53125
4
[]
no_license
--ZAD1 CREATE TYPE SAMOCHOD AS OBJECT ( MARKA VARCHAR2(20), MODEL VARCHAR2(20), KILOMETRY NUMBER, DATA_PRODUKCJI DATE, CENA NUMBER(10, 2) ); CREATE TABLE SAMOCHODY OF SAMOCHOD; INSERT INTO SAMOCHODY VALUES (new SAMOCHOD('FIAT', 'BRAVA', 60000, DATE '1999-11-30', 25000)); INSERT INTO SAMOCHODY VALU...
true
ff518e3bf0ab65791988cb0cabb9cc386e6d2dd8
SQL
CamiloVargas913/World-Of-Mystery
/db/dbWorldofMystery.sql
UTF-8
4,710
3.40625
3
[]
no_license
-- MySQL Script generated by MySQL Workbench -- Tue May 8 12:31:56 2018 -- Model: New Model Version: 1.0 -- MySQL Workbench Forward Engineering SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0; SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0; SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TR...
true
7ed8f6b9f1e2c03b5b2cd957c5c58747d6bc404f
SQL
jyulei/Coding-Practice
/leetcode/src/Solution0196.sql
UTF-8
139
3.015625
3
[]
no_license
--196. 删除重复的电子邮箱 delete from Person where Id not in (select id from (select min(Id) as id from Person group by Email) t);
true
0db79b9a315e4d876531b2cf9286ade04ce45d61
SQL
ljt270864457/leetcode
/9.SQL/3.sql
UTF-8
945
4.71875
5
[]
no_license
-- 题目描述 -- 查找各个部门当前(dept_manager.to_date='9999-01-01')领导当前(salaries.to_date='9999-01-01')薪水详情以及其对应部门编号dept_no -- (注:请以salaries表为主表进行查询,输出结果以salaries.emp_no升序排序,并且请注意输出结果里面dept_no列是最后一列) CREATE TABLE `salaries` ( `emp_no` int(11) NOT NULL, -- '员工编号', `salary` int(11) NOT NULL, `from_date` date NOT NULL, `to_date` date ...
true
1e0c32123a1791bb4096f5d9e7f2295e34edfd43
SQL
samuelyo/Leetcode
/184DepartmentHighestSalary5.sql
UTF-8
287
3.921875
4
[]
no_license
select c.Name as Department, b.Name as Employee, b.Salary as Salary from (select DepartmentId, max(Salary) as highest from Employee group by DepartmentId) as a, Employee as b, Department as c where a.DepartmentId = c.Id and a.highest = b.Salary and a.DepartmentId = b.DepartmentId
true
becd2833afa444bc9df80071515852cc15c2322b
SQL
petkoxray/SQL-Course
/Functions, Triggers and Transactions/Lab/1.sql
UTF-8
411
3.703125
4
[]
no_license
USE soft_uni; DELIMITER $$ CREATE FUNCTION ufn_count_employees_by_town(town_name VARCHAR(20)) RETURNS DOUBLE BEGIN DECLARE e_count DOUBLE ; SET e_count:=(SELECT COUNT(employee_id) FROM employees AS e JOIN addresses AS a ON a.address_id = e.address_id JOIN towns AS t ON t.town_id = a.town_id WHERE t.name = tow...
true
915ff9c172fb295aef0dbf408e08c73982825a27
SQL
samehissam/clinic
/db/clinic.sql
UTF-8
43,249
3.015625
3
[ "BSD-3-Clause" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.5.2 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Nov 01, 2016 at 01:52 PM -- Server version: 10.1.16-MariaDB -- PHP Version: 5.6.24 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_C...
true
77fa61b32b76a97adc905e2d73e3f4cb4fae0f16
SQL
abdxax/bankbloodHail
/bank.sql
UTF-8
4,716
3.015625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.7.7 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: 03 ديسمبر 2018 الساعة 21:03 -- إصدار الخادم: 10.1.30-MariaDB -- PHP Version: 7.2.2 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OL...
true
8465c933c6afe6a8b102e85bb00578e8dc939e3d
SQL
sgrzys/docker-oracle-apex5-ords
/assets/apex/core/imgapi_public.sql
UTF-8
2,471
3.03125
3
[]
no_license
set define '^' set verify off prompt ...wwv_flow_image_api Rem NAME Rem imgapi_public.sql Rem Rem RUNTIME DEPLOYMENT: YES Rem Rem Arguments: Rem 1: Rem 2: Rem 3: Flow user Rem Rem MODIFIED (MM/DD/YYYY) Rem sdillon 04/13/2001 - Created Rem sdillon 05/01/2001 - Cleaned up for in...
true
c91ef45d64490e35df196aaa31a83f17d98d8331
SQL
NachoSanchez2/IdentidadOnline
/Memoria/UNIVEOIRSIDAD/univeoirsidad_studentuniversity.sql
UTF-8
2,535
3.171875
3
[]
no_license
-- MySQL dump 10.13 Distrib 8.0.22, for Win64 (x86_64) -- -- Host: localhost Database: univeoirsidad -- ------------------------------------------------------ -- Server version 8.0.22 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS *...
true
6fcd9d73f425823b903b56256321c932648e13d3
SQL
amaldonado1215/DataWarehouse
/vwUnbilledTechClaims.sql
UTF-8
3,119
3.046875
3
[]
no_license
alter view vwUnbilledTechClaims as select distinct vwBillableCasesCalculation.PID, vwBillableCasesCalculation.DOS, vwBillableCasesCalculation.Patient, vwBillableCasesCalculation.Region_short_name, vwBillableCasesCalculation.Hospital, vwBillableCasesCalculation.surgeon, vwBillableCasesCalculation.cl...
true
a561b3b4a263a3e8e4d26b07880b68707938b288
SQL
rsuwantong/PerfTracking_byDvcnInterest
/4impb4click.sql
UTF-8
3,644
2.890625
3
[]
no_license
/* #################################################################################### # Name: techname_bytpid_meas # Description: Create impclick_daydif and impb4click by offer, tpid # Input: taps # Version: # 2016/12/01 RS: Initial version ##################################################################...
true
dbb453676dbab142832cd9483242e4cd11aa99e9
SQL
Cherchercher/LocationCheckinAPI
/share/sql/tables/users.sql
UTF-8
420
2.796875
3
[]
no_license
DROP TABLE IF EXISTS `users`; CREATE TABLE IF NOT EXISTS `users` ( `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `firstname` varchar(255) default NULL, `lastname` varchar(255) default NULL, `email` varchar(255) UNIQUE default NULL, `phone` varchar(100) default NULL, `based-location` varchar(255) default...
true
c6ccc41e3c2e01c01b70f4446b0a2332d83b1396
SQL
daofuzhang/WantPy
/CODE/WantData/01-MariaDB/05-AP1/APDC/06-MAN_KA_POS.sql
UTF-8
18,309
3.234375
3
[]
no_license
SET @DATA_DATE_KA='20181122' COLLATE utf8_unicode_ci; /*現渠戰報資料日期*/ USE APDC; ----資料核對---- SELECT DATA_DATE, COUNT(1) FROM APDC.MAN_KA_POS WHERE ADD_POS_PERF_TYPE = '3衰退' GROUP BY DATA_DATE ; ----數值核對---- --TRG_AMT_MONTH:129356881.062061 SELECT SUM(TRG_AMT_MONTH) FROM APDC.MAN_KA_POS WHERE DATA_DATE=@DATA_DATE_KA ;...
true
6d1578a800752a074ac76857c55e6c91d533c858
SQL
AlexChronos1806/colaboradores
/src/main/resources/schema.sql
UTF-8
461
3.40625
3
[]
no_license
DROP TABLE IF EXISTS setores; DROP TABLE IF EXISTS colaboradores; CREATE TABLE setores ( id IDENTITY AUTO_INCREMENT PRIMARY KEY, descricao VARCHAR(20) NOT NULL ); CREATE TABLE colaboradores ( id IDENTITY AUTO_INCREMENT PRIMARY KEY, nome VARCHAR(60) NOT NULL, cpf VARCHAR(14) NOT NULL, ...
true
9cadd9802972f53d8344f474c20c314c3f8c0b2f
SQL
raminorujov/hackerrank
/sql/the-company/solution.sql
UTF-8
975
4.3125
4
[]
no_license
select c.company_code, c.founder, count(distinct lm.lead_manager_code) as lead_manager_count, count(distinct sm.senior_manager_code) as senior_manager_count, count(distinct m.manager_code) as manager_count, count(distinct e.employee_code) as employee_count from company c left join lead_manager lm on...
true
320d6b65f87ae04d4214e90e65c39f0122209c73
SQL
Gonzervogan/Bus-Reservation-System
/Bus Reservation Project With CSS/bus_reservation2.sql
UTF-8
6,255
3.234375
3
[]
no_license
-- MySQL Administrator dump 1.4 -- -- ------------------------------------------------------ -- Server version 6.0.3-alpha-community /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_...
true
1bb7c2fa366ac140d7028cabb656dfaa6caa7c33
SQL
72squared/glu-php
/examples/07_scratchpad/schema/session.sql
UTF-8
175
2.625
3
[]
no_license
CREATE TABLE session (session_id INTEGER PRIMARY KEY, token TEXT(32) UNIQUE, created INTEGER, modified INTEGER, data TEXT); CREATE INDEX session_modified ON session(modified);
true
39b7c63e55b2617b2683087c72177c87db669660
SQL
sdbs-uni-p/usage-of-not-replication
/sql-queries/query_40.sql
UTF-8
581
3.65625
4
[ "CC-BY-4.0" ]
permissive
-- counting the different contexts select concat(k.keyword,'.*'), d.p2key as key, count(*) from flattree d, keywords k where d.path like concat('%.not') and (d.p2key = k.keyword and d.p2key != 'not') group by d.p2key, k.keyword --, d.dewey union select k.keyword, d.pkey as key, count(*) from flattree d, keywords k...
true
f7f33a16fa38b8f3ef1eb22ca714c95be9afb622
SQL
jasiolek173/sklep
/conf/default/1.sql
UTF-8
2,817
3.625
4
[]
no_license
# --- !Ups CREATE TABLE "category" ( "id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, "name" VARCHAR NOT NULL ); CREATE TABLE "brand" ( "id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, "name" VARCHAR NOT NULL ); CREATE TABLE "product" ( "id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT...
true
49a315ba742a330d0987a80d5a0e9957077622c4
SQL
Will-Develops/MineAlert
/Databases/servers.sql
UTF-8
1,352
2.90625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.0.10.7 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Mar 18, 2015 at 11:17 PM -- Server version: 5.6.23 -- PHP Version: 5.4.23 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT *...
true
a16156e1bcb595f19cf1444d02ab7d2e86dae01f
SQL
anidemjm/Mysql
/primer.sql
UTF-8
510
3.375
3
[]
no_license
-- CREATE DATABASE neoland; USE neoland; CREATE TABLE bootcamp_students ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, dni VARCHAR (10) NOT NULL UNIQUE, name TEXT, age INT, course VARCHAR(255), birthday DATE ); ALTER TABLE bootcamp_students DROP COLUMN surname; SELECT * FROM bootcamp_students; INSERT INTO bootcamp_...
true
529e8eb27b1227b3c91c89ed0768e69d5b1d1bbe
SQL
ddxygq/spring-boot-learn
/spring-boot-monitor-mysql/monitor_table.sql
UTF-8
1,120
3.09375
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : local Source Server Version : 50726 Source Host : localhost:3306 Source Database : test Target Server Type : MYSQL Target Server Version : 50726 File Encoding : 65001 Date: 2019-07-26 11:53:40 */ SET FOREIGN_KEY_CHECKS=0; -- --------...
true
837469d4b658bf4ea64507f294848a8c07129564
SQL
fyqls/BulkLoad-1.1.0-transwarp
/customers/minsheng/tables/FIN_CUST_INFO_SUB/hyperbase_table.sql
UTF-8
478
2.671875
3
[]
no_license
drop table hyperbase_FIN_CUST_INFO_SUB; CREATE EXTERNAL TABLE hyperbase_FIN_CUST_INFO_SUB ( rk struct<CUSTNO:STRING>, AGEPART STRING, DEPOSITBALAVGL3MPART STRING, FASSETBALPART STRING ) ROW FORMAT DELIMITED COLLECTION ITEMS TERMINATED BY '~' STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler' WITH SERD...
true
1457061d615ed8a6ba2bfdf06f3fae82bba88003
SQL
mdoyewo/safehrm
/duplacement/include/duplacement.sql
UTF-8
8,702
2.5625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 3.1.1 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Feb 13, 2009 at 02:37 PM -- Server version: 5.1.30 -- PHP Version: 5.2.8 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_S...
true
ea9b056ce1b891cc3a9aed24da785aab13d52c79
SQL
anupama2504/ExploringHillaryClintonEmails
/SQLQueries/DataImport.sql
UTF-8
1,642
3.34375
3
[]
no_license
create database Hillary_Emails; use Hillary_Emails; create table aliases (Id varchar primary key, Aliase varchar(200), PersonId varchar(10) ) bulk insert aliases from 'E:\SelfLearn\HillaryClinton_Kaggle\Aliases.csv' with ( firstrow = 2, rowterminator = '\n', fieldterminator = ',' ); select * from aliases; create tab...
true
a2df0235d523ee88f2e83e4098e729ce835ac718
SQL
Monika933/Project-2-Spa
/schema.sql
UTF-8
5,155
3.265625
3
[]
no_license
DROP TABLE IF EXISTS `Appointments`; CREATE TABLE `Appointments` ( `id` int(11) NOT NULL AUTO_INCREMENT, `username` varchar(255) NOT NULL, `password` varchar(255) NOT NULL, `loggedIn` tinyint(1) DEFAULT '0', `createdAt` datetime NOT NULL, `updatedAt` datetime NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB D...
true
f8259e9b923f8ec8d07cfd20c89b06eec066b0c5
SQL
ebeilmann/DixieStateUniversity
/cs4307/sql_vqs3_files/listing1011.sql
UTF-8
102
3
3
[]
no_license
UPDATE titles SET sales = sales * 0.5 WHERE sales > (SELECT AVG(sales) FROM titles);
true
7910951407838d26cab07c64c0c78d21b656dda0
SQL
karriereat/bootcamp-2019
/12-laravel/bootcamp_2019_laravel.sql
UTF-8
8,981
3.0625
3
[]
no_license
-- ------------------------------------------------------------- -- TablePlus 2.8.1(252) -- -- https://tableplus.com/ -- -- Database: bootcamp_2019_laravel -- Generation Time: 2019-08-23 12:47:59.9380 -- ------------------------------------------------------------- /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_S...
true
967df66eefe4d7d9d12e906e84a2e953e53ac108
SQL
AdrianFelipe04/webServicesPHP-Angular
/crearbd.sql
UTF-8
427
2.53125
3
[]
no_license
-- Clinica.usuarios definition CREATE TABLE `usuarios` ( `id_usuario` int NOT NULL AUTO_INCREMENT, `nombre` varchar(100) NOT NULL, `apellido` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL, `correo` varchar(100) NOT NULL, `numero` int NOT NULL, `clave` varchar(100) NOT NULL, PRIMA...
true
faa035642329052e667d8806d22d37fca54fa168
SQL
sophiel6/Asignio-Summer-Logging-Project
/InternshipSkeleton.Data/DatabaseScripts/Log Tables/log innerjoin.sql
UTF-8
168
2.890625
3
[]
no_license
SELECT user.EmailAddress, log.UserID, log.TimeStamp, log.LogID, log.Level, log.Message, log.Source, log.Important from log INNER JOIN user on user.userID = log.userID ;
true
791d3e083a525c293e6cc45ae3943818e093fb75
SQL
diegofigs/tutorme.io
/conf/evolutions/default/7.sql
UTF-8
2,749
3.703125
4
[ "Apache-2.0" ]
permissive
# --- Documents, Assignments, and videos schemas # --- !Ups CREATE TABLE documents ( did SERIAL NOT NULL, dtitle VARCHAR(255) NOT NULL, ddescription VARCHAR(255) NOT NULL, dpath VARCHAR(255), lid INT NOT NULL REFERENCES lessons(lid), PRIMARY KEY (did) ); CREATE TABLE assignments ( aid SERIAL NOT NUL...
true
60b42df6275c60c69ccf18dd66493ca20964e9ff
SQL
norzi21/si-penjualan-sepeda-motor
/db/db_penjualan.sql
UTF-8
3,826
3.328125
3
[ "Apache-2.0" ]
permissive
-- phpMyAdmin SQL Dump -- version 3.4.5 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Jan 26, 2021 at 04:30 AM -- Server version: 5.5.16 -- PHP Version: 5.3.8 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!...
true
4569cb0329dd2d79e4566949a77a737fc563500a
SQL
Myusuf123/ProjectPBO
/Database/pbo.sql
UTF-8
1,536
3
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.3 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jan 19, 2021 at 04:14 AM -- Server version: 10.4.14-MariaDB -- PHP Version: 7.2.34 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIE...
true
68a6ac6dee5718228b37e505978a09c6ca2d5f1e
SQL
gtadiparthi/federated_ml_platform
/setup/eicu_sql_scripts/top5hospitals/patient_top5hospitals.sql
UTF-8
500
3.765625
4
[ "MIT" ]
permissive
-- take all patients from the 5 largest hospitals DROP MATERIALIZED VIEW IF EXISTS patient_top5hospitals CASCADE; CREATE MATERIALIZED VIEW patient_top5hospitals as ( with top_hospitals as ( select hospitalid, count(patientunitstayid) as n from patient group by hospitalid order by n desc limit 5 ...
true
ca0bd23f1556b9beeeb95aa97c1c692b412e681d
SQL
JairoDelgado2014/example
/src/main/sql/example.sql
UTF-8
1,884
2.859375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.1 -- https://www.phpmyadmin.net/ -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 05-06-2021 a las 16:45:54 -- Versión del servidor: 10.4.11-MariaDB -- Versión de PHP: 7.2.27 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00";...
true
aa9c7ff8c598c38ecb68f9c1551c478a07167474
SQL
kyle-miller/aequitas.lostportals.com.web.server
/src/main/resources/h2-schema.sql
UTF-8
1,405
2.96875
3
[]
no_license
CREATE TABLE circles ( id VARCHAR(36) NOT NULL PRIMARY KEY, entityId VARCHAR(36), latitude DECIMAL(11, 8) NOT NULL, longitude DECIMAL(11, 8) NOT NULL, radius INTEGER NOT NULL, outlineColor VARCHAR(7) NOT NULL, fillColor VARCHAR(7) NOT NULL ); CREATE TABLE entities ( id VARCHAR(36) NOT NULL PRIMARY KEY, title ...
true
8e362ad91e75d6e11c7209072db9cc0b0e3b168d
SQL
hyodii/OracleStudy-DB-SEMI-PROJECT
/OracleStudy/20210907_02_hr.sql
UHC
4,195
3.859375
4
[]
no_license
SELECT USER FROM DUAL; --==>> HR -- ̻ ̺ (JOIN) -- 1(SQL 1992 CODE) SELECT ̺1.÷, ̺2.÷, ̺3.÷ FROM ̺1, ̺2, ̺3 WHERE ̺1.÷1 = ̺2.÷1 AND ̺2.÷2 = ̺3.÷2 -- 2(SAL 1999 CODE) SELECT ̺1.÷, ̺2.÷, ̺3.÷ FROM ̺1 JOIN ̺2 ON ̺1.÷1 = ̺2.÷1 JOIN ̺3 ON ̺2.÷2 = ̺3.÷2; -- HR ̺ Ǵ ...
true
0885a191dcfb632ae8cdf85e233c654d339cfc30
SQL
mirwisek/Clinic
/sql/createInvoice.sql
UTF-8
235
3.28125
3
[]
no_license
CREATE TABLE IF NOT EXISTS Invoice( InvoiceID INT PRIMARY KEY, ClientID VARCHAR(4), Entry DATETIME NOT NULL, TotalAmount DECIMAL(10,2) DEFAULT 0, Locked BOOLEAN DEFAULT FALSE, FOREIGN KEY (ClientID) REFERENCES Client(ClientID) );
true
247c7d8ea0e1b4eb78284c35687ae11e5832e1dd
SQL
xuzhikethinker/t4f-data
/sql/spl/src/main/resources/sql/join/join1.sql
UTF-8
408
3.84375
4
[ "Apache-2.0" ]
permissive
select record_date, count(record_date) from pv left outer join ( select guid as guid, record_date as record_date from pv where tracking_id = 'tid2' ) t on pv.guid = t.guid and pv.record_date = t.record_date where tracking_id IN ('tid1','tid2') ...
true
d4278c08991f83edb5ce7405074e3d12c7045be9
SQL
yarovoy-it/event-organizer
/src/test/resources/insert.sql
UTF-8
4,849
2.53125
3
[]
no_license
INSERT INTO goods (id, name, count, type, price) VALUES (28, 'Plastic', 100, 'Table', 15.00), (29, 'Hultafors', 500, 'Knife', 0.65), (30, 'King', 500, 'Knife', 0.85), (31, 'Fox', 500, 'Knife', 0.55), (32, 'Wood', 200, 'Chair', 4.75), (33, 'Plastic', 200, 'Chair', 3.75), (34, 'Maestro', 300, 'Fork', 1.75), (35, 'BergHOF...
true
12e0d2de3f529c9adf26763851cbae45efda3373
SQL
neostreet/poker_session_data
/tournament_flavors.sql
UTF-8
160
2.546875
3
[]
no_license
use poker select buy_in,poker_flavor,count(*) from poker_sessions where poker_style = 1 group by buy_in,poker_flavor order by count(*) desc,buy_in desc; quit
true
54dfe52aea5f93e3794a5a78d1bfa0407179916b
SQL
Ironwenchao/Assignment1
/database/test.sql
UTF-8
1,587
3.984375
4
[ "MIT" ]
permissive
-- select * -- from product -- where id = 1; -- select review_detail -- from review -- where id = 5; -- select product_name, product_type, review_detail -- from PRODUCT, PRODUCT_REVIEW, REVIEW -- where PRODUCT.id = 1 -- and PRODUCT.id = PRODUCT_REVIEW.product_id -- and PRODUCT_REVIEW.product_id = REVIEW.product_id...
true
ba8565636369ba9b2be4a195b5d4b4b59e964468
SQL
chrislim48/SlackClone
/backend/sql/indexes.sql
UTF-8
665
2.75
3
[]
no_license
CREATE INDEX person_idx ON person(person_id, person); CREATE INDEX workspace_idx ON workspace(workspace_id, workspace); CREATE INDEX person_workspace_idx ON person_workspace(personID, workspaceID); CREATE INDEX channel_idx ON channel(channel_id, channel); CREATE INDEX channel_workspaces_idx ON channel_workspaces(worksp...
true
5a815ad74add64e02553e1467fac9e77330a6e97
SQL
NguyenTrongHien-1011/NetbeansProjects
/qlkh_csdl.sql
UTF-8
3,973
3.140625
3
[]
no_license
-- MySQL dump 10.13 Distrib 5.7.12, for Win64 (x86_64) -- -- Host: localhost Database: qlkh_csdl -- ------------------------------------------------------ -- Server version 5.7.15-log /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS *...
true
51ba49d3463e7a6587aa42818c16b61ca3c9f141
SQL
aneesahmed/gameplan2
/schema/gameplan2.sql
UTF-8
29,143
3.484375
3
[ "Apache-2.0" ]
permissive
-- MySQL Script generated by MySQL Workbench -- Mon 17 Jul 2017 03:48:39 PM PKT -- 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_M...
true
15f7d91cf4db7fd0ea8f5116fe08c3a49a7fb468
SQL
RobertWSmith/TD_SQL
/Ad Hoc Reports/Nebraskaland and Purcell Source Facility.sql
UTF-8
6,927
3.515625
4
[]
no_license
SELECT MATLS.MATL_ID , MATLS.PBU_NBR , MATLS.CATEGORY , MATLS.TIER , MATLS.FACILITY_ID AS SHIP_FACILITY_ID , SF.SRC_FACILITY_ID , COUNT(*) OVER (PARTITION BY MATLS.MATL_ID, MATLS.FACILITY_ID) AS SRC_FACILITY_CNT , COUNT(*) OVER (PARTITION BY MATLS.MATL_ID) AS SHIP_FACILITY_CNT , OTD...
true
ed66d222b4e7b5e7ad413e5d8ffda162eddfabc9
SQL
AECunningham/COMP62421Week4
/Task1Query5.sql
UTF-8
585
2.921875
3
[]
no_license
-- (5) Return, for every river in Great Britain, the length of that river attach database 'mondial.db' as 'mondial'; select distinct name,length from river,geo_river where river.name = geo_river.river and country = "GB"; select distinct name,length from river,geo_river where river.name = geo_river.river an...
true
441d6b3aac7b00ec93cdf8226726903245dda56e
SQL
NoMoreNicksLeft/skhematos
/app/ddl/00-common/50-images.sql
UTF-8
527
3.265625
3
[]
no_license
-- The images table. create table if not exists common.images ( id serial primary key, image_type common.image_type not null, mime_type text constraint unsupported_mime check (mime_type in ('image/jpeg','image/png','image/gif')) not null, source common.image_source_type, path ...
true
a84d6d05348754f7389207c32e14b8ef16cb6e70
SQL
JcmOrjuela/TaskManager
/config/db_structure.sql
UTF-8
1,307
3.625
4
[]
no_license
##sintaxis MariaDB ## @autor Juan Camilo Moyano Orjuela drop table users create table users( id int not null auto_increment, name varchar(255), password varchar(255), email varchar(255), create_at datetime, update_at datetime, primary key(id) ); create table statuses( id int not null auto_increment, name v...
true
e9ac56f0e76e62a6d6b08ba0c0eefd90a5cab403
SQL
PopMedNet-Team/popmednet
/Lpp.Adapters/Lpp.Dns.DataMart.Model.ESPQueryBuilder.I2B2/ESP_CODE_GENERATOR.sql
UTF-8
718
2.84375
3
[ "Apache-2.0" ]
permissive
SELECT DISTINCT 'INSERT INTO [ICD9_CODE_LOOKUP] ([CONCEPT_CD],[CODE_3DIG],[NAME_3DIG],[CODE_4DIG],[NAME_4DIG],[CODE_5DIG],[NAME_5DIG]) VALUES (''ICD9:' || esp_diagnosis.dx || ''',''' || uvt_dx_3dig.item_code || ''',''' || uvt_dx_3dig.item_text || ''',''' || uvt_dx_4dig.item_code_with_dec || ''',''' || uvt_dx_4di...
true
1b80ee8b750ff7e363081826bd981ac4dfc4784c
SQL
randze/emp-mgm-system
/docs/seeds.sql
UTF-8
568
2.828125
3
[]
no_license
USE emp_mgm_homework; INSERT INTO employee VALUES(0, "Pat", "K", 1, null); INSERT INTO employee VALUES(0, "Randze", "K", 1, 1); INSERT INTO employee VALUES(0, "Three", "Three", null, null); INSERT INTO role VALUES(0, "The best", 1000000, 1); INSERT INTO role VALUES(0, "The elite", 900000, 2); INSERT INTO role VALUES(...
true
1555e5ba67d433ef02e9134e2d72997873b58025
SQL
pedroviniv/viajei-soap
/viajei-hotel/database/tables.sql
UTF-8
578
3.328125
3
[]
no_license
CREATE TABLE hotel ( id SERIAL, name TEXT, country TEXT, uf TEXT, city TEXT, neighborhood TEXT, street TEXT, number INTEGER, PRIMARY KEY(id) ); CREATE TABLE room ( id SERIAL, description TEXT, occupied BOOLEAN, hotel_id BIGINT, daily NUMERIC, FOREIGN KEY(hotel_id) REFERENCES hotel(id), PRIMARY KEY(id) ...
true
bdf646964ff33fc081f5b7e97a7eab8ec69a215f
SQL
avalok11/Geekbrains
/Geek University Big Data/1_databases/hometask5/7_2.sql
UTF-8
1,352
3.609375
4
[]
no_license
/* (по желанию) Пусть имеется таблица accounts содержащая три столбца id, name, password, содержащие первичный ключ, имя пользователя и его пароль. Создайте представление username таблицы accounts, предоставляющий доступ к столбца id и name. Создайте пользователя user_read, который бы не имел доступа к таблице accoun...
true
2cc3b934f4e8e4fd55a1b830724372abc15007e7
SQL
mohanrajanna15/blackduck-alert
/src/test/resources/testDatabase/init_test_db.sql
UTF-8
480
2.9375
3
[ "Apache-2.0" ]
permissive
DO $$ BEGIN -- install dblink extension CREATE EXTENSION IF NOT EXISTS dblink; -- create role and database if there are errors they will be logged. PERFORM dblink('user=test dbname=postgres', 'CREATE ROLE sa LOGIN PASSWORD ''blackduck'' ', FALSE); PERFORM dblink('user=test dbname=postgres', 'CREATE ...
true
a6a213027d636b802a2f3b61b3d61087088b50af
SQL
Yomab/Base-de-donn-e
/ExerciceImmo.sql
UTF-8
4,580
3.453125
3
[]
no_license
//Afficher les biens par ordre de prix// use base Immo select prix_du_bien from bien_immobilier order by prix_du_bien ASC; +--------------+ | prix_du_bien | +--------------+ | 32000.000 | | 33000.000 | | 43000.000 | | 76430.000 | | 120000.000 | | 160000.000 | | 165000.000 | | 220000.000 | | 250000...
true
16f55b944931cb7e6ea55e52c31affe9ba8aebc9
SQL
gdegas/Connect-to-a-PRO-grammer
/tables/users.sql
UTF-8
369
2.640625
3
[]
no_license
DROP TABLE IF EXISTS users; CREATE TABLE users ( id serial, username varchar(40) not null, password varchar not null, mentor boolean, picture text, UNIQUE(username) ); insert into users (username, password, mentor) values ('gdegas', 'password123', true), ('killerkam', 'boobooba...
true
cc36ca125235da5d211659a5989f8114cf1fd0c7
SQL
ianhousman/sql-challenge
/EmployeeSQL/Views/hercules_b.sql
UTF-8
398
3.25
3
[]
no_license
--Shows all employees named Hercules B. --There have been 20 employees with a first name of "Hercules" and last name starting with "B" for this company. SELECT employees.emp_no, employees.birth_date, employees.first_name, employees.last_name, employees.gender, employees.hire_date FROM empl...
true
dec525de5656057a177eebda5ad241b50964bd43
SQL
OSGP/open-smart-grid-platform
/osgp/platform/osgp-core/src/main/resources/db/migration/V20180809153000666__Adds_device_cdma_settings.sql
UTF-8
742
3.0625
3
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
DO $$ BEGIN IF NOT EXISTS(SELECT 1 FROM information_schema.columns WHERE table_schema = current_schema AND table_name = 'device' AND column_name = 'mast_segment') THEN ALTER TABLE device ADD COLUMN mast_segment VARCHAR(20); ALTER TABLE device ADD COLUMN batch_number SMALLINT; COMMENT ON COLUMN device....
true
ee83284e11f151f44ebdcec7d5b00e0355aebe2e
SQL
serahmetpalli/BootcampX
/1_queries/rollover_students.sql
UTF-8
225
3.609375
4
[]
no_license
SELECT students.name, cohorts.name,cohorts.start_date as cohort_start_date,students.start_date as student_start_date FROM students JOIN cohorts ON cohort_id = cohorts.id WHERE cohorts.start_date != students.start_date
true
aaa44b37440a31a9851c980d8509b81c4e1b66f4
SQL
las93/scrum
/bundles/src/Admin/app/conf/install.sql
UTF-8
15,022
3.046875
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.2.7.1 -- http://www.phpmyadmin.net -- -- Client : 127.0.0.1 -- Généré le : Lun 08 Juin 2015 à 00:27 -- Version du serveur : 5.6.20 -- Version de PHP : 5.5.15 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@...
true
146bd09c4633575b31a52c1322b6e1821186f166
SQL
bhayyasaheb/H1-B-Visa-Project
/Hive/Q8B_AvgPrevailingWageForEachJobAndYearPartTime.sql
UTF-8
8,618
3.671875
4
[]
no_license
--8) Find the average Prevailing Wage for each Job for each Year For only job positions part time. Arrange the output in descending order - [Certified and Certified Withdrawn.] USE h1b; DROP TABLE IF EXISTS avgprewagepart2011; DROP TABLE IF EXISTS avgprewagepart2012; DROP TABLE IF EXISTS avgprewagepart2013; DROP...
true
3de6145ba9a08fbc0ab276177d7282b46c507355
SQL
jingmingh94/database
/interest.sql
UTF-8
2,965
3.859375
4
[]
no_license
USE Normalization1; DROP TABLE IF EXISTS person_interest; CREATE TABLE person_interest ( person_ID int(11) NOT NULL auto_increment, interests VARCHAR(100) , interest_1 VARCHAR(100) , interest_2 VARCHAR(100) , interest_3 VARCHAR(100), PRIMARY KEY (person_ID) )AS SELECT DISTINCT person_ID, interests FROM...
true
acd79a0790c307b6a59ad9389872687a36fdbd81
SQL
JacqueMorais/mazzatech
/mazzatech.sql
UTF-8
8,318
2.859375
3
[]
no_license
-- MySQL dump 10.13 Distrib 5.7.17, for Win64 (x86_64) -- -- Host: 127.0.0.1 Database: mazzatech -- ------------------------------------------------------ -- Server version 5.5.5-10.1.26-MariaDB /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SE...
true
81935358dcf30e6a830f9429e7b9b007c47c0e4e
SQL
sergiomr04/Introduccion_Bases-de-Datos_Santander
/Sesion_2/reto3.sql
UTF-8
682
3.515625
4
[]
no_license
/* Reto 3: Agrupamientos Sergio Maldonado Rodriguez */ -- ¿Cuántos registros hay por cada uno de los puestos? SELECT nombre, count(*) AS registros FROM puesto GROUP BY nombre; -- ¿Cuánto dinero se paga en total por puesto? SELECT nombre, sum(salario) AS salario_puesto FROM puesto GROUP BY nombre; #SELECT id_puesto,nom...
true
ed64b5414715755a3cd74c300b7c7f1a5fbbeafb
SQL
Freddy23b/Application-citoyenne-source-code
/ta_rdv.sql
UTF-8
2,520
2.734375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.6.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Aug 02, 2017 at 08:27 AM -- Server version: 5.7.14 -- PHP Version: 5.6.25 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */...
true
3568fc04a14081365d377ba3ed58f2a55e9975b9
SQL
0Gz2bflQyU0hpW/portal
/datacubic/src/main/resources/youku_play_test.sql
UTF-8
1,992
3.078125
3
[]
no_license
SELECT _index, _type, timestamp, ua, count(*) AS total_num, sum( CASE WHEN result_code IN ('0', '-8108', '-4501', '-4098', '-4010', '-1019', '-1018', '-1011', '-1010', '-1008', '-1007', '-1005', '-9', '-105', '-100', '1', '5', '1014', '9109', '20003', '20012', '20015', '20016...
true
82f1455523d6b5c7635f8765bcfb2be35e60fd5b
SQL
gofoji/pgtree
/testdata/delete_table_using_want.sql
UTF-8
104
2.6875
3
[ "MIT" ]
permissive
DELETE FROM table_a USING table_b WHERE b_id = table_b.id AND table_b.name = 'foo' RETURNING *;
true
2b1fafdb751fc1c8bf469ae03787dab8d4526b71
SQL
b-cancel/WebDevResource
/assn-8-database-and-orm-setup-b-cancel-master/assn-8-database-and-orm-setup-b-cancel-master/recipe_site.sql
UTF-8
6,232
2.875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.3 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Oct 24, 2018 at 06:32 PM -- Server version: 10.1.36-MariaDB -- PHP Version: 7.2.10 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OL...
true
f4f55972d352a21ed5074575f12b95053dd26a94
SQL
MonikaRM/meltano-postgres-example
/transform/models/my_meltano_project/staging/adventureworks/stg_adventureworks__special_offer_products.sql
UTF-8
253
3.015625
3
[]
no_license
with source as ( select * from {{ source('raw', 'specialofferproduct') }} ), renamed as ( select specialofferid as special_offer_id, productid as product_id, modifieddate as modified_at from source ) select * from renamed
true
f5e696edd0580dde02e1517746de07339cd1b8c8
SQL
wenxps/springcloudAlibaba-ecommerce
/e-commerce-service/e-commerce-order-service/src/main/resources/sql/order.sql
UTF-8
730
3.203125
3
[]
no_license
-- 创建 t_ecommerce_order 数据表 CREATE TABLE IF NOT EXISTS `imooc_e_commerce`.`t_ecommerce_order` ( `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '自增主键', `user_id` bigint(20) NOT NULL DEFAULT 0 COMMENT '用户 id', `address_id` bigint(20) NOT NULL DEFAULT 0 COMMENT '用户地址记录 id', `order_detail`...
true
cbbb7bd5c4f6a21bd95091d0a99dc4375230b9cf
SQL
sangmin9412/sql-study
/source/0603/Chapter04.sql
UHC
5,882
4.15625
4
[]
no_license
-- Ƽ ο Լ(׷ Լ) - AVG, COUNT, MAX, MIN, STDDEV, SUM, VARIANCE select count(*) from HR.employees; -- ¥ Ͻÿ. select sysdate, to_char(sysdate, 'D') "1~7", to_char(sysdate, 'Day') "", to_char(sysdate, 'DD') "¥" from dual; -- Ի Ͻÿ select employee_id, last_name, job_id, to_char(hire_date, 'D') " Number", to_char(hire_dat...
true
88aa314f8979e03745986eaf96d7cf111a040a46
SQL
mabr3/SIBD
/Labs/Lab6/lab6.sql
UTF-8
5,432
4.5
4
[]
no_license
--ex1 select b.branch_name from branch b where b.branch_city = 'Brooklyn'; --ex2 select b.branch_name, a.account_number from branch b, account a where b.branch_city = 'Brooklyn' and b.branch_name = a.branch_name; --ex3 select b.branch_name, a.account_number, d.customer_name from branch b, account a, depositor d where...
true
34f41b6cfde520acdfbb27de8682da3d9bf03b91
SQL
yaronlevi1/CDcode
/Python/MySQL/LeadGenBusiness/lead-gen-business-assignment.sql
UTF-8
4,405
4.46875
4
[]
no_license
USE lead_gen_business; -- 1. What query would you run to get the total revenue for March of 2012? SELECT SUM(amount) AS total_rev, DATE_FORMAT(charged_datetime, '%Y-%m') AS month FROM billing WHERE DATE_FORMAT(charged_datetime, '%Y-%m') = '2012-03' ; -- 2. What query would you run to get total revenue collected from ...
true
07166dee8ad32c1835eff1cdaf0e2889143f80a4
SQL
lzx3x3/Intro-to-Database-System-Design-CS4400-summer2020
/phase III/p3_procedure_shell_v3.sql
UTF-8
15,736
3.578125
4
[]
no_license
/* CS4400: Introduction to Database Systems Summer 2020 Phase III Template Team ## Team Member Name (GT username) Team Member Name (GT username) Team Member Name (GT username) Team Member Name (GT username) Directions: Please follow all instructions from the Phase III assignment PDF. This file must run without error ...
true
d47967099c844a48695eb52c5d5b9759c892ae45
SQL
oldfoot/lams
/install/procedures/sp_leave_user_settings.sql
UTF-8
239
2.828125
3
[]
no_license
CREATE DEFINER=`lams`@`%` PROCEDURE `sp_leave_user_settings`(IN pUserID INT(5)) BEGIN SELECT a.PeriodID,b.DateFrom,b.DateTo FROM leave_user_settings a, leave_period_master b WHERE a.UserID = pUserID AND a.PeriodID = b.PeriodID; END
true
0e40bca7e2f44b9c7a4b4f45b0051f67b305f3fc
SQL
silence-do-good/stress-test-Postgres-and-MySQL
/dump/high/day08/select0341.sql
UTF-8
264
3.015625
3
[]
no_license
SELECT sen.name FROM SENSOR sen, SENSOR_TYPE st, COVERAGE_INFRASTRUCTURE ci WHERE sen.SENSOR_TYPE_ID=st.id AND st.name='WeMo' AND sen.id=ci.SENSOR_ID AND ci.INFRASTRUCTURE_ID=ANY(array['6028','3100_2','2100_9','2202','5061','3069','5086','4064','2211','3011'])
true
1a02ccf69104702bc16bdf928588db637ac1d945
SQL
shu-csas-changgar/final-project-mwyz
/src/database/table_script.sql
UTF-8
5,557
3.3125
3
[]
no_license
-- MySQL Script generated by MySQL Workbench -- Sun Apr 28 15:44:17 2019 -- 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='ON...
true
4905fc3914b0b12e0f9ef5bedaf59861ac4e3afa
SQL
ayush-coditas/democoditas2
/src/main/resources/config/liquibase/changelog/v1.sql
UTF-8
654
3.625
4
[]
no_license
create table employee ( id int(10) not null Auto_INCREMENT, first_name varchar(255), last_name varchar(255), phone varchar(255), email varchar(255), date_of_birth date, created_by varchar(255), created_date timestamp, updated_by varchar(255), updated_date timestamp, Primary k...
true
9ac5109270367fab9c992f0bb74385ea1762f635
SQL
williammian/webapp
/script_objetos_banco_mysql.sql
UTF-8
4,426
3.703125
4
[]
no_license
/*CRIANDO A TABELA DE GRUPOS*/ CREATE TABLE tb_grupo ( id_grupo INT auto_increment PRIMARY KEY NOT NULL, ds_nome VARCHAR(50) NOT NULL, ds_descricao VARCHAR(200) NOT NULL ); /*CRIANDO A TABELA DE PERMISSÕES*/ CREATE TABLE tb_permissao ( id_permissao INT auto_increment PRIMARY KEY NOT ...
true
ece7c2b51a4f51fab33744b019af740e5cdb308f
SQL
HDXin/huolijuzhen
/doc/huolijuzhen/community_info.sql
UTF-8
2,277
3.46875
3
[]
no_license
drop table if exists community_info; /*==============================================================*/ /* Table: community_info */ /*==============================================================*/ create table community_info ( id bigint not null comm...
true
6f57c726af7506798fe36665f111c465d5c0f647
SQL
carlos0202/GymManager
/Original One (OVA)/ScriptRunnerV2.3/src/ScriptFiles/localhost.sql
UTF-8
31,215
3.703125
4
[]
no_license
/* * * Responsable: * Carlos Antonio González Canario * */ SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; CREATE DATABASE `gymmanagerv5` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci; USE `gymmanagerv5`; DELIMITER $$ CREATE PROCEDURE `usp_buscarEmpleado`(in filtroBusqueda varchar(30), in campoBusqueda int) begin...
true
869404ff4fbd64e3fd4877e7347e617684445aed
SQL
archane/OnBase
/Active_userlist.sql
UTF-8
240
3
3
[]
no_license
-- Simple list of OnBase users that are currently active select count(*) from hsi.useraccount where disablelogin <> 1 and username not like '%deactivated%' and username not like '%DELETED%' and lastlogon >= sysdate-180 order by usernum asc
true
3f001ce6f05af5c494d28e7103e2185388777559
SQL
ivanchuchulski/fmi-databases
/exercises/1-pc.sql
UTF-8
459
3.59375
4
[]
no_license
--exercise 1, simple queries, db pc --2.1 Select pc.model, pc.speed as MHz, pc.hd as GB From pc Where pc.price < 1200; --2.2 Select distinct product.maker From product Where product.type = 'Printer'; --t2.3 Select laptop.model, laptop.ram, laptop.screen From laptop Where laptop.price > 1000; --2.4 Select* From pri...
true
07cdc8ad4d93e1871f650f17743610518d3777c1
SQL
Ianformiga07/Produtor_Rural
/BD/inner_Join.sql
UTF-8
459
3.421875
3
[]
no_license
SELECT Produtor.CPF, Produtor.Nome as NomeProdutor,Produtor.CodigoMunicipio, Propriedade.Codigo, Propriedade.Nome,Propriedade.CodigoMunicipio, TipoExploracao.Descricao FROM ExploracaoPecuaria INNER JOIN Produtor ON Produtor.CPF = ExploracaoPecuaria.CPFCNPJProdutor INNER JOIN Propriedade ON Propriedade.Codigo = Explora...
true
d68fc9e260527f34a7a03e6349b65f41b64cef33
SQL
ioannisky/webapp
/applications/demoapp/sql/demoapp.sql
UTF-8
2,511
3.078125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.2.12deb2 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Apr 22, 2015 at 08:05 PM -- Server version: 5.5.42-1-log -- PHP Version: 5.6.7-1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET...
true
f6d81ae36b45b1d2aee8b3bf90e5aee652181f23
SQL
yiifan-L/SQL_2021.04
/BASIC/Complete Script for Sales Database.sql
UTF-8
6,966
3.359375
3
[]
no_license
DROP DATABASE IF EXISTS sales; CREATE DATABASE sales; USE sales; -- Table 'vendor' DROP TABLE IF EXISTS vendor; CREATE TABLE vendor ( V_CODE INT NOT NULL UNIQUE, V_NAME VARCHAR(35) NOT NULL, V_CONTACT VARCHAR(25) NOT NULL, V_AREACODE CHAR(3) NOT NULL, V_PHONE CHAR(8) NOT NULL, V_STATE CHAR(2)...
true
381dd4d6ccab6abf5bb0a0588f88e8123167bc14
SQL
cloudz-labs/awesome-media
/awesome-media-backend/src/main/resources/schema-mysql.sql
UTF-8
1,745
3.578125
4
[]
no_license
-- accounts DROP TABLE IF EXISTS `accounts`; CREATE TABLE `accounts` ( `username` varchar(255) NOT NULL, `password` varchar(255) , PRIMARY KEY (`username`) ); -- categories DROP TABLE IF EXISTS `categories`; CREATE TABLE `categories` ( `id` varchar(255) NOT NULL, `name` varchar(255) , PRIMARY KEY (`id`) );...
true
6ae0a620757dec8c571879b43b0d58631436d75e
SQL
yohaneneumann/propertyHunters
/property/property.sql
UTF-8
6,100
3.375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Apr 07, 2019 at 10:39 PM -- Server version: 10.1.37-MariaDB -- PHP Version: 7.3.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
true
7eb2ee461aae5148af1c449277c9765e0c42293c
SQL
mirabon/PrototypeV2
/Saver/src/main/resources/mysql/Create_Idf_en_MySql.sql
UTF-8
335
2.953125
3
[ "Apache-2.0" ]
permissive
/*Создание таблицы IDF для англоязычных слов*/ CREATE TABLE IF NOT EXISTS IDF_EN( ENID INT(20) NOT NULL, DOCS_COUNT INT(20) NOT NULL, IDF FLOAT(20) NOT NULL, PRIMARY KEY (ENID), CONSTRAINT FOREIGN KEY (ENID) REFERENCES DICTIONARY_EN (ENID) ON DELETE CASCADE ON UPDATE CASCADE );
true
f58da2f8b697e1f021e665b200290dbcfe89ae64
SQL
caloloc2/camarafrio
/camarafrio.sql
UTF-8
5,468
2.515625
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : Nibemi Source Server Version : 50559 Source Host : ec2-34-223-215-43.us-west-2.compute.amazonaws.com:3306 Source Database : camarafrio Target Server Type : MYSQL Target Server Version : 50559 File Encoding : 65001 Date: 2020-12-08 22:5...
true