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
029b10a4057ad19e82b7e77445d25e78f3a96060
SQL
kintansemi/mamamertua
/mamamertua (1).sql
UTF-8
4,131
3.03125
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.6.6 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: Apr 02, 2017 at 01:48 PM -- Server version: 5.7.17-log -- PHP Version: 7.0.17 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIEN...
true
15a3dd1d3a693de912e87e145a525475d9cb5285
SQL
Kawaiivee/CS425
/database/definition.sql
UTF-8
3,967
4.09375
4
[]
no_license
DROP DATABASE IF EXISTS ecommerce; CREATE DATABASE IF NOT EXISTS ecommerce; USE ecommerce; /* Creating Customer table */ DROP TABLE IF EXISTS Customer; CREATE TABLE IF NOT EXISTS Customer ( address varchar(50) not null, customer_name varchar(50) not null, customer_id int AUTO_INCREMENT not null, email va...
true
c45968383255f429c339ba300fa4f15c09ae9751
SQL
jameswyh/Oracle_Teaching_Management_System
/5_procedure/2_p_upd_std_inf.sql
UTF-8
604
2.734375
3
[]
no_license
CREATE OR REPLACE PROCEDURE p_upd_std_inf( v_reg_no in db_student.register_no%type, v_name in db_student.s_name%type, v_birthday in db_student.s_dateofbirth%type, v_address in db_student.s_address%type, v_postcode in db_student.s_postcode%type, v_mail_address in db_student.s_mail_address%type, v_tele in db_stude...
true
d93fc9b3dc32953a3d51f2acb587339f452fd84e
SQL
sonalalamkane/SQL-NextSeed-Project
/storeProcedure.sql
UTF-8
797
3.5
4
[]
no_license
use Exercise; select * from salesman; select count(distinct salesman_id) from orders; select * from salesman where salesman_id between 5001 and 5005; select * from salesman where salesman_id in (5001,5005,5003); call demo; call hello; call find(@salesman_id); call powernum(3,3); call addnum(2,2); call c(); /...
true
4bed2a13a95e16b127899f1e4e40e351bdd6e08b
SQL
PaolaSabatini/Social-Network
/chat.sql
UTF-8
407
2.9375
3
[]
no_license
DROP TABLE IF EXISTS chat; CREATE TABLE chat ( id SERIAL PRIMARY KEY, firstname VARCHAR, lastname VARCHAR, comment TEXT, url VARCHAR, userId INTEGER, created TIMESTAMP DEFAULT CURRENT_TIMESTAMP ); -- db.getUserChat().then(results => { -- socket.emit('chatMessages', results) -- })...
true
869333a5e2eef0cc2e647913cb59b31cc889f8c9
SQL
rampratapsingh10/Railway-Enquiry-System
/railway.sql
UTF-8
4,735
3.15625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: May 15, 2021 at 04:39 AM -- Server version: 10.1.38-MariaDB -- PHP Version: 7.3.2 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
true
329ab1802ba1cee5dc920e0535f5026aa79855d7
SQL
albandewilde/in-Projects
/inProjects.Data/Res/sCreateEventSchool.sql
UTF-8
756
3.5625
4
[ "MIT" ]
permissive
--SetupConfig: {"Requires": [ "CK.sGroupCreate", "CK.sGroupGroupNameSet" ]} -- CREATE PROCEDURE sCreateEventSchool ( @Name VARCHAR(256), @BegDate DATETIME2, @EndDate DATETIME2, @TimePeriodId INT, @ActorId INT, @EventId INT OUTPUT, @Status INT = 0 OUTPUT ) AS BEGIN --[beginsp] --<PreCreate /> IF EXISTS(S...
true
041317643e1d8926aa715503cacb6b52ebdbcdc5
SQL
ash-cano/database-exercises
/order_by_exercises.sql
UTF-8
496
3.453125
3
[]
no_license
USE employees; SELECT first_name, last_name FROM employees WHERE first_name IN ('Irena', 'Vidya', 'Maya') ORDER BY last_name, first_name; SELECT * FROM employees WHERE last_name LIKE 'e%' ORDER BY emp_no DESC; SELECT first_name, last_name, hire_date FROM employees WHERE hire_date LIKE '199%' ORDER BY hire_date ASC; ...
true
8ad9de4a8f3251d079e1277f349e8d6dbc7b7a84
SQL
TdP-prove-finali/PulitaMarco
/DroneDelivery/database/droneDelivery.sql
UTF-8
866,060
2.78125
3
[]
no_license
-- -------------------------------------------------------- -- Host: 127.0.0.1 -- Server version: 10.4.12-MariaDB - mariadb.org binary distribution -- Server OS: Win64 -- HeidiSQL Version: 11.0.0.5919 -- ------------------------------------------...
true
e1903d4b2a7a6fd605fe63b4ad0b4e1b4cc85772
SQL
radtek/abs3
/sql/mmfo/bars/Table/dpt_bonuses.sql
WINDOWS-1251
8,144
3.203125
3
[]
no_license
PROMPT ===================================================================================== PROMPT *** Run *** ========== Scripts /Sql/BARS/Table/DPT_BONUSES.sql =========*** Run *** = PROMPT ===================================================================================== PROMPT *** ALTER_POLICY_INFO...
true
b7ab812da9dbf797192afed2c92374d143cbc3fc
SQL
wangyunge/algorithmpractice
/eet/Find_Cumulative_Salary_of_an_Employee.sql
UTF-8
1,158
4.875
5
[]
no_license
-- The Employee table holds the salary information in a year. -- Write a SQL to get the cumulative sum of an employee’s salary over a period of 3 months but exclude the most recent month. SELECT DISTINCT e1.id ,e1.MONTH ,SUM(e1.salary) OVER(PARTITION BY e1.id ORDER BY e1.MONTH) FROM employee e1 ...
true
56ce4add09528c87bff1a4b71a76430f22ab51fc
SQL
indahnurrizqir/judul_ta
/sql/judul.sql
UTF-8
1,964
3.265625
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.7.0 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: May 22, 2018 at 09:04 AM -- Server version: 10.1.22-MariaDB -- PHP Version: 7.1.4 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
true
8b3ac8aa0f256eb38d2a3ee5f598a0f34ca30567
SQL
sengeiou/tech
/lotserver/db/sql/game_event.sql
UTF-8
950
2.859375
3
[]
no_license
spool game_control_event.log; set time on timing on feedback on echo on insert into game_control_event_his select * from game_control_event where CREATE_TIME < trunc(sysdate -30); commit; delete from game_control_event where CREATE_TIME < trunc(sysdate -30); commit; delete from GAME_TREND_JBYL where lotteryid=9...
true
d456d50179acd70382edb006302442fb6621c33a
SQL
Group-axis/art
/backend/amh-routing-service/sql/routing_ddl_with_string_version.sql
UTF-8
16,340
3.5
4
[]
no_license
 DROP TABLE public."BCKENDCHASSGNRULECRITERIA"; DROP TABLE public."BCKENDCHASSNSELTABLE"; DROP TABLE public."DISTCPYSELECTIONTABLE"; DROP TABLE public."DISTCPYSELECTIONTABLEMCD"; DROP TABLE public."DISTCPYSELECTNTBLRULECRITERIA"; DROP TABLE public."FEEDBCKDISTCPYRULECRITERIA"; DROP TABLE public."FEEDBCKDISTCPYSELTAB...
true
88df8935c74bf3b37928c9b67bcbba37cec39a28
SQL
MJRH54/MJRH54
/Library.sql
UTF-8
1,782
3.65625
4
[]
no_license
CREATE DATABASE IF NOT exists New_Library; use New_Library; create table if not exists Usuarios( id_usuario int not null, nombre varchar(45) not null, direccion varchar (120), primary key(id_usuario) )engine=innoDB; create table if not exists TelefonoCorreo( id_telefono_correo int not null,...
true
44c9ece51c43f7408cf79f06f236dc5387d8f0ba
SQL
leandroSrodrigues/projetoifpe
/banco_visa.sql
UTF-8
1,781
3.578125
4
[]
no_license
CREATE USER 'visa'@'localhost' IDENTIFIED BY 'vi$@2017'; GRANT CREATE ON * . * TO 'visa'@'localhost'; GRANT DELETE ON * . * TO 'visa'@'localhost'; GRANT INSERT ON * . * TO 'visa'@'localhost'; GRANT SELECT ON * . * TO 'visa'@'localhost'; GRANT UPDATE ON * . * TO 'visa'@'localhost'; FLUSH PRIVILEGES; CREATE DATABASE...
true
d10a57ee093ddb594a3b151171925bb7eeb7185d
SQL
onsurface/mvc
/productos(1).sql
UTF-8
2,193
3.109375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.3 -- https://www.phpmyadmin.net/ -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 20-11-2020 a las 06:19:24 -- Versión del servidor: 10.4.14-MariaDB -- Versión de PHP: 7.4.11 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
true
d49482c03cf0940ebe0ac372538e1e7cbd9d5a06
SQL
VladislavBryazkun/1035767-doingsdone-9
/schema.sql
UTF-8
1,376
3.765625
4
[]
no_license
CREATE DATABASE justdoit DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci; USE justdoit; CREATE TABLE users ( id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY, date_create TIMESTAMP DEFAULT CURRENT_TIMESTAMP, email VARCHAR(128) NOT NULL UNIQUE, name VARCHAR(128) NOT NU...
true
ac0217870dcf697cb384d3aea95012414174dbbf
SQL
superquinquin/metabase-questions
/65-CA annuel par categorie.sql
UTF-8
619
3.484375
3
[]
no_license
/* -------- Description -------- -------- Filters translation -------- -------- SQL -------- */ SELECT case when "pc".parent_id != 0 then "mc".name else "pc".name end as "Categorie", sum("rpo".price_total_vat_excl) AS "Total HT", sum("rpo".price_total) AS "Total TTC" FROM ...
true
8ca78b23937aa58f97208a33e44d574acf904a99
SQL
smartaid1980/STOutsource
/src/main/webapp/WEB-INF/sql/update/20171002/insert_ToolManagement.sql
UTF-8
1,564
3.21875
3
[]
no_license
DROP TABLE IF EXISTS `a_tool`; CREATE TABLE `a_tool` ( `tool_id` char(14) NOT NULL DEFAULT '', `tool_name` varchar(45) NOT NULL DEFAULT '', `create_time` datetime DEFAULT NULL, `create_by` varchar(45) DEFAULT NULL, `device_id` char(14) DEFAULT NULL, `tool_slot` varchar(45) DEFAULT NULL, `lifetime` varcha...
true
751bcad7ecd8cd306bb88c3525d5d08363899aa6
SQL
Sturgeon-SDC/Ratings-And-Reviews
/db/schema.sql
UTF-8
2,669
3.96875
4
[]
no_license
DROP DATABASE IF EXISTS ratingsandreviews; CREATE DATABASE ratingsandreviews; \c ratingsandreviews; CREATE TABLE reviews ( id serial NOT NULL, product_id integer NOT NULL, rating integer NOT NULL, epoch bigint, summary varchar(300), body varchar(2500), recommend boolean, reported bo...
true
24b6c8db68353b5c82cad138bd01834a3860fdaf
SQL
Eyali1001/lifeServer
/schema.sql
UTF-8
750
3.15625
3
[]
no_license
drop table if exists patients; create table patients ( id integer primary key autoincrement, patient_name text not null UNIQUE, password text not null, image blob, diagnosis text, gender text not null, age int not null, category text, activechats text not null, treated integer not null ); drop tabl...
true
9fa13edc000784c596b49a9c80697ff8d9ea89d3
SQL
prodigasistemas/gsan-migracoes
/comercial/scripts/20190729190555_alter_table_visita_add_usuario.sql
UTF-8
535
3.25
3
[]
no_license
-- // alter table visita add usuario -- Migration SQL that makes the change goes here. ALTER TABLE atualizacaocadastral.visita ADD COLUMN usur_id integer; ALTER TABLE atualizacaocadastral.visita ADD CONSTRAINT fk1_visita FOREIGN KEY (usur_id) REFERENCES seguranca.usuario (usur_id) MATCH SIMPLE ON UPDATE RESTRICT ON DE...
true
9c8e52efdf39a1d0fec2a6ce3674b23984252a19
SQL
jlfemino/simulmedia
/db_migrations/000001_init.sql
UTF-8
1,447
3.5625
4
[]
no_license
CREATE TABLE 'user' ( user_id char(36) NOT NULL PRIMARY KEY, created DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, updated DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, name char(256) NOT NULL ); -- TODO: Remove test data from DB migration file INSERT INTO 'user' (user_id, name) VALUES ('e38c6813-52...
true
ee1c2644ebea4cb2b12cb8c35100fc9e7688c159
SQL
7Nikita/university-monorepo
/term 5/DMaDMS/lab5/9.sql
UTF-8
648
3.9375
4
[]
no_license
select last_name.value as `фамилия`, first_name.value as `имя`, patronymic.value as `отчество`, lessons.idLessonsType as `предмет`, min(rating.ratingtypeShort) as `минимальный рейтинг`, max(rating.ratingtypeShort) as `максимальный рейтинг` from lessons inner join students on lessons.idStudent = students.id ...
true
9b4d6f45dd9aa33b708c625c38626c114f7a69a6
SQL
LeoCo/twitty
/init_database.sql
UTF-8
560
3.40625
3
[]
no_license
DROP TABLE IF EXISTS Utenti; DROP TABLE IF EXISTS Tweet; CREATE TABLE IF NOT EXISTS Utenti( id INT(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY, nome VARCHAR(30) NOT NULL, cognome VARCHAR(30) NOT NULL, data_di_nascita DATE NOT NULL, password VARCHAR(30) NOT NULL, email VARCHAR(30) NOT NULL ); CREATE TAB...
true
cd4066ff78c7461696947627276ff9bfbc893407
SQL
billyhawkes/stock-wars
/server/src/db/database.sql
UTF-8
415
3.203125
3
[]
no_license
CREATE DATABASE stockwars; -- \c stockwars CREATE TABLE users ( user_id SERIAL PRIMARY KEY, username varchar(255) UNIQUE, email varchar(255) UNIQUE, password varchar(255), cash int DEFAULT 2000 ); CREATE TABLE stocks ( stock_id SERIAL PRIMARY KEY, symbol varchar(4), cost MONEY, da...
true
6aedbe97f61187911d57109d3758b923b136e1c2
SQL
Hugoprogpro/ManagerClient
/DBManagerClient.sql
UTF-8
517
2.765625
3
[]
no_license
create table Cliente ( codigo int not null primary key, nome nvarchar(50) not null, dataCadastro nvarchar(100), telefone nvarchar(20), Bairro nvarchar(100) not null, Logradouro nvarchar(100), Numero nvarchar(15), cidade int ) create table Endereco ( Id int not null primary key identity, IdCliente int not nul...
true
38eff8843100acb06d7bb010640d023c41135dca
SQL
more03625/MathsGame
/Rahul/SqlFiles/quiz2.sql
UTF-8
4,966
3.203125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.6.6deb5 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3306 -- Generation Time: Oct 18, 2019 at 08:38 PM -- Server version: 5.7.27-0ubuntu0.18.04.1 -- PHP Version: 7.2.19-0ubuntu0.18.04.2 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHA...
true
b2e7c0969f37932229bce77a976226d7b34b508b
SQL
MasayukiOzawa/SQLServer-Util
/Datadog Database Monitor/Requests Query.sql
UTF-8
1,454
3.484375
3
[ "MIT" ]
permissive
SELECT CONVERT(nvarchar,TODATETIMEOFFSET(CURRENT_TIMESTAMP,DATEPART(TZOFFSET,SYSDATETIMEOFFSET())),126) AS now, CONVERT(nvarchar,TODATETIMEOFFSET(req.start_time,DATEPART(TZOFFSET,SYSDATETIMEOFFSET())),126) AS query_start, sess.login_name AS user_name, sess.last_request_start_time AS last_request_st...
true
2afba6edf5235d46539413f25013a83c54aedca7
SQL
thinkful-ei-gecko/leon-noteful-server-v4
/migrations/001.do.create.noteful-tables.sql
UTF-8
362
2.796875
3
[]
no_license
DROP TABLE IF EXISTS folders; DROP TABLE IF EXISTS notes; CREATE TABLE folders ( id INTEGER PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY, name TEXT NOT NULL ); CREATE TABLE notes ( id INTEGER PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY, name TEXT, date_modified TIMESTAMP DEFAULT now() NOT NULL, folderid ...
true
214f64defde0efd5c6039d7c8899556293fb4568
SQL
juexuewuyou/swsw_demo
/mysql/sql/swsw.sql
UTF-8
1,465
3.625
4
[]
no_license
set names utf8; drop database if exists swsw; create database swsw charset=utf8; use swsw; ######################################################## #用户信息表 create table sw_user ( uid int primary key auto_increment, uname varchar(32) not null, upwd varchar(128) not null, email varchar(32), nick_name ...
true
81f275182538c799dd447d2223b0467d08f2ef4f
SQL
y252zhan/Music-Rooms-Manager
/src/Prooms/SecurityBundle/Mysql/StudentGroup.sql
UTF-8
340
2.78125
3
[ "MIT" ]
permissive
CREATE TABLE student_groups ( `id` INT NOT NULL AUTO_INCREMENT, `degree` VARCHAR(30), `major` VARCHAR(30), `year` INT, `instrument` VARCHAR(30), `gpa_floor` INT, `max_hours` INT, `opening_datetime` DATETIME, PRIMARY KEY (id), UNIQUE KEY (degree, major, instrument, year, gpa_floor...
true
257edcd6dc90076887988425da85ab723b44ecdf
SQL
chengjingming060241/gizwits-lease
/sql/0.3/operator.sql
UTF-8
1,905
3.28125
3
[]
no_license
ALTER TABLE operator DROP manufacturer_id; ALTER TABLE operator DROP parent_operator_id; ALTER TABLE operator MODIFY share_benefit_rule_id INT(11) COMMENT '分润规则'; ALTER TABLE operator ADD status INT(1) DEFAULT 1 NOT NULL; ALTER TABLE operator MODIFY COLUMN status INT(1) NOT NULL DEFAULT 1 COMMENT '运营商状态,1.待分配,2.运营中,3...
true
b87266dcb6a126d02bc9dc1dc1f64a70462de375
SQL
oooooolr/CloudClassroom
/CloudClassroom/src/main/resources/cloud_classroom.sql
UTF-8
109,809
2.65625
3
[]
no_license
/* Navicat Premium Data Transfer Source Server : mysql Source Server Type : MySQL Source Server Version : 50717 Source Host : localhost:3306 Source Schema : cloud_classroom Target Server Type : MySQL Target Server Version : 50717 File Encoding : 65001 Date: 01/06/202...
true
f76c6b220fcde2ecb51a2d9e9547f3101af58d96
SQL
gnoose/datafeeds-shared
/fixtures/schema.sql
UTF-8
317,491
2.703125
3
[]
no_license
-- -- PostgreSQL database dump -- -- Dumped from database version 9.6.12 -- Dumped by pg_dump version 12.4 SET statement_timeout = 0; SET lock_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings = on; SELECT pg_catalog.set_config('search_path', '', false); SET check_function_bodies = false; SE...
true
3c1117a9c79c3ce3c47145f0539165fa799d350c
SQL
anjalirajganja/hostel
/db.sql
UTF-8
875
3.515625
4
[]
no_license
drop db if exists hostel_allocation; create db hostel_allocation; use hostel; create table student( name varchar(50) not null, admission_no varchar(50) , primary key(admission_no), year int not null, email varchar(50), distance int not null, mark int not null, caste varchar(50) not null, f...
true
69bf96a34cf1b90bd335c1251e9a7b51bb6b3763
SQL
beCharlatan/gu_ai
/mysql/task12/procs.sql
WINDOWS-1251
388
3.03125
3
[]
no_license
use spotify_clone; drop procedure if exists get_sample_data; delimiter // -- 10 , create procedure get_sample_data (tbl_name varchar(50)) begin set @sql := CONCAT('select * from ', tbl_name,' limit 10'); prepare stmt from @SQL; execute stmt; deallocate prepare stmt; end delimiter ;
true
50a13421aab9e3fc3908b121bd32b318a30d1b41
SQL
medy13/dbshell
/normal_shell/MNLBAK_IM_FASCICLE_LIST.sql
UTF-8
737
2.609375
3
[]
no_license
\echo ------------------MNLBAK_IM_FASCICLE_LIST---------------- select now(); \timing insert into MNLBAK_IM_FASCICLE_LIST_GPTMP (CMD_TYPE,FASCICLE_NO, CONTR_ITEM) select CMD_TYPE,FASCICLE_NO, CONTR_ITEM from MNLBAK_IM_FASCICLE_LIST_INC_EXT; delete from MNLBAK_IM_FASCICLE_LIST using MNLBAK_IM_FASCICLE_LIST_GPTMP where ...
true
22383919e78dc7f78fa35048f4655cc0efe6b9f4
SQL
elmasoki/xt_scripts
/runstats/sysstats.sql
UTF-8
2,075
3.34375
3
[]
no_license
prompt &_C_REVERSE *** Show stats delta through specified interval &_C_RESET accept _statmask prompt 'Enter statmask: ' accept _tinterval prompt 'Enter interval(sec): ' accept _delta prompt 'Enter delta miniminum: ' set serverout on; declare a ku$_ErrorLines; b ku$_ErrorLines; nformat constant varchar2(30):='...
true
5e78e6348044fb0570a142acd00f77c6939ac271
SQL
usmanchaudhri/word-game-service
/src/main/resources/migrations/V1__Create_game_table.sql
UTF-8
617
2.9375
3
[]
no_license
-- -- Name: category; Type: TABLE; Schema: public; Owner: test; Tablespace: -- create table GAME ( game_id bigint not null, created_on timestamp, updated_on timestamp, primary key (game_id) ); create table WORD ( word_id bigint not null, name varchar(255) not null, score bigint not null, ...
true
8a16bc7f98fe295a855a9d0536da7bf1b72ace2a
SQL
scty11/SQL
/SQLQuery/MergeDemo.sql
UTF-8
958
3.84375
4
[]
no_license
CREATE TABLE dbo.[Target] ( EmployeeID int, EmployeeName varchar(20), CONSTRAINT Target_PK PRIMARY KEY (EmployeeID) ); CREATE TABLE dbo.[Source] ( EmployeeID int, EmployeeName varchar(20), CONSTRAINT Source_PK PRIMARY KEY (EmployeeID) ); INSERT INTO dbo.[Target] VALUES (100, 'Karin') ,(101, 'Donna') ,(102...
true
de18670590bfe91fb53601ac5ed93cf42632629e
SQL
JohabBenicio/criacaojb
/jbkill_lock.sql
UTF-8
1,361
3.109375
3
[]
no_license
-- ----------------------------------------------------------------------------------- -- Autor : Johab Benicio de Oliveira. -- Descrição : Identificar lock e matar os mesmos. -- Nome do arquivo : jbkill_lock.sql -- Data de criação : 01/07/2014 -- -----------------------------------...
true
4640e49ed847e12ce8ebfbe727562e9029cc2824
SQL
apeksha-mahale/java-lab-programs
/lab progs java/5.swingjdbc/test.sql
UTF-8
2,145
3.265625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.7.0 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: May 14, 2017 at 04:58 PM -- Server version: 10.1.21-MariaDB -- PHP Version: 5.6.30 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OL...
true
9193dae175c9627ffdd7007aa3d405af79258347
SQL
Wyqq-kerio/West2Exam3
/sql.sql
UTF-8
477
2.734375
3
[]
no_license
DROP DATABASE db; CREATE DATABASE IF NOT EXISTS db; CREATE TABLE country( iso INT, continent VARCHAR(20), capital_city VARCHAR(20), life_expectancy DOUBLE, abbreviation VARCHAR(10), confirmed INT, population INT, sq_km_area INT, recovered INT, elevation_in_meters VARCHAR(10), location VARCHAR(50),...
true
4b8f6bfa3e50db54598c2eb6474c34c1f39ec8dc
SQL
Gich-a/ETL-DesignPatterns
/ETL-DesignPatterns/Databases/Staging/Stage/Tables/ProductDimension.sql
UTF-8
955
2.609375
3
[]
no_license
CREATE TABLE [Stage].[ProductDimension] ( [ProductDimensionSk] INT NOT NULL, [SKU] VARCHAR (1) NULL, [ProductName] VARCHAR (100) NULL, [ProductDescription] VARCHAR (100) NULL, [ProductType] VARCHAR (100) NULL, [ProductSubtype] VARCH...
true
61bab4dbb828cce0fc9016731d3950ca392c2367
SQL
rachelf0/jackinthebox
/db/seeds.sql
UTF-8
529
2.828125
3
[]
no_license
INSERT INTO departments (dept_name) VALUES ('Engineering'), ('Sales'), ('Marketing'), ('HR'); INSERT INTO roles (role_title, salary, department_id) VALUES ('Senior Engineer', 125000, 1), ('Sales Executive', 60000, 2), ('Senior Communications', 68000, 3), ('Payroll Director', 80000, ...
true
05883230f9f5c6f29a42d9787e824086307a9ebb
SQL
Ensembl/ensembl-variation
/sql/patch_31_32.sql
UTF-8
7,303
3.796875
4
[ "Apache-2.0" ]
permissive
-- Copyright [1999-2015] Wellcome Trust Sanger Institute and the EMBL-European Bioinformatics Institute -- Copyright [2016-2023] EMBL-European Bioinformatics Institute -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may ob...
true
9f154eda7aba1e14b1be15bdb79458da91dfd104
SQL
cdesmarais/WebDB-Test
/WebDB/StoredProcedures/Common/dbo.AdminPromosPages_ListForDomain.PRC
UTF-8
736
3.671875
4
[]
no_license
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[AdminPromosPages_ListForDomain]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) drop procedure [dbo].[AdminPromosPages_ListForDomain] GO CREATE PROCEDURE dbo.AdminPromosPages_ListForDomain ( @Domain_ID int ) As SET NOCOUNT ON SET TRANSACTION ISOL...
true
6f5f0ed9ee1f43b8bc28181fc003d35619e10c3d
SQL
rmahbub63/PharmacyManagement
/pharmacy_one.sql
UTF-8
6,766
3.09375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.6.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Apr 15, 2017 at 10:20 AM -- 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
aaf859e4241b6e8100e8c2c68e01f06ce01fc9c4
SQL
EngrSaad2/Banking_System
/bank_management.sql
UTF-8
3,059
3.21875
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.6.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Mar 22, 2017 at 04:10 AM -- 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
692fd28e32b93e30d8957cdd437e847ed66de350
SQL
cvikupitz/Cracking-the-Coding-Interview
/chapter_14/14-2.sql
UTF-8
442
3.84375
4
[]
no_license
/* * 14-2.sql * * Book solution to exercise 14-2 from Cracking the Coding Interview, 6th Edition. * */ SELECT BuildingName, ISNULL(Count, 0) AS 'Count' FROM Buildings LEFT JOIN (SELECT Apartments.BuildingID, COUNT(*) AS 'COUNT' FROM Requests INNER JOIN Apartments ON Requests.AptID = Apartments.AptID WH...
true
006ea9dfd203baed119b461048129d1a9ee6bd47
SQL
kiyomizuhi/sql_recipe
/script/ch03_02/query_02.sql
UTF-8
218
2.828125
3
[]
no_license
SELECT year , q1 , q2 , CASE WHEN q1 < q2 THEN '+' WHEN q1 = q2 THEN '=' ELSE '-' END AS judge_q1_q2 , SIGN(q2 - q1) AS sign_q1_q2 FROM quarterly_sales ORDER BY year ;
true
bccb031bd312c2667412450f840ab05267a85652
SQL
wp306357/springboot-swagger-mybatis-druid
/src/main/resources/import.sql
UTF-8
4,421
3.484375
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : localhost Source Server Version : 50549 Source Host : localhost:3306 Source Database : test Target Server Type : MYSQL Target Server Version : 50549 File Encoding : 65001 Date: 2017-09-24 17:20:14 */ SET FOREIGN_KEY_CHECKS=0; -- ----...
true
4518e6f24941e3df0b8eb820ebb046a87f9621ad
SQL
seminar20173cs1/StockMarket
/StockMarket/StockMarket.sql
UTF-8
2,278
3.734375
4
[]
no_license
Create Database StockMarket use StockMarket Create table Province ( ProvinceID int not null, ProvinceName nvarchar(30) Constraint pk_ProvinceID primary key(ProvinceID) ) Create table District ( DistrictID int not null, DistrictName nvarchar(30), ProvinceID int, Constraint pk_DistrictID Primary key(D...
true
43de25f60d88b8e52524a4e4bd409ba766968811
SQL
barrowjacob/tomcat_sandbox
/src/main/java/classes/users.sql
UTF-8
284
3.125
3
[]
no_license
USE chl; CREATE TABLE users( id INT NOT NULL AUTO_INCREMENT, class_id INT UNSIGNED NOT NULL, first_name VARCHAR(25), last_name VARCHAR(50), phone_number VARCHAR(30), email VARCHAR(50), PRIMARY KEY(id), FOREIGN KEY(class_id) REFERENCES classDates (id) )
true
b7187103d721699e21b04f602e49151bc0c91543
SQL
EMOGYifanWang/WeChongYou_last_test
/BLOG/blog.sql
UTF-8
4,048
3.375
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : root,passwordroot Source Server Version : 50719 Source Host : localhost:3306 Source Database : blog Target Server Type : MYSQL Target Server Version : 50719 File Encoding : 65001 */ SET FOREIGN_KEY_CHECKS=0; -- ----...
true
0a0b35d28cb4ef98810b20f1382dd4e2bafbb2f2
SQL
omaralhoori/Ecommerce-PHP
/_shop.sql
UTF-8
9,879
3.09375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Apr 26, 2019 at 05:05 AM -- Server version: 10.1.37-MariaDB -- PHP Version: 7.3.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
true
c57a9f601f6ad26c94b1eed58eeca20385331a96
SQL
JakubKr001/BazyDanych
/__Projekt/Drukarnia.sql
UTF-8
5,860
3.328125
3
[]
no_license
-- MySQL Workbench Forward Engineering SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0; SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0; SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SU...
true
5b6bd493f6a26b427261b175d1005152f50957ac
SQL
sheting/chainnova-deployment
/mysql/add_user.sql
UTF-8
356
2.6875
3
[]
no_license
use mysql; #cabinet:用户名 %:从任何主机都可登录 password:密码 create USER 'cabinet'@'%' IDENTIFIED BY 'password'; #删除用户 #delete from user where user='bdh-v1'; #重新加载授权表 #flush privileges; #all:database的所有权限 chainnova:database名 cabinet:用户名 grant all on `chainnova`.* to 'cabinet'@'%';
true
2126629e6eca22ef9ee1b9eeaef92b9a182a6c3d
SQL
epaii/epii-admin-project-composer
/src/data/update_sql/2020051602.sql
UTF-8
326
2.96875
3
[]
no_license
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; ALTER TABLE `epii_setting` ADD `addons_id` INT NOT NULL DEFAULT '0' AFTER `uid`, ADD INDEX (`addons_id`); ALTER TABLE `epii_setting` DROP INDEX `name`, ADD UNIQUE `name` (`name`, `uid`, `addons_id`) USING BTREE; C...
true
0d81542761980670a21518507211fcfd37d31740
SQL
ClasseANet/VBProject
/Projeto3R/Script/Manut/Man00.sql
ISO-8859-1
797
4
4
[]
no_license
--DELETE FROM FLAN WHERE IDLAN IN (17,18,37,53,54,62,75,164,176,183,201,212) select * from FLAN F where rtrim(cast(F.IDVENDA as char)) + '-' + rtrim(cast(F.IDPGTO as char)) in ( SELECT rtrim(cast(F2.IDVENDA as char)) + '-' + rtrim(cast(F2.IDPGTO as char)) FROM FLAN F2 GROUP BY F2.IDVENDA, F2.IDPGTO HAVING COUNT(*) >1...
true
f819cb48e4288adb288055f4c38bd05c8708c816
SQL
jabautista/GeniisysSCA
/src/main/resources/sql/procedures/validate_installment_pack.prc
UTF-8
3,769
3.375
3
[]
no_license
DROP PROCEDURE CPI.VALIDATE_INSTALLMENT_PACK; CREATE OR REPLACE PROCEDURE CPI.VALIDATE_INSTALLMENT_PACK(p_pack_par_id GIPI_PARLIST.par_id%TYPE, p_message OUT VARCHAR2) IS inv_tot_premamt gipi_winvoice.prem_amt%TYPE; inv_tot_taxamt gipi_winvoice.tax_amt%TYPE; ins_tot_premamt gipi_winstallment.prem_...
true
94360a7c0f0384580769fa874261fba6e7e50aeb
SQL
codeinabox/grocery-list
/database/schema.sql
UTF-8
1,522
2.765625
3
[]
no_license
# ************************************************************ # Sequel Pro SQL dump # Version 5438 # # https://www.sequelpro.com/ # https://github.com/sequelpro/sequelpro # # Host: 0.0.0.0 (MySQL 8.0.15) # Database: grocerylist # Generation Time: 2019-03-31 11:58:13 +0000 # ********************************************...
true
31ffaf9369be9ad3930c7e13b5f065d2c50aebb1
SQL
rovskyhp/covegusa
/db/covegusa_db.sql
UTF-8
2,102
3.015625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.1.8 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Jun 22, 2014 at 12:54 AM -- Server version: 5.5.36-cll -- PHP Version: 5.4.23 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT ...
true
f6c09b658d50420a3674bed0743f7b2a77954285
SQL
fikriauliya/tanoshi
/tanoshi/src/migration/2.sql
UTF-8
541
3.78125
4
[ "MIT" ]
permissive
--- Convert authos from csv to json array UPDATE manga SET author = ( SELECT authors FROM ( WITH split(id, word, str) AS ( SELECT id, '', author || ',' FROM manga UNION ALL SELECT id, substr(str, 0, instr(str, ',')), substr(str, instr(str, ',')+1) FROM split WHERE str!='' ) SELECT id,...
true
8fd2feb53f22d69dd04f786ff2a7b79ce4d4abea
SQL
18918090402/MZJF_Work
/MZJF_Work/0002 Git.nonobank.com/archive_20180806/bi-etl.git/03_DW_HADOOP/02_IDW/03_SCRIPT/USER_TAG_HIST/script_old/IDW_FACT_USER_TAG_11.sql
UTF-8
2,876
3.40625
3
[]
no_license
set mapreduce.job.queuename=etl-dw; set mapreduce.job.name=IDW_FACT_USER_TAG_11_01; set hive.groupby.skewindata = true ; set hive.map.aggr = true ; set hive.enforce.bucketing = true; set hive.exec.parallel=true; set hive.exec.dynamic.partition=true; set hive.exec.dynamic.partition.mode=nonstrict; set hive.exec.max....
true
1c2c333400c5f7c575ea2981f6aacaf51f919f0c
SQL
bmbln/CEU_DE1_course
/Term_Project_1/data_and_queries/ETL_postcards_dw.sql
UTF-8
8,786
4.28125
4
[]
no_license
USE postcards; DROP PROCEDURE IF EXISTS postcards_dw; DELIMITER $$ CREATE PROCEDURE postcards_dw() BEGIN -- unfortunately the stored procedures can't take table names as parameters, therefore the cleaning has to be executed for each eBay table... -- clean and aggregate on original order level: German eBay DROP TAB...
true
606aaf5396e4f84bb848de9f6e9bfa60249bcff7
SQL
moojigae/DB_TIL
/11_SYNONYM.sql
UHC
1,124
3.71875
4
[]
no_license
-- Ǿ(SYNONYM) : ٸ DB ü Ȥ Ӹ -- Ǿ Ͽ ϰ ֵ -- Ǿ : ü ο ڰ Ǿ ش ڸ CREATE SYNONYM EMP FOR EMPLOYEE; -- insufficient privileges GRANT CREATE SYNONYM TO KH; -- SYSTEM SELECT * FROM EMPLOYEE; SELECT * FROM EMP; --EMP ص ϰ -- Ǿ : ִ (DBA) Ǿ -- ڰ SELECT * FROM KH.EMPLOYEE...
true
f7e0de962a65add3f74228f237474ea9d977744f
SQL
HifzonHifzon/pgn_mudik
/db_pgn.sql
UTF-8
8,926
3.03125
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Waktu pembuatan: 11 Okt 2020 pada 09.43 -- Versi server: 10.4.14-MariaDB -- Versi PHP: 7.2.33 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@C...
true
38a01011b755d59cb852ec3f85a0b483b8da2d5e
SQL
Xilis/super-duper-enigma
/setup/createdb.sql
UTF-8
2,905
4.03125
4
[]
no_license
CREATE SCHEMA actionhero; CREATE TABLE actionhero.customer ( id BIGINT PRIMARY KEY GENERATED ALWAYS AS IDENTITY, created_at timestamptz DEFAULT NOW() NOT NULL ) PARTITION BY RANGE (id); CREATE TABLE actionhero.game ( id BIGINT PRIMARY KEY GENERATED ALWAYS AS IDENTITY, created_at time...
true
05d7619a6f30aa4e1f0374c68f441b8c047fca9d
SQL
dmarkwell/snomed-moodle-additional-plugins
/sql/procedures/procedure_PresentationHistoryUpdate.sql
UTF-8
6,941
3.59375
4
[ "Apache-2.0" ]
permissive
DELIMITER ;; DROP PROCEDURE IF EXISTS `PresentationHistoryUpdate`;; CREATE PROCEDURE `PresentationHistoryUpdate`(IN `p_resetStartYear` varchar(6) CHARACTER SET 'utf8mb4') begin DECLARE `v_startDate` bigint(10); DECLARE `v_endDate` bigint(10); DECLARE `v_period` varchar(6); DECLARE `v_now` DATE; DECLARE `v_p...
true
d4a28949a56303bfd52fd454a8819b17f8f1dc35
SQL
jjdaurora/stopify
/seeds.sql
UTF-8
1,448
2.671875
3
[]
no_license
SELECT * FROM users; INSERT INTO users (user_name, user_email, spotify_id, user_image, user_subscription) VALUES ("Steve", "stuff@emil.com", "1", "picture", "stuff"), ("Roger", "thing@emil.com", "2", "pictureA", "thing"), ("Sam", "hi@email.com", 3, "pictureB", "hi"); SELECT * FROM music; INSERT INTO ...
true
e6df6cc992f2e2c45e43b42086db4f6928e062d4
SQL
uesleipedro/escola-de-musica-api-nodejs
/emusic-postgres.sql
UTF-8
5,561
3.234375
3
[]
no_license
DROP TABLE "aluno" CASCADE; CREATE TABLE "aluno" ( "id" Serial NOT NULL, "nome" VARCHAR NULL, "matricula" INTEGER NOT NULL DEFAULT NULL, "dt_nascimento" DATE NULL DEFAULT NULL, "cpf" VARCHAR NULL DEFAULT NULL, "rg" VARCHAR NULL DEFAULT NULL, "sexo" VARCHAR NULL DEFAULT NULL, "te...
true
0460c3e816c01af41ea0963dccb17a6eba9f98b1
SQL
elitsaleontieva/Databases-Basics-MS-SQL-Server
/Functions and Procedures/02. Employees with Salary Above Number.sql
UTF-8
147
2.828125
3
[]
no_license
CREATE PROC usp_GetEmployeesSalaryAboveNumber ( @SALARY DECIMAL(18,4)) AS BEGIN SELECT FirstName,LastName FROM Employees WHERE Salary>=@Salary END
true
3f2e7c0fcb04a971009e3bebc910dd869118c720
SQL
gabganda926/capstone-1
/scripts 7717.sql
UTF-8
8,747
3.46875
3
[ "MIT" ]
permissive
CREATE DATABASE Cimis; USE CIMIS; CREATE TABLE tbl_address ( add_ID INT NOT NULL IDENTITY(1,1), add_blcknum varchar(10), add_street varchar(20), add_subdivision varchar(20), add_brngy varchar(20), add_district varchar(20), add_city varchar(20), add_province varchar(20), add_region varchar(11), add_zipcode v...
true
b548fe5c5a2b0819269979d314f13c144cc7bffe
SQL
azfar-imtiaz/Flask-Web-Development
/Project1/schema.sql
UTF-8
755
3.953125
4
[]
no_license
PRAGMA foreign_keys=OFF; BEGIN TRANSACTION; CREATE TABLE Users ( UserID INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, Email VARCHAR(50) NOT NULL, Password VARCHAR(50) NOT NULL, Username VARCHAR(30) ); CREATE TABLE Lists ( ListID INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, UserID INTEGER, ListName VARCHAR(30) NOT NULL, FO...
true
6151b014243bf3472d4cf7aaa118a7b70403b031
SQL
yysofiyan/PABWEB-D
/A2.1800137/mardira/db/db.sql
UTF-8
2,308
3.21875
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
/* SQLyog Professional v12.09 (64 bit) MySQL - 10.1.19-MariaDB : Database - mardira ********************************************************************* */ /*!40101 SET NAMES utf8 */; /*!40101 SET SQL_MODE=''*/; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREI...
true
ac362875851ab7aa1d0587b2bb8c40c576300e1e
SQL
iagobontempo-study/Study-WebComplete
/banco-relacional/inserirEstadosPorID.sql
UTF-8
379
2.859375
3
[]
no_license
-- Inserindo estado colocando setando um ID insert into estados (id, nome, sigla, regiao, populacao) values(1000, 'Novo', 'NV', 'Sul', 2.54) -- Ao inserir outro item (sem usar o id), ele usará o ultimo id da lista como parametro, -- ou seja o proximo a ser colocado terá o id 1001 insert into estados (nome, sigla, reg...
true
f3748924111e3628a33a465cddab3bb7c20a46f6
SQL
bartcc/app.datastore
/datastore_default.sql
UTF-8
12,814
3
3
[]
no_license
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; -- -- Datenbank: `datastore` -- -- -------------------------------------------------------- -- -- Tabellenstruktur für Tabelle `acos` -- DROP TABLE IF EXISTS `acos`; CREATE TABLE `acos` ( `id` int(10) NOT NULL auto_increment, `parent_id` int(10) default NULL, `model` varc...
true
c5858743467463a6d4c6d37d8a4454e7c762aa61
SQL
batego/Soporte_Fintra
/Support/anular CXP_R0036349 - DIana Arias.sql
UTF-8
2,276
3.234375
3
[]
no_license
--------------------- --ANular CXC fintra --------------------- SELECT * FROM con.factura WHERE documento = 'R0036349'; SELECT * FROM con.factura_detalle WHERE documento = 'R0036349'; --Se Se borra contablemente la R0036349 CREATE TABLE tem.R0036349_cab_comp AS SELECT * FROM con.comprobante WHERE numdoc = 'R0036...
true
0285fde2861e1794074bc9d725f2271b0e3f80a9
SQL
datagrok-ai/public
/packages/DevTools/queries/test-history.sql
UTF-8
1,646
3.953125
4
[ "LicenseRef-scancode-unknown-license-reference", "MIT" ]
permissive
--name: TestHistory --connection: System:Datagrok --input: string packageName {nullable :true} --input: string category {nullable :true} --input: string test {nullable :true} select e.event_time as date, case when v4.value::bool then 'skipped' when v1.value::bool then 'passed' else 'failed' end as status, v3.value::int...
true
7db9c3603230229938c70e9a0abe570a14208290
SQL
fnordian/tokla
/conf/evolutions/default/2.sql
UTF-8
434
2.78125
3
[]
no_license
# --- !Ups UPDATE token SET CLAIMEDBY=NULL WHERE CLAIMEDBY=''; UPDATE tokenapplicant SET applicantname=NULL WHERE applicantname not in (select distinct id from user); ALTER TABLE TOKENAPPLICANT ADD FOREIGN KEY ( APPLICANTNAME ) REFERENCES USER ( ID ); UPDATE token SET claimedby=NULL WHERE claimedby not in (select...
true
ea9c43c7627daba45a0f8e68908ca1c37b611c61
SQL
SilentLongbow/Everyware
/conf/test/original/evolutions/default/4.sql
UTF-8
16,248
2.6875
3
[ "CC0-1.0" ]
permissive
/* * Script to emulate user interaction. This is the forth level for population. */ # --- !Ups INSERT INTO `achievement_tracker` (`id`, `points`, `owner_id`, `current_streak`) VALUES (1, 0, 1, 0), (2, 0, 2, 0), (3, 0, 3, 0), (4, 0, 4, 0), (5, 0, 5, 0), (6, 0, 6, 0), (7, 99, 7, 3), (8, 999, 8, 6), (9, 9999, 9, 30), (...
true
c7ab0366cd6822c44c818c39e4c687c7e387e73a
SQL
phacility/phabricator
/resources/sql/patches/018.owners.sql
UTF-8
765
2.921875
3
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
CREATE TABLE {$NAMESPACE}_owners.owners_package ( id int unsigned not null auto_increment primary key, phid varchar(64) binary not null, unique key(phid), name varchar(255) COLLATE `binary` not null, unique key(name), description text not null, primaryOwnerPHID varchar(64) binary ); CREATE TABLE {$NAMESP...
true
7c26b85d3182164cee619dd974ab1a668abfcd77
SQL
sqitchers/sqitch
/lib/App/Sqitch/Engine/Upgrade/snowflake-1.0.sql
UTF-8
1,229
3.421875
3
[ "MIT" ]
permissive
CREATE TABLE &registry.releases ( version FLOAT PRIMARY KEY, installed_at TIMESTAMP_TZ NOT NULL DEFAULT current_timestamp, installer_name TEXT NOT NULL, installer_email TEXT NOT NULL ); COMMENT ON TABLE &registry.releases IS 'Sqitch registry r...
true
474cdff1725c6a336634dd6dda965cffe7d6eac5
SQL
imavishek/StairSupplies
/db/sp/spShipmentItemUpdateQuantity.sql
UTF-8
1,540
3.796875
4
[]
no_license
DELIMITER $$ DROP PROCEDURE IF EXISTS `spShipmentItemUpdateQuantity` $$ CREATE PROCEDURE `spShipmentItemUpdateQuantity`( IN `OrderShipmentItemsID` INT, IN `quantityToShip` DECIMAL(10,2), IN `BoxSkidNumber` VARCHAR(100) ) DETERMINISTIC MODIFIES SQL DATA SQL SECURITY INVOKER ...
true
0a174bb178f06b4924241f2f39c21da37dd31b3c
SQL
altamira/visualstudio
/Sistema de Informação Altamira/EGISSQL.Database/dbo/Views/vw_requisicao_viagem_composicao.sql
UTF-8
1,622
3.078125
3
[]
no_license
 CREATE VIEW vw_requisicao_viagem_composicao ------------------------------------------------------------------------------------ --sp_help vw_requisicao_viagem_composicao ------------------------------------------------------------------------------------ --GBS - Global Business Solution ...
true
101518bfaf48b40bb83bc0306e56820ea4c1f4f4
SQL
philippe-jonathan/cnard
/canard.sql
UTF-8
2,173
3.25
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.6.6deb5 -- https://www.phpmyadmin.net/ -- -- Client : localhost -- Généré le : Ven 17 Août 2018 à 13:35 -- Version du serveur : 5.7.23-0ubuntu0.18.04.1 -- Version de PHP : 7.2.7-0ubuntu0.18.04.2 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OL...
true
853abdbcdcc4578e7edad8cf17699250be871850
SQL
tianao-meng/Database
/A2/chess/second_chess.sql
UTF-8
643
2.703125
3
[]
no_license
SET FOREIGN_KEY_CHECKS=0; DROP TABLE IF EXISTS `Second_chess`; -- show warnings; CREATE TABLE `Second_chess` ( `Game_ID` varchar(100), `Rated` varchar(100), `Start_time` varchar(100), `End_time` varchar(100), `Number_of_Turns` int, `Game_Status` varchar(100), `Winner` varchar(100), `Time_Increment` varc...
true
d49be7f42f094bcafa81a8b9e1d4c1e0345e7581
SQL
ronchua001/node.js-assignment
/javascript/database/DDL.sql
UTF-8
2,354
4.1875
4
[]
no_license
CREATE TABLE IF NOT EXISTS Teachers ( email VARCHAR(45) NOT NULL, name VARCHAR(45) NOT NULL, PRIMARY KEY (email) ); CREATE TABLE IF NOT EXISTS Students ( email VARCHAR(45) NOT NULL, name VARCHAR(45) NOT NULL, PRIMARY KEY (email) ); CREATE TABLE IF NOT EXISTS Classes ( classCode CHAR(5) NOT NULL, name...
true
d6daec43bc8247df35a82cdb792f8048be957099
SQL
ggarciajr/flora
/migrations/V2__create_free_session_table.sql
UTF-8
392
3.625
4
[]
no_license
create table free_sessions ( id serial primary key, ident varchar(6) not null, user_id int4 not null references users (id) on delete cascade, created_at timestamp not null default current_timestamp, unique (ident), unique (user_id) ); create index free_sessions_user_id_unique_idx on free_sessions (user_id)...
true
43ccb6607f765d18bd63faa0efd1dd29abd93774
SQL
binbjz/hdp-sentry
/src/test/resources/hive-sql/GroupLogin-sql/prepareGroupLogin_ba_ups.sql
UTF-8
880
2.53125
3
[]
no_license
CREATE TABLE `ba_ups.mt_dp_uid_mapping_new`( `mt_uid` bigint COMMENT '美团userid', `dp_uid` bigint COMMENT '点评userid', `mobile` bigint COMMENT '对应手机号') COMMENT '通过手机号关联的美团点评uid映射表' ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' WITH SERDEPROPERTIES ( 'field.delim'='\t', 'line.delim'='\n', '...
true
39fe9250be4e4051d44006b83f4406a8fd9a9a46
SQL
bencalabrese/orm_practice
/import_db.sql
UTF-8
1,827
3.875
4
[]
no_license
DROP TABLE IF EXISTS users; CREATE TABLE users ( id INTEGER PRIMARY KEY, fname VARCHAR(255) NOT NULL, lname VARCHAR(255) NOT NULL ); DROP TABLE IF EXISTS questions; CREATE TABLE questions ( id INTEGER PRIMARY KEY, title VARCHAR(255) NOT NULL, body TEXT NOT NULL, user_id INTEGER NOT NULL, FOREIGN KEY...
true
14b9ecbbe233f685b05fa54a1ee6c5c1ddf4e9fd
SQL
alexwennerberg/drive-adv
/sql/create_filetree.sql
UTF-8
1,937
4.375
4
[ "MIT" ]
permissive
/* WARNING -- this is destructive */ /* Add the root value to Google Drive */ /* NOTE -- this will not work for shared drives yet */ DROP TABLE if exists filetree; CREATE TABLE filetree ( file_id varchar(255), path ltree ); create index if not exists tree_path_idx on filetree using gist (path); /* Add all roo...
true
c75eab5b2fd4bf7d0af691b0e7ac8aad28a40e20
SQL
Olga1302G/bootRest
/src/main/resources/database.sql
UTF-8
1,334
3.96875
4
[]
no_license
-- Table: users CREATE TABLE users ( id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, name VARCHAR(255) NOT NULL, lastname VARCHAR(255) NOT NULL, age INT NOT NULL, username VARCHAR(255) NOT NU...
true
4af6f89fb574888d3e2ac6470ee2463ebad5536b
SQL
scchess/LabKey
/server/customModules/onprc_ehr/resources/queries/study/DrugsActive.sql
UTF-8
958
2.5625
3
[]
no_license
/* * Copyright (c) 2017 LabKey Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicab...
true
16f05bd9539dbaa48d282752d3e5758e40258210
SQL
RostJunior/sql2
/emily2.sql
UTF-8
3,024
3.5
4
[]
no_license
DROP DATABASE IF EXISTS emily; CREATE DATABASE emily; USE emily; CREATE TABLE IF NOT EXISTS type ( idType INT UNSIGNED NOT NULL AUTO_INCREMENT, nameType VARCHAR(30), PRIMARY KEY (idType)); CREATE TABLE IF NOT EXISTS product ( idProduct INT UNSIGNED NOT NULL AUTO_INCREMENT, nameProduct VARCHAR(50), p...
true
2a44d904485a0492f7d31878cb16e0dccb3e7842
SQL
pradosh2008/cloudproject
/ProjectWork/gcp-project/mayload/dim_offer_treatment.sql
UTF-8
2,310
3.484375
3
[]
no_license
--/********************************************************************* --* --* Script Name: DIM_OFFER_TREATMENT table creation and data population --* Changed the Offer Key logic-29/03 --**********************************************************************/ --/* --md5(concat('JUS|', t.treatment_code)) as TREATMENT_...
true
fb302877d0d84f4f93db29ac01d2682a53e80c08
SQL
MuhammadTamzid/go-gin-jwt-authorization-example
/docs/sql/schema.sql
UTF-8
4,110
3.578125
4
[]
no_license
DROP SCHEMA IF EXISTS `online_course`; CREATE SCHEMA IF NOT EXISTS `online_course`; CREATE TABLE IF NOT EXISTS `online_course`.`roles` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `name` varchar(255) DEFAULT NULL, `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` timestamp NOT NULL DE...
true