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
ac1560a544d8a08ff3d02a20646e2eb7e5f75ce8
SQL
MyOralVillage/4-Share
/admin-panel/db/init.sql
UTF-8
805
3.8125
4
[ "Apache-2.0" ]
permissive
DROP TABLE IF EXISTS countries; DROP TABLE IF EXISTS currencies; CREATE TABLE currencies ( code char(3) PRIMARY KEY ); CREATE TABLE countries ( code char(2) PRIMARY KEY, name TEXT, currency char(3) REFERENCES currencies(code), currencies TEXT[] DEFAULT '{"KES", "PKR", "BDT", "USD", "INR"}' ); INS...
true
f621608cdfe65973b38394f737c62ff63d8a29a9
SQL
georgeMatrix/nuestroNegocio
/sql/tlapalerias.sql
UTF-8
2,434
2.828125
3
[ "MIT" ]
permissive
/* Navicat MySQL Data Transfer Source Server : localhost2018 Source Server Version : 100136 Source Host : localhost:3306 Source Database : nuestronegocio Target Server Type : MYSQL Target Server Version : 100136 File Encoding : 65001 Date: 2019-03-17 22:41:12 */ SET FOREIGN_KEY_CH...
true
39b23a04ced06ee025c33ef3bb6c0a129dbbf9d4
SQL
TheBaldWonder/sp18-itc250-p4-news
/p4-rss-feeds20180611.sql
UTF-8
2,636
3.265625
3
[ "Apache-2.0" ]
permissive
SET NAMES utf8; SET time_zone = '+00:00'; SET foreign_key_checks = 0; SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO'; DROP TABLE IF EXISTS `p4_categories`; CREATE TABLE `p4_categories` ( `CategoryID` int(10) unsigned NOT NULL AUTO_INCREMENT, `Category` varchar(255) DEFAULT '', `Description` text, PRIMARY KEY (`Categor...
true
905b5ae893ba2acb80051c3b697867069b4dd023
SQL
x-cpu/SQL
/CACI_3rdCheckqueryUPDATE.sql
UTF-8
5,036
2.8125
3
[]
no_license
--3rd check for CACI list (Roanoke only) select distinct d.dcsid, d.pbatch from document d inner join customerCheckIn c on d.rmn = c.rmn where c.location = '62' and d.ftpstime is null and d.comments is not null and exists ( select * from dcssheetlookup where d.PBatch = dcssheetlookup.pbatch and secondcheck = 'T...
true
e757217ed0fc6143add300fdb70811f0481a3097
SQL
rcorvese/Merk-Prevymis
/Merk_Prevymis_Rx_Pull.sql
UTF-8
4,546
2.546875
3
[]
no_license
# Merk-Prevymis #Pharmacy Data Pull CREATE OR REPLACE TABLE MERK_PREVYMIS_PATIENTS AS SELECT DISTINCT CLAIM_NUMBER, ENCRYPTED_KEY_1, ENCRYPTED_KEY_2, sha2(ENCRYPTED_KEY_1,256) as modified_ENCRYPTED_KEY_1, sha2(ENCRYPTED_KEY_2,256) as modified_ENCRYPTED_KEY_2, DIAGNOSIS_CODE, coalesce(DATE_...
true
416e046e6de80c7e3b642f48487b69520eff773b
SQL
98khongmin/cshu310_final
/create-db_tbl.sql
UTF-8
627
3.53125
4
[]
no_license
create database FinalProject; use FinalProject; create table Item( ID int auto_increment, ItemCode varchar(10) unique not null, ItemDescription varchar(50), Price decimal(4,2) default 0.0, primary key(ID)); create table Purchase( ID int auto_increment, ItemID int, foreign key (ItemID) ref...
true
a6a7596da154e71b6b014bfec59bf317d67822bd
SQL
SonicTheCat/Databases-Basics-SQL
/ExamPrep-24-Jun-2018/exercises/20.Cancel Trip.sql
UTF-8
272
3.5625
4
[ "MIT" ]
permissive
CREATE TRIGGER tr_TRIGGER ON Trips INSTEAD OF DELETE AS BEGIN UPDATE Trips SET CancelDate = GETDATE() WHERE Id IN ( SELECT t.Id FROM Trips AS t JOIN deleted AS d ON d.Id = t.Id WHERE d.CancelDate IS NULL ) END DELETE FROM Trips WHERE Id IN (48, 49, 50)
true
a68c4a09c2228bf7808d97126866546dd240afdf
SQL
khatry23/CrimesDatabaseAWS
/gunviolence.sql
UTF-8
116
2.90625
3
[]
no_license
SELECT state_name ,city,sum(n_killed) FROM dbapp.gun_violence GROUP BY state_name, city ORDER BY sum(n_killed) desc;
true
3ec497457542684f6e360a8c9c3c27472dc2c09d
SQL
Python-SQL-Calvin/SQL-Challenge
/Queries/Additional_Queries_Deliverable3.sql
UTF-8
1,064
4.34375
4
[]
no_license
SELECT COUNT(title), title FROM mentorship_eligibility GROUP BY title ORDER BY count; SELECT COUNT(title), title INTO active_titles FROM titles WHERE to_date = '9999-01-01' GROUP BY title ORDER BY title DESC; SELECT COUNT(title), title INTO mentorship_candidates FROM titles WHERE (from_date NOT BETWEEN '2000-01-01' A...
true
24f9dbcbe6c996cdd054d3329ed5e2dedb45e42b
SQL
itsdddaniel/BDII-Project
/1. Scripts de Base de Datos/OLAPINCOME.sql
UTF-8
1,227
3.375
3
[]
no_license
CREATE TABLE D_VIAJES ( ID_VIAJE INT PRIMARY KEY NOT NULL, DIRECCION VARCHAR(1000), MONTO INT, ESTADO BIT ); CREATE TABLE D_SUCURSAL ( ID_SUCURSAL INT PRIMARY KEY NOT NULL, DIRECCION VARCHAR(1000) ); CREATE TABLE D_MEDIO_DE_TRANSPORTE ( ID_MEDIO INT PRIMARY KEY NOT NULL, CARGA VARCHAR(1000), TIPO V...
true
f25ca93e587be02924aa46d3693794b19204e585
SQL
LynxDevelopment/SDMWeb
/SDMWeb/script_db/mysql/core/dati-base/20_LAST_SCRIPT.sql
UTF-8
894
2.59375
3
[]
no_license
/****************************************************************************** * SCRIPT DA LANCIARE PER ULTIMO, DOPO AVER LANCIATO ANCHE CMS! * ******************************************************************************/ insert all into TB_USER_GROUP (GROUP_ID, USER_ID) values ('EVERYONE', USER_ID)...
true
6a6ed1a4f876fc5839011933aac6f454dce9b7e0
SQL
gusgalarnyk/projectCauldron
/SQL/SQL_Scripts/prereqs.sql
UTF-8
244
2.890625
3
[]
no_license
DROP TABLE IF EXISTS prereqs CASCADE; CREATE TABLE prereqs ( id integer NOT NULL, name varchar(255) NOT NULL, school integer ); ALTER TABLE public.prereqs ADD CONSTRAINT prereqs_pkey PRIMARY KEY (id); COMMIT;
true
8d887252734f230191e534cc8202b2af83b41fbc
SQL
da99/okdoki
/Server/Computer/migrates/001-Computer-table.sql
UTF-8
612
3.125
3
[ "MIT" ]
permissive
CREATE TABLE computer ( id SERIAL PRIMARY KEY, owner_id integer NOT NULL, path varchar(111) NOT NULL, title varchar(99) DEFAULT NULL, code text DEFAULT NULL, ss_code t...
true
fbc766586fef5c6cb8d51cddc7f1d89f56496823
SQL
PieterVanZyl-Dev/ASPNETCore-WebAPI
/UpdateSurveyIDEmployeeSurvye.sql
UTF-8
165
2.671875
3
[]
no_license
UPDATE t1 SET t1.EmployeeSurvey = t2.SurveyID FROM dbo.Employee t1, dbo.EmployeeSurvey t2 WHERE t1.EmployeeNumber = t2.EmployeeId;
true
1e11f8b8b71a6ec6d36ffd41a6cc36b7f34c96a9
SQL
dividedbyzero360/SQL_Server
/5_SQLQuery4.sql
UTF-8
705
3.140625
3
[]
no_license
--Cascading referential integrity constarint allows to define the actions Micrsoft SQL serer --should take wen a user attempts to delete or update a key to which an existing foreign keys points --For example if you delete row with ID=1 from tblGender table, then row with ID=3 from tblPerson --table becomes an o...
true
6cd4416caae774cde8200287dbb2815e0aa5461d
SQL
jamesperet/EstruturaAberta
/includes/db.sql
UTF-8
3,498
3.4375
3
[]
no_license
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; /*!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 utf8 */; CREATE TABLE `comments` ( `id` int(11) NOT NULL A...
true
bb96d36a76943fff401510f9a5a708271d3459f1
SQL
MaxiRod30/PHPWeb
/Curso Ejemplos/GrupoMJ2030/ComboSincronizado/sincrocombo.sql
UTF-8
2,414
3.046875
3
[]
no_license
# HeidiSQL Dump # # -------------------------------------------------------- # Host: 127.0.0.1 # Database: sincrocombo # Server version: 5.5.16-log # Server OS: Win64 # Target compatibility: Same as source (5.5.16) # Target max_allow...
true
36a129cb82ca8da9c6450eca7185a00363f58a5d
SQL
dmKronenberg/DS_BOS_07_Students
/JeffreyCorrado/SQL_Exercise/SQL FIles for Specific Questions/Question_2_GA.sql
UTF-8
354
3.546875
4
[]
no_license
SELECT Fielding.POS, AwardsPlayers.awardID, Count(*) as "POSWins" FROM AwardsPlayers INNER JOIN Fielding ON AwardsPlayers.playerID = Fielding.playerID AND AwardsPlayers.yearID = Fielding.yearID WHERE AwardsPlayers.awardID = 'Triple Crown' or AwardsPlayers.awardID = 'MVP' AND Fielding.G > 100 GROUP BY AwardsPlayers.awar...
true
a9d0c95296f8f9f390026753f6252fa4f3559f74
SQL
gaFregatto/5COP009
/ListaConsultas-S18/ex11.sql
UTF-8
283
3.5
4
[]
no_license
SELECT DISTINCT professor.cod_prof, nome_prof, professor.cod_depto, professor.cod_tit FROM professor, prof_oferta, depto, disciplina WHERE professor.cod_prof = prof_oferta.cod_prof AND prof_oferta.cod_depto = 'INF01' AND disciplina.cod_depto = 'INF01' AND nome_depto = 'Informatica';
true
8f2a54109b139b5150edbc5beaf403d8ebf6766d
SQL
andrei14vl/cubrid-testcases
/sql/_06_manipulation/_01_select/_001_inner_join/cases/1049.sql
UTF-8
824
2.953125
3
[ "BSD-3-Clause" ]
permissive
call login('dba', '') on class db_user; create user user1; create user user2; call login('user1', '') on class db_user; create table xoo ( id int); insert into xoo values(10000); grant select on xoo to user2; call login('user2', '') on class db_user; create table zoo ( id int, x xoo); insert into zoo values(2,...
true
04ef64ab94b2ffd450be909be40faf6a8ead2ecc
SQL
guoyu07/Test_agency_master
/ticket_info/sql/zqf20150116.sql
UTF-8
5,442
3.40625
3
[]
no_license
use `ticket_info`; iNSERT INTO `language_config` (id,zh) values ('ERROR_AddGenerate_25','缺少销售价'); iNSERT INTO `language_config` (id,zh) values ('ERROR_AddGenerate_26','请添加门票信息'); iNSERT INTO `language_config` (id,zh) values ('ERROR_AddGenerate_27','缺少门票类型'); iNSERT INTO `language_config` (id,zh) values ('ERROR_AddGene...
true
79189005dc0e7943ec6d60e32a6918d3cf886b8f
SQL
jongvin/werp
/werp/erpw/general/t_web/sql/Procedure/SP_T_BUDG_BF_ORDER_STAT.sql
UHC
3,448
3.0625
3
[]
no_license
Create Or Replace Procedure SP_T_BUDG_BF_ORDER_STAT_I ( AR_COMP_CODE VARCHAR2, AR_CLSE_ACC_ID VARCHAR2, AR_ALL_CHG_SEQ NUMBER, AR_DEPT_CODE VARCHAR2, AR_EMP_NO VARCHA...
true
6c52892f5d60c5c79c96d8b9c40456bf6a923d4a
SQL
Gootime/testingArea
/testingArea/bdd a importer en first/cvmaker.sql
UTF-8
4,762
3.03125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Client : 127.0.0.1 -- Généré le : Ven 20 Mai 2016 à 15:40 -- Version du serveur : 10.1.13-MariaDB -- Version de PHP : 5.6.20 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARAC...
true
9a75c155dbfbf5d6fbcf6c801c978f5484523fa4
SQL
arman-bd/earth-and-fire
/DATABASE.sql
UTF-8
1,615
3.09375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.6.5.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Apr 30, 2017 at 08:25 AM -- Server version: 10.1.21-MariaDB -- PHP Version: 7.1.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; -- -- Database: `earthfire` -- -- --------------------...
true
34c45a0476cf68d5b209458b8243398ac17e46da
SQL
alanalien/database_of_an_interior_design_firm
/hld_db_sample_quries.sql
UTF-8
4,966
3.84375
4
[]
no_license
-- Insert a new project + assign employees into the database USE HLD_DB; SET AUTOCOMMIT = 0; START TRANSACTION; UPDATE `EMPLOYEE` SET POSITION_ID = ( SELECT POSITION_ID FROM `POSITION` WHERE UPPER(POSITION_NAME) LIKE '%SENIOR DECOR%' ), SALARY = 12000.00 WHERE EMPLOYEE_ID = 29; SELECT * FROM `EMPLO...
true
a55316a8353dfa7dd2a92827efbdd0c153c6b093
SQL
NPenny42/CodeWarsExercises
/CodeWars/SQL/SQL with Pokemon: Damage Multipliers.sql
UTF-8
213
3.765625
4
[]
no_license
SELECT p.pokemon_name, (p.str*m.multiplier) as modifiedStrength, m.element FROM pokemon p JOIN multipliers m ON p.element_id = m.id WHERE p.str*m.multiplier >= 40 ORDER BY modifiedStrength DESC
true
d4b4bc1d8c1ef37869e55a898b4f69c827203934
SQL
ozansyk/PatikaDevHw
/SqlHw/Odev12.sql
UTF-8
540
3.796875
4
[]
no_license
SELECT COUNT(*) FROM film WHERE length > ( SELECT AVG(length) FROM film ); SELECT COUNT(*) FROM film WHERE rental_rate = ( SELECT MAX(rental_rate) FROM film ); SELECT * FROM film WHERE rental_rate = ( SELECT MIN(rental_rate) FROM film ) UNION SELECT * FROM film WHERE replacement_cost = ( SELECT MIN(replacem...
true
570be02080df201f588e89c2587ced5ca202d476
SQL
MazArslan/ClientProject-WebApp
/src/main/resources/db/migration/V15__createGetImageToVoteOnProcedure.sql
UTF-8
1,690
4.25
4
[]
no_license
DELIMITER // CREATE PROCEDURE get_recommended_image(user_id_input int) BEGIN DECLARE num_rows INT; DECLARE EXIT HANDLER FOR SQLEXCEPTION BEGIN ROLLBACK; END; START TRANSACTION; -- calculates if there are any images the user hasn't voted on SELECT COUNT(*) FROM images LEFT J...
true
64bd3c692e46ec6f74f6249a949ec565bd63e0bf
SQL
evanallen13/Advanced-Database-Reference
/SQl/10/tables.sql
UTF-8
3,272
3.359375
3
[]
no_license
set echo off set feedback off set verify on set heading off /* start C:\Users\evana\Desktop\IS480\section_exercises\#10\tables.sql */ drop table enrollments; drop table schclasses; drop table courses; drop table students; drop table majors; create table majors( major varchar2(3) primary key, mdesc varchar2(30)); ...
true
ab47aa3e7e8579eaaf698987f100008534dc7ccf
SQL
gozonjoedaimar/bcc-assessment
/sql/latest.sql
UTF-8
15,379
3.828125
4
[ "Apache-2.0", "MIT" ]
permissive
# # TABLE STRUCTURE FOR: courses # DROP TABLE IF EXISTS `courses`; CREATE TABLE `courses` ( `id` int(11) NOT NULL AUTO_INCREMENT, `code` varchar(255) DEFAULT NULL, `name` varchar(255) DEFAULT NULL, PRIMARY KEY (`id`), KEY `course_ref_main` (`code`) ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1; I...
true
5c8fc0f4b989c9e4a037ab0c76abc6b6d6bd4a73
SQL
mnrm/docker-postgres
/init/init.sql
UTF-8
436
3.09375
3
[]
no_license
CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; CREATE TABLE IF NOT EXISTS users ( uuid uuid NOT NULL DEFAULT uuid_generate_v4(), id serial NOT NULL primary key, first_name varchar(50), last_name varchar(50), created_date date NOT NULL DEFAULT CURRENT_DATE, updated_date date NOT NULL DEFAULT CURRENT_DATE ); i...
true
84ff9599a1a1539d8bfa592203c6e5fef60cd428
SQL
haa1010/Web-Programming
/week6/business_service .sql
UTF-8
3,209
3.1875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.4 -- https://www.phpmyadmin.net/ -- -- Máy chủ: 127.0.0.1 -- Thời gian đã tạo: Th4 24, 2021 lúc 03:49 PM -- Phiên bản máy phục vụ: 10.4.17-MariaDB -- Phiên bản PHP: 7.3.27 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHAR...
true
75b22c734b966fdfbdab8a8192172a0154b9b539
SQL
strijar/MorseMaster
/storage/make.sql
UTF-8
559
3.265625
3
[]
no_license
.separator "\t" CREATE TABLE codes_group ( id INT PRIMARY KEY, info TEXT ); .import codes_group.cvs codes_group --- CREATE TABLE codes ( group_id INT, symbol TEXT PRIMARY KEY, code TEXT ); .import codes.cvs codes --- CREATE TABLE stat ( symbol TEXT PRIMARY KEY, correct INT, m...
true
6391d99d6c8070ca0d42e4d3d47daa903798eada
SQL
youngyuncha/02_java
/01_sql/day01.sql
UHC
441
2.734375
3
[]
no_license
--# SQL day 01 dzƮ --1) : ɾ ctrl + Enter ALTER SESSION SET "_ORACLE_SCRIPT"=true; --2) SCOOT : F5 (ũƮ ) @C:\app\13\product\18.0.0\dbhomeXE\rdbms\admin\scott.sql --3) SCOTT -- ̵ : SCOOT -- йȣ : TIGER --4) SCOTT -- scott ̺ ̸ ȸ SELECT * FROM tab ;
true
a1993c90e67832479985c10f8efaf9c093afea81
SQL
Slyzingbergi/ubits
/ubits.sql
UTF-8
22,409
3.265625
3
[]
no_license
/************************************************************************************************* * Ubits Travel * Shaun leigh Clack * ************************************************************************************************/ package com.ubits.travel.database; import android.content.ContentValues; import a...
true
264343a0bc3c8ad89356f096039eede4673fa24b
SQL
pythonee/work-tools
/sql/find-foreign-key-for-table.sql
UTF-8
446
3.96875
4
[]
no_license
SELECT CONCAT(table_name, '.', column_name) AS 'foreign key', CONCAT(referenced_table_name, '.', referenced_column_name) AS 'references', CONCAT( table_name, '.', column_name, ' -> ', referenced_table_name, '.', referenced_column_name ) AS relationship FROM information_schema.key_column_usage WHERE ...
true
d6f88ad84a88d2cd440d3f1020e26c78000ef9cd
SQL
stevenliuit/gotohome
/gotohome/kms/报表/procedure.sql
ISO-8859-1
2,398
3.296875
3
[]
no_license
create or replace procedure say_hello(v_name varchar2) as v_str varchar2(20) := 'hello '; begin dbms_output.put_line(v_str || v_name); dbms_output.put_line(1/0); exception when others then dbms_output.put_line('o(0_0)o~'); end; begin say_hello('zhangxue'); str_hello('',) --say_hello(v_na...
true
dee97b58525970670c51870abba5f7bb53485446
SQL
JacobMcGuire1/Money-Manager
/schema.sql
UTF-8
1,381
3.734375
4
[]
no_license
drop table users; CREATE TABLE users(id integer NOT NULL primary key, username varchar(50) NOT NULL, email varchar(50) NOT NULL, passwordhash varchar(255) NOT NULL, salt varchar(255) NOT NULL); drop table bills; CREATE TABLE bills(id integer NOT NULL primary key, name varchar(50) NOT NULL, creator_id integer NOT NUL...
true
d67e893fa5431b4839ed60f92083385a8acbb098
SQL
david-salac/InterfaceIntFacDL
/database.sql
UTF-8
1,849
3.640625
4
[ "MIT" ]
permissive
/* * Author: David Salac * Project: Diploma Thesis (2017) * Title: This is file with SQL table definitions and initial data of system */ /* Table user defines users of system */ CREATE TABLE user ( user_name VARCHAR(120) NOT NULL, user_privilege ENUM('admin', 'user') NOT NULL, user_description VARCHAR(256), use...
true
025c4966029d011b9c9f8cf8bb98a0f19bd2c42c
SQL
mrjhong/usuarios_java
/basedatos/01_script_base.sql
UTF-8
628
3.9375
4
[]
no_license
CREATE TABLE perfiles( cod_perfil int AUTO_INCREMENT, nombre_perfil varchar(150) not null, primary key(cod_perfil) ); create unique index indice_nomPerfil on perfiles(nombre_perfil); CREATE TABLE usuarios( cod_usuario int AUTO_INCREMENT, cod_perfil int not null, nombre_usuario varchar(150) not null, clave_usuario var...
true
d45257f8f9c3abaaac283b8ffbd0e92a467490d1
SQL
wenima/hackerrank
/sql/all_easy.sql
UTF-8
531
3.90625
4
[ "MIT" ]
permissive
-- all easy code challenges on hackerrank other than weather station -- SQL falvor: MS SQL -- solution for https://www.hackerrank.com/challenges/more-than-75-marks -- Query the Name of any student in STUDENTS who scored higher than 75 Marks. -- Order your output by the last three characters of each name. If two or mor...
true
8e9c824d05a9dcb5fb89130aeebac59a1892eeb4
SQL
prbergstrom/retailsql
/adrbymsaincome.sql
UTF-8
724
4.40625
4
[]
no_license
# What is the average daily revenue brought in by stores in areas of # high, medium, or low levels of high school education? SELECT (CASE WHEN m.msa_high BETWEEN 50 AND 60 THEN 'low' WHEN m.msa_high BETWEEN 60.01 AND 70 THEN 'medium' WHEN m.msa_high > 70 THEN 'high' END) AS education_level, SUM(stores.revenue...
true
4baa31072e0c19c43ff46b5fd53cf8adb63c1819
SQL
goyox86/blog
/migrations/20170301212908_create_comments/up.sql
UTF-8
186
2.546875
3
[]
no_license
CREATE TABLE comments ( id SERIAL PRIMARY KEY, body TEXT NOT NULL, published BOOLEAN NOT NULL DEFAULT 'f', user_id INTEGER REFERENCES users, post_id INTEGER REFERENCES posts )
true
112b8f7a51689dc80846deac06974d5ed5a8c202
SQL
jmotts17/sql-instruction
/prs/Capstone_PRS_Create_5_Tables.sql
UTF-8
4,123
3.75
4
[]
no_license
-- create and select the database DROP DATABASE IF EXISTS prs; CREATE DATABASE prs; USE prs; -- Create User Table Create table User ( ID INTEGER PRIMARY KEY AUTO_INCREMENT, UserName VARCHAR(20) NOT NULL UNIQUE, Password VARCHAR(10) NOT NULL, FirstName VARCHAR(20) NOT NULL, LastName VARCHAR(20) NOT NU...
true
11715bf10d5662f9148779b772b7ed24f1b28feb
SQL
IhorShylo/fcRespect
/fcrespect-app/src/main/resources/sql/test-data.sql
UTF-8
5,726
2.546875
3
[]
no_license
INSERT INTO statistic (statistic_id, in_club, games, goals, assists) VALUES (0, '2015-1-1', 0, 0, 0), (1, '2015-1-1', 0, 0, 0), (2, '2015-1-1', 0, 0, 0), (3, '2015-1-1', 0, 0, 0), (4, '2015-1-1', 0, 0, 0), (5, '2015-1-1', 0, 0, 0), (6, '2015-1-1', 0, 0, 0), (7, '2015-1-1', 0, 0, 0), (8, '2015-1-1', 0,...
true
97279f5a464dc15be38568e17ff03ac2e4e439c2
SQL
MarieKelling/SQL
/MySQL Database - 2351 Shoemaker/Assignments/Unit 12 - Ch 15; Stored Procedures/12.3.sql
UTF-8
918
3.609375
4
[]
no_license
-- 12.3 Marie Kelling -- Takes arguments for info of a new student, and adds that student into the database USE college; DROP PROCEDURE IF EXISTS Student_Add ; DELIMITER $$ CREATE PROCEDURE Student_Add(IN LastName varchar(45), IN FirstName varchar(45), IN Email varchar(45), ...
true
cf549d27c55ff734b84e647dfa7c0cccbef96eee
SQL
SmelcorS/MySQL-Basics
/6-Joins-Subqueries-and-Indices/employee_manager.sql
UTF-8
259
3.796875
4
[]
no_license
SELECT `e`.`employee_id`, `e`.`first_name`, `e1`.`employee_id`, `e1`.`first_name` AS `manager_name` FROM `employees` AS `e` JOIN `employees` AS `e1` ON `e`.`manager_id` = `e1`.`employee_id` WHERE `e`.`manager_id` IN (3,7) ORDER BY `e`.`first_name` ASC;
true
d0cc6e7ea643506314003f53f8d572c378fe66f1
SQL
chinmaybhat025/MySQL-Aegis-Everything-including-Assignments-
/assignment 8.sql
UTF-8
2,369
4.375
4
[]
no_license
# 1. select customerNumber,customerName ,country,avg(creditLimit) over(partition by country) from customers where creditLimit >(select avg(creditLimit) from customers ); # 2. select officeCode,city,cume_dist() over(order by officeCode) from offices; #3.c. List customers whose representatives report to Mr. William Patt...
true
e4bb70ed51cea65d25d2c203076705720c09e26a
SQL
opentransportro/osm2vectortiles
/src/import-sql/layers/water_label.sql
UTF-8
1,283
2.609375
3
[ "ODbL-1.0", "MIT" ]
permissive
CREATE OR REPLACE VIEW water_label_z10 AS SELECT id AS osm_id, geometry, area, name, name_en, name_es, name_fr, name_de, name_ru, name_zh, name_sv FROM osm_water_point WHERE area >= 100000000; CREATE OR REPLACE VIEW water_label_z11 AS SELECT id AS osm_id, geometry, area, name, name_en, name_es, name_fr...
true
c5ee4b92ba61443a80d2a05f3b3287bd1351002b
SQL
uestc-yangkai/content-shop
/content-shop/target/content-shop/WEB-INF/classes/database.sql
UTF-8
1,174
3
3
[]
no_license
--用户表 CREATE TABLE `user` ( `id` int(11) NOT NULL AUTO_INCREMENT, `userName` varchar(100) NOT NULL, `passWord` varchar(100) NOT NULL, `userType` int(11) DEFAULT 0, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; CREATE TABLE `content` ( `id` int(11) NOT NULL AUTO_INCREMENT, `title`...
true
6493a093aa5224b87f43722f8d7fdb2b41ec26d3
SQL
will123195/oreo
/test/schema/mysql.sql
UTF-8
1,791
4.03125
4
[ "MIT" ]
permissive
SET FOREIGN_KEY_CHECKS = 0; DROP TABLE IF EXISTS battles CASCADE; DROP TABLE IF EXISTS samples CASCADE; DROP TABLE IF EXISTS books CASCADE; DROP TABLE IF EXISTS authors CASCADE; DROP TABLE IF EXISTS Countries CASCADE; DROP TABLE IF EXISTS ratings CASCADE; CREATE TABLE Countries ( Code VARCHAR(2), name TEXT, CO...
true
9e98543944b5980090aa450e2bd363fd77debb1a
SQL
lejarx/Oracle-PLSQL
/source_code/chapter 8/listings/listing8_3.sql
UTF-8
258
2.765625
3
[]
no_license
select last_name, first_name from employee, glasses where payroll_number = fk_payroll_number and fk_department = 'POL' minus select last_name, first_name from employee, emp_tools where payroll_number = fk_payroll_number and fk_department = 'POL';
true
891842343ed9b900f1352d74271d4786fa759eb3
SQL
faisal-ijaz/TNG
/Databases/DMF - sys.dm_os_volume_stats() - Drive Space Utilization/DMF - sys.dm_os_volume_stats() - Drive Space Utilization.sql
UTF-8
554
3.65625
4
[]
no_license
SELECT Volume, CAST(SizeGB as DECIMAL(10,2)) CapacityGB, CAST(FreeGB as DECIMAL(10,2)) FreeGB, CAST([%Free] as DECIMAL(10,2))[%Free] FROM( SELECT distinct(volume_mount_point) Volume, (total_bytes/1048576)/1024.00 as SizeGB, (available_bytes/1048576)/1024.00 as FreeGB, (select ((available_bytes/104857...
true
41b5dcb771a9128eb11e0645293ac14dad5871be
SQL
CatherineBuergel/hasura-kt-demo_6_26_2020
/schema.sql
UTF-8
3,124
3.328125
3
[]
no_license
SET statement_timeout = 0; SET lock_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings = on; SET check_function_bodies = false; SET client_min_messages = warning; SET default_tablespace = ''; SET default_with_oids = false; --- --- drop tables --- DROP TABLE IF EXISTS tendered_loads; DROP...
true
215dc81beba2920995c1ff63e5afc723fdb2e879
SQL
COEJKnight/one
/dataactvalidator/config/sqlrules/fabs22_detached_award_financial_assistance.sql
UTF-8
319
2.921875
3
[ "CC0-1.0" ]
permissive
-- When provided, CorrectionLateDeleteIndicator must contain one of the following values: ""C"", ""D"", or ""L"". SELECT row_number, correction_late_delete_ind FROM detached_award_financial_assistance WHERE submission_id = {0} AND COALESCE(UPPER(correction_late_delete_ind), '') NOT IN ('', 'C', 'D', 'L');
true
86bd5cc2b364d2a2883e784f8b11454d535b7f9d
SQL
jgarzonext/paquetes
/PAC_LISTARESTRINGIDA.sql
UTF-8
10,201
2.828125
3
[]
no_license
-------------------------------------------------------- -- DDL for Package PAC_LISTARESTRINGIDA -------------------------------------------------------- CREATE OR REPLACE EDITIONABLE PACKAGE "AXIS"."PAC_LISTARESTRINGIDA" IS /****************************************************************************** NAM...
true
b3aa789aabca5b3702e4182811f8b9fada6c5f9d
SQL
ayzic45/Acoustic-Authentication-System
/Database/u570667022_ukznacousticDB.sql
UTF-8
4,620
2.75
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.9.5 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1:3306 -- Generation Time: Nov 17, 2021 at 05:19 PM -- Server version: 10.5.12-MariaDB-cll-lve -- PHP Version: 7.2.34 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!...
true
56f1f3d2527dabc329e5c616d5a5368b1419a721
SQL
adamskel78/Pewlett-Hackard-Analysis.
/Challenge/Ch_Part_One.sql
UTF-8
1,571
4.4375
4
[]
no_license
--Employee Retire Info SELECT e.emp_no ,(e.first_name, e.last_name) as Name ,t.title ,t.from_date ,s.salary --INTO retire_info FROM employees as e INNER JOIN salaries as s ON (e.emp_no = s.emp_no) INNER JOIN titles as t ON (e.emp_no = t.emp_no) WHERE (e.birth_date BETWEEN '1952-01-01' AND '1955-12-31') --GROUP BY...
true
f7b9b5cff340ffaf07561e365ee8815057d88ac8
SQL
vasilvalchanov/Databases
/DatabasesHomeworks/sampleExamFeb2015MySql.sql
UTF-8
1,564
4.375
4
[]
no_license
CREATE DATABASE orders; USE orders; CREATE TABLE products (id int auto_increment PRIMARY KEY, Name nvarchar(500) NOT NULL, price decimal(10,2)); CREATE TABLE customers (id int auto_increment PRIMARY KEY, name nvarchar(500) NOT NULL); CREATE TABLE orders (id int auto_increment PRIMARY KEY, order_date datetime); CR...
true
bcfb88fca7baab1c9225ece58aacc30475b957b8
SQL
OlafMd/MedCon1.0
/mm-libs/dbaccess/Level 3/CL3_Warehouse/Atomic/Retrieval/SQL/cls_Get_CurrentShelfContents_and_ActiveReservations_for_ProductIDList.sql
UTF-8
1,018
3.828125
4
[]
no_license
Select log_wrh_shelf_contents.Product_RefID, Sum(log_wrh_shelf_contents.Quantity_Current) As CurrentQuantity, Reservations.ReservedQuantity From log_wrh_shelf_contents Inner Join (Select Sum(log_rsv_reservations.ReservedQuantity) As ReservedQuantity, log_wrh_shelf_contents.Product_RefID From lo...
true
53db58d2a5aea61dd01fa724c3e3c2b88a91835c
SQL
santibermejo-meli/promotions
/loader_hist_global.sql
UTF-8
4,012
3.609375
4
[]
no_license
INSERT INTO TABLE BI.ATTRIB_EVENTS_GLOBAL SELECT distinct application.site_id as sit_site_id, usr.uid as uid, IF(get_json_object(event_data, '$.item_id') IS NULL, IF(get_json_object(event_data, '$.items') IS NULL, get_json_object(event_data, '$.item_ids'), get_json_ob...
true
648fcee5f57ebf3c8931dfef4639e9cc2c1294f7
SQL
andrew2010y/dubbox-test
/demo/MySQL_DB/USER.sql
UTF-8
1,278
2.953125
3
[]
no_license
/* SQLyog Enterprise Trial - MySQL GUI v8.05 MySQL - 5.5.29 : Database - dubbo_test ********************************************************************* */ /*!40101 SET NAMES utf8 */; /*!40101 SET SQL_MODE=''*/; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; /*!4010...
true
a300fde131b398b306c5daca717e02377587f24c
SQL
Tanya-Guzova/my-sql-scripts
/EdDb-Join 3 Tables Script 2.sql
UTF-8
105
2.796875
3
[]
no_license
select * from Student s join studentclassrel sc on s.Id = sc.StudentId join class c on sc.ClassId = c.Id
true
64ff3e0eb790fa7ab59ae08deec4887571d368a5
SQL
Nar67/carthumbing_api
/models/migrations/1488634987_0001_create_route_table.up.sql
UTF-8
211
2.609375
3
[]
no_license
CREATE TABLE route ( id serial PRIMARY KEY, user_uuid char(30) NOT NULL, origin point NOT NULL, destination point NOT NULL, selected_date date NOT NULL DEFAULT current_date, type char(30) NOT NULL );
true
bcc7a547100c2e1beaa3f1e20d44c91f02fbc2c2
SQL
qcollinscode/traveling-coders
/database/backups/01/traveling_coders.sql
UTF-8
11,652
3.171875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.6.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: May 19, 2017 at 01:54 PM -- Server version: 5.7.14 -- PHP Version: 5.6.25 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */...
true
2490207bc8ca589f57dceb20062e7282a708c25a
SQL
brendankowitz/fhir-server
/src/Microsoft.Health.Fhir.SqlServer/Features/Schema/Sql/Tables/TokenSearchParam.sql
UTF-8
1,049
3.46875
3
[ "MIT", "LicenseRef-scancode-generic-cla" ]
permissive
CREATE TABLE dbo.TokenSearchParam ( ResourceTypeId smallint NOT NULL, ResourceSurrogateId bigint NOT NULL, SearchParamId smallint NOT NULL, SystemId int NULL, Code ...
true
525d66cb652d1b18c18487ba552ae0382a7f8ce8
SQL
chuangchidong/free
/src/main/resources/db/db.sql
UTF-8
8,235
3.421875
3
[]
no_license
# ************************************************************ # Sequel Pro SQL dump # Version 4541 # # http://www.sequelpro.com/ # https://github.com/sequelpro/sequelpro # # Host: 127.0.0.1 (MySQL 5.6.25) # Database: free # Generation Time: 2017-06-25 19:29:18 +0000 # **************************************************...
true
2efa8263aa3ca3000d7c4e53e01ce1bfc03627ad
SQL
476678244/learnscala
/src/resources/second_highest_salary.sql
UTF-8
498
3.96875
4
[]
no_license
#https://leetcode-cn.com/problems/second-highest-salary select case when count(SecondHighestSalary) = 0 then null else min(SecondHighestSalary) end as SecondHighestSalary from ( select SecondHighestSalary from ( select e.Salary as SecondHighestSalary, @curRank := @curRank + 1...
true
051857133e40bd7bf396cae7f1535d4c78f794ae
SQL
rahmathidayat9/portfolio-codeigniter-4
/web_portfolio_ci4 (1).sql
UTF-8
9,209
3.046875
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Feb 15, 2021 at 08:01 AM -- Server version: 10.4.11-MariaDB -- PHP Version: 7.4.6 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIEN...
true
1aefc90bf784f620a44ecd3dbc44277749bd5463
SQL
alexrzz/BasiDiDati
/Sql/Function_1.sql
UTF-8
668
3.75
4
[]
no_license
DELIMITER $$ CREATE FUNCTION calcoloEta (nascita DATETIME) RETURNS INT BEGIN DECLARE eta INT ; DECLARE oggi DATETIME ; SET oggi = CURDATE() ; SET eta = YEAR(oggi) - YEAR(nascita) - (DATE_FORMAT(oggi, '%m%d') < DATE_FORMAT(nascita, '%m%d')) ; RETURN(eta) ; END $$ D...
true
43d0797055fd1ad8ed7de7f20506f645f88dffd1
SQL
cacaxiq/MinhaRotina
/script.sql
UTF-8
519
2.734375
3
[]
no_license
/* lugares cadastrados pelo usuário: casa da minha mãe, ufmg, academia */ CREATE TABLE minharotina.lugar ( id KEY PRIMARY KEY(id), descricao TEXT, localizacao TEXT (coordenadas) ); /* Rotina criada pelo usuário */ CREATE TABLE minharotina.objetivo_pessoal ( id KEY PRIMARY KEY(id), id_lugar INT, qtd_horas_m...
true
723fe4d9b1cba820bc3e2cf5bb8de1ae5ed7c94a
SQL
phdoc0/Week7MySQL
/Week 1 Question 3.sql
UTF-8
99
2.6875
3
[]
no_license
SELECT * FROM employees WHERE last_name like 'F%' and gender = 'F' order by last_name asc limit 50;
true
22649898ffb0f8f4c10dd52fd59195205e7c5577
SQL
Enjoycoding82/exercici-mysql-amazon
/export bbdd/amazon_usuaris.sql
UTF-8
2,620
3.15625
3
[]
no_license
CREATE DATABASE IF NOT EXISTS `amazon` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci */ /*!80016 DEFAULT ENCRYPTION='N' */; USE `amazon`; -- MySQL dump 10.13 Distrib 8.0.21, for Win64 (x86_64) -- -- Host: 127.0.0.1 Database: amazon -- ------------------------------------------------------ -- Se...
true
4ab0996b7879fae8a4fc5a0d737472302fa31435
SQL
Adhithya-PGK331/RDBMS
/RDBMS/Data Definition Language/Create SCHEDULE table/dd2.sql
UTF-8
304
3.109375
3
[]
no_license
create table schedule( schedule_id varchar2(3), travel_date date, source varchar2(20), destination varchar2(20), bus_no number(11), duration number(11), constraints PK_schedule primary key(schedule_id), constraints FK_schedule_buses foreign key(bus_no) references buses );
true
fbe5f5e8a76f3fd90132dec2a37bc542caaa8dfa
SQL
sbishop7/DojoAssignments
/Python/MySQL/LeadGenBusiness/06_clientsLeads.sql
UTF-8
523
4.3125
4
[]
no_license
#6. What query would you run to get a list of client names and the total # of leads we've generated # for each of our clients between January 1, 2011 to December 31, 2011? USE lead_gen_business; SELECT concat(clients.first_name, ' ', clients.last_name) AS client_name, count(leads.leads_id) AS number_of_leads FROM cli...
true
b3fa6cf9c850d7348c8425fc1554effedfd423e4
SQL
jgarzonext/packages
/function/CNVEBCDIC_ASCII.sql
UTF-8
1,251
2.625
3
[]
no_license
-------------------------------------------------------- -- DDL for Function CNVEBCDIC_ASCII -------------------------------------------------------- CREATE OR REPLACE EDITIONABLE FUNCTION "AXIS"."CNVEBCDIC_ASCII" (ebcdic IN VARCHAR2, escala IN NUMBER) RETURN NUMBER IS xnumero VARCHAR...
true
899cffebf37e4e2abd9c18a77a63b922ce8f7bbb
SQL
rix501/Turbo-Geek
/sql/MarkSubscriptionRead.sql
UTF-8
392
3.015625
3
[]
no_license
USE Turbo; DELIMITER // DROP PROCEDURE IF EXISTS Mark_Subscription_Read; CREATE PROCEDURE Mark_Subscription_Read(IN p_userID INT, IN p_comicID INT) BEGIN DECLARE EXIT handler for sqlexception ROLLBACK; START TRANSACTION; UPDATE subscriptions SET read_latest_comic = 1 WH...
true
961092b8ed282c6536f600cc24251205016202b4
SQL
yoheia/yoheia
/oracle/tpt_scripts/ash5.sql
UTF-8
2,189
2.96875
3
[ "Apache-2.0" ]
permissive
------------------------------------------------------------------------------ -- -- Copyright 2017 Tanel Poder ( tanel@tanelpoder.com | http://tanelpoder.com ) -- -- 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 c...
true
f37aedd05b8a8b42e0297dd9ef94767a633a7c09
SQL
dlee0113/database_fundamentals_for_java_programmers
/Chapter 4/triggers/trigger.sql
UTF-8
424
3.109375
3
[]
no_license
CREATE TABLE costchanges (cc_id INTEGER PRIMARY KEY AUTOINCREMENT, oldcost DECIMAL NOT NULL, newcost DECIMAL NOT NULL, whenT DATE NOT NULL); CREATE TRIGGER activities_trigger UPDATE OF cost ON activities BEGIN I...
true
097e2764ac1eb50c36b0c02062ad755125f45df6
SQL
adityatoshniwal/pgadmin4
/web/pgadmin/dashboard/templates/dashboard/sql/default/activity.sql
UTF-8
882
3.421875
3
[ "PostgreSQL" ]
permissive
/*pga4dash*/ SELECT pid, datname, usename, application_name, client_addr, pg_catalog.to_char(backend_start, 'YYYY-MM-DD HH24:MI:SS TZ') AS backend_start, state, wait_event_type || ': ' || wait_event AS wait_event, array_to_string(pg_catalog.pg_blocking_pids(pid), ', ') AS blocking_pi...
true
7c2b70b992be74b8a764ef659534cdd16430ef40
SQL
miquelmarti/PlanOut-Server
/planout_ddbb.sql
UTF-8
4,918
2.640625
3
[ "BSD-2-Clause" ]
permissive
-- MySQL dump 10.13 Distrib 5.6.19, for osx10.7 (i386) -- -- Host: localhost Database: planout_ddbb -- ------------------------------------------------------ -- Server version 5.6.23 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */...
true
33fc32e0396e55067a2c77bbe3ed91ee23c380b4
SQL
pierryangelo/projeto_db
/docs.sql
UTF-8
12,361
3.671875
4
[]
no_license
-- Sobre funções na ordem que estão declaradas no arquivo functions.sql -- DESCONTO_APLICADO(NOME VARCHAR(60), PORCENTAGEM DECIMAL(3,2)) RETURNS TEXT -- Uma função de suporte feita para evitar acumulo de IF para retornar um TEXT simples, apenas formata a frase de retorno se o desconto foi aplicado ou retirado em um d...
true
e912b797de882081172da38e6155da0750b9a680
SQL
prefix443/Tool-Rental-App
/src/main/resources/data.sql
UTF-8
473
2.8125
3
[]
no_license
DELETE FROM tools; DELETE FROM tool_types; INSERT INTO tool_types (id ,tool_type, daily_charge, weekday_charge, weekend_charge, holiday_charge) VALUES (1, 'LADDER', 1.99, true, true, false), (2, 'CHAINSAW', 1.49, true, false, true), (3, 'JACKHAMMER', 2.99, true, false, false); INSERT INTO tools (id, tool_...
true
e95d848700bba9c133342dde80722edb524d4f21
SQL
viswaratha12/dbwarden
/DMS5/T_Cell_Culture_Type_Name_Data.sql
UTF-8
1,031
2.578125
3
[ "Apache-2.0" ]
permissive
/****** Object: Table [T_Cell_Culture_Type_Name] ******/ /****** RowCount: 10 ******/ SET IDENTITY_INSERT [T_Cell_Culture_Type_Name] ON INSERT INTO [T_Cell_Culture_Type_Name] (ID, Name) VALUES (105,'Biofluid') INSERT INTO [T_Cell_Culture_Type_Name] (ID, Name) VALUES (104,'Community') INSERT INTO [T_Cell_Culture_T...
true
e985e297427ce8ce9d3b00dce4e99745a777accd
SQL
jdpressley5/ERS-Revature
/ERS/DatabaseCode/Model_for_ERS_drop.sql
UTF-8
908
2.859375
3
[]
no_license
-- Created by Vertabelo (http://vertabelo.com) -- Last modification date: 2018-07-26 19:14:12.204 -- foreign keys ALTER TABLE Reimbursements DROP CONSTRAINT Employee_Reimbursements; ALTER TABLE Reimbursements DROP CONSTRAINT Manager_Reimbursements; ALTER TABLE R_Content DROP CONSTRAINT Reimbursements_R_C...
true
0726bc4f38811b996996c05d4bb8856471d396c2
SQL
mozilla/etl-graph
/etl-graph/resources/query_logs.sql
UTF-8
2,010
4.46875
4
[]
no_license
CREATE TEMP FUNCTION qualified_name( meta STRUCT<project_id string, dataset_id string, table_id string> ) RETURNS string AS ( CONCAT(meta.project_id, ":", meta.dataset_id, ".", meta.table_id) ); CREATE TEMP FUNCTION strip_suffix(name string) RETURNS string AS ( -- Get rid of the date partition if it exists in ...
true
3d2d489fe91bce854fa37b11bf78f2ed804a27bf
SQL
xornjseh1000/bob_prototype-clear
/socar/src/sql/member.sql
UTF-8
881
2.59375
3
[]
no_license
create table member( id varchar2(20) primary key, pw varchar2(20), name varchar2(20), birth varchar2(11), gender varchar2(1), phone varchar2(15), address varchar2(100), region varchar2(30), job varchar2(10), licence_num varchar2(20), licence_val varchar2(5), licence_local varchar2(3), licence_end varchar2(...
true
a5c0b49e17ee24ba2afb32b50f9ab73b444095df
SQL
OlafMd/MedCon1.0
/mm-libs/dbaccess/Level 5/CL5_MyHealthClub_Diagnosis/Atomic/Retrieval/SQL/cls_Get_PotentialObservations_for_TenantID.sql
UTF-8
264
2.875
3
[]
no_license
Select hec_potentialobservations.Observation_Text_DictID, hec_potentialobservations.HEC_PotentialObservationID From hec_potentialobservations Where hec_potentialobservations.Tenant_RefID = @TenantID And hec_potentialobservations.IsDeleted = 0
true
2be982025fa2d3d4188daebfcba172e4b09d9baa
SQL
tomtomseddon/W205-SeddonREPO
/exercise_1/investigations/hospital_variability/proc_variability.sql
UTF-8
692
3.453125
3
[]
no_license
-- This script creates a standardized summary of the score variability for -- each of the identified procedures. -- This was developed to run in SparkSQL. -- Note: This assumes that the best_hospitals.sql script has already been run. -- Create the standardized view DROP TABLE procedure_var; CREATE TABLE procedure...
true
277318593e2cd051240be351d34e798755249aad
SQL
kuthulas/ProjectX
/hcs.sql
UTF-8
8,276
2.671875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 3.5.2.2 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Mar 08, 2013 at 11:11 AM -- 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
35806f36e683036cb16691ce30cdd30b4de5c9d3
SQL
VGalkov/InterviewQuestions
/src/main/resources/SQL/reestrRTK.sql
UTF-8
1,210
3.765625
4
[]
no_license
select rl.dt as 'Дата перехода', c.title as 'МВ-Самара л.с.', cpt.val as 'Ростелеком л.с.', `cb`.`summa4` as 'Расход', (`cb`.`summa1`+`cb`.`summa2`-`cb`.`summa3`-`cb`.`summa4`) as 'Исходящий остаток', if ((`cb`.`summa1`+`cb`.`summa2`-`cb`.`summa3`-`cb`.`summa4`)<0,(`cb`.`summa1`+`cb`.`summa2`-`c...
true
6160cbac2ff71d2d2052920216749724c5129618
SQL
Anemos/Kdac-Source
/PBL/Sp_as400_bom/bom_table_sql/BOM109.SQL
UHC
1,863
2.796875
3
[]
no_license
-- Generate SQL -- Version: V5R3M0 040528 -- Generated on: 10/11/16 10:46:51 -- Relational Database: I520 -- Standards Option: DB2 UDB iSeries -- Description : BOM ǥ( ) DROP TABLE PBPDM.BOM109; CREATE TABLE PBPDM.BOM109 ( FCMCD CHAR(2) CCSID 833 NOT NULL , F...
true
a8d263ce2b7048f7f7774f2f2cd0597417b7c3b4
SQL
roshanahtina/MySQL-Training
/custInfo_11-June-2019.sql
UTF-8
7,975
3.0625
3
[]
no_license
-- MySQL dump 10.13 Distrib 5.6.44, for Linux (x86_64) -- -- Host: localhost Database: custInfo -- ------------------------------------------------------ -- Server version 5.6.44 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*...
true
7b221c1cbca379e499419f188ab060af6698f665
SQL
BIAOXYZ/variousCodes
/_CodeTopics/LeetCode/1-200/000181-sql/000181.sql
UTF-8
391
3.4375
3
[]
no_license
# Write your MySQL query statement below SELECT e1.Name AS "Employee" FROM Employee e1, Employee e2 WHERE e1.ManagerId = e2.Id AND e1.Salary > e2.Salary; /* https://leetcode-cn.com/submissions/detail/240071981/ 执行用时:384 ms, 在所有 MySQL 提交中击败了70.07%的用户 内存消耗:0 B, 在所有 MySQL 提交中击败了100.00%的用户 通过测试用例: 14 / 14 */
true
134cce96995a92ac085ce923de0862c0131eb046
SQL
Manii-dot/database-exercises
/limit_exercises.sql
UTF-8
777
3.8125
4
[]
no_license
USE employees; -- 2 List the first 10 distinct last name sorted in descending order. SELECT DISTINCT last_name FROM employees ORDER last_name DESC LIMIT 10; -- 3 Create a query to get the top 5 salaries and display just the employees number from the salaries table. SELECT DISTINCT emp_no FROM salaries ORDER BY salary...
true
37b15621a48e545113ae7faa7e689b479eb031ba
SQL
pkoller/SQL_bills_e1
/10_queryFunction_table.sql
UTF-8
186
2.9375
3
[]
no_license
USE T4 SELECT * FROM dbo.f_countALLforcustomer() -- SELECT amount, c.FirstName, c.LastName FROM dbo.f_countALLforcustomer() cou RIGHT JOIN CUSTOMER c ON c.CustomerId = cou.CustomerId
true
2ddcae6cde0d77bce42db4cefff5a2ef2c841037
SQL
MikkelDjurhuus/School
/School/Database/MySQL/SQL/University/delete_takes_title_like_database.sql
UTF-8
143
2.828125
3
[]
no_license
delete from takes where sec_id in (select sec_id from section where course_id in (select course_id from course where title like '%database%'))
true
467df2fdc1e0d7db275004122b7935edb2a7f408
SQL
mediawiki-utilities/python-mwmetrics
/sql/user_activity_months.create.sql
UTF-8
479
2.6875
3
[ "MIT" ]
permissive
CREATE TABLE user_activity_months ( wiki_db VARCHAR(255), user_id INT(5) UNSIGNED, revisions_month_1 INT, revisions_month_2 INT, revisions_month_3 INT, revisions_month_4 INT, revisions_month_5 INT, revisions_month_6 INT, revisions_month_7 INT, revisions_month_8 INT, revisions...
true
04461634e08510f1afebab1b8b46f5bedfa8df12
SQL
loganHetfield/properties-db
/Properties/AlterTables/BuildingNote.sql
UTF-8
1,181
3.6875
4
[]
no_license
if not exists( select 1 from sys.all_columns where object_id = object_id('BuildingNote') and (name = 'ImageId' or name = 'ThumbImageId' or name = 'FileName')) BEGIN ALTER TABLE dbo.BuildingNote ADD [ImageId] UNIQUEIDENTIFIER NULL, [ThumbImageId] UNIQUEIDENTIFIER NULL, [FileName] VARCHAR (255) ...
true
2a9b6d590e445ed1d94a06268498fed09bd17178
SQL
alperenbozkurt/FilmAL
/database/FilmAY.sql
UTF-8
6,603
3.421875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.5.4.1deb2ubuntu2 -- http://www.phpmyadmin.net -- -- Anamakine: localhost -- Üretim Zamanı: 08 Ara 2017, 12:43:17 -- Sunucu sürümü: 5.7.11-0ubuntu6 -- PHP Sürümü: 7.0.22-0ubuntu0.16.04.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_S...
true