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
8983855ac27e258dcf02e4ba2a4bd389da59fb21
SQL
silence-do-good/stress-test-Postgres-and-MySQL
/dump/high/day28/select0205.sql
UTF-8
178
2.625
3
[]
no_license
SELECT timeStamp, temperature FROM ThermometerOBSERVATION o WHERE timestamp>'2017-11-27T02:05:00Z' AND timestamp<'2017-11-28T02:05:00Z' AND temperature>=15 AND temperature<=23
true
9dfa5204b2ab0b784bc4831796973c1e61912d63
SQL
Ol1verZZZ/StarrySky
/Server_Side/databaseclassfinal.sql
UTF-8
31,495
2.921875
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : bendi Source Server Version : 80017 Source Host : localhost:3306 Source Database : databaseclassfinal Target Server Type : MYSQL Target Server Version : 80017 File Encoding : 65001 Date: 2020-01-05 14:02:30 */ SET FOREIGN_KEY_CHECKS=0...
true
728845e457401d2d337e83573143575f00c90f8a
SQL
datoshuila/educacion
/sql/poblacion_edad_escolar.sql
UTF-8
431
3.734375
4
[]
no_license
-- Query para obtener la población en edad de estudio por municipio, año y rango SELECT m.mun_nombre as "Municipio" , p.ped_anio as "Ano" , pe.pes_nombre as "Rango" , p.ped_num_poblacion_escolar as "Poblacion" FROM "Educacion"."poblacion_edad_escolar" as p LEFT JOIN "Educacion"."poblacion_escolar" as pe on pe.pes...
true
8a9f7a5accd3ae7a1c5259d755038efd31c1c9ef
SQL
egreenius/dbms
/lesson6_hw_3.sql
UTF-8
2,876
4.40625
4
[]
no_license
/* Подсчитать общее количество лайков, которые получили 10 самых молодых пользователей. Задача состоит в поиске общего кол-ва лайков, которые получили (именно ПОЛУЧИЛИ, а не отправили) 10 самых молоых пользователей. То есть нужно посчитать, количество лайков отправленных сообщений и опубликоыанных постов 10 самых мол...
true
910a6f096bf7a25aa39e54198ae5ae0a03010891
SQL
danilodesouzapereira/plataformasinap_exportaopendss
/Fontes/BD/Rede/BaseAccess/Consultas/SPSNP_dlEstudoEquip_p12.sql
UTF-8
470
2.96875
3
[]
no_license
DELETE FROM Carga WHERE intEstudoId = [p_EstudoId] AND intCargaId IN ( SELECT Equipamento.intEquipId FROM Equipamento INNER JOIN Carga EqpAux ON Equipamento.intEstudoId = EqpAux.intEstudoId AND Equipamento.intEquipId = EqpAux.intCargaId WHERE Equipamento...
true
0bac7e0fb263ff8bcf691261259e7baae4dd0d77
SQL
fangz7/schedule
/data.sql
UTF-8
764
3.015625
3
[]
no_license
DELETE FROM schedule; DELETE FROM course; DELETE FROM student; DELETE FROM teacher; INSERT INTO student (sn, no, name) VALUES (101, 'S001', '信息01'), (102, 'S002', '信息02'), (103, 'S003', '土地01'), (104, 'S004', '土地02'); INSERT INTO teacher (sn, no, name) VALUES (101, 't001', '陈老师'), (1...
true
251c880124d63a44b5378c5204e4bb27872d976f
SQL
CaymanJava/crypto-analyzer
/entry-point/src/main/resources/liquibase/009_add_last_positions_to_member_strategy.sql
UTF-8
444
3.015625
3
[]
no_license
CREATE TABLE crypto_member_strategy.member_strategy_position ( member_strategy_id BIGSERIAL NOT NULL, position CHARACTER VARYING(15), CONSTRAINT member_strategy_id_fkey FOREIGN KEY (member_strategy_id) REFERENCES crypto_member_strategy.member_strategy (id) MATCH SIMPLE ON UPDATE NO...
true
87f6c6d2ae2bfa4dff1d3d94f5d87892e66f22a8
SQL
devtayyab/OnlineDAB
/OnlineDAB/onlinedab.sql
UTF-8
5,034
3.1875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Mar 19, 2020 at 07:47 AM -- Server version: 10.4.11-MariaDB -- PHP Version: 7.3.14 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OL...
true
bdaa11499231557adf01a5827fe5360dca47080f
SQL
fahimalnoor/java_bus_management
/test.sql
UTF-8
4,277
3.375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.7.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Dec 16, 2018 at 08:11 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
f279a690da82171c5d1f603caaa13e9e4ad9e49e
SQL
Aakash-suthar/Hospital-Management-System
/WPFSutharAkash.sql
UTF-8
1,943
3.140625
3
[]
no_license
use [20June Dot NetBatch] create schema [187057_Akash_Akash_Akash] select * from [187057_Akash_Akash_Akash].patients; insert into [187057_Akash_Akash].doctors values(1,'Akash','aids'); insert into [187057_Akash_Akash].doctors values (2,'Saras','obesity'); create table [187057_Akash_Akash].logintable(id int prima...
true
c93df8db6ea490c442aa7a3b4cbaac29a8f111b1
SQL
rifan75/Whapp
/database/warehouse.sql
UTF-8
3,533
2.78125
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.7.9 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: Nov 19, 2018 at 09:24 AM -- Server version: 5.7.24-0ubuntu0.16.04.1 -- PHP Version: 7.1.20-1+ubuntu16.04.1+deb.sury.org+1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET t...
true
82ab2b8e237b51906ca764b696ff88e8a6e1ac72
SQL
purvanovv/diploma-work-repository
/carsell_db/sys/CREATE_PROFILE.sql
UTF-8
834
3.15625
3
[]
no_license
define profile2create=&&1 -- set serveroutput on size unlimited set verify off -- declare cursor c1 is select * from dba_profiles where PROFILE = upper('&&profile2create') ; dynsql varchar2(2000); v_loc_count number; procedure exec_st ( p_sql in varchar2) as begin execute immediate p_sql; ...
true
66e05add52b2e0586fc3ba4c0f5cc06401d62045
SQL
geosolutions-it/clevmetro-nfd
/docs/ITIS_DB/SQL_files/species.sql
UTF-8
783
3.671875
4
[ "BSD-2-Clause" ]
permissive
CREATE EXTENSION tablefunc; SELECT t.* FROM crosstab( 'SELECT tsn, complete_name, rank_id, parent_tsn, rn, vernacular_name FROM ( SELECT u.tsn, u.complete_name, u.rank_id, u.parent_tsn, v.vernacular_name, row_number() OVER (PARTITION BY u.tsn ORDER BY vern_id ASC N...
true
0dd007de51f61518384db3fc499f8b9167b22117
SQL
RITCHATOU-MBENA-CHARLOTTE/PROJET-2-REQUETE-EN-LIGNE-EN-INGENIERIE-WEB
/tpgroupe2.sql
UTF-8
2,493
3.359375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Hôte : 127.0.0.1:3306 -- Généré le : ven. 28 mai 2021 à 19:37 -- Version du serveur : 5.7.26 -- Version de PHP : 7.2.18 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET...
true
fadaf89ee133e34b6e8b5c1e173657755031f6be
SQL
c3RyZWV0dHVydGxlCg/booapp
/src/main/resources/data-local.sql
UTF-8
946
2.90625
3
[]
no_license
insert into clinic(DESCRIPTION, NAME) values ('Just a clinic', 'Princeton Plainsboro Clinic'); insert into time_slot(start, end) values ('08:00:00', ' 08:15:00'), ('08:15:00', ' 08:30:00'), ('08:30:00', ' 08:45:00'), ('08:45:00', ' 09:00:00'), ('09:00:00', ' 09:15:00'); insert into patient...
true
68985d4dad09c82a8064d7c744165c815e5893b8
SQL
osinagalj/COS_REST
/src/main/resources/data.sql
UTF-8
1,389
2.640625
3
[]
no_license
INSERT INTO herd(location) VALUES('primer herd'); INSERT INTO herd(location) VALUES('segundo herd'); INSERT INTO herd(location) VALUES('tercer herd'); INSERT INTO herd(location) VALUES('cuarto herd'); INSERT INTO cow(herd_id,eletronic_id,born_date,last_due_date,deliveries,weigth) VALUES(1,1,'2019-11-07','2021-03-27',1...
true
edc86b4ddf00172fcc5a0ec4f3caea721633c59d
SQL
sebrown0/SUK
/database/pension_test/sql/functions/fHas_Emp_Been_Assessed.sql
UTF-8
392
3.0625
3
[]
no_license
CREATE DEFINER=`root`@`localhost` FUNCTION `has_emp_been_assessed`(eCode VARCHAR(20)) RETURNS tinyint(4) DETERMINISTIC BEGIN DECLARE hasBeenAssessed TINYINT DEFAULT 0; SELECT COUNT(*) INTO hasBeenAssessed FROM employee_assessment WHERE emp_pension_id = get_pension_id_for_emp_code(eCode) ...
true
18fe15d625d3375883c1e19a3c538105003e2717
SQL
stPhoenix/kursova_bd
/informsystem/schema.sql
UTF-8
1,531
3.734375
4
[]
no_license
CREATE TABLE F_Type ( F_Type_ID SERIAL PRIMARY KEY , F_Type_Name VARCHAR NOT NULL ); CREATE TABLE F_Maker ( F_Maker_ID SERIAL PRIMARY KEY, F_Maker_Name VARCHAR NOT NULL ); CREATE TABLE F_Set ( F_Set_ID SERIAL PRIMARY KEY, F_Set_Name VARCHAR NOT NULL ); CREATE TABLE F_Material ( F_Material...
true
df46e2c8e27db116138ac991503425817587ddd1
SQL
maciekbogusz/FamilyTreePython
/src/queries.sql
UTF-8
1,278
3.703125
4
[]
no_license
create table individuals( id serial primary key, first_name varchar(25), last_name varchar(40), date_of_birth date, date_of_death date ); --not used create table relationships_types( relationship_type_code serial primary key, relationship_type_description varchar(40) ); create table roles( role_code serial pri...
true
955a7f09ab958ccf1c90755ac33f0fef9626d5c6
SQL
IamIknow/BIE-DBS
/Queries.sql
UTF-8
7,800
4.5625
5
[]
no_license
--Simple (positive) query with at least two joined tables (list of patients - name, address who were examined by doctor Braun) --Select names of employees who work in Dejvicka shop --d1 SELECT employee.NAME,employee.surname FROM employee JOIN shop ON (employee.sid=shop.sid) WHERE (shop.address = 'Dejvicka'); --B d6 ...
true
ff2b210f492a192386b9a4efe3962f7d9d7591b9
SQL
howq/accout
/account_bymarx/wp_xh.sql
UTF-8
29,672
3.109375
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : localhost Source Server Version : 50714 Source Host : localhost:3306 Source Database : wp_xh Target Server Type : MYSQL Target Server Version : 50714 File Encoding : 65001 Date: 2017-11-04 01:46:52 */ SET FOREIGN_KEY_CH...
true
4de8bb66ff34ba584a812ef84b81cc10b55fdfda
SQL
silence-do-good/stress-test-Postgres-and-MySQL
/dump/low/day18/select1924.sql
UTF-8
191
2.75
3
[]
no_license
SELECT timeStamp, temperature FROM ThermometerObservation WHERE timestamp>'2017-11-17T19:24:00Z' AND timestamp<'2017-11-18T19:24:00Z' AND SENSOR_ID='35408512_fc7c_4f9c_a220_278f56437ccc'
true
2e6cc28196c38214aefc4d940a54146d68513b4f
SQL
lele-110/SpringBootMaven
/src/main/resources/data/springboot.sql
UTF-8
4,660
2.9375
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : 本地数据库mysql Source Server Version : 50714 Source Host : localhost:3306 Source Database : springbootmaven Target Server Type : MYSQL Target Server Version : 50714 File Encoding : 65001 Date: 2016-08-07 16:00:37 */ SET FOREIGN_KEY_CHECKS...
true
e1d9c6468e228a7e2395c7147ce4944040e42e73
SQL
guoruibiao/todolist
/20180516-fortodolist.sql
UTF-8
4,490
3.25
3
[]
no_license
-- MySQL dump 10.13 Distrib 5.7.21, for Linux (x86_64) -- -- Host: localhost Database: fortodo -- ------------------------------------------------------ -- Server version 5.7.21-0ubuntu0.16.04.1 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SE...
true
0be32913325a7e5aacdc3a4812946813ebe4ab1e
SQL
notSalt/moviebook
/setup.sql
UTF-8
4,756
4
4
[ "MIT" ]
permissive
-- Categories Table CREATE TABLE categories ( category_id INT(11) NOT NULL AUTO_INCREMENT, category_name VARCHAR(255), PRIMARY KEY (category_id) ); -- Movies Table CREATE TABLE movies ( movie_id INT(11) NOT NULL AUTO_INCREMENT, movie_name VARCHAR(255), release_date DATE, studio VARCHAR(255), category_i...
true
bdb835dd283dee4391598d1a0f6e624363879a47
SQL
todmst/gzprmbnk
/create_tables.sql
UTF-8
687
3.5625
4
[]
no_license
CREATE TABLE message ( created TIMESTAMP NOT NULL, id VARCHAR(255) NOT NULL, int_id CHAR(16) NOT NULL, str VARCHAR(1000) NOT NULL, address VARCHAR(1000), status TINYINT(1), CONSTRAINT message_id_pk PRIMARY KEY(id) ); CREATE INDEX log_address_idx ON message(address); CREATE INDEX message_create...
true
b07cb2afe1063a758be7f722f94e7b15a3eb9dd7
SQL
mrinalraj2809/Interview_prep_DeCoders
/SQL/BasicSelect/EmployeeName.sql
UTF-8
188
3.515625
4
[]
no_license
//Write a query that prints a list of employee names (i.e.: the name attribute) from the Employee table in alphabetical order. ```sql select name from employee order by name ASC; ```
true
df9264aa47f73c7cf643c8b3e8fbbe6c5ccfcd74
SQL
boyddensmore/Maximo-Oracle-SQL-Public
/People, Users, and Security/User activity over time.sql
UTF-8
13,401
4.125
4
[]
no_license
/******************************************************************************* * Compare number of completed WO, May to August, 2018 vs 2019 *******************************************************************************/ select monthlystats.vesstermid, 'WO' rectype, to_char(monthlystats.changemonth, 'yyyy'...
true
c793660bb559c988ceb0f513188fb62f8a75ed52
SQL
mukisabonface/senteApp
/documentation/senteapp_db.sql
UTF-8
18,371
3.25
3
[]
no_license
-- MySQL dump 10.13 Distrib 8.0.17, for Win64 (x86_64) -- -- Host: 127.0.0.1 Database: senteapp_db -- ------------------------------------------------------ -- Server version 8.0.17 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;...
true
a51a79b1609cd3a4fc1cbd44cd1e2cd3534bc936
SQL
nikamachi3/shpargalka
/G_PHP-master/G_PHP-master/shualeduri-master/davaleba/training.sql
UTF-8
1,662
3.03125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Apr 23, 2020 at 04:20 PM -- Server version: 10.4.11-MariaDB -- PHP Version: 7.4.2 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
true
3f79401ca86b659e6246b8d1f82c38a5190a0e6f
SQL
Swifter-n/webDesignSocialMedia
/db/tugas.sql
UTF-8
1,752
3.03125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: 08 Apr 2016 pada 05.44 -- Versi Server: 10.1.9-MariaDB -- PHP Version: 5.6.15 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT ...
true
f62572e747425de024804406f1eef5918e1d4f70
SQL
silence-do-good/stress-test-Postgres-and-MySQL
/dump/high/day08/select0849.sql
UTF-8
267
3.15625
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['5221','2004','5231','6076','1420','5219','4069','3081','5069','4089'])
true
53c69dfe5764ad4191234e52b1b67bcf2b52510e
SQL
sebvtec/projet_pro
/src/bdd.sql
UTF-8
6,726
3.046875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.2 -- https://www.phpmyadmin.net/ -- -- Hôte : 127.0.0.1 -- Généré le : lun. 07 jan. 2019 à 15:22 -- Version du serveur : 10.1.34-MariaDB -- Version de PHP : 7.2.8 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101...
true
804dda153a7b85d01375ce7ea4e3188b3750f2c0
SQL
asparagus/Spot-It
/Base de Datos/Scripts Base de Datos/Antiguo/init.sql
UTF-8
6,226
3.703125
4
[]
no_license
CREATE TABLE Usuario( id int IDENTITY(1,1), nombre nvarchar(60), apellido nvarchar(60), mail nvarchar(60), apodo nvarchar(60), fecha_registro datetime DEFAULT(getdate()), numComentarios int, numFotos int, numSugerenciasLugares int, numEventosCreados int, numEventosAsistidos int, numFavoritos int, numGenteInvitada int, ...
true
c0abb6986b8b7ebc0a608089bc1640ce7e60d100
SQL
islovatik/OpenTrainCommunity
/simple/train/data/views.sql
UTF-8
862
3.953125
4
[]
no_license
DROP VIEW IF EXISTS delays; DROP VIEW IF EXISTS last_delay_view; DROP VIEW IF EXISTS max_delay_with_stop_view; DROP VIEW IF EXISTS max_delay_view ; CREATE VIEW last_delay_view as select S.trip_id,S.stop_id,S.delay_arrival as last_delay from data_sample as S where S.is_last and S.valid; CREATE VIEW max_delay_...
true
106bb3a88040da415997d8e2d904d995563fcfc8
SQL
oy-vey/DWBI3
/Assignment3/Query2.sql
UTF-8
647
4.25
4
[]
no_license
--Query 2: Ranking within a partition -- --Use the RANK function to rank customers in descending order by the sum of extended cost for shipments (transaction type 5). --You should partition the rank values by customer state. The result should include the customer state, customer name, sum of the extended cost, and ...
true
a9647c46a55d250f539ea061adeb9bde4d0e5af1
SQL
adamGrob/abstractclassics-labourent
/src/main/resources/sqlInserts/fillwithData.sql
UTF-8
5,047
2.640625
3
[]
no_license
-- -- PostgreSQL database dump -- -- Dumped from database version 10.5 (Ubuntu 10.5-0ubuntu0.18.04) -- Dumped by pg_dump version 10.5 (Ubuntu 10.5-0ubuntu0.18.04) SET statement_timeout = 0; SET lock_timeout = 0; SET idle_in_transaction_session_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings...
true
a605bfb786522973e4e5ab41e0d3d49eb6509333
SQL
HugoL/promos
/protected/data/tbl_compras.sql
UTF-8
1,913
3.34375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.0.9 -- http://www.phpmyadmin.net -- -- Servidor: localhost -- Tiempo de generación: 16-12-2013 a las 13:50:51 -- Versión del servidor: 5.6.15-log -- Versión de PHP: 5.2.17 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CH...
true
f51effca3a7fee0c330e950915d7a642d70e2a6c
SQL
CrossNJU/PASS
/Public/database.sql
UTF-8
6,310
3.328125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.4.10 -- http://www.phpmyadmin.net -- -- Host: localhost:3306 -- Generation Time: 2016-04-13 09:20:29 -- 服务器版本: 5.5.42 -- PHP Version: 5.6.10 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101...
true
27aed992c190e479202ef9134c97ebaff9f9da33
SQL
joshborup/company-tracker
/db/read/html_by_student_id.sql
UTF-8
296
3.328125
3
[]
no_license
select html_css_competencies.id, student_id, passed, notes, html_css_competencies.competency_name from html_css_status join html_css_competencies on(html_css_competencies.id = html_css_status.comp_id) JOIN students on (students.id = html_css_status.student_id) WHERE students.id = $1 order by id;
true
89d266f6624f26a1d11bd370b0e45d4722132507
SQL
healthandfitness/basic
/user.sql
UTF-8
3,220
2.8125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.2.11 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Aug 10, 2015 at 07:38 AM -- Server version: 5.6.21 -- PHP Version: 5.6.3 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; ...
true
104c3cb80a7df52bc40ba8beac0416a9f2779e5c
SQL
dhwani-bhatt01/sparks-foundation
/sparks_foundation.sql
UTF-8
3,313
3.234375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Dec 21, 2020 at 11:54 AM -- Server version: 10.4.16-MariaDB -- PHP Version: 7.4.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIE...
true
75c9da560bdb7b8b4e9e0b23a90db36273ec8245
SQL
bjy3392/SQL_PRACTICE
/4.sql
UTF-8
399
3.734375
4
[]
no_license
SELECT DRUG_CONCEPT_ID, MIN(DRUG_EXPOSURE_START_DATE) AS START_DATE, --처음 시작일 MAX(DRUG_EXPOSURE_END_DATE) AS END_DATE, --마지막 종료일 MAX(DRUG_EXPOSURE_END_DATE) - MIN(DRUG_EXPOSURE_START_DATE) +1 AS 복용일 FROM DRUG_EXPOSURE WHERE PERSON_ID = '1891866' GROUP BY DRUG_CONCEPT_ID ORDER BY MAX(DRUG_EXPOSURE_...
true
30de1133b6a3015cecdd00dd454fecf0f0571772
SQL
vijaydairyf/TimelyFish
/CentralData/dbo/Views/dbo.vPigMovementDestination.sql
UTF-8
220
3.0625
3
[]
no_license
CREATE VIEW dbo.vPigMovementDestination AS Select Distinct c.ContactID,ContactName from dbo.Contact c JOIN dbo.ContactRoleType r on c.ContactID= r.ContactID where r.RoleTypeID in (3,18,20,4) UNION Select 9999,''
true
6c94eca9b4b69a98ba13186586eec28cc2ed8ce8
SQL
pacmad/Theatre
/MovieFix.sql
UTF-8
17,024
3.046875
3
[]
no_license
-- MySQL Administrator dump 1.4 -- -- ------------------------------------------------------ -- Server version 5.5.5-10.4.11-MariaDB /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_...
true
d1e6a70e53d2c4db204af469409f85e69dc92d03
SQL
achicha/otus-de-2020-02
/dbt_project/target/compiled/crimes_in_boston/marts/lookup/lk_crime_type.sql
UTF-8
237
2.9375
3
[]
no_license
with offense_codes as ( select * from "postgres"."dbt"."stg_offense_codes" ), final as ( select offense_code_id ,split_part(offense_code_name, ' ', 1) as crime_type from offense_codes ) select * from final
true
5c63d221c88717bdb785c6f84507cbfe29e57d90
SQL
marcdubybroad/DevNotes
/Source/Sql/Burden/NewSampleSchema/2018042319k/create19kSampleTable.sql
UTF-8
611
2.71875
3
[]
no_license
-- smaller table drop table if exists SAMPLE_19k_20180423_with_adj; create table SAMPLE_19k_20180423_with_adj AS select ID, t2d, T2D_readable, SEX, SEX_readable, Age, DBP_ANAL as DBP_ADJ, DBP, SBP_ANAL as SBP_ADJ, SBP, FAST_GLU_ANAL as FAST_GLU_ADJ, FAST_GLU as FAST_GLU, FAST_INS_ANAL as FAST_I...
true
1caaa64deb77f8b2d24762aa12ab4e696bdc7f89
SQL
yakiris/20200213_Database
/05_dz/07.sql
UTF-8
478
3.4375
3
[]
no_license
#2. Подсчитайте количество дней рождения, которые приходятся на каждый из дней недели. #Следует учесть, что необходимы дни недели текущего года, а не года рождения. SELECT DATE_FORMAT(DATE(CONCAT_WS('-', YEAR(NOW()), MONTH(birthday_at), DAY(birthday_at))), '%W') AS day, COUNT(*) AS total FROM users GROUP BY d...
true
afd94dbec12bc0257fd1ccc113ca87a8045231cc
SQL
geegog/edusoft
/Dump20181104.sql
UTF-8
8,209
3.140625
3
[]
no_license
-- MySQL dump 10.13 Distrib 8.0.12, for Win64 (x86_64) -- -- Host: localhost Database: skoolkivedb -- ------------------------------------------------------ -- Server version 8.0.12 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;...
true
fcead5b04957298207d55839144f1d8b79afd74b
SQL
amfz/fosspoc
/make_ped_network.sql
UTF-8
579
3
3
[]
no_license
/*Create an approximation of the TED pedestrian network from lion17a assumes source, target columns already created*/ DROP TABLE IF EXISTS lionped; CREATE TABLE lionped AS SELECT * from lion17a WHERE featuretyp IN ('0', '6', 'A', 'C', 'W') AND nodelevelf NOT IN ('*', '$') AND nodelevelt NOT IN ('*', '$')...
true
fc1e9dae947f091addd5908f84f0c214abc3d7bf
SQL
baodai1207/SQL-Tutorial
/Section5-JOIN/left_outer_join.sql
UTF-8
148
3.203125
3
[]
no_license
SELECT film.film_id, title, inventory_id, store_id FROM film LEFT JOIN inventory ON inventory.film_id = film.film_id WHERE inventory.film_id IS NULL
true
ce034dfd4ac27e010a0bcb9b2d1387e673788963
SQL
hector4213/watowatch
/schema/seeds.sql
UTF-8
3,435
3.296875
3
[]
no_license
TRUNCATE TABLE movies RESTART IDENTITY CASCADE; /* Clears movies and already cleared movie_list_items */ TRUNCATE TABLE users RESTART IDENTITY CASCADE; /* Clears movie_lists, movie_buddies, movie_list_items */ INSERT INTO users(first_name, last_name, email, password) VALUES('Micheal', 'Jordan', 'bulls@chicago.com',...
true
30cc7b370bc2b38347f659ac7718453942391678
SQL
feelopk/Thinkful
/M11.7_Q3.sql
UTF-8
431
3.8125
4
[]
no_license
--What time of year is the cheapest time to go to San Francisco? --What about the busiest? WITH sfc AS( SELECT listing_id, calender_date, price FROM sfo_calendar ), sfl AS( SELECT id, name, room_type, price FROM sfo_listings ) SELECT sfc.listing_id, sfl.id, sfl.name, sfc.calender_date, sfl.room_t...
true
7d2ba44832c4f8bf1990da40e39a1ec6740a9759
SQL
omarinccjcc/Sms
/SmsCore/bin/test/java/script.sql
UTF-8
1,110
3.21875
3
[]
no_license
CREATE TABLE AccessApp( id BIGINT(20) NOT NULL AUTO_INCREMENT, imei VARCHAR(20) NOT NULL, dateIni TIMESTAMP NULL, dateEnd TIMESTAMP NULL, statusAccessApp VARCHAR(20) NOT NULL, PRIMARY KEY (id) ); CREATE TABLE UserSystem ( id BIGINT NOT NULL AUTO_INCREMENT, login VARCHAR(15) N...
true
3f4a8358408121f5cfadd89d6fd67818e052dd2f
SQL
yeco96/examenF_AWS
/AllBook/libro/tabla.sql
UTF-8
641
3.3125
3
[]
no_license
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; CREATE TABLE IF NOT EXISTS `libro` ( `id` int(11) NOT NULL, `codigo` varchar(45) CHARACTER SET latin1 NOT NULL, `descripcion` varchar(45) CHARACTER SET latin1 DEFAULT NULL, `tipo` varchar(15) CHARACTER SET latin1 DEFAULT NULL, `fechaIngres...
true
2b3300f9949e7ebd103e576ad2feef5b4847796e
SQL
kimhongsik33/plsql
/No12_5.sql
SHIFT_JIS
707
2.515625
3
[]
no_license
--No12-5.tB[hׂẴtB[hɏ邽߁AgpҒ`FUNCTIONgpB SET SERVEROUTPUT ON DECLARE TYPE emp_rec IS RECORD( empno emp.empno%TYPE, ename emp.ename%TYPE ); v_emp emp_rec; FUNCTION make_emp_rec(a_empno emp.empno%TYPE, a_ename emp.ename%TYPE) RETURN emp_rec IS v_rec emp_rec; BEGIN v_rec.em...
true
2155879bfd826a7d35e4fd3e0bcd15c94bbeb02d
SQL
xtremeelement/nodeEMS_app
/Assets/schema.sql
UTF-8
818
4.09375
4
[]
no_license
drop database if EXISTS employees_db; CREATE DATABASE employees_db; USE employees_db; create table employee ( employee_id int primary key not null auto_increment, first_name varchar(30), last_name varchar(30), role_id int, manager_id int, foreign key (role_id) REFERENCES role(role_id), foreig...
true
f1ed0d1dc271512e6c925291bffe381e7eddce0c
SQL
majdbk/Homebell-Internship
/Project Code/ETL scripts/Script_5__05_event_session_map.sql
UTF-8
4,823
4.1875
4
[]
no_license
-- EVENT SESSION MAPPING PART A (stage) -- reference http://discourse.snowplowanalytics.com/t/reconciling-snowplow-and-google-analytics-session-numbers/80 -- ways to be a new session -- 1) timeout - last event was 1800 secs ago (this is the default domain_sessionid split) -- 2) new day - last session was date_t...
true
650911aa5844a45644da6c8c62ca92b32e1504fc
SQL
george47-crypto/new-java-project
/Checkpoint 1/Part_G.sql
UTF-8
351
2.953125
3
[]
no_license
/**TODO 1: Find the number of bookings done by each user. Display the results in a descending order of the number of bookings done by users. If a user has not done any bookings show the number of bookings as 0. The result should contain 2 columns - 1. User Id 2. Number of Bookings - showing the number of bookings don...
true
ea22423cf5c22956c31311b933ff22ab87550f48
SQL
boyisire/Bank_Software_Coding
/Brilliance/switch/sql/sw_pgsql.sql
UTF-8
8,975
3.078125
3
[]
no_license
-- ============================================================ -- Database name: MODEL_2 -- DBMS name: ORACLE Version 7.x -- Created on: 101-3-24 11:08 -- ============================================================ ...
true
ddf61c9dda5541ef6318b0da6637b337687a816d
SQL
vapawar/ora
/Randoms/test2.SQL
UTF-8
1,171
3.421875
3
[]
no_license
CREATE TABLE TEST2 ( ID NUMBER, NAME VARCHAR2(20), MARKS NUMBER ); DROP TABLE TEST2; INSERT INTO TEST2(ID,NAME, MARKS) VALUES(12,'AJAX',86); TRUNCATE TABLE TEST2; DESC TEST2; ALTER TABLE TEST2 ADD TEST2 NUMBER;--add new column ALTER TABLE TEST2 DROP COLUMN TEST2;--drop column ALTER TABLE TEST2 ADD TEST2...
true
93405918a42c83fd56c7cdd4ae0bd74206a252b3
SQL
niharparikh/EmoryCS
/CS377/Project2/npari22-project2-2-c.sql
UTF-8
2,091
4.625
5
[]
no_license
/* THIS CODE IS MY OWN WORK, IT WAS WRITTEN WITHOUT CONSULTING CODE WRITTEN BY OTHER STUDENTS. Nihar Parikh */ /* • actor(id, fname, lname, gender) – id = unique identifier for each actor – fname = first name of the actor – lname = last name of the actor – gender = gender of the actor This relation contains infor...
true
9a1c79b7aa3c4f464dfa337b6898cb354735671f
SQL
holiday96/SOF303-AB_SD
/SOF303-AB_SD/database/ab_sd.sql
UTF-8
17,513
3.375
3
[]
no_license
CREATE TABLE `address` ( `ADDRESSID` int(11) NOT NULL, `POSTCODE` int(11) DEFAULT NULL, `TOWNID` int(11) DEFAULT NULL, `COUNTYID` int(11) DEFAULT NULL, `COUNTRYID` int(11) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Đang đổ dữ liệu cho bảng `address` -- INSERT INTO `address` (`ADDRESSID`, `...
true
fd3a2b5eaf5270eb578acd193f88da71b745be4d
SQL
piaoxue85/helloyy2
/assets/sql/create/create_nrc_zj.sql
UTF-8
2,484
2.921875
3
[]
no_license
--网上立案_立案预约_证据 create table [t_zj] ( [c_id] varchar(32) not null, -- 证据id [c_ywxt_zjbh] varchar(32) null, -- 业务证据编号 [c_xh] varchar(32) null, -- 序号 [c_app_id] v...
true
203eb64ab2ab78d7f8b6613c149560e9c6cc4b34
SQL
PutskouDzmitry/golang-training-Library
/script.sql
UTF-8
4,175
3.671875
4
[]
no_license
CREATE TABLE "readers" ( reader_id INT NOT NULL CONSTRAINT readers_pk PRIMARY KEY , occupation_id INT NOT NULL, city_id INT NOT NULL, reader_name CHAR (50) NOT NULL, reader_surname CHAR (50) NOT NULL, debtor BOOLEAN NOT NULL ); INSERT INTO "readers" VALUES (1, 1, 1, 'Dima', '...
true
89acaaabcb2f0179027e13770c80866632fcff53
SQL
shohei36/project-task-manager
/firstER2.sql
UTF-8
1,936
4.125
4
[]
no_license
/* Drop Tables */ DROP TABLE IF EXISTS task_history; DROP TABLE IF EXISTS account_user; DROP TABLE IF EXISTS charge_code; DROP TABLE IF EXISTS project; /* Create Tables */ CREATE TABLE account_user ( id serial NOT NULL UNIQUE, name varchar(20) NOT NULL UNIQUE, passwd varchar(20) NOT NULL, registerd_dt timest...
true
2e83dca220a2c9d90c7d20746d68b261c2189c78
SQL
JoshuaLPeters/database-exercises
/join_exercises.sql
UTF-8
1,502
4.34375
4
[]
no_license
USE employees; SELECT d.dept_name AS Department_Name, CONCAT(e.first_name, ' ', e.last_name) AS Department_Manager FROM employees as e JOIN dept_manager as dm ON dm.emp_no = e.emp_no JOIN departments as d ON d.dept_no = dm.dept_no WHERE dm.to_date > now() ORDER BY d.dept_name; -- Find the name of all departments curr...
true
644270bb26c584d125a52ae0a9c757599c09fe1c
SQL
jgarzonext/plsql-testing
/script_plsql/bd_iaxis/script/tables/AGE_PARAGENTES.sql
ISO-8859-1
1,379
2.875
3
[]
no_license
-------------------------------------------------------- -- DDL for Table AGE_PARAGENTES -------------------------------------------------------- CREATE TABLE "AXIS"."AGE_PARAGENTES" ( "CPARAM" VARCHAR2(20 BYTE), "CAGENTE" NUMBER, "NVALPAR" NUMBER(8,0), "TVALPAR" VARCHAR2(100 BYTE), "FVALPAR" DATE ) ...
true
bb64da8b1345bb0d5d8fd6458ca9611dd7366ee3
SQL
kaspersgit/Premier-League
/SQL_functions/trigger_Rlineup_to_matchlinup.sql
UTF-8
740
2.875
3
[]
no_license
CREATE TRIGGER R_lineup_update AFTER INSERT ON ENG_R_lineup_input BEGIN INSERT INTO ENG_match_lineup ( match_date, hometeam, awayteam, h1, h2, h3, h4, h5, h6, h7, h8, h9, h10, h11, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, season) VALUES ( NEW.match_date, NEW.hometeam, NEW.awayteam, NEW.h1, NEW.h2, NEW.h3, NEW.h4,...
true
68a880c72b5f1dd6500834fa21384a6c6788115d
SQL
devmasterperu/SQL2019-Grupo17
/BLOQUE_6/Parte02.sql
WINDOWS-1250
8,286
4.1875
4
[]
no_license
--06.05 --Tablas derivadas select c.codcliente as CODIGO, upper(concat(rtrim(ltrim(c.nombres)),' ',rtrim(ltrim(c.ape_paterno))+' ',rtrim(ltrim(c.ape_materno)))) as CLIENTE, codzona as ZONA, isnull(rt.total,0) AS N_TEL, row_number() over(partition by c.codzona order by isnull(rt.total,0) asc) as R1, rank() over(partiti...
true
c45f17ff49bb8cc8db64e57342c3ef44de21c57a
SQL
radtek/abs3
/sql/mmfo/bars/View/v_tobo_cust_fm.sql
UTF-8
2,223
2.921875
3
[]
no_license
PROMPT ===================================================================================== PROMPT *** Run *** ========== Scripts /Sql/BARS/View/V_TOBO_CUST_FM.sql =========*** Run *** PROMPT ===================================================================================== PROMPT *** Create view V_TO...
true
1f7c533274b3ceab52a9436a94fa5764793e6433
SQL
minoobeyzavi/intro-to-data-science
/keyword_search.sql
UTF-8
450
3.953125
4
[]
no_license
DROP VIEW A; DROP VIEW B; CREATE VIEW A AS SELECT * FROM frequency UNION SELECT 'q' as docid, 'washington' as term, 1 as count UNION SELECT 'q' as docid, 'taxes' as term, 1 as count UNION SELECT 'q' as docid, 'treasury' as term, 1 as count; CREATE VIEW B AS SELECT * FROM A WHERE docid = 'q'; SELECT frequency.docid...
true
9f89e9c26f7d5daf2e909eb8851120f027f72701
SQL
MelanniTzul/Proyecto1_IPC2_MiMuebleria
/Base de Datos/MiMuebleria.sql
UTF-8
2,125
3.875
4
[]
no_license
CREATE USER 'UsuarioMuebleria'@'localhost' IDENTIFIED BY 'muebleria123'; GRANT USAGE,INSERT,DELETE,UPDATE,SELECT ON mi_muebleria.* TO 'UsuarioMuebleria'@'localhost'; mysql -u root2 -p CREATE DATABASE mi_muebleria; USE mi_muebleria; CREATE TABLE USUARIO ( Nombre_De_Usuario VARCHAR (25) NOT NULL, Pass...
true
d66aa5f223578efbb386265faa1a2d0fa78b1d3f
SQL
ChristopherLoer/JavaWeb
/onlineferries.sql
UTF-8
10,354
3.125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.7.9 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Erstellungszeit: 11. Feb 2019 um 09:27 -- Server-Version: 10.1.31-MariaDB -- PHP-Version: 5.6.34 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_C...
true
c9f40afd12cc821227545e39b278d307c957f7ce
SQL
southpolekat/dgtest
/xdrive/hadoop/test_orc_join.sql
UTF-8
1,011
3.296875
3
[]
no_license
DROP EXTERNAL TABLE IF EXISTS ext_a_w; DROP EXTERNAL TABLE IF EXISTS ext_a_r; DROP EXTERNAL TABLE IF EXISTS ext_b_w; DROP EXTERNAL TABLE IF EXISTS ext_b_r; CREATE WRITABLE EXTERNAL TABLE ext_a_w ( i int, t text ) LOCATION ('xdrive://127.0.0.1:7171/hdfs3_orc/a_#SEGID#.orc') FORMAT 'spq'; CREATE WRITABLE EXTER...
true
d07c300b3c589f1662ccf866c2906220003e0e93
SQL
Fran2325/mysql
/Sprint_Final_francis.sql
UTF-8
7,892
3.140625
3
[]
no_license
/*Creamos tabla proveedores*/ CREATE TABLE IF NOT EXISTS `TeloVendo`.`proveedores` ( `idproveedor` INT(11) NOT NULL AUTO_INCREMENT, `RepresentanteLegal` VARCHAR(45) NOT NULL, `NombreCorporativo` VARCHAR(45) NOT NULL, `TelefonoPrincipal` DOUBLE NOT NULL, `TelefonoSecundario` DOUBLE NULL DEFAULT NULL, `Encarg...
true
39d53bee1d3ce7cc974cd406ea257d999511a698
SQL
ibtissamemme/script-sql
/Archives/Scripts_ORCL/Mise_a_jour_schema/103_T_ORCL_2015_03_23.sql
UTF-8
1,449
2.9375
3
[]
no_license
ALTER TABLE COLISRECU ADD POIDS VARCHAR2(10 CHAR); COMMIT; ALTER TABLE COLISRECU ADD SERVICEID VARCHAR2(14 CHAR); COMMIT; ALTER TABLE COLISEMIS ADD SERVICEID VARCHAR2(14 CHAR); COMMIT; UPDATE COLISRECU SET SERVICEID='VPARDEFAUT'; COMMIT; UPDATE COLISEMIS SET SERVICEID='VPARDEFAUT'; COMMIT; ALTER TABLE COLISEMIS ADD ...
true
53745c37ef8d7c842e9d3bc0313096a7ddd626f1
SQL
SHJunI/webcreater
/atom/sql db정보.sql
UTF-8
866
3.703125
4
[]
no_license
use bachelor; create table stdtb1( stdname varchar(10) not null primary key, addr char(4) not null); create table clubtb1( clubname varchar(10) not null primary key, roomno char(4) not null); create table stdclubtb1( num int auto_increment not null primary key, stdname varchar(10) not null, clubname varchar(10) not n...
true
e0887850715fe54bafc6e84e7d9f13a3ca716173
SQL
rjmartin73/fictional-university
/app/sql/local.version-schema-view.sql
UTF-8
697
2.96875
3
[]
no_license
/*!40101 SET NAMES binary*/; DROP TABLE IF EXISTS `version`; DROP VIEW IF EXISTS `version`; SET @PREV_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT; SET @PREV_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS; SET @PREV_COLLATION_CONNECTION=@@COLLATION_CONNECTION; SET character_set_client = utf8; SET character_set_results = ...
true
e9714dfcfd4925203e9d2e7e3cf1223ad275544a
SQL
ibtissembdh/Product-details
/EXERCICE 4/jouets.sql
UTF-8
1,772
3.109375
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.5.4.1deb2ubuntu2.1 -- http://www.phpmyadmin.net -- -- Client : localhost -- Généré le : Mer 05 Février 2020 à 13:52 -- Version du serveur : 5.7.22-0ubuntu0.16.04.1 -- Version de PHP : 5.6.38-3+ubuntu16.04.1+deb.sury.org+1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET tim...
true
dda2ce1e22e772f90fcfd9861ef365b3aaefaa25
SQL
jamesleja907/csc343
/A3/q2.sql
UTF-8
1,433
4.25
4
[]
no_license
set search_path to carschema; drop table if exists q2 cascade; create table q2( email VARCHAR(50), num_shared_reservations int ); -- look for all reservations that are not cancelled, not just completed create view complete_res as select res_num, email, status from Reservation join Customer_res on reservation....
true
f07e7fd132de83f174e482e2e5ee20e2110cd199
SQL
miyamam/decode18
/DA21 SQL Database/activeSession.sql
UTF-8
100
2.546875
3
[ "MIT" ]
permissive
SELECT count(session_id) as [Active Sessions] FROM sys.dm_exec_sessions WHERE status = 'running'
true
db037c295cac8260741d862331396a821da6ddb1
SQL
vmelodyj/housing-finder
/public/static-sql/rental_unit.sql
UTF-8
464
3.03125
3
[]
no_license
CREATE TABLE rental_unit ( unit_id varchar(128) PRIMARY KEY, unit_title varchar(128), unit_description varchar(128), price Integer NOT NULL, unit_address varchar(128) NOT NULL, unit_type varchar(20) NOT NULL, postal_code varchar(10) NOT NULL, landlord_id varchar(128) NOT NULL, FOREIG...
true
db77c805121d13b4573e474f085189feeb3e66ea
SQL
cornelioroyer/abaco-design
/s_cxp01.sql
UTF-8
386
3.015625
3
[]
no_license
select f_cxpfact1_cglposteo(compania, proveedor, fact_proveedor) from cxpfact1 where fecha_posteo_fact_cxp between '2005-12-01' and '2006-12-02' and not exists (select * from rela_cxpfact1_cglposteo where rela_cxpfact1_cglposteo.compania = cxpfact1.compania and rela_cxpfact1_cglposteo.proveedor = cxpfact1.proveedor and...
true
30edb17b4df3cbc98d6a74ffd32bc7e644c6c969
SQL
kenny-designs/my-pet-acadamia
/sql-scripts/create-acadamia-db.sql
UTF-8
11,377
3.6875
4
[]
no_license
-- Create the main database for My Pet Acadamia CREATE DATABASE IF NOT EXISTS pet_acadamia_db; USE pet_acadamia_db; -- DROP TABLES DROP TABLE IF EXISTS player_battle_instances; -- ongoing pvp battles DROP TABLE IF EXISTS safari_battle_instances; -- ongoing pve battles DROP TABLE IF EXISTS team_instances; -- active b...
true
be7eb531b69c58dd5300524f748a74c120824471
SQL
Vlad639/DataBase_1
/Запросы/get_humans_in_street_list.sql
UTF-8
234
3.015625
3
[]
no_license
SELECT public."Humans".* FROM public."Houses" JOIN public."Flats" ON house_link = house_id JOIN public."Residents" ON flat_link = flat_id JOIN public."Humans" ON human_link = human_id WHERE street_link in (1, 9);
true
6947b617f7346a40cb5effde3239caa35f298160
SQL
renatonp/imusic
/imusica.sql
UTF-8
3,711
3.1875
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.9.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Tempo de geração: 31/01/2020 às 15:33 -- Versão do servidor: 10.4.11-MariaDB -- Versão do PHP: 7.4.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @O...
true
185aa20a74494868766970fe4842d227ad8b5145
SQL
luhsra/lctes21
/evaluation-queries/validate.sql
UTF-8
864
3.59375
4
[]
no_license
\! echo "sanity check: every data-flow injection has a result"; # Sanity check: Must return no results SELECT variant_id, count(df.pilot_id is null), count(df.resulttype is null) FROM data_flow_res df where variant_id = @variant_id and (df.pilot_id is NULL or df.resulttype is null) group by variant_id; \! ec...
true
f9b9edcf2b2733b8dfcd7c82ff3a92947d4b0a94
SQL
mdeandrade/expedientes
/sql/expedientes_prestamos.sql
UTF-8
1,845
3.203125
3
[]
no_license
/* SQLyog Community v12.15 (64 bit) MySQL - 5.5.53-0ubuntu0.14.04.1 : Database - expedientes ********************************************************************* */ /*!40101 SET NAMES utf8 */; /*!40101 SET SQL_MODE=''*/; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @...
true
98383af8b7de2ce7c29c2b900237f742251ceed2
SQL
okgint/JPA-NestedSetsModel
/oracle.sql
UTF-8
166,252
3
3
[]
no_license
-------------------------------------------------------- -- File created - Selasa-Januari-06-2015 -------------------------------------------------------- -------------------------------------------------------- -- DDL for Sequence NESTED_CATEGORY_SEQ -------------------------------------------------------- CR...
true
52fa265993b5a603deff74766756dcfec26940d7
SQL
Michael-Troia/database-exercises
/subqueries_exercises.sql
UTF-8
1,161
4.1875
4
[]
no_license
# -- Find all the employees with the same hire date as employee 101010 using a subquery. # -- use employees; # -- 69 Rows # -- select emp_no, CONCAT(first_name,' ',last_name) as name from employees where hire_date = (select hire_date from employees where emp_no = 10101...
true
b978b95945aa98bea7508c3c485eddac3350385d
SQL
Failip98/Bank-app
/Bank-app.sql
UTF-8
2,635
3.203125
3
[]
no_license
-- -------------------------------------------------------- -- Värd: 127.0.0.1 -- Serverversion: 5.7.25-log - MySQL Community Server (GPL) -- Server-OS: Win64 -- HeidiSQL Version: 10.1.0.5464 -- --------------------------------------------------...
true
f2972d81a2ac4d8d0c432cc1c4b08fdc56d9f922
SQL
begeistert/Bedu
/Sesion-03/Reto-02/Reto-02.sql
UTF-8
772
3.84375
4
[]
no_license
USE tienda; # 1 CREATE VIEW GREAT_VIEW_1_773_0 AS (SELECT concat(e.nombre, ' ', e.apellido_paterno) empleado, p.nombre FROM empleado e JOIN puesto p ON e.id_puesto = p.id_puesto); SELECT * FROM GREAT_VIEW_1_773_0 LIMIT 1; # 2 CREATE VIEW GREAT_VIEW_2_773 AS (SELECT concat(e.nombre, ' ', e.apellido_paterno) emplea...
true
6a31df020c4152e0cf6787cac20ebe059e1f165f
SQL
tiffanyposs/ClassStuff
/w09/d03/seeds.sql
UTF-8
655
3.328125
3
[]
no_license
CREATE TABLE dwarves( id INTEGER PRIMARY KEY, name TEXT, color TEXT, created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP); CREATE TRIGGER dwarfs BEFORE UPADATE ON dwarves BEGIN UPDATE dwarves SET updated_at = CURRENT_TIMESTAMP WHERE id = new.id; END; INSERT INTO dwarv...
true
1060cc8f8d0953bbdad16e54d046406230c573b6
SQL
ahmeddossamaa/Restaurant-Laravel
/z_db/pizza_store.sql
UTF-8
5,229
2.984375
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 5.0.3 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Feb 03, 2021 at 07:03 AM -- 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
1c6171567298fe995a198b9e57eee04c67b7c4de
SQL
rohini-raja/leetcode
/problems/friend-requests-i-overall-acceptance-rate/mysql_schemas.sql
UTF-8
1,345
3.171875
3
[ "MIT" ]
permissive
Create table If Not Exists friend_request ( sender_id INT NOT NULL, send_to_id INT NULL, request_date DATE NULL); Create table If Not Exists request_accepted ( requester_id INT NOT NULL, accepter_id INT NULL, accept_date DATE NULL); Truncate table friend_request; insert into f...
true
7f24001d561a25027d1a61f98ea9091366db1218
SQL
CodeLouisville/C-Sharp-Weekly-Challenge
/Solutions/Week5/CodeLou.CSharp.Week5.Challenge/CodeLou.CSharp.Week5.Challenge/MySQL.sql
UTF-8
5,373
4.1875
4
[]
no_license
-- Notice slight differences between MSSQL and MySQL. It's mostly the same, just a little different syntax. CREATE SCHEMA IF NOT EXISTS codelouisville; USE codelouisville; CREATE TABLE IF NOT EXISTS `position` ( Id INT NOT NULL AUTO_INCREMENT, PositionName VARCHAR(100) NOT NULL, PRIMARY KEY (Id) ); CREA...
true
8431639b1fe42acb8cabe32570af5fa5b730a657
SQL
wchen308/practice_db
/friendly_movie_last_month_1495.sql
UTF-8
1,906
4.3125
4
[]
no_license
/* Write an SQL query to report the distinct titles of the kid-friendly movies streamed in June 2020. Return the result table in any order. The query result format is in the following example. TVProgram table: +--------------------+--------------+-------------+ | program_date | content_id | channel | ...
true
8f2b457edc91988a96fcbfbc769f1533c4224fce
SQL
Turjo7/Blood-Donor-Management-System
/bloodbank.sql
UTF-8
9,363
2.875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Aug 05, 2019 at 12:05 PM -- Server version: 10.1.33-MariaDB -- PHP Version: 7.2.6 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
true
33edfbba7bd93be401b5a1b18dcda0b7ac9844b8
SQL
npoxopob/geekbrains_database
/querys.sql
UTF-8
4,209
4.15625
4
[]
no_license
/* *********************************************** **Представления, триггеры, хранимые процедуры** *********************************************** */ -- Ягоды на всех точках продажи CREATE or replace VIEW berries_on_point_sales AS SELECT p.name AS 'Наименование товара', ps.point_name AS 'Точка продажи', ptp...
true