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
8415206e47d8487ac5b9c0c5a13b5d3fa8bdfcc4
SQL
zfleharty/RiskSenseTakeHome
/problem1/query.sql
UTF-8
574
4.03125
4
[]
no_license
-- create a table CREATE TABLE cars ( manufacturer TEXT NOT NULL, model TEXT NOT NULL, price INTEGER NOT NULL ); -- insert data INSERT INTO cars VALUES ('Toyota', 'Camry', 16000); INSERT INTO cars VALUES ('Toyota', 'Hilander', 22000); INSERT INTO cars VALUES ('Honda', 'Pilot',24000); INSERT INTO cars VALUES ('Hon...
true
ed1163bfea7b426d8afd28243d7c5209d3caa6de
SQL
jimsmith/redshift-rate-throttling
/reports/Last Few Minutes.sql
UTF-8
360
3.171875
3
[ "MIT" ]
permissive
-- Usage by minute for the last few data points (reverse chronologically) SELECT date(eventTime) || ' ' || strftime('%H-%M', eventTime) AS t , count(*) AS num_api_calls , userIdentityName AS by_user , userAgent AS using_agent , eventSource FROM cloudtrail GROUP BY t, by_user, using_agent, eventSource ORDER ...
true
f64a2937e50d23662669e018c8d561e33fb624ca
SQL
hw79chopin/MySQL-Codebook
/SQL 스터디/프로그래머스/pmg(GROUP BY) 동명 동물 수 찾기.sql
UTF-8
389
3.296875
3
[]
no_license
-- 동물 보호소에 들어온 동물 이름 중 두 번 이상 쓰인 이름과 해당 이름이 쓰인 횟수를 조회하는 SQL문을 작성해주세요. -- 이때 결과는 이름이 없는 동물은 집계에서 제외하며, 결과는 이름 순으로 조회해주세요. SELECT NAME, COUNT(NAME) FROM ANIMAL_INS GROUP BY NAME HAVING COUNT(NAME) > 1 ORDER BY NAME;
true
c88e64b8e5f9513ecb0d353432b8dbd6e7c1da05
SQL
yingchauhuang/rsit
/db/Update_Fin.sql
UTF-8
25,574
2.84375
3
[]
no_license
MERGE INTO SW.RAT001 D USING (select (LTRIM(SYMBOL,'0')||' HK') as SYMBOL, YQ,'ACT003',F24 from XQ.FIN001 where FinDate>TRUNC(TRUNC(SYSDATE , 'Year')-360 , 'Year')) S ON (D.LIST_CODE = S.SYMBOL AND D.YQ=S.YQ AND D.RATIO_CODE='ACT003') WHEN MATCHED THEN UPDATE SET D.RATIO_VALUE = S.F24 WHEN NOT MATCHED THEN ...
true
cbcb0c464fa52d4e9d02cba60ef9401bd6e10d01
SQL
brisskit-uol/puppet
/modules/redcap/files/install_6.4.4/redcap_v6.4.4/Resources/sql/install_data.sql
UTF-8
18,602
3.28125
3
[]
no_license
-- REDCAP INSTALLATION INITIAL DATA -- INSERT INTO redcap_user_information (username, user_email, user_firstname, user_lastname, super_user, user_firstvisit) VALUES ('site_admin', 'joe.user@projectredcap.org', 'Joe', 'User', 1, now()); INSERT INTO redcap_standard_map_audit_action (id, action) VALUES (1, 'add ...
true
d97269d959adc71b23a6bbf306e5785a99c49f85
SQL
cgiovvnni/Car-Control-Online
/Scripts/s-15-fx-proximos-pagos.sql
UTF-8
616
3.078125
3
[ "MIT" ]
permissive
--@Autor: Rodrigo Lopez López - Carlos Giovanni Martínez Gutiérrez --@Fecha creación: 19/06/2020 --@Descripción: Proyecto Final 'Funcion Costo Mensual' create or replace type fechas_varray as varray(5) of date; / create or replace function proximas_cuotas( p_fecha_pago date ) return fechas_varray pi...
true
887475a46dac139124bc7811c43ee2ff9e887928
SQL
gmoraga/kt_employee
/postgres_kt_kt_employees.sql
UTF-8
2,488
3.4375
3
[]
no_license
CREATE SCHEMA IF NOT EXISTS kitchen_talk; DROP TABLE IF EXISTS kitchen_talk.kt_employees; DROP SEQUENCE IF EXISTS kitchen_talk.kt_employees_seq; CREATE SEQUENCE IF NOT EXISTS kitchen_talk.kt_employees_seq; CREATE TABLE kitchen_talk.kt_employees ( id bigint DEFAULT nextval('kitchen_talk.kt_employees_seq'::regclas...
true
9ce982a1264532d8d0d7799ffb7235e718027356
SQL
PNNL-Comp-Mass-Spec/DBSchema_PgSQL_DMS
/dms/pc/pc.t_encrypted_collection_authorizations.sql
UTF-8
1,334
3.265625
3
[ "Apache-2.0" ]
permissive
-- -- Name: t_encrypted_collection_authorizations; Type: TABLE; Schema: pc; Owner: d3l243 -- CREATE TABLE pc.t_encrypted_collection_authorizations ( authorization_id integer NOT NULL, login_name public.citext NOT NULL, protein_collection_id integer NOT NULL ); ALTER TABLE pc.t_encrypted_collec...
true
70c3a164678420c4319ed6b8bf523e720a2e283a
SQL
Frodenkvist/erik-portfolio-api
/ErikPortfolioApi/db/migrations/V4__add_cascade.sql
UTF-8
181
2.953125
3
[]
no_license
ALTER TABLE photo DROP CONSTRAINT photo_parent_folder_id_fkey, ADD CONSTRAINT photo_parent_folder_id_fkey FOREIGN KEY (parent_folder_id) REFERENCES folder(id) ON DELETE CASCADE;
true
a7c71af92c6321b2f47dac2618bfb8711cc9b19f
SQL
naffets77/CPAExamBank
/Backend/Ciborium/StoredProceduresAndTriggers/StoredProcedures/sp_DELETEAccountUserById.sql
UTF-8
873
3.28125
3
[]
no_license
DELIMITER // DROP PROCEDURE IF EXISTS sp_DELETEAccountUserById// CREATE PROCEDURE sp_DELETEAccountUserById(IN inAccountUserId INT) BEGIN DELETE FROM `LicenseTransactionHistory` WHERE `LicenseId` IN (SELECT LicenseId FROM License WHERE AccountUserId = inAccountUserId); DELETE FROM `LicenseToSectionType` WHERE `Lice...
true
2d912b7824cbb40601f8d06760a871d168738ffa
SQL
tespechit/SNEP-Porteiro
/banco.sql
UTF-8
2,828
3.625
4
[]
no_license
CREATE TABLE IF NOT EXISTS `snep`.`senha` ( `id` INT NOT NULL AUTO_INCREMENT, `senha` VARCHAR(21) NOT NULL, `usuario` VARCHAR(100) NOT NULL, `grupo` VARCHAR(100) NOT NULL, `cadastro` VARCHAR(50) NOT NULL, `atualizado` VARCHAR(50) NOT NULL, PRIMARY KEY (`id`)); CREATE TABLE IF NOT EXISTS `snep`.`rfid` ( ...
true
ad813c3c06585cee7da56efde2c09cb6feb77a80
SQL
chirdxing/WeEvent
/weevent-governance/dist/conf/script/governance.sql
UTF-8
6,431
3.078125
3
[ "Apache-2.0" ]
permissive
CREATE TABLE t_account( `id` INT(11) NOT NULL AUTO_INCREMENT COMMENT 'primary key', `create_date` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'create date', `last_update` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP comment 'update date', `is_delete` INT(1) NOT NULL DEFAULT ...
true
826d57036a7e2c54ca229dca3ef64ed95fb07b0b
SQL
silence-do-good/stress-test-Postgres-and-MySQL
/dump/low/day21/select0205.sql
UTF-8
412
3.5625
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-20T02:05:00Z' AND timestamp<'2017-11-21T02:05:00Z' AND SENSOR_ID = ANY(array['3141_clwa_1600','3141_clwa_1420','3142_clwa_2065','3146_clwa_6029','3143_clwa_...
true
31d11799c507cc4782e5531d9219df091cee1ec2
SQL
1105Deepak/Use-case-Activity
/db_structure.sql
UTF-8
4,480
3.34375
3
[]
no_license
-- MySQL dump 8.0 Distrib 5.6.11, for osx10.7 (x86_64) -- -- Host: localhost Database: bank -- ------------------------------------------------------ -- Server version 5.6.11 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!401...
true
5ce63af4ca55e4e0070b9f777128ec84d2a97477
SQL
rockytrice/Node-Express-Handlebars
/db/schema.sql
UTF-8
180
2.828125
3
[]
no_license
CREATE DATABASE cars_db; USE cars_db; CREATE TABLE cars ( id int NOT NULL AUTO_INCREMENT, car_name varchar(255) NOT NULL, purchased BOOLEAN DEFAULT false, PRIMARY KEY (id) );
true
764dd72287aeb30fc498dd4e78368727572a3ec8
SQL
bravesoftdz/sgts
/sql/oracle/patch_11.11.2007/003_alter_table_measure_type_params.sql
WINDOWS-1251
782
3.34375
3
[]
no_license
/* */ CREATE OR REPLACE VIEW S_MEASURE_TYPE_PARAMS AS SELECT MTP.*, MT.NAME AS MEASURE_TYPE_NAME, P.NAME AS PARAM_NAME, P.DESCRIPTION AS PARAM_DESCRIPTION, P.PARAM_TYPE, P.FORMAT AS PARAM_FORMAT, P.ALGORITHM_ID, A.NAME AS ALGORITHM_NAME, A.PROC_NAME AS ALGORITHM_PROC_NAME,...
true
82d67db9009483889e0e790b183a989b1e77a2e3
SQL
prestodb/presto
/presto-product-tests/src/main/resources/sql-tests/testcases/window_functions/rowsFirstLast.sql
UTF-8
402
3.0625
3
[ "Apache-2.0" ]
permissive
-- database: presto; groups: window; select orderkey, suppkey, extendedprice, first_value(extendedprice) over (partition by suppkey order by extendedprice desc rows between unbounded preceding and unbounded following), last_value(extendedprice) over (partition by suppkey order by extendedprice desc rows between unbound...
true
97d7a72ed5ecba3b7d0b9c5b084359875afe82fe
SQL
Dishant111/SCG---Copy
/database/careerguidancefinal.sql
UTF-8
92,874
3.0625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.9.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Aug 21, 2020 at 03:51 PM -- Server version: 10.4.8-MariaDB -- PHP Version: 7.3.10 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
true
d49ab0d466dfa002535fa1b8c0e4e21c81e1f265
SQL
conan513/spp-legion-patch
/Website/install/SQL/fx_slides.sql
UTF-8
1,199
3.109375
3
[ "MIT" ]
permissive
/* SQLyog Ultimate v11.11 (64 bit) MySQL - 5.5.5-10.1.29-MariaDB : Database - blizzcms ********************************************************************* */ /*!40101 SET NAMES utf8 */; /*!40101 SET SQL_MODE=''*/; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40101 SET @OLD_SQL_MODE=@@SQ...
true
1b7c94e4ecbcfc9b74aca09a4c1527925fdfad5c
SQL
CUBRID/cubrid-testcases
/medium/_02_xtests/cases/group8.sql
UTF-8
172
2.53125
3
[ "BSD-3-Clause" ]
permissive
autocommit off; select product_code, avg(price) * avg(quantity) from joe.inventory_v s group by product_code having avg(price) * avg(quantity) > $500000; rollback;
true
1523aee57d615d1e63de25bdb843d0ed9d373879
SQL
MattConrad/cross-platform-sql-tricks-presentation
/app/sqlfiddle_setup.sql
UTF-8
999
3.28125
3
[]
no_license
/* This is a script for setting up all the tables used in the presentation. You can run this on sqlfiddle.com against the MS SQL Server 2008 db engine and all your tables will be ready to go. Unfortunately, there doesn't appear to be a way to set up the tables in successive steps the way the presentation d...
true
8b4bc11cac1e5a1b5ab94cd6699b8f4890fc5055
SQL
ThanitsornMsr/Querying-with-Transact-SQL-course
/Labs/Lab03.sql
UTF-8
2,854
4.65625
5
[]
no_license
-- Challenge 1: Generate Invoice Reports /*As an initial step towards generating the invoice report, write a query that returns the company name from the SalesLT.Customer table, and the sales order ID and total due from the SalesLT.SalesOrderHeader table*/ select c.CompanyName, oh.SalesOrderID, oh.TotalDue from ...
true
ab2687e2d778388ed669df98670072b0aca5f9bf
SQL
smk86131/DB
/팀프로젝트/로컬-sqlDB.sql
UTF-8
228
2.546875
3
[]
no_license
create table cartoon ( cartoonid varchar2(4 byte) not null primary key, cartoonname varchar2(30 byte), cartoondescription varchar2(40 byte) ); select * from cartoon; select * from cartoon where cartoonid = 'c001';
true
0008e8f1c8614d9adeffd6062f264162605dd1e8
SQL
alejandrocalderonhernandez/spring-boot-kotlin
/sql/create_schema.sql
UTF-8
541
3.796875
4
[]
no_license
-- table company create table if not exists company( id serial primary key, "name" varchar(32) not null unique, founder varchar(128), logo varchar(255), foundation_date date ); -- index for name create index name_company on company("name"); -- table web site create table if not exists web_site( id serial primar...
true
648b75e2fd157a63709263a8469b93feada7d14c
SQL
edimaudo/SQL
/retail.sql
UTF-8
9,518
3.25
3
[]
no_license
CREATE TABLE staff ( st_ID int NOT NULL, st_FName varchar(60) NOT NULL, st_LName varchar(60) NOT NULL, st_AddrLine1 varchar(30) NOT NULL, st_AddrLine2 varchar(30) NOT NULL, st_City varchar(25) NOT NULL, st_Postcode varchar(7) NOT NULL, st_Email varchar(30), st_Telephone varchar(11), PRIMARY KEY (st_ID) ); CREAT...
true
25d26aede8f456539afef05b8ac5f1373fbbfb7c
SQL
HPeteL/SQL---Training
/SQL Functions.sql
UTF-8
374
3.578125
4
[]
no_license
# Counting SELECT * FROM employee; SELECT COUNT(emp_id) FROM employee; SELECT COUNT(emp_id) FROM employee WHERE birt >'1971-01-01'; SELECT AVG(salary) FROM employee; SELECT SUM(salary) FROM employee; # Aggregration function SELECT COUNT(sex),sex FROM employee GROUP BY sex; # WILDCARDS % any number _ one character...
true
97233688a16966d625ab2a78b7ed445135c46173
SQL
gordon-cs/CPS350UpdatedCheckerApp
/CheckerApplication-master/CheckerSystem/SQLqueries/SqlQuery_Events.sql
UTF-8
178
3.171875
3
[]
no_license
 select sEventID, sTitle, dtStart, dtEnd from Attendum.dbo.Events where abs( datediff(day, dtStart, dtEnd) ) <= (31 * 1) and dtStart >= getdate() -7 order by dtStart
true
347f8b54f234543ce4639bde89a1b9cbbc3f5ccb
SQL
Jhorgen/employee_tracker
/database_backup.sql
UTF-8
21,399
3.046875
3
[]
no_license
-- -- PostgreSQL database dump -- -- Dumped from database version 10.5 -- Dumped by pg_dump version 10.5 SET statement_timeout = 0; SET lock_timeout = 0; SET idle_in_transaction_session_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings = on; SELECT pg_catalog.set_config('search_path', '', fal...
true
0ea3567c64b77e3d8539373967984d2769a15354
SQL
MrSquiggles13/upenn-python-homework
/SuspiciousTransactions/SQL/python_queries.sql
UTF-8
945
4.28125
4
[]
no_license
-- Had to restructure tables for credit_card_number column -- DROP TABLE credit_card; -- DROP TABLE transaction; -- Get card holders 2 & 18 -- SELECT card_holder.cardholder_id, -- transaction.amount, -- transaction.date -- FROM card_holder -- LEFT JOIN credit_card on card_holder.cardholder_id = credit_card...
true
ea3b69e0a19ec1981273fc678b61015a27c4e3be
SQL
NeoPhoenix/net.neophoenix.githubdata
/sql/install.sql
UTF-8
256
2.609375
3
[]
no_license
CREATE TABLE IF NOT EXISTS `wcf1_githubdata_hash` ( `id` int(11) NOT NULL AUTO_INCREMENT, `timestamp` int(11) NOT NULL, `hash` text NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `hash` (`hash`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
true
f962e53e2c4b6d156897a2d002890d44afce4689
SQL
fmidev/radon
/sql/geom_reduced_gaussian.sql
UTF-8
4,184
3.21875
3
[ "MIT" ]
permissive
-- -- PostgreSQL database dump -- -- Dumped from database version 15.2 -- Dumped by pg_dump version 15.3 SET statement_timeout = 0; SET lock_timeout = 0; SET idle_in_transaction_session_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings = on; SELECT pg_catalog.set_config('search_path', '', fal...
true
342b41a8684427da72d94da228310cc1ec08b697
SQL
dividedbyzero360/SQL_Server
/3_SQLQuery2.sql
UTF-8
752
4.25
4
[]
no_license
ALTER table ForeignKeyTable add constraint ForeignKeyTable_ForeignKeyColumn_FK FOREIGN KEY(ForeignKeyColumn) references PrimaryKeyTable (PrimaryKeyColumn) CREATE DATABASE DBLearning use DBLearning CREATE TABLE tblPerson ( ID INT Primary key, -- By default primary keys are not null Name nvarchar(50), Email nva...
true
2900072de12a2c11084ecc90124bd017f11015b7
SQL
kangqi0421/sql
/client_info.sql
WINDOWS-1250
818
2.765625
3
[]
no_license
-- V$SESSION_CONNECT_INFO select client_driver, client_version, count(*) --inst_id, sid, osuser, client_oci_library, client_version, client_driver from GV$SESSION_CONNECT_INFO where NETWORK_SERVICE_BANNER like '%TCP/IP%' -- pouze TCP/IP spojen -- and client_driver like 'jdbcthin' group by client_driver, cli...
true
5ece57140a5e613b30b1651c1127eeeccfd92987
SQL
Gwanom/spotigram-backend
/db_setup.sql
UTF-8
2,061
3.84375
4
[]
no_license
/* Spotigram Database v0.1.2 */ SET SCHEMA 'spotigram'; CREATE TABLE roles ( sg_role_id SERIAL, role_name TEXT NOT NULL, CONSTRAINT sg_role_pk PRIMARY KEY (sg_role_id) ); CREATE TABLE users ( sg_user_id SERIAL, username TEXT NOT NULL UNIQUE, u_password TEXT NOT NULL, user_first_na...
true
45ce2ef5d5156e306b1dfce2cc5c91f92ded8226
SQL
fanlun008/multi-table-query-2019-5-21-3-10-2-585
/select.sql
UTF-8
1,841
4.75
5
[]
no_license
# 1.查询同时存在1课程和2课程的情况 SELECT * from student_course sc WHERE sc.courseId=1 OR sc.courseId=2; # 2.查询同时存在1课程和2课程的情况 ?????1,2题不是很了解什么意思???? # 3.查询平均成绩大于等于60分的同学的学生编号和学生姓名和平均成绩 SELECT s.id,s.name,AVG(sc.score) FROM student s LEFT JOIN student_course sc ON s.id=sc.studentId GROUP BY sc.studentId HAVING AVG(sc.score)>60; # 4....
true
b4d130e69f764815c077f1ef47971827dfcb9a1e
SQL
sucun21/CMS_20171005
/sogo-lms-cms-api/sql/web_cms_execute_trainer_course.sql
UTF-8
1,030
3.375
3
[]
no_license
delimiter // DROP PROCEDURE IF EXISTS web_cms_execute_trainer_course; // CREATE PROCEDURE PROCEDURE `web_cms_execute_trainer_course`( IN p_course_id INT, IN p_trainer_id INT, IN p_execute_type VARCHAR(1) ) BEGIN DECLARE errorText TEXT; /**Delare handler sql_exception*/ DECLARE EXIT HANDLER FO...
true
45b78966664a24edf11d8ff67848b81680e1ae14
SQL
GDGDouala/jelis
/data/jelisdb.sql
UTF-8
3,647
3.578125
4
[ "BSD-3-Clause" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.1.14 -- http://www.phpmyadmin.net -- -- Client : 127.0.0.1 -- Généré le : Dim 22 Février 2015 à 19:24 -- Version du serveur : 5.6.17 -- Version de PHP : 5.5.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+01:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_...
true
4f14213d75de71b395cc41f730d014ca618dccea
SQL
DawidBochenek/SQL_Kolokwium
/SQL_Kolokwium/dbo/Views/StudentNieprzypisany.sql
UTF-8
196
3.09375
3
[]
no_license
CREATE VIEW StudentNieprzypisany AS SELECT Student.Imie, Student.Nazwisko, Student.Indeks FROM Student LEFT JOIN Przypisanie ON Student.StudentId=Przypisanie.StudentId WHERE PrzedmiotId is null
true
a2dd8300eab85f668cb013e261e852848ff0476e
SQL
k2khalsa/jarvis_data_eng_karan
/linux_sql/sql/ddl.sql
UTF-8
768
3.15625
3
[]
no_license
--Karan Khalsa 05/12/2020 --Automation file to create db tables --CREATE TABLE host_info if it does not exist CREATE TABLE IF NOT EXISTS PUBLIC.host_info( id serial NOT NULL PRIMARY KEY, hostname VARCHAR UNIQUE NOT NULL, cpu_number INT NOT NULL, cpu_architecture VARCHAR NOT NULL, cpu_model VARCHAR ...
true
ee07ad3f60ec8de24bddf0a1d9b56cebe515488c
SQL
cdiaz19/examenParcial2
/ExamenParcial2/baseDatos/progra3_exa2.sql
UTF-8
3,931
3.34375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.5.4.1deb2ubuntu2 -- http://www.phpmyadmin.net -- -- Servidor: localhost -- Tiempo de generación: 01-02-2017 a las 09:56:37 -- Versión del servidor: 5.7.17-0ubuntu0.16.04.1 -- Versión de PHP: 7.0.13-0ubuntu0.16.04.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; ...
true
9a5d44df5cfa336bca4520d2e8aded99c3b530fe
SQL
ambujsharma23/shopping
/dbfiles/state_ganna.sql
UTF-8
1,601
2.984375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.0.10deb1 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Nov 23, 2017 at 04:24 PM -- Server version: 5.5.44-0ubuntu0.14.04.1 -- PHP Version: 5.5.9-1ubuntu4.17 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_C...
true
4b3ae60d7150da8efddd7d9cc143198710d3c322
SQL
JustinData/GA-WDI-Work
/w03/d04/Instructor/clowns/examples.sql
UTF-8
587
3.28125
3
[]
no_license
insert into clown_cars (color, capacity) values('blue', 20) returning id; insert into clowns (name) values ('Bozo'); insert into clowns (name) values ('Pozo'); select clown_cars.color, clowns.* from clown_cars inner join clowns on clowns.clown_car_id = clown_cars.id; select clown_cars.*, clowns.* from clown_cars le...
true
78b8d1c270ce413b8b86ef1292908e6b22ffb713
SQL
bobzhangwz/zio-dojo
/db/migration/V2__create_todo_table.sql
UTF-8
187
2.875
3
[]
no_license
CREATE TABLE todos ( id SERIAL PRIMARY KEY, orders SMALLINT NOT NULL, completed BOOLEAN NOT NULL DEFAULT false, url varchar(1024) ); CREATE INDEX order_index ON todos (orders);
true
fcebbbdf991339a1ba6a59d57c24c67146a5a612
SQL
nikhilbhatewara/Leetcode
/Tournament Winners.sql
UTF-8
719
4.28125
4
[ "MIT" ]
permissive
# Write your MySQL query statement below /* Assign group to each player split the table between first and second player for each group, create a dense rank based on total score select palyer with rank = 1 */ with pgroups as ( select b.group_id, b.player_id,a.first_score as score from matches a join players b on a...
true
14ad07f42658d04c99b46a94d02e9af5f25f5a66
SQL
robgalicia/katsa_php
/Database/Tablas/CATEGORIA.sql
UTF-8
484
2.84375
3
[]
no_license
drop table if exists categoria; /*==============================================================*/ /* Table: categoria */ /*==============================================================*/ create table categoria ( idcategoria smallint not null auto_increment, ...
true
a2cda92196b2656db17edc944ea6e736fa29b9fd
SQL
luanchezan/DataAnalystPortfolio
/Query Report - Reporte de Consultas.sql
UTF-8
7,418
4.34375
4
[]
no_license
-- First 20 rows -- Primeras 20 filas de la base de datos SELECT * FROM "Covid"."covid-deaths" LIMIT 20; -- locations disregarding whole continents and the whole world -- Locaciones sin tomar en cuenta continentes y todo el mundo Select * From "Covid"."covid-deaths" Where continent NOT LIKE '' Order By 1,3; -- locati...
true
b65358a639b8b7861a8886b4ba090ea5dd48e139
SQL
emipy/DB
/carrosd.sql
UTF-8
2,579
3.28125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Tempo de geração: 16-Out-2020 às 04:06 -- Versão do servidor: 10.4.13-MariaDB -- versão do PHP: 7.4.8 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CL...
true
b6d30a2e736151441c4c1c616f09a13d12b735e6
SQL
cmog/TechEd2018_DAT364
/DAT364_SQLexamples/MLLAB_Exercise_1.2.sql
UTF-8
9,209
3.625
4
[ "LicenseRef-scancode-unknown-license-reference", "Apache-2.0" ]
permissive
*******************************************************************************************************************************/ /*** SAP TechEd 2018 - HandsOn session Developing Smart Applications using SAP HANA In-Database Machine Learning ***/ /*** Prepared by Christoph Morgen, SAP SE - 1st August 2018 ...
true
03045b3c56a38d554446cbca8296264d24d9f6cf
SQL
carget/CarGet
/sql/ddl.sql
UTF-8
2,481
3.609375
4
[]
no_license
CREATE TABLE brands ( brand_id INT(11) unsigned PRIMARY KEY NOT NULL AUTO_INCREMENT, brand_name VARCHAR(25) NOT NULL, brand_full_name VARCHAR(60) NOT NULL ); CREATE UNIQUE INDEX brands_brand_id_uindex ON brands (brand_id); CREATE TABLE cars ( car_id INT(11) unsigned PRIMARY KEY NOT NULL AUTO_INCREMENT, ...
true
506183f50710cc4f79a45314bb78bbc413fd017c
SQL
myoshimu/bigquery-ml-templates
/conversion_prediction_binary_classification_sql/total_timeOnScreen_month3_calculation.sql
UTF-8
951
3.515625
4
[ "LicenseRef-scancode-unknown-license-reference", "LicenseRef-scancode-generic-cla", "Apache-2.0" ]
permissive
/* Copyright 2019 Google LLC 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 https://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software dis...
true
35d5f48491b9d5619d5f0f0a6e9074bfe8812513
SQL
brentgroves/bpgsql
/CM/ItemLocationDiff.sql
UTF-8
11,736
2.875
3
[]
no_license
-- DO drops later in case you spot an error somewhere else in the process -- I messed up and called 1223 files 1213. select * into station022621 from STATION select count(*) cnt from station022621 -- 12677 02/26 -- 12677 02/22 -- 12677 02/15 -- 12677 02/08 -- 12677 02/01 -- 12677 01/27 -- 12679 01/04 -- 12679 12/21 --...
true
62c2a9bb6e0421f47c3bb4bd5889a9dcf0dc57f5
SQL
mehmetefeerkan/fivemScriptDB
/esx/Brn_Log/data.sql
UTF-8
1,045
3.03125
3
[]
no_license
CREATE TABLE `cylex_give_money` ( `Gonderen` VARCHAR(50) NULL DEFAULT NULL, `Tip` VARCHAR(50) NULL DEFAULT NULL, `Sayi` INT(11) NULL DEFAULT NULL, `Alici` VARCHAR(50) NULL DEFAULT NULL, `Zaman` TIMESTAMP NULL DEFAULT current_timestamp() ) COMMENT='ESYA, PARA VERME LOGLARI' COLLATE='latin1_swedish_ci' ENGINE=InnoDB...
true
d7a6278a5d948d4b5645df6e2e8d04e638a9b9d5
SQL
mahmutemrahsari/informatics
/IN2090/Oblig 3/sarime_oblig3.sql
UTF-8
1,926
3.84375
4
[]
no_license
--Oblig 3 --sarime --Oppgave 2 --a) select * from timelistelinje where timelistenr=3; --b) select count(*) from timelistelinje; --c) select count(*) from timelistelinje INNER JOIN timeliste on timeliste.timelistenr = timelistelinje.timelistenr where timeliste.status = 'utbetalt'; --her jeg brukte inner join for aa...
true
7120790d5382332be14a93266d4e8c33899e0f68
SQL
WackoBeast/ConnHealth
/ConnHealthDB/connhealth_database.sql
UTF-8
20,484
2.96875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.9.0.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Oct 18, 2019 at 12:05 AM -- Server version: 10.4.6-MariaDB -- PHP Version: 7.3.9 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OL...
true
af18d0255bd41de22de474abffd882fefe93e4fb
SQL
kaloyero/countryDB
/tables/tipovacunas.sql
UTF-8
570
3
3
[]
no_license
DROP TABLE IF EXISTS `TipoVacunas`; CREATE TABLE TipoVacunas ( IdTipoVacuna INTEGER AUTO_INCREMENT, Nombre VARCHAR(50) NOT NULL, VigenciaMeses INTEGER NOT NULL, Obligatoria VARCHAR(1) NOT NULL, IdEspecie INTEGER NULL, IdEmprendimiento INTEGER NOT NULL, PRIMA...
true
d7fa267bc4f2a2c48ab10ef6ac75a87beb75899f
SQL
sumonchai/WaveApps-v1
/SQL-Backup/wavenet.sql
UTF-8
17,591
3.078125
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.6.6deb4 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3306 -- Generation Time: 18 Sep 2019 pada 21.52 -- Versi Server: 10.1.38-MariaDB-0+deb9u1 -- PHP Version: 7.3.8-1+0~20190807.43+debian9~1.gbp7731bf SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!401...
true
d6f2fdcd5dd5a9909eaa5f21f6e1fe595494a6d4
SQL
hyunj0525/Liboutcomes-Homepage
/liboutcomes.sql
UTF-8
2,322
3.640625
4
[]
no_license
create database liboutcomes; use liboutcomes; -- 멤버 테이블 CREATE TABLE `member` ( `id` int(11) NOT NULL AUTO_INCREMENT, `email` varchar(50) DEFAULT NULL, `password` varchar(50) DEFAULT NULL, `name` varchar(50) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8; --...
true
7c748225a3128c1b1a5bed1dfdb5afdf7b6cb899
SQL
dwgreen1/slo-sql
/circulation/circulation-monthly-stats-by-ptype.sql
UTF-8
635
3.9375
4
[]
no_license
SET TIMEZONE = 'America/New_York'; WITH totals AS ( SELECT --transaction fields CASE WHEN t.ptype_code = '0' THEN 'State Employees' WHEN t.ptype_code = '3' THEN 'Ohio Residents' ELSE 'Others' END AS user_group, SUM( CASE WHEN t.op_code = 'o' THEN 1 ELSE 0 END ) AS total_chkout, SUM( ...
true
907697e139b7476387470a352de99888f5ad08cb
SQL
mvsabhishek/DevilsCall---MS-SQL
/insert.sql
UTF-8
2,855
3.03125
3
[]
no_license
--- Insert Sample data for Club --- insert into dbo.Club values('ISA', '2001-01-01') insert into dbo.Club values('Nerdherd', '2010-01-01') insert into dbo.Club values('Soda', '2011-01-01') insert into dbo.Club values('WiCS', '2009-01-01') --- Insert data for school --- insert into dbo.School values('Polytechnic') ins...
true
01feb186be9d46ea8b473778d901ad01f036261d
SQL
mgijax/qcreports_db
/mgd/GXD_ImageCheck.sql
UTF-8
2,715
3.78125
4
[]
no_license
\echo '' \echo 'GXD Image Figure Labels Beginning ''Fig''.' \echo '' select distinct i.jnumID, i.figureLabel from IMG_Image_View i where i._ImageClass_key = 6481781 and i.figureLabel like 'Fig%' order by i.jnumID ; \echo '' \echo 'GXD Images with Copyright containing ''(||)''' \echo '' select distinct i.jnumID, i.fi...
true
0c351f6ddad678785b527d003a7530ad0def9430
SQL
mattyparty/12_MySql
/db/seed.sql
UTF-8
1,207
3.109375
3
[ "MIT" ]
permissive
use employeeTracker; truncate table department; insert into department (name) values ('Finance'), ('IT'), ('Supply Chain'), ('Program Managment'), ('Human Resources'), ('Production'); truncate table role; use employeeTracker; insert into employeeTracker.role (title,salary,department_ID) values ('Vice President',1500...
true
5b9b36594acde9ed47615adebe6d6fa876bb7aab
SQL
lcschow/test
/testweb/src/testweb/test1.sql
UTF-8
2,782
3.546875
4
[]
no_license
SELECT (a.account_count + b.account_count + d.account_count) AS loan_cnt, ROUND((a.undemanded_principal + NVL(c.principal_arrear, 0) + NVL(d.principal_arrear, 0) + NVL(e.principal_arrear, 0))/1000000, 3) AS outstanding_principal FROM (SELECT COUNT(loan_ref_num) account_count, SUM(undemanded_principal) undeman...
true
b9eb1d5402b16d3f62901f5dd3e294e9710899f6
SQL
StiliyanM/Softuni
/Databases Basics - MS SQL Server/Report Service/Report Service/14. Open or Closed Statistics.sql
UTF-8
427
3.28125
3
[]
no_license
SELECT CONCAT(FirstName, ' ', LastName) AS [Name] CONCAT(SELECT EmployeeId FROM Reports WHERE DATEPART(YEAR,OpenDate) = 2016 AND CloseDate IS NULL AND NOT EmployeeId IS NULL AND EmployeeId = Id, '/', (SELECT EmployeeId FROM Reports WHERE DATEPART(YEAR,CloseDate) = 2016 AN...
true
26d8ea70c0baeb643e9955037537a40938ac7a3d
SQL
ejmorga1/Bamazon_Database
/database.sql
UTF-8
872
3.078125
3
[]
no_license
DROP DATABASE IF EXISTS bamazon; CREATE DATABASE bamazon; USE bamazon; CREATE TABLE products ( item_id INT NOT NULL AUTO_INCREMENT, product_name VARCHAR(100) NULL, department_name VARCHAR(45) NULL, price FLOAT4 NULL, stock_quantity SMALLINT NULL, PRIMARY KEY (item_id) ); INSERT INTO products (product_...
true
35dc9404fe9cfa408b596fe02c940eac0903ea5b
SQL
sourabhjagtap95/Student-Attendance
/student_record.sql
UTF-8
4,878
3.125
3
[ "Apache-2.0" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.3.11 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Sep 05, 2015 at 10:33 AM -- Server version: 5.6.24 -- PHP Version: 5.6.8 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; ...
true
cf56ced414badc44134e64c08bd4e8a5a46943f0
SQL
DucNhu/Learn-PHP
/learnPHP/classroom_work/example_ss10/publications.sql
UTF-8
426
3.03125
3
[]
no_license
Create database publications; use publications; create database publications; create table classics( Name varchar(200), author varchar(200), title varchar(200), category varchar(50), year smallint, isbn char(13) ); create table customers( Name varchar (200), isbn varchar (200) ); insert into classics values ('DN','Ma...
true
a589839d6773a32c308af975cf7e121d5e58d894
SQL
rahmanfp21/JC-DS-JKT-07
/sql_28jan20.sql
UTF-8
1,764
4.25
4
[]
no_license
use toko; select * from toko where (kotaId = 1 or kotaId = 3) and (totalIncome between 5000 and 7000) and tanggalBerdiri in (2015,2017) order by totalIncome desc; select count(*) as count_kota_2, min(totalIncome), max(totalIncome), sum(totalIncome), avg(totalIncome) from toko where tanggalBerdiri in (2015,2017) ...
true
73d7a94360caad08c8b3e609896725783302b09b
SQL
duggankimani/WIRA
/db/rolepermissions.sql
UTF-8
896
2.890625
3
[]
no_license
-- -- Name: role_permissions; Type: TABLE; Schema: public; Owner: postgres -- CREATE TABLE role_permissions ( roleid bigint NOT NULL, permissionid bigint NOT NULL ); ALTER TABLE role_permissions OWNER TO postgres; -- -- Name: role_permissions_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres -- ALTER...
true
658f1b2eb7f182db17ac8c3b722a546c763f6ec6
SQL
epapineau/dbt-expectations
/macros/schema_tests/column_values_basic/expect_column_values_to_be_null.sql
UTF-8
472
2.546875
3
[ "Apache-2.0" ]
permissive
{% test expect_column_values_to_be_null(model, column_name, row_condition=None) %} {% set expression = column_name ~ " is null" %} {{ dbt_expectations.expression_is_true(model, expression=expression, group_by_columns=None, ...
true
4e07b3e56e40c3a4ccd8741b3c6190964de5bf76
SQL
sogis/ekat
/afu_ekat/qg_haushalte/ug_metaha/ug_metaha_gesamt.sql
UTF-8
2,475
2.546875
3
[]
no_license
SELECT c.ogc_fid, c.xkoord, c.ykoord, c.wkb_geometry, c.gem_bfs, CASE WHEN d.b15btot > 0 THEN d.b15btot::double precision * ((( SELECT quelle_emiss_efak.schast_emiss FROM ekat2015.emiss_quelle, ekat2015.quelle_emiss_efak WHERE emiss_quelle.equelle_id = 169 AND quelle_e...
true
d0c7ebdc74c07e4899931def1a04f4d77e4eacf4
SQL
MaksPrzy/Praca_Inz_Przychodnia
/app/src/main/resources/db/migration/mysql/ddl/V8__tabela_uzytkownik.sql
UTF-8
244
2.984375
3
[]
no_license
create table uzytkownik ( id bigint auto_increment, login varchar(128) not null, imie varchar(128) not null, nazwisko varchar(128) not null, full_text_search text, primary key(id), constraint uzytkownik_login_uq unique(login) );
true
0f0b294d4a63743da9a1a214b6a7f3f639b44232
SQL
athens52/prima-beta
/sql/test.sql
UTF-8
802
2.84375
3
[]
no_license
/* MySQL Data Transfer Source Host: localhost Source Database: test Target Host: localhost Target Database: test Date: 19.12.2012 21:33:02 */ SET FOREIGN_KEY_CHECKS=0; -- ---------------------------- -- Table structure for cs_cell -- ---------------------------- CREATE TABLE `cs_cell` ( `id` int(11) NOT NULL auto_in...
true
2f71ba3c9853746ed4a9ed1ba82264a219f0257b
SQL
afanblue/refineryOMS
/db/wt.ddl
UTF-8
14,170
2.96875
3
[]
no_license
-- select t.name, ctv.name contents from tag t join tank tk on t.id=tk.id join content_type_vw ctv on ctv.code=tk.content_type_code where t.name like 'WT%' and t.tag_type_code='TK' set @tank='WT01'; set @devType='V'; set @dir='INL'; set @type='valve'; set @device='WT01-Vi'; set @inpTag='WT01-ViDI'; set @outT...
true
1a9ec8d2f9cff6bc722560a1a6cef3da130744b6
SQL
myy920/myNote
/mybatis笔记/mybatis-test/基本数据.sql
UTF-8
448
3.34375
3
[]
no_license
# 创建测试的数据库 create database db_mybatis_test; # 使用数据库 use db_mybatis_test; # 创建表 create table tab_person( id int(11) primary key auto_increment, name varchar(50) unique, age int(5) not null ); # 添加数据 insert into tab_person(name,age) values('张三',18), ('李四',19), ...
true
b3fd3e33a5ce942d62a8374acb4f5e8d7b86c61b
SQL
liuliyangsky/boc-web
/campaign/com.cherrypicks.boc.campaign.document/db/schema/campaign_api_db_schema.sql
UTF-8
10,696
2.890625
3
[]
no_license
-- +--------------------------------------------------------- -- | MODEL : BOC_CAMPAIGN -- | AUTHOR : KELVIN -- | GENERATED BY: OPEN SYSTEM ARCHITECT -- +--------------------------------------------------------- -- | WARNING : REVIEW BEFORE EXECUTION -- +--------------------------------------------------...
true
3fd361b73570a0e0b4a6ac6264f49c00578a6bba
SQL
xpgitcup/EasyPipe2017C_330A
/src/main/webapp/scripts/physical/quantity_unit.sql
UTF-8
3,565
2.765625
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : 10.1.16.50 Source Server Version : 50627 Source Host : 10.1.16.50:3306 Source Database : easypipedba Target Server Type : MYSQL Target Server Version : 50627 File Encoding : 65001 Date: 2017-07-04 16:16:54 */ SET FOREIG...
true
45c00a5c77a2f8c585f496c56401c1ac90a0335b
SQL
elliottbolzan/Fermi
/backend/queries/update_user.sql
UTF-8
1,122
3.703125
4
[]
no_license
--update a user's company, education, experience, university --add row to University table if university not already in it INSERT INTO University (id, name) SELECT '20000000', 'UNC' WHERE NOT EXISTS (SELECT name FROM University WHERE name='UNC'); --add row to Company table if company not already in it INSERT INTO Com...
true
982142eb23a06b6c24deb50a66d8253d7b5ae321
SQL
navikt/helse-spre
/styringsinfo/src/main/resources/db/migration/V5__dokument_tabell.sql
UTF-8
214
2.71875
3
[ "MIT" ]
permissive
create table vedtak_dokument_mapping( vedtak_hendelse_id UUID not null, dokument_hendelse_id UUID not null ); create index idx_vedtak_dokument_mapping_hendelse_id ON vedtak_dokument_mapping(vedtak_hendelse_id)
true
70b4aeb84cc91e85dbf140d9f71a263a96ec02f8
SQL
choprahetarth/AlgorithmsHackerRank01
/SQL Hackerrank/weatherStation4.sql
UTF-8
177
2.65625
3
[]
no_license
'''question - >https://www.hackerrank.com/challenges/weather-observation-station-4/problem?h_r=next-challenge&h_v=zen''' SELECT (COUNT(CITY) - COUNT(DISTINCT CITY)) FROM STATION
true
4e0794c1cb2134e9b87d8f74126f485490a2764a
SQL
AgustinSanchezS2DAM/EfemeridesTaurinas
/build/web/ddbb/torosdb.sql
UTF-8
9,315
2.921875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.7.4 -- https://www.phpmyadmin.net/ -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 14-06-2018 a las 17:39:39 -- Versión del servidor: 10.1.30-MariaDB -- Versión de PHP: 7.2.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; ...
true
ab9c9be9332c6a3cc95e7c69f17f52142ad3e084
SQL
amiraba/insarise-Symfony
/insarisedb.sql
UTF-8
21,602
3.203125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: May 11, 2016 at 10:01 AM -- Server version: 10.1.10-MariaDB -- PHP Version: 7.0.2 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLI...
true
e8c874b5ec7ff1238ea656f79b5bae6039bed613
SQL
haohuiyao/commerce
/program/database/commerce002.sql
UTF-8
19,157
3.515625
4
[]
no_license
/* Navicat MySQL Data Transfer Source Server : localhost_3306 Source Server Version : 50505 Source Host : localhost:3306 Source Database : commerce Target Server Type : MYSQL Target Server Version : 50505 File Encoding : 65001 Date: 2017-07-20 16:58:29 */ SET FOREIGN_KEY_CHECKS=0;...
true
8c71b8828c486d211d30885fcbcaa00f38f423ae
SQL
Tanim-Ahmed/Operational-Database-for-Library-Management-System
/triggerautomaticincreasedecreasenobook.sql
UTF-8
562
3.65625
4
[]
no_license
--A trigger to automatically increment and decrement the no_of_books from the member table upon issue and return-- create or replace trigger incr_trigger after insert or update on trans for each row begin if inserting then update book set no_of_books=no_of_books-1 where book_id =:NEW.book_id; update member set no_of_bo...
true
4c0fdecdb0e93953fafad6e9cb40479308f31449
SQL
nss-day-cohort-19/chinook-bsgreaves
/invoice_37_line_item_count.sql
UTF-8
112
2.859375
3
[]
no_license
SELECT COUNT(InvoiceLineID) as "Number of Line Items in Invoice 37" FROM InvoiceLine IL WHERE IL.InvoiceID="37";
true
1e26cc36bf495cd7e1ed8206fcfba8567d538923
SQL
CKudella/corr_data
/budé/sql_queries/no_corr_per_loc/no_corr_per_loc_receiving_from_budé_with_geocoordinates.sql
UTF-8
507
3.984375
4
[]
no_license
SELECT locations_name_modern AS 'Location Name Modern', locations_lat AS Latitude, locations_lng AS Longitude, COUNT(DISTINCT recipient_id) AS 'Number of correspondents who received at this location letters from Budé' FROM budé_cdb_v1.letters JOIN budé_cdb_v1.locations ON locations.locations_id = l...
true
c303fe1f829df205152e86a9e2a188a8e1a2bdd3
SQL
rafaelcostab/food-api
/src/main/resources/import.sql
UTF-8
965
2.578125
3
[]
no_license
insert into kitchen (id, name) values (1, 'Thai'); insert into kitchen (id, name) values (2, 'Indian'); insert into restaurant (name, tax_freight, kitchen_id) values ('Jabaquara Corner', 6.0, 1); insert into restaurant (name, tax_freight, kitchen_id) values ('Bony', 66.0, 1); insert into restaurant (name, tax_freight,...
true
ea5179471c90d50c5e729b8750e116b46be52f76
SQL
silence-do-good/stress-test-Postgres-and-MySQL
/dump/high/day20/select0737.sql
UTF-8
191
2.71875
3
[]
no_license
SELECT timeStamp, temperature FROM ThermometerObservation WHERE timestamp>'2017-11-19T07:37:00Z' AND timestamp<'2017-11-20T07:37:00Z' AND SENSOR_ID='de0f6149_6a69_4041_9a1b_73fad3b24142'
true
44df1535729aadd459e7ffd2fff9a3e88edcf8b5
SQL
wei50o7/LowInFit
/127_0_0_1 (1).sql.sql
UTF-8
26,487
2.84375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.9.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1:3306 -- Generation Time: Sep 28, 2020 at 09:44 AM -- Server version: 8.0.18 -- PHP Version: 7.3.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CH...
true
3624c61a1d8c59fc4d4ba7c510b9009f4d52fbc5
SQL
diegoorbezoh/sql_dropesac
/update_venta_final.sql
UTF-8
5,939
3.8125
4
[]
no_license
/* Script de ventas Procesos: - Actualización de ventas, pedidos en proceso - Implementación Data Studio */ # Update ventas y Transferencias drop table if exists test.venta; create temporary table test.venta SELECT a.idDetalle, a.idProducto, a.tipoDocumento, a.producto, a.idCliente, a.razonS...
true
783e12c7b1366c0e559b334c28c6c013fb0d0855
SQL
oschaefer-fu/udbp
/2018/computerspieledatenbank/sql/Create-Computerspieledatenbank.sql
UTF-8
3,438
3.8125
4
[]
no_license
-- Miniwelt Computerspieledatenbank -- erstellt von K. Güttler, M. Kark, S. Moke, J. Schult -- Erstellung der Ralationen in SQL -- Überlegungen zu der Wahl des Typs der Variable CREATE TABLE Publisher ( PID INTEGER NOT NULL, -- laufende Nummer PName VARCHAR (50), -- Namen haben un...
true
818549941254474782466fe50c4eae8e1fe01cf0
SQL
SunnnKim/Java_Bitcamp_191218_Oracle
/assignment_SQL/assignment4_hr.sql
UHC
7,835
4.5
4
[]
no_license
-- 1) EMPLOYEES ̺ King ҹڷ ˻ϰ -- ȣ,, (ҹڷ),μȣ ϶. -- LOWER Լ ϱ SELECT employee_id, last_name, Lower(job_id), department_id FROM employees WHERE LOWER(last_name) = 'king'; --2) EMPLOYEES ̺ King 빮ڷ ˻ϰ --ȣ,, (빮ڷ),μȣ ϶. -- UPPER Լ ϱ SELECT employee_id, last_name, first_name, UPPER(job_id), department_id FROM employ...
true
4fa8b48e4622e5a8afd859d0f5003ae50b80585e
SQL
DrBlogPro/DrBlog
/DrBlog/target/classes/db.sql
UTF-8
1,842
3.125
3
[]
no_license
create database DrBlog; use DrBlog; create table users( uid int primary key auto_increment, email varchar(50) unique, touchphone char(11) unique, username varchar(10) unique, password varchar(20), signtime datetime, sex varchar(1) ); create table userinfo( uiid int primary key auto_increment, ...
true
c2ccc5c2282a7d28dfc57a9e75954a01ff798554
SQL
yurivillarinho/T2S
/TESTE T2S.sql
UTF-8
5,746
3.546875
4
[]
no_license
O teste consiste em o candidato gravar um vídeo de até 1 h realizando o teste e explicando passo a passo do que está fazendo. Para isso será necessário gravar a tela do computador e o microfone. O vídeo não deverá conter cortes, não tem nenhum problema se, durante o teste, o candidato precisar consultar algum materi...
true
2d3770318d6ba038745e27f88d83801d68090f05
SQL
CibinMohan/IPS-Web
/DB/ips_data.sql
UTF-8
4,964
2.921875
3
[]
no_license
# MySQL-Front 3.2 (Build 8.0) /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES latin1 */; # Host: localhost Database: ips_data # ---------------...
true
801e6b0f7378e3b950f0a321ce06240c8b0d7ff8
SQL
govardhanhegde/MIT-CSE-LABS
/DBMS Lab/PL Cursors Advanced/01.sql
UTF-8
1,582
3.765625
4
[]
no_license
-- 1 (i) DROP TABLE Salary_Raise; CREATE TABLE Salary_Raise (iid varchar(20), rdate date, raise numeric(8, 2)); DECLARE CURSOR curse IS SELECT * FROM Instructor WHERE dept_name = 'Biology' FOR UPDATE; raiseamt numeric(8, 2); BEGIN FOR sal IN curse LOOP raiseamt := sal.salary * 1.05; UPDAT...
true
2884330ecd966c0d90cb3c4495a305e56df90193
SQL
joshzwrd/POE-CDI
/php/1_PHP_Procedural/Exercices_V3/Exercice_1.sql
UTF-8
761
3.828125
4
[]
no_license
-- Créez une base de données nommée M2i_PHP_MYSQL; -- Créez une table nommée Bibliothèque, dont les champs sont : -- -- Ref : nombre réel non-nullable et unique -- -- Nom : chaine de caractère, dont la taille est de 255, non-nullable -- -- Ville : chaine de caractères, dont la taille est de 255. ...
true
5035e74ccd1cb6894bf5753e48318bea4a44e307
SQL
fhoffa-snow/AdventOfCodeSQL
/2020/2-1.sql
UTF-8
433
3.203125
3
[ "Apache-2.0" ]
permissive
create or replace temp table passwords as select regexp_substr(v, '[0-9]*') pmin , regexp_substr(v, '-([0-9]*)', 1, 1, 'e') pmax , regexp_substr(v, '[a-z]') char , regexp_substr(v, '[a-z]+$') pass from ( select index i, value v from table(flatten(SPLIT( '1-3 a: abcde 1-3 b: cdefg 2-9 c: ccccccccc' , '\n')))); ...
true
f2d983221f9da26759ba05832222a3bece1bb2d6
SQL
shc1227/sql
/2021_03_11.sql
UTF-8
460
3.234375
3
[]
no_license
SELECT * FROM emp; --데이터 조회 방법 -- FROM : 데이터를 조회할 테이블 명시 -- SELECT : 테이블에 있는 컴럼명, 조회 하고자 하는 컴럼명 테이블의 모든 컴럼을 조회할 경우 *를 기술 SELECT empno, ename FROM EMP; SELECT * FROM EMP; --EMPNO : 직원번호, ENAME;직원이름, JOB:담당업무, --MGR:상위 담당자 ,HRIEDATE:고용일자 ,SAL:급여 , --COMM:커미션 ,DEPTNO: 부서번호
true
584e83a32b2cba2ee866c5525571bb11a4f6c539
SQL
ANeshkova/MySQL
/07.2 Database Programmability - Exercise/04. Employees from Town.sql
UTF-8
444
3.515625
4
[]
no_license
USE `soft_uni`; -- FOR JUDGE TESTING SYSTEM(without delimiter): -- DELIMITER $$ CREATE PROCEDURE `usp_get_employees_from_town` (town_name VARCHAR(40)) BEGIN SELECT e.`first_name`, e.`last_name` FROM `employees` AS e JOIN `addresses` AS a ON a.`address_id` = e.`address_id` JOIN `towns` AS t ON t.`town_id` = a.`t...
true
a8d90a1daf1c7f88b85988b4771815becb0e2d2f
SQL
benoutram/explore-education-statistics
/src/GovUk.Education.ExploreEducationStatistics.Data.Model/Migrations/20200520085437_ReleaseFootnote_Up.sql
UTF-8
193
3
3
[ "MIT" ]
permissive
INSERT INTO ReleaseFootnote (FootnoteId, ReleaseId) SELECT Id, ReleaseId from Footnote AS f WHERE NOT EXISTS(select * FROM ReleaseFootnote WHERE FootnoteId = f.Id AND ReleaseId = f.ReleaseId);
true