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
9a7158850f69b4a6b0c0dc58ce034ebcbc99be67
SQL
ma-cm/Centro_Medico
/Database/DML.sql
UTF-8
6,131
2.53125
3
[]
no_license
use sifco_db; /* insertar pacientes */ insert into Paciente (nombre_completo, nacimiento, sexo, dpi) values('Paciente1', '10-11-2000', 'm', 2323456760101); insert into Paciente (nombre_completo, nacimiento, sexo, dpi) values('Paciente2', '12-12-2001', 'm', 2323908760101); insert into Paciente (nombre_completo, nacimie...
true
f615775821127cd453e41b870ff828ad37adab52
SQL
KanishkaDewSandaruwan/katanalibrarySahani
/Database/katanalibrarydb.sql
UTF-8
9,863
3.0625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Apr 23, 2021 at 09:10 PM -- Server version: 10.4.17-MariaDB -- PHP Version: 7.3.27 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIE...
true
97d9d2f59aacd6c6aae3ab49be0944189b974be3
SQL
nelsonr-code/business_intelligence-project
/databases/load-data_INVENTARIO_G20827907.sql
UTF-8
196,473
2.609375
3
[]
no_license
/* Created: 1/3/2020 Modified: 1/3/2020 Database: MySQL 8.0 */ -- Insert table CATEGORIA INSERT INTO INVENTARIO_G20827907.CATEGORIA(id_cat, nomb_cat) VALUES(1, 'Children Bicycles'); INSERT INTO INVENTARIO_G20827907.CATEGORIA(id_cat, nomb_cat) VALUES(2, 'Comfort Bicycles'); INSERT INTO INVENTARIO_G20827907.CAT...
true
9436434eebfb9c9fd6429fc15ca8951f985fb918
SQL
Ch-iron/Database_Systems
/project1/28.sql
UTF-8
271
3.546875
4
[]
no_license
select t.name, avg(cp.level) "Average Trainer's Pokemon level(Normal & Electric)" from Trainer t, (select * from Pokemon where type = "Normal" or type = "Electric") p, Catchedpokemon cp where t.id = cp.owner_id and p.id = cp.pid group by t.name order by avg(cp.level);
true
b0fe26e0e398258306af764bef0be55d183cd7ff
SQL
closetothe/notmoodle
/public/detdb/db_v1.sql
UTF-8
3,054
4.03125
4
[]
no_license
CREATE DATABASE detdb; USE detdb; CREATE TABLE authors ( id INT AUTO_INCREMENT PRIMARY KEY, first_name NVARCHAR(80), first_initial CHAR NOT NULL, middle_initial CHAR, last_name NVARCHAR(80) NOT NULL, field_of_research VARCHAR(100) ); CREATE TABLE citations ( id INT AUTO_INCREMENT PRIMARY KEY, preformatted NVA...
true
d8a415a1742d731d2312015069485dc5e5d7ed73
SQL
fmilani/dark
/backend/migrations/20180531_182705_create_user_data_table.sql
UTF-8
403
2.5625
3
[ "LicenseRef-scancode-unknown-license-reference", "Apache-2.0", "BSD-3-Clause" ]
permissive
CREATE TABLE IF NOT EXISTS user_data (id UUID NOT NULL , account_id UUID REFERENCES accounts(id) NOT NULL , canvas_id UUID REFERENCES canvases(id) NOT NULL , table_tlid BIGINT NOT NULL , user_version INT NOT NULL , dark_version INT NOT NULL , data JSONB NOT NULL , created_at TIMESTAMP NOT NULL DEFAULT NOW() , updated_a...
true
9fa237ed4b62cc3b571aae0ce77f370f2424d100
SQL
rumta123/test1_free-student.ru
/rum44_apple.sql
UTF-8
3,560
3.1875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.9.7 -- https://www.phpmyadmin.net/ -- -- Хост: 10.0.0.234:3311 -- Время создания: Сен 06 2021 г., 12:54 -- Версия сервера: 10.5.11-MariaDB-log -- Версия PHP: 7.4.11 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SE...
true
b5485065c8b388850f18a620dbfce8338d149e84
SQL
MiguelNdeCarvalho/BD-Work-1
/queries.sql
UTF-8
4,116
4.0625
4
[ "MIT" ]
permissive
--5 --a select Matricula from taxi,modelo where taxi.Modelo=modelo.Modelo and Marca='Mercedes' --b select Nome from turno,motorista,taxi,modelo where turno.Nbi=motorista.Nbi and turno.Matricula=taxi.Matricula and taxi.Modelo=modelo.Modelo and Marca='Mercedes' --c select Telefone from telefone,pedido,turno,motorist...
true
82f70acfad8ff0b224ae06bc4f3a779e839b6443
SQL
bdmlai/analytics_engineering_marts
/models/Redshift/fds_nplus/views/vw_rpt_network_daily_subscription_kpis.sql
UTF-8
4,111
3.46875
3
[]
no_license
{{ config({ "schemas": 'fds_nplus', "materialized": 'view',"post-hook" : 'grant select on {{this}} to public' }) }} SELECT c.country_nm,a.*, b.domest_paid_active, b.domest_trial_active, b.inter_paid_active, b.inter_trial_active, b.active, b.inactive, b.lp_active, b.t2_inact_dedup, b.t2_inact_dedup_logged_in, b...
true
1a7966e9b2c70e5d0f5153cebdae5f783f07b96b
SQL
OstapGereley/tools-rent-system
/ToolsRentSystem/ToolsRentSystem.Database/ToolsRentDatabaseCreationScript.sql
UTF-8
1,357
3.828125
4
[]
no_license
USE ToolsRentDatabase CREATE TABLE tblTool ( Id INT IDENTITY NOT NULL, Model NVARCHAR(50) NOT NULL, Manufacturer NVARCHAR(50) NOT NULL, Kind NVARCHAR(50) NOT NULL, SerialNumber NVARCHAR(50) NOT NULL, Cost NUMERIC(18,4) NOT NULL, CONSTRAINT PK_tblTools_Id PRIMARY KEY (Id) ) CREATE TABLE tblCustomer ( Id INT IDENTITY ...
true
f332dcf9e0ec6fa73deb3af57c97f59d1c80d2ca
SQL
lucasjaviluna/netbill
/database/sql/dbClient.sql
UTF-8
1,693
3.5
4
[]
no_license
CREATE TABLE `users` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `password` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `db_user` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `db_password` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `db_hos...
true
4019df2b193ef22b25b55187414ed40a285f012b
SQL
Kumat1/tugas-besar-ayudwirizky_miaditha
/src/perpustakaan.sql
UTF-8
6,538
2.765625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Jun 10, 2017 at 11:31 PM -- Server version: 10.1.13-MariaDB -- PHP Version: 5.6.21 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CL...
true
431c30d10745ef669ac22e5c1e4f2d0ded0dbc33
SQL
silence-do-good/stress-test-Postgres-and-MySQL
/dump/high/day08/select0911.sql
UTF-8
271
3.109375
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='Thermometer' AND sen.id=ci.SENSOR_ID AND ci.INFRASTRUCTURE_ID=ANY(array['4100_1','2100_3','3013','3084','3028','5222','5081','5038','3019','4069'])
true
ef8523df58a1ab2f6337501121c27c11cc8c88c7
SQL
pawsfund/Graham_Nano_Tip_Bot
/sql/1.0/top_tips.sql
UTF-8
593
3.328125
3
[ "MIT" ]
permissive
alter table user add column top_tip text; alter table user add column top_tip_ts datetime; update user set top_tip=cast((select MAX(cast(t.amount as integer)) from 'transaction' as t where (t.source_address = wallet_address) and (t.to_address not in(select wallet_address from user))) as text); update user set top_tip_t...
true
c545300d2d451bcb3949e81568e7ba85143a125b
SQL
tfp1/sql-gists
/pandera/rat/getPromotionalsForPosition&AllDescendents.sql
UTF-8
5,069
4.21875
4
[]
no_license
with targetMonth as ( select pro.month from "promotionals" pro where pro.month in (8,9,10,11,12,1,2,3) -- Enter your calendar months here and pro.fiscal_year = 2018), --Enter your fiscal year here targetPosition as ( select p.id from "positions" p where p.code = 'A0001'), --Enter the Area or Region H...
true
0d2315bda600f669d938d3b033ef3e1d21700fd9
SQL
HR-JAWS/battleBread
/database/schema.sql
UTF-8
3,917
3.296875
3
[]
no_license
DROP DATABASE IF EXISTS battlebread; CREATE DATABASE battlebread; USE battlebread; CREATE TABLE users ( id int NOT NULL AUTO_INCREMENT, username varchar(50) NOT NULL, password varchar(50) NOT NULL, wins int NOT NULL DEFAULT 0, losses int NOT NULL DEFAULT 0, playerLevel int NOT NULL DEFAULT 1, games var...
true
0452f9f73ff892c26dada348eda694c8e6190174
SQL
Brayan-Cifuentes/MantenimientosHoteleria
/version1-MantenimientoHoteleria/HSC-Proyecto/BD/ScriptGeneral/LMDHSC.sql
UTF-8
3,678
3.0625
3
[]
no_license
-- ------------------------------ # LMD DATABASE hotelSanCarlos -- ------------------------------ USE hotelSanCarlos; -- --------------------------------------------------- -- INSERT COMPONENTE SEGURIDAD -- --------------------------------------------------- #usuario: admin #contraseña: 12345 insert into empleado val...
true
a1b33ddd3f92510561b52a65c105a1131d37187b
SQL
HTTPArchive/almanac.httparchive.org
/sql/2021/caching/ttl_by_resource.sql
UTF-8
491
3.59375
4
[ "Apache-2.0" ]
permissive
#standardSQL # TTL by resource type for cacheable (no-store absent) content SELECT _TABLE_SUFFIX AS client, type AS response_type, percentile, APPROX_QUANTILES(expAge, 1000)[OFFSET(percentile * 10)] AS ttl FROM `httparchive.summary_requests.2021_07_01_*`, UNNEST([10, 25, 50, 75, 90]) AS percentile WHERE N...
true
90daceeff9a16e84fcaa5a82bd22dd9ab4812bb7
SQL
ivancekic/sql-data-analysis
/sql/Ambalaza/nena/Stanje_Iz_kartice_amb.sql
UTF-8
1,263
3.03125
3
[ "MIT" ]
permissive
Select pp.teren, obl.naziv naziv_ter, pp.sifra, pp.naziv naziv_partner, sd.Proizvod, P.Naziv pro_naziv, ( Sum ( Kolicina * Faktor * Decode( K_Robe, 1, 1, 0 ) ) ) Ulaz, ( Sum ( Kolicina * Faktor * Decode( K_Robe, -1, 1, 0 ) ) ) Izlaz, ( Sum ( Kolicina * Faktor * K_Robe ) ) Stanje, p.Jed_...
true
119b93c93c1ae58d158d4628e2dd79acb64f4031
SQL
chenliang1991625/SpringSecurityOAuth2-2
/陈亮制作的资料/OAuth2.0用到的mysql数据库转存的sql文件/t_user_role.sql
UTF-8
986
2.734375
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : firstDataBase Source Server Version : 50725 Source Host : localhost:3306 Source Database : springcloud-security-autho2 Target Server Type : MYSQL Target Server Version : 50725 File Encoding : 65001 Date: 2020-02-15 20:55:37 */ SET FOR...
true
ba062d4f282f8721ce554449dc24fc1921811568
SQL
angelinaebreo/Online-Bodega-PERN-Store
/back-end/db/prod_schema.sql
UTF-8
524
3.28125
3
[]
no_license
DROP DATABASE IF EXISTS d6oc82g8rnpad3; CREATE DATABASE d6oc82g8rnpad3; \c d6oc82g8rnpad3; DROP TABLE IF EXISTS products; CREATE TABLE products ( id SERIAL PRIMARY KEY, name TEXT, price DECIMAL(3,2), category TEXT, is_popular BOOLEAN, img TEXT ); DROP TABLE IF EXISTS reviews; CREATE TABLE...
true
1b414cbc705a16d120e2d1b42d0df852a896be3e
SQL
nss-day-cohort-13/chinook-CoryTohill
/top_2013_track.sql
UTF-8
359
4.09375
4
[]
no_license
--Provide a query that shows the most purchased track of 2013. SELECT CurrentTrack, Max (TrackCounts) FROM (SELECT t.Name as CurrentTrack, Count(il.TrackId) as TrackCounts FROM InvoiceLine il, Invoice i, Track t WHERE il.TrackId = t.TrackId AND il.InvoiceId = i.InvoiceId AND strftime("%Y", i.InvoiceD...
true
bc8647f66fa359fd718cf7790c9c41187f57173b
SQL
alexsharman/MeetingRoomBookingAPI
/src/main/resources/sql-scripts/schema.sql
UTF-8
1,850
3.953125
4
[ "Apache-2.0" ]
permissive
create TABLE tbl_roles ( id bigint(20) NOT NULL AUTO_INCREMENT, description varchar(255) DEFAULT NULL, role_name varchar(255) DEFAULT NULL, PRIMARY KEY (id) ); create TABLE tbl_users ( id bigint(20) NOT NULL AUTO_INCREMENT, name varchar(50) NOT NULL, surname varchar(255) NOT NULL, password varchar(25...
true
c7a3e67a9797b28926bc26679a4ede9f535978f3
SQL
hcsp/wxshop
/wxshop-main/src/main/resources/db/migration/V1__CreateUser.sql
UTF-8
481
2.84375
3
[]
no_license
CREATE TABLE USER ( ID BIGINT PRIMARY KEY AUTO_INCREMENT, NAME VARCHAR(100), TEL VARCHAR(20) UNIQUE, AVATAR_URL VARCHAR(1024), ADDRESS VARCHAR(1024), CREATED_AT TIMESTAMP NOT NULL DEFAULT NOW(), UPDATED_AT TIMESTAMP NOT NULL DEFAULT NOW() ) ENGINE = InnoDB DEFAULT C...
true
68f476c53c3ec85768b4a016babc74820d40a74b
SQL
jcabuguason/LibraryDatabase
/populate.sql
UTF-8
2,121
2.984375
3
[]
no_license
INSERT ALL INTO person VALUES('01-FEB-1987','sean12@gmail.com',647123456,'sean','beasley','M1W1J5','Ontario','Toronto','Canada',123,'Jane St.') INTO person VALUES('01-FEB-1987','nat10@gmail.com',647654321,'nat','James','M1W2K7','Ontario','Toronto','Canada',100,'Kennedy E.') INTO person VALUES('01-FEB-1987','BobP@gm...
true
5ebc1fd79f2d2930b52d94948829286ec08858b6
SQL
soulxj/aion-cn
/AL-Game/sql/updates/Rev 2843 - inventory_slot (for 3.0 to 3.5 switch).sql
UTF-8
1,093
2.546875
3
[]
no_license
ALTER TABLE `inventory` MODIFY COLUMN `slot` BIGINT(20) NOT NULL DEFAULT '0'; UPDATE `inventory` SET `slot` = (1 << 51) WHERE (`slot` & 0xFFFFFFFF) = (1 << 30); UPDATE `inventory` SET `slot` = (1 << 52) WHERE (`slot` & 0xFFFFFFFF) = (1 << 31); UPDATE `inventory` SET `slot` = (1 << 30) WHERE (`slot` & 0xFFFFFFFF)...
true
f09bdef5d51619d4e412aeebf911b48076f66ed0
SQL
bsalvucci/tecso-exam
/workspace-sql/resolucion-ejercicios.sql
UTF-8
2,236
3.703125
4
[]
no_license
#EJERCICIO1 select p.tipodoc, p.documento, p.nombre, p.apellido, a.legajo from alumno a inner join persona p on p.identificador = a.idpersona; #EJERCICIO2 select a.legajo, p.nombre, p.apellido, c.nombre, i.fechainscripcion from alumno a inner join inscripciones_carrera i on a.identificador = i.idalumno i...
true
d3d1accbf21fd85f4789d2a6ea59b0a85eda9b85
SQL
hujinjun/Spring-security
/security2013530.sql
UTF-8
4,633
3.453125
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : mysql Source Server Version : 50156 Source Host : localhost:3306 Source Database : security Target Server Type : MYSQL Target Server Version : 50156 File Encoding : 65001 Date: 2013-05-30 17:07:41 */ SET FOREIGN_KEY_CHE...
true
ed2586c59bf91ac5e941ec0181b7624c08038792
SQL
AdanUrbanReyes/EBanking
/EBanking/src/model/database/database.sql
UTF-8
2,308
3.8125
4
[]
no_license
CREATE SCHEMA ebanking; USE ebanking; DROP TABLE IF EXISTS address; CREATE TABLE address( id INT UNSIGNED NOT NULL AUTO_INCREMENT, street VARCHAR(30) NOT NULL, number VARCHAR(20) NOT NULL, colony VARCHAR(70) NOT NULL, city VARCHAR(40) NOT NULL, codigo_postal CHAR(5) NOT NULL, PRIMARY KEY(id) ); DROP TABLE IF E...
true
b43c75d61c641a092c02bba5a8f0f746d2b28e97
SQL
iamkkhan/Online-Auction-System
/SQL File/auction.sql
UTF-8
5,986
3.1875
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.7.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jun 03, 2018 at 11:19 AM -- Server version: 10.1.30-MariaDB -- PHP Version: 7.2.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
true
9bb7f7d7825a9fc1484247c01865f8acd79bf636
SQL
IvHrIvanov/C--DB
/Exam Prep Airport/Update.sql
UTF-8
135
2.921875
3
[]
no_license
SELECT Price FROM Flights AS f JOIN Tickets AS t ON f.Id=t.FlightId WHERE Destination='Carlsbad' UPDATE Tickets SET Price += Price*0.13
true
5b0d15d8eb9cf91f559cf5b15e584f4aa5b11e3e
SQL
JaimieSanita/Exercises
/module-2/02_Aggregate_Functions_and_GROUP_BY/student-lecture/postgres/lecture.sql
UTF-8
5,140
4.8125
5
[]
no_license
-- ORDERING RESULTS -- Populations of all countries in descending order --ORDER BY takes a comma separated list of columns SELECT population FROM country ORDER BY population DESC; --Names of countries and continents in ascending order SELECT name, continent FROM country ORDER BY name, co...
true
34b2bcba65a7f69b3550a41338e0f7729525ea14
SQL
Detrivinog/BasesDeDatos1
/Clase12.sql
UTF-8
636
2.84375
3
[]
no_license
select titulo from spotify.cancion where titulo like "%z%"; select titulo from spotify.cancion where titulo like "_a%s"; select titulo as "Título", cantcanciones as "Cantidad de canciones" from playlist order by cantcanciones desc limit 5; select nombreusuario as "Nombre del usuario" from usuario order by fecha_nac...
true
d8c0760beb57ea9249a7c000a4436907a3034695
SQL
odubuk/SQL-Practice
/SQL Files/order_by.sql
UTF-8
502
3.390625
3
[]
no_license
CREATE TABLE IF NOT EXISTS watches ( id INT AUTO_INCREMENT PRIMARY KEY , model CHAR(16) , style CHAR(16) , price DECIMAL(6,2) ); INSERT INTO watches ( model , style , price ) VALUES ( "Boston" , "Gents" , 70.00) , ( "Avante" , "Ladies", 90.00) , ( "Club" , "Gents" , 60.00) , ( "Denver" , "Ladies" , 80.0...
true
8a152d39a05e107877970927b3fc5b52c853af6b
SQL
lijieran/webadmin
/db/shirooa.sql
UTF-8
2,387
4.0625
4
[]
no_license
SET SESSION FOREIGN_KEY_CHECKS=0; /* Drop Tables */ DROP TABLE IF EXISTS role_menu; DROP TABLE IF EXISTS t_menu; DROP TABLE IF EXISTS t_user_role; DROP TABLE IF EXISTS t_role; DROP TABLE IF EXISTS t_user; /* Create Tables */ CREATE TABLE role_menu ( -- 角色编号 role_id varchar(64) NOT NULL COMMEN...
true
21853f65fa8dc21d8fd0d12f7486dee315b7afea
SQL
NikolaBozhkov/TelerikAcademy
/Databases/DatabaseModeling/Task4-UniversityDB-creation-script.sql
UTF-8
5,171
3.515625
4
[]
no_license
-- MySQL Script generated by MySQL Workbench -- 08/22/14 13:01:15 -- Model: New Model Version: 1.0 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'; -- -----------...
true
feee275f8010963b3167414721e1f998defa21dd
SQL
david-mansen/ecommerce-backend
/tests.sql
UTF-8
727
3.421875
3
[]
no_license
#-----CUSTOMER VIEW------ #retrieve all product ids,names,prices, SELECT item_id, product_name, price FROM products; #check stock of product SELECT product_name, price, stock_quantity FROM products WHERE item_id = 1; #update stock of product UPDATE products SET stock_quantity = 0 WHERE item_id = 1; #------MANAGER...
true
a402ca65905b56dfa6ce7cb481de1e780a1b5f03
SQL
igorshelove/sqlhw
/lesson8.sql
UTF-8
3,473
3.96875
4
[]
no_license
--task1 (lesson8) -- oracle: х --task2 (lesson8) -- https://sql-academy.org/ru/trainer/tasks/17 select fm.member_name , fm.status, sum(p.unit_price*p.amount) as costs from FamilyMembers as fm left join Payments as p on fm.member_id = p.family_member where extract(YEAR from p.date) = 2005 group by fm.member_name ...
true
788fcddb9ed9977353912bc9829b24a5154c749a
SQL
valekovski/ssts
/web/php/doc_sistem/znanost.sql
UTF-8
2,529
3.25
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.1.3 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: May 30, 2022 at 08:44 PM -- Server version: 10.4.24-MariaDB -- PHP Version: 7.4.29 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIE...
true
85c159df7c6953dd85f1e299cdecc13103498400
SQL
ClickHouse/ClickHouse
/tests/queries/0_stateless/01015_attach_part.sql
UTF-8
536
3.328125
3
[ "BSL-1.0", "Apache-2.0" ]
permissive
DROP TABLE IF EXISTS table_01; CREATE TABLE table_01 ( date Date, n Int32 ) ENGINE = MergeTree() PARTITION BY date ORDER BY date; INSERT INTO table_01 SELECT toDate('2019-10-01'), number FROM system.numbers LIMIT 1000; SELECT COUNT() FROM table_01; ALTER TABLE table_01 DETACH PARTITION ID '20191001'; SELE...
true
e35e288ecd97d728c7f679fcae7d2a8a9990e16d
SQL
okcoders/data_analysis_fall2019
/classes/week1/notes_s2.SQL
UTF-8
2,340
4.59375
5
[]
no_license
-- Aggregations ------------------------------------------------------------------------------------ SELECT country, count(*) as num_recs FROM employees GROUP BY country; SELECT country, count(*) as num_recs FROM employees WHERE total_worth > 30 GROUP BY country; -- HAVING: like a where clause, but after the aggrega...
true
04d7f2d401b576b7bf387f3d50ca25e82e83ee61
SQL
EmersonAntonioDaSiilva/adm-questions
/adm-questions-doc/Desafio Watson - IBM/Projetos/ativo - EAD - Interativa/perguntas.sql
UTF-8
3,197
3.015625
3
[]
no_license
-- -- PostgreSQL database dump -- -- Dumped from database version 9.5.3 -- Dumped by pg_dump version 9.5.1 -- Started on 2016-09-20 18:22:45 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_messages ...
true
ccc2ded6f5767a59ca7bbae19397ad5ae045ce2d
SQL
jgarzonext/plsql-testing
/script_plsql/bd_iaxis/script/disparadores/TRG_HIS_PDS_DESHABILITAR.sql
WINDOWS-1250
1,076
2.875
3
[]
no_license
-------------------------------------------------------- -- DDL for Trigger TRG_HIS_PDS_DESHABILITAR -------------------------------------------------------- CREATE OR REPLACE EDITIONABLE TRIGGER "AXIS"."TRG_HIS_PDS_DESHABILITAR" BEFORE UPDATE OR DELETE ON PDS_DESHABILITAR FOR EACH ROW DECLARE v...
true
919a31784be16dd11002cc7dda5bb53de0c4feb3
SQL
yuanshengping-ysp/vvic-test
/dw_rpt_pangge/rpt_pangge_sd_cate_sales/rpt_pangge_sd_cate_sales.sql
UTF-8
607
3.4375
3
[]
no_license
SET hive.mapred.supports.subdirectories=TRUE; SET mapred.input.dir.recursive=TRUE; drop table if exists rpt.rpt_pangge_sd_cate_sales; --类目销量表,rpt_pangge_sd_cate_sales create table rpt.rpt_pangge_sd_cate_sales as select t1.ad_cate_id,t1.vcid,t2.vcname,t1.sales_num_3d,t1.sales_item_num_3d,t1.`date` from (select ad_c...
true
291d81532f2361ded3776f26c64da3a1a1900350
SQL
MohamedSoliman2022/BI-First-Enquiry-scripts-Scedual-Doctors-clinics
/Missed phhysician checking.sql
UTF-8
2,946
3.296875
3
[]
no_license
-----Rania Elhadad --1-- --checking in pivot dose not exist ============================================== --2-- checking in data wrehouse facts select * from opddax.DimPhysician where PhysicianEnglishName='Rania Elhadad' --B- in fact apology select * from opddax.FactClinicsApologiesv2 wh...
true
a0abc76eb4d8702eeeeb69da3019fcbc7e872dc8
SQL
ealevchenko/IDS-RailWay
/sql/Selects/Скрипт get_view_ways_status_of_station.sql
UTF-8
940
3.640625
4
[]
no_license
use [KRR-PA-CNT-Railway] SELECT w.[id], w.[id_station], w.[id_park], w.[position_park], w.[position_way], pw.[park_name_ru], pw.[park_name_en], pw.[park_abbr_ru], pw.[park_abbr_en], w.[way_num_ru], w.[way_num_en], w.[way_name_ru], w.[way_name_en], w.[way_abbr_ru], w.[way_abbr_en], w.[c...
true
c0f69f7e26ebaac48ae0eec9c07130995e797bb0
SQL
codetime2019/-
/飞机航班项目/sql/excute.sql
UTF-8
2,530
3.84375
4
[]
no_license
-- 查询plane select * from plane select plane_id 'id',plane_name 'name',plane_type 'type' from plane -- 添加plane信息 insert into plane (plane_id,plane_name,plane_type) values (default,'中国国航CA1557','全新空客 A350-900') -- 查询airport select * from airport select airport_id 'id',airport_name 'name',airport_address 'address' fr...
true
4a90766779bcd933471ff11316d5c3f67e6026b6
SQL
WesleySiNeves/Scripts_SQL_Server
/1.Programação em SQL/1.TSQL/1.Basic/OrdenacaoDados/3.OrdenaçãoDadosWITH.sql
UTF-8
358
3.015625
3
[]
no_license
; WITH Pags ( Posicao, SiglaUF, Nome, CodigoIBGE ) AS ( SELECT ROW_NUMBER() OVER ( ORDER BY e.SiglaUF ) , e.SiglaUF , e.Nome , e.CodigoIBGE FROM Corporativo.Estados AS e ) SELECT * FROM Pag...
true
3bfb32b5f85a90b4607c6e7042b842da0f24cae9
SQL
epiii/sister
/shared/db/@tables/psb_tmp_saudara.sql
UTF-8
911
2.59375
3
[]
no_license
# Host: localhost (Version: 5.6.20) # Date: 2015-01-29 04:47:20 # Generator: MySQL-Front 5.3 (Build 4.187) /*!40101 SET NAMES latin1 */; # # Structure for table "psb_tmp_saudara" # DROP TABLE IF EXISTS `psb_tmp_saudara`; CREATE TABLE `psb_tmp_saudara` ( `replid` int(10) unsigned NOT NULL AUTO_INCREMENT, `sesid...
true
a088eb69ba42d2e5caf04e3c7404c7b7ad628ba6
SQL
amosgavin/db2app55
/code/sql/comframe30-sql/db2/form/VM_OBJECT_ITEM.sql
GB18030
2,916
3.421875
3
[]
no_license
/*==============================================================*/ /* DBMS name: ORACLE Version 10gR2 */ /* Created on: 2011/7/15 11:09:07 */ /*==============================================================*/ /*================================================...
true
b8e014a6c8e62b8d1f17274d81b0070a65ae57ac
SQL
cubaguest/CubeCMS
/modules/projects/upgrade/1.1.0.sql
UTF-8
474
2.796875
3
[]
no_license
ALTER TABLE `{PREFIX}projects_sections` ADD COLUMN `section_weight` SMALLINT NULL DEFAULT 0 AFTER `section_time_add`; ALTER TABLE `{PREFIX}projects` ADD COLUMN `project_weight` SMALLINT NULL DEFAULT 0 AFTER `project_related`, ADD COLUMN `project_name_short` VARCHAR(100) CHARACTER SET 'utf8' COLLATE 'utf8_czech_ci' N...
true
afb637c0796d130435d559caf56bf2d106020b2c
SQL
hongmatthew/-
/20181207/SQL/MySQL_DDL.sql
UHC
967
3.5625
4
[]
no_license
create table Member( /// θ mNo int not null AUTO_INCREMENT, /* PK */ mId varchar(30) not null, /* ̵ */ mPass varchar(16) not null, /* йȣ */ mName varchar(10) not null, /* ̸ */ delYn varchar(1) not null DEFAULT 'N', regDate DATETIME not null DEFAULT CURRENT_TIMESTAMP, modDate DATETI...
true
61e996d160a39bf3ec19a38aac85f1d9e2cf5728
SQL
prettystupid/gambler
/src/main/resources/com/prestu/gambler/data/database.sql
UTF-8
1,270
3.4375
3
[]
no_license
SET FOREIGN_KEY_CHECKS=0; CREATE SCHEMA IF NOT EXISTS gambler; USE gambler; DROP TABLE IF EXISTS users; CREATE TABLE users ( id INT PRIMARY KEY NOT NULL AUTO_INCREMENT, username VARCHAR(255) UNIQUE KEY NOT NULL, password INT, firstname VARCHAR(255) DEFAULT '', lastname VARCHAR(255) DEFAULT '', male TINY...
true
59ee112c517b04a30e058435fef048582180299b
SQL
ferbaco86/SQL-Zoo
/JOIN.sql
UTF-8
1,388
4.0625
4
[ "MIT" ]
permissive
SELECT matchid, player FROM goal WHERE teamid = 'GER'; SELECT id,stadium,team1,team2 FROM game WHERE id= 1012; SELECT player, teamid, stadium, mdate FROM game JOIN goal ON (id=matchid) WHERE teamid='GER'; SELECT team1, team2, player FROM game JOIN goal ON (id=matchid) WHERE player LIKE 'Mario%'; SELECT player, team...
true
2087e0ec317eb779a460d2bde8370c345d95497e
SQL
debsconsultores/unipostgresql2020
/union.sql
UTF-8
1,745
3.1875
3
[]
no_license
select * from rental select * into rental200505 from rental where return_date<='20050531' --295 select * into rental200506 from rental where return_date::date between '20050601'::date and '20050630'::date order by return_date desc -- select * into rental200507 from rental where return_date::date between '20050701'::...
true
cc2d2f5a9ade26273e816743a06c6c078be72d51
SQL
milana-kovacevic/upravljanje-gradilistima
/scripts/trigger.sql
UTF-8
7,170
3.78125
4
[]
no_license
USE `UpravljanjeGradilistima`; DELIMITER $$ -- ------------------------------------------------------ -- Triger postavlja pocetni status gradilista na 'u pripremi' -- ukoliko on nije postavljen -- ------------------------------------------------------ DROP TRIGGER IF EXISTS `triger_biGradiliste` $$ create trigger t...
true
5195c18c655e35c9c1e9fb9d0c2b19f40c0c8dc3
SQL
bkiers/sqlite-parser
/src/test/resources/selectB.test_8.sql
UTF-8
297
2.65625
3
[ "MIT" ]
permissive
-- selectB.test -- -- execsql { -- SELECT t4.c, t3.a FROM -- (SELECT c FROM t1 UNION ALL SELECT e FROM t2) AS t4, t1 AS t3 -- WHERE t3.a=14 -- ORDER BY 1 -- } SELECT t4.c, t3.a FROM (SELECT c FROM t1 UNION ALL SELECT e FROM t2) AS t4, t1 AS t3 WHERE t3.a=14 ORDER BY 1
true
4caea90c0ccccb52ebaece6d1cb284e520a026c1
SQL
oyaken0717/ec-201904b
/documents/sql/showAll.sql
UTF-8
889
3.234375
3
[]
no_license
--nsert into users(name, email, password, zipcode, address, telephone) values('テストユーザ', 'test3@test.co.jp', '$2a$08$8aflfwUJQeMv4PbHfib6tOko6sHg9IXixhNVbMlUJoaUx1lRbZA5K','1111111', 'テスト住所', 'テスト電話番号'); -- SELECT id,name, email, password, zipcode, address, telephone FROM users; -- SELECT id,name,description , price_m ,...
true
e5661768c55af2ce33aa14a0f39e78ce0147da9b
SQL
furstenheim/is_jsonb_valid
/sql/enum.v7.sql
UTF-8
3,662
2.90625
3
[ "MIT" ]
permissive
-- simple enum validation -- one of the enum is valid SELECT is_jsonb_valid_draft_v7('{"enum":[1,2,3]}', '1'); -- something else is invalid SELECT is_jsonb_valid_draft_v7('{"enum":[1,2,3]}', '4'); -- heterogeneous enum validation -- one of the enum is valid SELECT is_jsonb_valid_draft_v7('{"enum":[6,"foo",[],true,{"foo...
true
b776935b968b9e5f6dbdd69353293f477a0072ea
SQL
miccheng/hsg-door-api
/db/hsgdoor.sql
UTF-8
1,722
3
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 3.5.3 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Nov 11, 2012 at 06:40 PM -- Server version: 5.1.61 -- PHP Version: 5.3.3 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!...
true
6394cc2e7ffade45f9275baa2687daab40fcc073
SQL
talita20/outsideFood
/docs/servicos.sql
UTF-8
4,739
2.84375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.7.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: 06-Fev-2018 às 12:25 -- Versão do servidor: 10.1.28-MariaDB -- PHP Version: 7.1.10 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OL...
true
69b69aa7f23a05e3f8238a3ed647f0bf3a5a89d9
SQL
N4t4/GINGA
/src/GINGA 2.0/dc/GINGA2.sql
UTF-8
3,990
3.5625
4
[]
no_license
DROP TABLE IF EXISTS arquivos; DROP TABLE IF EXISTS membros_pendencias; DROP TABLE IF EXISTS pendencias; DROP TABLE IF EXISTS membros_projetos; DROP TABLE IF EXISTS projetos; DROP TABLE IF EXISTS enderecos; DROP TABLE IF EXISTS gerentes; DROP TABLE IF EXISTS chat; DROP TABLE IF EXISTS membros; DROP TABLE IF ...
true
e9a4277a72909ebac1634f83e16a351635699d9a
SQL
vinuPAbeywarna/DBMS
/ALL QS.sql
UTF-8
12,380
3.578125
4
[]
no_license
USE Library_Managment_System; -------------------create branch table----------------------- CREATE TABLE Branch ( Branch_ID char(10) NOT NULL, Branch_Name varchar(50) NOT NULL, Branch_Address varchar(100) NOT NULL, CONSTRAINT PK_BRANCHID_BR PRIMARY KEY (Branch_ID), ); ----------------------INSERT BRA...
true
e692ba495832ec95e88b62c1e739afdaa1f610cb
SQL
zvika77/zvika_env
/Redshift/Sql/show_monitor.sql
UTF-8
160
2.625
3
[]
no_license
-- show_monitor.sql % 1\ hour select * from adhoc.monitor_metrics_logs where metric_name ilike :1 and load_time > sysdate - interval :2 order by 1 desc ,2,4
true
157ec9a2e019a8bf3d90b1c9ac7d6c65ad4e098a
SQL
BrandonYuen/FlowTalk
/backups/sql_database/user.sql
UTF-8
87,255
2.640625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Gegenereerd op: 29 okt 2017 om 21:53 -- Serverversie: 10.1.13-MariaDB -- PHP-versie: 5.6.23 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;...
true
3dcb8e05afd1142e72b9fccff0707b28ef080227
SQL
VorobievMaksim/FlowerShop
/src/main/resources/db/migration/V1__CreateDB.sql
UTF-8
1,387
3.875
4
[]
no_license
CREATE TABLE IF NOT EXISTS "tb_users"( "id" INT NOT NULL AUTO_INCREMENT, "username" VARCHAR(255) NOT NULL UNIQUE, "password" VARCHAR(255) NOT NULL, "fullName" VARCHAR(255) NOT NULL, "address" VARCHAR(255) NOT NULL, "number" VARCHAR(255) NOT NULL, "balance" DECIMAL(8,2) DEFAULT 0, "discount" INT DEFAULT 0, "role" VARCHA...
true
b666700f3bae21e5bf752d4edcb99cfca24a57fe
SQL
reguluskinglet/netcore-cppk
/Core/Repositoryes/Sqls/Terminal/GetTrainTask.sql
UTF-8
177
2.8125
3
[]
no_license
SELECT t.RefId as Id, CarriageId, CreateDate, EquipmentModelId, TaskType, t.UserId,t.UpdateDate,t.Description,t.Id as TaskNumber FROM TrainTasks t --WHERE t.UpdateDate>@date
true
fc8a7e93970be3254308cb62ae60bf90130ceecc
SQL
silvanopessoa/adobeflex
/crm/java_src/br/com/crm/modelodados/ddl.relacionamentos_tabelas.sql
UTF-8
2,438
2.578125
3
[]
no_license
spool logs\ddl.relacionamento_tabelas.txt connect crm/crm -------------------------------------------------------------------------------- --------------------------- Data Definition Language --------------------------- -------------------------------------- DDL ------------------------------------- -----------------...
true
4a6f32d6e83effed28e254f140885fe088ab669e
SQL
Smiley-Alyx/commitete
/commitete_db.sql
UTF-8
9,500
3.171875
3
[ "BSD-3-Clause" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.8.3 -- https://www.phpmyadmin.net/ -- -- Хост: 127.0.0.1 -- Время создания: Ноя 08 2018 г., 06:39 -- Версия сервера: 10.1.36-MariaDB -- Версия PHP: 7.2.11 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHA...
true
a764c74522c8c47019d205799b284976d87fbe70
SQL
Rakesh-Bhatt/Smart-gadget
/Database/smartdb_table_tbl_admin.sql
UTF-8
593
2.6875
3
[]
no_license
-- -------------------------------------------------------- -- -- Table structure for table `tbl_admin` -- CREATE TABLE `tbl_admin` ( `id` int(11) NOT NULL, `username` varchar(250) NOT NULL, `password` varchar(250) NOT NULL, `status` tinyint(1) NOT NULL DEFAULT '0' ) ENGINE=InnoDB DEFAULT CHARSET=latin1; --...
true
b4e99658cb72db80bce9c3a4035b2385476dd785
SQL
zoiloreyes/Red-Social
/Database/indices.sql
UTF-8
1,147
2.953125
3
[]
no_license
CREATE INDEX idx1_usuario ON Usuario(primerNombre); CREATE INDEX idx2_usuario ON Usuario(primerApellido); CREATE INDEX idx3_usuario ON Usuario(primerNombre, primerApellido); CREATE INDEX idx4_usuario ON Usuario(nombreUsuario); CREATE INDEX idx1_telefono ON Telefono(idUsuario); CREATE UNIQUE INDEX idx2_telefono ON Tel...
true
2589f8286fe52d2ded134157d713f11c742d2715
SQL
kryvokhyzha/examples-and-courses
/kau-db-labs/02-lab/Counting Instances in Text/script.sql
UTF-8
178
3.046875
3
[ "MIT" ]
permissive
-- hard select word, count(1) as nentry from ( select regexp_split_to_table(contents, '\s') as word from google_file_store ) t where word in ('bull', 'bear') group by word
true
ba4e63593bbf784cc292bd5b5693b7d2d40223ea
SQL
gm7/canonical
/db/canonical.sql
UTF-8
37,215
3.0625
3
[]
no_license
-- -- PostgreSQL database dump -- -- Dumped from database version 10.9 (Debian 10.9-1.pgdg90+1) -- Dumped by pg_dump version 10.9 (Ubuntu 10.9-0ubuntu0.18.04.1) SET statement_timeout = 0; SET lock_timeout = 0; SET idle_in_transaction_session_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings =...
true
8ff95c3c7b56c4f91de0f111761a3bee35c1aadc
SQL
RCN/ncnca-db-transformer
/queries/get-all-events.sql
UTF-8
1,636
3.90625
4
[ "MIT" ]
permissive
events with start time and name select n.nid , evnt.event_start as startDate , td.name as eventType , n.title as name , l.name as locationName , l.street as locationStreet , l.additional as locationAdditional , l.city as locationCity , l.province as locationState , l.postal_code as locationZip , l...
true
6d0a42ea71e913fdf2ca49e3949c6f3d8e1713a5
SQL
gerenium/SQL
/2/36.sql
UTF-8
175
3.5
4
[ "MIT" ]
permissive
SELECT question_id, name_question FROM question JOIN subject USING(subject_id) WHERE name_subject = 'Основы баз данных' ORDER BY RAND() LIMIT 3
true
152ab342bd938c00ca31fa857ea8eaf918fb0036
SQL
arkasinha/recruitment-application
/recruitment-application/src/main/resources/schema.sql
UTF-8
310
2.578125
3
[]
no_license
create table job_offer ( job_title varchar(255) not null, start_date date, team_email varchar(255), primary key(job_title) ); create table job_application ( candidate_email varchar(255) not null, job_title varchar(255) not null, application_status varchar(255) not null );
true
b8e7840955fdc248e34534df74346860de913248
SQL
OHDSI/ETL-CDMBuilder
/executable/ETL/JMDC/Batch.sql
UTF-8
137
2.640625
3
[ "Apache-2.0" ]
permissive
SELECT DISTINCT {0} CAST(RIGHT([Member ID], LEN([Member ID]) - 1) AS BIGINT) AS person_id, [Member ID] FROM {sc}.Enrollment order by 1
true
a39e35019a2c970d8193c8d6a81be9b1e9e7b39a
SQL
SpringManCN/MVCDemo
/src/main/resources/db/db.sql
UTF-8
4,384
3.171875
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : rgbData Source Server Version : 50619 Source Host : 127.0.0.1:3306 Source Database : rgboa_db Target Server Type : MYSQL Target Server Version : 50619 File Encoding : 65001 Date: 2014-08-04 17:46:55 */ SET FOREIGN_KEY_C...
true
981f46d11cd6263448b3b88c3941e978aa6b4b21
SQL
qzuw/DER-tsoha-mirror
/sql/add_test_data.sql
UTF-8
3,161
2.734375
3
[]
no_license
-- Lisää INSERT INTO lauseet tähän tiedostoon INSERT INTO Kayttaja (id, tunnus, salasana) VALUES (1, 'Parranajaja', '$6$MviwXqizDwbnul3A$T3L3w1tLcIrJ1GASdiBc6ErzpIJN5wbZhwM5p0eEKsw/q9TTVbAWbDPOayzB1hXiNGCPPZsnpZ3i4Zax.HP6v1'); INSERT INTO Kayttaja (id, tunnus, salasana) VALUES (2, 'Partapekka', '$6$UiVYzUdGHNOpcF4l$R3U...
true
704eaf9112d060819d795c2cc39e88bf3266865c
SQL
nicklasjust/nordgrafisk
/nordgrafisk.sql
UTF-8
5,203
3.265625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.2.7.1 -- http://www.phpmyadmin.net -- -- Vært: 127.0.0.1 -- Genereringstid: 26. 05 2015 kl. 23:31:29 -- Serverversion: 5.6.20 -- PHP-version: 5.5.15 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; ...
true
7a117eb779d28bd68fed34169a943af2e2a4a566
SQL
patrinoua/socialnetwork
/database/friendships_class.sql
UTF-8
481
3.53125
4
[]
no_license
CREATE TABLE friendships( id SERIAL PRIMARY KEY, requester_id INTEGER NOT NULL, receiver_id INTEGER NOT NULL, status INTEGER NOT NULL, created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ) -- status -- 1 - pending -- 2 - accepted -- 3 - canceled -- 4 - terminated -- 5 - rejected UPDATE friendships SET ...
true
caa1d9800c7c05c1b6338b751fbc487d12d1eaad
SQL
hnsaavedraa/TallerSQL
/Query_6.sql
UTF-8
151
3.515625
4
[]
no_license
SELECT d.DEPARTMENT_NAME, COUNT(*) 'Quantity' FROM departments d INNER JOIN employees e ON d.DEPARTMENT_ID = e.DEPARTMENT_ID GROUP BY d.DEPARTMENT_ID;
true
c1c72042082ae19317d465fc83d14b02b191bd97
SQL
yanula20/Database_Exercises
/select_exercise.sql
UTF-8
663
3.28125
3
[]
no_license
USE `codeup_test_db;`; SELECT name AS 'The name of all albums by Pink Floyd' FROM albums WHERE artist = 'Pink Floyd'; SELECT release_date AS 'The year Sgt. Pepper''s Lonely Hearts Club Band was released' FROM albums WHERE artist = 'The Beatles' AND name = 'Sgt. Pepper''s Lonely Hearts Club Band'; SELECT genre AS 'The ...
true
d86d53dedce6252a71fc9456a9de784d4f356f00
SQL
ELHPCS/IC-Utility-Queries
/CustomStudent Example.sql
UTF-8
345
2.609375
3
[]
no_license
select * from CustomStudent where attributeID=606 --606 is just in here as a placeholder. Put whatever ID you want here to look at CustomStudent select * from CampusAttribute where name like '%searchForAttribute%' --to find a particular word in the attribute names, replace the 'searchForAttribute' text with the wor...
true
35801c1a1ac89ae8acdbff2e05b0223d8f65178e
SQL
brianleung24/cx_hack_gp5
/sql/gp5/hackaton_order_product.sql
UTF-8
2,386
2.890625
3
[]
no_license
-- MySQL dump 10.13 Distrib 5.7.12, for osx10.9 (x86_64) -- -- Host: localhost Database: hackaton -- ------------------------------------------------------ -- Server version 5.6.33 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; ...
true
8ca32a9bdba8b3886ae2775ba8b0ca0d03594bd8
SQL
jaavargasar/Database-Cibernetic-MySQL-Java
/CiberneticFinal project/SQL/Creacion.sql
UTF-8
80,980
3.734375
4
[]
no_license
#drop database cibernetic4; create database cibernetic4; use Cibernetic4; #drop database cibernetic; -- ----------------------------------------------------- -- Table `mydb`.`Product` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS Product ( `idProducti` INT NOT NULL AUTO_INCREME...
true
e1e57c17afa9795dab1085c641b58243ed9947ea
SQL
parimarjan/learned-cardinalities
/templates/higgs/6c.sql
UTF-8
359
2.84375
3
[]
no_license
SELECT COUNT(*) FROM higgs WHERE 'Xcol22' < higgs.col22 AND higgs.col22 <= 'Ycol22' AND 'Xcol23' < higgs.col23 AND higgs.col23 <= 'Ycol23' AND 'Xcol24' < higgs.col24 AND higgs.col24 <= 'Ycol24' AND 'Xcol25' < higgs.col25 AND higgs.col25 <= 'Ycol25' AND 'Xcol26' < higgs.col26 AND higgs.col26 <= 'Ycol26' AND 'Xcol28' < h...
true
b9618ef53259959e4070dba33ab0b1f8c9d6fa19
SQL
weihongji/sql
/sqlserver/query/primary_keys.sql
UTF-8
714
4.1875
4
[]
no_license
--https://dataedo.com/kb/query/sql-server/list-tables-with-their-primary-keys select tab.[name] as table_name, pk.[name] as pk_name, substring(column_names, 1, len(column_names)-1) as [columns] from sys.tables tab left outer join sys.indexes pk on tab.object_id = pk.object_id and pk.is_primary_key = 1 cross apply ( ...
true
34977724b73014cdd6dbb3805c238a110f4a9fb0
SQL
paul-rogers/drill-test-framework
/framework/resources/Datasources/hive_storage/orc/transactional.ddl
UTF-8
1,130
3.375
3
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
SET hive.txn.manager = org.apache.hadoop.hive.ql.lockmgr.DbTxnManager; SET hive.support.concurrency=true; SET hive.enforce.bucketing=true; SET hive.exec.dynamic.partition.mode=nonstrict; create database if not exists hive_orc_transactional; use hive_orc_transactional; DROP TABLE IF EXISTS `orc_table_clustered_buckete...
true
2d7b2555d666ef7d07d7e3eb17b18f69ef1ebb1e
SQL
huy75/WHR
/sql/whr_huy_import.sql
UTF-8
794
2.9375
3
[]
no_license
CREATE TABLE `whr` `Years` bigint(20) DEFAULT NULL, `Country` text, `HappinessRank` bigint(20) DEFAULT NULL, `HappinessScore` double DEFAULT NULL, `Economy` double DEFAULT NULL, `Family` double DEFAULT NULL, `Health` double DEFAULT NULL, `Freedom` double DEFAULT NULL, `Generosity` double DEFAULT NULL...
true
7db68ba21ba115eb4278533f133b693f0aec8652
SQL
lakshmi-urs/PortfolioProjects
/Covid19_case_study_ATA.sql
UTF-8
6,848
3.96875
4
[]
no_license
select * from PortfolioProject .. CovidDeaths where continent is not null order by 3,4 --select * --from PortfolioProject .. CovidVaccination --order by 3,4 -- Select data that we are going to be using Select location,date,total_cases,new_cases,total_deaths,population from PortfolioProject..CovidDeaths...
true
7d88ace930d33141555c3e461ddef50429d4cfb9
SQL
luizburatti/InfomoneyMaven
/query.sql
UTF-8
1,252
3.640625
4
[]
no_license
Create database infomoney; create table values_cotation( id int primary key auto_increment, code varchar(255), name varchar(255), price varchar(255), buying varchar(255), selling varchar(255), variation_low varchar(255), variation_high varchar(255) ); create table user( id int primary key auto_increment, name varcha...
true
4a6647a59c49a66ce7adcec777ccb1ca9b3ab225
SQL
vcka/CA_Databases
/hibernatetutorial/src/main/resources/sql/tables.sql
UTF-8
3,053
3.6875
4
[]
no_license
drop table if exists Contact; drop table if exists Employee; drop table if exists Branch; drop table if exists Company; drop table if exists Address; drop table if exists Expense; drop table if exists Salary; drop table if exists Person; create table Person ( ID INT PRIMARY KEY AUTO_INCREMENT, NAME VARCHAR(30), ...
true
3a2ba40f15d9521cfcf2582090ca7947328f77ca
SQL
Lucyhou/sqlleetcode
/q1069 Product Sales Analysis II.sql
UTF-8
2,145
4.5625
5
[]
no_license
/*1069 Question: Question: Table: Sales +-------------+-------+ | Column Name | Type | +-------------+-------+ | sale_id | int | | product_id | int | | year | int | | quantity | int | | price | int | +-------------+-------+ sale_id is the primary key of this table. product_id is a fore...
true
43f68e1eb632134357d2ae44e32e5b966acf2e79
SQL
DEATHAPOSTLE/onlineBookStore
/WebContent/sql/user.sql
UTF-8
1,621
2.65625
3
[]
no_license
/* SQLyog Ultimate v12.08 (64 bit) MySQL - 5.7.17-log ********************************************************************* */ /*!40101 SET NAMES utf8 */; create table `user` ( `userId` int (11), `userName` varchar (135), `userPassword` varchar (135), `userType` varchar (135), `userPhoneNumber` varchar (135), `...
true
9d8f23a1c9d015016da7bc42ab4452a91e2f7237
SQL
Khachatur12/essence
/src/main/resources/db/migration/V1__Data_user.sql
UTF-8
710
3.796875
4
[]
no_license
drop table if exists user_roles; drop table if exists roles; drop table if exists users; create table users ( name varchar(50) not null, password varchar(255) not null, phone varchar(20) not null, primary key (name) ) engine = InnoDB; create table roles ( id int not null auto_i...
true
de4824bbd29e723f0d3510d164a2f38ca840bfb8
SQL
a100531/FoodShare
/foodshare.sql
UTF-8
3,529
2.921875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.7.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Feb 01, 2018 at 09:29 PM -- Server version: 10.1.28-MariaDB -- PHP Version: 7.1.11 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OL...
true
6271473c7bfe7ac3865a057bac95b1a31f09b3e7
SQL
kfajarf/biolims
/beforeNestedDynamicForm.sql
UTF-8
31,474
3.09375
3
[ "BSD-3-Clause" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.7.0 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jul 07, 2017 at 03:25 PM -- Server version: 10.1.21-MariaDB -- PHP Version: 7.0.6 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
true
49a7c74107f0cfd9b1c6d50441f49126925a47af
SQL
mag-da-lenka/hyf-homework
/databases/week1/db1-homework-my_squirrel.sql
UTF-8
2,831
4.28125
4
[]
no_license
-- Hello My_SQuirreLs, here is my homework ---> databases-1 (a.k.a. week 15) ---> Magda /HYF#12 USE db1_lesson_data; -- 01 -- Find out how many tasks are in the task table: SELECT count(id) AS `number_of_tasks_in_task_table` FROM task; -- 02 -- Find out how many tasks in the task table do not have a valid due d...
true
b7b0b952da8bcb1ded8636f879ca47fcd7ab5921
SQL
yeningxi/novel
/book.sql
UTF-8
24,348
3.046875
3
[ "MIT" ]
permissive
-- MySQL dump 10.13 Distrib 5.5.58, for Win64 (AMD64) -- -- Host: localhost Database: books -- ------------------------------------------------------ -- Server version 5.5.58 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!401...
true