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
b2352d64c6adbc5976b96cef0af1208463206e50
SQL
biboibob/BudgetAppMCP
/mcpayment.sql
UTF-8
1,939
3.265625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Mar 27, 2021 at 05:54 PM -- Server version: 10.4.13-MariaDB -- PHP Version: 7.4.7 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIEN...
true
606fa4711c035aba12f983fe763d94617a2275d2
SQL
mdonizetti/curso500
/projeto.sql
UTF-8
4,394
3.25
3
[]
no_license
-- MySQL dump 10.13 Distrib 5.7.29, for Linux (x86_64) -- -- Host: localhost Database: projeto -- ------------------------------------------------------ -- Server version 5.7.29 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!...
true
2f3e37c7a031951c2d4cb3dd3613054d91652dcd
SQL
LyThanhQui/QTT-Moblie-v-4.2.5
/database/qttmobile.sql
UTF-8
7,541
2.984375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1:3306 -- Generation Time: Oct 19, 2020 at 12:14 PM -- Server version: 5.7.31 -- PHP Version: 7.3.21 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@...
true
ee8e8792409cd7a7f9647475c9937518646a18e2
SQL
agussputrii/Ejercitacion---EGG
/EJERCICIOSMySQL/tienda.sql
UTF-8
8,537
4.21875
4
[]
no_license
DROP DATABASE IF EXISTS tienda; CREATE DATABASE tienda CHARACTER SET utf8mb4; USE tienda; CREATE TABLE fabricante ( codigo INT UNSIGNED AUTO_INCREMENT PRIMARY KEY, nombre VARCHAR(100) NOT NULL ); CREATE TABLE producto ( codigo INT UNSIGNED AUTO_INCREMENT PRIMARY KEY, nombre VARCHAR(100) NOT NULL, precio DOU...
true
09c3f030d5c3f8a67cfbc44842c483b5582d86b4
SQL
leftmostcat/bookbrainz-proto-haskell
/sql/bookbrainz_versioning/CreateTables.sql
UTF-8
4,528
3.46875
3
[]
no_license
CREATE TABLE bbid ( bbid uuid NOT NULL -- PK ); CREATE TABLE branch ( master boolean NOT NULL, rev_id integer NOT NULL, -- references revision.rev_id branch_id serial NOT NULL -- PK ); CREATE TABLE revision ( rev_id serial NOT NULL, -- PK commited timestamp with time zone DEFAULT now() NOT NUL...
true
5589a236be84902df7af2f43929fac98a5ec4768
SQL
hvuSyslogic/CodeSnippets
/FunctionalProgramming+LINQ/Tutorial.Net/LinqToSql/QueryMethods.sql
UTF-8
22,635
3.703125
4
[ "MIT" ]
permissive
-- DefaultIfEmpty SELECT [t2].[test], [t2].[ProductCategoryID], [t2].[Name] FROM ( SELECT NULL AS [EMPTY] ) AS [t0] LEFT OUTER JOIN ( SELECT 1 AS [test], [t1].[ProductCategoryID], [t1].[Name] FROM [Production].[ProductCategory] AS [t1] ) AS [t2] ON 1=1 -- DefaultIfEmptyWithPrimitive -- NotSupport...
true
2ad847f72275a3477700b23a498f0a866cb5dd96
SQL
theAkhileshRai/Database
/MySQL/shirts.sql
UTF-8
1,555
3.34375
3
[]
no_license
CREATE TABLE shirts( shirt_id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, article VARCHAR(20), color VARCHAR(20), shirt_size VARCHAR(10), last_worn INT(200) ); desc shirts; INSERT INTO shirts(article,color,shirt_size,last_worn) VALUES ('t-shirt','blue','M',10); INSERT INTO shirts(article,color,shir...
true
b474c34c996fc08ff4a39b11c465560be11653ea
SQL
michelschmidttorres/bancosDeDados
/banco-relacional/consultarEstados.sql
UTF-8
420
2.71875
3
[]
no_license
select * from estados; select sigla, nome from estados; select sigla, nome as 'Nome do Estado' from estados; select sigla, nome as 'Nome do Estado' from estados where regiao = 'sul'; select nome, regiao, populacao from estados where populacao >=10 order by populacao; --Ascendente select no...
true
47d8b64a1dba4790c721b0901b40433f702fe86d
SQL
rui-eskilo/pi_queixinhas
/conf/db/Tables/Category.sql
UTF-8
330
2.796875
3
[]
no_license
-- Table: "Category" -- DROP TABLE "Category"; CREATE TABLE "Category" ( id integer NOT NULL DEFAULT nextval('category_id_seq'::regclass), description text, CONSTRAINT category_pk PRIMARY KEY (id), CONSTRAINT category_id_unique UNIQUE (id) ) WITH ( OIDS=FALSE ); ALTER TABLE "Category" OWNER TO queixinhas...
true
387ff0f298a09640e144327ab1b9a65b3cf658af
SQL
shchoi22/pyscripts
/queries/prospect_data_dump_second_V0.4_2.4.14_sc.sql
UTF-8
19,861
3
3
[]
no_license
 with pw_leases as (select pw_lease.* ,replace(replace(replace(replace(pw_lease.primarycontacthomephone,' ',''),'-',''),'(',''),')','') as home_phone ,replace(replace(replace(replace(pw_lease.primarycontactmobile,' ',''),'-',''),'(',''),')','') as mobile_phone ,replace(replace(replace(replace(pw_l...
true
b4f156b4d992eb9b95a797a7ef596b60869d9243
SQL
DebrPzz/pc_masso-master
/masso-master/DUMP_DB/masso-db_2017-03-13.sql
UTF-8
5,084
3.34375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.6.6 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1:3306 -- Generation Time: Mar 13, 2017 at 05:00 PM -- Server version: 5.7.17-log -- PHP Version: 7.0.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_...
true
20f73195d85ef3eccc8cbd6bead74088a6c8ea28
SQL
jjwon915/Study_Korean
/한글쑥쑥_Structure.sql
UTF-8
6,044
2.9375
3
[]
no_license
-- MySQL dump 10.13 Distrib 8.0.17, for Win64 (x86_64) -- -- Host: localhost Database: webapp1 -- ------------------------------------------------------ -- Server version 8.0.17 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!...
true
68210a6f49f86650299ff4de2dff0728498ad57f
SQL
ClickHouse/ClickHouse
/tests/queries/0_stateless/02521_analyzer_array_join_crash.sql
UTF-8
806
3.078125
3
[ "Apache-2.0", "BSL-1.0" ]
permissive
SET allow_experimental_analyzer = 1; DROP TABLE IF EXISTS test_table; CREATE TABLE test_table ( id UInt64, value String ) ENGINE = MergeTree ORDER BY id; INSERT INTO test_table VALUES (0, 'Value'); -- { echoOn } SELECT id, value_element, value FROM test_table ARRAY JOIN [[1,2,3]] AS value_element, value_ele...
true
100bdb238578e5fa479401714a21071731bbf544
SQL
alexandercalderon80/SOLUCIONESTICS
/backups/db-backup-2021-09-15.sql
UTF-8
13,003
2.984375
3
[]
no_license
CREATE TABLE `acudiente` ( `id_acud` int(11) NOT NULL, `tipo_doc` int(11) NOT NULL, `nom_acu` varchar(50) NOT NULL, `ape_acu` varchar(50) NOT NULL, `parentesco` varchar(15) NOT NULL, `dir_acu` varchar(120) NOT NULL, `id_pais` int(11) NOT NULL, `id_ciu` int(11) NOT NULL, `tel_acu` int(11) NOT NULL, ...
true
ae2582ec6243fe1f0f013fbab0c87db6a7539c73
SQL
doneria-anjali/genome
/application/sql_scripts/zips_to_use_for_project.sql
UTF-8
607
3.34375
3
[]
no_license
create table zips_for_project as select a.city, a.state_id, a.zip from zip_lookup a where city in ('NEWORLEANS', 'ALBANY', 'JUNEAU', 'PASADENA', 'CARY', 'COLUMBUS', 'BOSTON', 'SACRAMENTO', 'SALTLAKECITY', 'PIERRE') and state_id in ('LA', 'NY', 'AK', 'TX', 'NC', 'OH', 'MA', 'CA', 'UT', 'SD') order by city; delete from...
true
3557f7774c5ce9eb5b4f292eb453202c51f34800
SQL
gor8808/SqlDatebasesAndQueryExamples
/Queryes/SQLQuery23.sql
UTF-8
136
3.109375
3
[]
no_license
SELECT C.country, C.region, C.city From Sales.Customers AS C INTERSECT SELECT E.country, E.region, E.city From HR.Employees AS E;
true
df6aa47b03bf9e916f7c4f62ed42468ab8bdcafe
SQL
yuriap/OPAS
/modules/core/scripts/__getftxt.sql
UTF-8
404
2.6875
3
[]
no_license
set long 10000000 set pages 9999 column "Full query text" format a300 word_wrapped select sql_fulltext "Full query text" from (select sql_fulltext from gv$sql where sql_id = '&1' union all select sql_fulltext from gv$sqlarea where sql_id = '&1' union all ...
true
4e3e6d0c5d1edb303b3a3eab86adae4f22b55c72
SQL
barkon99/BookwebApp-server
/src/main/resources/db/migration/V1__init.sql
UTF-8
960
3.546875
4
[]
no_license
CREATE TABLE users ( id serial PRIMARY KEY, email VARCHAR ( 255 ) UNIQUE NOT NULL, password VARCHAR ( 255 ) NOT NULL, username VARCHAR ( 255 ) UNIQUE NOT NULL ); CREATE TABLE roles ( id serial PRIMARY KEY, name varchar ( 255 ) NOT NULL ); CREATE TABLE user_roles ( user_id INT Not NULL, role_id INT NOT NUL...
true
9b2e6bd2b9227a8c598e6908ca1e83c060d5d0f8
SQL
AldiFauzi21/SIKuman
/sibicoid_sikuman.sql
UTF-8
5,630
2.875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.7.9 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Waktu pembuatan: 12 Bulan Mei 2020 pada 18.37 -- Versi server: 10.1.43-MariaDB -- Versi PHP: 7.2.30 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OL...
true
953e13dbc2e354e0de90ea09ee0a36778ea2302a
SQL
Black1499/pet_store
/petdb.sql
UTF-8
1,887
3.609375
4
[]
no_license
drop database if exists petdb; create database petdb; use petdb; create table `order`( id int primary key auto_increment, petId int, quantity int, shipDate datetime, stratus enum('placed', 'approved', 'delivered'), complete bit default(1) ); insert into `order` values(0,1,1,now(),'placed',1); insert into `order`...
true
46ebb43074f6ef276a84df3049eca2d73363e636
SQL
haiyang1987/hive-benchmarks
/tpc-h/ddl/text/orders.sql
UTF-8
514
2.65625
3
[]
no_license
create database if not exists ${DB}; use ${DB}; drop table if exists orders; create external table orders ( o_orderkey int, o_custkey int, o_orderstatus string, o_totalprice float, o_orderdate string, o_orderpriority ...
true
7b5cf40cdd558437cc43aac130c3a42d2ba570c0
SQL
gladiopeace/digital-data-syn
/documents/oms/TB_PURLA.sql.bak
GB18030
3,298
3.1875
3
[]
no_license
/* ================================================================================ ṹ:TB_PURLA ṹ:ջ ṹĿ:ֲ ================================================================================ */ drop sequence SEQ_TB_PURLA; drop index AK_TB_PURLA; drop table TB_PURLA; create table TB_PURLA ( PURLA_ID INTEGER ...
true
1eafa19fc4e4f663720c219db53415d408df8f62
SQL
s16008/OracleTask
/1102/1102.5.sql
UTF-8
150
3.296875
3
[]
no_license
select e.last_name,m.last_name,m.salary from employees e join employees m on e.manager_id = m.employee_id where m.salary > 1500 order by e.last_name;
true
3d6aa64d625352042b85de1e96f7bcc6c029727a
SQL
wfilip/wfilip
/DDL/gte_OTIF.sql
UTF-8
354
3.296875
3
[]
no_license
select nr_kom_zlec, max(Z.nr_zlec) nr_zlec, max(Z.d_pl_sped) dps, max(nullif(S.data_sped,to_date('190101','YYYYMM'))) data_sped, max(nullif(S.data_sped,to_date('190101','YYYYMM')))-max(Z.d_pl_sped) opozn from zamow Z left join spise E on E.nr_komp_zlec=Z.nr_kom_zlec left join spedc S on S.nr_sped=E.nr_sped where...
true
161aec29f5c7e3e2f7f69431ab9e6487805ae509
SQL
andersonbisconsin/tradutor
/h2/src/test/org/h2/test/scripts/functions/system/array-cat.sql
UTF-8
515
2.8125
3
[ "Apache-2.0" ]
permissive
-- Copyright 2004-2019 H2 Group. Multiple-Licensed under the MPL 2.0, -- and the EPL 1.0 (https://h2database.com/html/license.html). -- Initial Developer: H2 Group -- select array_cat(ARRAY[1, 2], ARRAY[3, 4]) = ARRAY[1, 2, 3, 4]; >> TRUE select array_cat(ARRAY[1, 2], null) is null; >> TRUE select array_cat(null, AR...
true
f82a1397536b89a38e7bcefaad9fa89e78317dcf
SQL
aswinnselvakumar/CitySearchAS
/extras/dbScripts/Worksheet 2.sql
UTF-8
481
3.234375
3
[]
no_license
select * from city_info; select * from person_info; DROP TABLE IF EXISTS CITY_INFO; CREATE TABLE CITY_INFO( city_id SERIAL NOT NULL, city_name char(50) NOT NULL, city_short_name char(3), city_state char(50) NOT NULL, city_country char(50) NOT NULL, PRIMARY KEY (city_name,city_country) ); DROP TABLE IF EXISTS PERSO...
true
efa15ff4502eb8092f9a6048e0e4532aedf8d3fb
SQL
yrestom/greycube_helpmanual
/projects/assets/zomo/zomolegalcompliance.sql
UTF-8
4,102
3.703125
4
[ "MIT" ]
permissive
SELECT tlc.permit_number as 'topmostSubform[0].Page1[0].TTBpermit[0]', tlc.phone as 'topmostSubform[0].Page1[0].Phone[0]', tlc.employer_identification_number as 'topmostSubform[0].Page1[0].empID[0]', tlc.email as 'topmostSubform[0].Page1[0].emailaddress[0]', tlc.month as 'topmostSubform[0].Page1[0]....
true
0c20db19809d24738c73c4a7d70c0a0e3b4a2cc1
SQL
yancha38/Cognizant-JavaTrack
/Software Fundamentals and Soft Skills/Code Challenges/RDBMS Select Statements/query.sql
UTF-8
184
3.1875
3
[]
no_license
SELECT a.PATIENT_ID, a.P_FIRST_NAME, a.P_AGE, b.APP_NUMBER, b.APP_DATE FROM PATIENT a, APPOINMENT b WHERE a.PATIENT_ID = b.PATIENT_ID AND b.APP_REASON = 'FEVER' ORDER BY a.PATIENT_ID;
true
5e5826dfba49aaf6183d4aff712855d346cb20e9
SQL
NewForce-at-Mountwest/bangazon-api-the-chaos-whales
/SQLQuery8.sql
UTF-8
2,958
3.171875
3
[]
no_license
--INSERT INTO [Order] (CustomerId, PaymentTypeId) VALUES (1,1) --INSERT INTO [Order] (CustomerId, PaymentTypeId) VALUES (3,2) --INSERT INTO [Order] (CustomerId, PaymentTypeId) VALUES (3,3) --INSERT INTO [Order] (CustomerId) VALUES (4) --INSERT INTO OrderProduct (OrderId, ProductId) VALUES (1,2) --INSERT INTO OrderPro...
true
ecc7b938c5353f69adddf31bc0491e772a262070
SQL
marcoris/loag
/sql/employee.sql
UTF-8
4,619
3.0625
3
[]
no_license
# ************************************************************ # Sequel Pro SQL dump # Version 4541 # # http://www.sequelpro.com/ # https://github.com/sequelpro/sequelpro # # Host: 127.0.0.1 (MySQL 5.7.25-0ubuntu0.18.04.2) # Datenbank: loag # Erstellt am: 2019-03-18 09:54:08 +0000 # ************************************...
true
038bba152447bec301434d4439097754266f7bbc
SQL
allansm/study
/PHP/cinedart/sql/cadastro.sql
UTF-8
398
2.984375
3
[]
no_license
create database banco; use banco; create table cadastro( id bigint auto_increment not null primary key unique, nome varchar(50) not null, sobrenome varchar(255) not null, email varchar(255) not null unique, telefone varchar(10) not null , sexo enum('M','F'), login varchar(50) not null unique ,...
true
f806d6eec76b3ee24c971a0ad4a45ce222325378
SQL
hunny/xplus
/bootweb/trunk/bootweb-jpa/src/main/resources/schema.sql
UTF-8
168
2.5625
3
[ "MIT" ]
permissive
DROP TABLE TEST_ENTITY IF EXISTS; CREATE TABLE TEST_ENTITY ( ID BIGINT GENERATED BY DEFAULT AS IDENTITY, NAME VARCHAR(40), PRIMARY KEY(ID) );
true
1de801899abace08d394ba5b92d46c385b01bdda
SQL
ondratu/morias
/sql/sqlite/logins.01.sql
UTF-8
671
3.25
3
[]
no_license
create table logins_01 ( login_id integer not null primary key autoincrement, enabled integer default 1, -- login is enabled email text not null, -- user login passwd text not null, rights text not null default '[]', -- json list of rights data text not null default '{...
true
78faa95c84cf0c9575f3d328843b8ba41e90c7ce
SQL
tushargarg50/IdealModel
/src/main/resources/data.sql
UTF-8
300
2.78125
3
[]
no_license
DROP TABLE IF EXISTS Topic; CREATE TABLE Topic (priority INT AUTO_INCREMENT, name VARCHAR(250) NOT NULL, author VARCHAR(250) NOT NULL, code VARCHAR(250) DEFAULT NULL, primary key (priority) ); INSERT INTO Topic(name, author, code) VALUES ('a','a','a'), ('b','b','b'), ('c','c','c'), ('d','d','d');
true
403ac77bdd6bb5054305fb3ee982ac560a51bb3c
SQL
marty-p/bd1-2018-esercitazioni
/esercitazione-05/select.sql
UTF-8
4,299
4.28125
4
[]
no_license
/*3) Interrogazioni*/ /*______________________________________________________ a) Selezionare i dati dei clienti a cui è stato accordato almeno un prestito da una filiale non situata nella città in cui risiedono, ordinati in senso crescente rispetto al cognome (prima) e al nome (poi).*/ select prestiti.cliente.* from...
true
ed57b3b48788efb351d8f7003c1028df500d3c79
SQL
lChap701/PHP-APACHE-MYSQL
/lscprojects version 8/lscprojects/script/lsctables.sql
UTF-8
5,880
4.25
4
[]
no_license
/* Created by Lucas Chapman 7/13/2020 */ /* This script file is for the orders placed by users in the itemform.php file */ -- IF NOT EXISTS is used to avoid creating a database or table that already exists /* CREATE DATABASE statement */ CREATE DATABASE IF NOT EXISTS lscdatabase; /* CREATE TABLE statements */ -- ENGI...
true
ac9421cf82f80f10d0478dbbbc9aeee603e4a140
SQL
sensoham21/Van_Order
/Question3.sql
UTF-8
257
3.0625
3
[]
no_license
SELECT requestor_client_id AS Client, COUNT(requestor_client_id) AS Total_Orders_Completed, SUM(total_price) AS Total_Money_Spent FROM vanorder WHERE order_status = 2 GROUP BY requestor_client_id ORDER BY Total_Money_Spent DESC, Total_Orders_Completed DESC;
true
b39fbab32a4198260bdc8e514a4ae29606832f05
SQL
oro91dev/Databases-codesignal
/15 expressionsVerification.sql
UTF-8
313
2.984375
3
[ "MIT" ]
permissive
CREATE PROCEDURE expressionsVerification() BEGIN SELECT id,a,b,operation,c FROM expressions -- WHERE elt(locate(operation, "+-*/"), a+b, a-b, a*b, a/b) = c; WHERE (operation = '+' AND c=a+b) OR (operation = '-' AND c=a-b) OR (operation = '*' AND c=a*b) OR (operation = '/' AND c=a/b); END
true
da8d61b1d932a94e3cc5246aa13feda33448b4b6
SQL
Tonight00/miaosha
/miaosha/src/main/resources/sql/schema.sql
UTF-8
4,738
3.265625
3
[]
no_license
/* SQLyog Ultimate v12.09 (64 bit) MySQL - 8.0.18 : Database - miaosha ********************************************************************* */ /*!40101 SET NAMES utf8 */; /*!40101 SET SQL_MODE=''*/; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_...
true
300cf3e97ff4190c4d14286a0288cd9f2e5e8275
SQL
valuntiny/SQL_leetcode_easy
/Delete Duplicate Emails.sql
UTF-8
810
4.1875
4
[]
no_license
""" Write a SQL query to delete all duplicate email entries in a table named Person, keeping only unique emails based on its smallest Id. +----+------------------+ | Id | Email | +----+------------------+ | 1 | john@example.com | | 2 | bob@example.com | | 3 | john@example.com | +----+------------------...
true
e1ad3f10e7424679e0980b3065f644e1ad15a574
SQL
SpamLark/Work_SQL
/Banner/DD Grades and D2 Decision Checks.sql
UTF-8
1,639
3.625
4
[]
no_license
SELECT spriden_id, shrtckg_pidm || shrtckn_stsp_key_sequence, shrtckg_term_code, shrtckn_crn, shrtckg_grde_code_final, shrapsp_term_code, shrapsp_astd_code_end_of_term FROM shrtckg a1 JOIN shrtckn b1 ON a1.shrtckg_tckn_seq_no = b1.shrtckn_seq_no AND a1.shrtckg_pidm = b1.shrtckn_pidm AND a1.shrtckg_ter...
true
9dda98398f72235e6fb58c0231fa38a1f12d133b
SQL
shipp02/yama
/src/resources/tree.sql
UTF-8
2,597
4.40625
4
[ "BSD-3-Clause" ]
permissive
CREATE TABLE node ( id INTEGER NOT NULL PRIMARY KEY, name VARCHAR(256), parent_id INTEGER NOT NULL ); INSERT INTO node (name, parent_id) VALUES ('ROOT', 0);#--1 INSERT INTO node (name, parent_id) VALUES ('c1',1); INSERT INTO node (name, parent_id) VALUES ('c1c1',2); INSERT INTO node (name, parent_id) VALUES ('c...
true
34ed5f2891e1bc7a9b3df4a14f4884706b0f1cb1
SQL
SevdanurGENC/MsSQL-Exam-Questions-Bank
/MsSQL-Exam-Questions-Bank/SirketDB-Script.sql
UTF-8
4,978
3.359375
3
[ "MIT" ]
permissive
CREATE DATABASE sirketDB; USE sirketDB; CREATE TABLE birim ( birim_no INT IDENTITY(1,1) PRIMARY KEY, birim_ad VARCHAR(20) UNIQUE NOT NULL ); INSERT INTO birim VALUES ('KALİTE'),('İDARİ'),('ARGE'),('TEKNİK'); CREATE TABLE unvan ( unvan_no INT IDENTITY(1,1) PRIMARY KEY, unvan_ad VARCHAR(20) UNIQUE NOT NU...
true
b361040c48f20e6bf7a3136df2072c3818e5f88a
SQL
mmcpher2/chinook-mmcpher2
/invoice_totals.sql
UTF-8
319
3.5625
4
[]
no_license
SELECT Invoice.Total, Customer.FirstName || " " || Customer.LastName as "Customer Name", Customer.Country, Employee.FirstName || " " || Employee.LastName as "Employee Name" FROM Employee inner JOIN Customer on Employee.EmployeeId = Customer.SupportRepId inner JOIN Invoice on Customer.SupportRepId = Invoice.CustomerId;
true
582bccdc62d65dffa10d52bbefb04154dba33d6c
SQL
amry31/buku-tamu
/bukutamu.sql
UTF-8
2,258
3.09375
3
[ "LicenseRef-scancode-unknown-license-reference", "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Sep 29, 2020 at 09:42 AM -- Server version: 10.4.13-MariaDB -- PHP Version: 7.4.7 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIEN...
true
cf54de26deabddf1c826e38d28ad93dc5f9050cc
SQL
LADETAILLEDU13/ArmaPanel
/db_logging/death.sql
UTF-8
1,246
2.765625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.9.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1:3306 -- Generation Time: Jul 19, 2020 at 01:00 PM -- Server version: 10.4.12-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
b169b0caac918172a594602b72804d104e27c0bc
SQL
Boon-Jun/TopicB_Crowdfunding
/SQL/schema.sql
UTF-8
754
3.6875
4
[]
no_license
CREATE TABLE users ( userid VARCHAR(30) PRIMARY KEY, password VARCHAR(20) NOT NULL, isAdmin BOOLEAN NOT NULL ); CREATE TABLE projects ( advertiser VARCHAR(30) REFERENCES users(userid), projectid CHAR(23) PRIMARY KEY, title VARCHAR(50) NOT NULL, description TEXT NOT NULL, start_date DATE NOT NULL, duration INT...
true
d1619bc6deb92d6b73380721b9a2523e9382b786
SQL
jrjr-randy/backoffice
/sql/view/batch_order_warehouse_xref.sql
UTF-8
1,741
4
4
[]
no_license
DELIMITER $$ DROP VIEW IF EXISTS `batch_order_warehouse_xref`$$ CREATE ALGORITHM=UNDEFINED DEFINER=`monkey_trucker`@`%` SQL SECURITY DEFINER VIEW `batch_order_warehouse_xref` AS select o.order_id as 'order_id', case when oa.country_id = 185 and oa.state_id in (1,3,4,5,6,10,11,12,13,15,18,20,21,22,23,24,25,26,27,...
true
51c794ef1dfd8470c38fc145fc6715f1e11f56ff
SQL
krauspep/Sabre-EXE
/Data/Scripts/DBActions61.SQL
UTF-8
663
2.65625
3
[]
no_license
ALTER TABLE "ATTENDANCE" ADD ARCHIVE DM_BOOLEAN; COMMIT; CREATE INDEX "I_ATTENDANCE_4" ON "ATTENDANCE"("COMPANY_KEY", "ATTENDANCE_DATE"); COMMIT; CREATE INDEX "I_ATTENDANCE_ARCHIVE_1" ON "ATTENDANCE_ARCHIVE"("ENROLL_ID", "COMPANY_KEY", "DELETED"); CREATE INDEX "I_ATTENDANCE_ARCHIVE_2" ON "ATTENDANCE_ARCHIVE"("ENROLL...
true
d2b1ef9d340fd9f12a2b4a3ba02108db861b8c0f
SQL
sweety-apps/money_pig
/wangcai_svr/interface/sql/sms.sql
UTF-8
696
2.875
3
[]
no_license
CREATE TABLE IF NOT EXISTS sms_center ( id INT NOT NULL AUTO_INCREMENT, token CHAR(40) NOT NULL DEFAULT '', phone_num VARCHAR(20) NOT NULL DEFAULT '', sms_code VARCHAR(20) NOT NULL DEFAULT '', action TINYINT NOT NULL ...
true
1fe64857279522ce95b712d3b100a5b504b5188c
SQL
lasthyphen/ortelius-master
/services/db/migrations/038_asset_id_qry.down.sql
UTF-8
293
2.5625
3
[ "BSD-3-Clause" ]
permissive
drop index avm_outputs_transaction_id_asset_id_output_type on avm_outputs; drop index avm_transactions_created_at_chain_id_idx on avm_transactions; create index avm_transactions_created_at_idx on avm_transactions (created_at); drop table cvm_logs; alter table pvm_blocks drop column height;
true
53bc8c3711391be27cecd70308f6f50ee59c5066
SQL
rvmladenov/Soft-Uni
/Level 3/DB/Week 6 - Език SQL – групиране и DDL/Problem13.sql
UTF-8
236
3.390625
3
[]
no_license
-- Problem 13. Write a SQL query to find the names of all employees whose last name is exactly 5 characters long. use SoftUni; SELECT FirstName+' '+LastName as [Employee Name] FROM Employees where len(LastName) = 5 order by FirstName
true
bae802958022729ca70853c60cf2025ece6b6f9b
SQL
LEGENDARY2017/CourtBookingSystem
/utmcourt.sql
UTF-8
6,478
3.15625
3
[]
no_license
-- MySQL dump 10.13 Distrib 5.7.17, for Win64 (x86_64) -- -- Host: 127.0.0.1 Database: utmcourt -- ------------------------------------------------------ -- Server version 5.7.20-log /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RES...
true
6bfe6825da6baa135554f899a1cb3bd9c68fa806
SQL
dongryoung/Class_Examples
/5. Oracle RDBMS/수업 자료/연습문제5-1-풀이.sql
UHC
2,257
4.0625
4
[]
no_license
--1. ҹ ϰ z ִ --, , μڵ, μ ȸ SELECT e.employee_id, e.last_name, d.department_id, d.department_name FROM employees e, departments d WHERE e.department_id = d.department_id AND LOWER(e.last_name) LIKE '%z%'; --2. Ŀ̼ ޴ --, , ޿, Ŀ̼ǿ, ȸ SELECT e.employee_id, e.last_name, e.salary, e.commission_pct, j.job_tit...
true
15439422938707f4aa4f49fc5b635d060ca615c4
SQL
yxzzzxh/dashboard_login
/dashboard_DB/schema/DashBoard.sql
UTF-8
2,417
2.875
3
[]
no_license
-- MySQL dump 10.13 Distrib 8.0.21, for macos10.15 (x86_64) -- -- Host: 192.168.35.142 Database: DashBoard -- ------------------------------------------------------ -- Server version 8.0.21-0ubuntu0.20.04.4 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@...
true
f75daaa619a7301cd0a659f93f8ee029b363bf30
SQL
seleniadelgado/holbertonschool-higher_level_programming
/0x0E-SQL_more_queries/15-comedy_only.sql
UTF-8
224
3.71875
4
[]
no_license
-- list all comedy shows. SELECT title FROM tv_shows INNER JOIN tv_show_genres ON tv_show_genres.show_id = tv_shows.id INNER JOIN tv_genres ON tv_show_genres.genre_id = tv_genres.id WHERE name = "Comedy" ORDER by title ASC;
true
cd1b4e5ad137e00adeb9e938fa8c6914445a4fa0
SQL
pallscall/way-jasy-cron
/user/sql/create_table.sql
UTF-8
830
3.203125
3
[]
no_license
CREATE TABLE `users` ( `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '自增 id', `username` varchar(64) NOT NULL DEFAULT '' COMMENT '昵称', `password` varchar(500) NOT NULL DEFAULT '' COMMENT '密码', `public_key` varchar (500) NOT NULL DEFAULT '' COMMENT '公钥', `p...
true
1cd2d66957ef1b0f19a2e6236ff7dcde6989e261
SQL
algarran/employeetracker
/seed.sql
UTF-8
577
2.765625
3
[]
no_license
INSERT INTO role_id (title, department_id) VALUE ("Service Department", 1), ("Production Department", 2), ("Sales Department", 3); INSERT INTO employee (first_name, last_name, salary, role_id) VALUE ("Harry", "Douglas", 50000, 1), ("Scott", "Man", 60000, 1), ("Joe", "Huels", 60000, 1), ("Tom", "Br...
true
35b3e888fb3c462fc37501c3f5d14e071540ad4f
SQL
atorresruiz7/Database-Systems
/Lab 6 Queries/7.sql
UTF-8
310
3.75
4
[]
no_license
SELECT COUNT(*) FROM supplier WHERE s_name IN (SELECT s_name FROM supplier, orders, nation, lineitem, customer WHERE n_name IN ("FRANCE", "GERMANY") AND s_nationkey = n_nationkey AND s_suppkey = l_suppkey AND o_custkey = c_custkey AND o_orderkey = l_orderkey GROUP BY s_name HAVING COUNT(o_orderkey) < 30);
true
0cbd2d761d1e0f97fe1f58e7bcb7ba99b4b213de
SQL
UdaraNnuwan/BusManagmentAPI
/assign.sql
UTF-8
16,471
3
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.3 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jun 15, 2021 at 02:14 PM -- Server version: 10.4.14-MariaDB -- PHP Version: 7.4.11 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIE...
true
710c9bf05072445b8ee8b3e092365bd8855abc39
SQL
CFGimenez/comprameya
/comprameya.sql
UTF-8
3,358
3.109375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 3.4.11.1deb2+deb7u1 -- http://www.phpmyadmin.net -- -- Servidor: localhost -- Tiempo de generación: 12-06-2015 a las 18:44:26 -- Versión del servidor: 5.5.43 -- Versión de PHP: 5.4.39-0+deb7u2 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTE...
true
aa26b85784d95115aa55a3c10139fd532c37a725
SQL
tuankhac/backup_data_141
/WEB-INF/templates/districts/script.sql
UTF-8
2,532
3.421875
3
[]
no_license
function new_districts( pid varchar2, pdistrict_name varchar2, pprovince_id varchar2, pUserId varchar2, pUserIp varchar2) return varchar2 is s varchar2(1000); begin logger.access('tax.districts|NEW',pid||'|'||pdistrict_name||'|'||pprovince_id); s:='insert into tax.districts(id,district_name,province_id) value...
true
7a1e0072782dcfefb33a533556cf1064b6177053
SQL
jsgalvish/holbertonschool-higher_level_programming
/0x0E-SQL_more_queries/9-cities_by_state_join.sql
UTF-8
131
2.890625
3
[]
no_license
-- lists cities -- lists cities SELECT cities.id, cities.name, states.name FROM cities JOIN states ON cities.state_id = states.id;
true
4c48d969b63820c4178c5625f58637bf1ec84b5c
SQL
YaroslavArtemenko/noSQL
/Laboratory1/work.cql
UTF-8
4,044
3.15625
3
[]
no_license
INSERT INTO labwork1."People_Event_Contest" (people_name, people_phone, people_email, people_birthday, event_name, event_date, contest_name) VALUES ({"firstname": 'qqq', "lastname": 'www'}, [{'0987654','0876554'}] , 'qqq@gmail.com', '11.11.11', 'prog', '1999-01-10 12:00', 'phone'); INSERT INTO labwork1."People_Event_C...
true
bdc7893dcac66f3083c888f86febf249b638cc41
SQL
robinvanleeuwen/twotter-be
/migrations/2021-01-04-162627_twoots/up.sql
UTF-8
181
2.953125
3
[]
no_license
CREATE TABLE twoot ( id SERIAL PRIMARY KEY, user_id INT NOT NULL, content TEXT NOT NULL DEFAULT '', CONSTRAINT fk_user FOREIGN KEY (user_id) REFERENCES "user"(id) );
true
8c9796d9498300a74b6484572a5089071312a812
SQL
giorgiobaeza/simulacion1awakelabJdbc
/src/main/java/cl/awakelab/simulacion/consultas/consultas-E.sql
ISO-8859-1
284
3.328125
3
[]
no_license
SELECT p.nombre, p.apellido, p.rutpaciente FROM pacientes p LEFT JOIN agendas a ON p.idpaciente = a.idpaciente LEFT JOIN doctores d ON a.iddoctor = d.iddoctor LEFT JOIN especialidades e ON d.idespecialidad = e.idespecialidad WHERE e.descripcion = 'Neurologa' ORDER BY p.rutpaciente;
true
1fb8fe0c2488ae27dd376ed57d0fee6f80972408
SQL
B-V-Vulkov/MS_SQL
/Exercises/06_Joins, Subqueries, CTE and Indices/Solutions.sql
UTF-8
6,191
4.375
4
[]
no_license
--01 Employee Address SELECT TOP(5) e.[EmployeeID], e.[JobTitle], e.[AddressID], a.[AddressText] FROM [Employees] AS e JOIN [Addresses] AS a ON e.[AddressID] = a.[AddressID] ORDER BY e.[AddressID] --02 Addresses with Towns SELECT TOP(50) e.[FirstName], e.[LastName], t.[Name] AS [Town], a.[Add...
true
03d3258e21e8ce5a37043460a47b58c53a23b372
SQL
jaosantos/FonteStefaninni
/scriptBanco.sql
ISO-8859-1
753
3.171875
3
[]
no_license
CREATE TABLE GENERO ( Id INT PRIMARY KEY IDENTITY (1, 1), Codigo INT NOT NULL, Nome VARCHAR (150) NOT NULL ); CREATE TABLE FILME ( Id INT PRIMARY KEY IDENTITY (1, 1), GeneroId INT NOT NULL, Ano INT NOT NULL, Diretor VARCHAR(200) NOT NULL, Titulo VARCHAR(200) NOT NULL, Sinopse VARCHAR(2000) NOT NUL...
true
91db876ddca3ecb3cd35a142f3325d93bf552ca7
SQL
yannickkiki/stuffs
/sql/restricting_sorting_data.sql
UTF-8
1,651
4.34375
4
[]
no_license
-- # Postgresql exercices source: https://www.w3resource.com/postgresql-exercises/ -- ## Basic Restricting and Sorting Data -- ### Exercice 1 SELECT CONCAT(first_name, ' ', last_name) "name" , salary FROM employees WHERE salary NOT BETWEEN 10000 AND 15000; -- ### Exercice 2 SELECT CONCAT(first_name, ' ', last_name)...
true
76651a97dc60b70fa6e8d9126792aecd06cda0c5
SQL
LoickBriot/TeacherApps_Old
/webapp/server/conf/data_model.sql
UTF-8
2,742
3.65625
4
[]
no_license
/* sudo -u postgres pg_createcluster -p 43214 9.5 teacherapps sudo -u postgres psql -p 43214 -c "CREATE USER teacherapp_admin PASSWORD 'aEr56yUI.,';" sudo -u postgres psql -p 43214 -c "DROP DATABASE IF EXISTS teacherapps" sudo -u postgres psql -p 43214 -c "CREATE DATABASE teacherapps WITH TEMPLATE = template0 ENCODING ...
true
68f7d8b98f016f6ea6f6bfdcc166c7c6e3d93601
SQL
brian1959/dyf
/db/get_attendee_schedule.sql
UTF-8
428
3.5625
4
[]
no_license
SELECT co.coursename, co.coursesummary, co.explevel,s.dayid, s.time24, s.scheduleid , p.presenter,ca.category, s."day", s."time",a.attendeeid, a.asid FROM schedule AS s JOIN courses AS co ON s.courseid = co.courseid JOIN category AS ca ON ca.categoryid = co.categoryid JOIN presenters AS p ON co.presenterid = p.presente...
true
b97f80ebb811a24944e2dafb4ce88717d4a0e094
SQL
GWawrzeniecki/RBD
/Projekt/Oracle/Procedury_Wyzwalacze.sql
UTF-8
9,771
4.09375
4
[]
no_license
-- PROCEDURY -- Procedura wypisująca ile Lombard ma klientów CREATE PROCEDURE howManyClients AS ile number; BEGIN select count(1) into ile from Klient; dbms_output.put_line('Lombard aktualnie ma ' || ile || ' klientow'); END; SET SERVEROUTPUT ON; EXECUTE howManyClients; select count(1) into ile from Klient; -- Pr...
true
dab27a13d793b7dda311a8db46353fd850fe5c3c
SQL
GitTomatos/MyWorks
/PostgreSQL/Задания/Задание 12.sql
UTF-8
259
2.9375
3
[]
no_license
(SELECT work_places.name "Места работы или техника", work_places.address "Адреса мест работы или размещения техники" FROM work_places) UNION (SELECT transports.type, transports.address FROM transports)
true
2c04cccd224d47b18b978197268528a9f35f7c7b
SQL
sranson/employee-tracker
/schema.sql
UTF-8
819
3.8125
4
[ "MIT" ]
permissive
-- Schema stuff .. DROP DATABASE IF EXISTS company_DB; CREATE DATABASE company_DB; USE company_DB; CREATE TABLE Departments ( department_id INT AUTO_INCREMENT NOT NULL, department_name VARCHAR (30) NOT NULL, PRIMARY KEY (department_id) ); CREATE TABLE Roles ( role_id INT AUTO_INCREMENT, role_ti...
true
8fd14e9ee0d521caf785da5708bbf2fb36ccb76d
SQL
bawadnan/timesheet-manager
/sql/timesheet-db.sql
UTF-8
5,629
3.328125
3
[]
no_license
create table config ( id integer primary key auto_increment, config_option varchar(100) not null unique, config_value varchar(250) not null ); create table leave_type ( id integer ...
true
95b182e852efd62f7dbc7d3287f352073ca8bbf1
SQL
wsigma21/sql_exercises
/advance/question6_2.sql
UTF-8
301
3.375
3
[]
no_license
-- すべての選手を対象として選手ごとの得点ランキングを表示してください。(SELECT句で副問合せを使うこと) select name, (select count(*) from goals as g where g.player_id = p.id group by player_id) as goal_cnt from players as p order by goal_cnt desc ;
true
c00d242585482f5502ec170ddfa81e8d5e551d05
SQL
zadrot1na/student-list
/migrations/init_migrations.sql
UTF-8
1,028
3.875
4
[]
no_license
/* NEW TABLE*/ create table students_list ( name varchar(255) not null, surname varchar(255) not null, gender varchar(255) not null, age tinyint(255) not null, groupnumber varchar(255) not null, mail varchar(255) not null, score smallint(255) not n...
true
4d73dd4870d7d08e16d71cf0090f6b06665c6b07
SQL
AngJoong/NHN_task
/NHNEnt/sql/NHNEntTask.sql
UTF-8
301
2.6875
3
[]
no_license
DROP TABLE ent_board; CREATE TABLE ent_board( board_no INT AUTO_INCREMENT NOT NULL, email VARCHAR(100) NOT NULL, password VARCHAR(20) NOT NULL, createtime DATETIME DEFAULT SYSDATETIME, modification_time DATETIME, attachment BLOB, body STRING NOT NULL, PRIMARY KEY(board_no) );
true
e57db4f2e12804fe4f69379e6d3ca1d9d78c5f55
SQL
shibu20sxc/musicsheet
/__db/project_sheetmusic.sql
UTF-8
24,365
2.921875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.0.10deb1 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Feb 10, 2016 at 11:28 AM -- Server version: 5.5.47-0ubuntu0.14.04.1 -- PHP Version: 5.5.9-1ubuntu4.14 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_C...
true
a7657838e58f7360f4293718128653e05c6ea2b8
SQL
Hanrycat/LeisureReader-server
/leisurereader.sql
UTF-8
1,037
2.984375
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : mysql Source Server Version : 50717 Source Host : localhost:3306 Source Database : leisurereader Target Server Type : MYSQL Target Server Version : 50717 File Encoding : 65001 Date: 2017-04-01 17:55:51 */ SET FOREIGN_KEY_CHECKS=0; --...
true
0d76c49226c0477414654a01fb101841f7feff31
SQL
jayvdb/plsql-core
/plsql-core/src/main/sql/properties/utilities/extract-to-java.sql
UTF-8
2,402
3.234375
3
[]
no_license
/* Outputs Java code that can be run to re-create current property data. It is assumed that the output will be copied to a Java class in a location from which propertyManager (a PropertyManager instance) is accessible. */ declare procedure p( p_data in varchar2 := ' ' ) is begin dbm...
true
96c1fe7eb5d14520d2a8a27f7ed38321195bfedb
SQL
anwardent71/PWPB
/tugascrud1/crud1.sql
UTF-8
1,945
3.09375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.9.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Apr 14, 2020 at 04:27 AM -- Server version: 10.4.8-MariaDB -- PHP Version: 7.3.11 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
true
58e1c0d56c01987a43b5e0fb85e3ca2af1239b98
SQL
natserract/rust-backend
/migrations/2019-12-29-052158_create_issues/up.sql
UTF-8
282
3.03125
3
[]
no_license
CREATE TABLE issues ( id INTEGER AUTO_INCREMENT PRIMARY KEY NOT NULL, slug TEXT NOT NULL UNIQUE, title TEXT NOT NULL, body TEXT NOT NULL, author INTEGER NOT NULL REFERENCES users ON DELETE CASCADE, created_at TIMESTAMP NULL, updated_at TIMESTAMP NULL )
true
a07a1871cf08157a6b699b12c14349732a281ecd
SQL
kbetoacero/holbertonschool-higher_level_programming
/0x0D-SQL_introduction/102-top_city.sql
UTF-8
205
3.453125
3
[]
no_license
-- displays the top 3 of cities temperature durung july and august order by temp SELECT city, AVG(value) AS avg_temp FROM temperatures WHERE month=7 or month=8 GROUP BY city ORDER BY avg_temp DESC LIMIT 3
true
87b5733c791036a0d602951173445878da63a8c2
SQL
yoheia/yoheia
/oracle/sql/rebuild_unusable_indexes.sql
UTF-8
860
3.3125
3
[]
no_license
define owner_name = &owner_name set echo off set heading off set pagesize 0 set linesize 10000 set trimout on set trimspool on set feedback off set verify off set serveroutput on size 1000000 col spool_file_name new_value spool_file_name for a100 select 'rebuild_unusable_indexes_'||lower('&&owner_name')||'_'||to_cha...
true
e74d69980feb5c6a2ad11b3fbc9b481566ef4a27
SQL
dact/Samvi-services
/sql/taller.sql
UTF-8
1,299
2.875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.0.4 -- http://www.phpmyadmin.net -- -- Servidor: localhost -- Tiempo de generación: 18-11-2013 a las 21:08:40 -- Versión del servidor: 5.5.11 -- Versión de PHP: 5.4.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARAC...
true
831a19c777d39cc4568d363c15cdadf70f13d400
SQL
IFDAAS/insurance-3
/insurance/_docs/sources/insur_db.sql
WINDOWS-1251
14,672
3.28125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version -- http://www.phpmyadmin.net -- -- : insur.mysql -- : 23 2012 ., 22:24 -- : 5.1.41 -- PHP: 5.2.10 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTE...
true
7c5bf9638612bf6736d534219e1cfa848bcc170c
SQL
whawkins4/arborlibrary
/db/misc_sql_queries/populate subjects table.sql
UTF-8
1,694
3.59375
4
[]
no_license
 insert into subjects(subject) select distinct trim(subject1) from books where length(trim(subject1))>0 and not exists (select * from subjects s where s.subject = trim(subject1)); insert into subjects(subject) select distinct trim(subject2) from books where length(trim(subject2))>0 and not exists (select * from sub...
true
fd5e3a3c956378cc33afa6c8f933747808ac3570
SQL
YANG-DB/yang-db
/docs/tutorial/sample/movies-imdb/ontology/crew.ddl
UTF-8
456
3.109375
3
[ "Apache-2.0" ]
permissive
-- tconst (string) - alphanumeric unique identifier of the title -- directors (array of nconsts) - director(s) of the given title -- writers (array of nconsts) – writer(s) of the given title CREATE TABLE crew ( tconst VARCHAR(100) NOT NULL PRIMARY KEY, directors VARCHAR(100), writers VARCH...
true
b82a4b8dd87de3bf050992b8ce450985e166eb4b
SQL
yennanliu/CS_basics
/leetcode_SQL/leetcodify-friends-recommendations.sql
UTF-8
5,027
4.46875
4
[]
no_license
/* Description LeetCode Problem 1917. Table: Listens +-------------+---------+ | Column Name | Type | +-------------+---------+ | user_id | int | | song_id | int | | day | date | +-------------+---------+ There is no primary key for this table. It may contain duplicates. Each row of thi...
true
d7dedf2f3f6b155a4d5431c88e54a23e3e446f13
SQL
harshals21/YummyFoods
/yummyfoods.sql
UTF-8
2,543
3.234375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.3 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Dec 01, 2020 at 11:01 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
f768bca763cfd469930d030c44e00259f215e5c1
SQL
Haifa00/H-and_R-wirless
/HRSchema.sql
UTF-8
2,377
2.6875
3
[]
no_license
{\rtf1\ansi\ansicpg1252\cocoartf2580 \cocoatextscaling0\cocoaplatform0{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} {\*\expandedcolortbl;;} \margl1440\margr1440\vieww11520\viewh8400\viewkind0 \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardi...
true
6e241f8ffbca1bb4547094cab7d6707d5e3e7cf0
SQL
NYCPlanning/db-cpdb
/sql/attributes_bbl.sql
UTF-8
1,123
3.15625
3
[]
no_license
-- spatial join to get bbls WITH bx as ( SELECT bbl, ST_Transform(ST_SetSRID(geom,2263),4326) as geom FROM bxmappluto ) UPDATE cpdb_dcpattributes a SET bbl = b.bbl FROM bx b WHERE a.bbl IS NULL AND ST_Within(a.geom, b.geom); WITH bk as ( SELECT bbl, ST_Transform(ST_SetSRID(geom,2263),4...
true
7f416109152735340d223b6123c619c31749d79b
SQL
angelofgrace/holbertonschool-higher_level_programming
/0x0E-SQL_more_queries/16-shows_by_genre.sql
UTF-8
218
4.09375
4
[]
no_license
-- script lists all shows and all genres linked to each SELECT title, name FROM tv_shows LEFT JOIN tv_show_genres n ON tv_shows.id=n.show_id LEFT JOIN tv_genres genre ON n.genre_id=genre.id ORDER BY title, name ASC;
true
33e9cece83ac2ab1be5604076d544d265eba1c76
SQL
OscarGauss/comollego.bo
/comollego.sql
UTF-8
1,567
3.421875
3
[]
no_license
CREATE DATABASE comollego USE comollego CREATE TABLE sindicato( idsindicato varchar(10) NOT NULL, nombre varchar(50), tipo varchar(20), direccion varchar(50), telefono varchar(50), PRIMARY KEY (idsindicato) ) CREATE TABLE linea( idlinea varchar(10) NOT NULL, nombre varchar(10), idsindicato varchar(10) NOT NU...
true
d8f1cc178db51a9da7000f259790d8efa5f79258
SQL
seyoon2/todo_managemen2
/mysql_resource/table/create.sql
UTF-8
590
2.921875
3
[]
no_license
-- USE USE my_demo -- CREATE -- USERS CREATE TABLE IF NOT EXISTS `users` ( `id` int NOT NULL AUTO_INCREMENT, `account_id` varchar(20) NOT NULL, `password` char(60) NOT NULL, `delete_flag` tinyint(1) NOT NULL DEFAULT FALSE, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8; -...
true
c79c0ad1322db06c1138576a3160eb8a889f8f86
SQL
RakshitaTantry28/GameEngineWebsite
/php database/wdl (1).sql
UTF-8
6,746
3.109375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.9.5 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3306 -- Generation Time: Dec 04, 2020 at 04:22 AM -- Server version: 5.7.24 -- PHP Version: 7.4.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHA...
true
007a72ac9b33a952a8c64c33031e3279503edeae
SQL
yokouei/yasashiiphp
/Programming_PHP/ch08/library.sql
UTF-8
1,633
3.265625
3
[]
no_license
CREATE TABLE `authors` ( `authorid` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(55) NOT NULL DEFAULT '', PRIMARY KEY (`authorid`) ) ; INSERT INTO `authors` (`authorid`, `name`) VALUES (1, 'J.R.R. Tolkien'), (2, 'Alex Haley'), (3, 'Tom Clancy'), (4, 'Isaac Asimov'); CREATE TABLE `books` ( `bookid` int(11) ...
true
60087f1e66852f193ea13c95d8e6ec06532acbc6
SQL
srecckog/sql1
/vv-ifexist.sql
UTF-8
346
2.984375
3
[]
no_license
USE SupplyOn; IF EXISTS(SELECT * FROM sys.columns WHERE Name = N'DatumIsporuke' AND Object_ID = Object_ID(N'CsvOrdersTmp')) BEGIN PRINT 'Postoji' --EXEC sp_RENAME 'CsvOrdersTmp.DatumIsporuke', 'DatumIsporukeX' , 'COLUMN' END ELSE BEGIN PRINT 'Ne postoji' --EXEC sp_RENAME 'CsvOrdersTmp.DatumIsporukeX', 'Datu...
true
664b3390a7255e4eda4abae16ae8f05fff78aaf9
SQL
mtvspec/use-case-tracker
/sql/user.sql
UTF-8
368
3.578125
4
[]
no_license
SELECT u.id, u.username, p.iin, p."firstName", p."lastName", p."middleName", ( SELECT row_to_json(state.*) AS state FROM ( SELECT d.* FROM dict.e_dict_value d WHERE d.id = u."stateID" ) state ) AS state, u."isDeleted", u."createdAt" FROM users.e_user u, ...
true