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
73c3fb9830fe5dd1f1b3711756702491a4f24d44
SQL
wang-shun/talaris-svr
/schema/sql/1.5/clear.sql
UTF-8
9,378
3.734375
4
[]
no_license
# 配送员账单表 DROP TABLE IF EXISTS user_bill; create table user_bill( id bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键' , user_id int(11) NOT NULL COMMENT '用户ID', amount decimal(10,2) NOT NULL DEFAULT 0.00 COMMENT '金额', amount_type tinyint(4) NOT NULL DEFAULT 1 COMMENT '金额变更类型:0:支出;1:收入', clear_date date NOT NULL COM...
true
f3e81f9cea70b8be2330fd1cc265704046af9592
SQL
Steven-Douglass/library-app
/librarybe/src/test/resources/populateDB.sql
UTF-8
9,776
2.625
3
[]
no_license
INSERT INTO library.address(AddressID, AddressLine1, City, State, PostalCode) VALUES (1, '123 Main Street', 'Philadelphia', 'PA', '19123'); INSERT INTO library.address(AddressID, AddressLine1, AddressLine2, City, State, PostalCode) VALUES (2, '54 Central Road', 'Apartment 3B', 'Philadelphia', 'PA', '19103'); INSERT INT...
true
f28b85e8ed6baac7221ee4c9151f501ceea61c1b
SQL
jacob-bw/Chinook
/total_sales_year.sql
UTF-8
253
3.171875
3
[]
no_license
select SUM(Invoice.Total) as TotalSalesFrom2009 from Invoice where Invoice.InvoiceDate between '2009-01-01' and '2009-12-31' select SUM(Invoice.Total) as TotalSalesFrom2011 from Invoice where Invoice.InvoiceDate between '2011-01-01' and '2011-12-31'
true
1dcaf0084f6e7c93e100eb419069a46d321c6717
SQL
patorma/zapateria
/agregacion.sql
UTF-8
937
3.703125
4
[]
no_license
SELECT CONCAT(nombre," ",apellido) AS nombre_completo, "", pais_origen AS email FROM autores UNION SELECT CONCAT(nombre," ",apellidos) AS nombre_completo, email , "" FROM usuarios; -- sin subconsultas -- SELECT AVG(ventas) FROM libros; -- -- 273.4909 -- SET @promedio = (SELECT AVG(ventas) FROM libros); -- SELECT...
true
c8c3977b748bcc0072d587c4f8304fc454257e60
SQL
pinkybs/hf-iland-tw
/snsplus-kimotw/sql/kimo_island.sql
UTF-8
481,652
2.71875
3
[]
no_license
/* SQLyog Community Edition- MySQL GUI v6.14 RC MySQL - 5.1.49community-log : Database - ********************************************************************* */ /*!40101 SET NAMES utf8 */; /*!40101 SET SQL_MODE=''*/; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; /*...
true
323e809ded928da536187000a7659aa86ce6b76c
SQL
Matthew-Cameron/CPSC304_Project
/sql/insert_data.sql
UTF-8
4,478
2.78125
3
[]
no_license
insert into users values(1893, 'bob', 'bob', '6046789012', 'Bob_Smith'); insert into users values(1801, 'john', 'abced', '6047890123', 'John_Liu'); insert into users values(1798, 'dave', 'qatd', '6048901234', 'Dave_Johnson'); insert into users values(1892, 'jeff', 'abc', '6049012345', 'Jeff_Zhao'); insert into users va...
true
88f88966bb877fde08b84e7806189fbd0b70fdde
SQL
vazpeitiah/ponydesk
/Base de datos/basededatos.sql
UTF-8
12,925
3.46875
3
[]
no_license
-- MySQL Workbench Forward Engineering SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0; SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0; SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL,ALLOW_INVALID_DATES'; -- ----------------------------------------------------- -- Schema Veterinar...
true
75401408d322f55ac71abb4f5fe888b25d6c5640
SQL
nqduy1805/suncorp
/.phpmydamin/suncorp.sql
UTF-8
7,296
2.890625
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 5.1.0 -- https://www.phpmyadmin.net/ -- -- Máy chủ: 127.0.0.1 -- Thời gian đã tạo: Th8 06, 2021 lúc 09:41 AM -- Phiên bản máy phục vụ: 10.4.19-MariaDB -- Phiên bản PHP: 7.3.28 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHAR...
true
842dcc6eea46b2aa37a603106245013338feff80
SQL
johanNavarro/evaluacion
/Interactuando_bd_Edinson_Navarro/php/agenda.sql
UTF-8
2,152
3.234375
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : desarrollo Source Server Version : 50721 Source Host : localhost:3306 Source Database : agenda Target Server Type : MYSQL Target Server Version : 50721 File Encoding : 65001 Date: 2018-11-14 15:32:57 */ SET FOREIGN_KEY_...
true
52a006a3ae7ef8feabcf7f4411c756da56bdae15
SQL
joeydeluca/dating-api
/src/main/resources/cleanup.sql
UTF-8
1,113
3.421875
3
[ "MIT" ]
permissive
delete from profile_views where view_date <= DATE_SUB(NOW(),INTERVAL 1 YEAR); delete from profile_views where from_user_id = 37; delete from profile_views where to_user_id = 37; delete from profile_views where from_user_id = 0 or to_user_id = 0; delete from flirts where date <= DATE_SUB(NOW(),INTERVAL 1 YEAR); delete...
true
988656ca08dba198edc49dea6e87ad352e4fc06e
SQL
choi258/Role_Scheme_and_SQL_queries
/ORACLE_SQL/prob_1.sql
UTF-8
273
3.578125
4
[]
no_license
select distinct d.DEPTNAME as DepartmentName, trunc(avg(r.GRADEASPERCENTAGE),2) as AverageGrade from DEPARTMENT d, STUDENT s, REGISTRATION r where d.DEPTID = s.DEPTID and s.STUDENTID = r.STUDENTID and r.GRADEASPERCENTAGE > 60 group by d.DEPTNAME order by AverageGrade desc;
true
a0c55079ddbf01c3a435a1daa55db4051693dd90
SQL
wuxiaodong1986/unioncoding
/doc/DbInit.sql
UTF-8
3,625
3.328125
3
[]
no_license
SET FOREIGN_KEY_CHECKS=0; DROP TABLE IF EXISTS `authority`; CREATE TABLE `authority` ( `authority` varchar(50) NOT NULL, `name` varchar(50) DEFAULT NULL, PRIMARY KEY (`authority`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; INSERT INTO `authority` VALUES ('admin', '超级管理员'); INSERT INTO `authority` VALUES ('test', 'te...
true
88b589dc48d220aa9c29f939e039d5f92734d027
SQL
EvilWizard99/db-multi-connect
/tests/test_db_setup.sql
UTF-8
241
2.6875
3
[ "LicenseRef-scancode-warranty-disclaimer" ]
no_license
# create the test database CREATE DATABASE IF NOT EXISTS ewc_test_database; # create a user with access to the test database GRANT ALL PRIVILEGES ON ewc_test_database.* TO 'ewc_test_user'@'localhost' IDENTIFIED BY 'ewc_test_user_password';
true
5ba200c66998beda9c1ff451f16caf8e9d99d88a
SQL
target/goalert
/migrate/migrations/20210811141518-search-indexes.sql
UTF-8
2,053
2.71875
3
[ "Apache-2.0" ]
permissive
-- +migrate Up notransaction create index concurrently if not exists idx_search_alerts_summary_eng on alerts using gin (to_tsvector('english', replace(lower(summary), '.', ' '))); create index concurrently if not exists idx_search_escalation_policies_name_eng on escalation_policies using gin (to_tsvector('english', re...
true
9f902ae22bf9315dea2c1f0c81111b31a24dd0b9
SQL
budthapa/warehouse
/conf/evolutions/default/1.sql
UTF-8
2,905
3.375
3
[ "Apache-2.0" ]
permissive
# --- Created by Ebean DDL # To stop Ebean DDL generation, remove this comment and start using Evolutions # --- !Ups create table product ( primary_key bigint auto_increment not null, product_id varchar(255), product_name varchar(255), description v...
true
5e92ccce8efa78eb816e1f9c1a82cca654038536
SQL
Brest-Java-Course/Alesja-Grechka
/app-dao/src/main/resources/sql/get_journeys_between_dates.sql
UTF-8
208
3.1875
3
[]
no_license
select a.automobileid,make,number,fuelrate, journeyid,origin_destination,journey_date,distance from AUTOMOBILE as a join JOURNEY as j on (a.automobileid = j.automobileid and j.journey_date between ? and ?)
true
26b5ec92ccfb494341ac8803d910ccf2fdeb0b4f
SQL
appinikrishnachaitanya/apcovid19_webApp
/finalforms1/medicalshop/helpinghands_donors.sql
UTF-8
2,459
2.9375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.9.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1:3306 -- Generation Time: Jul 27, 2020 at 06:27 PM -- Server version: 10.4.10-MariaDB -- PHP Version: 7.4.0 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET...
true
cb92aec3d262ac24c5fae5c8d92ee7851638f085
SQL
BrunoLavigne/420-113-AH-DRAGONS
/bibliotheque-06-back-end-test/MySQL.sql
UTF-8
1,932
4.09375
4
[]
no_license
DROP TABLE IF EXISTS reservation CASCADE; DROP TABLE IF EXISTS pret CASCADE; DROP TABLE IF EXISTS livre CASCADE; DROP TABLE IF EXISTS membre CASCADE; CREATE TABLE membre ( idMembre INTEGER(3) AUTO_INCREMENT CHECK(idMembre > 0), nom VARCHAR(10) NOT NULL, telephone bigint(10), ...
true
8f90f42e2ceab4bb92b113f1efa580032955bbba
SQL
feisishui/oracle-spatial-workshop
/Workshop_Files/labs/11-georaster/08-algebra/temperature/10-statistics.sql
UTF-8
716
2.953125
3
[]
no_license
declare gr sdo_georaster; win sdo_number_array := null; res varchar2(100); begin for i in 2 .. 2 loop select RASTER into gr from TEMPERATURE_table where ID = i for update; res := sdo_geor.generateStatistics( georaster => gr, samplingFactor => 'sampli...
true
0d1d207d1d9f8d7092208e1371941ec5d5785d32
SQL
gbartoczevicz/next-vaccination
/packages/server/http-server/prisma/migrations/20210610005737_create_vaccines_table/migration.sql
UTF-8
247
2.984375
3
[ "MIT" ]
permissive
-- CreateTable CREATE TABLE "vaccines" ( "id" VARCHAR(50) NOT NULL, "name" VARCHAR(50) NOT NULL, "description" TEXT NOT NULL, PRIMARY KEY ("id") ); -- CreateIndex CREATE UNIQUE INDEX "vaccines.name_unique" ON "vaccines"("name");
true
9444a6bf5d6b0acdc58b0b2e028f992df1864988
SQL
TOlmsteadWSCU/Database-Management
/195_Ch3_Assign1_TOlmstead.sql
UTF-8
1,445
3.625
4
[]
no_license
#195 #Ch3_Assign1 #Travis Olmstead use ap; #6 select vendor_name, vendor_contact_last_name, vendor_contact_first_name from vendors order by vendor_contact_last_name, vendor_contact_first_name; #7 select concat(vendor_contact_last_name, ', ',vendor_contact_first_name) as full_name from vendors where vendor_contact_last_...
true
a236afafbcfc234bfe0057ec26cef097371ed65e
SQL
CUBRID/cubrid-testcases
/sql/_06_manipulation/_04_insert/cases/1029.sql
UTF-8
726
2.984375
3
[ "BSD-3-Clause" ]
permissive
set system parameters 'create_table_reuseoid=no'; --Test nested insert create class person2(name varchar(20), age integer , gender char(1)); create class employees(empno integer, deptno integer, attr person2); insert into employees values(1001, 10, (insert into person2 values ('xxx', 21, 'f'))); insert into employe...
true
62d91fd90d8490d401c5fb7034abee6b64d29255
SQL
majahar/Node-user-mngmnt-sys
/node-mysql-registration-login-api.sql
UTF-8
1,778
2.796875
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.5.4.1deb2ubuntu2.1 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: May 02, 2021 at 12:32 PM -- Server version: 5.7.33-0ubuntu0.16.04.1 -- PHP Version: 7.0.33-6+ubuntu16.04.1+deb.sury.org+3 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!...
true
8544d6193f72121e016b3eb7e454fe5361a32869
SQL
guidomatos/WebApi.SBS.Dapper
/Control.de.Cambios/scriptsBD/DBA_oracle_crear_usuario.sql
WINDOWS-1250
809
3.515625
4
[]
no_license
--GRANT CONNECT,RESOURCE,UNLIMITED TABLESPACE TO blog IDENTIFIED BY blog; --Create user and password alter session set "_ORACLE_SCRIPT"=true; CREATE USER gmatos IDENTIFIED BY gmatosc88; --Assign privileges to the user through attaching the account to various roles, --starting with the CONNECT role: GRANT CONNECT T...
true
a8f4d5316b0194dc243c8e0b0609e495acab70db
SQL
altamira/visualstudio
/Sistema de Informação Altamira/EGISSQL.Database/dbo/Stored Procedures/Procs1/pr_classificacao_documento_pagar.sql
UTF-8
1,223
3.515625
4
[]
no_license
 CREATE PROCEDURE pr_classificacao_documento_pagar @ic_parametro int, @dt_inicial datetime, @dt_final datetime as ------------------------------------------------------------------------------- if @ic_parametro = 1 -- listagem dos grupos de documento a pagar por classificacao ---------------------------------------...
true
0eea34b993d331230b29de870a97c26f767aed60
SQL
wenqi1/mysql-function
/getChildList.sql
UTF-8
540
3.453125
3
[]
no_license
DELIMITER $$ DROP FUNCTION IF EXISTS `getChildList`$$ CREATE FUNCTION `getChildList`(in_rootId VARCHAR(100)) RETURNS VARCHAR(2000) BEGIN #存放所有遍历结果 DECLARE tmp_str VARCHAR(2000); #定义一个变量存放子id DECLARE tmp_id VARCHAR(100); SET tmp_str = '$'; SET tmp_id = in_rootId; WHILE tmp_id is not null DO S...
true
debb9d629c909770b049eb33bd72836e7581d894
SQL
shiqing881215/SQL-practice
/day3/package_spec.sql
UTF-8
1,059
2.53125
3
[]
no_license
create or replace package hr_pkg is -- All declare here can be considered as global, which can be access by -- calling hr_pkg.sth -- declare procedure and function procedure emp_info (p_dept_id in employees.department_id%type); procedure insert_pro (p_job_id in jobs.job_id%type, p_job_title in jobs.job_title%type...
true
de4af7ade1519416bc8e2c1ac0693b9e67fb3402
SQL
senator2202/MJC-module2
/src/main/resources/schema.sql
UTF-8
3,247
3
3
[]
no_license
-- -------------------------------------------------------- -- Хост: 127.0.0.1 -- Версия сервера: 8.0.21 - MySQL Community Server - GPL -- Операционная система: Win64 -- HeidiSQL Версия: 11.0.0.5919 -- -------------------------------------------------------- /*...
true
5194ef4dab4d528658ed8adcaffeadf4df7e8901
SQL
zyc737347123/linux-server
/sql/voice-network-v2.sql
UTF-8
1,787
3.90625
4
[ "MIT" ]
permissive
SELECT t1.calling_party_number, t1.cnt_one_hop, (t1.cnt_one_hop + t2.cnt_two_hop) as cnt_hop, t3.cnt_double, t4.cnt_1_2 FROM ( SELECT calling_party_number, COUNT(*) as cnt_one_hop FROM voice_cnt GROUP BY calling_party_number ) as t1 LEFT JOIN ( SELECT calling_party_number, COUNT(*) as cnt_two_hop FROM ( ...
true
02d13bf163f504f733dc1bbf6d44e9f3dbbf6bcc
SQL
naveenkod22/MySQL
/Query/1-Retriving Data from Single Table/1.11 limit clause.sql
UTF-8
250
2.734375
3
[ "MIT" ]
permissive
-- 1.11 limit clause -- limit should come last in query select * from sql_store.customers limit 3; select * from sql_store.customers limit 6, 3; -- outputs 7,8,9 positions -- exercicise select * from sql_store.customers order by points desc limit 4;
true
e774d96e494db451182604867beaf867f4f0b33b
SQL
laura1210/REGIE
/db/mysql_initial.sql
UTF-8
3,101
3.65625
4
[]
no_license
/* Create the REGIE database and tables needed to store information */ create database if not exists REGIE; use REGIE; drop table if exists Course; create table Course(course_code varchar(12) primary key, course_name varchar(80), max_num int(3), classroom var...
true
26e5ff38ec07869221375255ff52dbc5a32ea132
SQL
anyuleannli/SQL
/# Easy 1084.sql
UTF-8
311
4.09375
4
[]
no_license
# Easy 1084 select distinct P.product_id, P.product_name from Product P left join Sales S on P.product_id = S.product_id where P.product_id not in (select product_id from Sales where sale_date >'2019-03-31' or sale_date <'2019-01-01') and (sale_date between '2019-01-01' and '2019-03-31') order by P.product_id
true
858ce159370fdda74b417d5bdf4d5111f0d50f1c
SQL
Kipau/Kipau
/mlatiharjo.sql
UTF-8
21,217
2.75
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.7.0 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Nov 29, 2017 at 03:48 PM -- Server version: 10.1.25-MariaDB -- PHP Version: 7.1.7 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
true
d8bf05096b4795c75732ce1a01bdf3307aeaf003
SQL
amirphl/Database_Design_Project
/database_export/store/store_temporarycustomers.sql
UTF-8
2,583
3.046875
3
[]
no_license
CREATE DATABASE IF NOT EXISTS `store` /*!40100 DEFAULT CHARACTER SET utf8 */; USE `store`; -- MySQL dump 10.13 Distrib 5.7.9, for Win64 (x86_64) -- -- Host: localhost Database: store -- ------------------------------------------------------ -- Server version 5.7.11-log /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHA...
true
699b8cf47050f55ba73c880ad0cae1af1492179e
SQL
dacer250/aiocr-web
/database/sql/统计传入日期的前一天开发者与用户的数据_方式2.sql
UTF-8
4,654
4.21875
4
[]
no_license
DROP PROCEDURE IF EXISTS AutoStaticsticalReportUserAndDeveloper; /*统计昨天用户和作者的出码量*/ CREATE PROCEDURE AutoStaticsticalReportUserAndDeveloper() BEGIN DECLARE v_second_start int; DECLARE v_second_end int; DECLARE v_sysdate date; DECLARE v_total int default...
true
f7b18dfb01ef09c69a5b9245795cf5f78a7dccfb
SQL
abdelhak2406/Abdd_TP_Sii
/TP3/tp3.sql
UTF-8
6,424
3.5625
4
[]
no_license
--1 se connecter en tant que systeme voi DescRibe dict; select * from DICT; Describe ALL_TAB_COLUMNS; select COMMENTS from DICT where TABLE_NAME='ALL_TAB_COLUMNS'; describe USER_USERS;--la vue User_users affiche les informations concernant les utilstaatuer conecteé select COMMENTS from DICT where TABLE_NAME='USER_...
true
db444c4e6e340421c70006c7d0edde1ddd68b5c0
SQL
organizer-network/organizer.network
/db/schema/migrate.miau.sql
UTF-8
263
3.1875
3
[]
permissive
CREATE TABLE IF NOT EXISTS route ( slug VARCHAR(255), target_id INTEGER NOT NULL, target_type VARCHAR(255) NOT NULL, type VARCHAR(255) DEFAULT 'active', updated TIMESTAMP, created TIMESTAMP ); CREATE INDEX route_idx ON route (slug, target_id, target_type);
true
59b9aad77e753ad0981088b980e248e78f46336e
SQL
KrzysztofLakomy/HospitalWebPage
/SQL/przykladowe_dane.sql
UTF-8
1,830
2.859375
3
[]
no_license
insert into szpital.lekarz(imie,nazwisko,haslo,nr_licencji,specjalizacja) values ('Marian','Mak','123', 57, 'anestezjolog'), ('Mariusz','Mamacki','123', 123, 'reumatolog'), ('Robert', 'Lis', '123', 69, 'kardiolog'), ('Adam', 'Abacki', '123', 42, 'pediatra'); insert into szpital.pacjent(imie,nazwisko,haslo,pesel) val...
true
7793fa9b2632676bc0c7f078224c8eddf42c63f1
SQL
haochenprophet/database
/organ.sql
UTF-8
3,600
3.0625
3
[]
no_license
CREATE DATABASE IF NOT EXISTS `organ` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci */ /*!80016 DEFAULT ENCRYPTION='N' */; USE `organ`; -- MySQL dump 10.13 Distrib 8.0.30, for Win64 (x86_64) -- -- Host: localhost Database: organ -- ------------------------------------------------------ --...
true
88bdd21e057d6232619e7d5bdea328d100c18b79
SQL
varadjos89/Sitetracker
/First_set_of_queries.sql
UTF-8
1,285
2.78125
3
[]
no_license
insert into resale_price values( 1, 24, 120000); insert into resale_price values( 2, 36, 160000); insert into bus_condition values( 1, 'miles over 100,000', -0.1); insert into bus_condition values( 2, 'air conditioning system', 0.03); insert into bus_condition values( 3, 'bus year is 1972 or older', 0.34); insert int...
true
efdfb74202b838118792d8163761467e59ab6083
SQL
JuHoonL/ORACLE
/문제은행(userCBT)-2019-04-25.sql
UHC
5,024
3.5
4
[]
no_license
-------------------------------------------------------- -- - -4-25-2019 -------------------------------------------------------- DROP TABLE "USERCBT"."TBL_CBT" cascade constraints; DROP TABLE "USERCBT"."TBL_TEST" cascade constraints; -------------------------------------------------------- -- DDL for Table TBL_...
true
5dd13b62bdadeca1a86cb3240556364a184dbea7
SQL
availabs/mitigate-ny
/tasks/severe-weather-edits/2 - SBA for Sandy to Severe Weather.sql
UTF-8
3,368
3.53125
4
[]
no_license
--SELECT sum(total_verified_loss) as total_loss FROM public.sba_disaster_loan_data where fema_disaster_number ='4085' -- = 3,939,227,624 - Original sba total verified loss -- = 3,935,992,730 - 4 million less in tract mapping due to removing water only tracts INSERT INTO severe_weather.details( begin_yearmonth,...
true
ba2661fe6da08fafa4a4ce8337b14479685ee5f2
SQL
tontu01/BaiTap
/kiemtragiuaki/quanlydanhba.sql
UTF-8
3,209
2.890625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.4 -- https://www.phpmyadmin.net/ -- -- Máy chủ: 127.0.0.1 -- Thời gian đã tạo: Th8 20, 2021 lúc 01:53 PM -- Phiên bản máy phục vụ: 10.4.17-MariaDB -- Phiên bản PHP: 7.4.20 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHAR...
true
e06e7ca6bed5932206f0054844802156eddc1978
SQL
CaptainLian/Project-Revolution
/app/queries/getCurrentSchoolYearTerms.sql
UTF-8
355
3.640625
4
[]
no_license
SELECT to_char(datestart, 'MM/DD/YYYY') as datestart, to_char(dateend, 'MM/DD/YYYY') as dateend FROM TERM T WHERE SCHOOLYEARID IN (SELECT SCHOOLYEARID FROM TERM WHERE NOW() >= DATESTART AND NUMBER = 1) AND SCHOOLYEARID IN (SELECT SCHOOLYEARID FROM TERM WHERE NOW() <= DATEEND A...
true
fbc3ef57e8c8ae123b9a4e93e65118307733695c
SQL
jbarthelmess/BarthelmessProject0
/BartProject0/BankAPISetup.sql
UTF-8
1,289
4.3125
4
[]
no_license
-- Tables should be named in the singular create table client( client_id int primary key generated always as identity, full_name varchar(256) not null ); create table account ( account_id int primary key generated always as identity, client_id int not null, amount real default 0 ); alter table account add foreign ke...
true
8e5fa3c813755c0dd2bd34cdb2d8d9a4023bfdd5
SQL
simgill13/post9
/many.sql
UTF-8
368
3.109375
3
[]
no_license
create table if not exists toppings ( id serial primary key, name text not null ); create table if not exists pizzas ( id serial primary key, name text not null ); create table if not exists pizzas_toppings ( pizza_id integer references pizzas not null, topping_id integer references toppings not...
true
85b803070be4e0d73f9d22eee8d17898a97d15d2
SQL
Groverkss/Dota2-Analyzer
/core/SQL/schema.sql
UTF-8
4,361
3.515625
4
[ "MIT" ]
permissive
CREATE TABLE players( steam_name varchar(255) NOT NULL, steam_id varchar(255), name varchar(255) NOT NULL, country_of_origin varchar(255) NOT NULL, date_of_birth DATE NOT NULL, signature_hero varchar(255) NOT NULL, playtime SMALLINT DEFAULT 0 NOT NULL, status varchar(255), PRIMARY KEY(steam_id) ); CREATE TAB...
true
a5f31adc7b1cc9e71c3b3bf6d5a226a973c42804
SQL
jivanrs/sis_nom
/sistema_nomina(4).sql
UTF-8
9,835
3.140625
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.0.4.1 -- http://www.phpmyadmin.net -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 06-06-2014 a las 23:41:20 -- Versión del servidor: 5.5.32 -- Versión de PHP: 5.4.16 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHAR...
true
b0aaa5619357bf1068fbbb98946455c858c2173f
SQL
lalwanijayesh/hackerrank-solutions
/SQL/Basic Select/Weather Observation Station 9.sql
UTF-8
291
3.453125
3
[]
no_license
# Solution 1 SELECT DISTINCT city FROM station WHERE SUBSTRING(city, 1, 1) NOT IN ('a','e','i','o','u'); # Solution 2 SELECT DISTINCT city FROM station WHERE LEFT(city, 1) NOT IN ('a','e','i','o','u'); # Solution 3 SELECT DISTINCT city FROM station WHERE city REGEXP '^[^aeiou]';
true
e0d5ccaa0927edf3d15aa6e0a9a83d5073853893
SQL
aditya8119/Movieapp-BackEnd
/movieapp-db/src/main/sql/db-seed-data.sql
UTF-8
4,627
3.40625
3
[]
no_license
-- Copyright 2018-2019, https://beingtechie.io -- Script: db-seed.sql -- Description: Setup seed data that is essential to bring up applications in running state. -- Version: 1.0 -- Author: Thribhuvan Krishnamurthy INSERT INTO movieapp.GROUPS (ID, UUID, NAME, DESCRIPTION, CREATED_BY) VALUES (1, 101, 'Manage User...
true
3b2cad29bae57eeb2fc4cc17e522ca53ecf5d43f
SQL
silence-do-good/stress-test-Postgres-and-MySQL
/dump/low/day11/select1509.sql
UTF-8
178
2.609375
3
[]
no_license
SELECT timeStamp, temperature FROM ThermometerOBSERVATION o WHERE timestamp>'2017-11-10T15:09:00Z' AND timestamp<'2017-11-11T15:09:00Z' AND temperature>=49 AND temperature<=56
true
65f9c0162829c5281eef6f836f296b24960f0abf
SQL
ribacq/cdm
/src/sql/tablesCreation.sql
UTF-8
1,684
4
4
[]
no_license
-- drop everything drop schema if exists cdm cascade; -- schema cdm create schema cdm; set schema 'cdm'; -- lang_type create table if not exists language_type ( code char(3) primary key, name varchar(1024) unique not null, notes varchar(1024) null ); -- language create table if not exists language ( code char(3)...
true
d7856447d46e40a1698c918b234bcf28ab63f02a
SQL
ViktoriaRo/eiffelform
/.gitignore/sql/add_prize.sql
UTF-8
246
2.59375
3
[]
no_license
-- !: studentID, §: institutionID, %: prize_name, ^: date INSERT INTO prizes(studentID, institutionID, prize_name, date) VALUES((SELECT id FROM students WHERE name = "!", degree = "$"), (SELECT id FROM institutions WHERE name = "§"), "%","^");
true
d28ad838ef0664f4f87e1e65186bbe8c5184499a
SQL
maflorvega/Redash_queries
/queries_versioned/86_Sub Zero widget per Month.sql
UTF-8
527
3.34375
3
[]
no_license
/* Name: Sub Zero widget per Month Data source: 4 Created By: Admin Last Update At: 2015-10-16T16:12:17.117408+00:00 */ SELECT month(date_time) AS MONTH, COUNT(clicks) AS clicks, FROM ( SELECT date_time, clicks, FROM ( SELECT count(*) as clicks, ...
true
d89f5a99d37f84a0dfa6e9d79a0d118aa238c8ab
SQL
julian9319/test_opc
/sql/sql.sql
UTF-8
995
3.28125
3
[]
no_license
CREATE DATABASE IF NOT EXISTS test_optime_consultin CHARACTER SET utf8 COLLATE utf8_general_ci; CREATE TABLE IF NOT EXISTS category ( id int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(30) NOT NULL, active tinyint(4) NOT NULL, created_at datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, updat...
true
784c09f404ccae583cd36e157df0db4907c09226
SQL
dobrucki/tua
/mysql/init.sql
UTF-8
7,933
3.171875
3
[]
no_license
CREATE USER 'ssbd06admin'@'payara' IDENTIFIED BY '123'; CREATE USER 'ssbd06glassfish'@'payara' IDENTIFIED BY '123'; CREATE USER 'ssbd06mok'@'payara' IDENTIFIED BY '123'; CREATE USER 'ssbd06mop'@'payara' IDENTIFIED BY '123'; CREATE USER 'ssbd06'@'payara' IDENTIFIED BY '123'; CREATE DATABASE IF NOT EXISTS ssbd06 ;...
true
4761cf371a9845ec74ad917e401138993bb4c737
SQL
SuselRetana2726/Qapybara
/Query-BD.sql
ISO-8859-1
654
2.71875
3
[]
no_license
CREATE TABLE USUARIO ( ID_USR Int IDENTITY(1,1) Primary key not null, contrasea Varbinary(max) not null, sal Varbinary(max) not null, Nombre Varchar(50) not null, Edad Int not null, Pas Varchar(20) not null, direccion Varchar(50) not null, fotografia Varchar(50) not null, ...
true
49e799fec56dcc3b98243087eb4a133168b2b9b9
SQL
tiagofragoso/tu-crypto
/P1/solutions/b.sql
UTF-8
450
3.78125
4
[]
no_license
INSERT INTO utxos -- Get unspent outputs SELECT output_id, value FROM outputs WHERE output_id NOT IN ( SELECT output_id FROM inputs); INSERT INTO number_of_utxos -- Get total number of unspent outputs SELECT count(*) AS utxo_count FROM utxos; INSERT INTO id_of_max_utxo -- Get output_id of the UTXO w...
true
9995752cc9ee722e7c020e354b3639ac208a3d5e
SQL
HTL-DWR/DWR
/Atk_Resolve.sql
ISO-8859-1
5,490
3.296875
3
[]
no_license
CREATE OR REPLACE PROCEDURE ATK_RESOLVE ( ATK_DORF IN NUMBER , DEF_DORF IN NUMBER , TRUPPE IN NUMBER ) AS m_id number; t_id number; atk_def number := 0; atk_atk number := 0; atk_tmp number; tmp number; newSchwert number; newReiter number; newBogen number; newlanze number; BEGIN select m.id into m_id from ...
true
44fb02f70eda3976c1a91349fc069f93863992d0
SQL
collin80/Open-Vehicle-Monitoring-System
/server/ovms_server.sql
UTF-8
5,765
2.953125
3
[ "MIT" ]
permissive
-- MySQL dump 10.11 -- -- Host: localhost Database: openvehicles -- ------------------------------------------------------ -- Server version 5.0.51a /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNE...
true
5ef667d747c7481d48a8dd894d9ea9e21906363c
SQL
AlvinCommunityCollege/RoomSchedulingAlgorithm
/AlgorithmRunner/Data/SQLite/UpdateSectionInstructor.sql
UTF-8
175
2.6875
3
[ "Apache-2.0" ]
permissive
UPDATE Sections SET InstructorId = (SELECT Id FROM Instructors WHERE ExternalInstructorId = @ExternalInstructorId LIMIT 1) WHERE ExternalSectionId = @ExternalSectionId
true
0f1abbe37fab6851a60d5d2115f962d32a061e9f
SQL
Matias-lr/portafolio_de_titulo_modelo
/Procedimientos/Procedimiento_Bug.sql
WINDOWS-1250
671
3.1875
3
[]
no_license
-- Ejecutar en sql plus -- Conectarse con conn / as sysdba -- realizar grant select on v_$session to portafolio; -- Reiniciar conexin; create or replace procedure test_proceso is v_sid varchar2(1000); v_serial varchar2(1000); v_querie varchar2(1000); begin v_sid := ' immediate'; for xd in ( ...
true
34531400171bd77617f8d753be300953e1468639
SQL
Henry-choi426/mission
/02.SQL/0603MiniProject/0603miniproject.sql
UTF-8
7,672
3.390625
3
[]
no_license
-- table 1 celebrity create table celebrity( cl_id number, --pk cl_name varchar2(10) NOT NULL, birth date, agency varchar2(100), job varchar2(100), constraint pk_celebrity_cl_id primary key(cl_id) ); -- table 2 programs create table programs( pr_id number, --pk pr_name varchar2(100) NOT NULL, ...
true
e042755e82c9745562a51054bfa83fcdba4d6b9b
SQL
SeungsoonLeee/ssafy
/Database/sql_Join.sql
UTF-8
8,001
4.875
5
[]
no_license
/* Join - 두개 이상의 테이블을 연결해서 질의하는 것 - 종류 1. 데이타 추출되는 것에 따라 Inner Join : - 조인을 위해 사용하는 비교 조건에 맞는 데이타만 조회 - 조인 조건에 맞지 않은 데이타는 조회 되지 않는다. - join할 때 outer join으로 표시 하지 않으면 기본적으로 Inner join으로 조회된다. Outer Join - 조인을 위해 사용하는 비교 조건에 맞지 않는 데이타도 조회된다. - 종류 ...
true
0249cc3637a5dfc553fdbf6717106a41b89416dd
SQL
erwinmacaraig/perl-cig-prj
/db_setup/tblReports.sql
UTF-8
368
2.546875
3
[]
no_license
DROP TABLE IF EXISTS tblReports; CREATE TABLE tblReports ( intReportID INT NOT NULL AUTO_INCREMENT, strName VARCHAR(255) NOT NULL, strDescription TEXT, intType TINYINT, strFilename VARCHAR(200), strFunction VARCHAR(200), strGroup VARCHAR(100), intParameters TINYINT DEFAULT 0, intOrder INT DEFAULT 1, strRequir...
true
6871a97b5b9f1887005be92a629e1d7efa4ebec0
SQL
sivaserr/digitalsystems
/_sql/digitalsystem (23_5_2020).sql
UTF-8
28,551
3.265625
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.8.3 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1:3306 -- Generation Time: May 23, 2020 at 06:24 AM -- Server version: 5.7.23 -- PHP Version: 7.1.22 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CH...
true
66ee9edecabd12a4200866f24d303db6e5270245
SQL
Ntlehien/-ThucTapNhanThuc44K
/04/SQL Script/QUANLY_CTV.sql
UTF-8
3,738
3.546875
4
[]
no_license
Create Database QUANLY_CTV Use QUANLY_CTV Create Table CONG_TAC_VIEN (MaCTV varchar (15) not null Primary Key, TenCTV nvarchar(100) not null, DiaChi nvarchar (100) not null, TrangThai int not null) Create Table LOAI_SAN_PHAM (MaLoaiSP int not null Primary Key, TenLoaiSP nvarchar(100) not null, DonGiaThue int not null,...
true
38ab0117d52302ff11bb89678a87cf944f24c925
SQL
fizyamat/MADE-2021-BigData
/HW 9 Cassandra + Spark/task_Gluschenko_Yaroslav_movies_by_genre_rating.cql
UTF-8
148
2.796875
3
[]
no_license
SELECT MIN(rating), AVG(rating), MAX(rating) FROM movies_by_genre_rating WHERE genre = 'Sci-Fi' AND year >= 2000 ;
true
03e20bc56076429b608430c6f92488da443dac42
SQL
fupslot/prisma-example
/prisma/migrations/20210604173744_invite/migration.sql
UTF-8
588
3.96875
4
[]
no_license
-- CreateTable CREATE TABLE "Invite" ( "id" SERIAL NOT NULL, "code" VARCHAR(100) NOT NULL, "email" VARCHAR(100) NOT NULL, "active" BOOLEAN NOT NULL DEFAULT true, "expire_at" TIMESTAMP(3) NOT NULL, "created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, "updated_at" TIMESTAMP(3) NOT NUL...
true
e4b3853b1b392716c7cf4f74c4b4fa5f7a6511e6
SQL
NyangUk/Python
/day14_sql/SQL10.SQL
UTF-8
105
2.546875
3
[]
no_license
SELECT COUNT(ANIMAL_ID) FROM ANIMAL_INS WHERE ANIMAL_ID IS NOT NULL -- 총 개수 구하기 count 이용
true
8c550d3304aa6824830d84404a67bd6b9f154c43
SQL
gpeitzner/data-warehouse
/src/sql/dwh_ddl.sql
UTF-8
2,679
3.6875
4
[ "MIT" ]
permissive
--CLEANING DROP TABLE fact_sale; DROP TABLE fact_purchase; DROP TABLE dim_time; DROP TABLE dim_supplier; DROP TABLE dim_client; DROP TABLE dim_seller; DROP TABLE dim_product; DROP TABLE dim_branch_office; DROP TABLE dim_location; --DIMENSIONS CREATE TABLE dim_time( time DATE NOT NULL, year INT NOT NULL, mo...
true
3be44e9d12fe2dd1013976783eea9d036468c377
SQL
BrainPad/SQLForBeginners2019
/answer/3-1-1.sql
UTF-8
413
3.765625
4
[ "MIT" ]
permissive
/* 3-1-1. 条件式① CASE userテーブルでstate_codeが’27’(大阪)であるユーザーの総数を求める。 (state_codeが’27’であるとき1、他は0のフラグを作成して合計する) */ SELECT SUM(CASE WHEN state_code = '27' THEN 1 ELSE 0 END) AS `sum` FROM `user` ; /* -- 別解 SELECT COUNT(DISTINCT CASE WHEN state_code = '27' THEN id ELSE NULL END) FROM `user` ; */
true
5c0ec08b3554604d9fdf409322f710891188861d
SQL
bellmit/flexdb
/2.HOST/1.View/sbs_sales_result.sql
UTF-8
1,064
3.171875
3
[]
no_license
CREATE OR REPLACE FORCE VIEW SBS_SALES_RESULT (tieukhoan, nvmoigioi, ngaygd, sohieulenh, loai, kldat, klkhop, giakhop, gtkhop) AS SELECT afacctno, userid nvmoigioi, txdate ngaygd, orderid sohieulenh, exectype loai, orderqtty kldat, execqtty klkhop, exprice giakhop, execamt gtkhop FROM ...
true
54e57b523971fae231e11221652cc4f022b8e910
SQL
housirvip/movie-talk
/sql/user_follow.sql
UTF-8
851
3.046875
3
[ "MIT" ]
permissive
/* Navicat Premium Data Transfer Source Server : 35.193.61.114 Source Server Type : MySQL Source Server Version : 50723 Source Host : 35.193.61.114:3306 Source Schema : movie-talk Target Server Type : MySQL Target Server Version : 50723 File Encoding : 65001 Date: 27...
true
65c963a6737ea33cdd3593656b78625a4b9450ce
SQL
Rajagunasekaran/Code-Backup
/NEW PROJECT SQL/DELIVERED SP/SP_TS_SINGLE _ROW_DELETION/WITHOUT CMT/SP_TS_SINGLE_TABLE_ROW_DELETION_VER_0.2_80_36_01102014.SQL
UTF-8
4,121
3.953125
4
[]
no_license
DROP PROCEDURE IF EXISTS SP_TS_SINGLE_TABLE_ROW_DELETION; CREATE PROCEDURE SP_TS_SINGLE_TABLE_ROW_DELETION( IN TABLE_ID INT, IN ROW_ID INT, IN USERSTAMP VARCHAR(50), OUT DELETION_FLAG SMALLINT(1)) BEGIN DECLARE V_TABLE_NAME TEXT; DECLARE V_TEMP_TABLE_NAME TEXT; DECLARE i INT DEFAULT 1; DECLARE V_COLUMN_VALUE TEXT...
true
a69799fb9aa5fbbfc74b27dad20382a5d645b361
SQL
jameswyh/Oracle_Teaching_Management_System
/3_Tables and views/6_db_teach_course.sql
UTF-8
697
3.015625
3
[]
no_license
CREATE TABLE db_teach_course( course_no VARCHAR2(9) NOT NULL, Work_id CHAR(6) NOT NULL, course_name VARCHAR2(20), launch_year CHAR(9), launch_term CHAR(1), Executed_plan VARCHAR2(20), CONSTRAINT pk_cs_no_wk_id PRIMARY KEY(course_no,work_id) VALIDATE, CONSTRAINT fk_tc_curse_no FOREIGN KEY(course_no) REF...
true
6434e2a91cd8c3d168b8d2b9e2d968ee2af004ad
SQL
chrisyun/macho-project-home
/OTAS-DM-Project/nWave-DM-Common/metadata/schema/oracle10g/upgrade_db_from_v1008.sql
UTF-8
933
2.578125
3
[]
no_license
/*==============================================================*/ /* Table: nW_DM_PROV_REQ */ /*==============================================================*/ alter table nW_DM_PROV_REQ add(IS_PROMPT_FOR_BEGINNING NUMBER(1), PROMPT_TYPE_FOR_BEG...
true
25d88b51d74d9c7be844a06333393e9c9f706768
SQL
andrea-colleoni/ifts-2021
/modulo-05/ddl-magazzino.sql
UTF-8
1,976
3.359375
3
[ "MIT" ]
permissive
CREATE TABLE persone ( codice_fiscale VARCHAR(20) NOT NULL, p_iva VARCHAR(15), ragione_sociale VARCHAR(100), nome VARCHAR(50), congnome VARCHAR(50), indirizzo VARCHAR(100) NOT NULL, email VARCHAR(100), ...
true
2f5bdc7403790b1d16c9c079160d57d24a65f9ad
SQL
kadylovnur/Advanced-DB-project
/onaonaopyat'/7.sql
UTF-8
116
2.625
3
[]
no_license
--Show the all information about homes where area is bigger or equal to 110. select * from home where area <=110;
true
5d19588d66154f71cfb3ae2069eebb530845adf8
SQL
ajinkyagadgil/patient-management-system
/PMSBackend/PatientManagementSystemDatabase/Tables/PatientSchema/PatientPhoto.sql
UTF-8
452
3.125
3
[ "MIT" ]
permissive
CREATE TABLE [Patient].[PatientPhoto] ( [Id] UNIQUEIDENTIFIER NOT NULL PRIMARY KEY, [PatientId] UNIQUEIDENTIFIER NOT NULL, [Path] NVARCHAR(MAX) NOT NULL, [Name] NVARCHAR(MAX) NOT NULL, [Type] NVARCHAR(MAX) NOT NULL, [Size] BIGINT NOT NULL, [CreationDate] DATETIME2 NOT NULL DEFAULT GETUTCDATE() ...
true
6fc8bb3bf43dd5a3512537825a205bf265c5c430
SQL
calacademy-research/antweb
/db/upgrade/5.1.13/2013-08-10.sql
UTF-8
3,333
3.609375
4
[]
no_license
# # Execute as such: # mysql -u antweb -p ant < db/upgrade/5.1.13/2013-08-10.sql # # select TABLE_SCHEMA,TABLE_NAME from information_schema.tables where TABLE_TYPE like 'VIEW'; # alter table specimen modify column decimal_longitude double; # alter table specimen modify column decimal_latitude double; # show create ...
true
d30c9f3b685953ee167768a3b9f148c685b9cdb6
SQL
beliason1975/LTLTrackDeployment
/sql/Old/FindMissingTrucks.sql
UTF-8
1,612
4.03125
4
[]
no_license
-- select * from [MFSTPRO] MFSTPRO -- join [PROHDR] PROHDR on PROHDR.AJPRO# = MFSTPRO.BCPRO -- where MFSTPRO.BCMFST in (27344952, 27940741, 27460611,27706261,28254031,27706261,28254032) SET NOCOUNT ON; IF OBJECT_ID('tempdb..#results') IS NOT NULL DROP TABLE #results; IF OBJECT_ID('tempdb..#uniquepros') IS NO...
true
1f5408dce2020bc513124538f80d265591b82ac5
SQL
Teradata/product-help
/VantageCloudLakeUseCases/ja/datasets/EVCarBattery/scripts/batteries_nos.sql
UTF-8
760
2.96875
3
[]
no_license
DROP TABLE obd_nos; CREATE FOREIGN TABLE obd_nos, FALLBACK, EXTERNAL SECURITY retail_sample_data.DEMO_AUTH_NOS ( LOCATION VARCHAR(2048) CHARACTER SET UNICODE CASESPECIFIC , Payload JSON INLINE LENGTH 32000 CHARACTER SET UNICODE ) USING(LOCATION('/S3/s3.amazonaws.com/td-usecases-data-store/EVCarBattery/') ); REPLACE ...
true
980a92df626a290b063e828888976f6f3ba4f6d3
SQL
hirakida/spring-boot-demo
/spring-batch/batch-chunk/src/main/resources/schema.sql
UTF-8
218
2.75
3
[]
no_license
CREATE TABLE IF NOT EXISTS `user` ( `id` INT PRIMARY KEY AUTO_INCREMENT, `name` VARCHAR(255) NOT NULL, `enabled` BOOL NOT NULL DEFAULT false, `created_at` DATETIME NOT NULL, `updated_at` DATETIME NOT NULL );
true
f81ec9ab18b6c37df3a0eeafdce45135c3e16c67
SQL
anushkakapur/PostgreSQL
/FirstHalf.sql
UTF-8
2,446
4.46875
4
[]
no_license
-- START Q1 SELECT CONCAT(e.firstname,' ', e.lastname)employeename, orderid, orderdate, companyname customername FROM orders o JOIN employees e ON e.employeeid = o.employeeid JOIN customers c ON c.customerid = o.customerid LIMIT 10; -- END Q1 -- START Q2 SELECT categoryname, supplierid, unitsinstock remainingunits F...
true
83f36d5d6f166bc1a56fb46f0a6c374d3ff2b945
SQL
PQbiit/DevMountain
/Labs/sql-basics-lab/orders.sql
UTF-8
974
4.1875
4
[]
no_license
-------------PROBLEM 1------------- CREATE TABLE orders( order_id SERIAL PRIMARY KEY, person_id VARCHAR(150), product_name VARCHAR(150), product_price NUMERIC, quantity INTEGER ); -------------PROBLEM 2------------- INSERT INTO orders (person_id,product_name,product_price,quantity) VALUES (1,'Lapto...
true
823a7106ef26f4dd02c474a9e1ca199f07892afc
SQL
PRAVEENAMPATI/ETL
/models/EDL/ETL_MART_GSCO/ETL_MART_E2OPEN_E2O_SET_XREF.sql
UTF-8
2,755
3.1875
3
[]
no_license
--dbt run --full-refresh --select ETL_MART_E2OPEN_E2O_SET_XREF -- dbt run --select ETL_MART_E2OPEN_E2O_SET_XREF {################# EDW Job Template Variables #################} {%-set v_pk_list = ['SUPPLIER_ENTITY_NAME']-%} {% if is_incremental() %} {%-set v_house_keeping_column = ['BIW_INS_DTTM','BIW_UPD_DTTM','B...
true
cb883b6550d8ceae2046e10f0f1f0066a7d39ae3
SQL
jeffromeiro/ScriptsOracle
/ashmasters-master/cpu_consumed_verses_cpuwait.sql
UTF-8
4,277
3.59375
4
[]
no_license
/* see http://dboptimizer.com/2011/07/21/oracle-cpu-time output looks like SQL> / CPU_TOTAL CPU_OS CPU_ORA CPU_ORA_WAIT COMMIT READIO WAIT ---------- ---------- ---------- ------------ ---------- ---------- ---------- 14.887 .387 13.753 .747 0 0 ...
true
8cdc1898bf3ff33d01a3b7019c8b889af3fccfe1
SQL
YunLu95/ImageIn
/imagein.sql
UTF-8
6,146
3.0625
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.7.7 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Mar 14, 2018 at 10:10 PM -- Server version: 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 @OLD...
true
2b09e7400e269538ef9ae07f73d851363eb39480
SQL
chakibreds/herault-events
/database/test.sql
UTF-8
2,168
3.9375
4
[]
no_license
/** Test des Trigger, fonctions et procedures */ system echo "\nInsertion des tuples pour les test\n"; INSERT INTO `user` (`pseudo`, `nom`, `prenom`, `date_nai`, `email`, `mdp`, `date_inscr`, `role_user`) VALUES ('IamVisitor', 'e', 'e', '1999-11-27', 'obalistri@exae.net', 'mdp', '2019-07-04 10:51:42','visitor')...
true
3aa602e555faba3a84be36c1a180c9e2a1867c90
SQL
AcPvP/Fizzletide_Content
/sql/weenies/hidden forest tailoring/1910613 Exarch Plate Leggings.sql
UTF-8
3,167
2.578125
3
[]
no_license
DELETE FROM `weenie` WHERE `class_Id` = 1910613; INSERT INTO `weenie` (`class_Id`, `class_Name`, `type`, `last_Modified`) VALUES (1910613, 'leggingsexarchseablue', 2, '2021-04-18 02:49:41') /* Clothing */; INSERT INTO `weenie_properties_int` (`object_Id`, `type`, `value`) VALUES (1910613, 1, 2) /* ItemType...
true
e7dd07c3aa9d2858d8cabd7e7cd339f027128081
SQL
ye-yu/GMFoodOrderingSystem
/serverside/sql/findcustomeridbyname.sql
UTF-8
493
3.15625
3
[]
no_license
CREATE OR REPLACE FUNCTION find_cust_id(name VARCHAR(100), phone_no VARCHAR(15)) RETURNS CHAR(10) BEGIN DECLARE id CHAR(10); SELECT customerid INTO id FROM `foodorder`.`customer` WHERE customername = name and customerphoneno = phone_no; IF id IS NOT NULL THEN RETURN id; ELSE CALL generat...
true
c46d85347e6f5d7dde56cd58e042602913f8fe96
SQL
rsmannisa/Cloud
/fpcloud/database/fpcloud.sql
UTF-8
1,610
2.875
3
[ "LicenseRef-scancode-unknown-license-reference", "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.6.5.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: May 17, 2017 at 10:52 AM -- Server version: 10.1.21-MariaDB -- PHP Version: 5.6.30 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SE...
true
9576f46e0aecd06bb3241666cb7ad93e9fb7299f
SQL
matt-oc/Assign2-Dist
/myStudents.sql
UTF-8
1,396
3.125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.3 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3306 -- Generation Time: Nov 12, 2018 at 07:13 AM -- Server version: 5.7.23 -- PHP Version: 7.2.8 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIEN...
true
faa67157ac1c3afc93f09af791a843b382ca014d
SQL
okbeng2/bookManage
/sqlFile/book.sql
UTF-8
1,565
3.15625
3
[]
no_license
/* Navicat Premium Data Transfer Source Server : localhost_3306 Source Server Type : MySQL Source Server Version : 50553 Source Host : localhost:3306 Source Schema : bookmanage Target Server Type : MySQL Target Server Version : 50553 File Encoding : 65001 Date: 31/12...
true
350590e8dc74b549db39e9fbc477f990d8792695
SQL
phacility/phabricator
/resources/sql/patches/20130715.voteedges.sql
UTF-8
563
2.84375
3
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
CREATE TABLE {$NAMESPACE}_slowvote.edge ( src VARCHAR(64) NOT NULL COLLATE utf8_bin, type VARCHAR(64) NOT NULL COLLATE utf8_bin, dst VARCHAR(64) NOT NULL COLLATE utf8_bin, dateCreated INT UNSIGNED NOT NULL, seq INT UNSIGNED NOT NULL, dataID INT UNSIGNED, PRIMARY KEY (src, type, dst), KEY (src, type, dat...
true
3fcb5f5120e7bbf65ba43cee438c1d4b58f98010
SQL
abmenzel/database-systems
/2021-trial/indexing.sql
UTF-8
1,262
4.3125
4
[]
no_license
-- Consider the following relation with information on passenger airplanes: -- Airplanes(id, name, year, passengers, <many long attributes>) -- Query 1 -- select id, name -- from Airplanes -- where name like ’%737%’; -- Query 2 -- select * -- from Airplanes -- where passengers > 0 -- order by passengers; -- Query 3...
true
7b73382c155630e0cb6a84c51a79545a6d0c07b8
SQL
souravrrp/AKG-SCIL-SQL
/Payables/PURCHASE_TO_PAYEMENT.sql
UTF-8
260
2.625
3
[]
no_license
SELECT * FROM APPS.AP_INVOICE_DISTRIBUTIONS_ALL AIDA, APPS.PO_DISTRIBUTIONS_ALL PDA, APPS.RCV_TRANSACTIONS RT WHERE 1=1 AND AIDA.PO_DISTRIBUTION_ID=PDA.PO_DISTRIBUTION_ID --AND AIDA.RCV_TRANSACTION_ID=RT.RCV_TRANSACTION_ID AND PDA.PO_HEADER_ID=RT.PO_HEADER_ID
true
113279a13aa3388f3ee2a226397ecfab9b10820c
SQL
georgezeng/com.sourcecode.malls.db
/src/main/resources/db/v88.sql
UTF-8
1,083
3.25
3
[]
no_license
--liquibase formatted sql --changeset admin:88 CREATE TABLE `client_level_setting` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `merchant_id` bigint(20) NOT NULL, `level` int(11) NOT NULL, `name` varchar(50) NULL, `up_to_amount` decimal(20,2) NULL, `discount` decimal(20,2) NULL, `discount_in_activity` decimal(20...
true
ba5d6b2b193a86ee8483c73287c4f066cbcd84ac
SQL
esb-dev/esb-dev.github.io
/mat/sql10.sql
UTF-8
3,700
4.0625
4
[]
no_license
/* ----------------------------------------------------------------------- Vorlesung Datenbanksysteme Burkhardt Renz, THM SQL Teil 10 Views $Id: sql10.sql 367 2019-03-04 08:39:50Z br $ ----------------------------------------------------------------------- */ ; /* Das Ergebnis einer Select-Anweisung ...
true