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
a97a197ebf76a9ad7053849883fd896afd1ec681
SQL
bosskme/holbertonschool-higher_level_programming
/0x0E-SQL_more_queries/8-cities_of_california_subquery.sql
UTF-8
155
3.5625
4
[]
no_license
-- List all cities of California SELECT id, name FROM cities WHERE state_id IN ( SELECT id FROM states WHERE name LIKE '%California%') ORDER BY id ASC;
true
961f6369ac100d1dd0eaf9b170576f8e08e4b26b
SQL
grammophone/CoOp
/workspace/CoopDataAccess/scripts/sql/Postgres/indices.sql
UTF-8
14,707
3.203125
3
[]
no_license
ALTER SEQUENCE hibernate_sequence RESTART 65536; -- This constraint should be dropped because it is introduced by Hibernate schema -- generator bug. ALTER TABLE "Report" DROP CONSTRAINT FK91B1415458A760E4; ALTER TABLE "ActivitySector" ADD CONSTRAINT "CS_ActivitySector_code" UNIQUE(code) DEFERRABLE INITIALLY...
true
346c5b808d80ff8d9e1ea139b4a78230755a3d3e
SQL
twglhk/TSQL-Tutorial
/SQLQuery_Sorting_perfomance_test.sql
UHC
856
4.125
4
[]
no_license
USE BaseballData; -- ORDER BY SELECT * FROM players ORDER BY college; -- INDEX Ȱϱ SORTING X SELECT * FROM batting ORDER BY playerID, yearID; -- GROUP BY SELECT college, COUNT(college) FROM players WHERE college LIKE 'C%' GROUP BY college; -- INDEX Ȱϱ SORTING X SELECT playerID, COUNT(playerID) FROM players WHERE ...
true
d3d9ba087680dd29f5f531656a621eddd1c5d606
SQL
theyak/Tau
/samples/session/users.sql
UTF-8
1,313
3.25
3
[]
no_license
DROP TABLE IF EXISTS `users`; CREATE TABLE IF NOT EXISTS `users` ( `user_id` int(10) unsigned NOT NULL, `activated` tinyint(3) unsigned NOT NULL DEFAULT '0', `username` varchar(64) COLLATE utf8_unicode_ci NOT NULL, `username_clean` varchar(64) COLLATE utf8_unicode_ci NOT NULL, `email` varchar(128) COLLATE utf...
true
cc0110b4819ac1ce8a9d062c20e085555704e73a
SQL
invokerwbw/wjgl
/src/main/resources/sql/oracle/create/1_countries.sql
UTF-8
487
3.0625
3
[]
no_license
drop table COUNTRIES cascade constraints; /*==============================================================*/ /* Table: COUNTRIES */ /*==============================================================*/ create table COUNTRIES ( ITEM_ID INT not n...
true
192bba22a01b89a50f3a1874b68b10597471ec06
SQL
quiquesancho/trivial.local
/dbtrivial.sql
UTF-8
479
2.546875
3
[]
no_license
create database trivial; use trivial; create table preguntas ( id int primary key auto_increment, question varchar(500) not null, answerOk varchar(50) not null, badAnswer1 varchar(50) not null, badAnswer2 varchar(50) not null, badAnswer3 varchar(50) not null, imagen varchar(100) not null, ...
true
775cce42b8ed70655b81a2157f39b1e65b3c1612
SQL
andrewthesailor/inz
/src/main/resources/db/migration/V2020_17_01_16_35_00__T_TEACHERS.sql
UTF-8
471
2.875
3
[]
no_license
CREATE SEQUENCE S_TEACHER_ID START WITH 1 INCREMENT BY 50; CREATE TABLE T_TEACHERS ( TEACHER_ID NUMERIC(10, 0) NOT NULL, TEACHER_AUDIT_CD DATE NOT NULL DEFAULT NOW(), TEACHER_AUDIT_MD DATE, TEACHER_AUDIT_RD DATE, TEACHER_NAME VARCHAR(100) NOT NULL, TEACHER_SURNAME VARCHAR(100) NOT...
true
4f0970bd0d50a0ac66d951666a82bf345f748bbf
SQL
cuongtm2000/zend-mvc
/cms/document/data for poll.sql
UTF-8
1,782
3
3
[]
no_license
INSERT INTO `cms`.`hoiit_modules` (`module_id`, `module_title`, `module_url`, `module_sort`, `module_type`, `module_page`) VALUES ('poll', 'Danh sách', 'poll', '7', '1', '0'); INSERT INTO `hoiit_functions` (`function_value`, `function_name`, `function_class`, `function_call`, `hoiit_modules_module_id`) VALUES('ne...
true
f8729b4b48cda0f4e2787452c37a2e9731500e11
SQL
Isaac6702/base-de-datos-proy-isaackaremali
/Procedimientos/validarNacionalidad.sql
UTF-8
588
2.96875
3
[]
no_license
create or replace PROCEDURE validarNacionalidad(sexoPersona IN VARCHAR2, nacionalidad IN NUMBER) IS CURSOR VALIDAR_SEXO IS select sexo from NACIONALIDAD where idNacionalidad = nacionalidad; sexoNac VALIDAR_SEXO % ROWTYPE; BEGIN if sexoPersona='f' or sexoPersona='m' or sexoPersona='a' then for SEXONAC IN VALIDAR_SEX...
true
6145f457ae1b75988f69b80629620541d9a92cc6
SQL
sergeymitrichev/grostore
/grostore-model/src/main/resources/db/migration/V0_8_6__Add_brand_image.sql
UTF-8
268
2.703125
3
[]
no_license
create table if not exists brand_image ( id serial not null constraint brand_image_pkey primary key, alt varchar(255), title varchar(255), url varchar(255) not null, entity_id integer not null constraint fk_brand_entity_id references brand );
true
fd01f2138aec951987174d9e44d853f306a8ae33
SQL
anderpaulino/bonita-migration
/bonita-migration-distrib/src/main/resources/versions/6.3.0/Database/008_BS-296/sqlserver-check-constraint.sql
UTF-8
299
4.09375
4
[]
no_license
SELECT COUNT(TABLE_NAME) nbColumn, COUNT(distinct TABLE_NAME) as nbConstraint FROM INFORMATION_SCHEMA.CONSTRAINT_COLUMN_USAGE col_cons INNER JOIN sys.key_constraints all_cons ON col_cons.CONSTRAINT_NAME = all_cons.name WHERE col_cons.TABLE_NAME = 'data_mapping' AND all_cons.type = 'UQ'
true
28c908a0a0305d9d764d3eb9d2a7a40d96f60189
SQL
behnam78/BidOpps
/all_tables.sql
UTF-8
4,055
3.671875
4
[ "MIT" ]
permissive
CREATE SCHEMA IF NOT EXISTS `mydb` DEFAULT CHARACTER SET utf8 ; USE `mydb` ; -- ----------------------------------------------------- -- Table `mydb`.`users` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `mydb`.`users` ( `id` INT NOT NULL AUTO_INCREMENT, `email` VARCHAR(255) N...
true
7b737dc7fcb4173aa5f71dfeeddd45d6244d9ea7
SQL
aymen2255/poe
/TP_Triange_Etoile/company.sql
UTF-8
4,083
3.375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 3.4.10.1deb1 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Apr 23, 2014 at 07:21 AM -- Server version: 5.5.35 -- PHP Version: 5.3.10-1ubuntu3.11 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTE...
true
46551fcefa3d3b6af8bec0c54598555090b9b922
SQL
JhPlayGround/jsp
/workspace/chap03_MVC_JDBC/src/main/resources/sql/goodsItem.sql
UTF-8
687
2.59375
3
[]
no_license
-- goodsItem.sql create table goodsItem ( item_id int primary key, item_name varchar(50) not null, item_price int not null, item_des varchar(200), item_pic varchar(50) ); delete from goodsItem; --레코드 설정 insert into goodsItem values (1,'냉장고',850000,'s사 최고사양','img01.jpg'); insert into goodsItem values (2,'세탁기',80...
true
ae008cdaac23e73e88cc1e6ea55ccbda5df30b77
SQL
chakkrit/DBAuthTest
/db/authdb.sql
UTF-8
327
3.40625
3
[]
no_license
CREATE TABLE roles ( id INTEGER PRIMARY KEY AUTOINCREMENT, role TEXT UNIQUE ); CREATE TABLE users ( id INTEGER PRIMARY KEY AUTOINCREMENT, username TEXT UNIQUE, email TEXT, password TEXT ); CREATE TABLE user_roles ( user_id INTEGER REFERENCES users(id), role_id INTEGER REFERENCES roles(id), PRIMARY KEY(user_id, role_i...
true
6c6e2dadbb6181488f4f4dc27f6268084dcedff1
SQL
kmcshane/InternSummerProject2017
/tables_setup.sql
UTF-8
2,506
3.796875
4
[]
no_license
--How to run this file: --Either navigate to its folder, then execute: -- su - user -- psql -U user -d rovdemo -a -f tables_setup.sql --after user and rovdemo are created, --or from an arbitrary location execute -- psql -U user -d rovdemo -a -f {full path goes here}/tables_setup.sql --Destroy all previously existing ...
true
0f5415c8c93e98b5e4c6570dc6394b3d7c5dd7ba
SQL
willamsclemente/if685
/Projeto/scriptTiposOO.sql
UTF-8
2,987
3.140625
3
[]
no_license
DROP TYPE TP_NT_FONE force; DROP TYPE TP_POSICIONADORES force; DROP TYPE TP_ATUADORES force; DROP TYPE TP_VALVULAS force; DROP TYPE TP_SENSORES force; DROP TYPE TP_FLUXOINST force; DROP TYPE TP_INSTRUMENTOS force; DROP TYPE TP_FLUX_PROJ force; DROP TYPE TP_FLUXOGRAMA force; DROP TYPE TP_EXECUCAO force; DROP TYPE TP_PRO...
true
af7d5d4ca9d3f53264c3c5067afbf212fbb63459
SQL
InGarage/MakerPlayGroundRepository
/query/sample-query.sql
UTF-8
803
3.28125
3
[]
no_license
------------- Table Creation --------------- -- CREATE TABLE mp_version -- ( -- build_name VARCHAR(50) NOT NULL, -- version VARCHAR(50) NOT NULL, -- download_url VARCHAR(50) NOT NULL, -- release_date DATETIME, -- ); -- SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE = 'BASE TABLE' ...
true
da8753bf9bb190d3cc5ca8002ed32ae6443c3e9c
SQL
jiangzhenjian/HL7Receiver
/src/hl7receiver-database/src/main/schema/V1.6-schema.sql
UTF-8
3,829
3.5625
4
[ "Apache-2.0" ]
permissive
/* Schema V1.6: Create organisation mapping tables (to hold a cache of looked up values) */ create table mapping.organisation_type ( organisation_type char(2) not null, name varchar(100) not null, constraint mapping_organisationtype_organisationtype_pk primary key (organisation_type), constraint mapping_organis...
true
cd47ab7319bdd8d1ac7ea395c271cac5e394809c
SQL
NMFES/test-products-manager
/work.sql
UTF-8
1,139
3.359375
3
[ "BSD-3-Clause" ]
permissive
/* Navicat MySQL Data Transfer Source Server : localhost Source Server Version : 50557 Source Host : localhost:3306 Source Database : work Target Server Type : MYSQL Target Server Version : 50557 File Encoding : 65001 Date: 2017-09-19 01:32:30 */ SET FOREIGN_KEY_CHECKS=0; -- ----...
true
19ff6fd387861ca0f26dedf4174a1641f6b0a54c
SQL
nicholasmfong/oldHomework
/COEN 280 - Database Systems/q3.sql
UTF-8
385
3.671875
4
[ "MIT" ]
permissive
--Nicholas Fong COEN 280 HW 2: Director, movie title, and year of leap year drama movies --Assume that leap years are the ones divisible by 4, ignoring the special rules for leap years SELECT p.first_name, p.last_name, p.pid, m.name AS movie_title, m.release_year FROM person p, movie m, genres g WHERE p.pid = m.directo...
true
2a42db371ebbaeb0dda153239bf39aabee8c44a0
SQL
SKSteeve/Courses
/05.MySQL-DB/08.Data-Aggregation-Exercise/13.EmployeesMinimumSalaries.sql
UTF-8
225
3.421875
3
[]
no_license
USE `soft_uni`; SELECT `department_id`, MIN(`salary`) AS `minimum_salary` FROM `employees` WHERE `hire_date` > '2001-01-01' AND `department_id` IN (2,5,7) GROUP BY `department_id` ORDER BY `department_id`;
true
a108665c01b7d266b6d213e87082c74f318c883c
SQL
hanntronico/sysconcebir
/source.sql
UTF-8
876
2.78125
3
[]
no_license
USE sacomici_concebir; -- select usuario_id,usuario_nombre,usuario_apellido,usuario_email,usuario_clave,usuario_activo,p.perfil_id -- from usuario u inner join perfil p on u.perfil_id = p.perfil_id -- where usuario_activo ='1'; -- select c.cita_id, c.cita_fecha, c.cita_fechareg from cita c order by 1 desc; -- select ...
true
b65a355ba2e48cb2c575402304cf0ebf354aa473
SQL
ybak/grp6
/GRP6/.svn/pristine/6d/6db775a54ab853fa69454f30c4be96c2b854e5d7.svn-base
UTF-8
984
2.6875
3
[]
no_license
/*============添加担保意向涵表==*/ DROP TABLE IF EXISTS pro_intentionLetter; CREATE TABLE pro_intentionLetter ( intentionLetter_ID VARCHAR(32) NOT NULL, apply_ID VARCHAR(32) NOT NULL, meetingDetail_ID VARCHAR(32), intentionLetterCode VARCHAR(20), bankID VARCHAR(32), bankName ...
true
25ebd0014017559ba3db644ef468b7477f5af5c1
SQL
DanieleF198/Catalogo
/Codici Libreria/2-trigger query/Operazioni di Appoggio/EliminazioneRecensione.sql
UTF-8
810
3.34375
3
[]
no_license
#procedura che permette il Delete di una recensione, nella fattispece permette che una recensione possa essere eliminata se e solo se chi elimina è lo stesso creatore della recensione. use catalogo; delimiter $$ create procedure delOfRecOperation (in IDRecToMod int, deleter varchar(63)) begin if (select IDRecensione...
true
764dcb07c5dbe26370e69d09bf549321bc6cb034
SQL
s-mathes/projects
/mySQLMoviesDatabase/part2_queries.sql
UTF-8
826
4.09375
4
[]
no_license
-- QUESTION 1 -- SELECT AVG(budget) FROM movies.movies; -- QUESTION 2 -- SELECT original_title FROM movies.movies INNER JOIN movies.movie_production_country ON movies.movie_production_country.movieid = movies.movies.id WHERE movies.movie_production_country.iso_3166_1 = 'US'; -- QUESTION 3 -- SELECT original_title, ...
true
cdde4f63bb6a0897eeafd66bf99e5ff9619920d2
SQL
onwuchekwa/CIT_225_Database_Design_and_Development
/Week 3/apply_oracle_lab3.sql
UTF-8
7,142
3.703125
4
[]
no_license
-- ------------------------------------------------------------------ -- Program Name: apply_oracle_lab3.sql -- Lab Assignment: N/A -- Program Author: Michael McLaughlin -- Creation Date: 17-Jan-2018 -- ------------------------------------------------------------------ -- Change Log: -- ------------------------...
true
a1af00a52a254aaa9a0e8ad7a4c98001aaac17dc
SQL
byteball/draw-airdrop
/db.sql
UTF-8
3,160
3.84375
4
[]
no_license
CREATE TABLE IF NOT EXISTS users ( device_address CHAR(33) NOT NULL PRIMARY KEY, creation_date TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, step CHAR(15) NOT NULL DEFAULT 'start', code CHAR(10) NOT NULL UNIQUE, referrerCode CHAR(10) NULL, FOREIGN KEY (device_address) REFERENCES correspondent_devices(device_addre...
true
9e0fa84ed8e9bc3af3dedadf2cbe02027e818496
SQL
rendellb/feedback-tool
/schema.sql
UTF-8
5,289
2.703125
3
[]
no_license
-- MySQL dump 10.13 Distrib 5.7.18, for osx10.11 (x86_64) -- -- Host: localhost Database: feedback-tool -- ------------------------------------------------------ -- Server version 5.7.18 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULT...
true
4ad1ae0f63647e0ecec41e5b7c13a629997f48ee
SQL
kiendang/sph5104
/group1/population.sql
UTF-8
5,558
3.59375
4
[]
no_license
with icu_age_raw as ( select icustay_id, extract('epoch' from (intime - dob)) / 60.0 / 60.0 / 24.0 / 365.242 as age from icustays left join patients using (subject_id) ) , icu_age as ( select icustay_id, case when age >= 130 then 91.5 else age end as age from icu_age_raw ) , icu_or...
true
01cfb636ff18d03eec6f2bba31be978905eab502
SQL
brunocampos01/banco-de-dados
/sql/exercicios/aula_06 - constraints.sql
UTF-8
1,920
4
4
[ "MIT", "CC-BY-SA-4.0" ]
permissive
/*Tipos de contraints: CHECAGEM - (check) permitem a especificação de valores válidos para campos - Restrições de checagem avaliam expressões booleanas OBRIGATORIEDADE -(NOT NULL) definem que os campos a elas relacionados devem receber valores diferentes de NULL UNICIDADE - definem que os valores presentes em um ...
true
eaf8197b55be59cfb25b03ebf9c0c6e6c50c80a7
SQL
freedaemons/dpl
/uradb/ecasa936.sql
UTF-8
1,627
2.859375
3
[]
no_license
REM --------------------------------------------------------------------------- REM NAME : ECASA936.SQL REM Author : Pik Wai REM Creation Date : 22-10-2001 REM Run By : ECASMGR REM Description : SQL script to create store triggers. REM ------------------------------------------------------...
true
562e8e73f66addb5c935df29e85ac404623a755c
SQL
StarPolygen/CS-course-share
/数据库原理/Lab3/q3.sql
UTF-8
247
3.734375
4
[]
no_license
select count(*) as cnt from( select distinct c.peopleid from credits c join movies m on m.movieid = c.movieid join people p on p.peopleid= c.peopleid where c.credited_as = 'A' and m.title like '%Avengers%' and p.gender = 'F' );
true
380aa7e33cf0e9eca5ee7cc1cd9dbf4d62246b3f
SQL
vskurikhin/href-on-spring
/scripts/sql/020_countries.sql
UTF-8
637
3.984375
4
[ "Unlicense" ]
permissive
------------------------------------------------------------------------ --- Create the COUNTRIES table to hold country information for customers --- and company locations. --- OE.CUSTOMERS table and HR.LOCATIONS have a foreign key to this table. -- Prompt ****** Creating COUNTRIES table .... CREATE TABLE IF NOT EXI...
true
1f4d08d22b086dadf40d4d5c219af9608f0f1ee7
SQL
grechjoseph/jooq
/src/main/resources/db/migration/V1_0001__schema.sql
UTF-8
333
3.140625
3
[]
no_license
create table jooq.author ( id uuid primary key, first_name character varying(255) not null, last_name character varying(255) not null ); create table jooq.book ( id uuid primary key, name character varying(255) not null, price numeric(19,2) not null, author_id uuid not null references jooq....
true
c4c8403542bc6b7ea90d9c3540e8ba5bf321cfa2
SQL
jadson-ti/prod_kls
/Procedures/PRC_PROD/PRC_CARGA_HOME.sql
UTF-8
6,351
3.40625
3
[]
no_license
-- -------------------------------------------------------- -- Servidor: cm-kls.cluster-cu0eljf5y2ht.us-east-1.rds.amazonaws.com -- Versão do servidor: 5.6.10-log - MySQL Community Server (GPL) -- OS do Servidor: Linux -- HeidiSQL Versão: 10.1.0.5484 -- ---------...
true
d74c1346c929b43eb4a7a3bbdcd03b72a17f9f50
SQL
tpodkur/militarybase
/src/main/resources/db.migration/schema.sql
UTF-8
10,412
3.234375
3
[]
no_license
1create table people ( id_man NUMBER GENERATED ALWAYS as IDENTITY(START WITH 1 INCREMENT by 1) primary key not null, first_name varchar(255), last_name varchar(255), third_name varchar(255) ); create table oficersky_sostav ( id_oficer NUMBER GENERATED ALWAYS as IDENTITY(START WITH 1 INCR...
true
e832b1661d23e1f3ac29f9b71cbae7e6437909cb
SQL
yjordens/reservation
/otf-database/incrementalscripts-postgresql/20130315SQL002.sql
UTF-8
1,763
2.96875
3
[]
no_license
------------------ -- Yvan Jordens -- ------------------ create table GEBRUIKER ( id varchar(50) not null, VERSIE bigint DEFAULT 0 NOT NULL, creatietijdstiputc timestamp without time zone default CURRENT_TIMESTAMP NOT NULL, wijzigingstijdstiputc timestamp wi...
true
96c681e54252b49b5ea19981bb2a7b25d15acc11
SQL
alexverly/TCCBI
/00 - Base de dados/Scripts/Tabela Fato2.sql
ISO-8859-1
1,541
2.84375
3
[]
no_license
-- Criao da tabela CREATE TABLE FATO2 ( Boletim VARCHAR(255) NOT NULL, DataHoraBoletim DATETIME NOT NULL, DataHoraInclusao DATETIME NOT NULL, Sequencial INTEGER NOT NULL, idTipoAcidente INTEGER FOREIGN KEY REFERENCES dTIPOACIDENTE(idTipoAcidente), idClima INTEGER FOREIGN KEY REFERENCES dCLIMA(idClima), idPa...
true
6b5682644a203e3d277fc61f222b824f3b6df553
SQL
pedrohsampaioo/database_exam_1
/dump-db-exam/separeted_sql_files/dbexam_movie_country.sql
UTF-8
769,031
2.65625
3
[]
no_license
create table movie_country ( movie_id int null, country_id int null, id int unsigned auto_increment primary key ); INSERT INTO dbexam.movie_country (movie_id, country_id, id) VALUES (1, 42, 1); INSERT INTO dbexam.movie_country (movie_id, country_id, id) VALUES (2, 23, 2); INSERT INTO dbex...
true
28826231fb72523eb422d2c1d9ca419a03b8e558
SQL
PaulApivat/postgresql
/bigquery/smartjob.sql
UTF-8
13,348
3.203125
3
[]
no_license
# Smartjob Fields can be broken into these large buckets: - JobAnnounce, basic descriptions *EmployerName (ไทยรวมสินพัฒนาอุตสาหกรรม, บริษัท ซันเมอรี่) *JobPosition (ie thai v eng; พนักงาน, วิศวกร, เจ้าหน้าที่, ช่าง) - JobAnnounce Qualifications *ComputerSkill (Office, Excel, PPT) *CurriculumName (Acct, Electric, Mot...
true
ed0b32e2746cdfa13566757a424d5a9203f26391
SQL
jinmae1/kh-assignment
/2021-August/31/Prac.sql
UTF-8
1,694
4.40625
4
[]
no_license
--1. 휴학중인 학번, 학생명, 학과명 조회 SELECT ts.STUDENT_NO AS "학번", ts.STUDENT_NAME AS "학생명", td.DEPARTMENT_NAME AS "학과명" FROM TB_STUDENT ts LEFT JOIN TB_DEPARTMENT td USING(department_no) WHERE ts.ABSENCE_YN = 'Y'; --2. 수업번호, 수업명, 교수번호, 교수명 조회 SELECT CLASS_NO AS "수업번호", CLASS_NAME AS "수업명", PROFESSOR_NO AS "교수번호", ...
true
1281fdd5f42095a7f0388039c08bcc6ce8f051f6
SQL
R0Mkka/Online-university__database
/ou_new/chats.sql
UTF-8
3,271
4.25
4
[]
no_license
USE online_university; CREATE TABLE IF NOT EXISTS chats_images ( chatImageId INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, path VARCHAR(100) NOT NULL, name VARCHAR(50) NOT NULL, originalName NVARCHAR(50) NOT NULL, mimeType VARCHAR(35) NOT NULL, size INT NOT NULL, addedAt TIMESTAMP DEFAULT ...
true
1b3074f97ada7b5cccb4b6dd8179ccc3f9277d21
SQL
Dinakar-Sky/Olive_Maintainence_and_Support
/Decisioning/BB/Decisioning_Activations_Churn_and_Regrades_BB.sql
UTF-8
11,461
3.453125
3
[]
no_license
Call Decisioning_Procs.Update_Decisioning_Activations_and_Churn_BB() Setuser Decisioning_Procs //Drop procedure Decisioning_Procs.Update_Decisioning_Activations_and_Churn_BB create Procedure Decisioning_Procs.Update_Decisioning_Activations_and_Churn_BB(Refresh_Dt date default null) SQL SECURITY INVOKER BEGIN SET TE...
true
b6199f8201cf1114e0fbdc48bafd5c2c1bc7f1f5
SQL
uxinting/myweb
/db.sql
UTF-8
2,189
2.921875
3
[]
no_license
-- MySQL dump 10.13 Distrib 5.5.29, for debian-linux-gnu (i686) -- -- Host: localhost Database: xt -- ------------------------------------------------------ -- Server version 5.5.29-0ubuntu0.12.04.2 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTE...
true
f09385977a2683d75ee1a15bf6ea7442d18a6a2f
SQL
VaskoViktorov/SoftUni-Homework
/09. Databases Basics - MS SQL Server/07. Subqueries and JOINS/15. Continents and Currencies.sql
UTF-8
586
4.34375
4
[ "MIT" ]
permissive
WITH CCYContUsage_CTE (ContinentCode, CurrencyCode, CurrencyUsage) AS ( SELECT ContinentCode, CurrencyCode, COUNT(CountryCode) AS CurrencyUsage FROM Countries GROUP BY ContinentCode, CurrencyCode HAVING COUNT(CountryCode) > 1 ) SELECT ContMax.ContinentCode, ccy.CurrencyCode, ContMax.TopCCYUsage FROM (SELEC...
true
688ac9a7d2c872d789a43aa148f2dbfd88d9f064
SQL
AOzsoylu/plsql-scripts
/sql/undoonline.sql
UTF-8
186
2.75
3
[]
no_license
SELECT SEGMENT_NAME, STATUS, MAX_EXTENTS, TABLESPACE_NAME FROM DBA_ROLLBACK_SEGS WHERE TABLESPACE_NAME like '%UNDO%' and status='ONLINE' ORDER BY tablespace_name, segment_name, status /
true
6f0de607db07725d8e02caeafeb5a5bbd52534d2
SQL
MatildeMoreira/SIBD
/Parte 2/project-db-30/schema.sql
UTF-8
4,851
4.46875
4
[]
no_license
/********************************************************************** * SCHEMA.SQL * * Subject: Information Systems and Databases * Laboratory Teacher: Ines Filipe * Senior Lecturer: Paulo Carreira * * Joao Pedro, 84096 * Matilde, 84137 * Duarte, 94192 *************************...
true
2332b5f9ef718cec47faf6b196ff5a545aa1c83b
SQL
poorjanos/Work-Performance
/Utils/user_name_group.sql
WINDOWS-1250
1,850
3.625
4
[]
no_license
SELECT DISTINCT f_torzsszam, f_nev, f_kiscsoport FROM ( SELECT DISTINCT f_nev, f_csoport, f_login, f_torzsszam, f_kiscsoport, CASE WHEN NOT EXI...
true
b5482ad43bbd10f2c57f6f19695c6394f9ffcd34
SQL
rishafc/cmpsc431
/Registered_Users.sql
UTF-8
1,993
3.171875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.7.7 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: Mar 02, 2018 at 05:06 PM -- 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
fc5f5af418642b2fd346c2d77c6c2c75bb0fa5ff
SQL
jonathancg90/reto_php
/app/BD/bd.sql
UTF-8
483
3.234375
3
[]
no_license
CREATE TABLE UserGroup ( id INT NOT NULL AUTO_INCREMENT, name VARCHAR(40) NOT NULL, PRIMARY KEY(id) ) ENGINE=INNODB; CREATE TABLE User ( id INT NOT NULL AUTO_INCREMENT, email VARCHAR(40) NOT NULL, password VARCHAR(30) NOT NULL, name VARCHAR(40) NOT NULL, last_name VARCHAR(50) NOT NULL, address VAR...
true
0e121d74e503f416844c6d088774a7e9363ea50d
SQL
paullen/SocialMedia
/StoredProcedures.sql
UTF-8
3,375
4.09375
4
[]
no_license
DELIMITER // #1 DROP PROCEDURE IF EXISTS addAccount// CREATE PROCEDURE addAccount(IN usid INT,IN handle VARCHAR(100),IN password VARCHAR(32),IN site VARCHAR(30)) BEGIN DECLARE fname VARCHAR(100); DECLARE lname VARCHAR(200); DECLARE id INT; SELECT firstName,lastName INTO fname,lname FROM users WHERE users.userId=us...
true
74a8c0fcd9bebc879dac318cac6540c5e3a903d2
SQL
MiguelValdez-mv/bd2-202025
/sqls/nivel2/sql_1.sql
UTF-8
1,383
4.1875
4
[]
no_license
/* Nota: esta es una solucion alternativa. La solucion más optima sería creando una tabla temporal a partir de un select que nos permitiera saber la cantidad de museos que tiene cada tour y posteriormente hallar el máximo de esa tabla, pero por errores en phpMyAdmin no se pudo implementar dicha solución*/ select tabl...
true
526b130f3f18fb6f7bbba00ab08245091e0469e3
SQL
pavelprach/db3
/tb_client_mail.sql
UTF-8
363
3.375
3
[]
no_license
create table tb_client_mail ( id int auto_increment primary key, id_mail int not null, id_client int not null, constraint `tb_client-mail_tb_client_id_client_fk` foreign key (id_client) references tb_client (id_client), constraint `tb_client-mail_tb_mail_id_fk` forei...
true
e6084eee1e4577a8f31c9c56f8792746e62c9f5d
SQL
WalidBounouar/eHotels_backup
/SQL/Triggers/RoomPriceTrigger.sql
UTF-8
225
3.1875
3
[]
no_license
DELIMITER // CREATE TRIGGER ehotels.room_price BEFORE INSERT ON ehotels.room FOR EACH ROW BEGIN IF (NEW.price < 0) THEN SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'The room price was under 0'; END IF; END; //
true
23228974881583d848d0239430175424ec9a5b20
SQL
ETamez173/SqlWorkBench
/movies_MATH_Operators.sql
UTF-8
1,291
3.875
4
[]
no_license
-- Using Mathematical Operators /* + - / * % */ SELECT 5 + 6 AS ADDITION; SELECT 8 - 3 AS SUBTRACTION; SELECT 30 / 3 AS DIVISION; SELECT 35 / 3 AS DIVISION; SELECT 4 * 6 AS MULTIPLICATION; SELECT 15 % 4 AS MODULUS; SELECT * FROM movie_revenues; -- Note if there is a NULL in one of the two columns the res...
true
bdf3b1d632351b168b0d8f5d331be7b13b8867f7
SQL
JPablo1997/Registro-Academico
/schema.sql
UTF-8
3,348
3.359375
3
[ "LicenseRef-scancode-unknown-license-reference", "MIT" ]
permissive
DROP DATABASE IF EXISTS `registro`; CREATE DATABASE `registro`; USE `registro`; CREATE TABLE `mat_materia` ( mat_id INTEGER(10) NOT NULL PRIMARY KEY AUTO_INCREMENT, mat_nombre VARCHAR(100) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; CREATE TABLE `grd_grado` ( grd_id INTEGER(10) NOT NULL PRIMARY KEY AUT...
true
43e60877bc7ae3b474a3c99b6517bdc03af4df56
SQL
ricardomorita42/mac350
/3EP/MODULE_CURRICULUM_DML.sql
UTF-8
7,143
2.984375
3
[]
no_license
\c modulo_curriculo SET ROLE dba; ----!! Inserting curriculum !!---- select * from insert_curriculo('BCC' ,'IME','Bacharelado em Ciencia da Computacao' ,111,52,24); select * from insert_curriculo('BMAT','IME','Bacharelado em Matematica' ,111,52,24); select * from insert_curriculo('BEST','IME','Bacharelado em Estat...
true
c90909a8f113137455a3db80369bff8ae1c87c84
SQL
safe-pro/DevSevOps
/6.DBA-ops/1.SQL练习/5.SQL学习/11-using-data-manipulation-functions.sql
UTF-8
580
3.546875
4
[]
no_license
-- 使用数据处理函数 -- 文本处理函数:Upper()函数将文本转换为大写 SELECT vend_name,UPPER(vend_name) AS vend_name_upcase FROM vendors ORDER BY vend_name; -- 日期和事件处理函数 SELECT cust_id,order_num FROM orders WHERE order_date='2005-09-01'; -- 如果要的是日期,请使用Date() SELECT cust_id,order_num FROM orders WHERE DATE(order_date)='2005-09-01'; SELECT cust_id,or...
true
809ea0048d6b7e8bc9d0af13cb6acee801800a94
SQL
00ZRHun/SWAPJE.MY
/database/users.sql
UTF-8
1,732
3.125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.9.3 -- https://www.phpmyadmin.net/ -- -- Host: localhost:8889 -- Generation Time: Jun 03, 2020 at 02:53 PM -- Server version: 5.7.26 -- PHP Version: 7.4.2 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; -- -- Database: `swapje` -- -- -----------------------------...
true
fbce8c3d14f41b9220d13f97f3856ff1581d54b3
SQL
unprofessional/journowatch-spring-api-xml
/tables.sql
UTF-8
2,379
3.890625
4
[ "Apache-2.0" ]
permissive
/* Ensure the OSSP extension for UUID generation is installed */ -- CREATE EXTENSION "uuid-ossp"; -- Table: users DROP TABLE users; CREATE TABLE users ( uuid uuid NOT NULL DEFAULT uuid_generate_v4(), username character varying(16) NOT NULL, email character varying(64), firstname character varying(64), ...
true
ceca8310b6abffe2ab1ae3930b866504563baa1b
SQL
LesterAGarciaA97/OnlineCourses
/08. Coursera/07. Advanced relational database and SQL/Module 1/Week 01/Querys/Task 3.sql
UTF-8
1,249
3.8125
4
[]
no_license
-- -- Welcome to Task 3 !! -- -- Advanced RDB and SQL -- -- Stored Functions -- USE world_peace; DROP FUNCTION IF EXISTS check_credit; DELIMITER $$ CREATE FUNCTION check_credit ( requesting_customer_id CHAR(10), request_amount INT ) RETURNS BOOLEAN DETERMINISTIC BEGIN RETURN ( -- TODO -- -- write an ...
true
da5d294c441d604c7b5822329ae56058b4864055
SQL
empiricaldataman/DB2LS
/SQL/BOOKS/09.11_Index_Most_Splits.sql
UTF-8
641
3.953125
4
[ "MIT" ]
permissive
-- Listing 9.11 Indexes with the most page splits SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED SELECT TOP 20 x.name AS SchemaName , object_name(s.object_id) AS TableName , i.name AS IndexName , s.leaf_allocation_count , s.nonleaf_allocation_count FROM sys.dm_db_index_operational_stats(DB_ID(...
true
55f318e708f8534920b48870a9aba1b7b46ce7ce
SQL
nnnyyy/NSNestLoveLetter
/Database/SP_RegisterUser.sql
UTF-8
510
3.328125
3
[]
no_license
DELIMITER $$ CREATE DEFINER=`root`@`localhost` PROCEDURE `RegisterUser`(IN sID VARCHAR(45), IN sPW VARCHAR(45), IN sNick VARCHAR(45), OUT nRet INTEGER) BEGIN DECLARE cnt INTEGER; SELECT COUNT(*) INTO cnt FROM `game_love_letter`.`account` WHERE id = sID; IF cnt <= 0 THEN INSERT INTO ACCOUNT (id,pw,nick,regdate,last...
true
91eea6590ca678bdf5414c5a592632a91c09b190
SQL
tye-shutty/AudioFileWebService
/db/findFileString.sql
UTF-8
394
3.75
4
[]
no_license
DELIMITER // DROP PROCEDURE IF EXISTS findFileString // CREATE PROCEDURE findFileString ( /* Parameters */ IN email_in VARCHAR(200), IN search_string VARCHAR(600) ) BEGIN SELECT file_id FROM files INNER JOIN folders ON (files.parent = folders.folder_id) WHERE owner_email = email_in AND (file_description...
true
6d612aabad7da1fb387d78baf8e45aec5402a559
SQL
kvignau/piscinePHP
/d05/ex03/ex03.sql
UTF-8
211
2.640625
3
[]
no_license
INSERT INTO db_kvignau.`ft_table` (login, groupe, date_de_creation) (SELECT nom, 3, date_naissance FROM db_kvignau.`fiche_personne` WHERE nom LIKE '%a%' AND LENGTH(nom) < 9 ORDER BY nom ASC LIMIT 10);
true
4ee5f4b1c29c8860b9be82cccac4de33fa20ed76
SQL
adnanfauzi/tugas3
/minum.sql
UTF-8
1,252
2.828125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.0.4.1 -- http://www.phpmyadmin.net -- -- Inang: 127.0.0.1 -- Waktu pembuatan: 26 Mar 2019 pada 17.25 -- Versi Server: 5.5.32 -- Versi PHP: 5.4.19 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!...
true
f730183ac5b9af63907efd8ad70f4786f0dcdac4
SQL
albertusk95/salary-per-hour
/prep/schema.sql
UTF-8
470
3.359375
3
[]
no_license
DROP DATABASE IF EXISTS salary_per_hour_db; CREATE DATABASE salary_per_hour_db; USE salary_per_hour_db; CREATE TABLE employees ( employee_id INT NOT NULL, branch_id INT NOT NULL, salary DECIMAL(10, 2) NOT NULL, join_date DATE NOT NULL, resign_date DATE, PRIMARY KEY (employee_id) ); CREATE TABLE timesheets ( ...
true
9a902e452cfe9c86a29c33c8f6ac87ede93f410c
SQL
taguz91/PF-Instituto-M3A-F1
/BaseDatos/Consultas/CorreosPorPeriodo.sql
UTF-8
286
2.859375
3
[]
no_license
SELECT persona_correo AS correos FROM public."Matricula" m JOIN public."Alumnos" a ON a.id_alumno = m.id_alumno JOIN public."Personas" p ON p.id_persona = a.id_persona WHERE m.id_prd_lectivo = 21; -- Periodos (TDS 21, TAS 22, TAF 23, TSMI 24, TSE 25, EDTS 26, SP 27, TSPM 28, DII 29)
true
899ce743af03dbea7ccb88545e57ee244aa4819b
SQL
emWeinfurter/cic2020inters_PoC
/Artifacts/candidate_interviews_assignments_postresql_alter_table.ddl
UTF-8
264
2.578125
3
[]
no_license
alter table candidate_interviews_assignments add constraint check_interview_status_code check (interview_status_code in ('P', 'I', 'C', 'D', 'R')); -- Interview Status Codes -- P = Pending -- I = Incomplete -- C = Complete -- D = Deferred -- R - Reassigned
true
9d99e1630999ba9472ad800c42ce500eeb23110b
SQL
Meetigandhi/OHS-Portal
/database/serviceDb.sql
UTF-8
3,807
3.21875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.6.5.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: May 06, 2020 at 02:45 AM -- Server version: 10.1.21-MariaDB -- PHP Version: 5.6.30 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SE...
true
5dd7e20b9098e080c55924b1b6855651760e90b4
SQL
renevans/lab-sql-subqueries
/Lab 3.02.sql
UTF-8
3,345
4.53125
5
[]
no_license
USE sakila; -- 1. How many copies of the film Hunchback Impossible exist in the inventory system? SELECT COUNT(inventory_id) as Number_of_copies FROM inventory WHERE film_id in( SELECT film_id FROM film WHERE title = 'Hunchback Impossible'); -- 2. List all films whose length is longer than the average of all the ...
true
ec3a5a85c3c015ed34d6ddce99a82184e32f6fb9
SQL
stephen-soltesz/ipython-testing
/total_discards.sql
UTF-8
686
3.609375
4
[ "Apache-2.0" ]
permissive
#standardSQL SELECT hostname, FORMAT_TIMESTAMP("%Y-%m-%d", TIMESTAMP_TRUNC(sample.timestamp, DAY)) AS day, UNIX_SECONDS(TIMESTAMP_TRUNC(sample.timestamp, DAY)) AS ts, -- regexp_extract(metric, r"switch.([a-z]+).uplink.tx") as metric, SUM(IF(metric = 'switch.discards.uplink.tx', sample.value, 0)) AS total_disc...
true
40d0f74bc20f82377cdad973039c71cb2173d93e
SQL
fenglixiong123/back-netty-chat
/netty-chat-auth/netty-chat-auth-console/src/main/resources/db/migration/V2021010100005__createAuthRolePermission.sql
UTF-8
1,129
3.3125
3
[]
no_license
SET NAMES utf8mb4; SET FOREIGN_KEY_CHECKS = 0; -- ---------------------------- -- Table structure for basic_bucket_part -- ---------------------------- CREATE TABLE IF NOT EXISTS `web_auth`.`auth_role_permission` ( `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键', `role_id` bigint(20) UNSIGNED NO...
true
5b9621df1270892c318ec5b0f3f312946559d58f
SQL
warriors230/test-repositorio
/kids.sql
UTF-8
6,692
3.328125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.0.1 -- https://www.phpmyadmin.net/ -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 28-04-2020 a las 19:27:59 -- Versión del servidor: 10.1.32-MariaDB -- Versión de PHP: 7.2.5 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"...
true
eed541834ec7ac090db94206a9042a1ca96f03a1
SQL
ichaeeun/javaexp
/javaexp/src/a00_exp/a12_1229/a12_1229.sql
UTF-8
3,511
4.15625
4
[]
no_license
/* 데이터베이스 1. [하]타입변환에서 명시적/묵시적 형변환의 의미를 기술하고, 묵시적 형변환이 일어나는 이유와 해당 예제를 간단한 코드로 기술하세요. 명시적 형변환: 함수를 통한 형변환 묵시적 형변환: 조건문에서 해당 type을 정확하게 표시하지 않더라도 오라클 시스템 내부에서 타입을 변환해주기 떄문에 묵시적 형변환이 일어난다. */ SELECT '25'+25 FROM dual; -- 결과: 50 /* 2. [하]명시적 형변환 3가지의 기본형식과 기본예제를 기술하세요. to_char(숫자/날짜 타입을 문자열로), to_number(문자,날...
true
9d6bab98cbef8d5b04384f577665bb3ebad7b036
SQL
yahong2018/imms-aisan
/src/main/sql/mfc.sql
UTF-8
6,832
3.3125
3
[]
no_license
create table zhxh_rfid_card ( record_id bigint auto_increment not null, kanban_no varchar(20) not null, rfid_no varchar(20) not null, card_type int not null, -- 卡类别: 1.员工卡 2.数...
true
b67d8240d45fc4b691ceaf94c30f5273c56bb516
SQL
ptomulik/veetou
/share/oracle/packages/veetou/tables/ko/ko_student_semesters_j.ddl
UTF-8
1,039
3.421875
3
[]
no_license
CREATE TABLE v2u_ko_student_semesters_j OF V2u_Ko_Student_Semester_J_t ( -- PK CONSTRAINT v2u_ko_student_semesters_j_pk PRIMARY KEY (student_id, specialty_id, semester_id, job_uuid) -- FK , CONSTRAINT v2u_ko_student_semesters_j_f0 FOREIGN KEY (job_uuid) REFE...
true
12e1102061c93bc0e7237f18a98ea20d9df37bca
SQL
jake-jeon9/study
/JSP/21-member2/WebContent/sql/member.sql
UTF-8
1,054
3.515625
4
[]
no_license
-- 그냥 참고용!!!! (여기서 바꾼다고 바뀌지 않음) -- 회원관리 테이블 -- primary key: 기본키, unique, not null create table member ( name varchar2(30) not null, id varchar2(30) primary key, pwd varchar2(30) not null, gender varchar2(3), email1 varchar2(30), email2 varchar2(30), tel1 varchar2(10), tel2 varchar2(10), ...
true
c337d44fda7419b8b97a2015f6c03ee9d526fe16
SQL
khashayar/cheatsheets
/postgresql/intro.sql
UTF-8
1,445
3.546875
4
[ "MIT" ]
permissive
-- CONNECT psql -U USERNAME -h HOST -d DB_NAME -- INDEX CREATE INDEX idx_name ON table_name( (json #>> '{externalIds,pubmed}'::text[]) ); -- Examples CREATE UNIQUE INDEX pub_row_idx ON publication(row); CREATE INDEX pub_pubmed_idx ON publication((json #>> '{externalIds,pubmed}'::text[])); -- GIN INDEX CREATE INDEX g...
true
6f2e39873a339bb1ad7e52231c3a50a51ed7c7ac
SQL
edu526/projectWeb
/bd_alquiler.sql
UTF-8
1,088
3.078125
3
[]
no_license
create table empleado( codEmp char(5) primary key, nomEmp varchar(50), apeEmp varchar(50), dirEmp varchar(100), dniEmp char(8) , licCon varchar(50), telEmp varchar(20) , seguroEmp varchar(50), emailEmp varchar(50) ); create table vehiculo( codVeh char(5) primary key, NFlota varch...
true
b100d7b3836f0146ca3dcba8c2a356e2fa26029f
SQL
winerr/Epam_tasks
/sql_homework/homework_2_db1.sql
UTF-8
3,156
3.96875
4
[]
no_license
create database if not exists students; use students; create table if not exists `subject`( `id` int auto_increment primary key, `subject` varchar(30) not null, `control` enum('exam', 'test') not null, `number_of_semester` int not null, `teacher` varchar(50) not null ); create table if not exists `...
true
fcf5db49a4e92b2c92a76a31236d1a72f752052a
SQL
Chanchanloo/SQLbasics
/SQL_sum_count.sql
UTF-8
1,747
4.375
4
[]
no_license
#List all the continents - just once each SELECT continent FROM world GROUP BY continent; #Give the total GDP of Africa SELECT SUM(gdp) FROM world WHERE continent = 'Africa'; #How many countries have an area of at least 1000000 SELECT COUNT(name) FROM world WHERE area >= 1000000; #What is the total population of ('...
true
b484093600886f4ae96bc9608a0fbf26434c9e93
SQL
IP-CAM/My-Blog-and-some-small-Project-with-Opencart-v.2.1.0.2
/tp5/site/install/install.sql
UTF-8
197,520
3.390625
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : 本地mysql Source Server Version : 50553 Source Host : localhost:3306 Source Database : tp5 Target Server Type : MYSQL Target Server Version : 50553 File Encoding : 65001 Date: 2017-10-09 17:22:46 */ SET FOREIGN_KEY_CHECKS=0; -- -------...
true
f6b349cb7bf6082b80e04ed6fc3caebf77317ed9
SQL
Griffenck1/Buffbuss-Heatmap
/data/Database/query.sql
UTF-8
381
3.328125
3
[]
no_license
--> This is the query that did all the leg work, it is real dense SELECT s.label, count(ip), latitude, longitude FROM buffbus_data.session INNER JOIN buffbus_data.stop s on s.id = session.estimated_departure_stop INNER JOIN buffbus_data.location l on l.label = s.label WHERE start_time > '15:00:00' AND start...
true
6ea31afd9a1d6c0432c2415014148c3ba11a1a90
SQL
jeager/MinhasReceitasBD2
/db_designer_files/trab_final.sql
UTF-8
16,824
3.46875
3
[]
no_license
CREATE TABLE categoria ( idcategoria INTEGER UNSIGNED NOT NULL AUTO_INCREMENT, nome VARCHAR NULL, PRIMARY KEY(idcategoria) ); CREATE TABLE uf ( iduf INTEGER UNSIGNED NOT NULL AUTO_INCREMENT, nome VARCHAR NULL, PRIMARY KEY(iduf) ); CREATE TABLE receita ( idreceita INTEGER UNSIGNED NOT NULL A...
true
f9d26b32915c2149872d193307a96efa438cb731
SQL
yurelle/FBI_Active_Shooter_Incidents_2000-2018
/Example Queries/All Statistics by Location.sql
UTF-8
243
3.296875
3
[ "Unlicense" ]
permissive
-- All Statistics by Location SELECT LocationType, COUNT(*) AS Incidents, SUM(Deaths) AS Deaths, SUM(Wounded) AS Wounded, SUM(TotalCasualties) AS TotalCasualties FROM incident GROUP BY LocationType ORDER BY Incidents DESC;
true
579499afc1a5e166fdc1d74182fb08254c067d35
SQL
mdas92/eldb
/Cp8/sql/1_cp8_feature_filter.sql
UTF-8
453
2.828125
3
[]
no_license
\echo 'filtering cp8..' --cp8 create table eldb_cp8.cp8_optimized_feature_facts as (select fact_did,product_def,user_def,session_def,license_def,pff.data_category,pff.data_name,data_value,feature_time,sequence_no,continuous_count,month_key,product_version from eldb_cp8.cp8_product_feature_facts pff,eldb.cp_initial_fe...
true
1b4ccbc46b7cc18ab337d1206bcddbda00605cdc
SQL
seantao97/publicProjects
/GuessTwoo/v8/Dump20160724/guesstwoo_storyv1.sql
UTF-8
2,854
3.125
3
[]
no_license
-- MySQL dump 10.13 Distrib 5.7.9, for Win64 (x86_64) -- -- Host: localhost Database: guesstwoo -- ------------------------------------------------------ -- Server version 5.7.10-log /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RES...
true
b5de41d09e99d01d7aa2b9c9cb89da09bd640c0c
SQL
steph7908/homework_06
/basic.sql
UTF-8
5,934
4.375
4
[]
no_license
--Write a query to select all of the columns in the tutorial.us_housing_units table without using *. SELECT year, month, month_name, south, west, midwest, northeast FROM tutorial.us_housing_units --Write a query to select all of the columns in tutorial.us_housing_units and rename them so that their first letters are ...
true
9860e5fbcaac644e946a480e4665fcf50deb68ae
SQL
M-O-S-E-S/mgm
/serverFiles/000-mgm.sql
UTF-8
11,979
3.140625
3
[ "MIT" ]
permissive
SET FOREIGN_KEY_CHECKS = 0; CREATE TABLE IF NOT EXISTS `mgmDb` ( `version` int(10) unsigned NOT NULL, `description` varchar(100) NOT NULL, `timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, KEY `migration_version` (`version`) ) ENGINE=INNODB DEFAULT CHARSET=latin1; CREATE TABLE IF NOT EXISTS `estateba...
true
62cfb18d6f5a72bbdf97c08cc3a958d2f703c93f
SQL
Nomasson/Php-site
/Database/resorts.sql
UTF-8
3,526
3.078125
3
[ "LicenseRef-scancode-unknown-license-reference", "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 5.0.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: פברואר 23, 2020 בזמן 12:38 PM -- גרסת שרת: 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
8c6f8ede98633aa1315e9f6e99247842071664e1
SQL
flodiebold/dcss_henzell
/unwon.sql
UTF-8
496
3.78125
4
[]
no_license
CREATE OR REPLACE VIEW distinct_combos AS SELECT DISTINCT charabbrev FROM logrecord; CREATE OR REPLACE VIEW unwon_combos AS SELECT dc.charabbrev FROM distinct_combos dc WHERE NOT EXISTS (SELECT * FROM logrecord lr WHERE lr.charabbrev = dc.charabbrev AND ktyp = 'winning'); SELECT lr...
true
3380581f5b536f1ded6c0feef59d1a9626f28348
SQL
MariRomNick/sql_homeworks
/lesson_3_homework_romanova.sql
UTF-8
3,500
3.296875
3
[]
no_license
--ñõåìà ÁÄ: https://docs.google.com/document/d/1NVORWgdwlKepKq_b8SPRaSpraltxoMg2SIusTEN6mEQ/edit?usp=sharing --task17 --Êîðàáëè: Íàéäèòå ñðàæåíèÿ, â êîòîðûõ ó÷àñòâîâàëè êîðàáëè êëàññà Kongo èç òàáëèöû Ships. select battle from outcomes o join ships s on o.ship =s.name where class='Kongo' --task1 --Êîðàáëè: Äëÿ êàæäîã...
true
373c48043d33d20e0f7a4c14ae66fe0d71d33b7c
SQL
iblladi/CompagnieAerienneBelfortaine
/old/VIEW.sql
UTF-8
2,109
3.46875
3
[]
no_license
-- ----------------------------------------------------------------------------- -- VUE : view_volreel_recherche -- ----------------------------------------------------------------------------- CREATE OR REPLACE VIEW VIEW_VOLREEL_RECHERCHE AS (SELECT vr.code_volreel, vr.num_volcom, vr.VILLEDEP_...
true
2f0c8dd437c248b1df8c88d02637c3114cb936c4
SQL
ppedvAG/SQL-Server-Abfragen
/SQL_Abfragesprache/SQL_Abfragesprache/017_Procedure.sql
UTF-8
741
3.453125
3
[]
no_license
-- Procedures -- Syntax -- CREATE PROC pName, p_Name, usp_Name, uspName,... NICHT sp_Name -- AS -- ..... -- sp_help Customers -- Bsp.: CREATE PROC pDemo100 AS SELECT TOP 1 * FROM Orders ORDER BY Freight SELECT TOP 1 * FROM Orders ORDER BY Freight DESC SELECT Country FROM Customers WHERE CustomerID ...
true
ff778d4a6cf3ba2f643f6a833c875c808ace3d9c
SQL
silence-do-good/stress-test-Postgres-and-MySQL
/dump/high/day25/select0639.sql
UTF-8
177
2.65625
3
[]
no_license
SELECT timeStamp, temperature FROM ThermometerOBSERVATION o WHERE timestamp>'2017-11-24T06:39:00Z' AND timestamp<'2017-11-25T06:39:00Z' AND temperature>=9 AND temperature<=59
true
36122fe604c39a230fe8eb84d15360dc5254e5ed
SQL
jth2698/employee-tracker
/sql/seed.sql
UTF-8
442
3.21875
3
[ "MIT" ]
permissive
USE employee_db; INSERT INTO departments (name) VALUES ("Executive"), ("Sales"), ("Accounting"); INSERT INTO roles (title, salary, department_id) VALUES ("CEO", 100000.00, 1), ("CSO", 75000.00, 2), ("CFO", 75000.00, 3); INSERT INTO employees (first_name, last_name, role_id) VALUES ("Paul", "President", 1); INSER...
true
49a553a63ad56c29e4c8bddc5f630eb9e0029ee0
SQL
Arjunar92/SQL_LeetCodePractice
/1341. M - Movie Rating.sql
UTF-8
1,070
4.625
5
[]
no_license
#Find the name of the user who has rated the greatest number of movies #In case of a tie, return lexicographically smaller user name. #Find the movie name with the highest average rating in February 2020. #In case of a tie, return lexicographically smaller movie name. with cte_1 as ( select m.user_id , u.name, cou...
true
21a08d085e69977cf772fdf224e3b587a17890a5
SQL
swoole/swoole-src
/tests/pgsql.sql
UTF-8
445
3
3
[ "Apache-2.0" ]
permissive
DROP TABLE IF EXISTS weather; CREATE TABLE weather ( id SERIAL primary key NOT NULL, city character varying(80), temp_lo integer, temp_hi integer, prcp real, date date); INSERT INTO weather(city, temp_lo, temp_hi, prcp, date) VALUES ('San Francisco', 46, 50, 0.25, '1994-1...
true