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
adee8a27a1a9cfd0942a8e2562dd570290b4c476
SQL
lixu0818/ERMS
/sql/insert_mock_data.sql
UTF-8
14,426
2.828125
3
[]
no_license
use cs6400_team021; insert into User (username, password, type) VALUES ('user1', '123', 'Individual'); insert into User (username, password, type) VALUES ('user2', '123', 'Company'); insert into User (username, password, type) VALUES ('user3', '123', 'Municipality'); insert into User (username, password, type) VALUES ...
true
fdfc0dbaae3efd4a4255b25c98510f4be5ab4ea3
SQL
xiahuidefanfan/mumu
/mumu-admin/sql/sys_dict.sql
UTF-8
2,299
2.828125
3
[]
no_license
/* SQLyog Ultimate v12.3.1 (64 bit) MySQL - 5.7.20-log ********************************************************************* */ /*!40101 SET NAMES utf8 */; create table `sys_dict` ( `id` int (11), `num` int (11), `pid` int (11), `name` varchar (765), `code` varchar (150), `tips` varchar (765) ); insert into `s...
true
300367767929a02272921e690e80585685710990
SQL
King-01/dbmsproject
/tablegenerator.sql
UTF-8
11,045
3.609375
4
[]
no_license
-- Script written so as to be able to generate the schema tables drop database if exists `merchant-manager`; create database if not exists `merchant-manager`; use `merchant-manager`; -- Table creation script DROP TABLE IF EXISTS `user`; CREATE TABLE user ( id int not null auto_increment, displayname varchar(50) not...
true
5fa7ece78b8a1e4e2842e383a4888da0cf320494
SQL
CuriousIbrahim/bit-url
/sql/create.sql
UTF-8
1,020
3.96875
4
[ "MIT" ]
permissive
CREATE TABLE url ( id text PRIMARY KEY, original_url text NOT NULL, times_visited integer default 0 not null, created_at timestamp with time zone default current_timestamp ); create table country ( code text primary key, name text not null, iso_code_1 text, iso_co...
true
be9f551bbed6831ae921b6d03232b459cb452204
SQL
autofires/DAW-SIST31A-GP2
/SistemaVentasV2/basedatos/sistema_vehiculos.sql
UTF-8
5,603
3.375
3
[]
no_license
/* SQLyog Enterprise v13.1.1 (64 bit) MySQL - 10.1.37-MariaDB : Database - sistema_vehiculos ********************************************************************* */ /*!40101 SET NAMES utf8 */; /*!40101 SET SQL_MODE=''*/; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_...
true
bee3521171a09c4b885b5404b5c627441b52ac82
SQL
ASketin/Database_KIB_2021
/Week3/solutions/fourth_task.sql
UTF-8
528
4.1875
4
[]
no_license
-- Для всех треков жанра Rock и Metal, для каждого артиста подсчитать количество треков. -- Вывести имя артиста, количество треков. (artist_name, qty) SELECT art.name as artist_name, COUNT(track_id) as qty FROM artist art JOIN album a USING (artist_id) JOIN track t USING (album_id) JOIN (SELECT * ...
true
4f7968785f8658d0e72533affd5ffd9eefd2ad64
SQL
vyesubabu/metview
/odb_api_bundle-0.17.6-Source/odb/src/ddl.CCMA/robody_min.sql
UTF-8
1,984
3.046875
3
[]
no_license
// //-- ODB/SQL file 'robody.sql' // // Last updated: 08/04/2010 A. Fouilloux Remove tcwv_fg // // Yannick: hardcoded 3 in obs_diags_* READONLY; SET $tslot = -1; SET $kset = 0; CREATE VIEW robody_min AS SELECT entryno, varno, // r/o datum_anflag UPDATED, // po...
true
682f0be22af903f3b861609ccef30811639a0574
SQL
IP-CAM/My-Blog-and-some-small-Project-with-Opencart-v.2.1.0.2
/mok/CHANGELOG/db/faq/oc_faq_product.sql
UTF-8
1,137
2.78125
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : 192.168.100.27 Source Server Version : 50515 Source Host : 192.168.100.27:3306 Source Database : mok Target Server Type : MYSQL Target Server Version : 50515 File Encoding : 65001 Date: 2016-12-25 20:05:37 */ SET FOREIGN_KEY_CHECKS=0;...
true
73075a7baddaf3b90fc5e379e7f0d111c5528aca
SQL
ojalaquellueva/cods
/sql/keyword.sql
UTF-8
1,319
2.96875
3
[]
no_license
-- ---------------------------------------------------------- -- Flag potentially cultivated observations by keyword -- -- Requires parameter: -- $tbl_user_data_raw --> :tbl_user_data_raw (job-specific temp table) -- ---------------------------------------------------------- UPDATE :tbl_user_data_raw SET description_u...
true
314218c31e68d7c23af8c53036c070651208119d
SQL
baygoit/GoJava
/trunk/GoJava7/v.komlev/WebKikstarter/target/webkikstarter/WEB-INF/classes/DB/create_tables.ddl
UTF-8
1,038
3.421875
3
[]
no_license
CREATE TABLE payments ( id INTEGER NOT NULL PRIMARY KEY, user_name VARCHAR2(100) NOT NULL, number_card NUMBER(16) NOT NULL, amount_donation NUMBER(10) NOT NULL, project_id INTEGER NOT NULL, FOREIGN KEY (project_id) REFERENCES projects(id) ); CREATE TABLE quotes ( content VARCHAR2(500) NOT NULL, author VA...
true
b59e642b6854ca31a1dc625e5d32c099867bcdf8
SQL
fun2vault/Team-4-Project
/update1.sql
UTF-8
1,594
3.96875
4
[]
no_license
DELIMITER $$ CREATE TRIGGER order_stock_deduction AFTER INSERT ON Order_Details FOR EACH ROW BEGIN /* CLEAN UP */ DROP TEMPORARY TABLE IF EXISTS BOM; DROP temporary TABLE IF EXISTS CBOM; /* create temp table to hold the BoM */ CREATE TEMPORARY TABLE BOM ( model_id int(11) ,part_id int(11) ,model_q...
true
6363b4354bb0b07cbdeb9ed1bc2beed4be4d1d5f
SQL
developer38/AmexCodingAssignment
/AmexCodingAssignment/src/main/resources/person-data-table.sql
UTF-8
468
2.703125
3
[]
no_license
DROP TABLE IF EXISTS person; create table person ( id integer NOT NULL, name varchar(25) NOT NULL, age integer(3) NOT NULL, dateOfBirth date not null, email varchar(50) NOT NULL ); INSERT INTO person VALUES (1, 'person1', 31, '1981-01-01', 'person1@gmail.com'); INSERT INTO person VALUES (2, 'person2', 32, '1982-02-0...
true
f3981cb8d8b1e352c031315814eef02cc8743671
SQL
matrix-org/synapse
/synapse/storage/schema/main/delta/59/04_event_auth_chains.sql
UTF-8
1,689
3.609375
4
[ "Apache-2.0" ]
permissive
/* Copyright 2020 The Matrix.org Foundation C.I.C * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable l...
true
97fd222603ddc651c99813f17992b8fa108e57ad
SQL
addn-d4ti/survey-kepuasan-smart
/db/db_kantin.sql
UTF-8
8,198
2.875
3
[ "LicenseRef-scancode-unknown-license-reference", "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.7.9 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Nov 17, 2020 at 06:32 AM -- Server version: 10.1.31-MariaDB -- PHP Version: 7.2.3 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
true
37a33b10c4a68f8c91d55f9fe28b6d61f233ad5f
SQL
cbayonao/sql-mysql
/class2.sql
UTF-8
5,891
4.625
5
[]
no_license
-- Obtiene el campo name, email, gender de la tabla clientes -- donde el genero es F -> Female SELECT name, email, gender FROM clients WHERE gender = 'F'; -- Obtiene el campo name, email, gender de la tabla clientes -- donde el genero es M -> Male SELECT name, email, gender FROM clients WHERE gender = 'M'; -- Obtiene...
true
9a502157f7e3be51fdb86539b8359000d8bf5997
SQL
praneeth34/pern_login
/database.sql
UTF-8
702
3.25
3
[]
no_license
CREATE DATABASE loginauth; CREATE TABLE users( user_id uuid DEFAULT uuid_generate_v4(), user_name VARCHAR(255) NOT NULL, user_email VARCHAR(255) NOT NULL UNIQUE, user_password VARCHAR(255) NOT NULL, PRIMARY KEY (user_id) ); CREATE TABLE employees( user_id uuid DEFAULT uuid_generate_v4(), e...
true
0fb5228c40f98a85fd8381e47a3aef73af4ff165
SQL
z0t0b/ISMN3830
/ClassActivities/Database Creation/CREATE_ELITE_VIDEO_DB_MySQL.sql
UTF-8
6,412
3.578125
4
[]
no_license
Create Database EliteVideo; Use EliteVideo; CREATE TABLE PRICE ( PRICE_CODE NUMERIC(2,0) PRIMARY KEY, PRICE_DESCRIPTION VARCHAR(20) NOT NULL , PRICE_RENTFEE NUMERIC(5,2) CHECK (PRICE_RENTFEE >= 0), PRICE_DAILYLATEFEE NUMERIC(5,2) CHECK (PRICE_DAILYLATEFEE >= 0) ); CREATE TABLE MOVIE ( MOVIE_NUM NUMERIC(8,0) PR...
true
50b47943f9ae7b899ceb7c3ef6880ca94708bf64
SQL
lukaskolehotsky/cecky
/src/main/resources/schema.sql
UTF-8
1,292
3.03125
3
[]
no_license
CREATE TABLE files ( id varchar(100) NULL, img_path varchar(1000) NULL, file_name varchar(100) NULL, file_type varchar(100) NULL, guid varchar(100) NULL, PRIMARY KEY (id) ); CREATE TABLE items ( id varchar(100) NULL, brand varchar(100) NULL, type varchar(100) NULL, guid varchar(100) NULL, created_date_time ti...
true
d9f063789878f43145140ea35c2fb3a636e0e70f
SQL
vijaydairyf/TimelyFish
/SolomonApp/dbo/Views/dbo.cfvPigGroupRoom.sql
UTF-8
293
2.59375
3
[]
no_license
/****** Object: View dbo.cfvPigGroupRoom Script Date: 12/8/2004 8:30:00 PM ******/ CREATE View cfvPigGroupRoom AS Select pg.SiteContactID, pg.BarnNbr, pg.PigGroupID, pg.PGStatusID, rm.RoomNbr From cftPigGroup pg JOIN cftPigGroupRoom rm ON pg.PigGroupID=rm.PigGroupID
true
ad4271356126feeb25e172ca3f553db2a187504b
SQL
provingground-moe/cat
/sql/setup_storedFunctions.sql
UTF-8
4,452
3.984375
4
[]
no_license
-- LSST Data Management System -- Copyright 2008, 2009, 2010 LSST Corporation. -- -- This product includes software developed by the -- LSST Project (http://www.lsst.org/). -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by ...
true
456dcccb3b7943908bc08612d7d755e9515a4d27
SQL
madeinsiha/qichong
/qc_server/pet.sql
UTF-8
532
2.75
3
[]
no_license
SET NAMES UTF8; DROP DATABASE IF EXISTS pet; CREATE DATABASE pet CHARSET=UTF8; USE pet; /**用户信息**/ CREATE TABLE user( uid INT PRIMARY KEY AUTO_INCREMENT, uname VARCHAR(32), upwd VARCHAR(32), email VARCHAR(64), phone VARCHAR(16) NOT NULL UNIQUE, #手机号码 avatar VARCHAR(128), #头像图片路径 user_name VAR...
true
e77641b56a1425af1f7667e7f9e2231fe645bb09
SQL
borisdagnon/NGM_CHOIR_PHP
/TRIGGERS.sql
UTF-8
284
2.703125
3
[]
no_license
CREATE TRIGGER après_insertion_audios AFTER INSERT ON audios FOR EACH ROW BEGIN ALTER TABLE audios AUTO_INCREMENT = 1; END; CREATE TABLE commentaire( id SMALLINT (6) PRIMARY key AUTO_INCREMENT , nom_commentateur varchar(40), prenom_commentateur varchar(40), commentaire TEXT )
true
a35229a8a9d1db68a9789b4f26490d54130a845d
SQL
mkoldaev/binklines
/dump_sql/klines_tables.sql
UTF-8
3,724
2.796875
3
[]
no_license
CREATE TABLE `kline_1d` ( `id` int(11) NOT NULL AUTO_INCREMENT, `para` varchar(45) COLLATE utf8_bin DEFAULT NULL, `time_open` varchar(45) COLLATE utf8_bin DEFAULT NULL, `time_close` varchar(45) COLLATE utf8_bin DEFAULT NULL, `price_open` varchar(45) COLLATE utf8_bin DEFAULT NULL, `max_price` varchar(45) CO...
true
9deee380799da305652f7625a3350a5269ce8e39
SQL
bartek3pl/CS-Studies
/SQL/lista 2/10.sql
UTF-8
340
3.609375
4
[]
no_license
with POM as ( select wybor.kod_grupy, count(distinct wybor.kod_uz) as "liczba" from wybor join grupa using (kod_grupy) join przedmiot_semestr using (kod_przed_sem) join semestr using (semestr_id) where semestr.nazwa='Semestr letni 2016/2017' and grupa.rodzaj_zajec='w' group by wybor.kod_grupy ) select avg(li...
true
c5c9b44a8506c82d49a43497b0ac5c5613b3463f
SQL
andri000me/aplikasi_aman
/aman_ori.sql
UTF-8
6,799
3.265625
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.7.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jun 12, 2019 at 01:05 PM -- Server version: 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
de990664c19df8d46e36e364e308054291269c72
SQL
ReneNyffenegger/about-MSSQL
/administration/schemas/sys/objects/views/sql_modules/object-definitions.sql
UTF-8
334
3.171875
3
[]
no_license
select mod.definition definition, obj.modify_date obj_mod_dt from sys.objects obj join sys.sql_modules mod on obj.object_id = mod.object_id join sys.schemas sch on obj.schema_id = sch.schema_id where lower(obj.name) = 'tq84_ect' and lower(sch.na...
true
0c29b2147212e64c87414ba707729a2a3f310e0f
SQL
stevexenios/RDM
/sql/question_2.sql
UTF-8
690
4.625
5
[]
no_license
-- For all students in their fourth year, check if they have taken courses worth of 20 credits in the department associated with their major WITH dept_course AS ( -- Get course + department table SELECT c.*, d.Major_declaration_ID FROM Courses c LEFT JOIN Departments d ON c.Department_ID = d...
true
5440ba0dd57dd1c8e1918f4ad67e231439b19b5e
SQL
gonzalob24/Learning_Central
/MySQL/SQL/sql-basics/11 Nested Queries.sql
UTF-8
739
3.890625
4
[]
no_license
-- using mutliple SELECT statments to get specific data -- Find names of all employess who have sold over 30,000 -- to a single client -- now we have all of the ids who sold > 30k SELECT works_with.emp_id FROM works_with WHERE works_with.total_sales > 30000; SELECT employee.first_name, employee.last_name FROM employe...
true
c95f9edf9f70304d9880fd7c7a149aa00cbea364
SQL
alfonsuslibra/SQL-data-analysis
/Practice 4/Practice 4.sql
UTF-8
2,714
4.1875
4
[]
no_license
# Number 1 with t0 as ( select t.*, Saham_invested_amount + Pasar_Uang_invested_amount + Pendapatan_Tetap_invested_amount + Campuran_invested_amount as Total_invested_amount from transactions t ), t1 as ( select t0.*, u.user_age , case when u.user_age between 17 and 22 then "Group 17 - 22" when u.user_age between...
true
52884a48a26663ffd03154f7a2dff6bc11d09aba
SQL
Learning2021/MIMICIII_Research
/Data Generation/genDataScripts/validICUStays.sql
UTF-8
1,172
3.96875
4
[]
no_license
with t1 as ( select ie.subject_id, ie.hadm_id, ie.icustay_id, CASE WHEN gender = 'F' THEN '0' WHEN gender = 'M' THEN '1' ELSE '-1' END AS gender_num, CASE WHEN first_careunit = 'CCU' THEN '1' WHEN first_careunit = 'CSRU' THEN '2' WHEN first_careunit = 'MICU' THEN '3' WHEN first_careunit = 'SICU' T...
true
81c5ac6b6b33c11e058523de70a3dd37ebc97c69
SQL
charlescifuentes/cwtiquetes
/database/database-1.0.0.sql
UTF-8
16,611
2.9375
3
[ "LicenseRef-scancode-unknown-license-reference", "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 16-04-2018 a las 17:04:38 -- Versión del servidor: 10.1.13-MariaDB -- Versión de PHP: 5.6.21 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT...
true
88ab6e58295d8613af781944b9f1826e9518df78
SQL
SoloshenkoVeronika/flower
/src/main/resources/first_script.sql
UTF-8
4,372
3.296875
3
[]
no_license
CREATE TABLE flower( id int(3) NOT NULL AUTO_INCREMENT, species varchar(60) NOT NULL, sort varchar(100) NOT NULL, color varchar(30) NOT NULL, length float(2) NOT NULL, amount int(3) NOT NULL, price float(2) NOT NULL, picture varchar(256) NULL, PRIMARY KEY (id) ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAUL...
true
15738b1e6dd9ce436a148fffc896df538f3cf3f6
SQL
PDOK/brt2mvt
/create_spoorbaandeellijn.sql
UTF-8
911
2.828125
3
[]
no_license
CREATE TABLE spoorbaanlijn AS ( SELECT type_spoorbaan, spoorbreedte, aantal_sporen, status, hoogteniveau, vervoerfunctie, elektrificatie, fysiek_voorkomen, viscode, ST_Transform(shape, 3857)::geometry(MULTILINESTRING, 3857) AS geom , ARRAY[12,13,14] AS zoomlevel FROM fgdb_brt.spoorbaandeellijn_6...
true
fa3111f4c3420baa0d6c61fc3fa637afda5952c7
SQL
LINLUOOO/AWS2test
/backend/db/seed/db_with_data.sql
UTF-8
18,238
3.28125
3
[]
no_license
CREATE DATABASE IF NOT EXISTS `medsec` /*!40100 DEFAULT CHARACTER SET utf8 */; USE `medsec`; -- MySQL dump 10.13 Distrib 5.7.22, for osx10.13 (x86_64) -- -- Host: 127.0.0.1 Database: medsec -- ------------------------------------------------------ -- Server version 5.7.22 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@...
true
314182c04ad5d657145641a728874e5229e44b68
SQL
StephanGrochowina/footballprediction
/football-prediction-backend/sql/model/poisson/queries/determine_estimated_total_goals_by_odds.sql
UTF-8
2,527
4.0625
4
[]
no_license
-- Odds: (1.92, 2.08) SELECT matching_total_goals_id, threshold, expected_total_goals, probability_less_than_threshold, probability_greater_than_threshold, odd_less_than_threshold, odd_greater_than_threshold, sqrt(power(odd_less_than_threshold - 1.92, 2) + power(odd_grea...
true
5a6a2c6d9d7032c6442bec64235af93564233687
SQL
nowksu/DataBase
/func_ex4.sql
UTF-8
325
2.71875
3
[]
no_license
SELECT empno, ename, mgr, CASE WHEN mgr IS NULL THEN '0000' WHEN SUBSTR( mgr, 1, 2 ) = '75' THEN '5555' WHEN SUBSTR( mgr, 1, 2 ) = '76' THEN '6666' WHEN SUBSTR( mgr, 1, 2 ) = '77' THEN '7777' WHEN SUBSTR( mgr, 1, 2 ) = '78' THEN '8888' ELSE TO_CHAR( mgr ) END AS CHG_MG FROM e...
true
2d3a642f5aee9013e1067fd0c215ead07c0322a9
SQL
phoenix110/works2
/modules/core/db/update/postgres/17/170705-1-createStockItem.sql
UTF-8
504
2.5625
3
[]
no_license
create table WORKS_STOCK_ITEM ( ID uuid, VERSION integer not null, CREATE_TS timestamp, CREATED_BY varchar(50), UPDATE_TS timestamp, UPDATED_BY varchar(50), DELETE_TS timestamp, DELETED_BY varchar(50), DTYPE varchar(31), -- CODE varchar(30) not null, DESCRIPTION varchar(1...
true
85fef114bd1e6b1c6f261f68ee3fc9b779360414
SQL
xingzhixi/SocialSemanticServer
/sss/src/main/resources/conf/sss_schema_upgrade_6.0.0_6.0.1.sql
UTF-8
5,648
3.234375
3
[ "Apache-2.0" ]
permissive
ALTER TABLE `sss`.`activityentities` CHANGE COLUMN `entityId` `entityId` VARCHAR(255) NOT NULL ; ALTER TABLE `sss`.`categoryass` CHANGE COLUMN `entityId` `entityId` VARCHAR(255) NOT NULL ; ALTER TABLE `sss`.`circleentities` DROP FOREIGN KEY `entityIdFKcircleentities`; ALTER TABLE `sss`.`circleentities` CHANGE COL...
true
657af44111c250046ba3239d1b46e850956c7c61
SQL
DBRisinajumi/d2company
/data/tables.sql
UTF-8
4,783
3.359375
3
[ "MIT" ]
permissive
/* SQLyog Ultimate v11.24 (32 bit) MySQL - 5.5.29-MariaDB : Database - p3_02 ********************************************************************* */ /*!40101 SET NAMES utf8 */; /*!40101 SET SQL_MODE=''*/; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_...
true
4b19ec18fdf123304be5c6182933ea0787e4971d
SQL
danielyan2013/sql_homework
/table_creation.sql
UTF-8
806
3.671875
4
[]
no_license
create table departments( dept_no varchar() primary key, dept_name varchar() ); create table employees( emp int primary key, birth_date date, first_name varchar(), last_name varchar(), gender varchar(), hire_date date ); create table dept_emp( foreign key (emp_no) references employees(emp_no), foreign key ...
true
62db1d6b95c250a8bb2039a3d6cdffbf2041fa96
SQL
camilotobon18/BD_NoSQL
/Cassandra/consultas_cassandra.cql
UTF-8
6,286
2.671875
3
[]
no_license
-- Cliente INSERT INTO cliente(id_cliente, nombre_cliente, apellido_cliente, telefono, direccion, correo, estado_civil, fecha_nacimiento,ciudad) VALUES(1, 'Tatiana', 'Uribe', '46546546', 'CL 021 095 045', 'tatiana@gmail.com', 'soltera', '1995-01-01', 'Medellin'); INSERT INTO cliente(id_cliente, nombre_cliente, apel...
true
58cd5628751c2ec10b3ed7d96b529e8713921cbe
SQL
Enterprise-System-Management-Solutions/Analytics
/dwhnode02/database/procedures/R_USSD_TRANSACTION_TYPE_WISE_SUMMARY.sql
UTF-8
1,006
3.453125
3
[]
no_license
-- -- R_USSD_TRANSACTION_TYPE_WISE_SUMMARY (Procedure) -- CREATE OR REPLACE PROCEDURE DWH_USER.R_USSD_TRANSACTION_TYPE_WISE_SUMMARY IS VDATE_KEY VARCHAR2(64 BYTE); BEGIN SELECT DATE_KEY INTO VDATE_KEY FROM DATE_DIM WHERE TO_CHAR(DATE_VALUE,'RRRRMMDD')=TO_CHAR(SYSDATE-1,'RRRRMMDD'); --EXECUTE IMMEDIA...
true
58fcbe8d099b2b0efa8f892609d075a955945315
SQL
SolarNetwork/killbill-easytax-plugin
/src/main/resources/ddl.sql
UTF-8
1,211
3.609375
4
[ "Apache-2.0" ]
permissive
/*! SET default_storage_engine=INNODB */; /* NOTE record_id serial primary key suffers from MySQL bug * https://bugs.mysql.com/bug.php?id=37130 */ SELECT @@global.time_zone, @@session.time_zone; drop table if exists easytax_taxations; create table easytax_taxations ( record_id serial , kb_tenant_id char(36) not ...
true
9428af8f8312afde012c30423d526e3fe6b0eb09
SQL
TrellixVulnTeam/demo_L223
/sql/AllInOneFormTypeCount.sql
UTF-8
1,823
3.53125
4
[]
no_license
DECLARE v_tab VARCHAR2(50); v_forms_type VARCHAR(25); v_forms_count INTEGER; forms_cursor SYS_REFCURSOR; BEGIN --one script overview to work in all env. --check if the user is schema owner --select get_oasis_user from dual; --select PM_TABLE_OWNER from dual; --check if table exists...
true
005527c1a3e23e6fc4d8f65ed95d9c57688a16c4
SQL
rexenpub/rest-framework-core
/src/main/resources/rest-framework.sql
UTF-8
1,979
3.140625
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : 172.17.2.194 Source Server Version : 50720 Source Host : 172.17.2.194:3306 Source Database : dse Target Server Type : MYSQL Target Server Version : 50720 File Encoding : 65001 Date: 2018-05-16 17:20:15 */ SET FOREIGN_KE...
true
100714dcbb296bb74504e1f8730ff00760e822d6
SQL
dabadieng/Ligue1
/creation_base_ligue.sql
UTF-8
971
3.65625
4
[]
no_license
-- -- base de donn�es: 'baseavion' -- create database if not exists baseligue default character set utf8 collate utf8_general_ci; use baseligue; -- -------------------------------------------------------- -- creation des tables set foreign_key_checks =0; -- table equipe drop table if exists equipe; create table equip...
true
b990137f563d281bbcb757d6fdbd274cf6fc289a
SQL
andervyd/SQL-course
/SQL course/08 SUBQUERY/Homework_part_08.sql
UTF-8
3,963
4.375
4
[]
no_license
-- task 01: SELECT * FROM employees WHERE LENGTH(first_name) = ( SELECT MAX(LENGTH(first_name)) FROM employees); -- task 02: SELECT * FROM employees WHERE salary > ( SELECT AVG(salary) FROM employees) ORDER BY salary DESC; -- task 03: SELECT MIN(SUM(salary)) FROM employees ...
true
0a34862f8b2c14eb7b0e0dfb4bf2f0c845ebde5e
SQL
shawnsp/clowdr
/hasura/migrations/1611153226982_more_permission_view_indexes/up.sql
UTF-8
263
2.578125
3
[ "BSD-3-Clause" ]
permissive
CREATE INDEX FlatUserPermission_index_userid_slug on "mat_FlatUserPermission" (user_id, slug); CREATE INDEX FlatUnauthPermission_index_slug on "mat_FlatUnauthPermission" (slug); CREATE INDEX FlatUserPermission_index_userid on "mat_FlatUserPermission" (user_id);
true
fb1121f8fb7c37a2aa8d19d24b1e7b5336d89a37
SQL
jchenedu/Lab10
/Tutorial4.sql
UTF-8
3,019
4.34375
4
[]
no_license
/* Tutorial 4 */ SELECT name FROM world WHERE population > (SELECT population FROM world WHERE name='Russia'); /* For this query, we are outputting all the countries where the population is bigger than Russia from the table 'world' */ SELECT name FROM world WHERE gdp/population > (SEL...
true
fc762e1d26d3d5512c46abeef0e6d74a399a071f
SQL
neostreet/poker_session_data
/view_sum_delta.sql
UTF-8
173
2.546875
3
[]
no_license
use poker drop view if exists sum_delta; create view sum_delta as select poker_session_date,sum(delta) as sum_delta from poker_sessions group by poker_session_date; quit
true
eb264e16ae01499c7ec64040650b3413a0c3ae72
SQL
mvardas/Stack-Over-Flowers
/kidspiration/out/production/resources/Tickets.sql
UTF-8
1,627
3.84375
4
[]
no_license
DROP TABLE IF EXISTS kidspiration.OldTickets; DROP TABLE IF EXISTS kidspiration.Tickets; CREATE TABLE kidspiration.Tickets ( `ticket_id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, `parent_id` INT(10) UNSIGNED NOT NULL, `event_id` INT(10) UNSIGNED NOT NULL, PRIMARY KEY (`ticket_id`), FOREIGN KEY(`parent_id`) ...
true
c971b0276879de85e204a80345939a1a0f5e8ce8
SQL
NiharikaReddyD/assesment
/TableSchemas.sql
UTF-8
2,698
4.25
4
[]
no_license
Create table dim_product( product_id VARCHAR(255) , product_name VARCHAR(255), business_unit VARCHAR(255), file_name VARCHAR(255) ); Create table public.fct_rx_dispense( npi_id VARCHAR(255) , business_unit VARCHAR(255), product_id VARCHAR(255), true_week_end date, rx_packs float(25), file_name VARCHAR(255) ); Create ...
true
baa23c085b0fdf9baa94dcba35d34f5bca68f422
SQL
thepearldream/Britec
/DB/consultas/ControleAplicacao/Resumo.sql
UTF-8
614
3.21875
3
[]
no_license
select COALESCE(round(sum(i.toneladas), 2), 0) as CargaAcumulada, COALESCE(avg(i.espessura), 0) as EspessuraMedia, COALESCE(round(sum(i.comprimento * i.largura), 2), 0) As AreaTotal, count(*) as QuantidadeCaminhoes, COALESCE(avg(o.ValorPorToneladaFrete), 0) as ValorTonelada, COALESCE(round(sum(i.toneladas) ...
true
1398630d9330b70179cecdd074de9e89b5cac010
SQL
bmcclelland/comp440
/sql/data.sql
UTF-8
1,904
3.46875
3
[]
no_license
INSERT INTO Users (username,password,email,firstname,lastname) VALUES ('alice','aaa','alice@email.com', 'Alice', 'A'), ('bob','bbb', 'bob@email.com', 'Bob', 'B'), ('charlie','ccc', 'charlie@email.com', 'Charlie', 'C'), ('david','ddd', 'david@email.com', 'David', 'D'), ('eve','eee','eve@email.com', '...
true
bb11ae04aa67c9f96fca50e85fe7845508a1762f
SQL
silence-do-good/stress-test-Postgres-and-MySQL
/dump/low/day16/select1854.sql
UTF-8
191
2.703125
3
[]
no_license
SELECT timeStamp, temperature FROM ThermometerObservation WHERE timestamp>'2017-11-15T18:54:00Z' AND timestamp<'2017-11-16T18:54:00Z' AND SENSOR_ID='7a8cf57a_f445_451c_a2f7_78d3fdfb2b9b'
true
06c901aaf83bbb88139ecbe80be4bb14bc8af9d4
SQL
sheli16/Final-Project-SG
/up2measure/db/tn_schema.sql
UTF-8
752
3.109375
3
[]
no_license
DROP DATABASE IF EXISTS topNotchdb; CREATE DATABASE IF NOT EXISTS topNotchdb; USE topNotchdb; DROP TABLE IF EXISTS tblUsers; CREATE TABLE IF NOT EXISTS tblUsers( userId INTEGER PRIMARY KEY AUTO_INCREMENT, username VARCHAR(100) UNIQUE, password VARCHAR(100) ); CREATE TABLE jobs( id INTEGER PRIMARY KEY A...
true
a95ac2930d4a70f5f059eaecca69759a8085426f
SQL
MpoyiMmg/Projet-itot
/bdd/db_rdv.sql
UTF-8
8,596
3.078125
3
[ "LicenseRef-scancode-unknown-license-reference", "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Hôte : localhost -- Généré le : lun. 22 avr. 2019 à 14:30 -- Version du serveur : 10.1.38-MariaDB -- Version de PHP : 7.3.3 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101...
true
7135eccdc45fd3bc59671d107485a3bf76a90948
SQL
pauloholiveira/store
/src/main/resources/schema.sql
UTF-8
256
2.78125
3
[]
no_license
USE `store`; DROP TABLE IF EXISTS `produto`; CREATE TABLE `produto` ( `id` int(11) NOT NULL AUTO_INCREMENT, `nome_descricao` varchar(200) NOT NULL, `valor` decimal(7,2) NOT NULL DEFAULT '0', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
true
82d2a5f24c8e1a3874f963178e695edb46a789ec
SQL
spopp20/MusicProgram
/prisma/migrations/20210724213317_schema_cleanup/migration.sql
UTF-8
2,196
3.546875
4
[]
no_license
/* Warnings: - You are about to drop the `EventSongList` table. If the table is not empty, all the data it contains will be lost. - You are about to drop the `SheetMusic` table. If the table is not empty, all the data it contains will be lost. */ -- DropForeignKey ALTER TABLE `EventSongList` DROP FOREIGN KEY `E...
true
c690534e7880d8373039ba6543c3624410c407a2
SQL
astoeff/Programming-101-Python-2020
/week09/WEDNESDAY/PC/query7.sql
UTF-8
160
3.4375
3
[]
no_license
SELECT AVG(price) as avg_price FROM product JOIN (SELECT * FROM pc UNION ALL SELECT * FROM laptop) AS subq ON product.model = subq.model WHERE maker = 'B'
true
f45ffdba0f9ff68fe91b933ae25a080d9a918db7
SQL
overbrim/postgresql
/general_challenge_solution.sql
UTF-8
380
3
3
[]
no_license
-- SELECT COUNT(amount) -- FROM payment -- WHERE amount > 5; -- SELECT COUNT(*) -- FROM actor -- WHERE first_name LIKE 'P%'; -- SELECT COUNT(DISTINCT(district)) -- FROM address; -- SELECT DISTINCT(district) -- FROM address; -- SELECT COUNT(*) -- FROM film -- WHERE rating = 'R' -- AND replacement_cost BETWEEN 5 AND...
true
b79d6d3666d8ef2422f2918d4aa9053ddb0ec226
SQL
BestSoft/surgalt
/sites/lmsdb.sql
UTF-8
19,266
3.1875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.0.3 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Oct 05, 2013 at 12:02 PM -- Server version: 5.6.11-log -- PHP Version: 5.5.0 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT *...
true
9be9fab2c201be3874e90b0a33bd6cf9f40bc6e1
SQL
tutorials24x7/notification-management-database-mysql
/notification.sql
UTF-8
4,802
3.28125
3
[ "MIT" ]
permissive
-- MySQL dump 10.13 Distrib 8.0.14, for Win64 (x86_64) -- -- Host: 127.0.0.1 Database: notification -- ------------------------------------------------------ -- Server version 8.0.14 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RES...
true
bf9c7c3f10198ef04a8073dbf10cc6289559be1e
SQL
ajrussellaudio/sinatra-blog
/db/blog_example.sql
UTF-8
260
2.96875
3
[]
no_license
DROP TABLE comments; DROP TABLE posts; CREATE TABLE posts ( id SERIAL PRIMARY KEY, title VARCHAR(255), body TEXT, posted_on DATE ); CREATE TABLE comments ( id SERIAL PRIMARY KEY, body TEXT, posted_on DATE, post_id INT REFERENCES posts(id) );
true
4aaeb0e0db3dd193ccd40698a670e814dfe7ff93
SQL
jean-dedieu/CabinetMedicalSGBD
/database_medimiashs.sql
UTF-8
3,855
3.59375
4
[]
no_license
CREATE TABLE IF NOT EXISTS `Patient` ( `Nss_P` INT NOT NULL, `Nom_Patient` VARCHAR(45) NOT NULL, `Sexe` VARCHAR(45) NOT NULL, `Age` INT NOT NULL, `Profession` VARCHAR(45) NOT NULL, `Date_Deces` DATE NULL, PRIMARY KEY (`Nss_P`)) ENGINE = InnoDB; CREATE TABLE IF NOT EXISTS `Medecin` ( `Nss_M` INT ...
true
957ced58a8141a3f060931192ca7b84b9f04a252
SQL
descriptions-of-it-technologies/oracle-sql-plsql
/labs/sql2/demo/demo_06_With.sql
UTF-8
152
3.046875
3
[]
no_license
WITH avgsal_tab AS (SELECT avg(salary) avgsal FROM employees) SELECT last_name, salary, avgsal avsal FROM employees, avgsal_tab WHERE salary > avgsal ;
true
e3fd3d0a0890123561afcb723638836e1246737e
SQL
ToborTheGreat/Repository01
/dw.parameter_catalog_groups.sql
UTF-8
1,980
3.21875
3
[]
no_license
-- -- PostgreSQL database dump -- SET statement_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings = off; SET check_function_bodies = false; SET client_min_messages = warning; SET escape_string_warning = off; SET search_path = dw, pg_catalog; ALTER TABLE ONLY dw.parameter_catalog_groups DROP ...
true
50dbe633495f257103f703012ddaafb6414b5240
SQL
PgYw/dJi-Android-
/server/Dji.sql
UTF-8
5,034
2.796875
3
[]
no_license
--注意,如果想手机访问数据库需要ctrl+f把127.0.0.1本地域名换成本地电脑ip SET NAMES UTF8; DROP DATABASE IF EXISTS dji; CREATE DATABASE djiApp CHARSET=UTF8; USE djiApp; CREATE TABLE dji_user( user_id INT PRIMARY KEY AUTO_INCREMENT comment '用户的id', reg_way VARCHAR(16) comment '用户注册方式', user_phone CHAR(11) comment '用户手机号', user_email VARCH...
true
d06e302315546b452a67f27180575e9bef6e4bb8
SQL
RookieRoll/kobold-blog
/kobold-blog-provider/src/main/resources/source/blog.sql
UTF-8
3,164
3.46875
3
[]
no_license
/* Navicat Premium Data Transfer Source Server : LocalHost Source Server Type : MySQL Source Server Version : 80015 Source Host : localhost:3306 Source Schema : blog Target Server Type : MySQL Target Server Version : 80015 File Encoding : 65001 Date: 01/07/2019 09:52...
true
1a85ed36c94b533747456b674ca1ceecd47b2aa8
SQL
dloose/abacus
/database/stock_schema.sql
UTF-8
547
3.3125
3
[]
no_license
CREATE TABLE symbols ( symbol TEXT PRIMARY KEY, added_date TIMESTAMP NOT NULL DEFAULT NOW(), initial_import_date TIMESTAMP, last_update_date TIMESTAMP ); CREATE TABLE symbol_data ( symbol TEXT NOT NULL REFERENCES symbols(symbol) ON DELETE CASCADE, date DATE NO...
true
497749d8fb620de5f9121629192f993566755977
SQL
RavinduHasanka/GadgetBadgetSystem
/Group_Seliya/gadget_badget_delivery.sql
UTF-8
2,178
2.875
3
[]
no_license
-- MariaDB dump 10.17 Distrib 10.4.11-MariaDB, for Win64 (AMD64) -- -- Host: localhost Database: gadget_badget -- ------------------------------------------------------ -- Server version 10.1.36-MariaDB /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHAR...
true
51f1e902fd7d74cf224cdced32959ed16b2478e6
SQL
jgarzonext/plsql-testing
/script_plsql/bd_iaxis/script/tables/DIR_CALLESCPOSTALES.sql
ISO-8859-1
1,449
2.859375
3
[]
no_license
-------------------------------------------------------- -- DDL for Table DIR_CALLESCPOSTALES -------------------------------------------------------- CREATE TABLE "AXIS"."DIR_CALLESCPOSTALES" ( "IDCALLE" NUMBER(10,0), "CPOSTAL" VARCHAR2(10 BYTE), "NUMPINF" NUMBER(5,0), "NPARINF" NUMBER(5,0), "NIMPSUP" ...
true
fe4666f8f25596d82544643bd8741438be4f2214
SQL
Henrique-Moura/sd-09-mysql-vocabulary-booster
/desafio16.sql
UTF-8
411
3.703125
4
[]
no_license
USE hr; DELIMITER $$ CREATE FUNCTION buscar_quantidade_de_empregos_por_funcionario(EMAIL_EMPLOYEES VARCHAR(25)) RETURNS INT READS SQL DATA BEGIN DECLARE amount_of_jobs INT; SELECT COUNT(*) FROM hr.employees AS E INNER JOIN hr.job_history AS JH ON JH.EMPLOYEE_ID = E.EMPLOYEE_ID WHERE EMAI...
true
83b271950bd61230c81afdeb939abc8b119bd35b
SQL
jjthom87/class_curriculum
/express_handlebars/params_and_partials/lesson/backup.sql
UTF-8
3,751
3.34375
3
[]
no_license
-- -- PostgreSQL database dump -- -- Dumped from database version 9.6.1 -- Dumped by pg_dump version 9.6.1 SET statement_timeout = 0; SET lock_timeout = 0; SET idle_in_transaction_session_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings = on; SET check_function_bodies = false; SET client_min...
true
afc48e9ed88b8fe5190527ab365c5d5067bfca8d
SQL
theonesp/Obesity-project
/Primary ICD9 diagnosis.sql
UTF-8
320
3.328125
3
[ "MIT" ]
permissive
-- Code for the primary ICD-9 diagnosis select final_2.hadm_id, primary_dx.icd9_code, primary_dx.short_title, primary_dx.long_title from public.final_2 -- replace by the table name created by you in the cohort selection left join public.primary_dx on public.final_2.hadm_id = public.primary_dx.hadm_id order by hadm_id
true
92ef73395422aa4cc063f3710266ab40bd06f09d
SQL
ytw9699/Square
/SQUARE3/WebContent/스퀘어테이블모음.sql
UTF-8
3,915
3.296875
3
[]
no_license
1.회원가입 테이블 create table modMember( id varchar2(20), ex varchar2(100) ); create table MEMBER( id varchar2(20) primary key not null, password varchar2(20) not null, name varchar2(10) not null, email varchar2(50) not null, address varchar2(100) default '0',--상세주소 zipcode varchar2(10) default '0',--우편번호 account varchar2(2...
true
4ff0148236854427251519416868cb5009e8b8b2
SQL
zuhara/Lycaeum-Mentoring
/database/postgres.sql
UTF-8
1,164
3.5625
4
[]
no_license
CREATE TABLE customer ( id INTEGER, name VARCHAR(500), jdate DATE, address TEXT, email VARCHAR(500)); CREATE TABLE invoice ( cid INTEGER REFERENCES customer(id), id INTEGER PRIMARY KEY, ...
true
91812452546073c7393c47aab7a96157918ec89c
SQL
alex-carvalho/kanban-board-dev3
/src/main/resources/db/migration/V1.3__Change_contraint.sql
UTF-8
157
2.9375
3
[ "MIT" ]
permissive
ALTER TABLE cards DROP CONSTRAINT IF EXISTS cards_users_fk; ALTER TABLE cards ADD CONSTRAINT cards_users_fk FOREIGN KEY (user_id) REFERENCES users (id);
true
cd01fd44d4be7545c3afab49294a8cfc647b214f
SQL
ManuelRodriguezRUM/exam1-spring-17-big-data-dannyvillanueva
/hive/hive.sql
UTF-8
532
3.609375
4
[ "Apache-2.0" ]
permissive
# You sql follows # Pregunta 1: SELECT e.region, e.ciudad, count(*) FROM escuelas e GROUP BY e.region, e.ciudad;; # Pregunta 2: SELECT e.nombre, count(*) FROM escuelas e , students s WHERE e.escuelaID=s.escuelaID GROUP BY e.nombre; # Pregunta 3: SELECT s.studentID, e.nombre FROM escuelas e, students s WHERE e...
true
ccb45b6cc974d6ef25922b8d7549c9c242b2f9a1
SQL
shunchaowang/smartpay
/code/smartpay/core/src/test/resources/data.sql
UTF-8
11,556
3.296875
3
[]
no_license
-- ----------------------------------------------------- -- Data for table MERCHANT_STATUSES -- ----------------------------------------------------- START TRANSACTION; INSERT INTO MERCHANT_STATUSES (MCST_ID, MCST_NAME, MCST_DESCRIPTION, MCST_ACTIVE, MCST_CODE) VALUES (NULL, 'Normal', 'Normal', 1, '200'); INSERT INTO M...
true
77de93344c666b6f414d0f99d0d1aaf23f20f3e9
SQL
adminZDY/NewWeb1.0
/web/sql/newsDB(MySql).sql
UTF-8
4,421
3.765625
4
[]
no_license
use sys; #创建数据库,如果存在则删除 # drop database if exists newdb; #如果不存在数据库,则创建 create database if not exists newsDB; use newsDB; #表存在则删除 drop table if exists userInfo; # 用户信息表 create table if not exists userInfo ( #用户编号 userId int not null primary key, #用户名(唯一) userName varchar(20) not null unique, #密码(登录密码) passw...
true
f22414e9a129c4f9cccae7e37c6294f674d513e9
SQL
nhan2804/supconnect
/test.session.sql
UTF-8
1,686
4.46875
4
[ "MIT" ]
permissive
-- @block CREATE TABLE Users( id INT PRIMARY KEY AUTO_INCREMENT, email VARCHAR(255) NOT NULL UNIQUE, bio TEXT, country VARCHAR(2) ); --@block CREATE TABLE Rooms( id INT AUTO_INCREMENT, street VARCHAR(255), owner_id INT NOT NULL, PRIMARY KEY (id), FOREIGN KEY (owner_id) REFERENCES U...
true
43b9d53fea8ba9f470163a86b6754b83618fb02a
SQL
pryor-pan/mysql-
/hotelmanagement.sql
UTF-8
2,222
3.0625
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : mySQL Source Server Version : 50520 Source Host : localhost:3306 Source Database : hotelmanagement Target Server Type : MYSQL Target Server Version : 50520 File Encoding : 65001 Date: 2021-05-19 20:37:58 */ SET FOREIGN_...
true
d8c7bd4f7302e92683526850c01a5a1aaa71297d
SQL
silence-do-good/stress-test-Postgres-and-MySQL
/dump/high/day09/select0356.sql
UTF-8
412
3.546875
4
[]
no_license
SELECT obs.sensor_id, avg(counts) FROM (SELECT sensor_id, date_trunc('day', timestamp), count(*) as counts FROM WiFiAPObservation WHERE timestamp>'2017-11-08T03:56:00Z' AND timestamp<'2017-11-09T03:56:00Z' AND SENSOR_ID = ANY(array['3141_clwa_1420','3146_clwa_6217','3141_clwa_1600','3143_clwa_3099','3143_clwa_...
true
39fa71a26e021e9488a9e2e0dd7bea6e6c27a0e3
SQL
PriyankaM06091994/Designing-Advanced-Data-Architectures-for-Business-Intelligence
/Sakila Database/4_RentalsbyCustomer.sql
UTF-8
3,753
4.375
4
[]
no_license
#1.List Customers (Last name, First Name) with rental amount, rental quantity, active status, country and city – #tabular & sql query SELECT c.last_name,c.first_name, sum(p.amount) as RentalAmount, count(r.rental_id) as Rental_Quantity, country.country, city.city,c.active FROM customer AS c JOIN rental AS r ...
true
d0a7ac6dcf6260e2612373a461861308a2d98467
SQL
ackentdev/my-shared-library
/db/get_concerts.sql
UTF-8
159
3.25
3
[]
no_license
select c.concert_id, c.concert_name, c.date, sl.song_name, sl.catalog_id from concerts c join song_library sl on (sl.song_id = c.song_id) where c.user_id = $1;
true
3c246692317c29cb058013ef5c5fb4edba52adb7
SQL
marlonmoreira1/sql_projects
/INTRODUÇÃO AO SQL (SQLITE).sql
UTF-8
475
3.4375
3
[]
no_license
select c.name,p.price,p.description,o.order_date,o.order_qty from customer_order o join customer c on c.CUSTOMER_ID = o.customer_id join product p on o.product_id = p.product_id; select name, city ||' , '|| state ||' , '|| zip as location from customer; select name,street_address ||' '|| city ||' , '|| st...
true
37ab03bcb19ece720b367c4b8757cdf84e616c8a
SQL
cfpb/HMDA_Data_Science_Kit
/load_scripts/SQL/create_and_load_ts_2020.sql
UTF-8
455
2.765625
3
[ "CC0-1.0" ]
permissive
DROP TABLE IF EXISTS hmda_public.ts_2020; CREATE TABLE hmda_public.ts_2020 ( activity_year VARCHAR(4), calendar_quarter VARCHAR(1), lei VARCHAR(20), tax_id VARCHAR(10), agency_code VARCHAR(1), respondent_name VARCHAR, respondent_state VARCHAR(2), respondent_city VARCHAR, respondent_zip_code VARCHAR, lar_count...
true
b46a79f6702945ce812a37ef8066acabdf76a9e4
SQL
lucasDSBR/Sistema_Simples
/db/users.sql
UTF-8
1,860
2.921875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Tempo de geração: 14-Fev-2021 às 03:10 -- Versão do servidor: 10.4.14-MariaDB -- versão do PHP: 7.3.26 -- Desenvolvido por Lucas Silva -- E-mail: lucasmaciel6690@gmail.com -- linkedin(Lucas Silva): https://www.linkedin.com/i...
true
c25d52c73d8080af72de5caf931842ae4698751b
SQL
willogrady/Skill-map
/AzureResourceGroup5/createroletable.sql
UTF-8
4,824
3.28125
3
[]
no_license
USE svccompanyrolesdb DROP TABLE IF EXISTS [role_competency_skill_map]; DROP TABLE IF EXISTS [role_company_skill_map]; DROP TABLE IF EXISTS [role_skill_map]; DROP TABLE IF EXISTS [role]; DROP TABLE IF EXISTS [role_group]; CREATE TABLE role_skill_map ( [role_skill_map_id] INT NOT NULL IDENTITY, [rol...
true
f50abc1d576452849b7008d77de1eb78e336f8a1
SQL
zweihan/didactic-waddle
/ddl.cql
UTF-8
2,035
3.53125
4
[]
no_license
CREATE TYPE IF NOT EXISTS cs4224.address ( street_1 text, street_2 text, city text, state text, zipcode text ); CREATE TYPE IF NOT EXISTS cs4224.order_line ( ol_i_id int, ol_delivery_d timestamp, ol_amount decimal, ol_supply_w_id int, ol_quantity decimal, ol_dist_info varchar ); CREATE TABLE IF NOT EXISTS cs4224.ware...
true
89302edaf9a109fe11ab3380e2a9b1b4a7050b58
SQL
Kickrop/sql_statreg
/statreg_7.sql
WINDOWS-1251
6,398
3.578125
4
[]
no_license
select count(distinct x.okpo) --, gr3, pole_67 from ( select a.okpo, gr3, pole_67, pole_8, pole_7, pole_6, pole_27 from statregistr.razdel_1_2_1 a join statregistr.razdel_1_1 b on a.okpo=b.okpo join statregistr.statregistr7 c on a.okpo=c.pole_1 or (c.pole_3=a.okpo) where a.gr3='1' and c.pole_67 like '%005%' ) x join s...
true
f68ff56543cc5fdd6b1d370e1b4af8287d0c85f4
SQL
asurkis/databases-coursework-pt3
/indices.sql
UTF-8
2,455
4
4
[]
no_license
-- QUERY PLAN -- -------------------------------------------------------------------------------- -- ------------------ -- Seq Scan on human (cost=0.00..49.56 rows=1 width=110) (actual time=0.013..0.13 -- 4 rows=4 loops=1) -- Filter: (name = 'Human n+1'::text) -- Row...
true
b801482fc9cc532276dad56a8fcb905b2e5e8867
SQL
reva0807/course_progress_funnel
/assessment/ddl.sql
UTF-8
2,714
3.578125
4
[]
no_license
create schema course_progress_funnel; set search_path=course_progress_funnel; -- dim_geo_info create table if not exists dim_geo_info ( id BIGINT PRIMARY KEY, city VARCHAR(255) NOT NULL, state VARCHAR(255) NOT NULL, counry VARCHAR(255) NOT NULL ); -- dim_learner create table if not exists dim_learner ( id BIGINT PRI...
true
76f49877135d9efb169dc84a749d79dd49a6e5bc
SQL
zhengbigbig/first-spring-web
/src/main/resources/db/migration/V1__Create_tables.sql
UTF-8
429
2.90625
3
[]
no_license
create table user ( id bigint primary key auto_increment, name varchar(100) ); create table `match` ( id bigint primary key auto_increment, user_id bigint, score int ); insert into user(id,name) values ( 1,'AAA' ); insert into user(id,name) values ( 2,'BBB' ); insert into user(id,name) values ( 3,'CCC' ); insert i...
true
cf3dc13b924a35d9dcafca8243c53ae66e12a78f
SQL
dingjinhui821/julive_database
/schema/julive_ods/yw_owl_project_monitor.sql
UTF-8
1,391
2.90625
3
[]
no_license
drop table if exists ods.yw_owl_project_monitor; create external table ods.yw_owl_project_monitor( id bigint comment '', order_id bigint comment '订单id', see_project_id ...
true
058e1ceaf885d3d8f7a74031d92f8ec386112088
SQL
stoianov00/Java
/Java MySQL/03.Built In Functions/15.Show All Games with Duration .sql
UTF-8
437
3.5
4
[]
permissive
SELECT name AS 'game', CASE WHEN HOUR(start) BETWEEN 0 AND 11 THEN 'Morning' WHEN HOUR(start) BETWEEN 12 AND 17 THEN 'Afternoon' ELSE 'Evening' END AS 'Part of the Day', CASE WHEN duration <= 3 THEN 'Extra Short' WHEN duration BETWEEN 4 AND 6 THEN 'Short' WHEN...
true
1802dc0434c2d18fb5ecf191448fd1f0e37fd726
SQL
mebelousov/antlr_psql
/src/test/resources/sql/select/f6d194e2.sql
UTF-8
188
2.8125
3
[ "MIT" ]
permissive
-- file:rowtypes.sql ln:104 expect:true select unique1, unique2 from tenk1 where (unique1, unique2) < any (select ten, ten from tenk1 where hundred < 3) and unique1 <= 20 order by 1
true
b3ad7a18c94a9cde3defd1cd5fcb4578be7fb32f
SQL
gpulatov/postgreSQL_DataBase-testing
/Scripts/PostgreSQL_4.sql
UTF-8
3,118
4.28125
4
[]
no_license
/********************************* * PostgreSQL - 4 */ /*********************************** 1- Display country_id, country name, region id , region name from hr database */ select country_id, country_name, c.region_id, region_name from countries AS "c" inner join regions AS "r" on c.region_id = r.region_id; /**...
true
15d0e0b81d409f676ff64461626e7c70b34625f8
SQL
joaommd/PeqCelulas
/criar_base_dados.sql
UTF-8
3,773
3.671875
4
[]
no_license
USE db_peqcelulas; DROP TABLE IF EXISTS demograficos; CREATE TABLE demograficos( doente_id INT AUTO_INCREMENT PRIMARY KEY, nd INT NOT NULL, data_nascimento DATE, genero VARCHAR (10), CONSTRAINT genero_chk CHECK ( genero IN ('Feminino', 'Masculino', 'Outro') ), PRIMARY KEY (doente_id) ); DROP ...
true