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
3a22ec34e80cd6ca3fd889b06477ab31ea53ffc8
SQL
divya-shiv-pandey/URLshortner
/shortener.sql
UTF-8
1,319
2.921875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.6.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Apr 18, 2021 at 08:06 PM -- Server version: 5.7.14 -- PHP Version: 7.0.10 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */...
true
c652062914f538286393da5d7ce759f1c4f76c1c
SQL
jeremymaarek/blog-en-PHP
/projet5.sql
UTF-8
4,521
2.75
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.9.3 -- https://www.phpmyadmin.net/ -- -- Hôte : localhost:8889 -- Généré le : sam. 02 mai 2020 à 12:30 -- Version du serveur : 5.7.26 -- Version de PHP : 7.4.2 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; -- -- Base de données : `test` -- -- --------------...
true
4769d5d628f3d7ec52db10177cad3a27443d8b63
SQL
dpmihai/competition
/sql/init.sql
UTF-8
7,686
3.453125
3
[]
no_license
create database competitiondb; CREATE USER 'competitionsql'@'localhost' IDENTIFIED BY 'k27ToO5l67MG67xUQyX4'; grant all on competitiondb.* to 'competitionsql'@'localhost'; flush privileges; DROP TABLE IF EXISTS app_parameters; CREATE TABLE app_parameters ( name varchar(255) NOT NULL, value varchar(...
true
dc8f89f146c28fc0de9a46113ee03965cc31c601
SQL
saku-xyz/Driving-School-AdminPanel
/SQL/content_management (3).sql
UTF-8
7,572
2.59375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.9.0.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Sep 17, 2019 at 10:32 AM -- Server version: 10.3.16-MariaDB -- PHP Version: 7.3.7 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @O...
true
dc7e26c12334fcfca30ae8ba3ae2eebe9a3d5af4
SQL
iu-msis/group-project-team-31-final
/app/data/sensor-stub.sql
UTF-8
4,297
3.40625
3
[]
no_license
DROP TABLE IF EXISTS Sensor; CREATE TABLE Sensor ( sensorId INT PRIMARY KEY AUTO_INCREMENT NOT NULL, sensorName VARCHAR(100) NOT NULL, sensorDescription VARCHAR(250) NOT NULL, manufacturer VARCHAR(100) NOT NULL, totalLifeExpectancyHours INT NOT NULL ); INSERT INTO Sensor (sensorId, sensorName, sensorDescrip...
true
b442601c013323b71c129a280be9cabcf896a167
SQL
DmitriyDodon/SQL
/sqlscripts.sql
UTF-8
2,122
3.984375
4
[]
no_license
sers table INSERT INTO users (name, email, country_id, remember_token , created_at ,updated_at) VALUES ('Tom Cruise', 'tomcruise@gmail.com',178 , 'hfkfsdfdsfdsfsiee' , CURRENT_TIMESTAMP , CURRENT_TIMESTAMP), ('Tom Cruise', 'tom@gmail.com',45 ,'fjkhjadshkjashd' , CURRENT_TIMESTAMP , CURRENT_TIMESTAMP ), ('Tom Cruise',...
true
66d23c6edceeb91aff4ecc8fe20b1a4e41beb539
SQL
kazi031/DBMS-Project
/project/SQL codes/Scrap_Metal_shop.sql
UTF-8
413
2.953125
3
[]
no_license
ALTER TABLE scrap_metal_shop DROP CONSTRAINT s_m_s_pk; ALTER TABLE scrap_metal_shop DROP CONSTRAINT s_m_s_uk; DROP TABLE scrap_metal_shop; create table scrap_metal_shop ( user_no VARCHAR2(10) NOT NULL, shop_name VARCHAR2(50) NOT NULL, Area_name VARCHAR2(50) NOT NULL, trade_license_no VARCHAR2(50) NOT NULL...
true
37f20a6e7f695de700f514aafec6ce7ce1e8d525
SQL
matsuha/tin
/auto/DelJU.sql
UTF-8
567
2.625
3
[]
no_license
delete from &&WORK_TBL where (jushocd1,jushocd2) in ( select jushocd1,jushocd2 from ju2 where haisiymd > (select kyokyu_ymd - 365 from &&WORK_TBL where rownum = 1) ) / delete from &&WORK_TBL where (jushocd1,jushocd2,jushocd3) in ( select jushocd1,jushocd2,jushocd3 from ju3 where haisiymd > (select kyokyu_ymd - 36...
true
4cfa665f3fa4d1977d6ef390ce79fc42bd709f39
SQL
dadusig/Databases-Superleague-Project
/sql/queries.sql
UTF-8
8,086
4.03125
4
[]
no_license
select coach.cv as 'ΒΙΟΓΡΑΦΙΚΟ ΠΡΟΠΟΝΗΤΗ', owner.name as 'ΟΝΟΜΑ ΠΡΟΕΔΡΟΥ' from team inner join (owner, coach) on (owner.team_name = team.name and coach.team_name=team.name) order by team.wins desc limit 0,1; DROP PROCEDURE IF EXISTS firstplayer; DELIMITER $ CREATE PROCEDURE firstplayer() BEGIN DECLARE n...
true
5371ab3e500e1cafd6939b588d3968f18cdbee7c
SQL
demonphp/library
/003-数据库/007-子查询.sql
UTF-8
943
4.125
4
[]
no_license
#1.标量子查询:子查询返回的结果是一个字段单元 # 知道班级001,想要获得所有该班级的学生 select * from student where class_id = (select * from class where name = '001'); #2.列子查询:子查询返回的结果是一个字段,但是有多个值 # 用户知道班级名称(001,002),想得到班级所有的学生信息。 select * from student where class_id in (select c_id from class where name = '001' or name = '002'); #3.行子查询:子查询返回的结果是...
true
44833ce4e894c83cbb3e564a831316cfc657fac8
SQL
shichirom/fullstack-nanodegree-vm
/vagrant/tournament/tournament.sql
UTF-8
545
3.203125
3
[]
no_license
-- Table definitions for the tournament project. -- -- Put your SQL 'create table' statements in this file; also 'create view' -- statements if you choose to use it. -- -- You can write comments in this file by starting them with two dashes, like -- these lines here. create table tournament ( id integer 0 AUTO...
true
eb2ea09a5b21e08e50b1e564862166290b3c3896
SQL
GrumpyZhou/ogm-distribution-inference
/install/create_freimann.sql
UTF-8
1,670
3.296875
3
[ "Apache-2.0" ]
permissive
CREATE TABLE freimann_processed_nodes ( id int NOT NULL, area_id int NOT NULL, node_type text, way geometry(Point, 31464) ); CREATE SEQUENCE freimann_processed_nodes_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; ALTER SEQUENCE freimann_processed_nodes_id_seq OWNED BY frei...
true
d80d9cebed37da0e132d951a597d9e3827619305
SQL
asparagoose2/Hotel-Managment
/create_DB.sql
UTF-8
6,652
3.921875
4
[]
no_license
-- To create the Databse rub all of the SQL code set global log_bin_trust_function_creators = 1; CREATE database hotel_project; use hotel_project; create table room_type ( room_type_id INT AUTO_INCREMENT, type_name VARCHAR(50) NOT NULL, num_of_beds INT not NULL, price_per_night FLOAT(5,2) NOT NULL, ...
true
8a3e0477074a4935380eec221351107f04d09bc2
SQL
victeo/SGE-Eur-epdes-Barsanulfo
/bancodedados.sql
UTF-8
215
2.640625
3
[ "MIT" ]
permissive
Create table usuarios ( ID Int UNSIGNED ZEROFILL NOT NULL AUTO_INCREMENT, login Varchar(30), senha Varchar(40), nome Varchar(40), sobrenome Varchar(40), email Varchar(40), Primary Key (ID)) ENGINE = MyISAM;
true
ce4bf04826182e923335b8f64727b7c26b75f614
SQL
tnschneider/sql-server-snippets
/diagnostics/unused-indexes.sql
UTF-8
554
4.15625
4
[]
no_license
SELECT OBJECT_NAME(i.[object_id]) AS [Table Name] ,i.NAME ,'DROP INDEX [' + I.NAME + '] ON [' + OBJECT_SCHEMA_NAME(I.OBJECT_ID) + '].[' + OBJECT_NAME(I.OBJECT_ID) + '] ' FROM sys.indexes AS i INNER JOIN sys.objects AS o ON i.[object_id] = o.[object_id] WHERE i.index_id NOT IN ( SELECT ddius....
true
9acba8a76676b588fc32df6842d70041617d1f7c
SQL
NoerkhalidahMiskiyah/10118077_Akademik-.sql
/db_akademik.sql
UTF-8
2,264
2.9375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Waktu pembuatan: 15 Agu 2020 pada 09.47 -- Versi server: 10.4.13-MariaDB -- Versi PHP: 7.4.7 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CH...
true
210151aaad60f3d408c7d2b9c394d90388beea8a
SQL
ziberius/madero
/script/category/sp_select_resources_from_category.sql
UTF-8
3,822
4.09375
4
[]
no_license
USE `made4832_radio`; DROP PROCEDURE IF EXISTS `sp_select_resources_from_category`; DELIMITER $$ USE `made4832_radio`$$ CREATE PROCEDURE `sp_select_resources_from_category`( IN p_start_date VARCHAR(10), p_end_date VARCHAR(10), p_limit INT, p_offset INT, p_categories VARCHAR(40), p_exclusions VARCHAR(40)) READS SQL...
true
442ae28dde434fb5ffc65e613d14d0b2adafe75c
SQL
Johangunawan/E-CommercePHP
/admin/kuiswebpro.sql
UTF-8
2,742
3.0625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.2.11 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Dec 18, 2014 at 09:01 AM -- Server version: 5.6.21 -- PHP Version: 5.6.3 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; ...
true
928a64381db197edea2381ad10c910cde407d518
SQL
anurlybayev/sparrow-mail-mac
/app/Sparrow.app/Contents/Resources/migration-61.sql
UTF-8
1,866
2.828125
3
[]
no_license
drop index conversation_message_relation_relation_id_idx; drop index conversation_subject_idx; drop index message_conversation_id_deleted_is_deleted_idx; drop index message_conversation_id_mailbox_id; drop index message_conversation_id_mailbox_id_deleted_is_deleted_idx; drop index message_is_flagged_mailbox_id_deleted_...
true
7e09b4ad52754eff927595876707def8576737e9
SQL
sgrzys/docker-oracle-apex5-ords
/assets/apex/core/wwv_flow_ws_geocode.sql
UTF-8
1,057
2.796875
3
[]
no_license
set define '^' set verify off prompt ...wwv_flow_ws_geocode Rem Copyright (c) Oracle Corporation 2007. All Rights Reserved. Rem Rem NAME Rem wwv_flow_ws_geocode.sql Rem DESCRIPTION Rem Interface for geocoding data. Rem Rem NOTES Rem API to generate geocode data and store in worksheet. Rem Rem ...
true
f59a8d3e326bdf4aedb9f3d4089e3a9bef71fa86
SQL
DimonLavron/Lab6_DB
/mysql/creation.sql
UTF-8
6,571
3.90625
4
[]
no_license
CREATE DATABASE IF NOT EXISTS film_db DEFAULT CHARACTER SET utf8; USE film_db; DROP TABLE IF EXISTS film_db.box_office; DROP TABLE IF EXISTS film_db.film_director; DROP TABLE IF EXISTS film_db.director; DROP TABLE IF EXISTS film_db.`role`; DROP TABLE IF EXISTS film_db.film_genre; DROP TABLE IF EXISTS film_db.genre; DR...
true
0e4e772428cbc3d52e086a0796835305a842e694
SQL
zxqw1541/javaexam
/0dbms01/step01/test02.sql
UTF-8
2,153
4.15625
4
[]
no_license
/* 데이터 중복 등록과 삭제 */ --기존에 등록된 데이터를 중복 등록한다. INSERT INTO test01(name ,age) values ('홍길동', 20); -- 중복 데이터 중에서 한 개를 지우기 /* delete from 테이블명 where 컬럼명=값 and 칼럼명=값 ...; */ delete from test01 where name='홍길동' and age=20; -- 중복 데이터 모두 삭제된다. -- 특정 데이터만 삭제하려면, 각 데이터마다 고유의 식별자가 있어야 한다. /* Key - 데이터를 식별하기 위한 컬럼 ...
true
4b4750207c412669aa3701994f039d377b18fb6a
SQL
GE73-data/sql-challenge
/db_queries.sql
UTF-8
2,662
4.5625
5
[]
no_license
-- 1.List the following details of each employee: employee number, last name, first name, sex, and salary. SELECT employees.emp_no, last_name, first_name, sex, salary FROM public.employees inner join public.salaries on employees.emp_no = salaries.emp_no; -- 2. List first name, last name, and hire date for employee...
true
ae7f0dc8dda0646b89551088da2fc2162f53fe9c
SQL
Loudhy/LosAmorosos
/EduktSoft-Procedimientos_Almacenados/pedido.sql
UTF-8
2,761
3.90625
4
[]
no_license
DROP PROCEDURE IF EXISTS INSERTAR_PEDIDO; DROP PROCEDURE IF EXISTS ACTUALIZAR_PEDIDO; DROP PROCEDURE IF EXISTS ELIMINAR_PEDIDO; DROP PROCEDURE IF EXISTS LISTAR_PEDIDO_POR_VENDEDOR; DROP PROCEDURE IF EXISTS LISTAR_PEDIDO_POR_CLIENTE; DROP PROCEDURE IF EXISTS LISTAR_PEDIDO_POR_VENDEDOR_POR_FECHAS; DROP PROCEDURE IF EXIST...
true
84afd80c8e6f1bc596548cf0f1b714760255819d
SQL
sven4all/ndovextract
/sql/kv1_veolia.sql
UTF-8
2,488
2.71875
3
[]
no_license
alter table pool drop constraint pool_version_fkey; alter table link drop constraint link_pkey; alter table link add constraint link_pkey PRIMARY KEY ("version", "dataownercode", "userstopcodebegin", "userstopcodeend", "validfrom"); alter table pool add constraint pool_dataownercode_fkey FOREIGN KEY (Version, DataOwner...
true
ab112a6182b806540265cd480e9384882f7e86c1
SQL
iimog/Phinch
/data/dbschema.sql
UTF-8
1,644
3.296875
3
[ "BSD-2-Clause" ]
permissive
-- sqlite -- -- Database: `phinch` -- -- -------------------------------------------------------- -- -- Table structure for table `Layer` -- CREATE TABLE IF NOT EXISTS `Layer` ( `layer_id` int(10) PRIMARY KEY, `name` varchar(60) NOT NULL ); -- -- Dumping data for table `Layer` -- INSERT INTO `Layer` (`layer_i...
true
54b87f19107aae449bf9cd684f0e6ed7284fa0a7
SQL
smyers1243/multithread_2_2_update
/00_01_prep/Structure/007_KCLS_config_schema.sql
UTF-8
210,670
3.09375
3
[]
no_license
-- Config schema, pre inits CREATE TRIGGER no_overlapping_sups BEFORE INSERT OR UPDATE ON config.db_patch_dependencies FOR EACH ROW EXECUTE PROCEDURE evergreen.array_overlap_check ('supersedes'); CREATE TRIGGER no_overlapping_deps BEFORE INSERT OR UPDATE ON config.db_patch_dependencies FOR EACH ROW EX...
true
a3b567d63676095ccf874699f63d3f8246e72ac7
SQL
rvbugs0/loyalty
/ignore this- sql /customer/update_customer.sql
UTF-8
922
3.296875
3
[]
no_license
DELIMITER $$ DROP PROCEDURE IF EXISTS `loyalty`.`update_customer`$$ CREATE PROCEDURE `loyalty`.`update_customer` (in v_code int,in v_name char(50),in v_username char(20),in v_password char(100),in v_password_key char(100), in v_permanent_address Varchar(500),in v_current_address Varchar(500),in v_city_code int,in v...
true
e3f4ddc40628d3c8021b4680781d2a08984b940b
SQL
stavan54sk/StudentRegistrationApplication
/src/main/resources/Schema.sql
UTF-8
520
2.546875
3
[]
no_license
CREATE TABLE Student ( ID INT AUTO_INCREMENT PRIMARY KEY, USERNAME VARCHAR(250) NOT NULL, PASSWORD VARCHAR(250) NOT NULL, SECURITYQUESTION VARCHAR(250) NOT NULL, SECURITYANSWER VARCHAR(250) NOT NULL, EMAIL VARCHAR(250) NOT NULL, PHONE VAR...
true
e8e9c93db273a57bbdf07487410a9a10fcc57a35
SQL
alaaels3id/clinic
/clinic.sql
UTF-8
5,895
3.140625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Dec 23, 2016 at 12:45 AM -- Server version: 10.1.16-MariaDB -- PHP Version: 7.0.9 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLI...
true
bc421841563ccf4288bbb4354acad63729f31f7d
SQL
airturker/ReCapProject
/SQLQuery4.sql
UTF-8
207
2.84375
3
[]
no_license
CREATE TABLE CarImages( Id int primary key identity(1,1), CarId int, ImagePath nvarchar(37), Date datetime, foreign key(CarId) References Cars(CarId), ) alter table CarImages alter column Date datetime2;
true
432422d1b45a314fe1793b3abcffa528b94d39a4
SQL
eulim17/geekbrains
/databases/lesson06/homework06.sql
UTF-8
5,423
4.0625
4
[]
no_license
/* Курс "Базы данных" Урок 6. "Вебинар. Операторы, фильтрация, сортировка и ограничение. Агрегация данных" Задача 1. Пусть задан некоторый пользователь. Из всех друзей этого пользователя найдите человека, который больше всех общался с нашим пользователем. */ USE vk; -- a list of all messages SELECT * FROM messages W...
true
6fc9478d1e23ea73c79d0d32cb7b781b98284177
SQL
OHDSI/Vocabulary-v5.0
/dmd/manual_work/vocabulary_specific_checks.sql
UTF-8
8,088
3.609375
4
[ "Unlicense" ]
permissive
--Checks that maybe used in any vocabulary after the BuildRxe and before GenericUpdate --Checking difference between old and new versions of mapping --Stats after build rxe --1. Mapping has not been changed with old_mapping AS (SELECT c.concept_id AS concept_id_1, c.concept_code AS concept_code_1, c.concept_name AS c...
true
21ca854beea0bc44ef6080257023e3c440f691d7
SQL
akbars95/study_250117
/oracle/oracle pl sql/l5_create user_and_tables.sql
UTF-8
313
2.90625
3
[]
no_license
--alter session set "_ORACLE_SCRIPT"=true;--if when installed oracle db i checked pluggeble db create user c##oraclestudy IDENTIFIED BY oracle_study159; create table customers( id int not null, name VARCHAR(20) not null, age int not null, address char(25), salary decimal(18, 2), primary key (id) );
true
a8dcdab86947c5dd2545c967376200ec7f0d9bb7
SQL
masterwebla/tienda
/tienda.sql
UTF-8
14,376
2.90625
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.8.3 -- https://www.phpmyadmin.net/ -- -- Servidor: localhost:8889 -- Tiempo de generación: 08-02-2019 a las 01:53:30 -- Versión del servidor: 5.7.23 -- Versión de PHP: 7.2.10 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; -- -- Base de datos: `tienda` -- -- ----...
true
81dd0812ef94efbc6a9db3c08fcc24e1ea850d90
SQL
sushbalajee/Swen304-Project-1
/Question5/Query5_Task2.sql
UTF-8
198
4.125
4
[]
no_license
SELECT Security, AVG(Amount) AS Amount, COUNT(Security) AS NoOfRobberies FROM(SELECT BankName, City, Amount, Security FROM Robberies NATURAL JOIN Banks) AS RobberiesPerSecurity GROUP BY Security;
true
ee07d7ad789869a302aaf4e2178e588201c0706a
SQL
englishProgrammer/Qiandao-Lake-Capacity-Warning-Web-Project
/wifiinfo.sql
UTF-8
8,579
2.84375
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : LOCAL Source Server Version : 80017 Source Host : localhost:3306 Source Database : capacity Target Server Type : MYSQL Target Server Version : 80017 File Encoding : 65001 Date: 2019-11-27 10:03:21 */ SET FOREIGN_KEY_CHECKS=0; -- ----...
true
952221b70a8d7f313b219fc5979392a3a26f03d1
SQL
Soegyi/user-management
/user.sql
UTF-8
1,755
2.875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Dec 31, 2017 at 09:23 PM -- Server version: 10.1.19-MariaDB -- PHP Version: 5.6.28 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CL...
true
a82d96e556a6781bfccd789d81d440a11f695838
SQL
jd-webb/draft-measures
/pages/cql/in-progress/fhir3/EXM72_FHIR3-8.1.0.cql
UTF-8
9,821
2.5625
3
[ "MIT" ]
permissive
// for 2020 Reporting Year library EXM72_FHIR3 version '8.1.000' /* Based on CMS72v8 - Antithrombotic Therapy by End of Hospital Day 2 Author: TJC */ using FHIR version '3.0.0' include FHIRHelpers version '3.0.0' called FHIRHelpers include MATGlobalCommonFunctions_FHIR3 version '4.0.000' called Global include TJC_Ov...
true
891978cbb3bfb5407a719a39de05addf7576f43f
SQL
julianflowers/Achilles
/inst/sql/sql_server/analyses/2000.sql
UTF-8
779
3.609375
4
[ "Apache-2.0" ]
permissive
-- 2000 patients with at least 1 Dx and 1 Rx select 2000 as analysis_id, cast(null as varchar(255)) as stratum_1, cast(null as varchar(255)) as stratum_2, cast(null as varchar(255)) as stratum_3, cast(null as varchar(255)) as stratum_4, cast(null as varchar(255)) as stratum_5, --gender_concept_id as stratum_1, COU...
true
ade6ffcbe3985ba6ac9ec47aafa647eafcc9c5f6
SQL
dmougouei/ValueTube
/backend/scripts/sql/create_readme_user.sql
UTF-8
396
2.828125
3
[]
no_license
/*COMPLETED BY: Bethany Cooper */ create user vtweb_readonly WITH PASSWORD 'PASSWORD' NOSUPERUSER INHERIT NOCREATEDB NOCREATEROLE NOREPLICATION VALID UNTIL 'infinity'; GRANT CONNECT ON DATABASE valuetube TO vtweb_readonly; GRANT USAGE ON SCHEMA public TO vtweb_readonly; GRANT SELECT ON ALL TABLES IN SCHEMA public TO ...
true
b62624e163c682bfdc3c18d82a042854d4196688
SQL
mmbond/SingiRelaxWebApp
/SingiRelaxRESTfulServise/src/main/resources/DDL.sql
UTF-8
1,259
3.8125
4
[ "MIT" ]
permissive
CREATE DATABASE IF NOT EXISTS `relax`; USE `relax`; DROP TABLE IF EXISTS `users`; CREATE TABLE `users` ( user_id INT AUTO_INCREMENT PRIMARY KEY KEY, address VARCHAR(255) NULL, email VARCHAR(255) NOT NULL, first_name VARCHAR(255) NOT NULL, interests VARCHAR(255) NULL, last_name VA...
true
28440d7246573caa6371d3d0396ba8a0f07d05da
SQL
rsikka99/work
/scripts/mysql/CustomStatements/ValidateMasterDevices.sql
UTF-8
4,450
3.1875
3
[ "Apache-2.0" ]
permissive
SELECT master_devices.id AS masterDeviceId, master_devices.manufacturerId AS masterManufacturerId, manufacturers.displayname AS manufacturer, master_devices.modelName, toner_configs.name AS TonerConfiguration, CASE master_devices.tonerConfigId WHEN 1 THEN IF(( ...
true
5217b528f2b008f1f1d55393d67a9aee92744b9c
SQL
gil0109/corteza-server
/compose/db/schema/mysql/20190701090000.automation.up.sql
UTF-8
4,371
3.890625
4
[ "Apache-2.0" ]
permissive
DROP TABLE IF EXISTS compose_automation_trigger; DROP TABLE IF EXISTS compose_automation_script; CREATE TABLE IF NOT EXISTS compose_automation_script ( `id` BIGINT(20) UNSIGNED NOT NULL, `name` VARCHAR(64) NOT NULL DEFAULT 'unnamed' COMMENT 'The name of the script', `source` TEX...
true
76aa8a07b4319a1f9d91dc6b0cbfd77904bd3cc1
SQL
shivram2609/worlditizen
/app/Config/Schema/wc.sql
UTF-8
7,985
3.046875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.0.10deb1 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Oct 06, 2017 at 06:40 PM -- Server version: 5.5.57-0ubuntu0.14.04.1 -- PHP Version: 5.5.9-1ubuntu4.22 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_C...
true
51dcdee0646fd5618b62bfc3880fb3c28d90cc67
SQL
pavantejam/SQL
/sql-ex-ru/q55.sql
WINDOWS-1250
943
3.9375
4
[]
no_license
/* Exercise: 55 (Serge I: 2003-02-16) For each class, determine the year the first ship of this class was launched. If the lead ships year of launch is not known, get the minimum year of launch for the ships of this class. Result set: class, year. */ with cteNameClass(name,class) as ( select coalesce(a.name,classes...
true
d7f2574dd0a54b30fa92a6d3cc89f94fa2c5d9f1
SQL
phahok/scripts_sql
/VERIFICAR ERRO NA IMPORTACAO DO XML DA NFE.sql
UTF-8
1,043
3.984375
4
[]
no_license
-- verificar qual nfe tem valor contabil diferente select a.NF_ENTRADA,a.QTDE_TOTAL,a.VALOR_TOTAL,c.VALOR_CONTABIL,sum(b.qtde_item),sum(valor_item) from ENTRADAS a join ENTRADAS_ITEM b on b.NF_ENTRADA=a.NF_ENTRADA and b.SERIE_NF_ENTRADA=a.SERIE_NF_ENTRADA join W_LF_REGISTRO_ENTRADA_IMPOSTO c on c.NF_ENTRADA=b.NF_ENTRAD...
true
a663057c76dd233e7414ef61c569ffd685e936eb
SQL
cpj509/DB_Study
/select2.sql
UTF-8
1,636
4.34375
4
[]
no_license
--중복 제거 : distinct select * from employees; select job_id, department_id from employees; select DISTINCT job_id, department_id from employees; --문자 타입 함수 select last_name, lower(last_name), upper(last_name), email, initcap(email) from employees; --첫 번째 자리부터 2개의 문자 출력 - substr() select job_id, substr(job_id, 1, 2) 직...
true
7811c7efe9f3bd28167f4afbc4fdf6187f24c373
SQL
drdesigner/blog2013
/conf/sql/tablas.sql
UTF-8
1,676
3.515625
4
[]
no_license
-- Información sobre Collations-Charts en MySQL. -- http://collation-charts.org/mysql60/ -- Estructura de las tablas del blog. CREATE TABLE IF NOT EXISTS `messages` ( `id` int(11) NOT NULL AUTO_INCREMENT, `fatherid` int(11) DEFAULT NULL, `nickname` varchar(20) COLLATE utf8_spanish_ci NOT NULL, `title` varchar...
true
243bd34a427765d7b99df7fa949a0e767e75b34e
SQL
YYMo/csc343automarker
/all/g3caorob/a2.sql
UTF-8
1,536
3.875
4
[]
no_license
-- Add below your SQL statements. -- You can create intermediate views (as needed). Remember to drop these views after you have populated the result tables. -- You can use the "\i a2.sql" command in psql to execute the SQL commands in this file. -- Query 1 statements INSERT INTO Query1 (Select r.c1id,r.c1name,countr...
true
18f3182f8b4ff89a8b6ea1dd8b2c68aaec76e46a
SQL
agatpan/SQL
/sql-task-01.sql
UTF-8
260
2.921875
3
[]
no_license
-- ZADANIE 1 - utwórz tablicę Products z kolumnami id, name, manufacturer, price DROP TABLE Products; CREATE DATABASE infoshare; Use infoshare; CREATE TABLE Products ( id INT, name VARCHAR(100), manufacturer VARCHAR(100), netprice DECIMAL(7,2) );
true
47147d8a7d4b08d9b96857ae5f748b49b85e56b1
SQL
s1217815-ed-19/dragons
/SQL_david/spatial_queries.sql
UTF-8
1,571
4
4
[]
no_license
/*Distance between two settlements (points), result in metres*/ SElECT SDO_GEOM.SDO_DISTANCE(A.LOCATION, B.LOCATION, 0.005) FROM s1234874.SETTLEMENTS A, s1234874.SETTLEMENTS B WHERE A.NAME = 'London' AND B.NAME = 'Mexico City'; /*Topological intersection between two regions (polygons)*/ SELECT SDO_GEOM.SDO_INTER...
true
ac415e6fbe1fcfcde8a38b8b9add7826e6b388a0
SQL
TilluChauhan/event
/database sql/admin_register.sql
UTF-8
1,952
3
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.1.0 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Nov 01, 2021 at 04:27 PM -- Server version: 10.4.19-MariaDB -- PHP Version: 7.3.28 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIE...
true
cf969faaaff8f78a3b32ce08da48ad9e489bb824
SQL
hkt5/cms
/conf/evolutions/default/1.sql
UTF-8
4,480
4
4
[]
no_license
# --- Created by Ebean DDL # To stop Ebean DDL generation, remove this comment and start using Evolutions # --- !Ups -- init script create procs -- Inital script to create stored procedures etc for mysql platform DROP PROCEDURE IF EXISTS usp_ebean_drop_foreign_keys; delimiter $$ -- -- PROCEDURE: usp_ebean_drop_...
true
a87da2a4a9e6b025c7aabf549f2ff8440cb2827a
SQL
SamDimitra/Databases_AUEB
/exercise 2/alter_tables.sql
UTF-8
438
2.875
3
[]
no_license
ALTER TABLE Listings_summary ADD FOREIGN KEY (id) REFERENCES Listings(id); ALTER TABLE Calendar ADD FOREIGN KEY (listing_id) REFERENCES Listings(id); ALTER TABLE Reviews_summary ADD FOREIGN KEY (listing_id) REFERENCES Listings(id); ALTER TABLE Reviews ADD FOREIGN KEY (listing_id) REFERENCES Listings(id); ...
true
8d58e6eabc02c8021a509ccce49482e3420a244c
SQL
federicoaragon27/Queries
/AR Comercial Dashboard/Com_Ar_BuyingLeads.sql
UTF-8
1,167
3.71875
4
[]
no_license
SELECT cp.profile_ptr_id as buyer_id, oc.country, bl.chance_ac, MIN(timezone('America/Buenos_Aires',oc.created_at))::date as buyer_creation_date, user_ac.username as agent_name, CASE WHEN cp.buying_stage = 'unreached' THEN '1. Unreached' WHEN cp.buying_stage = 'pitched' THEN '...
true
4422d0bfdf82b74c44d97d6547addabab149d30e
SQL
tuiusx/ProjetoLMS
/Banco_SQL_LMS.sql
UTF-8
5,605
4.03125
4
[ "Apache-2.0" ]
permissive
--Tabela usuario create table USUARIO ( ID INT IDENTITY, LOGIN VARCHAR(30) NOT NULL, SENHA VARCHAR(30) NOT NULL, DT_EXPIRACAO DATE NOT NULL CONSTRAINT DF_DT_EXPIRACAO DEFAULT ('01/01/1900'), CONSTRAINT PK_USUARIO PRIMARY KEY (ID), CONSTRAINT UQ_LOGIN UNIQUE( LOGIN ), ); --tabela curso CREATE TABL...
true
f9a622b7b81220c3474607b40cd8a9ac625a32ef
SQL
silence-do-good/stress-test-Postgres-and-MySQL
/dump/low/day23/select1407.sql
UTF-8
264
2.90625
3
[]
no_license
SELECT sen.name FROM SENSOR sen, SENSOR_TYPE st, COVERAGE_INFRASTRUCTURE ci WHERE sen.SENSOR_TYPE_ID=st.id AND st.name='WiFiAP' AND sen.id=ci.SENSOR_ID AND ci.INFRASTRUCTURE_ID=ANY(array['1412','3100_6','4082','4081','3082','4002','5204','2206','6213','5214'])
true
ead0d2e72c57f201dbb251f5e1c824d9d7c86476
SQL
James-ZY/zy_stb_adv
/db/01.mysql_global_init.sql
UTF-8
776
2.765625
3
[]
no_license
CREATE DATABASE IF NOT EXISTS adv DEFAULT CHARACTER SET utf8 COLLATE utf8_bin; use mysql; insert into mysql.user (Host,User,authentication_string,ssl_cipher,x509_issuer,x509_subject) values("%","adv",password("adv"),'','',''); update user set authentication_string=password('48STX2X') where user='root'; flush privil...
true
29f2b7ad4058943b9e962216f9403c23988f8221
SQL
yaobozhang/YF_EB
/会员体系/会员分析/会员关键数据/电商会员关键指标/关键指标计算脚本.sql
UTF-8
8,686
3.546875
4
[]
no_license
with t1 as ( SELECT t."UUID", --明细唯一编码 t."STSC_DATE", --销售日期 case when weekday("STSC_DATE")+1>=1 and weekday("STSC_DATE")+1<=5 then 'Y' ELSE 'N' END as is_weekday, t."SALE_ORDR_DOC", --销售订单号 t."ORDR_SALE_TIME", t."PHMC_CODE", --门店编码 ...
true
66dd79c77cd4eedcfaf77180ffef26e042d5ebf6
SQL
xzhang007/game
/db/cczzCreate.sql
UTF-8
1,342
3.765625
4
[]
no_license
-- ---- -- Table user -- ---- DROP TABLE IF EXISTS users CASCADE; CREATE TABLE users ( id SERIAL PRIMARY KEY NOT NULL, username VARCHAR(255) NOT NULL, email VARCHAR(255) NOT NULL, password VARCHAR(255) NOT NULL, money INT DEFAULT 100 NOT NULL, ranking INT DEFAULT 0 ...
true
7aad9fd961eb499332efd0f3d6712353c2a3e7eb
SQL
sabinastha/BusInformationSystem
/query.sql
UTF-8
658
2.6875
3
[]
no_license
SELECT * FROM businfo.businfo; create table businfo ( b_no int(20), b_route varchar(30), b_src varchar(30), b_dest varchar(30), b_arrtime varchar(20), b_desttime varchar(20), b_stop varchar(30) ); insert into businfo values (12345, 'Delhi-Agra', 'Delhi', 'Agra', '9:00 A:M', '14:00 P:M', 'Mathu...
true
99ccd7aed47bf8573aea6e4f3090aaa75d8c657c
SQL
pgpartman/pg_partman
/test/test_native/test_nonsuperuser/test-nonsuperuser-part3.sql
UTF-8
828
2.84375
3
[ "PostgreSQL" ]
permissive
-- Additional tests: Testing nonsuperuser -- NOTE: THIS FILE MUST BE RUN AS A SUPERUSER \set ON_ERROR_ROLLBACK 1 \set ON_ERROR_STOP true SELECT set_config('search_path','partman, public',false); SELECT plan(1); DROP SCHEMA IF EXISTS partman_test CASCADE; REVOKE ALL ON SCHEMA partman FROM partman_basic; REVOKE ALL...
true
71191f8a4d23d95d889001c34f88a8a93d912e70
SQL
jabley/volmobserverce
/framework/MCS-Open/db/internal/sql/2002011410.sql
UTF-8
994
2.625
3
[]
no_license
rem --------------------------------------------------------------------------- rem $Header: /src/voyager/db/internal/sql/2002011410.sql,v 1.2 2002/02/18 12:58:15 jason Exp $ rem --------------------------------------------------------------------------- rem (c) Volantis Systems Ltd 2002. rem -------------------------...
true
b9999e6f9c3c51170f7f0f819b6e7805f65f6dfa
SQL
smitheus/Troll
/scripts/TrollDBUpdate.sql
UTF-8
11,915
3.734375
4
[]
no_license
use troll; drop procedure InterchangeInsert ; create procedure InterchangeInsert (pSourceSystem varchar(10), pSourceTimestamp timestamp, pInterId varchar(40), pNumInstructions int, pCountry varchar(10), pMessageType varchar(20), pInstrumentGroup varchar(20)) begin declare insertTimeStamp timestamp ; declare totalCou...
true
4d9acd6454eadf0fe05cfcf32e8b62d80787fcf4
SQL
krunalsabnis/iot-event-pipeline
/cassandra/cassandra-setup.cql
UTF-8
1,992
3.59375
4
[]
no_license
CREATE KEYSPACE iot WITH REPLICATION = { 'class' : 'SimpleStrategy', 'replication_factor' : 1 }; USE iot; // Custom Value Type to support generic value persistance Create TYPE iot.value( dataType text, reading text ); // Table for events CREATE TABLE iot.events ( deviceType text, deviceId text, event...
true
6d8bb8689833a8bd69f0201afed4d3d96afb9678
SQL
OleksandrBidnyi/GoJava6
/Module1_Dev/task1/populateDB.sql
UTF-8
1,154
2.96875
3
[]
no_license
INSERT INTO companies (name) VALUES ('Amazon'), ('Oracle'), ('Yandex'); INSERT INTO customers (name) VALUES ('LG'), ('MSI'), ('Samsung'); INSERT INTO skills (skill) VALUES ('C++'), ('Java'), ('mySQL'), ('C'), ('PHP'); INSERT INTO developers (name, company_id) VALUES ('Nikolay', 1), ('Nata...
true
1793eca572fa5c7ceb9b7b89d046e69e8155642a
SQL
Sligowebworks/datacruncherdownload
/DataCruncherSQL/EnrollmentDisabilityDataCrunch4.sql
UTF-8
2,419
3.6875
4
[]
no_license
-- suppression!! select year, 'agency_key' = AgencyKey, CESA, 'district_number' = [District Number],'school_number' = [School Number], 'agency_type' = left(right(fullkey,6),2), 'school_type' = [SchoolTypeLabel], charter, 'district_name' = ltrim([District Name]), 'school_name' = ltrim([School Name]), --'gra...
true
1bb13033bc09e869c3295b1aac3a611dae8361a2
SQL
mjh1583/BigDataEducation
/workspace-jsp/WebStore/WebContent/resources/sql/product.sql
UTF-8
2,816
3.265625
3
[]
no_license
-- private String productId; //상품 아이디 -- private String pname; //상품명 -- private int unitPrice; //상품 가격 -- private String description; //상품 설명 -- private String manufacturer; //제조사 -- private String category; //분류 -- private long numberOfStock; //재고 수 -- private String condition; //신상품 or 중고품 or 재생품 -- p...
true
728571a69eb80924bc4decd00b2e8cc7d9085fb6
SQL
dreyes06/DR-Photography
/db/users/check_user.sql
UTF-8
106
2.703125
3
[]
no_license
SELECT * FROM users u JOIN user_cart uc ON u.user_id = uc.user_id WHERE u.email = $1 AND uc.paid = false;
true
e3f257ac786e5130e8aa7d05edaf7258b0c3da77
SQL
GordinV/buh70
/sql/lapsed/create_view_com_lapse_grupp.sql
UTF-8
544
3.265625
3
[]
no_license
DROP VIEW IF EXISTS lapsed.com_lapse_grupp; CREATE OR REPLACE VIEW lapsed.com_lapse_grupp AS SELECT lg.id AS id, lg.kood, lg.nimetus, lg.rekvid, lg.properties::jsonb ->'all_yksused' as all_yksused, lg.properties::jsonb ->'teenused' as teenused FROM libs.library lg WHERE lg.librar...
true
e330faf55a5321162f2d3f9d8eeb2a6cd843ae8f
SQL
ws-devteam/WS
/react-app/db.sql
UTF-8
21,023
3.53125
4
[ "CC-BY-4.0", "CC-BY-3.0" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.8.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jun 08, 2021 at 08:47 PM -- Server version: 10.1.33-MariaDB -- PHP Version: 7.2.6 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
true
41e91dd1cbc99627faf118d90779a8971860693e
SQL
UniversityofFlorida/Data-Warehouse
/Query_Samples/Enrollment_For_Term_for_UFID.sql
UTF-8
990
3.546875
4
[]
no_license
/* * Enrollment Breakdown for a term * Filtered by TERM * Displays the Primary activated academic career program plan information, course information, technology indicator, section component, grade, and GPA information * */ select B....
true
b9b2d799a25c3ae06bcfc7b046d8fff373d2d630
SQL
uvbs/gameengine
/Development/Src/DataCacheServer/zion_db_mysql.sql
UTF-8
2,236
4.0625
4
[]
no_license
-- 用户表 CREATE TABLE user_table ( user_id int(11) NOT NULL AUTO_INCREMENT COMMENT '用户ID', token varchar(200) NOT NULL COMMENT '用户标识', state int(11) DEFAULT 0 COMMENT '用户状态 0:激活 1:冻结', freeze_duetime TIMESTAMP DEFAULT 0 COMMENT '封停到期时间', PRIMARY KEY (user_id) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; CREATE UNIQUE ...
true
9538e9b9aa830d8aabfe819e0eaeab5ed8675fce
SQL
khalifandiaye/projet-bdd-pharma-master1
/ThesaurusSQL3KatiaFinal.sql
UTF-8
1,846
3.3125
3
[]
no_license
create or replace type Thesaurus_T as object ( ID_Thes number, Langue varchar2(20), Auteur varchar2(20), Date_Creation date, Description varchar2(20), Publie integer, Contributeur varchar2(20), Format varchar2(20), Type_Thes varchar2(20), Source_Thes varchar2(20) ); / CREATE OR REPLACE TYPE De...
true
3a76e6f4de579fe7bce1abbb76e834d4c8f9dcbe
SQL
taylorperkins/exploring-lahman-baseball-db
/sql-scripts/q_2.sql
UTF-8
1,319
4.59375
5
[]
no_license
/* QUESTION:: Find the name and height of the shortest player in the database. * How many games did he play in? * What is the name of the team for which he played? GROUPS:: * player FILTERS:: * min height CHARACTERISTICS:: * full name (namefirst...
true
4744a86570426b2c618d6b5b5b09a2737b0380c2
SQL
robbyHuelsi/mueslimachine
/app/MMMySQL/MMMySQLCommander/commands/ir_createTable.sql
UTF-8
406
3.140625
3
[]
no_license
CREATE TABLE `{table}` ( ir_uid BIGINT UNSIGNED AUTO_INCREMENT PRIMARY KEY, ir_ingredient BIGINT UNSIGNED NOT NULL, ir_recipe BIGINT UNSIGNED NOT NULL, ir_weight BIGINT UNSIGNED, ir_order INT UNSIGNED, FOREIGN KEY (ir_ingredient) REFERENCES `{tbl_ingredient}` (ingredient_uid)...
true
a1caffb63d20845292c0113f19412aecfd3d85a0
SQL
asfuyao/Scripts
/SQLServer/查找连续号段的方法.sql
GB18030
473
4.0625
4
[]
no_license
--ŶΣʾÿŶεʼźͽ create table #temp ( id int, num int ); insert into #temp(id, num) values(1, 33), (2, 344), (3, 25), (5, 222), (6, 229), (10, 238), (15, 88); --select * from #temp with temp_table as ( select id-row_number() over (order by id) gid, id, num from #temp ) select gid ,min(id) ʼID,max(id) ID,count(id) ID...
true
db0118199341ab5a11801a9adc825f1291c81ac2
SQL
ejonakodra/holbertonschool-machine_learning-1
/pipeline/0x02-databases/20-average_score.sql
UTF-8
460
3.625
4
[]
no_license
-- Creates a stored procedure ComputeAverageScoreForUser that computes and stores the average score for a student -- Procedure AddBonus takes 1 input: -- user_id, a users.id value, can assume user_id is linked to existing users DELIMITER // CREATE PROCEDURE ComputeAverageScoreForUser (IN user_id_new INTEGER) BEGIN ...
true
032b3f3ed1e05fe4493b8fdd77750fbc28088214
SQL
stilografica/modelatge-BBDD
/Cul_Ampolla.sql
UTF-8
7,911
2.90625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Servidor: localhost -- Tiempo de generación: 18-07-2020 a las 19:20:19 -- Versión del servidor: 10.4.13-MariaDB -- Versión de PHP: 7.4.7 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_...
true
3540dc9b22d7fe448650926650c0ea9c298d7162
SQL
a-gavriel/Bases-Tarea
/Tarea1/Inserciones.sql
UTF-8
16,519
2.640625
3
[]
no_license
INSERT INTO PlatilloXRestaurante VALUES ( (SELECT id_Platillo FROM Platillo WHERE nombre = 'Chop Suey'), (SELECT id_Restaurante FROM Restaurante WHERE nombre = 'El Lago') ); --CREACIÓN DE LOS HORARIOS INSERT INTO Horario values (1 , 'Desayuno', 800 ,1000); INSERT INTO Horario values (2 , 'Almuerzo', 1100,1400); ...
true
48dea064cd7cce08c65bfb51d1ed65f708bb2ab4
SQL
vyooom/fullCourse-mysql-bootcamp
/aggregate-functions/group-by.sql
UTF-8
427
3.71875
4
[]
no_license
SELECT author_lname, COUNT(*) FROM books GROUP BY author_lname; SELECT author_fname, author_lname, COUNT(*) FROM books GROUP BY author_lname, author_fname; SELECT released_year, COUNT(*) FROM books GROUP BY released_year ORDER BY released_year; SELECT CONCAT ( 'In ', released_year, ', ', COUNT(*)...
true
b72c3f41743da53bf553f1c665966b5fb2acf668
SQL
stoked49/Database_Exercises
/src/functions_exercises.sql
UTF-8
765
3.984375
4
[]
no_license
SELECT COUNT(*), gender AS "Employee Count With Gender" FROM employees WHERE first_name IN ('Irena', 'Vidya', 'Maya') GROUP BY gender; SELECT concat(first_name, " ", last_name) AS "full name" FROM employees WHERE last_name LIKE 'e%e'; SELECT first_name, last_name, datediff(now(), hire_date) AS "number of days emp...
true
a34cad1c4e050f12a02b10905f9de10cd8ab92cb
SQL
zhuchenchen97/LeetCode
/Duplicate Emails.sql
UTF-8
158
3.34375
3
[]
no_license
# Write your MySQL query statement below SELECT DISTINCT Email FROM Person WHERE Email In( SELECT Email FROM Person GROUP BY Email Having count(Email)>1 )
true
b558071961c44496fe7c8e79119e2b5825f750b0
SQL
borislavab/SQL
/uni_code/1.simple_joins/Practice2_pc.sql
UTF-8
2,442
3.953125
4
[]
no_license
/* 1. Напишете заявка, която извежда производителя и честотата на процесора на лаптопите с размер на харддиска поне 9 GB. */ use pc; select * from laptop; select * from product; select maker, speed from laptop join product on laptop.model = product.model where hd > 9; /* 2. Напишете заявка, която извежда номер...
true
c83eca73f9a49c43ed456bd6932540792aee6994
SQL
Nicolasribot/PG-sessions-2016
/todo.sql
UTF-8
27,075
3.546875
4
[]
no_license
-- Parallel queries and big data: -- Traitements spatiaux parallélisés pour les gros volumes de données -- 20 min -- parsql= https://github.com/gbb/par_psql -- FMI: fast map intersection: https://github.com/gbb/fast_map_intersection -- decoupe d'une requete en petites parties lancées en // -- script shell à editer po...
true
8def3da88b0012b9b2a7261155faf97eda256941
SQL
Discordanian/mmatch
/sql/selectQuestionsWithOrg.sql
UTF-8
776
3.734375
4
[ "MIT" ]
permissive
DROP PROCEDURE IF EXISTS selectQuestionsWithOrg; CREATE PROCEDURE selectQuestionsWithOrg (org_id INT) SELECT gg.page_num, gg.group_text, qq.question_id, qq.org_question_text, qq.org_multi_select, qc.choice_id, qc.choice_text, res.org_response_id, res.org_id, res.selected, '0' AS new_selected FROM question_gro...
true
3dc40b7e55a92da077009a6efb0e6293e8a9645f
SQL
LucaContri/dataanalysis
/SFReportEngine/resources/McDonalds.Backlogs.sql
UTF-8
4,754
3.53125
4
[]
no_license
create or replace view mcdonalads_backlog as select if(sla.`Metric` in ('ARG Revision - First', 'ARG Revision - Resubmission'), 'PRC', if(sla.`Metric` in ('ARG Submission - First', 'ARG Submission - Resubmission', 'ARG Submission - Unsubmitted WI'),'Delivery', if(sla.`Metric` in ('ARG Completion/Hold'),'Admin...
true
4b3f759901f60f453d1f2e7a9d868eb2c785a237
SQL
ZmeyTimey/Training
/University/src/test/resources/selection_committee_test.sql
UTF-8
1,619
3.625
4
[]
no_license
CREATE SCHEMA IF NOT EXISTS `selection_committee_test` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_as_ci; CREATE TABLE IF NOT EXISTS `selection_committee_test`.`users` ( `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'Первичный ключ таблицы.', `login` VARCHAR(45) CHARACTER SET 'utf8mb4' COLLATE 'utf8m...
true
f2e7eb94aa4fb252740f4afa6dd8adeebfb2e55a
SQL
Mehedi-Hasan-Abir/Railway-Station-Management-System
/triggers.sql
UTF-8
1,100
3.734375
4
[]
no_license
create or replace trigger changeticketCount after insert or update on booking for each row declare tkt_count number; bk_status varchar2(20); begin select count_ into tkt_count from ticket where ticketid = :new.ticketid; if :new.booking_status = 'Booked' then update ticket set count_ = t...
true
54be9fe0ff13be397938de0682935eaec4c9bf77
SQL
dingjinhui821/julive_database
/schema/julive_ods/cj_layout_diagram_history.sql
UTF-8
1,257
2.859375
3
[]
no_license
drop table if exists ods.cj_layout_diagram_history; create external table ods.cj_layout_diagram_history( id bigint comment '', layout_diagram_id bigint comment '户型图id', summary ...
true
6edf43dd0febaaef6961cba1cf0beaa8f6ecf59a
SQL
grilix/cdlib-sample
/migrations/002-add-artists.up.sql
UTF-8
138
2.515625
3
[]
no_license
CREATE TABLE "artists" ("id" serial primary key, "user_id" varchar(20) references "users"("id") NOT NULL, "name" varchar(40) NOT NULL);
true
06a3eb84511a511c1204ffc139c800cd9dcf4d4f
SQL
okyapu/EXPJ.OPF
/OPF/CommonLib/DBProj/Trigger/TRG_T_PRD_REQ5.SQL
UTF-8
192
2.625
3
[]
no_license
CREATE OR REPLACE TRIGGER TRG_T_PRD_REQ5 BEFORE INSERT OR UPDATE OF SLIP_DATE ON T_PRD_REQ REFERENCING OLD AS OLD NEW AS NEW FOR EACH ROW BEGIN :NEW.SLIP_DATE :=TRUNC(:NEW.SLIP_DATE );END; /
true
9b35f710e208351e0860872b9ea9417b2eea6fe1
SQL
Derbyhill/EazyjetDB
/ezy_ContactTelNum.sql
UTF-8
1,976
3.1875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.7.5 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: Nov 06, 2018 at 10:21 AM -- Server version: 10.1.36-MariaDB -- PHP Version: 7.0.32 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OL...
true
4e997c47005eeeb7144d63f6ccff506cf3c7d299
SQL
RogerDavidCruz/code-wars
/#_The_Post_RC_Saga_Training/SQL_practice/8kyu_codewars/8kyu_easy_SQL_convert_to_hexadecimal.sql
UTF-8
488
2.875
3
[]
no_license
-- 8kyu - Easy SQL: Convert to Hexadecimal -- https://www.codewars.com/kata/594a50bafd3b7031c1000013/train/sql -- to hexYou have access to a table of monsters as follows: -- -- ** monsters table schema ** -- -- id -- name -- legs -- arms -- characteristics -- Your task is to turn the numeric columns (arms, legs) into ...
true
340ec9fe1333c9511123c2dee6bf6379bfe2e1b5
SQL
TheTypoMaster/myapps
/localhost.sql
UTF-8
15,294
3.046875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.0.10deb1 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Aug 31, 2015 at 02:50 PM -- Server version: 5.5.44-0ubuntu0.14.04.1 -- PHP Version: 5.5.9-1ubuntu4.11 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_C...
true
37659ca7073cdef9143bcc46961e3c9b58af568c
SQL
MrRisoni/theatronapi
/src/main/resources/queries/performances.sql
UTF-8
1,828
4.125
4
[]
no_license
SELECT theaterSeats.totalSeats, AVG(IF ( orderItems.tickets IS NULL,0,orderItems.tickets)) AS totalTickets, t.tht_id AS theaterId, p.per_id AS performanceId, p.per_duration AS duration, t.tht_name AS theaterName, p.per_from_date AS fromDate, p.per_to_date AS toDate, ply.ply_title AS playName , G.gen...
true
26d951110ff5f8b621fb702e76dac62ef2ba46fd
SQL
ChaeRin-Im/PotatoMarket
/Init_SQL/potatoRDS_ver3.sql
UHC
10,809
3.3125
3
[]
no_license
DROP TABLE KEYWORD; DROP TABLE TRADE; -- ̺ ̸ ٲų ׷ǵ -- INSERT ȵǰųϸ ̺ ü ϳ Ȯϸ鼭 Ʒ Ű˴ϴ. DROP TABLE Chat; DROP TABLE TradeInfo; DROP TABLE BLike; DROP TABLE PLike; DROP TABLE MLike; DROP TABLE BAdd; DROP TABLE PAdd; DROP TABLE Out; DROP TABLE Board; DROP TABLE Favor; DROP TABLE Report; DROP TABLE Product; DROP TABLE Ca...
true
442ff550e477d4943a46fdd5a309e48e873f38b2
SQL
chandra9vyas/multidots_assignment
/yii2latest.sql
UTF-8
7,868
3.171875
3
[ "BSD-3-Clause" ]
permissive
-- phpMyAdmin SQL Dump -- version 3.5.2.2 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Apr 16, 2018 at 06:00 PM -- Server version: 5.5.27 -- PHP Version: 5.4.7 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /...
true
589718bdbceac133fdde8b53415ec48b114792bd
SQL
czapla1/JavaFX-zadania
/JFX2/tableFX.sql
UTF-8
1,220
3.578125
4
[]
no_license
create database tabeleFX; use tabeleFX; create table employee( id_employee Integer not null primary key auto_increment, firstName_employee varchar(15) not null, lastName_employee varchar(25) not null, gross_salary Integer not null ); #insert into employee (firstName_employee,lastName_employee, gross_salary) values...
true