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
9e2f6d1519835595475b575802cbe326f4948dbe
SQL
ThiagoBarassa/MySQL
/ecommerce2.sql
UTF-8
1,672
3.734375
4
[]
no_license
create database db_ecommerce2; use db_ecommerce2; create table if not exists tb_categoria( id bigint auto_increment, nome varchar(25), departamento varchar(25), primary key (id) ); insert into tb_categoria(nome, departamento) values ("eletronicos","Celulares"), ("eletronicos","Computadores"), ("eletronicos","Notb...
true
6b1920c98aae823d30fb899b0581c23115401861
SQL
earthgecko/skyline
/updates/sql/ionosphere-v1.1.2-to-v1.1.3.sql
UTF-8
559
3.0625
3
[ "MIT" ]
permissive
/* This the the SQL script to update Skyline from ionosphere (v1.1.2 - v1.1.3) */ USE skyline; /* # @added 20170402 - Feature #2000: Ionosphere - validated # Branch #922: ionosphere */ ALTER TABLE `ionosphere` ADD COLUMN `validated` INT(10) DEFAULT 0 COMMENT 'unix timestamp when validated, 0 being n...
true
6f5a5533a8766fb433f5f92ee9ba6666336047b6
SQL
Anirudh4583/DBMS-CS262
/lab-5/facebook.sql
UTF-8
4,631
3.8125
4
[]
no_license
CREATE TABLE `facebook`.`user` ( `201951024` INT NULL, `user_id` VARCHAR(45) NOT NULL, `name` VARCHAR(45) NOT NULL, `email` VARCHAR(45) NULL, `join_date` DATE NOT NULL, `city` VARCHAR(45) NULL, PRIMARY KEY (`user_id`), UNIQUE INDEX `user_id_UNIQUE` (`user_id` ASC) VISIBLE, UNIQUE INDEX `email_UNIQUE` ...
true
29c19dc3a63575b88377c1ea0b88d31e3e454638
SQL
omartypo3/projectTypo3
/wng_cvci_news/ext_tables.sql
UTF-8
6,856
2.640625
3
[]
no_license
# # Table structure for table 'tx_news_domain_model_news' # CREATE TABLE tx_news_domain_model_news ( tx_wngcvcinews_is_event tinyint(1) unsigned DEFAULT '0' NOT NULL, tx_wngcvcinews_start_date int(11) DEFAULT '0' NOT NULL, tx_wngcvcinews_end_date int(11) DEFAULT '0' NOT NULL, tx_wngcvcinews_start_time int(11) unsi...
true
c46a70d62d44916ba49ff9e3fcf7e9d6da070598
SQL
RoyMolenaar77/Spider_test
/Tasks/Concentrator.Tasks.Core/Processors/AssortmentGeneratorTask/CreateContentTable.sql
UTF-8
453
2.921875
3
[]
no_license
IF OBJECT_ID('[tmp].[{0}]') IS NOT NULL DROP TABLE [tmp].[{0}] CREATE TABLE [tmp].[{0}] ( [ConnectorPublicationRuleID] INT NOT NULL, [ConnectorID] INT NOT NULL, [ProductID] INT NOT NULL, [ShortDescription] NVARCHAR(2000) NULL...
true
660b74e30e70cf4e3f5bd43439407de6029ee9c1
SQL
rahulkumartv/DB_Modelling_PHP_FINAL_Project
/DB_MYSQL/person_before_insert_trigger.sql
UTF-8
187
2.828125
3
[]
no_license
DELIMITER $$ DROP TRIGGER IF EXISTS person_before_insert_trigger$$ CREATE TRIGGER person_before_insert_trigger BEFORE insert ON person FOR EACH ROW BEGIN SET NEW.created_at = now(); END$$
true
b5bb8190d40d956a80e930f3aa39cb71648abfc1
SQL
cnlucke/sql-crowdfunding-lab-web-010818
/lib/insert.sql
UTF-8
3,513
3.25
3
[ "LicenseRef-scancode-unknown-license-reference", "LicenseRef-scancode-public-domain" ]
permissive
-- insert 10 projectss, 20 users, and 30 pledges -- INSERT INTO projects (id, title TEXT, category TEXT, funding_goal INTEGER, start_date TEXT, end_date TEXT) INSERT INTO projects VALUES (1, "Apples", "grocery", 100, "January 1, 2018", "December 31, 2018"); INSERT INTO projects VALUES (2, "Bananas", "grocery", 300, "J...
true
3ed735611f44a2f66395083e94e7cc50fbdef4ef
SQL
novayo/LeetCode
/DataBase/0607_Sales_Person/try_1.sql
UTF-8
312
3.5625
4
[]
no_license
/* Write your PL/SQL query statement below */ select name from salesperson where sales_id not in ( select sales_id from orders where com_id in ( select com_id from company where name = 'RED' ) )
true
55caf9ce5a0dab6d2cd0fa050b4260ec65c6e1b3
SQL
wingedox/cbgd
/bi/sql1/ForeignKey_FK_WAREALLOTM_WARECODE_drop.sql
UTF-8
220
2.59375
3
[]
no_license
IF EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[FK_WAREALLOTM_WARECODE]') AND parent_object_id = OBJECT_ID(N'[WAREALLOTM]')) ALTER TABLE [WAREALLOTM] DROP CONSTRAINT [FK_WAREALLOTM_WARECODE]
true
08c2977601b455fe3c9eeed3f1e857c9f85127fb
SQL
hurdad/datawarehouse-benchmark
/ssb/query/alenka/star_queries_no_bitmaps/ss13.sql
UTF-8
407
3.046875
3
[]
no_license
BF := FILTER date BY d_weeknuminyear == 6 AND d_year == 1994; AF := FILTER lineorder BY lo_quantity >= 26 AND lo_quantity <= 35 AND lo_discount >= 5 AND lo_discount <= 7; AJ := SELECT lo_extendedprice AS lo_extendedprice, lo_discount AS lo_discount FROM AF JOIN BF on lo_orderdate = d_datekey; D := SELECT SUM(...
true
f208c3d6c811beec2b448bf9437294757f334053
SQL
bjmin17/Oracle_dbms
/MySQL SQL/MySQL-2020-01-17-001-iouser.sql
UTF-8
1,193
3.40625
3
[]
no_license
-- mysql에서는 사용자 등록할 때 접소경로를 설정 -- iouser는 localhost에서만 접속할 수 있다. -- 본인 컴퓨터, 현재 접속하는 서버에서만 접근 가능 create user 'iouser'@'localhost' identified by '1234'; grant all privileges on *.* TO 'iouser'@'localhost'; -- iouser는 모든 곳에서 원격, 로컬로 접속할 수 있다. create user 'iouser'@'%' identified by '1234'; grant all privileges on *.* TO '...
true
c7ea5fee03c10188825da355dcaead55fbc9d1e4
SQL
akkeris/controller-api
/sql/select_spaces.sql
UTF-8
673
4.15625
4
[ "Apache-2.0" ]
permissive
select spaces.space, spaces.created, spaces.updated, spaces.name, spaces.description, spaces.tags, regions.name region_name, regions.region region_uuid, stacks.name stack_name, stacks.stack stack_uuid, count(apps.app) as num_apps from spaces join stacks on spaces.stack = stacks.stack join ...
true
72babc3606f5b98109547464cac9da23e5211b07
SQL
MrGreenGaming/ZombieSurvival
/SERVER_DATA/Database.sql
UTF-8
23,292
3.40625
3
[]
no_license
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET ...
true
9330257ccb078d30d3826a06cee6c2071cd52a77
SQL
RandomHilarity/midterm
/db/schema/05_comments.sql
UTF-8
270
2.828125
3
[]
no_license
DROP TABLE IF EXISTS comments CASCADE; CREATE TABLE comments( id SERIAL PRIMARY KEY NOT NULL, poll_id INTEGER REFERENCES polls(id) NOT NULL, name VARCHAR(255) NOT NULL, comment_text TEXT NOT NULL, created_at TIMESTAMP NOT NULL DEFAULT Now() ); -- 5/4
true
d7863ae3dd03092a56930f48a5fae75003a20ca0
SQL
azdanov/postgresql-katas
/crud.sql
UTF-8
1,009
3.859375
4
[]
no_license
CREATE SCHEMA cats; SET search_path TO cats; CREATE TABLE cats ( cat_id SERIAL NOT NULL PRIMARY KEY, name TEXT, breed TEXT, age INTEGER ); INSERT INTO cats (name, breed, age) VALUES ('Ringo', 'Tabby', 4), ('Cindy', 'Maine Coon', 10), ('Dumbledore', 'Maine Coon', 11), ('Egg', 'Persian', 4), ('Mist...
true
971486153dc685f9011d5f227c8b717af62aa777
SQL
antoniodanielbf-isep/LAPR3-2020
/DataBase/GetUserPaperClient.sql
UTF-8
877
3.15625
3
[]
no_license
/* * António Daniel Barbosa Fernandes, [17.05.21 19:26] * Copyright (c) 2021. * * Programador: António Daniel Barbosa Fernandes * * UserName: anton * ---------------- * INFORMAÇÕES: * Nome do Projeto: GITHUB 1190402 * Módulo: GITHUB 1190402 * Caminho: E:/GITHUB 1190402/Licenciatura/2ºANO/1ºSEMESTRE/LAPR3/Dat...
true
f62b08cc0e18bd6d55bd154f8e2540580034ce84
SQL
savardf/GamerJoes
/tp2-fredlamirande-francoissavard.sql
UTF-8
8,882
3.390625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.1.14 -- http://www.phpmyadmin.net -- -- Client : 127.0.0.1 -- Généré le : Mer 24 Février 2016 à 10:00 -- Version du serveur : 5.6.17 -- Version de PHP : 5.5.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_...
true
481c54886c1e7f3f7f43b395e61655e8a3235d21
SQL
noMeName/sql-relazionale
/query1.sql
UTF-8
307
2.609375
3
[]
no_license
use meetingplanner; drop procedure if exists inserisci_sala; create procedure inserisci_sala (IN nome varchar(25),IN luogo varchar(25),IN numero int) insert into sala(nome,ubicazione,capienza) values(nome,luogo,numero); call inserisci_sala ("sala prove", "canicccccccccccattì",500); select * from sala
true
868cec2ef026fd76d825876a3c14fcebf5209d89
SQL
dbryant313/UMUC-1
/CMIS420/PR2/JDS_PROJ2_tst.sql
UTF-8
3,204
2.9375
3
[]
no_license
/* ** Author: Justin Smith ** Course: CMIS 420.7980 ** Date: 04/19/14 ** Project 2 */ SET SERVEROUTPUT ON -- BEGIN TESTING PROCESS_ORDERS.ADD_ORDER -- BEGIN DBMS_OUTPUT.PUT_LINE('Testing PROCESS_ORDERS.ADD_ORDER'); PROCESS_ORDERS.ADD_ORDER(398, 11598, NULL); PROCESS_ORDERS.ADD_ORDER(597, 11598, NULL); ...
true
950e411556b6103f856d341143f8a3e5f7d832ef
SQL
jucansu/ISPP
/clevercloud/ISPP.sql
UTF-8
121,935
2.671875
3
[]
no_license
-- -- PostgreSQL database dump -- -- Dumped from database version 9.2.1 -- Dumped by pg_dump version 9.2.1 -- Started on 2019-04-12 21:10:17 SET statement_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings = on; SET check_function_bodies = false; SET client_min_messages = warning; -- -- TOC e...
true
d3c1d36ccc84b7712127d623dc2825f49d7a8299
SQL
google/sample-sql-translator
/examples/i.sql
UTF-8
1,394
2.890625
3
[ "Apache-2.0" ]
permissive
-- Copyright 2020 Google LLC -- -- 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 -- -- https://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to...
true
22051ad76ef4a86a136174a02ab1e6d7f3d356ba
SQL
kimmy100b/carrot_market_v2020
/WebContent/DB/2020102810_created_community_bbs_table.sql
UHC
723
3.03125
3
[]
no_license
CREATE TABLE `community_bbs` ( `sid` INT(10) NOT NULL AUTO_INCREMENT COMMENT 'Խ sid', `user` VARCHAR(20) NULL DEFAULT NULL COMMENT 'ۼ id' COLLATE 'utf8_general_ci', `title` VARCHAR(120) NOT NULL COMMENT '' COLLATE 'utf8_general_ci', `content` LONGTEXT NOT NULL COMMENT '' COLLATE 'utf8_general_ci', `regDate` DATETI...
true
af045db0cb176e0d14b416189fa0dbe19aefde6e
SQL
johannvalenzuela/taller-bd
/TABLAS/rutas_destinos.sql
UTF-8
418
2.921875
3
[]
no_license
CREATE OR REPLACE SEQUENCE sec_rutas_destinos; CREATE OR REPLACE TABLE Rutas_Destinos ( id_ruta_destino INTEGER NOT NULL DEFAULT nextval('sec_rutas_destinos'), ruta INTEGER, destino INTEGER, CONSTRAINT pk_rutas_destinos PRIMARY KEY (id_ruta_destino), CONSTRAINT fk_ruta FOREIGN KEY (ruta) REFERENCES...
true
5cc646ec9ee0d191f21ea00311124b37e0317d39
SQL
ArturRibeiroTevec/fivemob
/webservice/fivemob_2017-02-27.sql
UTF-8
6,635
3.109375
3
[]
no_license
# ************************************************************ # Sequel Pro SQL dump # Versão 4541 # # http://www.sequelpro.com/ # https://github.com/sequelpro/sequelpro # # Host: 127.0.0.1 (MySQL 5.6.28) # Base de Dados: fivemob # Tempo de Geração: 2017-02-28 02:45:55 +0000 # ******************************************...
true
8b2de49a601939b18dedb686d54990fd342a5c95
SQL
GerasimosLap/Airbnb-Database-Project
/Project/boston_v_Revenue_Crossover_final.sql
UTF-8
1,435
4
4
[]
no_license
create table newlist3 as select id,CASE WHEN (calendar.price IS NULL) THEN listing.price ELSE calendar.price END AS betterprice,bedrooms,zipcode,date from listing,calendar where listing.zipcode in ('02108','02109','02110','02111','02113','02114','02115','02116','02118','02119','02120','02121','02122','...
true
994970a9b785a6de471e4825054f1cd3577942dd
SQL
ryo1and1/mysql_lesson
/chapter9/practice.sql
UTF-8
154
2.53125
3
[]
no_license
CREATE DATABASE user; USE user; CREATE TABLE user ( id int, name varchar(100), mail varchar(255), created_at datetime ); SHOW tables; DESC user;
true
34ba1dbeb3587d2c1f3eae2067da66b1529ab805
SQL
maquiavelo79/bodyflex
/dataBase/[SP]/SP_WPRO_PERFIL_PROFESIONAL_GET_PRESENTACION.sql
UTF-8
936
3.28125
3
[]
no_license
-- CALL SP_WPRO_PERFIL_PROFESIONAL_GET_PRESENTACION('9386703'); -- SELECT * FROM PROFESIONAL; -- SELECT * FROM OTRO; DROP PROCEDURE IF EXISTS bodyflex.SP_WPRO_PERFIL_PROFESIONAL_GET_PRESENTACION; CREATE PROCEDURE bodyflex.`SP_WPRO_PERFIL_PROFESIONAL_GET_PRESENTACION`( ...
true
f3029dfd7725000e0f04db8f60c1240a1c15fd82
SQL
pavel-xa/pgcodekeeper
/apgdiff.tests/src/main/resources/cz/startnet/utils/pgdiff/parsers/publication.sql
UTF-8
1,449
2.71875
3
[ "Apache-2.0" ]
permissive
CREATE PUBLICATION alltables FOR ALL TABLES; CREATE PUBLICATION testpub_default; CREATE PUBLICATION testpib_ins_trunct WITH (publish = insert); CREATE PUBLICATION testpub_xxx WITH (foo); CREATE PUBLICATION testpub_xxx WITH (publish = 'cluster, vacuum'); CREATE PUBLICATION testpub_foralltables FOR ALL TABLES WITH (publi...
true
093127f7bac59e333927265260ce63b5cc56c1c0
SQL
920408194/database-homework
/work1.sql
UTF-8
11,584
3.9375
4
[]
no_license
--3.1 --a select title from course where dept_name = 'Comp. Sci.' and credits = 3; --b select distinct s.name,s.id from student s,takes,teaches,instructor where instructor.name = 'Einstein' and instructor.id = teaches.id and teaches.course_id = takes.course_id and...
true
31ba95da311d2af249fca67e3f64c6914db5bf6d
SQL
pepcs0530/TheLocker_Prd
/TheLocker-web/db_thelocker.sql
UTF-8
4,263
3.21875
3
[]
no_license
/* SQLyog Community v12.5.0 (64 bit) MySQL - 10.1.29-MariaDB : Database - db_thelocker ********************************************************************* */ /*!40101 SET NAMES utf8 */; /*!40101 SET SQL_MODE=''*/; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_CH...
true
53ab3788e3b877d2c15a88ed27964c33dd858ff5
SQL
baiche/Tauto
/Peuplement/17_Peuplement_Incident.sql
UTF-8
810
2.5625
3
[]
no_license
------------------------------------------------------------ -- Fichier : 23_Peuplement_Incident.sql -- Date : 17/02/2014 -- Version : 1.0 -- Auteur : Boris de Finance -- Correcteur : David Lecoconnier -- Testeur : -- Integrateur : Boris de Finance -- Commentaire : Remplissage des tables : -- ...
true
8daed0a665f4bfc947cca125971eb52093ee6532
SQL
ayushdas/PPI_DB
/Tables:Database Creation Scripts/CREATE_TABLE_RULE_DOMAIN_AGENT.sql
UTF-8
212
2.890625
3
[]
no_license
CREATE TABLE rule_domain_agent ( rule_id int, domain_id int, agent_id int, FOREIGN KEY (rule_id) REFERENCES rule(id), FOREIGN KEY (domain_id) REFERENCES domain(id), FOREIGN KEY (agent_id) REFERENCES agent(id) );
true
e3b762751403b524e33cafae4c055b92224c49cb
SQL
nathanieldw/MYSQL-BASIC-C0
/03-Delete/taak01-DELETE/antwoorden.sql
UTF-8
4,820
2.859375
3
[]
no_license
-- Opdracht 1 127.0.0.1/mod-mysql-basic-fifa2018/players/ http://localhost/phpmyadmin/tbl_sql.php?db=mod-mysql-basic-fifa2018&table=players Weergave van records 0 - 5 (6 totaal, Query duurde 0,0017 seconden.) SELECT * FROM players WHERE nationality = "Spain" AND club = "Chelsea" id name age nationality club valu...
true
5fe5a86927d0af47947d1e08257b359504071171
SQL
Russspruce/CS340_final
/db/create_tables.sql
UTF-8
2,266
4.1875
4
[]
no_license
/* * Drop statements to clean database records of old tables * if they exist. */ DROP TABLE IF EXISTS 'character'; DROP TABLE IF EXISTS 'nations'; DROP TABLE IF EXISTS 'series'; DROP TABLE IF EXISTS 'combats'; DROP TABLE IF EXISTS 'character_combats'; /* * Character Table * The characters of Avatar that will be ...
true
c75aa7b2cae1b077dda84721c8a9cc1d4e75a838
SQL
ray1161/Login-System
/accounts.sql
UTF-8
1,917
3.140625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- 主机: 127.0.0.1 -- 生成日期: 2019-05-31 11:45:54 -- 服务器版本: 10.1.40-MariaDB -- PHP 版本: 7.3.5 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTE...
true
187ac92d608c3e7c9537b29614697b10011c8cd3
SQL
zhuzhenguang/Group-Web
/src/main/resource/sql/schema.sql
UTF-8
1,359
3.6875
4
[]
no_license
DROP TABLE ADMIN; DROP TABLE CUSTOM; DROP TABLE IMAGE; DROP TABLE TYPE; DROP TABLE COMMODITY; create table COMMODITY ( id bigint not null PRIMARY KEY GENERATED ALWAYS AS IDENTITY (START WITH 1, INCREMENT BY 1), url varchar(100) not null, price double not null, original_price double, discount double, ...
true
8dc4bbf5a16661bf75e3842c647500d0a37768ee
SQL
vladeismont/itstep_programming
/itstep_programming/sql/queries/SQLQuery2.sql
UTF-8
275
3.546875
4
[]
no_license
select Z.id_zakaza,Z.id_cust,Z.id_products,Z.quantity, P.quantity_na_discount,P.cena_kg,P.DiscountPercentage, P.cena_kg*P.DiscountPercentage/100 as skidka from dbo.Zakazy as Z, dbo.Products as P where Z.id_zakaza = 3 and Z.id_products = P.product_id
true
5e6c9cb37384d46dfb368d4a267448a14b2d988e
SQL
KebecStatoil/SqlJambalaya
/Scripts/AccessCheck/ListPrincipals.sql
UTF-8
284
3.046875
3
[ "MIT" ]
permissive
select name as username, create_date, modify_date, type_desc as type, authentication_type_desc as authentication_type from sys.database_principals where type not in ('A', 'G', 'R', 'X') and sid is not null and name != 'guest' order by username;
true
b293e8cc972605666ee506d29035f1d6685bde00
SQL
professorfoy/SQL-Summer-Bridge
/Foy- Assignment – SQL One to Many Relationships.sql
UTF-8
2,079
4.21875
4
[]
no_license
CREATE DATABASE MySQL_Videos; USE mysql_videos; -- 1. Create one table to keep track of the videos. -- This table should include a unique ID, the title of the video, the length in minutes, and the URL. CREATE TABLE YouTube ( Unique_ID INT AUTO_INCREMENT PRIMARY KEY NOT NULL, Title VARCHAR(50) NOT NULL, Length_Min...
true
dcce1852085a73eeb7ed9bcf36409247a0b8c7a3
SQL
EMBL-EBI-TSI/ebi-cloud-portal-api
/src/main/resources/sql/V0.24__create_deployment_application_tables.sql
UTF-8
1,342
3.046875
3
[ "Apache-2.0" ]
permissive
create table IF NOT EXISTS deployment_application ( id BIGSERIAL PRIMARY KEY NOT NULL, account_id bigint, repo_uri varchar(255), repo_path varchar(255) unique, name varchar(255), about varchar(2000), contact varchar(255), version varchar(255), foreign key (account_id) references account(id) ); alter ...
true
21ca56d837660e9d7ab0e0444ed810fb89e4934f
SQL
riveramatthew/ra_data_warehouse
/models/sources/stg_custom_source_2/stg_custom_2_companies.sql
UTF-8
1,658
2.9375
3
[ "Apache-2.0" ]
permissive
{% if not var("enable_custom_source_2") %} {{ config( enabled=false ) }} {% endif %} WITH source as ( select * from {{ source('custom_source_2','s_customer' ) }} ), renamed as ( SELECT concat('custom_2-',id) as company_id, cast (null as {{ dbt_utils.type_string() }}) as com...
true
2749e368414340c358313b02e34dab220100f6f1
SQL
mengshanxi/mywork
/demo-web/src/main/assembly/sql/alarm.sql
UTF-8
3,794
3.15625
3
[]
no_license
DROP TABLE IF EXISTS `app_base`; CREATE TABLE `app_base` ( `id` varchar(36) NOT NULL COMMENT '主键', `ip` varchar(100) DEFAULT NULL COMMENT '应用ip', `port` varchar(5) DEFAULT NULL COMMENT '应用端口', `name` varchar(100) DEFAULT NULL COMMENT '应用名称', `login_name` varchar(100) DEFAULT NULL COMMENT '登录用户名', `login_pas...
true
c7d1561c0989df74109168855dc9ed84ccf79b5e
SQL
littleseven/market
/config/sql/hk_stocks_info.sql
UTF-8
1,800
3.1875
3
[ "MIT" ]
permissive
SET NAMES utf8mb4; SET FOREIGN_KEY_CHECKS = 0; -- ---------------------------- -- Table structure for us_stocks_info -- ---------------------------- DROP TABLE IF EXISTS `hk_stocks_info`; CREATE TABLE `hk_stocks_info` ( `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '代码', `n...
true
c4e7517f9cfe661b2d13ccb0f39aa889ff28f3c0
SQL
oniquet/project0
/db/output.sql
UTF-8
2,239
3.78125
4
[]
no_license
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='TRADITIONAL'; CREATE SCHEMA IF NOT EXISTS `project0` DEFAULT CHARACTER SET utf8 COLLATE utf8_turkish_ci ; USE `project0` ; -- -----------------------...
true
3e462571e36a67a40cfdf539a033377115aac0a6
SQL
miyaso/Vagrant-and-Ansible-and-Serverspec
/ansible/roles/db/files/create_database.sql
UTF-8
6,485
3.375
3
[]
no_license
-- MySQL Script generated by MySQL Workbench -- Sun Jan 24 17:37:01 2016 -- 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_MODE='TR...
true
3ef8cedce6dade475b45119d38dd5eb556d22175
SQL
trebogeer/daoman
/daoman-mysql/src/main/resources/sp/dinosaurs/get_test_some_out.sql
UTF-8
484
2.6875
3
[]
no_license
/* -- CALL dinosaurs.get_test_some_out(@err, 1); */ --DELIMITER $ DROP PROCEDURE IF EXISTS dinosaurs.get_test_some_out$ CREATE PROCEDURE dinosaurs.get_test_some_out( OUT error_code INT, OUT test1 VARCHAR(40), OUT test2 VARCHAR(40), OUT test3 VARCHAR(40), OUT test4 VARCHAR(40), OUT test5 INT, IN id BIGI...
true
364af7b5fd8fe0bfe0528aab18ed8298d39c7db7
SQL
Master-sniffer/DB
/ORACLE_SQL/Scripts/Script_6.sql
UTF-8
744
3.703125
4
[]
no_license
a.Showing all of the email addresses in upper case letters SINGLE ROW SELECT UPPER (email_address) FROM people; b. Determining the average salary for the employees in the sales MULTIPLE ROW department SELECT AVG(salary) FROM employees WHERE job="sales department"' c. Showing hire dates with the month spelle...
true
65b4331ce05ee24ab2e0728e97ef646ec606055a
SQL
SilverPirateX/MetroDB
/National Authority of Metro DB/Q19.sql
UTF-8
143
2.65625
3
[]
no_license
(select distinct station_number from employee where staff_Ssn=987654322) union (select distinct station_number from employee where place='IT');
true
40ea27640ae1e70aec27e04b05a6a4f8f3a9d87f
SQL
lperri/CS143-PostgreSQL-work
/old_materials/Homework/test.sql
UTF-8
1,341
4.09375
4
[]
no_license
SELECT user_id, SUM(charge) as monthly_charge FROM ( SELECT trip_id, user_id, month, CASE WHEN SUM( 1.00 + EXTRACT(minute FROM date_trunc('minute',(trip_length+'00:00:59')))*0.15 + EXTRACT(hour FROM date_trunc('hour',trip_length))*60.00...
true
87ecdeb3a39bb363694409b3386504bb8e3ad5cb
SQL
un-knower/kylin-tpch
/models/kylin-tpch-create-views.sql
UTF-8
894
3.296875
3
[ "Apache-2.0" ]
permissive
use tpch_flat_orc_; drop view v_lineitem; create view if not exists v_lineitem as select lineitem.*, year(l_shipdate) as l_shipyear, case when l_commitdate < l_receiptdate then 1 else 0 end as l_receiptdelayed, case when l_shipdate < l_commitdate then 0 else 1 end as l_shipdelayed, ...
true
fa18e2fe8bdbec64e8a5968de1c80b7dba980371
SQL
Antoha5001/mysql.less
/office/module-4/lab-4-2.sql
WINDOWS-1251
397
3.203125
3
[]
no_license
-- SELECT region, AVG(LifeExpectancy) FROM world.country GROUP BY region ORDER BY 2 DESC; -- SELECT continent, region, AVG(LifeExpectancy) FROM world.country GROUP BY continent, region WITH ROLLUP;
true
dad9d7bdafb16515c677319a2be427906c8cf902
SQL
emilismailli/Stock-Solution
/AzStock/MHM.Accountancy.Database/Accounting/Procedures/spManagementPaymentDebt.sql
UTF-8
1,753
3.296875
3
[]
no_license
 create PROCEDURE [Accounting].[spManagementPaymentDebt] @userId int, @id int =null, @operationType TINYINT, @accountId int=NULL, @customerId int=null, @paymentTypeId int=null, --@expenseId int null, --@cashId int null, @payment DECIMAL(26,6), @description VARCHAR(500), @paymentDate datetime = null AS BEGIN IF...
true
78d99bd17768ead3461f280e72a58764416055c9
SQL
NTXpro/NTXbases_de_datos
/DatabaseNTXpro/ERP/Stored Procedures/Procs2/Usp_Upd_Comprobante_ResumenDiario.sql
UTF-8
695
3.203125
3
[]
no_license
 CREATE PROC [ERP].[Usp_Upd_Comprobante_ResumenDiario] @Fecha DATETIME, @IdEmpresa INT AS BEGIN UPDATE [ERP].[Comprobante] SET FlagResumenDiario = 1 WHERE CAST(Fecha AS DATE) = CAST(@Fecha AS DATE) AND IdEmpresa = @IdEmpresa AND IdTipoComprobante IN (4,189) AND IdComprobanteEstado = 2 UPDATE [ERP].[Co...
true
92d5a1b0b7968510aef3adc3129dd885638af4fc
SQL
kritikabajpai111/project1
/hotwire/db_objects/Data Model/20161111_DDL_Mobile.sql
UTF-8
21,196
3.703125
4
[]
no_license
-- MySQL Script generated by MySQL Workbench -- 11/14/16 15:22:45 -- 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_MODE='TRADITION...
true
06f3bd8b1329097f5cc677e13f48b19000a05436
SQL
mxj333/zencms3
/_doc/cake3api_app.sql
UTF-8
18,235
3.03125
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : 10.33.10.10_3306 Source Server Version : 50622 Source Host : 10.33.10.10:3306 Source Database : cake3api_app Target Server Type : MYSQL Target Server Version : 50622 File Encoding : 65001 Date: 2016-02-12 22:31:50 */ SET FOREIGN_KEY_C...
true
0aed70a2599362a6fc295b1aff364840515097f6
SQL
baskaragilbas/Tugas
/simple crud/dbfile/tugas.sql
UTF-8
2,585
3.40625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.7.0 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Mar 23, 2018 at 08:49 AM -- Server version: 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 @OL...
true
d7f7ba2c97c01e009d4de398c00a9b0e7d8cec93
SQL
nmbazima/SQL-Scripts
/SQL Query Files/Server_Job_Queue_Maintenance.sql
UTF-8
241
2.875
3
[ "Apache-2.0" ]
permissive
delete top (1) JQ output DELETED.Id, DELETED.JobId, DELETED.Queue from [tasks].JobQueue JQ with (readpast, updlock, rowlock, forceseek) where Queue in (@queues1) and (FetchedAt is null or FetchedAt < DATEADD(second, @timeout, GETUTCDATE()))
true
c7b8b4de7797b1ab83042ff5b1f88a319068b881
SQL
rnbguy/oopsla21artifact
/oltp/oltpbench/src/com/oltpbenchmark/benchmarks/voter/ddls/voter-sqlserver-ddl.sql
UTF-8
1,268
3.828125
4
[ "Apache-2.0", "MIT" ]
permissive
-- Drop all views / tables -- IF OBJECT_ID('V_VOTES_BY_PHONE_NUMBER') IS NOT NULL DROP view V_VOTES_BY_PHONE_NUMBER; -- IF OBJECT_ID('V_VOTES_BY_CONTESTANT_NUMBER_STATE') IS NOT NULL DROP view V_VOTES_BY_CONTESTANT_NUMBER_STATE; IF OBJECT_ID('AREA_CODE_STATE') IS NOT NULL DROP table AREA_CODE_STATE; IF OBJECT_ID('VOTES...
true
a8fce56089995d3eecf7df65d1f1e7e13e5c81e7
SQL
pkrsnak/queries
/cross system compare.sql
UTF-8
2,045
3.8125
4
[]
no_license
--root query Select facilityid, item_nbr, sum(case when systemid = 'MDM' then 1 else 0 end) mdm, sum(case when systemid = 'SUS' then 1 else 0 end) superset, sum(case when systemid = 'BCP' then 1 else 0 end) biceps, sum(case when systemid = 'MWB' then 1 when systemid = 'SWB' then 1 els...
true
8bd51c4fcb6a2eadd09639b08b82c87f4c24dc5b
SQL
GradedJestRisk/db-training
/RDBMS/PostgreSQL/queries/privileges/create-user-scalingo.sql
UTF-8
1,010
3.296875
3
[]
no_license
-- https://doc.scalingo.com/databases/postgresql/start#database-users -- Read and write CREATE USER <username>; GRANT CREATE ON SCHEMA public TO <username>; GRANT ALL PRIVILEGES ON DATABASE <database> TO <username>; GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO <username>; GRANT ALL PRIVILEGES ON ALL SEQUENCE...
true
cb567deec0c8895521ebde5835d19df781d16b7c
SQL
Lavoiedavidw/Batch-Source
/ChinookLab.sql
UTF-8
9,848
3.859375
4
[]
no_license
-- 2.1 Select statements, fairly self explanatory SELECT * FROM EMPLOYEE; SELECT * FROM EMPLOYEE WHERE LASTNAME='King'; SELECT * FROM EMPLOYEE WHERE FIRSTNAME='Andrew' AND REPORTSTO IS NULL; -- 2.2 incorporating the ORDER BY & ASC|DESC keywords SELECT * FROM ALBUM ORDER BY TITLE ASC; SELECT FIRSTNAME FROM CUSTOMER ORD...
true
2356d5ddbcd720732d5bcd7d25fda5c4569d43bc
SQL
Zielzor/BiqQuery
/OpenOrders58100.sql
UTF-8
3,556
3.4375
3
[]
no_license
CREATE OR REPLACE TABLE `ceeregion-prod.FactOpenOrdersEast.OpenOrders_Step1` as SELECT DISTINCT a.customerNo_key, a.orderNo_key, a.dateModification_key, a.dateDisposition_key, a.rejectionReason_key, a.recordType, a.numDisposition, a.statusOverallItemDelivery, CASE WHEN a.statusOverallItemDelivery =...
true
e51463a0a7dc2f5f867f3f3c1703794aacb6ff5e
SQL
Kminseung/SQL
/03-DCL-And-DML.sql
UTF-8
5,174
4.40625
4
[]
no_license
/* 사용자 생성 CREATE C##KMS IDENTIFIED BY 7777; - ORACLE : 사용자 생성 -> 동일 이름의 SCHEMA도 같이 생성 사용자 삭제 DROP USER C##KMS DROP USER C##KMS CASCADE - 연결된 객체도 모두 삭제 권한을 갖고 있지 않으면 어떤 작업도 수행 불가능 */ -- system으로 진행 -- 사용자 정보 확인 -- USER_USERS : 현재 사용자 관련 정보 -- ALL_USERS : DB의 모든 사용자 정보 -- DBA_USERS : 모든 사용자의 상세 정보(DBA Onl...
true
94d21ab4f10f5970046f3498c4e4ccdeb0e7c399
SQL
vmezhevikin/backbone
/src/main/resources/backbone_db_creation_script.sql
UTF-8
1,075
3.953125
4
[]
no_license
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='TRADITIONAL,ALLOW_INVALID_DATES'; CREATE SCHEMA IF NOT EXISTS `backbone` DEFAULT CHARACTER SET utf8 ; USE `backbone`; CREATE TABLE IF NOT EXISTS `bac...
true
8497b7ad563848596ccd0ac282f2fd8b13246da9
SQL
matrix-org/synapse
/synapse/storage/schema/main/delta/73/22_un_partial_stated_event_stream.sql
UTF-8
1,386
3.59375
4
[ "Apache-2.0" ]
permissive
/* Copyright 2022 The Matrix.org Foundation C.I.C * * 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 applicable l...
true
0310b5140266332f4b12ef267115fcc30a5611f2
SQL
marongjun/daily_challenge_leetcode
/sql_exercise/delete_duplicated_rows.sql
UTF-8
140
2.953125
3
[]
no_license
# Write your MySQL query statement below DELETE t1 FROM Person t1 INNER JOIN Person t2 WHERE t1.Id > t2.Id AND t1.Email = t2.Email
true
531eec701e0e9b70285611f446dec775ba8bcfbd
SQL
ALL4FREEDOM/Main-Website
/administrator/components/com_itpmeta/sql/install.sql
UTF-8
1,755
3.28125
3
[]
no_license
CREATE TABLE IF NOT EXISTS `#__itpm_global_tags` ( `id` smallint(6) UNSIGNED NOT NULL AUTO_INCREMENT, `name` varchar(64) NOT NULL DEFAULT '', `type` varchar(64) NOT NULL, `title` varchar(255) NOT NULL, `tag` text NOT NULL, `content` text NOT NULL, `output` text NOT NULL, `ordering` tinyint(3) UN...
true
bfedb6a4fd95d463d077169b235120a91aba2504
SQL
satishrayapa/azurepipeline
/Database/Application/20.4/Release/V20.4.412__Alter_txdCNeHandbookRegistDetail_SG.sql
UTF-8
385
2.984375
3
[]
no_license
IF EXISTS (SELECT TOP 1 1 FROM sys.columns WHERE name = 'Value' AND Object_ID = OBJECT_ID('txdCNeHandbookRegistDetail')) BEGIN EXEC usp_DBACopyTableIndexesByColumn '','txdCNeHandbookRegistDetail','Value','numeric',1,null,25,5 Alter table txdCNeHandbookRegistDetail Alter column Value numeric(25,5) not null EX...
true
27e6a8e6aa2a301a582fffd69d32277ae0525d89
SQL
ndesilets/Group-13-HP-Big-Data-Analytics
/Not_For_Grading/Kirby/Views/WORK_AREA_SUMMARY_V.sql
UTF-8
1,658
3.875
4
[]
no_license
CREATE OR REPLACE VIEW CAPSTONE_DEMO.WORK_AREA_SUMMARY_V AS WITH WORK_AREA_PER_SNAP AS ( SELECT A.MODULE, A.CLIENT_INFO, A.SQL_EXEC_START, A.SNAPSHOT_TS, SUM(A.WORK_AREA_SIZE/POWER(1024,3)) AS WORK_AREA_SIZE_GB, SUM(A.EXPECTED_SIZE/POWER(1024,3)) AS EXPECTED_SIZE_GB, SUM(A.ACTUAL_MEM_USED/POWER(1024,3))...
true
1c9bb9fba03a048b6a468de79acfedd5709d8200
SQL
AbelCheng/DataWashroom
/DataWashroom/OracleModel/1-Tables/14-WASH_VERSION.sql
UTF-8
470
3
3
[ "MIT" ]
permissive
CREATE TABLE VPI.WASH_VERSION ( CYCLE_ID VARCHAR2(32) NOT NULL, VERSION_ NUMBER(4) NOT NULL, PROCEDURE_NAME VARCHAR2(61) NOT NULL, PROCEDURE_SCRIPT CLOB NOT NULL, COMMENT_ VARCHAR2(2000), DEPLOY_STATUS NUMBER(1) DEFAULT 0 NOT NULL, DEPLOY_ERROR VARCHAR2(512), CONSTRAINT PK_WASH_VERSIO...
true
d838025eef02ae63f9bb7d50318eae8e334e36eb
SQL
asydtd/hoseo_edu
/hoseo-edu/hoseo_edu_db.sql
UTF-8
2,345
3.046875
3
[]
no_license
-- -------------------------------------------------------- -- 호스트: 127.0.0.1 -- 서버 버전: 10.5.9-MariaDB - mariadb.org binary distribution -- 서버 OS: Win64 -- HeidiSQL 버전: 11.2.0.6213 -- ------------------------------------------------...
true
2c5887bd1a9cb87206e4073fe637ddc3225b4735
SQL
tqvuong97/Motel2
/db/Motel_development.sql
UTF-8
4,357
3.453125
3
[]
no_license
-- Created by Vertabelo (http://vertabelo.com) -- Last modification date: 2018-10-05 12:49:46.97 -- tables -- Table: Area CREATE TABLE Area ( idArea int NOT NULL AUTO_INCREMENT, nameArea varchar(255) NOT NULL, floor int NOT NULL, CONSTRAINT Area_pk PRIMARY KEY (idArea) ); -- Table: Device CREATE TABLE...
true
f9c761efe2e1f8956913bbbebf1007879df3b65e
SQL
chandan-n-bhat/mysql-bootcamp
/my_book_app/section-7/reverse.sql
UTF-8
231
2.671875
3
[]
no_license
SELECT REVERSE("Hello World") AS Reverse; # Book App Queries USE book_store; SELECT REVERSE(title) AS 'Reversed Title' FROM books; SELECT REVERSE(CONCAT(SUBSTRING(REPLACE(title,'e','9'),1,10),'....')) AS Title FROM books;
true
bfed46120fe2e7bcc89dbf7dfd316021c5c87da5
SQL
Uauy-Lab/expvip-web
/db/queries_playground.sql
UTF-8
2,379
3.8125
4
[ "MIT" ]
permissive
SELECT * FROM wheat_expression_dev.expression_values INNER JOIN genes ON gene_id=genes.id WHERE genes.name="Traes_7DS_FFE9ACDAB.2"; SELECT genes.id, genes.name FROM genes WHERE genes.id=105175; SELECT * from type_of_values; SELECT * FROM studies INNER JOIN experiments ON studies.id = experim...
true
01a6f75ab7c1cb79adbd02a1326a93556305dbd1
SQL
didier-mycontrib/env-ic-my-spring-jeeapp1
/my-spring-jeeapp1-services/src/test/resources/sql/initDB.sql
UTF-8
601
2.6875
3
[]
no_license
DROP TABLE IF EXISTS Devise; ######################## CREATE TABLE ######################################## CREATE TABLE Devise( codeDevise VARCHAR(8), monnaie VARCHAR(64), dChange double, PRIMARY KEY(codeDevise)); ######################### INSERT INTO ##################################### INSERT INTO ...
true
7e06f6bc54838335ac49cf894232216717b59e9a
SQL
GeetShingi/dbms
/A5.sql
UTF-8
792
3.453125
3
[]
no_license
create table borrower1(roll_no int primary key,name varchar2(20),doi date, nob varchar2(20),status varchar2(3)); create table fine1(roll_no int, dat date, amount int ); insert into borrower1 values(22,'dar','05-NOV-19','harrypotter','I'); insert into borrower1 values (24,'ved','08-SEP-19','LOR','I'); declare roll int;...
true
347aa3bd4adc8c6885c367507ac8bda718e48a3a
SQL
mrizzo99/microservices-with-aws
/SchemaScript.sql
UTF-8
820
3.84375
4
[]
no_license
USE marketplace; CREATE TABLE IF NOT EXISTS marketplace.users ( id INT NOT NULL AUTO_INCREMENT, address VARCHAR(40), city VARCHAR(40), name VARCHAR(40), phone_no VARCHAR(12), PRIMARY KEY (id)); CREATE TABLE IF NOT EXISTS marketplace.registration ( id INT NOT NULL AUTO_INCREMENT, item VARCHAR(30), ...
true
9b47868dc618dca48e2eebfbb5217eb2739493ae
SQL
ClarissaLaRue/Nsu_Java_lab
/lab2/src/main/resources/posgresqlBase/initDatabase.sql
UTF-8
293
3.171875
3
[]
no_license
DROP TABLE IF EXISTS node; DROP TABLE IF EXISTS tag; CREATE TABLE node ( id BIGINT NOT NULL CONSTRAINT node_pkey PRIMARY KEY, user_name TEXT ); CREATE TABLE tag ( key TEXT, value TEXT, node_id BIGINT NOT NULL CONSTRAINT tag_node_id_fkey REFERENCES node );
true
81270fbe31eddfc4c71049b354e93922447cf5e2
SQL
akfung/sql-challenge
/EmployeeSQL/data_analysis_8.sql
UTF-8
172
3.421875
3
[]
no_license
-- List Sales department employees SELECT last_name as "Last Name", count(last_name) as "Employee Count" FROM employees GROUP BY last_name ORDER By count(last_name) DESC
true
9243df252db394b7add3f4efb15cc89aa0ac4623
SQL
NTXpro/NTXbases_de_datos
/DatabaseNTXpro/ERP/Stored Procedures/Procs1/Usp_Sel_ListaPrecio_By_Empresa.sql
UTF-8
198
2.6875
3
[]
no_license
CREATE PROC [ERP].[Usp_Sel_ListaPrecio_By_Empresa] @IdEmpresa INT AS BEGIN SELECT ID, Nombre FROM ERP.ListaPrecio WHERE FlagBorrador = 0 AND Flag = 1 AND IdEmpresa = @IdEmpresa END
true
b5c5d75a4269fefb38c5bf48eb3aee539f168b69
SQL
Duddha/SQL
/[ОК] Работники до 21 года на 01.02.2008.sql
WINDOWS-1252
529
3.1875
3
[]
no_license
select rbvf.name_cex DEPT, rbf.id_tab TAB_ID, rbf.fam_u || ' ' || rbf.f_name_u || ' ' || rbf.s_name_u FIO, rbvf.full_name_u PROF, osn.data_r, trunc(months_between('01.02.2008', osn.data_r) / 12) || '. ' || mod(trunc(months_between('01.02.2008', osn.data_r)), 12) || '. ' AGE f...
true
2466e98b65d4f4de2df5d5fcb179bbfc526d2bf5
SQL
shreyasvinaya/School_assignments
/assign_8/sql_qn_1.sql
UTF-8
6,307
3.6875
4
[]
no_license
create database IF NOT EXISTS testing; USE testing; drop table ODI_rankings; create table ODI_rankings ( Tid int PRIMARY KEY, Ranks int unique, Tname varchar(50) unique NOT NULL, matches int NOT NULL, points int default 0, rating int NOT NULL, check (rating > 20) ); insert into OD...
true
4e0037217b91227f7b91c9471e5ffb5280519cae
SQL
aminebousselmi/BD50
/src/public/200_Scripts_structure_bd/220_create_fk.sql
UTF-8
3,049
3.1875
3
[]
no_license
-- ----------------------------------------------------------------------------- -- CREATION DES REFERENCES DE TABLE -- ----------------------------------------------------------------------------- ALTER TABLE FACTURE ADD ( CONSTRAINT FK_FACTURE_COMMANDE FOREIGN KEY (CMD_NUM) REFERE...
true
f24c4d54847ea7af81aefa5debad79c5c9640fc0
SQL
hepengf/learngit
/GZSJLARSCA/WebRoot/database/oracle/s_role.sql
GB18030
1,036
3.40625
3
[]
no_license
prompt PL/SQL Developer import file prompt Created on 201265 by huang set feedback off set define off prompt Creating S_ROLE... create table S_ROLE ( ID NUMBER not null, NAME VARCHAR2(20), DESCRIPTION VARCHAR2(50), STATUS NUMBER, CREATEDATE DATE, OPERATOR VARCHAR2(25) ) ; comment on...
true
a985e78960ff1f95dcc66ebfe2a258a15cd54228
SQL
pjuliano/glowing-waffle
/Views/KD_SVQ_Totals_TD.sql
UTF-8
4,139
3.34375
3
[]
no_license
Create Or Replace View Kd_Svq_Totals_Td As With Qtr_Total_Quota As ( Select Sum(Daily_Quota) As Qtr_Total_Quota, Sum(Daily_Quota_Impl) As Qtr_Total_Quota_Impl, Sum(Daily_Quota_Bio) As Qtr_Total_Quota_Bio From Kd_Daily_Quota_By_Month Where Qtr = Case When Extract(Month From Sysdate) I...
true
aa401b7997c83780b056482156ba4eb5ee453f4f
SQL
saga1015/db_refresh
/sql/DB_Refresh_Save_Indexes_PK.sql
UTF-8
1,724
4.21875
4
[]
no_license
delete from db_refresh.save_table_index where dump_timestampkey = :v_dump_timestampkey; insert into db_refresh.save_table_index SELECT c.oid as reloid ,n.nspname as schema_name ,c.relname as table_name ,i.oid as index_oid ,i.relname as index_name ,'INDEX'::varchar as index_type ,pg_get_indexdef(i.oid) || ';' as in...
true
a84682ebef1bcb90b7ceba801ab34b68854a76fc
SQL
NUS-Workload-Predictor/back-end-python
/schema/init.sql
UTF-8
17,158
2.84375
3
[ "MIT" ]
permissive
# ************************************************************ # Sequel Pro SQL dump # Version 4541 # # http://www.sequelpro.com/ # https://github.com/sequelpro/sequelpro # # Host: 127.0.0.1 (MySQL 5.5.5-10.1.21-MariaDB) # Database: nusworks # Generation Time: 2017-03-30 12:16:43 +0000 # *******************************...
true
79b142d9776c672ee22182558e440c9ffbd1bc47
SQL
epiii/dyna_multicheck
/dynamulticheck.sql
UTF-8
1,963
3.0625
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : localhost Source Server Version : 50505 Source Host : localhost:3306 Source Database : dynamulticheck Target Server Type : MYSQL Target Server Version : 50505 File Encoding : 65001 Date: 2017-05-02 17:07:36 */ SET FOREIGN_KEY_CHECKS=0...
true
ff560a0926ddd3d017f3ac831b86aa339dae811b
SQL
matthewrpotter75/FantasyPremierLeagueDB
/FantasyPremierLeagueDW/dbo/Tables/DimUser.sql
UTF-8
199
2.859375
3
[]
no_license
CREATE TABLE dbo.DimUser ( UserKey INT IDENTITY(1,1) NOT NULL, UserName VARCHAR(100) NOT NULL, UserNameDescription VARCHAR(100) NULL CONSTRAINT [PK_DimUser] PRIMARY KEY CLUSTERED (UserKey ASC) );
true
f389de4b50c4f11f6645d73c0002f0bfae4c325b
SQL
GeekChicGoddess/database_exercises
/albums_migrations.sql
UTF-8
222
2.53125
3
[]
no_license
USE codeup_test_db; CREATE TABLE album ( id INT UNSIGNED NOT NULL AUTO_INCREMENT, artist VARCHAR (50), name VARCHAR (100) NOT NULL, releaes_date YEAR, sales DOUBLE , genre VARCHAR (50), PRIMARY KEY (id) );
true
f39926d0f14f373783bd84caf6a9db7d964b5210
SQL
conqu1stador/kursa4i
/4l3x33v/05_roles.sql
UTF-8
1,003
3.015625
3
[]
no_license
CREATE ROLE hr_worker; GRANT USAGE ON SCHEMA public TO hr_worker; GRANT SELECT,INSERT ON TABLE public.Profession TO hr_worker; GRANT SELECT ON TABLE public.Department TO hr_worker; GRANT SELECT,INSERT,UPDATE ON TABLE public.Contract TO hr_worker; GRANT SELECT,INSERT,UPDATE ON TABLE public.Employee TO hr_worker; GRANT S...
true
efe94e7b407020dab4ca03a5828d9009123ff6d9
SQL
glasseyes42/kubernaut
/server/lib/components/store/migrations/0076-create-ingress_version-table.sql
UTF-8
874
4.25
4
[ "MIT" ]
permissive
START TRANSACTION; CREATE TABLE ingress_version ( id uuid NOT NULL, service uuid NOT NULL, comment TEXT NOT NULL, created_by uuid NOT NULL, created_on timestamp with time zone NOT NULL, deleted_on timestamp with time zone, deleted_by uuid, CONSTRAINT ingress_version_pkey PRIMARY KEY (id), CONSTRAINT...
true
9f0518d971ae79a2049f0ac8e2100d2ac2c1cea1
SQL
andri13/Sistem-informasi
/pln.sql
UTF-8
11,030
2.90625
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: 18 Okt 2018 pada 00.57 -- Versi Server: 10.1.16-MariaDB -- PHP Version: 7.0.9 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT ...
true
08e4e39bcaa702006e74e5b6d184e19c999a5c86
SQL
magmado/Next_U_Reto_Agenda_PHP
/Next_U_Agenda_PHP/db_agenda.sql
UTF-8
1,662
3.09375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 3.5.1 -- http://www.phpmyadmin.net -- -- Servidor: localhost -- Tiempo de generación: 05-08-2017 a las 21:34:28 -- Versión del servidor: 5.5.24-log -- Versión de PHP: 5.4.3 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARA...
true
a3ced4afa306e281312ad939f8f1e4819643c0c3
SQL
Oleg-Loginov-analyst/mybi-dbt-core
/models/staging/metrika/stg_ym_purchases_facts.sql
UTF-8
429
3.375
3
[]
no_license
with source as ( select f.account_id , f.clientids_id , f.dates_id , f.traffic_id , f.purchases_id , f.revenue , gd.dt , gd.ts from {{ source('metrika', 'purchases_facts') }} as f left join{{ ref('stg_general_dates') }} as gd on gd.id = f.dates_id {{ filter_rows( account...
true
24926e5cd31802df5680d1e49c5d4da996b375ed
SQL
VladKorchik/SpringAndMySQL
/src/main/resources/schema.sql
UTF-8
536
3.765625
4
[]
no_license
create table netology.CUSTOMERS ( id int primary key auto_increment, name varchar(100) not null, surname varchar(100) not null , age int check ( age >= 0 ) not null, phone_number int unique ); create table netology.ORDERS ( id int primary key auto_increment, date timestamp default now() not...
true
c8097d1f841861380a6254faf3b196be478ecf0f
SQL
alimshare/fhq-web-admin
/sql/view_kbm.sql
UTF-8
1,178
3.265625
3
[ "MIT" ]
permissive
CREATE OR REPLACE VIEW `view_kbm` AS select `ac`.`id` AS `activity_id`, `ac`.`tgl` AS `tgl`, `vh`.`program_name` AS `program_name`, `vh`.`day` AS `day`, `vh`.`pengajar_id` AS `pengajar_id`, `vh`.`pengajar_name` AS `pengajar_name`, `ac`.`description` AS `description`, `ac`.`management_not...
true
b700c0190ddde2143c4380e9409478c2c07bed24
SQL
CUBRID/cubrid-testcases
/sql/_04_operator_function/_04_date_time_op/_003_months_between/cases/1007.sql
UTF-8
302
2.5625
3
[ "BSD-3-Clause" ]
permissive
-- retrieve by function of months_between using parameter of null on the first position or null both two parameter create class dummy( a int ); insert into dummy values (1); select months_between(null, date'11/10/2000') from dummy; select months_between(null, null) from dummy; drop class dummy;
true
ad04372f9ba3040ad13ddad52320e653e26ccc83
SQL
patriot898/Gallery
/postgres/addConstraints.sql
UTF-8
222
3.328125
3
[]
no_license
ALTER TABLE product_images ADD CONSTRAINT product_ref FOREIGN KEY (product_id) REFERENCES products (product_id); ALTER TABLE product_images ADD CONSTRAINT image_ref FOREIGN KEY (image_id) REFERENCES images (image_id);
true
5efa8d019c6f983803cd9df4fc8485767e694b13
SQL
duonglnn/kpi-be-higgsup
/database/migration/2018-09-06-1542_change_dabase_for_requirement_sprint4.sql
UTF-8
1,745
3.546875
4
[]
no_license
/** date: 2018-09-06 15:00 author: ThanhLV, anhpth purpose: add new column updated_date for kpi_event table purpose: add new column address for kpi_event table purpose: add new event_additional_config for kpi_event table purpose: change column name to event_name for kpi_event table purpose: MODIFY column status from va...
true