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
b7d22f731b7d010cb5d643736b09d2f20a9d4b42
SQL
zhilangtaosha/BBG
/SQL/2015-07-29_RA-购物篮平均购买商品SKU.sql
UTF-8
1,497
4
4
[]
no_license
--day,loc,sku SELECT TO_DATE(SUBSTR(C.DT_WID, 2, 8), 'YYYYMMDD') DAYS, O.ORG_NUM, ROUND(C.ITEM_COUNT / C.TRX_COUNT, 2) SI_SKU FROM RADM.W_INT_ORG_D O, (SELECT B.ORG_WID, B.DT_WID, COUNT(B.SLS_TRX_ID) TRX_COUNT, SUM(B.ITEM_COUNT) ITEM_COUNT FR...
true
66ba1101e2afbd6a1a7030b09740a3dfd50c6b94
SQL
jalvarova/microservice
/ms-currency/src/main/resources/init-data.sql
UTF-8
1,657
3.59375
4
[]
no_license
CREATE TABLE IF NOT EXISTS hta.currency_code_names ( currency_code_names_id BIGSERIAL NOT NULL, currency_code VARCHAR(4) NOT NULL, currency_name VARCHAR(255) NOT NULL, created_at TIMESTAMP DEFAULT NOW(), updated_at TIMESTAMP DEFAULT NOW(), state BOOLEAN DEFAULT TRUE, CONSTRAINT currency_code...
true
5e06f36e1f9a0d720780986df5c545d0e7b6cfff
SQL
sncodeGit/University_Tasks
/DB/query_9.sql
UTF-8
688
4.1875
4
[]
no_license
WITH film_rental_count AS ( SELECT inventory.film_id AS film_id, COUNT(rental_id) AS film_count FROM rental, inventory WHERE rental.inventory_id = inventory.inventory_id GROUP BY inventory.film_id ) ,category_rental_count AS ( SELECT film_category.category_id, SUM(film_rental_count.film_count) AS category_count ...
true
61de335d8669838255bd8d9a1d7a04722b5b6f2b
SQL
lzd13816471540/pinyou
/pinyou/pinyou-admin/src/main/resources/表结构.sql
UTF-8
428
3.109375
3
[]
no_license
-- 用户表 CREATE TABLE SYS_USER( ID INT PRIMARY KEY AUTO_INCREMENT COMMENT '用户ID', USER_NAME VARCHAR(30) DEFAULT NULL COMMENT '用户名称', USER_PWD VARCHAR(255) NOT NULL COMMENT '用户密码', MOBILE_NO VARCHAR(20) DEFAULT NULL COMMENT '手机号码', STATUS CHAR(1) NOT NULL COMMENT '用户状态:1 可用,0 冻结', DEPT_ID INT NOT NULL COMMENT '部门ID'...
true
ccef047510d55e9b69770f130276e0de4e7e3f9a
SQL
collinksmith/active-record-lite
/cats.sql
UTF-8
1,979
3.859375
4
[]
no_license
CREATE TABLE cats ( id INTEGER PRIMARY KEY, name VARCHAR(255) NOT NULL, owner_id INTEGER, FOREIGN KEY(owner_id) REFERENCES human(id) ); CREATE TABLE humans ( id INTEGER PRIMARY KEY, fname VARCHAR(255) NOT NULL, lname VARCHAR(255) NOT NULL, house_id INTEGER, FOREIGN KEY(house_id) REFERENCES human(id...
true
2c91be9055aa827982cfd943a3e1219999319212
SQL
SelviPnm/6701190099_PraAssessment
/ci4.sql
UTF-8
2,725
3.28125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.1.0 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jun 24, 2021 at 02:19 AM -- Server version: 10.4.19-MariaDB -- PHP Version: 8.0.6 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIEN...
true
a2cf2b0628802ad0f80c62c55766e2dbae2b459c
SQL
yardfarmer/expressMgmt
/as/proj/DataBase/doc/Oracle+PLSQl/Chp12/ErrorHandle.sql
GB18030
19,193
3.46875
3
[]
no_license
--ʱĴ DECLARE v_count NUMBER; BEGIN --emp001ڣPL/SQL潫ʱ SELECT COUNT(*) INTO v_count FROM emp001; DBMS_OUTPUT.PUT_LINE('ԱΪ'||v_count); END; DECLARE x NUMBER:=&x; --ʹòֵ y NUMBER:=&y; z NUMBER; BEGIN z:=x+y; -- DBMS_OUTPUT.PUT_LINE('x+y='||z); z:=x/y...
true
e3943e1cafbd800d831b20bab8d452e9e47dcc05
SQL
SleepyyNet/musicbot-1
/schema/tables.sql
UTF-8
3,517
4.1875
4
[]
no_license
create table if not exists folders ( id serial primary key, name text unique not null, created_at timestamp default null, updated_at timestamp default null ); create table if not exists tags ( id serial primary key, name text unique not null, created_at timestamp default null, updated_at...
true
0c52ff3a7db4c54ca81d6966004e5cf8f7333473
SQL
murari-goswami/bi
/ETL/DataVirtuality/views/datamart/datamart.dim_customer.sql
UTF-8
3,734
3.6875
4
[]
no_license
-- Name: datamart.dim_customer -- Created: 2015-09-21 17:22:35 -- Updated: 2015-09-21 17:22:35 /******************************************************************************** -- Author Hemanth -- Created 2015-07-01 -- Purpose This view joins tables from raw and datamart schema. -- Tables raw.di...
true
d4cb53cd011e80aa32fb650b92d92f4ff8cf8843
SQL
AadityaDeshpande/JavaChattingApp
/chatusers.sql
UTF-8
5,296
2.796875
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jun 29, 2019 at 01:52 PM -- Server version: 10.1.40-MariaDB -- PHP Version: 7.3.5 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
true
e70fd6facb28ffc44f231c096dbf6d71c7f88cb5
SQL
ayoubHam2000/fs_licence
/s6_repository/sql/plsqlcodes/30/ep10 Bind var.sql
UTF-8
451
2.65625
3
[]
no_license
SET SERVEROUTPUT ON; --Bind var --CREATE TABLE TEST_TAB(name VARCHAR(30), nbr INT); --insert into test_tab values('ayoub', 20); --insert into test_tab values('alae', 30); set AUTOPRINT ON; variable v_sal number; --Exec :v_sal := 50; begin select nbr into :v_sal from test_tab where name = 'alae'; end; / --prin...
true
7b594524a77eb90d6c1ae08cdd8c0adad0ea1f91
SQL
abpwrs/ece-5995-fa20
/dbhw1/Q6.sql
UTF-8
491
3.796875
4
[]
no_license
-- Find the review count and averageRating per ageGroup for each product. -- Show productid, ageGroup, reviewCount, and averageRating. SELECT productid, ageGroup, SUM(reviewCount) AS review_count, AVG(score) AS avg_rating FROM reviews INNER JOIN user_stats ON (reviews.userid = user_stats.userid) WHERE productid = ...
true
f78516618be6814a430b6793e48ce1881d38187e
SQL
evakung/MyWebsite
/evakun5_addresses.sql
UTF-8
3,876
2.796875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.6.5.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jul 23, 2017 at 02:52 AM -- Server version: 10.1.21-MariaDB -- PHP Version: 5.6.30 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SE...
true
451bcf6bedb298acb1b4767320eaa4e828dc544d
SQL
AdelekeIO/bucket-api
/BucketList.sql
UTF-8
3,591
3.109375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.9.0.1 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: Aug 15, 2019 at 01:24 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
5059eb281e121d360625202ea1096537c5494751
SQL
Hal-L/echo
/AD/day11_MySql基础/SQL语句/03表数据的查询/05_查询_排序查询.sql
UTF-8
587
4.0625
4
[]
no_license
/* 排序查询 标准语法: SELECT 列名 FROM 表名 [WHERE 条件] ORDER BY 列名1 排序方式1,列名2 排序方式2; */ -- 按照库存升序排序 SELECT * FROM product ORDER BY stock ASC; -- 查询名称中包含手机的商品信息。按照金额降序排序 SELECT * FROM product WHERE NAME LIKE '%手机%' ORDER BY price DESC; -- 按照金额升序排序,如果金额相同,按照库存降序排列 -- 多个排序条件时,如果前面的条件无法决定顺序的时候,才会按照后面条件排序 SELECT * FROM product O...
true
0279ce66769dc03477ae107e0adfbb3a1cc12fa2
SQL
renzsanchez69/Crapi_admin
/sql/archived/crapi_JULY8_2019.sql
UTF-8
18,387
2.953125
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.7.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jul 07, 2019 at 06:52 PM -- Server version: 10.1.28-MariaDB -- PHP Version: 5.6.32 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OL...
true
53c63b9666b16878ba49392a81efdc56cdb153a7
SQL
vitalyzaff/bootcampx
/4_queries/2_student_req.sql
UTF-8
233
3.640625
4
[]
no_license
-- the total number of assistance_requests for a student SELECT name, count(assistance_requests.*) AS total_assistances FROM students JOIN assistance_requests ON students.id = student_id WHERE name = 'Elliot Dickinson' GROUP BY students.name;
true
836a0eeddb7dce4d0dea8ac2e370b2e25264021f
SQL
vppolina/flights_project
/create_table_aggregation.sql
UTF-8
1,224
3.65625
4
[]
no_license
-- create all tables create table flights_all ( id serial ,icao24 varchar(20) ,callsign varchar(20) ,origin_country varchar(50) ,time_position bigint ,last_contact bigint ,longitude float ,latitude float ,baro_altitude float ,on_ground boolean ,velocity float ,true_track float ,vertical_rate float ,sensors integer ,ge...
true
d8bb782f6ca013dd050a65420204e6fa5c90f1f7
SQL
NTXpro/NTXbases_de_datos
/DatabaseNTXpro/ERP/Stored Procedures/Procs1/Usp_Sel_Ubicacion_Restaurar.sql
UTF-8
424
3.53125
4
[]
no_license
CREATE PROC [ERP].[Usp_Sel_Ubicacion_Restaurar] @IdEntidad INT AS BEGIN SELECT U.ID, U.Codigo, U.Nombre, U.FechaRegistro, A.Nombre AS NombreAlmacen FROM ERP.Ubicacion U LEFT JOIN ERP.Almacen A ON U.IdAlmacen = A.ID WHERE U.Flag = 0 AND A.ID IN (SELECT DISTINCT A.ID from ERP.Almacen A ...
true
a014f2f94be12e807c8c792596c7b106760528d4
SQL
SaylorTl/lumen
/client.sql
UTF-8
15,506
3.609375
4
[]
no_license
/* Navicat MySQL Data Transfer Source Server : 永红源test Source Server Type : MySQL Source Server Version : 50728 Source Host : 10.110.16.3:13306 Source Schema : client Target Server Type : MySQL Target Server Version : 50728 File Encoding : 65001 Date: 21/02/2020 09:5...
true
d505fc38d6f8a057bce2f90920b816dcbb216f25
SQL
ClickHouse/ClickHouse
/tests/queries/0_stateless/00837_minmax_index_replicated_zookeeper_long.sql
UTF-8
2,760
3.625
4
[ "Apache-2.0", "BSL-1.0" ]
permissive
-- Tags: long, replica DROP TABLE IF EXISTS minmax_idx1; DROP TABLE IF EXISTS minmax_idx2; CREATE TABLE minmax_idx1 ( u64 UInt64, i32 Int32, f64 Float64, d Decimal(10, 2), s String, e Enum8('a' = 1, 'b' = 2, 'c' = 3), dt Date, INDEX idx_all (i32, i32 + f64, d, s, e, dt) TYPE min...
true
883fad9220f2273d1b8e6d024a0f05fae7bf5172
SQL
santanupatra/blehx
/petizen.sql
UTF-8
68,512
3.015625
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.6.6deb4 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3306 -- Generation Time: Sep 07, 2017 at 09:58 AM -- Server version: 5.7.19-0ubuntu0.17.04.1 -- PHP Version: 7.0.22-0ubuntu0.17.04.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHA...
true
988be71e8b11136405240bd2d060574692501876
SQL
JiaBaron/Linuxfile
/shell_study/backup/20200221120002/test.sql
UTF-8
2,184
3.078125
3
[]
no_license
-- MySQL dump 10.14 Distrib 5.5.60-MariaDB, for Linux (x86_64) -- -- Host: localhost Database: test -- ------------------------------------------------------ -- Server version 5.5.60-MariaDB /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RE...
true
014358fc1af27bd5376346cfc2b0383ce4a79e34
SQL
vincentRoussel06/Projet_Slam1
/projet_slam1.sql
UTF-8
3,021
3.09375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Hôte : 127.0.0.1:3306 -- Généré le : lun. 17 mai 2021 à 08:02 -- Version du serveur : 5.7.31 -- Version de PHP : 7.3.21 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CL...
true
b2dff0d776d017b694ba1155fd58590f25efef36
SQL
montreuillois/PA_GarbageRoyale
/SourcesTierces/PA_BR_website/sql/gr_prod.sql
UTF-8
5,631
2.875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.6.6deb4 -- https://www.phpmyadmin.net/ -- -- Client : localhost:3306 -- Généré le : Jeu 04 Juillet 2019 à 16:48 -- Version du serveur : 10.1.26-MariaDB-0+deb9u1 -- Version de PHP : 7.0.30-0+deb9u1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @...
true
1882b8b45e407abe0329cbf3452439864e482d23
SQL
saagie/technologies
/technologies/app/saagie-usage-monitoring/saagie-usage-monitoring-3.0/infra.sql
UTF-8
2,293
2.9375
3
[ "Apache-2.0" ]
permissive
create TABLE IF NOT EXISTS supervision_saagie ( supervision_timestamp TIMESTAMP, project_id VARCHAR(60), project_name VARCHAR(250), orchestration_type VARCHAR(10), orchestration_id VARCHAR(60), orchestration_name VARCHAR(250), instance_id VAR...
true
98fbf070bb46a614a5047b8d44d36cb3eefd6842
SQL
Egor18032019/GeekbrainsVTB
/less16/less16_dz/src/main/resources/db/migration/V2__add_product.sql
UTF-8
553
2.640625
3
[]
no_license
CREATE TABLE products ( id serial PRIMARY KEY, title VARCHAR(100), price NUMERIC(8, 2) ); INSERT INTO products (title, price) VALUES ('Bread', 45), ('Bread', 47), ('Bread', 50), ('Bread', 55), ('Bread', 52), ('Milk', 60), ('Milk', 70), ('Milk', 50), ('Milk', 45), ('Milk', 55), ('Meat', 260), ...
true
ee1b6b6f8434fb5cbeba0c80580cbba45a3685d3
SQL
weiivy/wxjifen
/jifen_2018-06-10.sql
UTF-8
10,123
3.0625
3
[]
no_license
# ************************************************************ # Sequel Pro SQL dump # Version 4096 # # http://www.sequelpro.com/ # http://code.google.com/p/sequel-pro/ # # Host: 127.0.0.1 (MySQL 5.7.19) # Database: jifen # Generation Time: 2018-06-10 02:33:16 +0000 # ***************************************************...
true
fb1281f26702f3c232186c4cdc125c15e515eaf2
SQL
moravianlibrary/RecordManager2
/cz.mzk.recordmanager.server/src/main/resources/job/dedupRecordsJob/UniqueRecordsDedup.sql
UTF-8
539
3.875
4
[]
no_license
WITH records AS ( SELECT id harvested_record_id, nextval('dedup_record_seq_id') dedup_record_id, NOW() updated FROM harvested_record WHERE dedup_record_id IS NULL AND id > ? ORDER BY id LIMIT 2000 ), ins AS (INSERT INTO dedup_record(id, updated) SELECT dedup_record_id, updated FROM records), upd AS (UPDATE ha...
true
09a0f9a81d19d49ae6f710c7a480274497cbc13b
SQL
AlexVilla92/Proyecto-SQL-
/sql/distinct_top.sql
UTF-8
817
3.640625
4
[]
no_license
/* compute: un buen ejemplo seria, tener una base de datos de productos de un supermercado y abajo de todo ver el precio minimo y la suma de todos los productos comprados*/ select *from usuarios select min(nombre), sum(edad) from usuarios where (sexo = 'f') group by rollup(nombre) /* distinct eleim...
true
e11265e9df78c550dfd6d6de0cbfd46f04f3475d
SQL
LakePeterson/CS_340
/Program_2/queryThree.sql
UTF-8
902
4.21875
4
[]
no_license
-- Find the first_name, last_name and total_combined_film_length of Sci-Fi films for every actor. -- That is the result should list the names of all of the actors(even if an actor has not been in any Sci-Fi films) and the total length of Sci-Fi films they have been in. -- Look at the category table to figure out how to...
true
fab1425efc5618d6ec876d7ce0baa1279ef83e8f
SQL
MetadataResearchCenter/HiveFoundationRebuild
/database/concepts.sql
UTF-8
942
3.546875
4
[]
no_license
DROP TABLE IF EXISTS CONCEPT; DROP TABLE IF EXISTS BROADERS; DROP TABLE IF EXISTS RELATED; CREATE TABLE CONCEPT (ConceptURI VARCHAR(100) NOT NULL, PrefLabel VARCHAR(100) NOT NULL, AltLabel VARCHAR(100), ScopeNotes VARCHAR(500), TopConcept INTEGER DEFAULT '0', ...
true
c70bb09acdb5021c3fd9c378737ded0c4583df9d
SQL
jankney2/pitchvivid
/db/adminNotesCtrl/getAll.sql
UTF-8
552
3.5625
4
[]
no_license
select job_users.job_id, admin_notes.notes, users.first_name as firstName, users.last_name as lastName, job_users.video_url, admin_notes.liked, admin_notes.disliked, job_users.user_id as userId, users.email, users.resume from job_users left join admin_notes on admin_notes.user_id = job_users.user_id left join users on ...
true
5e13b885744497c04e0484582f2db34cfc7b462a
SQL
neostreet/poker_session_data
/count_ge_1000000c_by_year.sql
UTF-8
316
3.015625
3
[]
no_license
use poker select left(poker_session_date,4),sum(delta >= 1000000) count1,sum(delta * (delta >= 1000000)) sum1, sum(delta < 1000000) count2,sum(delta * (delta < 1000000)) sum2, count(*) count3,sum(delta) sum3 from poker_sessions_summary group by left(poker_session_date,4) order by left(poker_session_date,4); quit
true
5e104d992e27d1c16e69f5e60d412197c189583f
SQL
wangxw2008168/DynamicConfigCenter
/sql/schema.sql
UTF-8
3,411
3.5
4
[ "Apache-2.0" ]
permissive
CREATE DATABASE IF NOT EXISTS dcc DEFAULT CHARSET utf8mb4; CREATE TABLE dcc_group ( id bigint(20) unsigned AUTO_INCREMENT NOT NULL COMMENT '主键id', created_time datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', modified_time datetime ...
true
94d504eeb48d942515c2bc1e87080f6fe9af08ea
SQL
uma5958/MySQL-Workbench
/CC/CC1.sql
UTF-8
25,354
4.09375
4
[]
no_license
use cc; -- To select required database show databases; -- To verify all databases available create database Test; -- To create a new database drop database Test; -- To drop database show tables; -- To see list of tables of database select user(); -- To see user information select database(); -- To se...
true
59f2f882a4aa58357d9592922909d8ca65ba0287
SQL
MiguelRJ/MRJBADA3T
/Ejercicio/E3esPalindromo.sql
UTF-8
748
3.203125
3
[]
no_license
delimiter // drop function if exists esPalindromo// create function esPalindromo(cadena varchar(255)) returns bool comment 'comprueba si una cadena es palindromo 0 falso 1 true' DETERMINISTIC begin declare cadena2 varchar(255) default ''; declare contador int default 0; declare caracter char(1) default ' '; decla...
true
611cc9f96e41d8c598dc2772f6407e91a9c98a05
SQL
nicolasmns/assessment_sirena
/SirenaExercises/Exercise1/exercise1.3.sql
UTF-8
775
4.4375
4
[]
no_license
-- The sum(amount_exc_tax) works when there are two registers with the same account_id on the same month, this will give the -- total amount of the MRR for that month, preventing duplicates with different amounts. SELECT to_char(date(created_at),'YYYY-MM-01') AS month, mrr.account_id, sum(amount_exc_tax) AS amount FR...
true
ce2d3b7666e8c8200233f666d82fb62a156aca98
SQL
with-sahan/jentest
/database/CreateDatabase/SP/psm/getunwatchedissuelist.sql
UTF-8
586
2.90625
3
[]
no_license
DELIMITER $$ CREATE DEFINER=`root`@`%` PROCEDURE `getunwatchedissuelist`(token varchar(255)) BEGIN declare spcode varchar(45); declare username varchar(45); declare orgcode varchar(45); set username=security.SPLIT_STR(token,'|',1); set orgcode=security.SPLIT_STR(token,'|',2); set spcode = 'get...
true
91fb66b793f7f85a804117d7e8064d7079d69ff3
SQL
evrimulgen/Oracle-DBA-Life
/INFO/Books Codes/Oracle Database 10g PLSQL/Code/Chapter11/register_interest.sql
UTF-8
559
2.671875
3
[ "MIT" ]
permissive
/* * register_interest.sql * Chapter 11, Oracle10g PL/SQL Programming * by Ron Hardman, Michael McLaughlin and Scott Urman * * This script registers interest in a DBMS_ALERT * to the MESSAGES table. */ -- Remove your registered interest in a DBMS_ALERT. BEGIN -- Remove/deregister interest from an alert. DB...
true
eaad8157533b0f49586f71379dfe08f208eec7c8
SQL
sierra073/gsheet-service-layer
/scripts/2019/id3035_districts_on_fiber_from_2017_2018sots.sql
UTF-8
629
3.953125
4
[]
no_license
select SUM(CASE WHEN d.funding_year = 2018 AND dff.fiber_target_status = 'Target' THEN 1 ELSE 0 END) - SUM(CASE WHEN d.funding_year = 2019 AND df.fiber_target_status = 'Target' THEN 1 ELSE 0 END) AS upgraded_to_fib...
true
05c8fb25f68ebbd78ef2a321a19b255db26e8804
SQL
omeryounus/Oracle-SQL-Queries
/HCM/4-ListasDeOnboarding/4.1-Queries/Tareas.sql
UTF-8
3,898
3.71875
4
[]
no_license
SELECT TAREAS.TASK_NAME, TAREAS.EJECUTOR, TAREAS.RESPONSABILIDAD, TAREAS.INICIO, --Estas 2 fechas (INICIO Y FIN) son las fechas cuando el empleado comenzó y finalizó el checklista/tareas de la lista. TAREAS.FIN, TAREAS.ESTADO, to_char(EMPLEADO.ALLOCATION_DATE,'DD/MM/YYYY') as ALLOCATION_DATE, --Filtram...
true
51747a3a4b8e5b6b929a9dbe5df59da6e43dc2f9
SQL
vctrmarques/interno-rh-sistema
/rhServer/src/main/resources/db/migration/sprint_1-10/V1_2018_12_04_17_12__CREATE_TABLE_TIPO_CONTRATO.sql
UTF-8
433
3.453125
3
[]
no_license
--Criação da tabela tipo_contrato --Marconi Motta IF NOT EXISTS(SELECT * FROM SYS.TABLES WHERE name = 'tipo_contrato') CREATE TABLE tipo_contrato ( id bigint NOT NULL IDENTITY(1,1), created_at datetime2(7) NOT NULL, updated_at datetime2(7) NOT NULL, created_by bigint, updated_by bigint, nome varchar(255) NOT NUL...
true
25af779b9475e2a50450118104d19c1a441fe8c2
SQL
dataplat/AlwaysEncryptedSample
/appveyor/schema_verification.sql
UTF-8
202
3.609375
4
[ "MIT" ]
permissive
PRINT 'Tables in database:' SELECT QUOTENAME(s.name) + '.' + QUOTENAME(t.name) AS [Table Name] FROM sys.tables t INNER JOIN sys.schemas s ON s.schema_id = t.schema_id;
true
fb9ed84a7e91f69a644f4c200df3a64cf79fd580
SQL
noorulameen/Bookappliction-mysql
/database/book.sql
UTF-8
1,848
2.90625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.0.10deb1 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Sep 18, 2016 at 06:17 PM -- Server version: 5.5.50-0ubuntu0.14.04.1 -- PHP Version: 5.5.9-1ubuntu4.19 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_C...
true
39726b651bdd16f6ee738d2ec6bf76923caf6f1a
SQL
code-42/c-sharp_WebScraperProjects
/Cookbook/SQLQuery1.sql
UTF-8
209
3.1875
3
[]
no_license
SELECT * FROM Recipe SELECT * FROM Ingredient SELECT a.Name FROM Ingredient a INNER JOIN RecipeIngredient b ON a.Id = b.IngredientId WHERE b.RecipeId = 1; UPDATE Recipe SET Name = 'Salad Deluxe' WHERE Id = 1;
true
2c47e22a6c69abc0eb7a61536853c082b8ef7360
SQL
legokichi/rust-sandbox
/scylla-sandbox/o.cql
UTF-8
375
3.1875
3
[]
no_license
-- https://docs.datastax.com/ja/cql-jajp/3.1/cql/cql_reference/create_keyspace_r.html CREATE KEYSPACE IF NOT EXISTS myapp; -- https://docs.datastax.com/ja/cql-jajp/3.1/cql/cql_reference/create_table_r.html CREATE TABLE IF NOT EXISTS myapp.users ( username text, insertion_time timestamp, PRIMARY KEY (userna...
true
8f6cc99048a02965a43d263c06f8fd0b2f591b53
SQL
RarePepeCode/Food-sensors
/backup.sql
UTF-8
1,872
3
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: May 29, 2019 at 07:32 AM -- Server version: 10.1.40-MariaDB -- PHP Version: 7.1.29 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OL...
true
d4aa60a7ea52aa72bc7fb17cbc3b5ca702835818
SQL
stephenguedea/database-exercises
/update_exercises.sql
UTF-8
608
3.203125
3
[]
no_license
USE codeup_test_db; SELECT name AS 'All albums in this table' FROM albums; SELECT name AS 'All albums released before 1980' FROM albums WHERE release_date < 1980; SELECT name AS 'All albums by Michael Jackson' FROM albums WHERE artist = 'MICHAEL JACKSON'; UPDATE albums SET sales = sales * 10; select * from albums; ...
true
c91b8a3d80afcec348324e05e25842d94261539f
SQL
in2code-de/gb_events
/ext_tables.sql
UTF-8
2,643
2.8125
3
[]
no_license
# # Table structure for table 'tx_gbevents_domain_model_event' # CREATE TABLE tx_gbevents_domain_model_event ( uid int(11) unsigned default '0' NOT NULL auto_increment, pid int(11) default '0' NOT NULL, title varchar(255) ...
true
5e7ccc14bbbd65cb07037b28862ce29e1e0f81af
SQL
bramarin/test_task
/testtaskdump.sql
UTF-8
4,227
3.09375
3
[]
no_license
-- MySQL dump 10.13 Distrib 5.7.31, for Linux (x86_64) -- -- Host: mysql.krasalp.myjino.ru Database: krasalp_test-task-db -- ------------------------------------------------------ -- Server version 5.5.62-38.14-log /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RE...
true
4c5cb414efdc1e5c38fd327de612583ff6753445
SQL
BrunoLV/agenda-spring-mvc
/script-criacao-banco.sql
UTF-8
2,552
2.96875
3
[]
no_license
CREATE DATABASE IF NOT EXISTS `agenda` /*!40100 DEFAULT CHARACTER SET latin1 */; USE `agenda`; -- MySQL dump 10.13 Distrib 5.7.22, for Linux (x86_64) -- -- Host: localhost Database: agenda -- ------------------------------------------------------ -- Server version 5.7.22-0ubuntu0.16.04.1 /*!40101 SET @OLD_CHARACT...
true
ec5241d74111994f7de037401ab03e15b2d9d6ba
SQL
leon230/UTMSReporting
/SQL/SQL/SQL/X dock shipments download.sql
UTF-8
2,188
2.984375
3
[]
no_license
SELECT SH.SHIPMENT_GID, sh.servprov_gid, (select loc.location_name from location loc where loc.location_gid = sh.servprov_gid ) servprov_name, (SELECT SH_STAT.STATUS_VALUE_GID FROM SHIPMENT_STATUS SH_STAT WHERE SH_STAT.SHIPMENT_GID = SH.SHIPMENT_GID AND SH_STAT.STATUS_TYPE_GID = 'ULE/PR.ENROUTE' ...
true
9fde9b57f5807a97771be447b96d9a99757983be
SQL
djihaaane/E-learning
/scolariteDB/scolaritedatabase_Blog.sql
UTF-8
2,174
2.9375
3
[]
no_license
-- MySQL dump 10.13 Distrib 8.0.18, for Linux (x86_64) -- -- Host: localhost Database: scolaritedatabase -- ------------------------------------------------------ -- Server version 8.0.18 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESUL...
true
7ed916fbcaaeb3b261374990ead01a03100009a6
SQL
tianiachan/Healthcare_Fraud
/joining_tables.sql
UTF-8
1,094
3.84375
4
[]
no_license
-- join prescriber table and exclusion table together on NPI using inner join --select all columns as we need all the data and do an inner join on NPI CREATE TABLE drug_and_exclusion AS SELECT pd.npi, e.is_fraud, pd.total_claims, pd.total_drug_cost, pd.provider_last_name, pd.provider_first_name, pd.provider_city, pd....
true
a740986921fd0f7e99f0379591508bfe4303b399
SQL
sandoelio/E-Chamados
/u641666397_chama.sql
UTF-8
4,761
3
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1:3306 -- Tempo de geração: 13/09/2019 às 01:19 -- Versão do servidor: 10.2.25-MariaDB -- Versão do PHP: 7.2.20 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 ...
true
b044d1e93b764d8c54b18ebaab8d28540b5b0c24
SQL
DaDaMrX/cluster-server
/others/tables.sql
UTF-8
1,953
3.28125
3
[]
no_license
-- create database BOOSTDB; -- use BOOSTDB; CREATE TABLE CLUSTERRING_TASKS( BOT_ID VARCHAR(32) PRIMARY KEY, IS_COMPLETED INT DEFAULT 0, PROGRESS DECIMAL(20, 10) NULL, CH DECIMAL(20, 10) NULL, TS TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP ); CREATE TABLE CLUSTERRING_HISTORY( ...
true
29e378c3d8e123302af8badce953334b817840bf
SQL
jonamuen/sql-reduce
/test/sqlsmith/sqlite/8671.sql
UTF-8
771
3.546875
4
[ "MIT" ]
permissive
select ref_0.name as c0, ref_0.name as c1, ref_0.id as c2, ref_0.id as c3 from main.t0 as ref_0 where (ref_0.id is not NULL) or (((1) or (ref_0.id is NULL)) or (EXISTS ( select ref_1.name as c0, ref_1.id as c1 from main.t0 as ref_1 ...
true
630d2f1ac9d46bff920ee3ae627426b02a17dcaf
SQL
MiguelRJ/MRJBADA3T
/Eventos/evento.sql
UTF-8
605
2.9375
3
[]
no_license
delimiter // drop event if exists copiaSeguridadPartidos// create event if not exists copiaSeguridadPartidos on schedule EVERY 1 week STARTS '2017-09-03 22:00' ENDS '2018-06-30 22:00' comment 'Volcado de seguridad de partidos jugados cada domingo a las 22:00h' do begin declare ultimaFecha date; create table if no...
true
b7a703420147f0ad8e6e3f5862a7d360e2d4dee8
SQL
HendricksK/PHP
/dvd_shop.sql
UTF-8
4,560
3.21875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.0.4 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Jan 13, 2016 at 11:12 AM -- Server version: 5.6.12-log -- PHP Version: 5.4.16 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT ...
true
1be669a1d1207fd613a55d6ca4553f79371e26ae
SQL
itroulli/HackerRank
/SQL/Basic_Select/015-weather_observation_station_10.sql
UTF-8
239
3.078125
3
[]
no_license
/* Name: Weather Observation Station 10 Problem: https://www.hackerrank.com/challenges/weather-observation-station-10/problem Score: 10 Language: MySQL */ SELECT DISTINCT CITY FROM STATION WHERE RIGHT(CITY,1) NOT IN ('a','i','e','o','u');
true
c89aee64dcaf6ab22bc8c1f5425a8eeeef994b33
SQL
altus-ace/ACDW_CLMS_SHCN_MSSP
/ACDW_CLMS_SHCN_MSSP/adw/Functions/2020_tvf_Get_ERToIPAdmit.sql
UTF-8
2,349
3.9375
4
[]
no_license
 CREATE FUNCTION [adw].[2020_tvf_Get_ERToIPAdmit] ( @PrimSvcDate_Start VARCHAR(20), @PrimSvcDate_End VARCHAR(20) ) RETURNS @ErToIpAdmit TABLE ( ClientMemberKey VARCHAR(50) ,ClaimID_ER VARCHAR(50) ,ClaimID_IP VARCHAR(50) ,PrimSvcDate_ER DATE ,SvcToDate_ER DATE ,PrimSvcDate_IP DATE ,...
true
37f6fdfaa4bb620fb68b6004783155727c1715e1
SQL
gadfly4ever/Tournament
/tournament.sql
UTF-8
1,767
4.40625
4
[]
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 DATABASE tournament; \c tournament; CREATE...
true
ad58067464970da72784ba4eca997aa3c82ccb15
SQL
daiarn/Tarpplanetines-keliones
/conf/evolutions/default/db.sql
UTF-8
9,408
3.5
4
[ "CC0-1.0" ]
permissive
create table allergen ( id integer auto_increment not null, name varchar(255), constraint pk_allergen primary key (id) ); create table entertainment ( id integer auto_increment not null, name varch...
true
e74eb79f82cb344f2587b3341e03101dc598dc62
SQL
rloaeza/JavaFX-MGM
/server-side/sql/mgm_8_abril.sql
UTF-8
24,448
3.0625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Servidor: 127.0.0.1:3306 -- Tiempo de generación: 08-04-2019 a las 16:05:44 -- Versión del servidor: 10.2.17-MariaDB -- Versión de PHP: 7.2.13 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00...
true
72c9226e9f6dabda8a32858d04244cb9d869646f
SQL
MichaelGuerfi9/michael.guerfi.dev2018-my_blog
/bdd/pokemaniac.sql
UTF-8
4,127
3.515625
4
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.1.14 -- http://www.phpmyadmin.net -- -- Client : 127.0.0.1 -- Généré le : Jeu 03 Mars 2016 à 19:47 -- Version du serveur : 5.6.17 -- Version de PHP : 5.5.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET...
true
7bac243b8dbe5f39bbbdc56ac0ed1b05a4604b5b
SQL
Zielzor/BiqQuery
/AA_2.0/Untitled-1a.sql
UTF-8
1,382
3.09375
3
[]
no_license
CREATE OR REPLACE TABLE `ceeregion-prod.AA_OpenOrders.OpenOrders_CEPL_done` as SELECT a.Order_number, a.Sales_Organization, b.productNo_key FROM `ceeregion-prod.AA_OpenOrders.OpenOrders_CEPL` as a LEFT JOIN `conrad-cbdp-prod-core.de_conrad_dwh1000_dwh_FactSales.FactSales` as b on cast(a.Order_number as STRING) = b...
true
f4fa1e384236b9500bef0726ab2a46e68b33d0e5
SQL
takooya/dynamic_base
/src/test/java/com/dynamic/springboot/sql/test_table_ddl.sql
UTF-8
389
2.953125
3
[]
no_license
drop table if exists users; create table users ( id bigint auto_increment, name varchar(255), create_time timestamp, primary key (id) ); drop table if exists goods; create table goods ( id bigint auto_increment, name varchar(255), price bigint, crea...
true
fe56a26ee9cd25ce6b255102ac322b52c242cde4
SQL
kapeeshs/demoipl-database-management
/SQL File/demoipl.sql
UTF-8
38,182
2.78125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 3.4.5 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Nov 01, 2017 at 06:58 PM -- Server version: 5.5.16 -- PHP Version: 5.3.8 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!...
true
55ad08d1aa73d57236fa1deb2b0b49c867a7a555
SQL
kimkunha/ORACLE
/PL1101/test_elseif2.sql
UHC
731
3.390625
3
[]
no_license
-- Է¹޾ 0 ~ 100 ϶ , 0 ~ 100̰ ƴ϶ -- Է -- 0~100 ϶ 0~40 ̶ '' 41 ~ 60 - ٸ -- 61~100 - հ set serveroutput on set verify off accept score promt 'Է :' declare score number := &score; begin if score between 0 and 100 then if score <=40 then dbms_output.put_line(' OTL'); elsi...
true
924bc49d62e35a49e02c67d51fb9c8a92717cc46
SQL
kipliko/airflow
/example_dags/dbt/macros/expect_check_duplicates_perc.sql
UTF-8
538
3.3125
3
[]
no_license
{% test expect_check_duplicates_perc(model, group_by_cols, thresholds) %} {% set total_rows %} select count( 1 ) total_rows from {{ model }} {% endset %} with validation_error as ( select ((sum(a.ciccio)*1.0 / ( {{total_rows}} ) ) * 100) perc from (SELECT {{ group_by_cols }}, ...
true
c02d90ea3d62442cfbb07fc8ed32d4e116f6f1ea
SQL
ccarson/EarlyHeart
/EhlersDM/Schema Objects/Conversion/Views/Conversion.vw_LegacyAddress.view.sql
UTF-8
5,045
2.984375
3
[]
no_license
CREATE VIEW Conversion.vw_LegacyAddress AS /* ************************************************************************************************************************************ View: Conversion.vw_LegacyAddress Author: Chris Carson Purpose: shows "scrubbed" version of legacy Address ...
true
e066735195b597e783948576a69e0f08a170f6bd
SQL
kdsimmons/InsightProject
/sql_practice.sql
UTF-8
2,436
4.625
5
[]
no_license
USE employees; /* Extra testing */ SELECT emp_no, salary FROM salaries WHERE salary IS NULL /*SELECT first_name, last_name, emp_no, (SELECT SUM(salary) FROM salaries WHERE salaries.emp_no = employees.emp_no) AS tot_sal FROM employees ORDER BY tot_sal DESC LIMIT 10 */ /* ...
true
7f30b61df68bd221fa5837f72df446dea964751f
SQL
Wooooohh/DDL-DML-Base-english-2019-10-12-6-26-56-365
/dml.sql
UTF-8
273
2.703125
3
[]
no_license
-- Insert record insert into students values('001','Jack','22','male'),('002','Edward','21','male'); -- Revise record update students set age = 23 where id = '002'; -- Delete record delete from student where id = '001'; -- Search record select * from student(where xxxx);
true
0f236180e8d44fd53f12a7bf05f99658da655483
SQL
emreaknci/Kodlama.io-Calismalarim
/SQLDenemeSorgu.sql
UTF-8
3,243
4.125
4
[]
no_license
-- * tüm kolonları ifade eder --select * from Customers --customers daki tüm kolonlar gelir --select ContactName,CompanyName, City from Customers -- customersdaki 3 kolon gelir --select ContactName Adi,CompanyName SirketAdi, City Sehir from Customers -- customersdaki kolonlari istediğimiz isimle getirir --select * ...
true
9463aa8a3ef672e4360b377bebb82104634a9b49
SQL
cyobero/portfolio
/mysql/create_tables.sql
UTF-8
462
3.390625
3
[]
no_license
CREATE DATABASE jennys_db; CREATE TABLE Categories ( category_id INT PRIMARY KEY, category VARCHAR(128) ); CREATE TABLE Products ( product_id INT PRIMARY KEY, name VARCHAR(128) NOT NULL, category_id INT NOT NULL, FOREIGN KEY (category_id) REFERENCES Categories (category_id) ON DELETE CASCADE )...
true
5240e0bd76600d199c36e74188b0b32af97b8e03
SQL
luisrdz5/querys-sql
/encontrar ids faltantes en det_amortizacion.sql
ISO-8859-10
415
3
3
[]
no_license
Select d.solicitudscc, d.pagare, AoMes = Convert(varchar(6),d.fecha,112), d.fecha, d.IDRegistroSicom, Importe = (d.ImporteOpFin + d.InteresOpFin + d.IVAOpFin) From dbo.det_amortizacion d With(Nolock) Inner Join dbo.creditos c On c.NumCredito = d.solicitudscc And ...
true
775f3227439e3b95a291997ee857f8e10691ba6a
SQL
aftersound/weave
/service/service-runtime/src/main/resources/runtime-management.hsql.sql
UTF-8
3,911
3.453125
3
[ "Apache-2.0" ]
permissive
SET DATABASE SQL SYNTAX MYS TRUE; CREATE TABLE IF NOT EXISTS namespace ( name VARCHAR(255) NOT NULL, owner VARCHAR(255), owner_email VARCHAR(255), description VARCHAR(4096), attributes VARCHAR(4096), created TIMESTAMP(3) NOT NULL, updated TIMESTAMP(3) NOT NULL, trace VARCHAR(255), P...
true
b62c7c525cbf223e5bd0f3509b27777ca7c29f46
SQL
PNNL-Comp-Mass-Spec/DBSchema_PgSQL_DMS
/dms/mc/mc.v_mgr_work_dir.sql
UTF-8
1,119
3.5
4
[ "Apache-2.0" ]
permissive
-- -- Name: v_mgr_work_dir; Type: VIEW; Schema: mc; Owner: d3l243 -- CREATE VIEW mc.v_mgr_work_dir AS SELECT v_param_value.mgr_name, CASE WHEN (v_param_value.value OPERATOR(public.~~) '\\%'::public.citext) THEN (v_param_value.value)::text ELSE ('\\ServerName\'::text || public.r...
true
e81f11b484cd1f59b0ddb42ca38033d4dd88a494
SQL
wwjiang007/yugabyte-db
/src/yb/yql/pgwrapper/ysql_migrations/V37__17491__yb_fix_catalog_version_table.sql
UTF-8
1,676
2.71875
3
[ "LicenseRef-scancode-unknown-license-reference", "Apache-2.0", "OpenSSL" ]
permissive
SET LOCAL yb_non_ddl_txn_for_sys_tables_allowed TO true; INSERT INTO pg_catalog.pg_proc ( oid, proname, pronamespace, proowner, prolang, procost, prorows, provariadic, protransform, prokind, prosecdef, proleakproof, proisstrict, proretset, provolatile, proparallel, pronargs, pronargdefaults, prorettype, proargty...
true
03f002b59876c05d225feff060a59e2067d50dbe
SQL
peterlegrand/StudentUnion0105
/StudentUnion0105/MasterDataScripts/StoredProcedures/FrontPageGetPage.sql
UTF-8
547
3.09375
3
[]
no_license
CREATE PROCEDURE FrontPageGetPage (@LanguageId int) AS SELECT dbPage.Id OId , dbPage.ShowTitleName , dbPage.ShowTitleDescription , dbPageLanguage.Id LId , dbPageLanguage.Name , dbPageLanguage.Description , dbPageLanguage.MouseOver , dbPageLanguage.MenuName , dbPageLanguage.TitleName , dbPageLanguage.TitleDes...
true
858099e7535b51a0d9ddb94aeb2e17957bb3e9fd
SQL
KDamir/demo-test
/src/main/resources/data.sql
UTF-8
162
2.59375
3
[]
no_license
DROP TABLE IF EXISTS book; CREATE TABLE book ( id INT AUTO_INCREMENT PRIMARY KEY, book_name VARCHAR(1024) NOT NULL, description VARCHAR(1024) NOT NULL );
true
9625d68e97ec9a8d3537ee8eeccf0dce2bbd4f16
SQL
briand16/tarea
/tienda_db.sql
UTF-8
3,883
3.3125
3
[]
no_license
/* SQLyog Community v13.1.2 (64 bit) MySQL - 10.1.33-MariaDB : Database - yeth_db ********************************************************************* */ /*!40101 SET NAMES utf8 */; /*!40101 SET SQL_MODE=''*/; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_...
true
78774716c1439be701197f8c24116411d0f35678
SQL
HryChg/WineWarehouse
/SQL-Strings/SMQueries.sql
UTF-8
3,475
4.1875
4
[]
no_license
--------------------- -- Special Queries -- --------------------- -- find the top 5 ordered wine to be backOrdered // COUNT SELECT wineID, count(wineID) as backOrderedWineCount FROM OrderReceived WHERE backorder = 'Y' GROUP by wineID ORDER by backOrderedWineCount DESC LIMIT 5; -- find the top 10 most repeatedly ordere...
true
f37d5747acc28026f697b9c903f762f99afc64ba
SQL
bseries/base_tag
/data/upgrade/V1529657712__init.sql
UTF-8
331
2.546875
3
[]
no_license
CREATE TABLE `tags` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `name` varchar(250) NOT NULL DEFAULT '', `title` varchar(250) DEFAULT '', `description` text, `is_published` tinyint(1) unsigned NOT NULL DEFAULT '0', `created` datetime NOT NULL, `modified` datetime NOT NULL, PRIMARY KEY (`id`) ) ENGI...
true
9b55661561e6e93659cfb2588c0df1e423adb65d
SQL
hello413/WechatCanteen
/school_canteen.sql
UTF-8
7,867
3.96875
4
[]
no_license
drop database school_canteen; CREATE SCHEMA `school_canteen` DEFAULT CHARACTER SET utf8mb4 ; use school_canteen; -- 窗口表 create table windows ( `window_id` int not null auto_increment primary key, `window_name` varchar(64) not null comment '窗口名字', `window_canteen` enum('新食堂','旧食堂') not null comment '食堂选择', ...
true
9b7e91e01b4256f773ee86b3f0329340b964c50a
SQL
YoannBalcon/AFPATunes2k16
/db/pouetv2.sql
UTF-8
1,564
2.953125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.5.4.1deb2ubuntu2 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Oct 28, 2016 at 08:36 AM -- Server version: 5.7.16-0ubuntu0.16.04.1 -- PHP Version: 7.0.8-0ubuntu0.16.04.3 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CH...
true
0f75da39325be1e2dd9042532043144acf8e7ddb
SQL
saurabhlomte143/novopay-training-projects
/spring-framework/spring-testing/module08-question04/src/main/resources/manual-schema.sql
UTF-8
633
3.15625
3
[]
no_license
drop database if exists `spring-tutorial`; drop database if exists `spring-tutorial`; drop user if exists `spring-tutorial`@'localhost'; create database `spring-tutorial`; create user `spring-tutorial`@'localhost' identified by 'spring-tutorial'; grant all privileges on `spring-tutorial`.* TO `spring-tutorial`@'local...
true
434beeca3692fd377567547548d534e58474fcc0
SQL
KyleGoertzen1/Week08Lab
/src/java/database/NotesDB.sql
UTF-8
314
2.75
3
[]
no_license
DROP DATABASE if exists NotesDB; CREATE DATABASE NotesDB; USE NotesDB; DROP TABLE Note; CREATE TABLE Note( noteId INT(11) NOT NULL AUTO_INCREMENT, dateCreated DATE NOT NULL, contents VARCHAR(10000) NOT NULL, PRIMARY KEY (noteId) ); INSERT INTO Note values(default, "1988/05/01", 'Hello World!');
true
e5350e8683ced714c0a6e8f0709b8101af351103
SQL
AnnaBia/turma30generation
/Mysql/ExerciciosAula/Atividade1/db_registroEscolar.sql
UTF-8
1,711
3.65625
4
[]
no_license
-- cria banco de dados create database db_registroEscolar -- puxa banco de dados p/criar tabela use db_registroEscolar; -- cria tabela Create table tb_estudantes( id bigint(10) auto_increment, Matrícula int(10) not null, Nome varchar(50) not null, Turma varchar(10) not null, Nota int(5) not null, S...
true
f9cfe2f85e83890e9ea7b43bb32b0b7f949186ba
SQL
shushiej/leet_code_problems
/SQL/leetcode/duplicate_emails/solution_distinctjoin.sql
UTF-8
107
2.796875
3
[]
no_license
#210ms Select DISTINCT a.Email from Person AS a JOIN Person AS b WHERE a.Email = b.Email AND a.ID != b.Id
true
96c1ba8c60ffb92125a549e74b10d40ed4b876c9
SQL
keyber/Licence
/old/2I009/tme10/PROCmoyprime.sql
UTF-8
462
3.1875
3
[]
no_license
CREATE or REPLACE PROCEDURE PROCmoyprime(P_lieutournoi GAIN.lieutournoi%TYPE, P_annee GAIN.annee%TYPE ) IS V_moyenne GAIN.prime%TYPE; FIN exception; BEGIN select AVG(prime) into V_moyenne from GAIN where lieutournoi=P_lieutournoi and annee=P_annee; if V_moyenne is null then raise FIN; end if; dbms_output.put_line(P_lie...
true
e1d60c4021cd21f514a59230aa434c90dd25bb5e
SQL
cadeparkhurst/DnDatabase
/Stored Proc Scripts/unlearnSpell.sql
UTF-8
741
3.515625
4
[]
no_license
CREATE PROCEDURE unlearnSpell @CharacterID int, @SpellID int AS BEGIN IF(@CharacterID IS NULL OR NOT EXISTS (SELECT * FROM [Character] WHERE CharacterID = @CharacterID)) BEGIN RAISERROR('Character must not be null and must exist in the Character table', 14, 1); RETURN 1; END IF(@SpellID IS NULL OR NOT EXISTS ...
true
3172d17ffad60e5e9dfd28b9f6200ce275c56f9f
SQL
fasoncho/Stored-Procedures-and-Functions
/Stored Procedures and Functions/2. Employees with Salary Above Number.sql
UTF-8
211
3.109375
3
[]
no_license
CREATE OR ALTER PROC usp_GetEmployeesSalaryAboveNumber @Treshold DECIMAL(18,4) AS BEGIN SELECT FirstName, LastName FROM Employees WHERE Salary >= @Treshold END EXEC usp_GetEmployeesSalaryAboveNumber 50000
true
05a1c304af1871f93e9ee9a8e02f75ea23257e54
SQL
AscEmu/AEweb
/sql/updates/20180723-00_news.sql
UTF-8
817
2.78125
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : local Source Server Version : 50714 Source Host : localhost:3306 Source Database : asc_web Target Server Type : MYSQL Target Server Version : 50714 File Encoding : 65001 Date: 2018-07-23 22:03:33 */ SET FOREIGN_KEY_CHECKS=0; -- -----...
true
5d20a2f24f25a28a3cc25cc83f9dd617bdd015ae
SQL
Lina2803/test
/proekt/1600-2503.sql
UTF-8
2,701
4.0625
4
[]
no_license
create database if not exists myBD25032016; use myBD25032016; create table if not exists teacher ( id_teacher int not null auto_increment primary key, name varchar(50), surname varchar(50), salary int ); create table if not exists lesson ( id_lesson int not null auto_increment primary key, title varchar(50) ); cre...
true
1bd6362cd41ac4aef52587f8014048ecf1cef51f
SQL
pfmiller/Group-Informatics
/R-Code/MyLyn/SQL/research_distances_comm.sql
UTF-8
276
3.03125
3
[]
no_license
create table research_distances_comm as select author_id, reporter_id, releaseId, count(*) as bug_comm from research_comment_by_release where releaseId >=2 group by author_id, reporter_id, releaseId order by releaseId select * from research_distances_comm order by releaseId
true
34641184834a7aedce434c2910f2179bf0f506de
SQL
DennisCheung/nxft
/dbscript/fxp/dbms/tables/04_任务待办/1000010_p_todo_待办任务项表.sql
GB18030
3,687
3.296875
3
[]
no_license
-- -- -- -- v1.0 2015.11.03 -- authorwing -- -- һ˵ -- 1ҵνãΪһҵ֮乵ͨ -- 2֪ͨһڣΪһڿʼڡ -- 3͡һڵ -- 4˱¼ɾ -- -- ʣ -- 1fnote_type ǷΪҵ͡ -- 2fnode_id жڵҵΪڣֻһڵҵǷΪ ҵͣ طò֡ -- 3طǷֻһڣ -- -- -- ޸ʷ -- -- -- Drop Table fxp.p_todo; Create Table fxp.p_todo ( -- +-----------------------------+--------------+-----------+ ftodo_id ...
true
6ffc1c77c90850f2b43c3f7d5652ea561faf01b1
SQL
dsenicero/MySQL
/SeniceroCoffeeGrindModify.sql
UTF-8
4,599
3.8125
4
[]
no_license
-- Identifier -- D'Angelo Senicero 20/FA ITSE-2309-10X1 -- ----------------------------------------------------- -- Verifies use of my database -- THE USE STATEMENT IS USED TO SELECT MY DATABASE -- ----------------------------------------------------- use senicero; -- -------------------------------------------------...
true
34727db58e47846f28bac262ecccdee724327c0b
SQL
hohuypn/project_intern2020
/project_intern.sql
UTF-8
71,890
3.109375
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Sep 05, 2020 at 10:24 AM -- Server version: 10.4.13-MariaDB -- PHP Version: 7.4.8 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIEN...
true