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
5838a8a56f3bb4cbc2abfb0cd6e52033ac311748
SQL
gishac/tesis-sicce
/sicce-api-dataaccess/SQLScripts/DatabaseScript.sql
UTF-8
18,220
3.6875
4
[]
no_license
CREATE TABLE POWER_METER ( ID_POWER_METER INTEGER UNSIGNED NOT NULL AUTO_INCREMENT, DESCRIPTION VARCHAR(255) NULL, IP_ADDRESS VARCHAR(16) NULL, SERIAL VARCHAR(20) NULL, DEVICE_ID VARCHAR(20) NULL, PRIMARY KEY(ID_POWER_METER) ); CREATE TABLE PARAMETER ( ID_PARAMETER INTEGER UNSIGNED NOT NULL AUT...
true
484257bddb5cf7cedeac8f6bfc59c005bb408f60
SQL
teddkim/orderbook
/Documentation/Schemas/orderbook_Schema_09142020.sql
UTF-8
4,525
3.5
4
[]
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_SUBSTI...
true
547adbf2d8b1d162337eafad411623558ca6e1c2
SQL
wooiron/DataBaseSystem
/SQL/10.sql
UTF-8
141
3.3125
3
[]
no_license
SELECT CP.NICKNAME FROM POKEMON AS P, CATCHEDPOKEMON AS CP WHERE P.ID = CP.PID AND CP.LEVEL>=50 AND CP.OWNER_ID >=6 ORDER BY CP.NICKNAME;
true
d7ea5a1a70d943ef0cdb7ac85c73152713401913
SQL
MoritzKorsch/lecture_software_engineering_summer_2016
/app/webapps/secu/WEB-INF/schema.sql
UTF-8
442
3.015625
3
[]
no_license
CREATE TABLE USER ( ID INTEGER GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY, name VARCHAR(255) UNIQUE, pass VARCHAR(255), salt VARCHAR(255) ); CREATE TABLE TEXT ( ID INTEGER GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY, name VARCHAR(255), content LONGVARCHAR, projectID INTEGER ); CREATE TABLE PROJECTS ( ID ...
true
88b94e267c9c102bbf9e650552f9f5b3c240e34a
SQL
82crisbar/MaFormationWF3
/Music-Match/bdd_Project.sql
UTF-8
38,517
2.859375
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Client : 127.0.0.1 -- Généré le : Mer 09 Août 2017 à 16:58 -- Version du serveur : 10.1.13-MariaDB -- Version de PHP : 5.6.23 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARA...
true
cbf12564ab74a6e4af2d446cb728be69cb5d627c
SQL
borovikovd/todomvc-backend
/src/main/resources/schema.sql
UTF-8
382
2.609375
3
[]
no_license
create table if not exists todo_item ( id identity primary key, title varchar(1000) not null, completed boolean not null, ord integer not null ); create table if not exists user ( id identity primary key, email varchar(1000) not null, password_hash varchar(1000) not null ); insert into use...
true
c21d1b3674f8a3a0632165c56ed0338055390952
SQL
rich-zavala/MayabEvaluaciones
/db_info/MayabEvaluaciones/mayab_evaluaciones/Empleados disponibles.sql
UTF-8
331
2.609375
3
[]
no_license
DROP VIEW IF EXISTS empleados_disponibles; CREATE VIEW empleados_disponibles AS SELECT e.empleado, e.n, e.nombre, e.apellido_paterno, e.apellido_materno, e.departamento, departamento_n, e.nivel, e.puesto, puesto_n, e.area, e.email, e.status, e.fechaRegistro fechaRegistro FROM empleados_formato e WHERE e....
true
484b6d1162cc688ec6d738d8ecefa250d2bb0e69
SQL
storrellas/nary_tree
/output/export.sql
UTF-8
1,028
3.3125
3
[]
no_license
DROP TABLE IF EXISTS employee; DROP TABLE IF EXISTS employee_stats; -- Table: employee CREATE TABLE employee ( id INTEGER PRIMARY KEY AUTOINCREMENT, supervisor INT REFERENCES employee ( id ), name VARCHAR( 20 ) ); INSERT INTO [employee] ([id], [supervisor], [name]) VALUES ...
true
d5f90c715051ceaff3139afd20e3b900e2f45c39
SQL
NancyShao111/SQL_Practice
/Leetcode-Database-Question-Solutions/180. Consecutive Numbers(Medium).sql
UTF-8
236
3.828125
4
[]
no_license
SELECT DISTINCT Num AS "ConsecutiveNums" FROM (SELECT Num, LAG(Num,1) OVER (ORDER BY Id) AS "LAG1", LAG(Num,2) OVER (ORDER BY Id) AS "LAG2" FROM Logs) AS A WHERE Num = LAG1 AND Num = LAG2; #differentiate consecutive numbers VS numbers
true
da5c9252270acef5b1413e10c6e6b64567085f85
SQL
sreejitha-mc/menu-angular
/menu.sql
UTF-8
1,601
3
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.5.4.1deb2ubuntu2 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Sep 26, 2020 at 12:45 AM -- Server version: 5.7.22-0ubuntu0.16.04.1 -- PHP Version: 5.6.37-1+ubuntu16.04.1+deb.sury.org+1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40...
true
de7ee8fb14d73665ce62a965a82a5a2f8c444d8e
SQL
aravindwithu/sms
/Oracle_SMS/trgB4StudentsDelete.sql
UTF-8
787
3.078125
3
[]
no_license
CREATE OR REPLACE TRIGGER trgB4StudentsDelete AFTER DELETE ON students REFERENCING NEW AS new OLD AS old FOR EACH ROW DECLARE v_username varchar2(10); isValid number; BEGIN isValid := 0; isValid := SMSPack.fn_Is_Student_Enrolled(:old.sid); if(isValid = 0) then delete from enrollment...
true
84c7a7aeb1e73090d327cd4f59725b34e4c66b9a
SQL
kisley-viana/bd2
/exemplos/procedures/funcao_positivo.sql
UTF-8
131
2.59375
3
[]
no_license
-- drop function if exists primo; DELIMITER $$ create FUNCTION positivo(numero int) returns boolean BEGIN return numero>0; end $$
true
365f91c3495f475056a0f0c9e133b230fd47a117
SQL
fahrezialwi/jc10-backend
/sql/latihan_1.sql
UTF-8
601
3.3125
3
[]
no_license
use latihan_1; select * from users join cart on users.id = cart.user_id; select product_name, username as pemilik from users join cart on users.id = cart.user_id; -- select * from users -- join cart on users.username = cart.pemilik; select * from users; select * from cart; select * from users where not role = 'ad...
true
0ae7596bcc65b30a8718b44684994ed512e7e7e0
SQL
liuqian1990/we-cmdb
/cmdb-core/src/test/resources/db/data_model.sql
UTF-8
245,827
3.15625
3
[ "Apache-2.0" ]
permissive
CREATE SCHEMA IF NOT EXISTS CMDB_TEST; SET SCHEMA CMDB_TEST; SET FOREIGN_KEY_CHECKS=0; CREATE TABLE IF NOT EXISTS `adm_attr_group` ( `id_adm_attr_group` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id_adm_attr_group', `name` varchar(64) DEFAULT NULL COMMENT '组名', PRIMARY KEY (`id_adm_attr_group`) ) ENGINE=InnoDB DEF...
true
ae1f1d25fee4486a0dbdf535af00dd2b95caf451
SQL
craigatk/projektor
/server/persistence/database-schema/src/main/resources/db/migration/V26__AddFileCoverageTable.sql
UTF-8
650
3.140625
3
[ "MIT" ]
permissive
CREATE TABLE code_coverage_file( id bigserial primary key, code_coverage_run_id bigint references code_coverage_run ON DELETE CASCADE, code_coverage_group_id bigint references code_coverage_group, stats_id bigint references code_coverage_stats, directory_name ...
true
d70aab0b7b3c2508c314b776c83a22610bd0411c
SQL
prestodb/presto
/presto-product-tests/src/main/resources/sql-tests/testcases/tpcds/q36.sql
UTF-8
1,026
3.734375
4
[ "Apache-2.0" ]
permissive
-- database: presto_tpcds; groups: tpcds; requires: io.prestodb.tempto.fulfillment.table.hive.tpcds.ImmutableTpcdsTablesRequirements SELECT ("sum"("ss_net_profit") / "sum"("ss_ext_sales_price")) "gross_margin" , "i_category" , "i_class" , (GROUPING ("i_category") + GROUPING ("i_class")) "lochierarchy" , "rank"() OVER...
true
b9ddde34c9aaf6ac03522dca59fc6498507d5f5e
SQL
nishitpatel01/Data-Science-Toolbox
/algorithm/SQL/614_Second_Degree_Follower.sql
UTF-8
404
3.859375
4
[ "MIT" ]
permissive
-- Write your MySQL query statement below SELECT f1.follower ,COUNT(DISTINCT f2.follower) num FROM follow f1 JOIN follow f2 ON f1.follower = f2.followee GROUP BY f1.follower -- for study, f0 does not matter, don't care about original followee SELECT f1.followee AS 'f0' ,f1.follower AS 'f1' ,...
true
5a8f19499fcd4067ed3952863082341421ff4604
SQL
atifhingwala/credit-share2020
/creditshare.sql
UTF-8
2,969
3.375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.9.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Aug 29, 2020 at 05:55 AM -- Server version: 10.4.8-MariaDB -- PHP Version: 7.1.32 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
true
fdf5ad7ccd41fa75f75e0a7001289bbdc4965d76
SQL
miyasaka/Frontire
/resources/data/selEventDt.sql
UTF-8
754
3.546875
4
[]
no_license
--イベント参加情報取得 select cei.cid ,cei.bbsid ,cei.event_year ,cei.event_month ,cei.event_day ,cei.event_note ,cei.eventarea_note ,cei.limit_year ,cei.limit_month ,cei.limit_day ,ceei.mid from community_event_info cei ,community_evententry_info ceei ,community_bbs cb where cei.cid = /*cid*/ and cei.cid =...
true
81d3832c2c7140a84ef406bc57b6b74cc8afed79
SQL
armandoaepp/PHPeru-FrameWork
/v.0.8/clases/Procedure/Procedure_evento_img.sql
UTF-8
1,528
3.515625
4
[]
no_license
/* Procedures Generada desde Cix-PHP - by power @armandoaepp */ DELIMITER ;; CREATE PROCEDURE usp_set_evento_img( id int(11),imagen varchar(200),id_padre int(11),orden int(11),estado int(1),fecha timestamp ) BEGIN INSERT INTO evento_img( evento_img.id, evento_img.imagen, evento_img.id_padre, evento_img.orden...
true
e575527dd5a8c34339c1912a784baf6e35c31808
SQL
blackpanther89/bvg-petition
/sql/tables.sql
UTF-8
655
3.3125
3
[]
no_license
DROP TABLE IF EXISTS signatures; DROP TABLE IF EXISTS user_profiles; DROP TABLE IF EXISTS users; CREATE TABLE signatures( id SERIAL primary key, -- firstName VARCHAR(255) not null, -- lastName VARCHAR(255) not null, signature text, user_id INT not null ); CREATE TABLE user_profiles( id SERIAL...
true
e65074e193fbca9a1bb22b2a62e0304835fb6f97
SQL
jcleefw/keepit
/keepit.sql
UTF-8
4,346
3.53125
4
[]
no_license
CREATE DATABASE keepit; TRUNCATE TABLE feeds RESTART IDENTITY TRUNCATE TABLE raw_feeds RESTART IDENTITY \c keepit CREATE TABLE users ( id SERIAL4 PRIMARY KEY , username VARCHAR(20) NOT NULL, password VARCHAR(45), firstname VARCHAR(50), lastname VARCHAR (50), suburb VARCHAR(45), country VARCHAR(45), ...
true
ec213aedead52742db43ab3214a76287f6ef9c46
SQL
eajardini/bd2a3
/20200204_criabaseBD_Postgres.sql
UTF-8
17,150
3.78125
4
[]
no_license
--Versão do banco de dados: 20190128 --Criar a banco de dados /* CREATE DATABASE bd2a3 WITH OWNER = postgres ENCODING = 'UTF8' CONNECTION LIMIT = -1; ALTER DATABASE bd2a3 SET datestyle TO 'ISO, DMY'; */ --Dropando a base --drop table devedor; --drop table depositante; --drop table conta; --drop tab...
true
eb6e3e819439ceb281eedb5562bb79e7c61ebcc1
SQL
meeDamian/tweet-a-gist
/db/migrations/20161020183413_MigrateUpdateToData.sql
UTF-8
304
2.796875
3
[ "MIT" ]
permissive
-- +goose Up -- SQL in section 'Up' is executed when this migration is applied INSERT INTO data (hash, country, city, phone, at) SELECT 'dcb83c4e', country, city, phone, at FROM update ORDER BY at DESC; -- +goose Down -- SQL section 'Down' is executed when this migration is rolled back TRUNCATE data;
true
2429bc6c971ca21410fd2cd2fbf9d0b3c13df6dd
SQL
CodingKaiser/bamazon-store-front
/bamazon-boilerplate.sql
UTF-8
1,389
2.9375
3
[]
no_license
create database bamazon; use bamazon; create table products ( item_id int auto_increment not null, product_name varchar(100) not null, department_name varchar(100) default 'miscellaneous', price double default 0.0, stock_quantity int default 0, primary key (item_id) ); select * from products; i...
true
35abaeac2fa85fbf6abeefbbb1c5fccf0223d9bc
SQL
Suchitkoli/SUCHIT_KOLI_MS_SQL_SERVER
/SUCHIT_KOLI_SQL_PROJECT/BOOKSHOP_CREATE_TABLE.sql
UTF-8
1,787
3.59375
4
[]
no_license
use BookShop; CREATE TABLE Author ( name varchar(255), CONSTRAINT unique_name UNIQUE (name) , address varchar(255), CONSTRAINT unique_address UNIQUE (address), url varchar(255) ); Create table Publisher( name varchar(255), CONSTRAINT unique_pname UNIQUE (name), address varchar(255), phone varchar(255), ...
true
2b9d6b589f73267b2bcaeffb678decc9f8be77d9
SQL
crash2807/PicceriaPro1
/Picceria_create(1).sql
UTF-8
5,752
3.25
3
[]
no_license
-- Created by Vertabelo (http://vertabelo.com) -- Last modification date: 2019-12-10 22:28:39.547 -- tables -- Table: Administrator CREATE TABLE Administrator ( idAdmina int NOT NULL, imie varchar(20) NOT NULL, nazwisko varchar(50) NOT NULL, login varchar(20) NOT NULL, hasloAdmina varchar(20) ...
true
f19f36a2f0b7508e26774ccd22eb4e185b1631cf
SQL
FernandoCastilh/precantoalmare
/pousada.sql
UTF-8
8,969
3.03125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Tempo de geração: 22-Out-2020 às 21:28 -- Versão do servidor: 10.4.14-MariaDB -- versão do PHP: 7.4.9 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CL...
true
4babd5a4794b572c4c5b01c2753d1e9d33e8e4a2
SQL
Yujiro3/RSSMatome
/Application/Database/mysql.sql
UTF-8
5,023
3.0625
3
[ "MIT" ]
permissive
CREATE TABLE IF NOT EXISTS `entry` ( `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID', `modified` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新日時', `ref_site` int(10) unsigned NOT NULL COMMENT 'サイトID', `status` tinyint(4) NOT NULL DEFAULT '0' COMMENT 'captchaフラグ', `hash...
true
b1cef4aa113999f4406e2e508e141bd91b4e1a21
SQL
mrdinklepus/hometown
/hometown/dbLoad/HomeTownBankOracle.sql
UTF-8
25,856
2.984375
3
[]
no_license
-- Updated by RKJ: Oct. 16 MST 2007 -- Drop sequences DROP SEQUENCE HOMETOWNBANK.seqLookup; DROP SEQUENCE HOMETOWNBANK.seqBranch; DROP SEQUENCE HOMETOWNBANK.seqPerson; DROP SEQUENCE HOMETOWNBANK.seqAddress; DROP SEQUENCE HOMETOWNBANK.seqPhone; DROP SEQUENCE HOMETOWNBANK.seqPayee; DROP SEQUENCE HOMETOWNBA...
true
e36829111486d39f1d8b408bd5fe38bfbb3d5015
SQL
Jesdakorns/cultural_playground_management_laravel
/museum.sql
UTF-8
4,712
3.09375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.9.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Feb 19, 2020 at 04:54 PM -- Server version: 10.4.10-MariaDB -- PHP Version: 7.3.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OL...
true
0176323533595ab79f5c72f7baa65f9eec814ea7
SQL
et35-proyecto-info-1/oixum-sql-picantes
/scripts/crearTabla.sql
UTF-8
866
3.40625
3
[]
no_license
CREATE DATABASE IF NOT EXISTS test; use test; CREATE TABLE IF NOT EXISTS test.estudiantes ( id INT NOT NULL AUTO_INCREMENT, nombre varchar(100) NOT NULL, comidaPreferida varchar(100) NULL, fechaNacimiento DATE NOT NULL, CONSTRAINT estudiantes_PK PRIMARY KEY (id) ); insert into estudiantes values (...
true
4173fce9e52fbbc125ed5e9c3d6548de68f33824
SQL
ROHITKUMAR96/online-shopping-project
/shoppingbackend/databaseQueries.sql
UTF-8
200
2.703125
3
[]
no_license
CREATE TABLE category ( id NUMBER(10) NOT NULL, name VARCHAR2(50), description VARCHAR2(255), image_url VARCHAR2(50), is_active NUMBER(1), CONSTRAINT pk_category_id PRIMARY KEY (id) );
true
77616ce42bb43a21f68e57d03e6fa9147b05ee38
SQL
moutainhigh/stock-1
/stock_configuration/src/test/resources/stock_channel_prod_sub.sql
UTF-8
878
2.890625
3
[]
no_license
CREATE TABLE `stock_channel_prod_sub` ( `id` int(11) NOT NULL COMMENT ' 非业务id', `channel_code` varchar(30) NOT NULL COMMENT ' 渠道编码', `six_prod_id` varchar(6) DEFAULT NULL COMMENT '商品6位码', `eight_prod_id` varchar(8) DEFAULT NULL COMMENT ' 商品8位码', `prod_id` varchar(11) DEFAULT NULL COMMENT '商品11位码', `or...
true
504c1ec1c588a80fb5d201645b4a7ddf3544c79d
SQL
green-fox-academy/polligeri
/TSQLexam/e2.sql
WINDOWS-1252
854
4.28125
4
[]
no_license
/* Exercise #2 Create a report of all Colors and the number of Stock Items that each color has. Return all Colors regardless how many Stock Items they have. (zero or more) Not all colors have Stock Items. If a color has no Stock Item, display 0 (zero) in [Number of Stock Items]. Order the report by the Number o...
true
a235ac26f3b918babeed058839d45b725b88c12b
SQL
ifarahi/42_camagru
/app/config/database_tables.sql
UTF-8
972
3.203125
3
[]
no_license
CREATE TABLE IF NOT EXISTS users ( id INT PRIMARY KEY AUTO_INCREMENT NOT NULL, name VARCHAR(255), username VARCHAR(255), email VARCHAR(255), password VARCHAR(255), profile_img VARCHAR(255) DEFAULT 'img/default-profile.png', email_notification INT(11) DEFAULT '1', activation TINYINT(1) DE...
true
06806707a661f39e68f49dc8b231b9ce18d2225a
SQL
micheleCostabile/CentroEstetico
/FUNZIONI/PROCEDURE/orariDisp.sql
UTF-8
513
2.75
3
[]
no_license
CREATE DEFINER=`root`@`localhost` PROCEDURE `orariDisp`(dataa DATE, durataapp INT, macc INT UNSIGNED) BEGIN DECLARE inizio TIME DEFAULT '09:00:00'; DROP TEMPORARY TABLE IF EXISTS Ore; CREATE TEMPORARY TABLE Ore(Ora TIME PRIMARY KEY); WHILE inizio <= '17:00:00' DO INSERT INTO Ore VALUES (inizio...
true
cab5a84c8dd819a977cf86c01059ed75ded816bb
SQL
shenwei15052247521/hrrq
/core/src/extra/sql/statementview.sql
UTF-8
3,115
3.59375
4
[]
no_license
CREATE VIEW statement AS SELECT CASE (t14.ticket_type) WHEN 0 THEN '消费' WHEN 1 THEN '充值' WHEN 2 THEN '退费' END AS typt, t1.record_load_datetime AS recordTime, t1.record_acct_id AS acctId, t1.record_bf_load AS bfBalance, t1.record_load AS balance, t1.rec...
true
403a77230c201d06575da2b7e3f1e5294394ec3b
SQL
hugdru/TBDA
/proj3/4_3b.sql
UTF-8
276
3.53125
4
[]
no_license
SELECT freguesias.nome, votacoes.votos FROM freguesias INNER JOIN votacoes ON freguesias.codigo = votacoes.freguesia INNER JOIN concelhos ON concelhos.codigo = freguesias.concelho AND concelhos.nome = 'Lisboa' WHERE votacoes.partido = 'CDSPP' ORDER BY votacoes.votos DESC;
true
064900434e6b133c7b354bd66bf00f65f4f0359a
SQL
jtestard/ForwardQueryCompiler
/src/test/resources/edu/ucsd/forward/query/logical/rewrite/ExternalFunctionSetup.sql
UTF-8
1,017
3.796875
4
[]
no_license
--drop schema if exists external cascade; create schema external; set search_path to external; -- Table: customer CREATE TABLE public.customer ( cid integer NOT NULL, "name" character varying(30), state character(2), CONSTRAINT customer_pk PRIMARY KEY (cid) ) WITH ( OIDS=FALSE ); INSERT INTO public.custo...
true
dcd9dc66152f1c564e74b64b5420838659d4624f
SQL
blootix/new_migration
/approche migration total/ancien_approche_mig/migration/district/parametre_dist/R_cpostal.sql
UTF-8
76,736
2.515625
3
[]
no_license
create table R_CPOSTAL ( kcpost NUMBER(4) not null, libelle VARCHAR2(300) not null ); prompt Importing table r_Cpostal... set feedback off set define off insert into r_Cpostal (KCPOST, LIBELLE) values (2017, 'KHAZNADAR'); insert into r_Cpostal (KCPOST, LIBELLE) values (2015, 'KRAM'); insert into r_Cpostal (KCPOST...
true
67c501b0692cc8500a802fb3847e8e65db334431
SQL
exasol/sports-analytics
/convex hull showcase/function_convex_hull.sql
UTF-8
3,828
3.203125
3
[ "MIT" ]
permissive
/************************************************ UDF to calculate the convex hull polygons for one single frame in a football match. The function expects group sets for each single frame, so the polygons for multiple frames a calculated v1.0: - initial parameter: match_id unique identifi...
true
5596e3b84d649c2fe2780738ac9d2fa9f2d274f9
SQL
akhoury105/movie-app-ak
/movie_app_test.sql
UTF-8
4,796
2.875
3
[]
no_license
-- -- PostgreSQL database dump -- -- Dumped from database version 12.4 -- Dumped by pg_dump version 12.3 -- Started on 2020-12-05 13:26:20 SET statement_timeout = 0; SET lock_timeout = 0; SET idle_in_transaction_session_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings = on; SELECT pg_catalo...
true
b755320e4fb29dad3492a497cdc40b94ad30798c
SQL
kvslee/sciug2018
/offline/sql/circ_trans.sql
UTF-8
482
3.078125
3
[]
no_license
SELECT regexp_replace(ct.patron_home_library_code, '\s+$', '') AS patron_home_library_code, regexp_replace(ct.ptype_code, '\s+$', '') AS ptype_code, to_char(ct.transaction_gmt, 'YYYY/MM/DD') AS time, ct.op_code, ct.count_type_code_num, ct.application_name, ct.itype_code_num, regexp_replace(ct.item_location_code...
true
1d75c4994b351d0e52c0ea14b2390e5c32aac1ba
SQL
SteelBIM/fxtcode
/FxtCenterService/tags/rel_20160922/FxtCenterService.DataAccess/SQL/AutoPrice/FloorNoListMCAS.sql
UTF-8
2,937
4.15625
4
[]
no_license
SELECT a.* --,c.NominalFloor ,isnull(c.housecnt, 0) AS housecnt FROM ( SELECT DISTINCT FloorNo FROM @table_house h WITH (NOLOCK) WHERE BuildingId = @buildingid AND valid = 1 AND CityId = @cityid AND h.HouseId NOT IN ( SELECT HouseId FROM @table_house_sub hs WITH (NOLOCK) WHERE h.HouseId = hs.HouseId...
true
d1786af10bb280cbe59005db936670f2850494f2
SQL
gurpreet19/ec198392_wht
/Database/06_CVX_template/01_RP_Packages/RP_DATASET_FLOW_AMEND_CONN.sql
UTF-8
3,649
2.90625
3
[]
no_license
-- START PKG_GEN_PKGS.sf_get_functions at:05/07/2019 10.27.50 AM CREATE or REPLACE PACKAGE RP_DATASET_FLOW_AMEND_CONN IS FUNCTION APPROVAL_BY( P_REF_ID IN VARCHAR2, P_PREVIOUS_REF_ID IN VARCHAR2) RETURN VARCHAR2; FUNCTION APPROVAL_STATE( P_REF_ID IN VARCHAR2, P_PREV...
true
23da27912e58e9f99e799b91c1626074d2c71927
SQL
amyvong/sql-challenge
/EmployeeSQL/queries.sql
UTF-8
1,678
4
4
[]
no_license
select employees.emp_no, employees.last_name, employees.first_name, employees.sex, salaries.salary from employees inner join salaries ON employees.emp_no = salaries.emp_no; select employees.first_name, employees.last_name, employees.hire_date from employees where hire_date >= '1/1/1986' and hire_date <= '12/31/1986'...
true
72869529247d770b99a6a9d5e4771fb3bc1ec787
SQL
OstyPowers/2nd-Year_2nd-Semester_Database_Assignment_2
/Assignment 2/Appendix A/Create Database.sql
UTF-8
1,693
3.796875
4
[]
no_license
create database GuestHousesMao0417; use GuestHousesMao0417; create table calendar ( i date primary key ) create table room_type ( id varchar(6) primary key, description varchar(100) ) create table rate ( room_type varchar(6) foreign key references room_type(id), occupancy int not null check (occupancy ...
true
d0700d091e7e2637673bf3f88fd73d5c496c2da9
SQL
jbelke/E-Commerce-Server
/prisma/migrations/20211010065826_add_navigation_menu_modal/migration.sql
UTF-8
514
3.234375
3
[]
no_license
-- CreateTable CREATE TABLE "navigationMenu" ( "id" SERIAL NOT NULL, "name" TEXT, "order" INTEGER NOT NULL, "parentId" INTEGER, "isMegaMenu" BOOLEAN NOT NULL DEFAULT false, "linkName" TEXT, "linkPath" TEXT, "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, "updatedAt" TIME...
true
b3e92b98c6180294e3f1630a81a66192a234afc2
SQL
AllCAPs788/Department_SQL_Data
/Schema.sql
UTF-8
844
3.625
4
[]
no_license
CREATE TABLE departments ( dept_no VARCHAR(255) PRIMARY KEY, dept_name VARCHAR(255) ); CREATE TABLE titles ( title_id VARCHAR(255) PRIMARY KEY, title VARCHAR(255) ); CREATE TABLE employee_data ( emp_no INT PRIMARY KEY, emp_title_id VARCHAR(255), FOREIGN KEY (emp_title_id) REFERENCES titles (title_id), birth_d...
true
79ef5df83532408dccd072e0cd0c29cd966c8814
SQL
baloise/codes-and-texts
/cat-server/src/main/resources/db/migration/V20191009174750__ignoring_0-valued_codevalues.sql
UTF-8
381
3.109375
3
[ "Apache-2.0" ]
permissive
DROP VIEW codevalue; CREATE VIEW codevalue (id, value, codetype_id, name, creator, created) AS -- SELECT DENSE_RANK() OVER (order by codetyp_nr, wert) as id, -- will enumerate - not good for deletes SELECT concat_ws(':', codetyp_nr, wert), wert, codetyp_nr, RTRIM(name), RTRIM(erfasser), ...
true
7058ed0d5d1f3162d93cc0692df7c668244b0c17
SQL
ManuRamirez/ajax
/daw.sql
UTF-8
3,121
3.140625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.3 -- https://www.phpmyadmin.net/ -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 26-02-2019 a las 17:38:12 -- Versión del servidor: 10.1.35-MariaDB -- Versión de PHP: 7.2.9 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; ...
true
5631bc8477d19ffd252dd01813d5777dcb9d2f59
SQL
redskylark1995/WarehouseForStudy
/笔记/第22天sql/20170810.sql
UTF-8
4,044
3.359375
3
[]
no_license
#数值函数 #绝对值 #select abs(2), abs(0), abs(-2); #十进制转换成其他进制 #select bin(8), oct(8), hex(8), hex(17); #设置的正负性 #select sign(-1),sign(-2),sign(0),SIGN(1),SIGN(2); #获得0~1的随机数 #select rand()*100, ceiling(rand()*100); #四舍五入 #select round(100.256), round(100.256, 2), round(100.246, 1), round(100.256, 5), round(159.256, -2); ...
true
d68f0aaab083c9b4bea2ab89ec8fd2523ea28808
SQL
pro4424/sql-challenge
/schemata1.sql
UTF-8
1,336
3.625
4
[]
no_license
CREATE TABLE "Department" ( "deot_no" int NOT NULL, "dep_name" text NOT NULL, CONSTRAINT "pk_Department" PRIMARY KEY ( "deot_no" ) ); CREATE TABLE "Employee" ( "emp_no" int NOT NULL, "birth_date" date NOT NULL, "first_name" text NOT NULL, "last_name" text NOT NULL, ...
true
5050c244ab53156c49ca415bb48203e86f89c01b
SQL
SyaneAndrade/leilao-pi
/banco_create.sql
UTF-8
898
3.453125
3
[]
no_license
CREATE SCHEMA `leilao`; USE `leilao`; CREATE TABLE `usuario` ( `id` smallint(5) unsigned NOT NULL AUTO_INCREMENT, `login` varchar(50) DEFAULT NULL, `senha` varchar(50) NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `login_UNIQUE` (`login`) ); CREATE TABLE `leilao` ( `id` smallint(5) unsigned NOT NULL AUTO_INC...
true
90800a35f025718e544bded8d7701732e4d3418d
SQL
huxiaorong/Project-Training
/刘璇/learning_chinese.sql
UTF-8
106,043
3.078125
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : localhost_3306 Source Server Version : 50615 Source Host : localhost:3306 Source Database : learning_chinese Target Server Type : MYSQL Target Server Version : 50615 File Encoding : 65001 Date: 2020-05-17 19:51:27 */ SE...
true
1d83a7c40ebdd8f36e84480f4314623d77760fc0
SQL
karenwsit/enron_data_project
/queries.sql
UTF-8
5,100
5
5
[]
no_license
/* Question 1: How many emails did each person receive each day? Comments: Solution does not display people who received 0 emails. To do so, a calendar table needs to be created & joined to. Assumption: Each recipient/sender has 1 unique email when in real life, there could be multiple variations/forms of the 'same' em...
true
66885ef4af0d51111b64ec5f549a84ed08546e2a
SQL
franciscormelo/SIBD_Project
/PART2/Code/hospital_indexes.sql
UTF-8
350
2.59375
3
[ "MIT" ]
permissive
-- Assignment 2 - Indexes -- Group 8 -- 63070 Diogo Sardinha -- 84053 Francisco Melo -- 89213 Rodrigo Rego -- For Query 1 CREATE INDEX name_index ON person(name); CREATE INDEX vat_vet_index ON consult(VAT_vet); CREATE INDEX animal_vat_index ON animal(VAT); CREATE INDEX animal_name_index ON animal(name); -- For Qu...
true
f37c3f35af4809b604527ea6be6aaf180568ec2c
SQL
katekhazanova/Lehigh
/uachieve-server-4.3.0.4/sql/scripts/db2/create/uachieve_DB2_create_table.sql
UTF-8
104,080
3.1875
3
[]
no_license
/*================================================================*/ /* DBMS name: IBM DB2 */ /* Created on: 8/13/2008 2:30:15 PM */ /* Last Updated: 9/03/2015 */ /* Script name: uachieve_DB2_create_t...
true
adcd38ca47ac1f6582eb9ccb33c2f06256f4e2a9
SQL
cristifalcas/remote_expect
/scripts_sql/altele/scripts/page2/02. sql_partitions2_v8.sql
UTF-8
924
3.765625
4
[]
no_license
select name, '(select max ('|| column_name ||') from ' || name || ');' from user_part_key_columns where object_type like 'TABLE%' and name in (select a.table_name from (select u.table_name, u.TABLE_NAME || min(to_number(substr(substr(partition_name, ...
true
1f6cf9270a9c31b8f1b23b398d47bb9adec6f7b4
SQL
dojin1230/SQL-local
/new queries/180326lc_mrm.sql
UTF-8
2,482
2.765625
3
[]
no_license
SELECT "재단법인 그린피스" AS 지부, "" AS 회원번호, base_MPC.code AS 사용자입력1, "Lead Conversion" AS 가입경로, case when base_MPC.가입체널 like '%카카오-E%' THEN 'Antarctica_Emoticon' else 캠페인명.캠페인영어명 END AS 가입경로상세, "아니오" AS 탈퇴여부, IIf([base_MPC].[후원구분]="정기","예","아니오") AS 납부여부, "10" AS 납부일, "Normal" AS 회원상태, "MPC" AS 사용자구분10, "아니오" AS 납부일시중지여부...
true
09bf26ef7f9084252377c66688bd8f76b00ee2c9
SQL
MistarKomeng378/SSO
/New folder/mskko.sql
UTF-8
1,932
3.234375
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : kinerja Source Server Version : 50505 Source Host : localhost:3306 Source Database : db_kinerja Target Server Type : MYSQL Target Server Version : 50505 File Encoding : 65001 Date: 2019-04-15 11:45:10 */ SET FOREIGN_KEY_CHECKS=0; -- ...
true
90c1ca8b0bd3bc1daaa812226747ee8201c5ffdf
SQL
marekbrzo/SQLNotes
/4-2_JOINExample.sql
UTF-8
1,905
4.0625
4
[]
no_license
-- Examples of joining DROP TABLE IF EXISTS leftJOIN; DROP TABLE IF EXISTS rightJOIN; CREATE TABLE leftJOIN( id INTEGER, DESCRIPTION TEXT ); CREATE TABLE rightJOIN( id INTEGER, DESCRIPTION TEXT ); INSERT INTO leftJOIN VALUES(1, 'left 01'); INSERT INTO leftJOIN VALUES(2, 'left...
true
27ceefdb1a6a7c4be58d8ca939d2f127a7d45697
SQL
aborngra/STOCKAN
/STOCKAN/DML/SYMBOLS_Stocks.sql
ISO-8859-1
12,283
2.8125
3
[]
no_license
DECLARE v_symbol_type_id symbol_types.id%TYPE; BEGIN v_symbol_type_id := symbol_types_api.get_pk_by_unique_cols(p_name => 'Stock'); MERGE INTO symbols trg USING (SELECT 'Covestro' AS name , '1COV.DE' AS symbol , 'DE0006062144' AS isin , 'STOCKS_DAX3...
true
05c047167be29fb1e39b8a407ca9acc30eee7537
SQL
Sywooch/YII2-Starter-Admin-Panel
/console/data/default_table.sql
UTF-8
12,710
2.921875
3
[ "BSD-3-Clause" ]
permissive
-- phpMyAdmin SQL Dump -- version 3.5.8.1 -- http://www.phpmyadmin.net -- -- Host: :3306 -- Generation Time: May 10, 2017 at 05:07 PM -- Server version: 5.7.18-0ubuntu0.16.04.1 -- PHP Version: 5.6.30-10+deb.sury.org~xenial+2 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_...
true
d9925c93eab380f2c12510633c88b8272f6f27b0
SQL
Air-Cooled/diboot
/iam-base-starter/src/main/resources/META-INF/sql/init-iam-base-mysql-upgrade.sql
UTF-8
2,604
3.609375
4
[ "Apache-2.0" ]
permissive
ALTER TABLE iam_user ADD COLUMN tenant_id bigint NOT NULL DEFAULT 0 COMMENT '租户ID' AFTER id; ALTER TABLE iam_account ADD COLUMN tenant_id bigint NOT NULL DEFAULT 0 COMMENT '租户ID' AFTER id; ALTER TABLE iam_role ADD COLUMN tenant_id bigint NOT NULL DEFAULT 0 COMMENT '租户ID' AFTER id; ALTER TABLE iam_user_role ADD COLUMN t...
true
32ef8e70ceb7e8ee086c90dcfbd5e4bd27bc7a60
SQL
kentr/drupal-vm
/scripts/post-provision/templates/wraith-paths-drupal.d8.sql
UTF-8
3,515
4.21875
4
[ "MIT" ]
permissive
SET SESSION group_concat_max_len = 1000000; SELECT GROUP_CONCAT( CONCAT( ' ', TYPE, '..', REPLACE(path, '/', '__'), ':', "\n" ' ', 'path: ', path ) ORDER BY TYPE, path SEPARATOR "\n" ) AS `paths:` FROM ( -- NODES SELECT title , CONCAT('node..', `type`) AS `type` , path ...
true
f9acceaa8b9a99b04cf3b4ff366ea1928eb3dcbf
SQL
JSU20164206181/VoteSystem_20164206181
/vote.sql
UTF-8
11,144
3.34375
3
[]
no_license
/* Navicat Premium Data Transfer Source Server : 1 Source Server Type : MySQL Source Server Version : 50635 Source Host : 127.0.0.1:3306 Source Schema : vote Target Server Type : MySQL Target Server Version : 50635 File Encoding : 65001 Date: 13/07/2019 ...
true
b49b96afeb96cba1237d4f1ccd4cc78fa02e9586
SQL
bill17665490461/wanjia
/install/data/1/wst_user_ranks.sql
UTF-8
1,000
2.890625
3
[]
no_license
SET FOREIGN_KEY_CHECKS=0; DROP TABLE IF EXISTS `wst_user_ranks`; CREATE TABLE `wst_user_ranks` ( `rankId` int(11) NOT NULL AUTO_INCREMENT, `rankName` varchar(20) NOT NULL, `startScore` int(11) NOT NULL DEFAULT '0', `endScore` int(11) NOT NULL DEFAULT '0', `userrankImg` varchar(150) DEFAULT NULL, `dataFlag`...
true
acc5f4ddf8c89c6be178fa6f2dbb0836239b2bec
SQL
PhisaBya/ITCS3160Project
/SQL Campus Eats 12-3-2020.sql
UTF-8
49,593
3.46875
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_SUBSTI...
true
e69eed144a8af30e783d9dd11f1ab5490f5f21ff
SQL
Judoon/judoon
/share/migrations/SQLite/deploy/7/001-auto.sql
UTF-8
2,791
3.671875
4
[]
no_license
-- -- Created by SQL::Translator::Producer::SQLite -- Created on Wed Oct 10 14:07:57 2012 -- ; BEGIN TRANSACTION; -- -- Table: dataset_columns -- CREATE TABLE dataset_columns ( id INTEGER PRIMARY KEY NOT NULL, dataset_id integer NOT NULL, name text NOT NULL, sort integer NOT NULL, is_accession integer NOT ...
true
16bb4abddb9004c04562a50cd54aea7df7358c9b
SQL
pologood/storefeedback
/文件/缺断货二期三期/zmm_ds62_800.sql
UTF-8
1,679
2.828125
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : storefeedback_800_master Source Server Version : 50621 Source Host : 10.128.45.8:3306 Source Database : storefeedback Target Server Type : MYSQL Target Server Version : 50621 File Encoding : 65001 Date: 2015-08-18 15:37:11 */ SET FORE...
true
1d7758ca92608712220b7d885715c596d0581b88
SQL
bodhis96/HackerRack_problems
/HR_SQL/HR_SQL_binary_tree_nodes/final_ans.sql
UTF-8
192
3.203125
3
[]
no_license
-- *** FINAL ANSWER *** SELECT N, case when P is null then 'Root' else case when N in ( select P from BST ) then 'Inner' else 'Leaf' end end FROM BST ORDER BY N;
true
f71a3a716a072f532b1069dfc3ce893676e9617a
SQL
Harinikk2000/DATABASE_PROJECTS
/movie.sql
UTF-8
4,057
3.234375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Nov 09, 2020 at 01:56 PM -- Server version: 10.4.11-MariaDB -- PHP Version: 7.2.30 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIE...
true
8700a768d2129f094b1e3add4f6f25936f9aec13
SQL
marekbrzo/SQLNotes
/4-3_RelatingMultipleTables.sql
UTF-8
758
4.09375
4
[]
no_license
-- Joining multiple columns together SELECT * FROM customer; SELECT * FROM item; SELECT * FROM sale; SELECT i.name AS Item, c.name AS Customer, s.price AS Price FROM sale AS s JOIN item AS i ON s.item_id = i.id JOIN customer as c ON s.customer_id = c.id --ORDER BY Convert(Varc...
true
bf1360434919273dd95e9145facb91148450c803
SQL
rzulqarnain/FlightAppDemo
/SQL Script.sql
UTF-8
824,200
3.421875
3
[]
no_license
create table Aircraft ( aircraftID int not null, model varchar(30) not null, economySeats int not null, businessSeats int not null, firstSeats int not null, primary key (aircraftID) ); create table Airport ( code varchar(3) not null, city varchar(30) not null, country varchar(30) no...
true
b8b74014a9ae11f9e3fde41e458b32f554048cac
SQL
motoy3d/SmartJ-Server
/Docs/redsmylife_ec2_structure_20190206.sql
UTF-8
212,120
3.09375
3
[]
no_license
-- MySQL dump 10.13 Distrib 5.7.24, for Linux (x86_64) -- -- Host: localhost Database: redsmylife -- ------------------------------------------------------ -- Server version 5.7.24-log /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS ...
true
ff60570551c6d74152e724923e28910fa0ddcec1
SQL
shyjuk/unlp-ing-ii-ventapro
/src/WEB-INF/sql/productos/leerProducto.sql
UTF-8
1,066
3.265625
3
[]
no_license
delimiter $$ CREATE PROCEDURE `leerProducto`(idProducto int) BEGIN SELECT P.idProducto AS Producto_idProducto, P.idMarca AS Producto_idMarca, P.idTipoProducto AS Producto_idTipoProducto, P.codigo AS Producto_codigo, P.nombre AS Producto_nombre, P.precio AS Producto_precio, ...
true
d827ec3fa889199409a142f8ec74f5f4c2076055
SQL
J-Eugenio/Clinica
/SistemaClinica/BancoDeDados/Script_BancoDeDados_ClinicaTorres.sql
UTF-8
2,647
3.78125
4
[]
no_license
CREATE DATABASE clinica_candido_torres_database; USE clinica_candido_torres_database; CREATE TABLE USUARIO( IDUSUARIO INT(5) PRIMARY KEY AUTO_INCREMENT, NOME VARCHAR(100) NOT NULL, LOGIN VARCHAR(50) NOT NULL UNIQUE, SENHA VARCHAR(50) NOT NULL, TIPOUSUARIO VARCHAR(50) NOT NULL ); INSERT INTO USUARIO(NOME, LOGIN...
true
43d8fc0e08de2785958e30d17e26b93022f15df0
SQL
jkchow/PHP-Projects
/juzhencms1.5/juzhencms.sql
UTF-8
233,418
3.21875
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : localhostmysql5 Source Server Version : 50540 Source Host : localhost:3306 Source Database : juzhencms1.5 Target Server Type : MYSQL Target Server Version : 50540 File Encoding : 65001 Date: 2017-07-25 09:43:42 */ SET FOREIGN_KEY_CHEC...
true
75d91c1dad26e8a622a5e186f5cf63e8a49242f0
SQL
LuisBar05/BotanasDival
/DB_Dival/Triggers/tg_au_statusproveedor.sql
UTF-8
525
3.171875
3
[]
no_license
Use DB_Dival; Drop trigger if exists tg_au_statusproveedor; DELIMITER !! Create trigger tg_au_statusproveedor After Update on proveedores For each row BEGIN IF NEW.status='B' then UPDATE ingredientes SET status='B' WHERE ingredientes.Id_Proveedor=NEW.Id_Proveedor; END IF; IF NEW.status='I' then UPDATE ingredient...
true
0fbb0142d08de660709d4275ba1739957f48ec71
SQL
jgarzonext/plsql-testing
/script_plsql/bd_iaxis/script/tables/CONVENIOS.sql
UTF-8
1,225
2.90625
3
[]
no_license
-------------------------------------------------------- -- DDL for Table CONVENIOS -------------------------------------------------------- CREATE TABLE "AXIS"."CONVENIOS" ( "FINIVIG" DATE, "FFINVI" DATE, "TCONVENIO" VARCHAR2(100 BYTE), "CCODCONV" VARCHAR2(7 BYTE), "CIDIOMA" NUMBER(2,0) ) SEGMENT CR...
true
fc549a6dbdc6669156734543f90ad4a9ad9ea25e
SQL
isaiascaamalgarcia/excel_consultores
/excel_test.sql
UTF-8
2,634
2.78125
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : local Source Server Version : 50505 Source Host : localhost:3306 Source Database : excel_test Target Server Type : MYSQL Target Server Version : 50505 File Encoding : 65001 Date: 2016-10-06 10:40:16 */ SET FOREIGN_KEY_CHECKS=0; -- --...
true
aedb89c5f4b61735129c48f17ae3b612b73151eb
SQL
nea/vertx-mod-cassandra-persistor
/src/test/resources/cassandraPersistorExampleData.cql
UTF-8
2,213
2.828125
3
[ "Apache-2.0" ]
permissive
CREATE KEYSPACE vertxpersistor WITH replication={'class' : 'SimpleStrategy', 'replication_factor':1}; USE vertxpersistor; CREATE TABLE emptytable( id uuid PRIMARY KEY, key varchar, value varchar); CREATE TABLE fulltable( id uuid PRIMARY KEY, key varchar, value varchar, valueset set<text>, ...
true
8dbe1dc7815b487bc7a178b1d0e5c908c2731014
SQL
berlin75/tp5
/backup/think_members-180801.sql
UTF-8
2,082
2.78125
3
[ "Apache-2.0" ]
permissive
-- ---------------------------- -- 日期:2018-08-01 17:07:45 -- 仅用于测试和学习,本程序不适合处理超大量数据 -- ---------------------------- -- ---------------------------- -- Table structure for `think_members` -- ---------------------------- DROP TABLE IF EXISTS `think_members`;; CREATE TABLE `think_members` ( `uid` int(10) unsig...
true
7300fa2a8a213646c99d57a6cbbf66192062d6f0
SQL
snegri/Save2.0
/Save2.sql
UTF-8
1,981
3.96875
4
[]
no_license
use retrosheet; # get the initial state of the saving pitcher for each game SELECT e.game_ID as 'gID', ABS(g.AWAY_SCORE_CT - g.HOME_SCORE_CT) AS 'scoreDiff', e.INN_CT AS 'inning', e.OUTS_CT as 'Current Outs', e.BASE1_RUN_ID as 'onFirst', e.BASE2_RUN_ID as 'onSecond', e.BASE3_RUN_ID as 'onThird', e.pit_id as 'pID', co...
true
1ef0d4bd58f0893b5e6ae0da9d98080d90a23f84
SQL
shaneneaa/cramspot-server
/database/db_cramspot.sql
UTF-8
8,627
3.125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.7.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Feb 17, 2019 at 07:30 AM -- Server version: 10.1.28-MariaDB -- PHP Version: 7.1.10 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OL...
true
9a5cf9ac2224647b98ea207e0e6aa2199fff7bbf
SQL
shumbul/Hostel-Management-System
/Code/database/hostel_management_system_Mess_allocation.sql
UTF-8
2,373
3.15625
3
[]
no_license
-- MySQL dump 10.13 Distrib 5.7.23, for Linux (x86_64) -- -- Host: localhost Database: hostel_management_system -- ------------------------------------------------------ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SE...
true
3335e7113e5ebfe27a2d766f1a786c9e41d50d7b
SQL
yueyue21/University-of-Alberta
/DATABASE MANAGEMENT SYST/project/sql/ultimatie copy of sql/listgener.sql
UTF-8
455
3.765625
4
[]
no_license
-- name, address and phone number of the patient, and testing date of the first radiology record (select p.person_id, p.first_name, p.last_name, p.address, p.phone ,min(rr.test_date), rr.diagnosis from persons p, radiology_record rr where p.person_id = rr.patient_id and rr.diagnosis = 'bladder cancer' and rr.te...
true
3b4db974dcf73b50c1aff8da33f2b99d72df2b85
SQL
ox-it/sakai
/evaluations/impl/src/ddl/oracle/evaluation.sql
UTF-8
15,123
3.421875
3
[ "ECL-2.0", "LicenseRef-scancode-free-unknown", "LicenseRef-scancode-generic-cla", "LicenseRef-scancode-warranty-disclaimer" ]
permissive
create table EVAL_ADHOC_EVALUATEES ( GROUP_ID number(19,0) not null, USER_ID varchar2(255) not null, EVALUATEES_INDEX number(10,0) not null, primary key (GROUP_ID, EVALUATEES_INDEX) ); create table EVAL_ADHOC_GROUP ( ID number(19,0) not null, LAST_MODIFIED d...
true
6b210a3f4309ff744dda93fb146a6a4068e6a98a
SQL
schrutepoop/cpe365
/lab5/CSU/CSU-count.sql
UTF-8
2,582
3.921875
4
[]
no_license
rem kevin shibata rem kkshibat@calpoly.edu set pagesize 50 set lineszie 1000 rem query 1 select min(d.degrees) as "Min amount granted", max(d.degrees) as "Max amount granted", avg(d.degrees) as "Avg amount granted" from degrees d, campuses c where d.campus = c.id group by d.year having d....
true
56b018fa1c281ad6d979d4c63e16d3fbe7e67a5a
SQL
zheng1/openpitrix
/pkg/db/schema/runtime/V0_3__resource_owner_path.sql
UTF-8
406
3.09375
3
[ "Apache-2.0" ]
permissive
ALTER TABLE runtime ADD COLUMN owner_path VARCHAR(255) NOT NULL; CREATE INDEX runtime_owner_path_idx ON runtime (owner_path); UPDATE runtime SET owner_path = CONCAT(':', owner); ALTER TABLE runtime_credential ADD COLUMN owner_path VARCHAR(255) NOT NULL; CREATE INDEX runtime_credential_owner_path_idx ON runtime_cr...
true
dfdff6288828b87e4c93593b811b046dee612e2b
SQL
Cansisti/LiveWroclaw
/selectB.sql
UTF-8
1,091
3.4375
3
[]
no_license
#podgląd koncertu DROP PROCEDURE IF EXISTS podglad_koncertu; DELIMITER $$ CREATE PROCEDURE podglad_koncertu(id int(12)) BEGIN SELECT data_koncertu, nazwa_zespolu, kategoria, nazwa_obiektu, adres, k.il_miejsc_stojacych, k.il_miejsc_...
true
a7623f8b5f40358f022b2b90190fa9c9a2996dcd
SQL
robgalicia/katsa_php
/Database/Store/sp_adscripcion_lst.sql
UTF-8
298
3.0625
3
[]
no_license
DELIMITER $$ DROP PROCEDURE IF EXISTS sp_adscripcion_lst $$ CREATE PROCEDURE sp_adscripcion_lst(IN pidregion smallint) begin select idadscripcion, descadscripcion, ifnull(distanciakms,0) as distanciakms from adscripcion where idregion=pidregion order by descadscripcion; end$$ DELIMITER ;
true
a8160b74b9f668b5129c674e8517cc62c27714b5
SQL
DSofie/SofieDoom_ex250119
/question3.sql
UTF-8
2,291
3.515625
4
[]
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_SUBSTI...
true
b467cc718432d19b829dd85710b94c10fad4f2b7
SQL
SumaiaParveen/SQL-Codecademy
/Skillpath_Analyze data with SQL/Week 6_Analyze Real Data with SQL/Lesson_First and Last Touch.sql
UTF-8
1,054
3.453125
3
[]
no_license
select * from page_visits limit 10; select * from page_visits where user_id = 10069 and utm_source = 'buzzfeed' limit 10; select * from page_visits where user_id = 10069; select * from page_visits where user_id = 10329; select user_id, max(timestamp) as last_touch_at from page_visits group by 1; select user_id, ...
true
d42ac44f27f4da1791036535cf9e43c5ff785450
SQL
DimitriLeandro/Pumas
/DB/Scripts/tb_ubs_e_chaves_estrangeiras_para_essa_tabela.sql
UTF-8
2,533
3.5
4
[]
no_license
desc users; desc tb_paciente; desc tb_triagem; desc tb_diagnostico; desc tb_estabelecimento; select * from tb_paciente; select * from tb_diagnostico; select * from tb_triagem; -- passando as chaves estrangeiras pro final da tabela pq fica + bonito alter table tb_triagem change cd_paciente cd_paciente int(11) not null a...
true
d3431ab20d5e5ff020f8f4bcf0a6f7fa27d68830
SQL
klemenp/dbdeploy
/dbdeploy-core/src/test/resources/com/dbdeploy/database/ora_expected_changelog.sql
UTF-8
809
3.25
3
[]
no_license
-- Create the schema version table CREATE TABLE changelog ( change_number NUMBER(22,0) NOT NULL, complete_dt TIMESTAMP NOT NULL, applied_by VARCHAR2(100) NOT NULL, description VARCHAR2(500) NOT NULL ); ALTER TABLE changelog ADD CONSTRAINT Pkchangelog PRIMARY KEY (change_number); -- START CHANGE SCRIPT #1: 0...
true
ea5e6a7c825ca314f0c99424e6a396d03d95cfd0
SQL
topcoder-platform/tc-website
/scripts/ddl/hs/school.sql
UTF-8
2,220
3.859375
4
[]
no_license
create table current_school_audit ( coder_id DECIMAL(10,0), school_id DECIMAL(10,0), gpa DECIMAL(4,2), gpa_scale DECIMAL(4,2), viewable DECIMAL(1,0) default 1, create_date DATETIME YEAR TO FRACTION default CURRENT YEAR TO FRACTION ) extent size 3000 next size 1500 lock mode row; alter table cur...
true
3326f53517c3fb530bb1cbe1ace0ec3d94677465
SQL
Prizmer/wui
/prizmer/static/sql_query_template/Query_make_view_electric_groups.sql
UTF-8
1,071
3.859375
4
[]
no_license
CREATE VIEW electric_groups AS SELECT balance_groups.guid, balance_groups.name as name_group, abonents.name as name_abonents, meters.factory_number_manual as number_manual, resources.name FROM public.abonents, public.link_abonents_taken_params, public.taken_params, public.meters, publ...
true