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
3f7bf026040474fafe23e95c0a82b90410ed305a
SQL
progmax/PHPAuth-2.0
/database/MySQL.sql
UTF-8
3,097
3.453125
3
[]
no_license
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; -- -- Database: `phpauth2.0` -- -- -------------------------------------------------------- -- -- Table structure for table `activations` -- CREATE TABLE IF NOT EXISTS `activations` ( `uid` int(11) NOT NULL, `activekey` varchar(20) COLLATE utf8_bin...
true
5a83c8cee45ed1817d0f31a15c0db8794f0134e9
SQL
fandashtic/arc_chennai
/Sivabalan-SQL/SQL_STORED_PROCEDURE/sp_Get_ReconcileTax.sql
UTF-8
191
2.84375
3
[]
no_license
Create Procedure sp_Get_ReconcileTax (@TaxRate Decimal(18,6)) As Begin Select Max(Tax_Code) Tax_Code From Tax Where isnull(Percentage,0) = @TaxRate and isnull(GSTFlag,0) = 0 End
true
5995bfb48522e12afec637d2d4dd1fb72fe5bc04
SQL
Diegoferreiradev/Oracle_PL-SQL
/Capítulo 13/Secao_21.sql
UTF-8
3,904
4.21875
4
[]
no_license
-- CREATE OR REPLACE FUNCTION CONSULTA_PRECO (pCod_Curso NUMBER) RETURN NUMBER AS vValor NUMBER; BEGIN SELECT valor INTO vValor FROM TCurso WHERE cod_curso = pCod_Curso; RETURN(vValor); END; / --Teste | Usando function DECLARE vCod NUMBER := &codigo; vValor NUMBER; BEGIN vValor := consulta_preco(vCod); ...
true
89eb078b309f0ddb36319e1b92089c210e0372a2
SQL
zdergatchev/Database-Basic
/08 Data Agregation Exercises/05. Deposits Sum.sql
UTF-8
162
2.78125
3
[ "MIT" ]
permissive
USE `gringotts`; SELECT `deposit_group`, SUM(w.`deposit_amount`) AS 'total_sum' FROM `wizzard_deposits` AS w GROUP BY w.`deposit_group` ORDER BY `total_sum` ASC;
true
5683fa63a50ca1c21a65f8fe58750ce680c7255d
SQL
ua-eas/ksd-kc5.2.1-foundation
/src/main/config/sql/log/Release_2_0_logs/KCIRB-408.sql
UTF-8
542
3.0625
3
[]
no_license
ALTER TABLE QUESTION RENAME COLUMN ANSWER_DATA_TYPE TO QUESTION_TYPE_ID; ALTER TABLE QUESTION MODIFY QUESTION_TYPE_ID NUMBER(12,0); CREATE OR REPLACE VIEW OSP$QUESTION AS SELECT A.QUESTION_ID, A.QUESTION, A.MAX_ANSWERS, A.VALID_ANSWER, A.LOOKUP_NAME, B.QUESTION_TYPE_NAME AS ANSW...
true
9c53555ef1a0d32ea5c08154ae3dacbfb56c9f11
SQL
MarianoFrancisco/prac1progra2
/Manuales/Manual Técnico/practica1progra2.sql
UTF-8
3,806
3.65625
4
[]
no_license
CREATE DATABASE practica1Progra2; CREATE USER 'muebleria'@'localhost' IDENTIFIED BY 'Mueble12345'; GRANT USAGE,INSERT,DELETE,UPDATE,SELECT ON practica1progra2.* TO 'muebleria'@'localhost'; USE practica1Progra2; CREATE TABLE usuario( nombre_usuario VARCHAR(45) NOT NULL, contraseña VARCHAR(12) NOT NULL, tipo INT...
true
180da46d75e06694397bf759386314950354918a
SQL
Kaushal-99/Student-Registration-portal
/database/student_registration (1).sql
UTF-8
7,989
2.9375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.9.0.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Sep 22, 2019 at 04:02 PM -- Server version: 10.3.16-MariaDB -- PHP Version: 7.1.30 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @...
true
9135bae921148734f53b94e7d6fa582aafd2fbcd
SQL
JustAnotherUserLoL/LBD
/Práctica 6/QueryPract6.sql
UTF-8
2,138
3.65625
4
[]
no_license
use Practica6; select * from Arenas order by idArena; select * from Artistas order by idArtista; select Arenas.idArena, Arenas.Arena, Artistas.idArtista, Artistas.ArtistaBanda from Arenas inner join Artistas on Arenas.idArena = Artistas.idArtista order by idArena; select Precios.idPrecio, Precios.idArtista, Artistas...
true
1022a10178b3af882ac7aa5b996ee9b3421fd4b6
SQL
ProgRB/SalProject
/AddRetention/Queries/Distribution/SelectOrderForReplace.sql
UTF-8
480
3.171875
3
[]
no_license
declare begin open :c1 for select distinct order_id, order_name from salary.salary_addition join {0}.orders using (order_id) where calc_date=trunc(:p_date,'month') order by order_name; open :c2 for select order_id, order_name||case when order_book_id is not null then '(книга заказов)' end order_name from ap...
true
b23428acc795422a048337ec8c2b72dae386c9bd
SQL
marate/myjavarepo
/norris_data.sql
UTF-8
1,285
3.234375
3
[]
no_license
DROP TABLE IF EXISTS Quotes,Authors; CREATE TABLE IF NOT EXISTS Authors(Id INT PRIMARY KEY AUTO_INCREMENT, Name VARCHAR(25)) ENGINE=InnoDB; CREATE TABLE IF NOT EXISTS Quotes(Id INT PRIMARY KEY AUTO_INCREMENT, AUTHORId INT, Quote VARCHAR(100), FOREIGN KEY(AuthorId) REFERENCES Authors(Id) ON DELETE CASCADE) ...
true
8065c03c525c5509519ebe31c00aa5e2875e323b
SQL
iclavijos/msdb
/src/main/resources/db/migration/V0_20__Series_champions.sql
UTF-8
921
3.421875
3
[]
no_license
CREATE TABLE `msdb`.`series_drivers_champions` ( `driver_id` BIGINT(20) NULL, `series_edition_id` BIGINT(20) NULL, INDEX `fk_driver_champion_idx` (`driver_id` ASC), INDEX `fk_series_edition_champions_idx` (`series_edition_id` ASC), CONSTRAINT `fk_driver_champion` FOREIGN KEY (`driver_id`) REFERENCES `...
true
4d3eaa5dd6cee35f0f86a37ac3e4777659828385
SQL
lasanamilton/familyreunion
/src/sql/dump-familyreunion-202003240711.sql
UTF-8
6,912
2.96875
3
[]
no_license
-- MySQL dump 10.13 Distrib 5.5.62, for Win64 (AMD64) -- -- Host: 127.0.0.1 Database: familyreunion -- ------------------------------------------------------ -- Server version 5.7.29-0ubuntu0.18.04.1 /*!40101 SET @OLD_CHARACTER_SET_CLIENT = @@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS = @@CHA...
true
148498ecc51bd8b9b7051e3f6b77184183c56699
SQL
RafaelAPB/firefly
/db/migrations/ql/000011_create_events_table.up.sql
UTF-8
260
2.78125
3
[ "Apache-2.0" ]
permissive
CREATE TABLE events ( id string NOT NULL, etype string NOT NULL, namespace string NOT NULL, ref string, created int64 NOT NULL ); CREATE UNIQUE INDEX events_primary ON events(id);
true
930be32f02d196ef2aed70b734930354addb56e4
SQL
jxrlee/Swap
/SwapDB/swap_db_script.sql
UTF-8
917
3.5625
4
[]
no_license
CREATE TABLE users ( phone VARCHAR( 10 ) NOT NULL , premium BIT NOT NULL , startdate DATETIME , CONSTRAINT pk_users PRIMARY KEY ( phone ) ) engine=InnoDB; CREATE TABLE items ( id INT NOT NULL AUTO_INCREMENT, title VARCHAR( 50 ) ...
true
2aaca8df543d2bbc0817fbd0bfa517435ff4af65
SQL
Didikabdul1997/uksmkmh2019
/smkmh08/uksmkmh_08.sql
UTF-8
5,302
3.21875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.0.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Apr 10, 2019 at 02:55 AM -- Server version: 10.1.32-MariaDB -- PHP Version: 7.2.5 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @O...
true
0f625762354c8b21a2e14180eacb1ff76e672ec2
SQL
RAJALAKSHMIRAJKUMAR/EI
/ALL DOMAIN SP/EXPENSE/BIZ DAILY/SP_BIZDLY_HOUSEKEEPING_PAYMENT_UPDATE_VER_0.5_28022014.sql
UTF-8
1,944
3.59375
4
[]
no_license
-->version 0.5 -->start date:28/02/2014 end date:28/02/2014 -->issueno:754 --commentno:#36 --> DESC:CHANGING THE DATATYPE AND THE VALUE OF USERSTAMP DONE BY: BHAVANI.R -->version 0.4 -->start date:27/02/2014 end date:27/02/2014 -->issueno:754 --> repalce userstamp varchar to integer-->by: BALAJI.R -->version 0.3 -->st...
true
9590e273c8138428da8bbf21d38613271eecdce7
SQL
silence-do-good/stress-test-Postgres-and-MySQL
/dump/high/day13/select0225.sql
UTF-8
178
2.6875
3
[]
no_license
SELECT timeStamp, temperature FROM ThermometerOBSERVATION o WHERE timestamp>'2017-11-12T02:25:00Z' AND timestamp<'2017-11-13T02:25:00Z' AND temperature>=18 AND temperature<=97
true
48aca009501cacf38ff10edab2b7ac7306231a91
SQL
gaku4138/minaji_19_04_kadai
/coffee_log/gs_db.sql
UTF-8
2,686
3.265625
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.2.11 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: 2018 年 3 月 09 日 14:48 -- サーバのバージョン: 5.6.21 -- PHP Version: 5.6.3 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101...
true
2d86d848a86e7c93b5fb5f4034f34e6b026432f5
SQL
githubwds/javaLearning
/javadatabase/deploy/sql/holiday_info.sql
UTF-8
1,047
2.71875
3
[]
no_license
-- ---------------------------- -- Table structure for holiday_info -- ---------------------------- DROP TABLE IF EXISTS `holiday_info`; CREATE TABLE `holiday_info` ( `ID` varchar(32) NOT NULL, `delflag` char(1) DEFAULT '0', `create_date` datetime DEFAULT NULL, `modify_date` timestamp NULL DEFAULT CURRENT_TIMES...
true
dd606591e6c5d63d615a815e2ebda2a478bfcae1
SQL
hit-lacus/kylin
/src/kylin-it/src/test/resources/query/sql_join/sql_inner_join/query_00.sql
UTF-8
1,731
3.078125
3
[ "Apache-2.0" ]
permissive
-- -- Licensed to the Apache Software Foundation (ASF) under one -- or more contributor license agreements. See the NOTICE file -- distributed with this work for additional information -- regarding copyright ownership. The ASF licenses this file -- to you under the Apache License, Version 2.0 (the -- "License"); you ...
true
42d8edc37dcfa397821fe1373765bd0c6a1adfef
SQL
NickCorcoran/platform-services-registry
/db/sql/V1.12__set_name_unique_profile_alter.sql
UTF-8
108
2.546875
3
[ "Apache-2.0" ]
permissive
BEGIN TRANSACTION; ALTER TABLE profile ADD CONSTRAINT profile_name_unique UNIQUE (name); END TRANSACTION;
true
f32790001d07c40182838e3a541266fd3bb74fe1
SQL
s-darling/TestForLink
/EBXworkspace/Libraries/EBX Core/ebx_CD_5.4.0.0907-0001/ebx.software/files/ddl/SQL_Server/ddl15_HVM.4_newIn_5.2.7.sql
UTF-8
220
2.609375
3
[]
no_license
CREATE TABLE EBX_HV_MERGE ( tx_id INTEGER NOT NULL , merged_home_id INTEGER NOT NULL , begin_time BIGINT NOT NULL , end_time BIGINT NOT NULL , CONSTRAINT EBX_HV_MERGE_PK PRIMARY KEY (tx_id, merged_home_id));
true
04f9a04be30e98ce861267afcff459d53bc20377
SQL
15TIA-PemrogramanFramework/Kuis2_Westy
/kuis_1086/kuis2_86.sql
UTF-8
2,868
3.046875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.6.4 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: Dec 13, 2017 at 04:32 PM -- Server version: 5.7.15-log -- PHP Version: 5.6.26 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIEN...
true
38878dad0f1217be099fbc6223cae01e405e04b3
SQL
RafaelSdm/curso-de-banco-de-dados
/mysql/aula10.sql
UTF-8
282
3.125
3
[ "MIT" ]
permissive
use cadastro; describe gafanhotos; alter table gafanhotos add column cursopreferido int; alter table gafanhotos add foreign key(cursopreferido) references cursos(idcurso); select * from gafanhotos; select * from cursos; update gafanhotos set cursopreferido = '6' where id = '1';
true
3929840e1b9af1fd78dae8a6608ccdafe7d69773
SQL
tristiyofamuji/mahasiswa
/mahasiswa.sql
UTF-8
3,272
3.421875
3
[]
no_license
/* Navicat Premium Data Transfer Source Server : localhost Source Server Type : MySQL Source Server Version : 100137 Source Host : localhost:3306 Source Schema : mahasiswa Target Server Type : MySQL Target Server Version : 100137 File Encoding : 65001 Date: 10/01/201...
true
34e44299264c99a5406e11b7841d2d80e3af0666
SQL
teng-liu/myDocuments
/db/tmp.sql
UTF-8
1,874
3.515625
4
[]
no_license
----create new user, uuid from front-end, insert user and its map to contract-group with t_new_user as ( insert into public.user (uuid, name_key, content) values ($1, $2, $3) on conflict (uuid) do update set name_key=$2, content=$3 returning uuid ), t_new_rel as ( insert into...
true
266b4fee61614c2fe6d670865fc45ac5435dad29
SQL
tiffam/Tallify
/tables.sql
UTF-8
565
3.203125
3
[]
no_license
CREATE TABLE IF NOT EXISTS users( id SERIAL PRIMARY KEY, name varchar(255) NOT NULL, email varchar(255) NOT NULL, password varchar(255) NOT NULL ); CREATE TABLE IF NOT EXISTS vouchers( id SERIAL PRIMARY KEY, value INTEGER NOT NULL, expiry_date DATE, created_at DATE DEFAULT current_timestamp, redeemed varch...
true
8ee1a8c62833415059640b46377a1ac1e57ff4e7
SQL
ANAHUACSERUA/UFT2
/Procedure/pwacrev.prc
ISO-8859-1
10,787
3.59375
4
[]
no_license
DROP PROCEDURE BANINST1.PWACREV; CREATE OR REPLACE PROCEDURE BANINST1.PWACREV IS /* Tarea : Copia los criterios de evaluacin del curso a los alumnos. Esto debe hacerse por los lumnos que se inscribieron despues de haber sido asignados los criterios de evaluacin. Autor : GEPC ...
true
4dd5769d0ba27f223f9634ae0251b867d51b85ec
SQL
kets911/aut-java-lab-2018-pavel-katsuba
/task9/src/main/resources/create.sql
UTF-8
8,059
3.890625
4
[]
no_license
create database library; use library; CREATE TABLE books ( idBook INT AUTO_INCREMENT PRIMARY KEY, bookName VARCHAR(200) UNIQUE, publishingDate DATE, count INT(11) DEFAULT NULL, isTaken BOOLEAN DEFAULT FALSE ); CREAT...
true
0c7409f3749b433ffdac1bc7863b1743fd152aa6
SQL
pop5798pop5798/Game
/樂透/windows/DBSchema/Oracle/OracleSQL.sql
UTF-8
4,708
3.375
3
[]
no_license
CREATE TABLE FROM_CONFIG( TRANSPORT_ID VARCHAR2(10), TRANSPORT_PASSWORD VARCHAR2(45), PARTY_ID VARCHAR2(10) NOT NULL, PARTY_DESCRIPTION VARCHAR2(200), ROUTING_ID VARCHAR2(39), ROUTING_DESCRIPTION VARCHAR2(200), SIGN_ID VARCHAR2(4), SUBSTITUTE_PART...
true
9d1fbfec797ed80a947daeb213000c2a3ef36300
SQL
rfcaio/mysql-alura-course
/setup.sql
UTF-8
122,987
3.1875
3
[]
no_license
CREATE DATABASE IF NOT EXISTS purchase_control DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci; USE purchase_control; CREATE TABLE IF NOT EXISTS purchase ( id INT AUTO_INCREMENT NOT NULL, description VARCHAR(255), price DOUBLE, purchase_date DATE, received BOOLEAN, PRIMARY KEY (id) ) DEFAULT C...
true
cf08d0d0fb382b9039a5b31a2d922e0ea30e1634
SQL
emmad5/W3D2
/import_db.sql
UTF-8
1,819
4.09375
4
[]
no_license
DROP TABLE IF EXISTS users; DROP TABLE IF EXISTS questions; DROP TABLE IF EXISTS questions_follows; DROP TABLE IF EXISTS replies; DROP TABLE IF EXISTS questions_likes; PRAGMA foreign_keys = ON; CREATE TABLE users ( id INTEGER PRIMARY KEY, fname TEXT NOT NULL, lname TEXT NOT NULL ); CREATE TABLE questions ( i...
true
b43b1c0b1c7bd673412dacd5334092d7a760d041
SQL
CUBRID/cubrid-testcases
/sql/_03_object_oriented/_03_inheritance/_001_class/cases/1002.sql
UTF-8
656
2.71875
3
[ "BSD-3-Clause" ]
permissive
--create two tables ddl_0001,ddl_0002 and ddl_0003 inherited from ddl_0001 , ddl_0004 inherited from ddl_0002,drop all tables at last CREATE CLASS ddl_0001( col1 int Unique Not Null, col2 varchar(100), col3 varchar(100), colCreateTm timestamp Not NULL ); CREATE CLASS ddl_0002( col1 int Unique Not Null, ...
true
d523e6244e757b36b302544b8f1966c0ad2be41a
SQL
thaok61/QuanLyVeTau
/quanLyVeTau.sql
UTF-8
4,025
3.03125
3
[]
no_license
-- MySQL dump 10.13 Distrib 8.0.17, for Win64 (x86_64) -- -- Host: localhost Database: quan_ly_ve -- ------------------------------------------------------ -- Server version 8.0.17 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; ...
true
c3a006b573892e102019b462ab8a14ec2570ab63
SQL
kfoon/SIM-Number-Management-System
/in_change.sql
UTF-8
10,855
2.96875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 2.11.8.1deb5+lenny8 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: May 24, 2011 at 05:26 PM -- Server version: 5.0.51 -- PHP Version: 5.3.3-7 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET ...
true
c4ad1b5a08e1cd743de6c62e8ffe8a1a102936f6
SQL
teotiger/pldi
/__old__/examples/example_usage.sql
UTF-8
3,288
2.921875
3
[ "MIT" ]
permissive
set serveroutput on; begin utils.processing_file('countries.csv'); file_text_data_api.insert_rows(i_frd_id => 1); utils.processing_file('Eviction_Notices.csv'); utils.processing_file('tsv.tsv'); utils.processing_file('unemployment.csv'); utils.processing_file('categories.xlsx'); utils.processing_file('fi...
true
971976b4463d2288fcc2687e3893a7b17efeee36
SQL
mattvisco/insta
/schema.sql
UTF-8
391
2.734375
3
[]
no_license
drop table if exists active; drop table if exists ids; create table active ( id integer primary key autoincrement, img_type text not null, filename text not null, -- TODO: make unique insta_id text -- TODO: make unique ); create table ids ( id integer primary key autoincrement, img_type text not null, f...
true
a47c06a0eb30b75620a91c5c803018f6642678b2
SQL
rmohan/ot-jobs-portal
/mysql_import.sql
UTF-8
5,261
3.0625
3
[]
no_license
-- MySQL dump 10.13 Distrib 5.6.24, for osx10.8 (x86_64) -- -- Host: localhost Database: ot_job_login -- ------------------------------------------------------ -- Server version 5.6.24 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS ...
true
7d19c27fe02a5752e73297548556cebf1bdce9c2
SQL
314H/banco-de-dados-modelagem
/ecommerce/ecommerce.sql
UTF-8
1,332
3.765625
4
[]
no_license
create database ecommerce; use ecommerce; create table clientes ( id int primary key auto_increment, nome varchar(100), email varchar(100), telefone varchar(100), tipo_cliente char(2) ); create table clientes_pj ( id int primary key auto_increment, cnpj varchar(100), razao_social varchar(100), cl...
true
1ba62d3accdbc06d7ad0957fb74e5e332b919d49
SQL
krpharr/fictional-broccoli
/lib/cms_db.sql
UTF-8
5,670
4.25
4
[]
no_license
DROP DATABASE IF EXISTS cms_db; CREATE DATABASE cms_db; USE cms_db; CREATE TABLE department ( id INT NOT NULL AUTO_INCREMENT, name VARCHAR(30) NOT NULL, PRIMARY KEY (id) ); CREATE TABLE role ( id INT NOT NULL AUTO_INCREMENT, title VARCHAR(30) NOT NULL, salary DECIMAL NOT NULL, department_id INT NOT NULL,...
true
f0049115ca7089b8915bd5a275e220899231159b
SQL
brunosilvaJava/ponto-inteligente-api
/src/main/resources/db/migration/mysql/V1__init.sql
UTF-8
1,226
3.40625
3
[]
no_license
CREATE TABLE IF NOT EXISTS `empresa` ( `id` bigint(20) NOT NULL PRIMARY KEY AUTO_INCREMENT, `razao_social` varchar(50) NOT NULL, `cnpj` int(18) NOT NULL, `data_criacao` date NOT NULL, `data_atualizacao` date NOT NULL ); CREATE TABLE `funcionario` ( `id` bigint(20) NOT NULL PRIMARY KEY AUTO_INCREMENT, `no...
true
9cdd9e871b0c34a6c2d689a1a3726d051789456f
SQL
wanderingivan/ecommerce-example
/src/main/resources/scripts/sql/create_procedures_mysql.sql
UTF-8
3,491
4.40625
4
[]
no_license
-- Procedures : DROP PROCEDURE IF EXISTS unread// DROP PROCEDURE IF EXISTS updateSold// DROP PROCEDURE IF EXISTS addMessage// DROP PROCEDURE IF EXISTS addOrder// DROP PROCEDURE IF EXISTS sendMessage// DROP PROCEDURE IF EXISTS setFeatured// CREATE PROCEDURE `addOrder`(IN userId BIGINT,IN address VARCHAR(250)) BEGIN ...
true
0ccbbf70241a023dc36cddac32f714955809b8f7
SQL
FrikkieM/phpmvc-with-login
/app/config/DBScripts.sql
UTF-8
515
2.96875
3
[]
no_license
-- DB SCRIPTS -- ========== -- Run these on your Database in PHPMYADMIN when setting up the project -- USERS TABLE CREATE TABLE users ( id int NOT NULL AUTO_INCREMENT, name varchar(255), email varchar(255), password varchar(255), created_at DATETIME default CURRENT_TIMESTAMP, PRIMARY KEY (id)...
true
1f13f871ea4983b97c5bb937c331c557e5d4a4ef
SQL
ellandar/GISMO
/BDD/Structure/CORE/GISMO_PARAM_CORE_STRUCT.sql
UTF-8
5,518
3.765625
4
[]
no_license
-- -------------------------------------------------------- DROP VIEW IF EXISTS GISMO_PROJ; DROP TABLE IF EXISTS GISMO_WEEK_NUMBER; DROP TABLE IF EXISTS GISMO_TASK_TYPE; DROP TABLE IF EXISTS GISMO_SUB_VERSION; DROP TABLE IF EXISTS GISMO_SUB_PROJECT; DROP TABLE IF EXISTS GISMO_VERSION; DROP TABLE IF EXISTS GISMO_PROJE...
true
ea716603534a45868106bf268f7ee2157089995e
SQL
ThiagoCamiloNonatoWenceslau/CadastroDeContasApi
/src/Querys/TipoConta/UspAlterarTipoConta.sql
UTF-8
299
2.890625
3
[]
no_license
Create Procedure uspTipoContaAlterar @Id int, @Codigo varchar(20), @Nome varchar(50), @DataDeCriacao datetime, @Saldo decimal(18,2) As Begin Update TipoConta Set Codigo = @Codigo, Nome = @Nome, DataDeCriacao = @DataDeCriacao, Saldo= @Saldo Where Id = @Id Select @Id AS Retorno End
true
8db145987cd335c62d03f45bc6f8e4353f24abce
SQL
MartynasIT/.Net-Clients
/sql.sql
UTF-8
334
2.640625
3
[]
no_license
CREATE TABLE Clients ( id int NOT NULL IDENTITY(1,1) PRIMARY KEY, name nvarchar(255), address nvarchar(255), post_code varchar(255 ) ); CREATE TABLE Logs( id int NOT NULL IDENTITY(1,1) PRIMARY KEY, time datetime default CURRENT_TIMESTAMP, action nvarchar(255), record nvarc...
true
086a8d9a3a9743394a2290bb2de8a0a5a8332eb1
SQL
cityofaustin/atd-vz-data
/atd-vzd/triggers/find_location_id_for_cr3_collision.sql
UTF-8
971
2.828125
3
[ "CC0-1.0", "LicenseRef-scancode-public-domain" ]
permissive
CREATE OR REPLACE FUNCTION public.find_location_id_for_cr3_collision( id integer) RETURNS character varying LANGUAGE 'sql' COST 100 STABLE AS $BODY$ SELECT atl.location_id FROM atd_txdot_crashes AS atc INNER JOIN atd_txdot_locations AS atl ...
true
04f89f1547d62934d6872dd954c502f25041b024
SQL
nucleo-digital/api-v2-specs
/database/data.sql
UTF-8
1,459
3.171875
3
[ "MIT" ]
permissive
ALTER DATABASE :db SET postgrest.claims.user_id TO ''; INSERT INTO rs.users (id, username, password) VALUES ('36bcf3b6-7a88-4de2-ac77-6d92e0fd6109', 'user1', 'secret'), ('c291dc50-dad6-4bc9-bb54-7317ca03d20d', 'user2', 'secret'), ('5e3f1ab7-646b-4476-afc0-d2ae42cd18c6', 'user3', 'secret'), ...
true
cb38da4ba950610522c961f2ae5a3a92d5d8de66
SQL
huangshiqiang/com.gcxcx
/code/cn.elwy.eplus/cn.elwy.eplus.core/src/main/resources/database/cn.elwy.repot.sql
UTF-8
3,880
3.421875
3
[ "Apache-2.0" ]
permissive
/* -- -------------------------------------------------------- -- 作者:黄仕强 -- 系统版本:version 2.0 -- 创建日期:2017-02-19 20:30:00 -- 版权所有:2027-02-19 All Right Reserved IN www.elwy.cn -- 文件描述:创建数据库表、视图以及初始化系统数据 -- 表名命名规则: -- 1.前两个字母表示应用名称,用于区分不同的系统 -- 2.第三个字母到"_"前的字符表示对象类型,可以取值: -- F方法、I索引、P分区表、S序列、T表、V视图、PR存储过程、TR触发...
true
3a49d843f41efecfa93183e05102bfd9caa98cc9
SQL
CUBRID/cubrid-testcases
/sql/_31_cherry/issue_22161_CTE_extensions/_02_delete/cases/with_rollup.sql
UTF-8
2,371
4.375
4
[ "BSD-3-Clause" ]
permissive
drop table if exists sale_tbl; CREATE TABLE sales_tbl (dept_no INT, name VARCHAR(20), sales_month INT, sales_amount INT DEFAULT 100, PRIMARY KEY (dept_no, name, sales_month)); INSERT INTO sales_tbl VALUES (201, 'George' , 1, 450), (201, 'George' , 2, 250), (201, 'Laura' , 1, 100), (201, 'Laura' , 2, 500), (301, 'Max...
true
fcb50bb130a33092e58d5283ac43b84e8b7e7ff0
SQL
stacecadet17/MySQL-countries
/Buenos_Aires.sql
UTF-8
236
3.859375
4
[]
no_license
SELECT countries.name, cities.name, cities.district, cities.population FROM cities JOIN countries ON countries.id = cities.country_id WHERE countries.name = "Argentina" AND cities.district = "Buenos Aires" AND cities.population > 500000
true
2375b583d98afcfce692bce3fcecc0fe40d4e10c
SQL
JM00oo/web-demo
/migrations/mysql/20180710192638-postTable.sql
UTF-8
569
3.65625
4
[]
no_license
-- +migrate Up CREATE TABLE `post` ( `id` varchar(64) COLLATE utf8mb4_bin NOT NULL, `content` varchar(255) COLLATE utf8mb4_bin NOT NULL, `title` varchar(16) COLLATE utf8mb4_bin NOT NULL, `owner_name` varchar(64) COLLATE utf8mb4_bin NOT NULL, `created_at` Datetime COLLATE utf8mb4_bin NOT NULL, PRIMARY KEY ...
true
cb5bb5c8946519dec368db6dbc8d6f86160d1548
SQL
RanranHe/INFO6210_DMDD-Final-Project
/Course Materials/Week 04/ch06_CREATE_table_SQLServer.sql
UTF-8
1,379
3.765625
4
[]
no_license
CREATE TABLE Customer ( CustomerID int not null, CustomerName nvarchar(25), CustomerAddress varchar(30), CustomerCity varchar(20), CustomerState char(2), CustomerPostalCode varchar(9) CONSTRAINT Customer_PK primary key (CustomerID) ); CREATE TABLE Product ( ProductID int not null, ProductDescription ...
true
ef7e72261a395ce0eb930aacf831d3a80824256b
SQL
fprp/sql-hospital
/SQL-PL/Checklist/checklist61.sql
UTF-8
411
3.125
3
[]
no_license
--Checklist 61 DECLARE CURSOR cur_medico (sal DECIMAL) is SELECT nomemedico, sexo, salario FROM medico WHERE salario > sal; reg_medico cur_medico%ROWTYPE; BEGIN OPEN cur_medico(16000.00); LOOP FETCH cur_medico INTO reg_medico; EXIT WHEN cur_medico%NOTFOUND; dbms_output.put_line(reg_medico.nomemedico||'...
true
d5929e345fb3ff728c2dfda5550d134bfd9248d8
SQL
Zackwn/ezOrders
/sql/order.sql
UTF-8
263
3.203125
3
[]
no_license
-- 1 CREATE TABLE Orders ( id varchar(36) PRIMARY KEY, "table" int, description TEXT, status varchar(255) ); -- 2 CREATE TYPE Status AS ENUM ('PENDING', 'DONE', 'CANCELED'); ALTER TABLE Orders ALTER COLUMN status TYPE Status USING status::status;
true
b77021db1493df45436c829e52072e45c31f4cf5
SQL
jmgabon/Software_Engineering
/juansci/sql/02-22 grade_values.sql
UTF-8
2,042
3.25
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.9.0.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Feb 22, 2020 at 11:40 AM -- Server version: 10.4.6-MariaDB -- PHP Version: 7.3.9 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OL...
true
59aa874d070378594d7fdb77c70f745dfc8d3296
SQL
HaoyangCui0830/online-movie-ticket-booking
/OnlineMovieTicketBookingSystem/Cinema_Movie_DB_Setup.sql
UTF-8
223
3.453125
3
[]
no_license
DROP TABLE Cinema_Movie; CREATE TABLE Cinema_Movie( movieId INT, cinemaID INT, PRIMARY KEY(movieId, cinemaId), FOREIGN KEY (movieId) REFERENCES Movies(movie_id), FOREIGN KEY (cinemaId) REFERENCES Cinema(cinema_id) );
true
59bfec7a4a776d53be7ab1cc7ca6017763e91f57
SQL
DimolSPA/Dimol-Fix-Carteras
/Dimol.Carteras/Dimol.Carteras.Database/dbo/Stored Procedures/Procs2/Find_Tipos_ProvCli.sql
UTF-8
197
2.515625
3
[]
no_license
 Create Procedure Find_Tipos_ProvCli(@tpc_codemp integer, @tpc_tpcid integer) as select count(tpc_tpcid) from tipos_provcli where tpc_codemp = @tpc_codemp and tpc_tpcid = @tpc_tpcid
true
a619b1af1b5d9ee527fc3e7ed20995ce37dfd27e
SQL
pjrola/salesplay
/salesplay-auth/src/main/resources/db/migration/V6__create_password_reset_token_table.sql
UTF-8
380
2.828125
3
[]
no_license
CREATE TABLE `password_reset_token` ( `id` bigint(20) NOT NULL, `account_id` bigint(20) NOT NULL, `expiry_date` datetime DEFAULT NULL, `token` varchar(255) DEFAULT NULL, PRIMARY KEY (`id`), KEY `FK_PASSWORD_RESET_USER` (`account_id`), CONSTRAINT `FK_PASSWORD_RESET_USER` FOREIGN KEY (`account_id`) REFERENC...
true
5a3cace2bbdac32a6a3e7ba262f006f3562644c3
SQL
ByteforceIndonesia/budget_system
/jewelery (1).sql
UTF-8
8,715
3.3125
3
[ "LicenseRef-scancode-unknown-license-reference", "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Oct 13, 2016 at 05:26 AM -- Server version: 10.1.13-MariaDB -- PHP Version: 7.0.6 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLI...
true
b3eb209437cf1e7f631b61d673b476808a4743bf
SQL
tgooden01/SnowConvertDDLExportScripts
/Redshift/output/currencyrate.sql
UTF-8
669
3.34375
3
[]
no_license
--DROP TABLE adventureworks2012_sales.currencyrate; CREATE TABLE IF NOT EXISTS adventureworks2012_sales.currencyrate ( currencyrateid INTEGER NOT NULL DEFAULT "identity"(144541, 0, '1,1'::text) ENCODE az64 ,currencyratedate TIMESTAMP WITHOUT TIME ZONE NOT NULL ENCODE az64 ,fromcurrencycode VARCHAR(9) NOT NULL ENCO...
true
e216a3334cd98476d368fba802f3f017619f501c
SQL
fishg92/FrameworkDB
/Stored Procedures/Procs1/uspApplicationUserInsert.sql
UTF-8
1,708
3.015625
3
[]
no_license
---------------------------------------------------------------------------- -- Insert a single record into ApplicationUser ---------------------------------------------------------------------------- CREATE PROC uspApplicationUserInsert ( @UserName varchar(50) , @FirstName varchar(50) , @LastName varchar(50) , @...
true
799d448672659f74c6e0c06ed3900a311f849e2e
SQL
silence-do-good/stress-test-Postgres-and-MySQL
/dump/high/day19/select2124.sql
UTF-8
178
2.6875
3
[]
no_license
SELECT timeStamp, temperature FROM ThermometerOBSERVATION o WHERE timestamp>'2017-11-18T21:24:00Z' AND timestamp<'2017-11-19T21:24:00Z' AND temperature>=20 AND temperature<=99
true
04575677622c757e730b5546378d003d748706c0
SQL
zuishuaiweiwei/ssh
/crebas.sql
UTF-8
4,173
3.46875
3
[]
no_license
/*==============================================================*/ /* DBMS name: MySQL 5.0 */ /* Created on: 8/4 20:20:44 */ /*==============================================================*/ DROP TABLE IF EXISTS emp_role; DROP TABLE IF EXIS...
true
fb4fbccb6f94d2ea3370f86f6114e76a29567626
SQL
jhalverson/data_science
/sql_mysql/pandas_sql_comparison.sql
UTF-8
8,050
3.390625
3
[]
no_license
Thursday, July 14, 2016 Sample insurance portfolio (download .csv file) The sample insurance file contains 36,634 records in Florida for 2012 from a sample company that implemented an agressive growth plan in 2012. There are total insured value (TIV) columns containing TIV from 2011 and 2012, so this dataset is grea...
true
ea40378d87ee9c0f60813216755ef01ead845364
SQL
andrtechno/app
/modules/install/migrations/scheme.sql
UTF-8
1,038
3.21875
3
[ "BSD-3-Clause" ]
permissive
DROP TABLE IF EXISTS `{prefix}modules`; CREATE TABLE `{prefix}modules` ( `id` int(4) unsigned NOT NULL AUTO_INCREMENT, `name` varchar(255) DEFAULT '', `className` varchar(255) DEFAULT '', `switch` tinyint(1) NOT NULL DEFAULT '1', `access` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`id`), UNIQUE KEY `name`...
true
92321b59ec5170ad0614bcf632eb113982684460
SQL
jgarzonext/plsql-testing
/script_plsql/bd_iaxis/script/indices/RIEACTAMP_PK.sql
UTF-8
590
2.578125
3
[]
no_license
-------------------------------------------------------- -- DDL for Index RIEACTAMP_PK -------------------------------------------------------- CREATE UNIQUE INDEX "AXIS"."RIEACTAMP_PK" ON "AXIS"."RIESGOACTAMP_CONF" ("CEMPRES", "CRAMO", "CMODALI", "CTIPSEG", "CRIESGOACT", "CCODAMPARO", "CACTIVI", "FFECINI", "CCOLEC...
true
6c3922183423b49f11d0edcf42b8ee7171074630
SQL
BreakthrougBackEndTech/examples
/distributed-transaction/tcc/test.sql
UTF-8
501
2.6875
3
[]
no_license
-- 数据库实例inst01 CREATE TABLE tb_account_one ( acct_id varchar(16), amount double(10, 2), frozen double(10, 2), PRIMARY KEY (acct_id) ) ENGINE=InnoDB; insert into tb_account_one (acct_id, amount, frozen) values('1001', 100, 0.00); -- 数据库实例inst02 CREATE TABLE tb_account_two ( acct_id varchar(16), amount doub...
true
7ea5e1840e68768b4ead33a38d4de1dde6f0845d
SQL
tenisme/tenisme_study
/MySQL_sql/초반 수업/200529.sql
UTF-8
2,344
4.40625
4
[]
no_license
use mydb; -- ((1)) 예제 1 : 리뷰 작성을 안 한 사람도 표시하되(0으로), 사람별로 각 리뷰의 갯수, 리뷰의 최소 별점, 최대 별점, 평균 별점(rating) 조회하고, -- 만약 별점을 준 리뷰 갯수가 0보다 크면 "ACTIVE", 그렇지 않으면 "INACTIVE"로 표시(컬럼 명은 status) -- firstname, lastname, count, min, max, avg, status -- ifnull(), count(*), as, round(), min(), max(), case-when-then-else-end as, left join...
true
934853c2a83d63e15c2f2b1b8967f1b7c369fe56
SQL
alvin-ictn/Covid-Digital-Signage
/css/127_0_0_1(1).sql
UTF-8
131,957
3.125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.7.0 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: 11 Jul 2018 pada 12.10 -- Versi Server: 10.1.25-MariaDB -- PHP Version: 5.6.31 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CH...
true
06623daf6a74ae19ca907e8a16d6a0e88226fc6d
SQL
tsak/glitch-auto-sell
/app/config/schema/glitch_update_20110911.sql
UTF-8
291
2.859375
3
[]
no_license
# New fields to allow consistent calculations for changing rules ALTER TABLE `auctions` ADD `quantity` INT UNSIGNED NULL , ADD `price` INT UNSIGNED NULL ; # Auction status ALTER TABLE `auctions` ADD `status` ENUM( 'PENDING', 'SOLD', 'UNSOLD' ) NOT NULL DEFAULT 'PENDING' AFTER `rule_id` ;
true
5160a54f3c030bc6387a3e3560073708ba8f6e56
SQL
sugishia/shop
/DB export/mst_product.sql
UTF-8
1,695
3.171875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.7.0 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3306 -- Generation Time: 2018 年 4 朁E27 日 19:30 -- サーバのバージョン: 5.6.34-log -- PHP Version: 7.1.7 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACT...
true
a03de06d85a478c9da35928288b1a5e974b7bd47
SQL
batego/db_fintra
/fintra/con_/Tables/_con.factura_ingresoerradocomparar.sql
UTF-8
425
2.78125
3
[]
no_license
-- Table: con.factura_ingresoerradocomparar -- DROP TABLE con.factura_ingresoerradocomparar; CREATE TABLE con.factura_ingresoerradocomparar ( factura character varying(10), valor_ingreso moneda ) WITH ( OIDS=FALSE ); ALTER TABLE con.factura_ingresoerradocomparar OWNER TO postgres; GRANT ALL ON TABLE con.factu...
true
a0ede8b24b61c3a28a5aa9ebaba121579eaf818b
SQL
hoon4233/Database-System
/project1/26.sql
UTF-8
152
3.125
3
[]
no_license
SELECT Pokemon.name FROM Pokemon, CatchedPokemon WHERE Pokemon.id = CatchedPokemon.pid and CatchedPokemon.nickname LIKE '% %' ORDER BY Pokemon.name DESC
true
a9f7a2f796f4af7b51c9bdb16b55a74647d10c9b
SQL
ramesesinc/clfc21
/osiris3-server/workspace/services/apps/clfc/modules/rameses-clfc-loan-services.jar/sql/capture_payment.sql
UTF-8
3,028
3.5
4
[]
no_license
[getList] SELECT * FROM capture_payment WHERE collector_name LIKE $P{searchtext} ORDER BY txndate DESC [getListByState] SELECT * FROM capture_payment WHERE collector_name LIKE $P{searchtext} AND state = $P{state} ORDER BY txndate DESC [getPendingList] SELECT c.* FROM capture_payment_pending cp INNER JOIN capture_pay...
true
830e272fc11863cf6309657eb49ddbc6de0bf6c4
SQL
601729260/Navicat
/MySQL/servers/开发库/mamahao_crm/模糊匹配.sql
UTF-8
106
2.71875
3
[]
no_license
select * from t_member a inner join t_member_binding b on a.member_id=b.member_id where b.staff_id=888
true
87fda887c8f82626ffa7150e30cf2193fc2adca9
SQL
mpassak/db
/ddl/01_TABLE/BM_PLAN.sql
UTF-8
672
2.671875
3
[]
no_license
-------------------------------------------------------- -- DDL for Table BM_PLAN -------------------------------------------------------- CREATE TABLE "METSM_OWNER"."BM_PLAN" ( "ID_PLAN" NUMBER(*,0), "CD_PLAN" VARCHAR2(20 CHAR), "PLAN_NAME" VARCHAR2(50 CHAR), "DESCRIPTION" VARCHAR2(200 CHAR), "DT_CREAT...
true
19844fe8e75646354ff2365617bf8b4b51203fdc
SQL
beck-bowen/MyStuff
/DataBases/dbMyStuff/Tables/tst.MyStuff.sql
UTF-8
236
2.765625
3
[]
no_license
CREATE TABLE [tst].[MyStuff] ( [Id] INT IDENTITY (1, 1) NOT NULL, [MyColumn] NVARCHAR (MAX) NULL, [MyTimeStamp] DATETIME DEFAULT (getdate()) NOT NULL, PRIMARY KEY CLUSTERED ([Id] ASC) );
true
a2e1428a0190e95571d775446b100623c2c6f57a
SQL
goelakash/Graph_rec
/UI/web/NeoRecApp/cypher/pearson_sim.cql
UTF-8
432
3.140625
3
[]
no_license
MATCH (u1:User)-[x:RATED]->(m:Movie)<-[y:RATED]-(u2:User) WITH SUM((x.rating-u1.avg_rating) * (y.rating-u2.avg_rating)) AS xyDotProduct, SQRT(REDUCE(xDot = 0.0, a IN COLLECT(x.rating) | xDot + (a-u1.avg_rating)^2 )) AS xLength, SQRT(REDUCE(yDot = 0.0, b IN COLLECT(y.rating) | yDot + (b-u2.avg_rating)^2 )) ...
true
86c682c4f3c0c30a65de36b75fa68419b41c7025
SQL
dimitri78700/WF3mars2017
/sql/03-bibliotheque/requete_bibliotheque.sql
UTF-8
8,612
4.03125
4
[]
no_license
-- ************************************** -- Création de la BDD -- ************************************** CREATE DATABASE bibliotheque; USE bibliotheque; -- Copier le contenue de dossier bibliotheque -- ************************************** -- Exercices -- ************************************** -- 1. Quel es...
true
80e6962ae99bf4c6f149cd59c0a470cb774578b3
SQL
tobiasengblom/Databaser
/Part 3/tests.sql
UTF-8
2,836
3.3125
3
[]
no_license
-- TEST #1: Register to an unlimited course. -- EXPECTED OUTCOME: Pass INSERT INTO Registrations VALUES ('6666666666', 'CCC111'); -- TEST #2: Register to a limited course. -- EXPECTED OUTCOME: Pass INSERT INTO Registrations VALUES ('6666666666', 'CCC666'); -- TEST #3: Waiting for a limited course. -- EXPECTED OUTCOM...
true
a95f71d1048be3934b7f8ed253d0c30a77e3d95a
SQL
altamira/visualstudio
/Sistema de Informação Altamira/EGISSQL.Database/dbo/Stored Procedures/Procs1/pr_consulta_pedido_venda_sem_vendedor.sql
UTF-8
1,370
3.546875
4
[]
no_license
 CREATE PROCEDURE pr_consulta_pedido_venda_sem_vendedor @dt_inicial datetime, @dt_final datetime, @cd_pedido_venda int AS ---------------------- if @cd_pedido_venda = 0 ---------------------- begin SELECT pv.cd_pedido_venda, pv.dt_pedido_venda, isnull(pv.vl_total_pedido_venda,0) as 'vl...
true
5787ea9797baaee78f08aec617fc39718add9396
SQL
linkedin/coral
/coral-trino/src/test/resources/product_test_cases_expected/implicit_explicit_inner_expected.sql
UTF-8
137
2.78125
3
[ "BSD-2-Clause", "LicenseRef-scancode-unknown-license-reference", "Apache-2.0" ]
permissive
select `p_partkey`, `n_name`, `r_name` from `nation` inner join `part` on `r_regionkey` = `p_partkey` where `n_nationkey` = `r_regionkey`
true
f63c0c98f805876bee1cac2ee52a1c774b3977d5
SQL
itsring/sql_study
/06_서브쿼리와 집합.sql
UTF-8
4,784
4.9375
5
[]
no_license
-- 서브쿼리 -- Popp 직원보다 고용일이 최근(이후)에 고용한 사람 -- 주의점: 단일행 서브쿼리를 사용할때는 서브쿼리의 결과가 비교하는 데이터와 같고 하나만 출력되어야 한다. SELECT last_name 이름, hire_date 고용일자 FROM employees WHERE hire_date > ( SELECT hire_date FROM employees WHERE last_name = 'Popp'); -- 그룹함수의 결과를 서브쿼리로 사용 SELECT last_name 이름, job_id 직종, salary 급여 FROM employees WHERE ...
true
c764a343b40ec42a71b6b1ea83afd8c7cdbe003a
SQL
CBIIT/icrp
/database/MSSQL/Ad-hoc Scripts/UpdatePartnerOrg.sql
UTF-8
2,125
3.53125
4
[]
no_license
-- 9/28/2017 -- Update Partner Select * from Partner select * from partnerorg where membertype='partner' SELECT * FROM Partner WHERE SponsorCode='AVONFDN' SELECT * FROM Partner WHERE SponsorCode='KWF' SELECT * FROM Partner WHERE SponsorCode='INCa' SELECT * FROM PartnerOrg WHERE SponsorCode='AVONFDN' SELECT * FROM Par...
true
4d7738a7a1d7464c307a2e9b72021b74a931dab3
SQL
BrandonRodriguez1336/sql-challenge
/EmployeeSQL/SQLscript.sql
UTF-8
2,266
4.5625
5
[]
no_license
--1. List the following details of each employee: employee number, last name, first name, gender, and salary. Select e.emp_no, e.last_name, e.first_name, e.gender, s.salary from employees e inner join salaries s on e.emp_no=s.emp_no --2. List employees who were hired in 1986. Select e.emp_no, e.first_name, e.last_nam...
true
64ff2af132fb0823fa6a3092936df290b0246291
SQL
alamops/TXQ
/src/database/migrations/x202009010001-add-assets.sql
UTF-8
490
3.296875
3
[ "MIT" ]
permissive
CREATE TABLE txasset ( assetid varchar NOT NULL, owner_address varchar NULL, owner_pubkey varchar NULL, data jsonb NULL, txid varchar NOT NULL, index integer NOT NULL ); CREATE UNIQUE INDEX idx_asset_txid_index ON txasset USING btree (txid, index); CREATE INDEX idx_asset_assetid ON txasset USIN...
true
b4d5f8179f688efe573a03098cfb1416f50e3ce8
SQL
bcgov/PIMS
/backend/dal/Migrations/v01.08.00/Up/Postup/01-ProjectStatusTransitions.sql
UTF-8
763
2.703125
3
[ "Apache-2.0" ]
permissive
PRINT 'Adding ProjectStatusTransitions' INSERT INTO dbo.[ProjectStatusTransitions] ( [FromWorkflowId] , [FromStatusId] , [Action] , [ToWorkflowId] , [ToStatusId] , [ValidateTasks] ) VALUES -- Allow progression from Not in SPL to Disposed ( 5 -- ERP , 22 -- Not in SPL , 'Dispose Proj...
true
3ba20f90f38f3ab49fbc224be5f052c4f9b5b233
SQL
cruzer45/ilearn-gms
/iLearn/db/ilearn/Missing Grades - teachers.sql
UTF-8
539
3.703125
4
[]
no_license
SELECT DISTINCT `subCode` as 'Subject Code', `subName` as 'Subject', CONCAT_WS(' ',`staFirstName`,`staLastName`) as 'Teacher' FROM `Subject` INNER JOIN `Staff` ON `Staff`.`staCode` = `Subject`.`subStaffCode` LEFT JOIN `Assments` ON `Assments`.`assmtSubject` = `Subject`.`subCode` LEFT JOIN `TermGrade` ON `TermGrade`...
true
3f71e07871a0badbc3ab8f706ad4731d9238cd41
SQL
radtek/Database-3
/oracle/admin/scripts/tbs2.sql
UTF-8
2,563
3.421875
3
[]
no_license
REM ################################################ REM # Creator: Vincent Fenoll REM # Created: 2004/01/22 REM # Name: tbslight.sql REM ################################################ REM # REM # Compatible: Oracle 7 8i 9i 10g 11g REM# REM ################################################ REM # REM # Table...
true
dbded148577aa632cd86dca348fcf2133537a122
SQL
jaliste/unitime
/Documentation/Database/MySQL/Changes/72 Instructor limit distribution pref.sql
UTF-8
1,691
2.828125
3
[]
no_license
/* * UniTime 3.2 (University Timetabling Application) * Copyright (C) 2008 - 2010, UniTime LLC * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at...
true
4293f3a16fed09d44317b30f64e2d1adfb7608fb
SQL
rpsalmon/my_SQrLd
/comp_sub_comp_sub.sql
UTF-8
5,938
3.671875
4
[]
no_license
CREATE VOLATILE TABLE COMP_HP AS ( SELECT DISTINCT HP.division, HP.region, HP.dma, HP.location_id , CASE WHEN (sP.max_internet_speed_qty > 100 AND sP.service_provider_id = 1) THEN 'ATT FIBER' WHEN ((sP.max_internet_speed_qty <= 100 OR sP.max_internet_speed...
true
9a51e1d20610861e8552b71f8bd1bc225c4e3134
SQL
andyymor/employee-management-system
/db/seed.sql
UTF-8
588
3.078125
3
[]
no_license
USE employees_db INSERT INTO department (name) VALUES ('Sales'), ('Engineering'), ('Finance'), ('Legal'); INSERT INTO role (title, salary, department_id) VALUES ('Sales Person', 50000, 1), ('Software Engineer', 100000, 2), ('Accountant', 200000, 3), ...
true
8acafedcc722621ca65ded538ca90f1892269d58
SQL
LuisPalominoTrevilla/advanced-databases-course
/pentaho/sales.cql
UTF-8
366
2.609375
3
[]
no_license
CREATE TABLE company.daily_sales ( product_name varchar, order_number int, date date, week_number, product_quantity int, unit_price float, total float, product_description varchar, sales_person varchar, client_email varchar, tax float, PRIMARY KEY (week_number, product_qu...
true
82fdaa56081012cd0a1d66888e51b7ad6ea77229
SQL
HannaKlimovich/lab_files
/DWH/batch_with_packages(don't see file)/sa_src/create_grant_user.sql
UTF-8
646
2.5625
3
[]
no_license
CREATE USER sa_src IDENTIFIED BY "123" DEFAULT TABLESPACE tbs_pdb_test; --GRANT CONNECT TO sa_src; --GRANT RESOURCE TO sa_src; GRANT all privileges to sa_src; CREATE USER bl_cl IDENTIFIED BY "123" DEFAULT TABLESPACE tbs_pdb_test; --GRANT CONNECT TO bl_cl; --GRANT RESOURCE TO bl_cl; GRANT all privileges to bl_c...
true
a45279d9fecba4bb4f0568c2f3aca4b9d6bbb1b8
SQL
raiprakhar/Jaipur-Metro-Website
/SQL_codes/station.sql
UTF-8
2,055
3.1875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.9.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Nov 18, 2019 at 09:30 AM -- Server version: 10.4.8-MariaDB -- PHP Version: 7.2.24 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
true
0559f7eb8e2b1b39bf4d3339071ccf32c411dc87
SQL
sd-2017-30233/db-operations-revision-alinadenisa
/script.sql
UTF-8
2,773
3.5
4
[]
no_license
-- MySQL Script generated by MySQL Workbench -- Thu Mar 16 00:14:46 2017 -- Model: New Model Version: 1.0 -- 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_M...
true
93d10302ae414f52be92063ffb920a098e568637
SQL
josephmachado/sde_superset_demo
/init.sql
UTF-8
551
2.640625
3
[]
no_license
CREATE SCHEMA clickstream; DROP TABLE IF EXISTS clickstream.people; CREATE TABLE IF NOT EXISTS clickstream.people ( age INT, workclass VARCHAR(100), fnlwgt BIGINT, education VARCHAR(100), education_num INT, marital_status VARCHAR(100), occupation VARCHAR(100), relationship VARCHAR(100), ...
true
585b89a102e2700d66443f00433e6716ec5bce32
SQL
Janche/springboot-security-project
/backend/src/test/resources/template.sql
UTF-8
1,082
3.859375
4
[]
no_license
# 根据账号查询用户的信息 SELECT u.id u_id, u.org_id u_org_Id, u.account, u.username, u.staff_id u_staff_id, u.staff_type u_staff_type, u.staff_position u_staff_position, u.staff_title u_staff_title, u.tel, u.email, u.status u_status, u.description u_description,...
true
10e485f27bae87700448c6663bdeeeab68d70409
SQL
Seojun-Park/42_camagru
/db/db.sql
UTF-8
1,341
3.625
4
[]
no_license
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; -- -- Database: `db_cama` -- CREATE DATABASE IF NOT EXISTS `db_cama` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci; USE `db_cama`; CREATE TABLE `feed` ( `idx` int NOT NULL AUTO_INCREMENT, `userid` varchar...
true