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
839923daec5c78beaed4108765e74a500a559b99
SQL
FullStackOliveiraGilberto/database-insert-script-generator
/GET_INSERT_SCRIPT_ORACLE.sql
ISO-8859-1
6,989
4.21875
4
[]
no_license
create type linha_script is object (conteudo varchar2(4000)); / create type tabela_linha is table of linha_script; / CREATE OR REPLACE FUNCTION GET_INSERT_SCRIPT ( V_TABLE_NAME VARCHAR2, V_OWNER_ORIGEM VARCHAR2, V_OWNER_DESTINO VARCHAR2) RETURN tabela_linha AS tabela_existe BOOLEAN := FALSE; -- variveis auxi...
true
281f86972a1f569b03cfdf869a818ed3b413528c
SQL
thecodemancer/BIMarathon2021
/ELT/temp_table_4.sql
UTF-8
1,594
3.078125
3
[]
no_license
INSERT INTO TEMP_TABLE_4 WITH NS AS ( select 1 as n union all select 2 union all select 3 union all select 4 union all select 5 union all select 6 union all select 7 union all select 8 union all select 9 union all select 11 union all select 1...
true
8f9dafaa1f51f5d14c17b95a784e27c5493a4f5a
SQL
margeir/MetSala
/metreikn_NYR.sql
UTF-8
10,240
3.28125
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : localhost Source Server Version : 50144 Source Host : localhost:3306 Source Database : metreikn Target Server Type : MYSQL Target Server Version : 50144 File Encoding : 65001 Date: 2010-03-09 11:53:06 */ SET FOREIGN_KEY_CHECKS=0; -- -...
true
c4d7ea04e7311da9f4a6de269ba2f749f418537d
SQL
tombeton1/shopping
/shoppingDB/storedprocedures/user_delete_friend_request.sql
UTF-8
379
3.453125
3
[]
no_license
USE shopping_db; DROP PROCEDURE IF EXISTS user_delete_friend; DELIMITER // CREATE PROCEDURE `user_delete_friend` ( IN pUserId INT , IN pFriendId INT ) BEGIN DELETE FROM `friends` WHERE (`friends`.`user_id_inviter` = pUserId OR `friends`. `user_id_invitee` = pUserId) AND (`friends`.`user_id_invitee` = pFriendId OR `...
true
524a173177f0f320790eaf530cda8dfd868399f9
SQL
bellmit/flexdb
/2.HOST/3.Procedure/cf0080.sql
UTF-8
4,679
3.5
4
[]
no_license
CREATE OR REPLACE PROCEDURE cf0080 ( PV_REFCURSOR IN OUT PKG_REPORT.REF_CURSOR, OPT IN VARCHAR2, BRID IN VARCHAR2, PV_CUSTODYCD IN VARCHAR2, CI0088KEY IN VARCHAR2 ) IS V_BRID VARCHAR2(4); V_STROPTION VARCHAR...
true
a1e51a82792ec4b0f8a3e339d41215a819543656
SQL
DanielaPaiva/MySQL
/Exercicios/Exercicio_Rh2.sql
UTF-8
2,300
4.03125
4
[]
no_license
create database rh2; use rh2; create table cargo( id bigint auto_increment, HoraExtra boolean, Lider varchar (35), Terceirizado varchar(3), primary key(id) ); insert into cargo (HoraExtra, Lider, Terceirizado) values (1,"Tatiana","sim"), (0,"João","sim"), (1,"Manoel","não"), (0,"Vanessa","não"), (0,"Carol","sim"); /*...
true
48234ecdc90e2f4c01bbcacb2f0e0ff70201b368
SQL
fac2020/msqlbd
/function/GET_HTMLLINK4EVENTSUBJ.sql
UTF-8
556
3.453125
3
[]
no_license
DELIMITER $$ CREATE DEFINER=`stastrjn_nrn`@`localhost` FUNCTION `GET_HTMLLINK4EVENTSUBJ`(`INEVENTUID` VARCHAR(36)) RETURNS varchar(255) CHARSET utf8 BEGIN DECLARE sResult varchar(255); DECLARE iSubject int; DECLARE sTablename varchar(256); -- Получаем данные из события SELECT we.IDSUBJECT, se.TABNAME INTO iS...
true
b5b6cb4ec149df890432f02b33bb81771703d7d3
SQL
ilkerBuguner/CSharp-DB
/01-MS SQL/12-Exam/10-Full Info.sql
UTF-8
732
3.96875
4
[]
no_license
SELECT ISNULL(e.FirstName + ' ' + e.LastName, 'None') AS [Employee], ISNULL(d.Name, 'None') AS [Department], ISNULL(c.Name, 'None') AS [Category], ISNULL(r.Description, 'None') AS [Description], ISNULL(FORMAT(r.OpenDate, 'dd.MM.yyyy'), 'None') AS [OpenDate], ISNULL(s.Label, 'None') AS [Status], ...
true
2463cf1b6b9bbc38eddf4bdfbb0505682ebf977a
SQL
Syemon/Pergamon
/src/main/resources/migration/V1__init.sql
UTF-8
474
3.46875
3
[]
no_license
CREATE TABLE file ( id SERIAL PRIMARY KEY, name text, storage_name text, created_at timestamp without time zone NOT NULL, updated_at timestamp without time zone ); CREATE TABLE resource ( id SERIAL PRIMARY KEY, file_id int, name text, storage_name text, created_at timestamp with...
true
1a756d3a0ac25491ff69ccf992f9d44797832965
SQL
RiniAntony90/MySQLQueries
/SQL_queries_Employee_Database/Sum_salary_department.sql
UTF-8
397
4.4375
4
[]
no_license
/*Sum of salary across departments for year 2010*/ select a.dept_no, a.sum_sal, rank()over(order by a.sum_sal desc) as rank_sal from (select de.dept_no, sum(s.salary) as sum_sal from salaries s JOIN dept_emp de ON s.emp_no=de.emp_no where YEAR(s.from_date) <2010 AND 2010<YEAR(s.to_date) AND YEAR(de.from_date) <2010 ...
true
d1d4973f63f51ba831f7a7d3a265cd70b4dad6a3
SQL
zekodef/sf-cnr
/gamemodes/irresistible/config/migrations/cod8/20170106_cod8_base.sql
UTF-8
3,141
3.109375
3
[ "MIT" ]
permissive
-- -------------------------------------------------------- -- Host: localhost -- Server version: 5.7.19 - MySQL Community Server (GPL) -- Server OS: Win64 -- HeidiSQL Version: 9.4.0.5125 -- -------------------------------------------------------- /*...
true
bfeb747bcf09675f3d796261e2478561b65b837e
SQL
bernatsc/AgeRoyale
/Server/resources/Creacio_bbdd.sql
UTF-8
10,159
3.859375
4
[]
no_license
#CREACIO DE LA BASE DE DADES #SET GLOBAL sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY','')); USE AgeRoyale; #DESTRUCCIO DE LES TAULES DROP TABLE IF EXISTS partida CASCADE; DROP TABLE IF EXISTS usuaritropa CASCADE; DROP TABLE IF EXISTS tropa CASCADE; DROP TABLE IF EXISTS amic CASCADE; DROP TABLE IF EXISTS u...
true
5c05117897db6c49424b81cbfc80045c07e16795
SQL
Oliver3214/corespring
/spring-Forum/db/db_spring_forum.sql
UTF-8
2,017
3.734375
4
[]
no_license
CREATE TABLE `usuario` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `email` varchar(128) NOT NULL, `fecha_publicacion` datetime NOT NULL, `hash_password` varchar(128) NOT NULL, `login` varchar(32) NOT NULL, `nombre` varchar(128) NOT NULL, `twitter` varchar(64) DEFAULT NULL, `ultimo_login` datetime DEFAULT...
true
3e9711c179b147c159e502dd49fec2ad2bb93c89
SQL
weizhi-luo/stocks
/database/Metis/017_insert_data_NasdaqFinancialStatus_table.sql
UTF-8
573
2.890625
3
[ "MIT" ]
permissive
INSERT INTO dbo.NasdaqFinancialStatus ([Status], [Value]) SELECT 'D','Deficient: Issuer Failed to Meet NASDAQ Continued Listing Requirements' UNION ALL SELECT 'E','Delinquent: Issuer Missed Regulatory Filing Deadline' UNION ALL SELECT 'Q','Bankrupt: Issuer Has Filed for Bankruptcy' UNION ALL SELECT 'N','Normal (Default...
true
fff751b276ce6f270b522383c602a3077dab6b97
SQL
sp98/Prgramming
/Database Tutorials/Practise2.sql
UTF-8
1,733
4.53125
5
[]
no_license
# Understanding the tables: SELECT * FROM customers; SELECT * FROM employees; SELECT * FROM offices; SELECT * FROM orderdetails; SELECT * FROM orders; SELECt * FROM payments; SELECT * FROM productlines; SELECT * FROM products; # Get Total Products Types in Each Product Line SELECT productLine, COUNT(productName) FROM...
true
4f0f78878a54f9996152b7af850dac22aeff414e
SQL
murphm8/convo_specification
/schema/schema.sql
UTF-8
3,645
3.578125
4
[]
no_license
-- MySQL Script generated by MySQL Workbench -- 11/29/15 15:24:30 -- 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
11a037d6cd0a6dd6b592380c4045d91de2f91bcb
SQL
hall500/hackerrank-codes
/SQL/draw_the_triangle.sql
UTF-8
505
3.5
4
[]
no_license
/* P(R) represents a pattern drawn by Julia in R rows. The following pattern represents P(5): * * * * * * * * * * * * * * * Write a query to print the pattern P(20). */ DELIMITER // CREATE PROCEDURE GeneratePattern(IN num_rows INT) BEGIN DECLARE counter INT DEFAULT 1; DECLARE pattern VARCHAR(255) DEFAULT '*...
true
082400cbf65cc9ff5ce9c84dd48fa19aaa38a76e
SQL
nhs-digital-gp-it-futures/BuyingCatalogueIdentity
/src/NHSD.BuyingCatalogue.Identity.UserDatabase/Tables/RelatedOrganisations.sql
UTF-8
511
3.421875
3
[ "MIT" ]
permissive
CREATE TABLE dbo.RelatedOrganisations ( OrganisationId uniqueidentifier NOT NULL, RelatedOrganisationId uniqueidentifier NOT NULL, CONSTRAINT PK_RelatedOrganisations PRIMARY KEY (OrganisationId, RelatedOrganisationId), CONSTRAINT FK_RelatedOrganisations_OrganisationId FOREIGN KEY (OrganisationId) REFER...
true
a70e05e22c9a9d6573f258cbebf946faa8c5133c
SQL
upself/trails
/deployment/2016_sprint4/Story_41533/Alter_ScheduleF_pd.sql
UTF-8
1,290
2.59375
3
[]
no_license
ALTER TABLE "EAADMIN"."SCHEDULE_F" ALTER COLUMN SOFTWARE_ID DROP NOT NULL; ALTER TABLE "EAADMIN"."SCHEDULE_F" ALTER COLUMN SOFTWARE_NAME DROP NOT NULL; ALTER TABLE "EAADMIN"."SCHEDULE_F" ALTER COLUMN SOFTWARE_TITLE DROP NOT NULL; ALTER TABLE "TRAILSPD_CD"."SCHEDULE_F" ALTER COLUMN SOFTWARE_ID DROP NOT NULL; ALTER TABLE...
true
e912ad1ee8fd52c6681caffdb411b042ecd1d057
SQL
jasonraimondi/golang-rest-api_nextjs-ssr-client
/db/migrations/000001_create-users-table.up.sql
UTF-8
318
2.65625
3
[]
no_license
CREATE TABLE users ( id UUID PRIMARY KEY, first VARCHAR(255), last VARCHAR(255), password_hash VARCHAR(255), email VARCHAR(255) UNIQUE NOT NULL, is_verified BOOLEAN DEFAULT FALSE, created_at BIGINT NOT NULL, modified_at BIGINT );
true
2c49dc5ea79ee25b2fb91e5de052e616e3a63eb9
SQL
Telefonica/rural-planner
/sql/ar/indirect_covered_population.sql
UTF-8
4,487
4.09375
4
[]
no_license
CREATE TABLE IF NOT EXISTS rural_planner.indirect_covered_population ( tower_id int, settlement_ids text, settlement_names text, covered_settlements bigint, covered_population bigint, ...
true
5ba26a88b43b0fd930937abe9352cfd6e3046d8a
SQL
aJinbeier/course-selection-system
/SQLQuery1.sql
UTF-8
1,070
3.28125
3
[]
no_license
/*if exists(select name from sys.databases where name='st') drop database st; create database st;*/ use st; if exists (select name from sys.tables where name='admin') drop table admin; create table admin( uname varchar(20) primary key, password varchar(20) not null, name varchar(10) not null ) if exists (selec...
true
b21f63c70e7ad18795cc6e9386b6f929f26d8512
SQL
Ashley-Pritchard/Elective-QA-Scripts
/q3_missing_indication_category.sql
UTF-8
3,263
3.765625
4
[]
no_license
/* The following script identifies null genetictest.indicationcategory fields for which it may be possible to * interpret the indication category using information from the genetictest.clinicalindication field. Note that * this query only pulls the fields which align to definitive indication categories. However, ...
true
c2edacf53320c7adc9affc2756d48f7f764698e8
SQL
jen-do/petition
/users.sql
UTF-8
244
2.796875
3
[]
no_license
DROP TABLE IF EXISTS users; CREATE TABLE users ( id SERIAL PRIMARY KEY, first VARCHAR(50) NOT NULL, last VARCHAR(50) NOT NULL, email VARCHAR(200) NOT NULL UNIQUE CHECK (email <>''), pass VARCHAR(200) NOT NULL );
true
da5c9edf9668a1e93cb5344a694f52ee8f8ee626
SQL
fcasaloti/Inventory-App
/inc/sql/CREATE-DATABASE.sql
UTF-8
3,650
3.25
3
[]
no_license
DROP DATABASE IF EXISTS assessment; CREATE DATABASE assessment; USE assessment; CREATE TABLE user ( id INT AUTO_INCREMENT PRIMARY KEY, name TINYTEXT NOT NULL, email TINYTEXT NOT NULL, username TINYTEXT NOT NULL, password TINYTEXT NOT NULL, role TINYTEXT NOT NULL, companyname TINYTEXT NOT NUL...
true
f395f6c8f8052b78602bef42c770923acc7f8268
SQL
sanghyukYoun/Calendar
/1/WebContent/board/board.sql
UTF-8
233
2.84375
3
[]
no_license
drop table Board; create table Board ( id int not null auto_increment, user varchar(8) not null, title varchar(8) not null, date varchar(10), content varchar(500) not null, primary key (id) ) charset=utf8; select * from Board;
true
cf32bf0023026ef8a92655879da6265e4d39c1b3
SQL
ffimnsr-archive/sample-vertx-graphql
/graph/src/main/resources/db/migration/V2.3__Create_Work_Experience_Schema.sql
UTF-8
624
3.5625
4
[]
no_license
CREATE TABLE IF NOT EXISTS work_experiences ( id BIGINT UNSIGNED PRIMARY KEY DEFAULT UUID_SHORT(), user_id BIGINT UNSIGNED NULL DEFAULT NULL, title VARCHAR (100) NOT NULL, organization VARCHAR (200) NOT NULL, location VARCHAR (200) NOT NULL, from_date DATE NOT NULL, to_date DATE NOT NULL, description TE...
true
143b30634809cfe3e7dc3cc306d53412b9483587
SQL
xunfeiniao/Django
/Book_Django/django_db1.sql
UTF-8
13,480
2.875
3
[]
no_license
# SQL-Front 5.1 (Build 4.16) /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE */; /*!40101 SET SQL_MODE='NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES */; /*!40103 SET SQL_NOTES='ON' */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS */; /*!40014 SET UNIQUE_CHECKS=0 */; /*!40014 SET @...
true
90e0f3873cd42fd2f71f6a33cb43273269ecbfd9
SQL
enghelizabeth/ReservationProject
/avionrapide/ScriptsForDB/airport_script.sql
UTF-8
663
2.578125
3
[]
no_license
insert into airport(airport_code, airport_name, city, state_abbrev, zipcode) values ('BHM', 'Birmingham International Airport', 'Birmingham', 'AL', 35212), ('DHN', 'Dothan Regional Airport', 'Dothan', 'AL', 36303), ('HSV', 'Huntsville International Airport', 'Huntsville', 'AL', 35824), ('IWA', 'Phoenix–Mesa Gateway Air...
true
bd391e36c244f6c5dc2a8b8b57855d9c9100a2a8
SQL
JonCourbon/domaineskiable
/domaineskiable_V2/divers/scriptcreationbdd.sql
UTF-8
869
3.421875
3
[]
no_license
/* table: piste(id,nom,type,couleur) */ CREATE TABLE IF NOT EXISTS piste ( id int(11) NOT NULL AUTO_INCREMENT, nom varchar(20) NOT NULL, type varchar(20) NOT NULL, couleur varchar(20) NOT NULL, PRIMARY KEY (id) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; INSERT INTO piste(id, nom, type, couleur) VALUES(NULL, '...
true
dfdf8f69b75c15d87c4d38491a52622ea3adf630
SQL
ritz0007/go-drive
/docs/init.sql
UTF-8
1,621
3.078125
3
[ "MIT" ]
permissive
-- DDL CREATE TABLE drives ( name VARCHAR PRIMARY KEY, type VARCHAR NOT NULL, config VARCHAR NOT NULL, enabled INTEGER ); CREATE TABLE path_mount ( path VARCHAR, name VARCHAR, mount_at VARCHAR NOT NULL, PRIMARY KEY (path, name) ); CREATE TABLE groups ( name ...
true
fdf85bbb859d2e23591d340f3470866cc34f0587
SQL
mseong123/protocount-nodejs-mysql
/mysql_files/STORED PROCEDURES/GOODS_RECEIVED_NOTE/SELECT_GOODS_RECEIVED_NOTE.sql
UTF-8
925
3.671875
4
[]
no_license
DELIMITER // CREATE PROCEDURE SELECT_GOODS_RECEIVED_NOTE(IN GOODS_RECEIVED_NOTE_NUM_PARAM VARCHAR(20)) BEGIN DECLARE EXIT HANDLER FOR SQLEXCEPTION BEGIN ROLLBACK; RESIGNAL; END; START TRANSACTION; SELECT CREDITOR_NUM, CREDITOR_NAME, CREDITOR_ADDRESS, GOODS_RECEIVED_NOTE_NUM,GOODS_RECEIVED_NOTE_DATE,GOODS_RECEIVED_NOTE...
true
10451a9ba6af183656352182919495e2d93ccd0c
SQL
silence-do-good/stress-test-Postgres-and-MySQL
/dump/high/day09/select1438.sql
UTF-8
260
3.0625
3
[]
no_license
SELECT sen.name FROM SENSOR sen, SENSOR_TYPE st, COVERAGE_INFRASTRUCTURE ci WHERE sen.SENSOR_TYPE_ID=st.id AND st.name='WeMo' AND sen.id=ci.SENSOR_ID AND ci.INFRASTRUCTURE_ID=ANY(array['2099','2214','3214','3059','5226','6056','1427','2061','3222','2092'])
true
b2fe4304f04ad6692316927d1962692c2968e6c6
SQL
arthurjdileo/buy-me
/schemas/sessions.sql
UTF-8
256
3.640625
4
[]
no_license
CREATE TABLE Sessions( id int NOT NULL AUTO_INCREMENT, session_uuid varchar(36) NOT NULL UNIQUE, acc_uuid varchar(36) NOT NULL UNIQUE, created datetime DEFAULT NOW() NOT NULL, PRIMARY KEY(id), FOREIGN KEY(acc_uuid) REFERENCES Users(acc_uuid) );
true
40c7d1d29f0be385e23d19f3cf651d7639e82d5e
SQL
ttaek1320/ShoppingMall
/WebContent/sql/newfile.sql
UTF-8
4,557
3.515625
4
[]
no_license
/* Drop Views */ DROP VIEW SCOTT.BEST_PRO_VIEW; DROP VIEW SCOTT.CART_VIEW; DROP VIEW SCOTT.NEW_PRO_VIEW; DROP VIEW SCOTT.ORDER_VIEW; /* Drop Tables */ DROP TABLE SCOTT.CART CASCADE CONSTRAINTS; DROP TABLE SCOTT.ORDER_DETAIL CASCADE CONSTRAINTS; DROP TABLE SCOTT.ORDERS CASCADE CONSTRAINTS; DROP TABL...
true
44e58d87ef0ae52c2fc006f235afdbfd50a62279
SQL
aliaksei-arcadia/row-security-policies
/initdb/3_grants.sql
UTF-8
453
2.65625
3
[]
no_license
GRANT SELECT, UPDATE, INSERT, DELETE ON ALL TABLES IN SCHEMA public TO user1, user2, user_admin, customer3; GRANT SELECT, USAGE ON ALL SEQUENCES IN SCHEMA public TO user1, user2, user_admin, customer3; GRANT USAGE ON SCHEMA public TO user1, user2, user_admin, customer3; ALTER USER user1 SET SEARCH_PATH = public; ALTE...
true
033c073e2680b9f22c61a9ad27e70a270cb17908
SQL
PerOxiD692/DB_SQL
/05_SQL_SELECT/05_6b_que_count.sql
UTF-8
1,537
4.15625
4
[]
no_license
/* QUERIES - COUNT() */ USE user_db; /* ----- Links / Verweise ----- */ /* https://dev.mysql.com/doc/refman/5.6/en/counting-rows.html https://dev.mysql.com/doc/refman/5.6/en/group-by-handling.html https://dev.mysql.com/doc/refman/5.6/en/aggregate-functions.html#function_count-distinct */ /* Welche VERSCHIEDENEN Sekto...
true
9b997e321655e87b856dd316c17495ada23c2e05
SQL
irfandawood/Vocabulary-v5.0
/cp_ProdV5_tab.sql
UTF-8
1,054
3.109375
3
[ "Unlicense" ]
permissive
-- Copy all relevant tables from DevV5 create table CONCEPT as select * from v5Dev.CONCEPT; create table VOCABULARY as select * from v5Dev.VOCABULARY; create table DOMAIN as select * from v5Dev.DOMAIN; create table CONCEPT_CLASS as select * from v5Dev.CONCEPT_CLASS; create table CONCEPT_RELATIONSHIP as select * from v...
true
c6adf435d7600859434b16eb1a78cc1f441946a6
SQL
jinalsapariya/Database-Management-system-for-Online-reservation-system
/all_inserts.sql
UTF-8
19,897
2.671875
3
[]
no_license
insert into user_address values ('peterborough','boston','MA',56372,'5'),('mass ave','california','CA',56572,'7'),('borivali','mumbai','MH',56982,'8'); insert into place_address values ('peter','boston','MA',56772,1),('columbia','california','CA',58622,2),('malad','mumbai','MH',56992,3),('borivali','delhi','DH',58992,4...
true
d8033ad48b6c9e391fa11921d29e0b5927876483
SQL
GLAMOS/database
/src/CREATE/glacier_hazards/CREATE_geometries.sql
UTF-8
685
3.140625
3
[]
no_license
/* ---------------------------------------------------- */ /* Generated by Elias Hodel */ /* Created On : 21.02.2020 */ /* DBMS : PostgreSQL, GLAMOS-DB */ /* ---------------------------------------------------- */ DROP TABLE IF EXISTS glacier_hazard.geometries CASCADE ; /* ...
true
beb68d5be457aa3b9076c2f8b7feec0be838b8e6
SQL
commoncrawl/cc-index-table
/src/sql/examples/cc-index/similar-domains.sql
UTF-8
698
3.78125
4
[ "Apache-2.0" ]
permissive
-- find similar domains -- - Levenshtein distance to wikipedia.* is 2 or less -- - play on words, accidental similarity, -- parked domain, phishing site? ... -- SELECT COUNT(*) AS n_pages, COUNT(DISTINCT(url_host_name)) as n_hosts, levenshtein_distance('wikipedia', url_host_2nd_last_part) AS levensh...
true
adbb7e296ac80a79774b1c72298b85623540aa20
SQL
matheussampaio/sig
/consultas/consulta02.sql
UTF-8
275
3.25
3
[ "MIT" ]
permissive
/* 2- Qual o comprimento da rodovia 'PB-008'? (Distancia convertida em KM)*/ SELECT rodovias.codrodov AS nome, sum(st_length(ST_Transform(rodovias.geom, 29195))) / 1000 AS comprimento FROM sig.rodovias rodovias WHERE rodovias.codrodov = 'PB-008' GROUP BY rodovias.codrodov
true
fc1501914b37e60e83b1284657e5d79dd0fbb930
SQL
TDoraX/Alibaba-Site-Project
/SQL/ali1688.sql
UTF-8
7,150
2.734375
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.8.4 -- https://www.phpmyadmin.net/ -- -- 主机: localhost -- 生成日期: 2019-03-01 04:26:31 -- 服务器版本: 10.1.37-MariaDB -- PHP 版本: 7.3.1 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
3b6cccd1be4e4c6a19e3bb38987435f3fc9af075
SQL
ImpassiveSensor/Online-Lawyer-Finder
/site1/lawyerSearching.sql
UTF-8
967
3.09375
3
[]
no_license
clear screen; SET SERVEROUTPUT ON; SET VERIFY OFF; drop table newTable; create table newTable as select * from lawyer union select * from lawyer@site1; create or replace view myView(ID, NAME, PERCENTAGE, Sector, AREA) as select L_id, lawyer_name, percentage, lawyer_type, lawyer_address from newTable order by pe...
true
0bc601a22f97ae6dc318f670e05429724a6f30c0
SQL
light9707/Java-
/Ibatis简单验证用户登录/shopdb.sql
UTF-8
4,221
3.28125
3
[]
no_license
/* SQLyog Ultimate v11.42 (64 bit) MySQL - 5.6.42 : Database - shopdb ********************************************************************* */ /*!40101 SET NAMES utf8 */; /*!40101 SET SQL_MODE=''*/; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=...
true
cca74dca94a7c5006fb1241ae3e3841df4f92652
SQL
amitpriyasingh/Boutiqaat
/boutiqaat-etl-master/firebase/queries/redshift/item_listing_impressions_load.sql
UTF-8
1,158
3.203125
3
[]
no_license
{% set FDATE = "{}-{}-{}".format(DATE[:4], DATE[4:6], DATE[6:]) %} DROP TABLE IF EXISTS tmp_item_listing_impressions; CREATE TEMP TABLE tmp_item_listing_impressions( app_version VARCHAR(10), event_name VARCHAR(50), session_id INTEGER, ga_session_number INTEGER, advertising_id VARCHAR(50), event...
true
d3a2a91b7c6dad8de8e736331be9bc4f707bc37d
SQL
rosnerpn/livrophp
/livrophp/sql/cria_bd.sql
UTF-8
1,801
2.96875
3
[]
no_license
create database tarefas collate = utf8_general_ci; use tarefas; create table tarefas( id int AUTO_INCREMENT PRIMARY KEY, nome varchar(20) not null, descricao TEXT, prazo DATE, prioridade int(1), concluida boolean); CREATE TABLE anexos ( id INTEGER AUTO_INCREMENT PRIMARY KEY, tarefa_id INTEGER NOT NULL, ...
true
b4dfef474eb8c880a97686d0765c3c90b2667229
SQL
Kassykcn/web_portfolio
/project_jjh/src/main/abank/src/project.sql
UHC
22,241
3.609375
4
[]
no_license
/* Drop Tables */ DROP TABLE BBS CASCADE CONSTRAINTS; DROP TABLE CMMN_CODE CASCADE CONSTRAINTS; DROP TABLE COIN_REPOSITORY CASCADE CONSTRAINTS; DROP TABLE COIN_REPOSITORY_HIST CASCADE CONSTRAINTS; DROP TABLE MNGR_INQRY CASCADE CONSTRAINTS; DROP TABLE NOTICE CASCADE CONSTRAINTS; DROP TABLE REFND CASCADE CONSTRAINTS; D...
true
9f355f4f54d8f437efd029c6c2a982882ed2df50
SQL
alisagaming/bubbleparty
/trunk/Server/sql/create_tables.sql
UTF-8
796
2.921875
3
[]
no_license
create table players ( player_id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, device_id VARCHAR(50) UNIQUE KEY, facebook_id VARCHAR(50) UNIQUE KEY, first_name VARCHAR(50), last_name VARCHAR(50), device_model VARCHAR(100), device_type VARCHAR(50), operating_system VARCHAR(100), region VARCHAR(50), ...
true
86909051d85e69040e42c4fee5e91fc9e12ba27e
SQL
brockstonking/KSG-reviewMe
/db/get_business_messages.sql
UTF-8
198
3.171875
3
[]
no_license
SELECT * FROM sent_messages sm JOIN locations lo ON lo.location_id = sm.location_id JOIN businesses bu ON bu.business_id = lo.business_id WHERE bu.business_id = $1 ORDER BY message_id DESC LIMIT 10;
true
89f69662362d72f8b788bb3a03803e43b1ef8b66
SQL
AurlinD/304project
/initialize.sql
UTF-8
15,879
3.609375
4
[]
no_license
drop table branch_employee; drop table cart; drop table purchase_has_album; drop table makes_purchase; drop table album_has_song; drop table branch_carries_album; drop table customer; drop table album; drop table branch; create table customer (cust_email varchar(50) not null, cust_name varchar(40) not null, cust_pa...
true
6a86d8201eacafca4eebb96eab230b069e89a0e7
SQL
martinmares/OracleUtilities
/UTL$BASE$ERR.package.sql
WINDOWS-1250
2,466
2.703125
3
[]
no_license
CREATE OR REPLACE PACKAGE UTL$BASE$ERR IS /** * ====================================================================== * ANNOTATION * ====================================================================== * Basic package to handle Oracle exceptions (ORA-20xxx errors). ...
true
3c8e91465ec7b0e6629114d67ed0b13e87fe5215
SQL
jl5x4/CS590VC_Midterm
/sqoop_javademo/sqoop.sql
UTF-8
387
3.078125
3
[]
no_license
-- Drop table Orders if exists DROP TABLE orders; -- Creates table Orderes CREATE TABLE orders ( id INT PRIMARY KEY NOT NULL, name VARCHAR(20) NOT NULL, description VARCHAR(60) NOT NULL); -- SQL script to load data in the tables LOAD DATA LOCAL INFILE '/home/jeff/orderdata.csv' INTO TABLE hadoop.orders FIELDS TERMINA...
true
5dbf43d2327947e23277f9b47d3500695b501d8f
SQL
LucasOlmedo/TCCFatecZL
/preview3.sql
UTF-8
6,491
3.546875
4
[]
no_license
/* SQLyog Ultimate v12.09 (64 bit) MySQL - 10.1.16-MariaDB : Database - tcc_fateczl ********************************************************************* */ /*!40101 SET NAMES utf8 */; /*!40101 SET SQL_MODE=''*/; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREI...
true
6076de909a574b910d622c6f8df3acf4bd335bca
SQL
creed2020/Projeto-Integrador-site-din-mico
/database.sql
UTF-8
7,015
3.640625
4
[]
no_license
-- Banco de Dados da Aplicação "Sem Nome" -- CUIDADO! ALTAMENTE DESTRUTIVO -- Apague este arquivo quando a modelagem estiver concluída! -- Apagando o banco de dados caso ele já exista DROP DATABASE IF EXISTS semnome; -- Criando o banco de dados em UTF-8 e com buscas case-insensitive CREATE DATABASE semnom...
true
8f953f8957410269f2e867699a5307282f0e3654
SQL
bttodd11/mysql
/create_shop.sql
UTF-8
783
2.90625
3
[]
no_license
CREATE TABLE IF NOT EXISTS shop ( product_id INT UNSIGNED NOT NULL AUTO_INCREMENT, product_name VARCHAR(20) NOT NULL, product_desc VARCHAR(200) NOT NULL, product_price DECIMAL(5,2) NOT NULL, product_sz VARCHAR(20) NOT NULL, PRIMARY KEY(product_id)); INSERT INTO shop (product_name,product_desc,product_pri...
true
fc72bace89701e975fe3b337e0faa16b11d18c78
SQL
EBISPOT/goci
/goci-core/goci-db-binding/src/main/resources/db/migration/V1.9.9_003__Disable_wrong_constraint.sql
UTF-8
981
2.671875
3
[ "Apache-2.0", "LicenseRef-scancode-warranty-disclaimer" ]
permissive
/* ################################################################################ Migration script to remove a wrong constraint created in 002 Designed for execution with Flyway database migrations tool; this should be automatically run to completely generate the schema that is out-of-the-box compatibile with the G...
true
1971c19e3319fae861fae6adadf975c996b949d3
SQL
Gafkcenter/warm_v15
/gafker.manage/gafker-manage-web/src/main/resources/sql/wo_timetable.sql
UTF-8
2,082
2.984375
3
[]
no_license
CREATE TABLE `wo_timestable` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `start_time` int(11) DEFAULT '0' COMMENT 'int开始时间', `start_time_string` varchar(255) DEFAULT NULL COMMENT '开始时间串', `start_time_date` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '日期', `day_start` int(11) DEFAULT NULL CO...
true
901c6ea37cae715618dac0223c0daaf49c4fa421
SQL
aemooooon/Database-MSSQLSERVER
/Answers/Week3Lab1Answers-UPDATE-DELETE.sql
UTF-8
1,810
4.1875
4
[]
no_license
/* Using Transact-SQL : Exercises ------------------------------------------------------------ /* Exercises for section 9 : UPDATE *In all exercises, write the answer statement and then execute it. e9.1 Change the name of IN628 to 'Object-Oriented Software Development (discontinued after 2019)' update Paper s...
true
8fa294487c21648a1c455e0e19e487a96515d336
SQL
liulehui/mini_atp
/schema/11.sql
UTF-8
302
3.953125
4
[]
no_license
//Past champions and how many times given tournament ID SELECT first_name||' '||last_name as name, COUNT (start_year) as count FROM tournament INNER JOIN players ON tournament.singer_winner_id = players.id WHERE tournament.tournament_id = 540 group by first_name,last_name order by count desc;
true
63cc51b3034237b9590b66a532fc476b3b3ee75a
SQL
Sagar9794/SQL_IPL_Bidding_App
/IPL_Project.sql
UTF-8
4,425
4.375
4
[]
no_license
select * from ipl_bidder_details; select * from ipl_bidder_points; select * from ipl_bidding_details; select * from ipl_match; select * from ipl_match_schedule; select * from ipl_player; select * from ipl_stadium; select * from ipl_team; select * from ipl_team_players; select * from ipl_team_standings; selec...
true
0b7082e03422aef18630ef67729b43dbf49f35fe
SQL
bayuwijaya/buku_pintar_webmaster
/sql/kayarawan&infokaryawan.sql
UTF-8
29,264
3.21875
3
[]
no_license
C:\Users\myasus>cd \xampp\mysql\bin C:\xampp\mysql\bin>mysql -u root Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 5 Server version: 10.1.19-MariaDB mariadb.org binary distribution Copyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' fo...
true
b044bb48a021d89097a714434478664ab42bac1d
SQL
MaximDragosAndrei/fiimem
/create.sql
UTF-8
7,409
3.703125
4
[]
no_license
--tabele CREATE TABLE Files (fid number(10) NOT NULL, Membersmid number(10) NOT NULL, address varchar2(255) NOT NULL UNIQUE, name varchar2(255) NOT NULL, format varchar2(16) NOT NULL, PRIMARY KEY (fid, Membersmid)); CREATE TABLE GenTree (mid number(10) NOT NULL, mid2 number(10) NOT NULL, relationship number(1) NOT NU...
true
c4fe294b45cd305e3e29d071795e77eb8a81e216
SQL
tonraj/gwaliorcovid19
/website/db.sql
UTF-8
16,957
2.921875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1:3306 -- Generation Time: Apr 10, 2020 at 12:47 PM -- Server version: 5.7.26 -- PHP Version: 7.3.5 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHA...
true
0a656325ed17c0d7dc1d1136d1f44dee0b72ead0
SQL
coalchan/TPC-H
/TPC-H_on_Hive/tpch/q17_small_quantity_order_revenue.hive
UTF-8
1,665
3.828125
4
[]
no_license
DROP TABLE lineitem; DROP TABLE part; DROP TABLE q17_small_quantity_order_revenue; DROP TABLE lineitem_tmp; -- create the tables and load the data create external table lineitem (L_ORDERKEY INT, L_PARTKEY INT, L_SUPPKEY INT, L_LINENUMBER INT, L_QUANTITY DOUBLE, L_EXTENDEDPRICE DOUBLE, L_DISCOUNT DOUBLE, L_TAX DOUBLE, ...
true
55c9f08f7ff69448b34a5f06d342f47b093d9999
SQL
NLTDIndia/AssetManagement
/AMS_Source/UploadFile/30034/GetAssetsView.sql
UTF-8
692
3.953125
4
[ "MIT" ]
permissive
ALTER view AllocatedAssets as select a.AssetId, a.AssetTagNumber, ats.Name as AssetType, ac.Name as AssetCategory, e. FirstName, al.Name as [Location], al.Id locationId,e.UserId empId from assets a inner join AssetAllocation aa on a.AssetId=aa.AssetId inner join AssetRequest ar on a.AssetRequestId = ar.Id inner join As...
true
09ca067e92262b5b1f2fadd828291c9feeb5fa9e
SQL
ayoubHam2000/fs_licence
/s6_repository/sql/plsqlcodes/30/ep28 Nested table.sql
UTF-8
1,259
3.578125
4
[]
no_license
set serveroutput on set autoprint off /* Are two types Pl/SQL records -> PL/SQL collections - INDEX BY tables or association array - Nested table - VARRAY */ --> 2. Nested table /* No index in nested table (unlike index by table) it is valide data type in sql (unlike index by table, ...
true
9349eeb324588951272a2926f02c3aa283a71a74
SQL
sildrian/board-info-dengan-library-departure-board-master
/db_info.sql
UTF-8
2,989
3.28125
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.6.5.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jul 21, 2017 at 10:45 AM -- Server version: 10.1.21-MariaDB -- PHP Version: 7.1.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET...
true
c6051b2a5ab461201366e48bd5bb2e5d6f0c67a9
SQL
ziyuan-shen/LSTM_MIMICIII
/Code/sql/vitals.sql
UTF-8
4,429
4.03125
4
[]
no_license
DROP TABLE IF EXISTS rnn_vitals; CREATE TABLE rnn_vitals AS WITH processed_vital AS ( SELECT vital.icustay_id , vital.day , avg(HeartRate) as HeartRate , avg(SysBP) as SysBP , avg(DiasBP) as DiasBP , avg(MeanBP) as MeanBP , avg(RespRate) as RespRate , avg(TempC) as TempC ...
true
e7cc47fefa2133f57f86ab7b4f856b3469bddfdf
SQL
sunboxpc/data_labs
/sql/nor_fiopro_count.sql
UTF-8
398
3.46875
3
[]
no_license
with temp as (select distinct UPPER(fiopro_old) as fiopro, UPPER(fiopro) as fiopro_cleared, min(ddate_date_sale) as min_date_sale from scource where levenshtein(UPPER(fiopro_old),UPPER(fiopro))>2 group by UPPER(fiopro_old), UPPER(fiopro) order by UPPER(fiopro_old) ) select fiopro_cleared, count(fiopro...
true
3323142fb60ee8b0eedc4cec8f5ab0640b72c27d
SQL
radtek/abs3
/sql/mmfo/bars/ForeignKey/skrynka_staff.sql
UTF-8
2,161
2.96875
3
[]
no_license
PROMPT ===================================================================================== PROMPT *** Run *** ========== Scripts /Sql/Bars/ForeignKey/SKRYNKA_STAFF.sql =========*** Ru PROMPT ===================================================================================== PROMPT *** Create constrain...
true
25e2d0c417ccb3ced002ad1654859ab331e0bfb0
SQL
AlekHadzidedic/TMS-TCS
/db/sql/schemas.sql
UTF-8
1,422
3.40625
3
[]
no_license
CREATE SCHEMA IF NOT EXISTS tms; CREATE TABLE IF NOT EXISTS tms.instructor ( id SERIAL PRIMARY KEY, first_name VARCHAR (20) NOT NULL, last_name VARCHAR (50) NOT NULL, email VARCHAR (50) NOT NULL UNIQUE, password VARCHAR (255) ); CREATE TABLE IF NOT EXISTS ...
true
6719e8e7d794292202db8822037e087e89cddf00
SQL
gryphonshafer/pnwquizzing
/config/db/1628093585_create_db/deploy.sql
UTF-8
2,043
3.734375
4
[ "LicenseRef-scancode-unknown-license-reference", "MIT" ]
permissive
CREATE TABLE IF NOT EXISTS org ( org_id INTEGER PRIMARY KEY AUTOINCREMENT, name TEXT NOT NULL UNIQUE, acronym TEXT NOT NULL UNIQUE, address TEXT, active INTEGER CHECK( active = 1 OR active = 0 ) NOT NULL DEFAULT 1 ); CREATE TABLE IF NOT EXISTS user ( user_id INTEGER PRIMARY KEY AUTOINCR...
true
f87c1f434272dc2e95935da3e7d5976787b4abc5
SQL
sbishop7/DojoAssignments
/Python/MySQL/World/8_numberOfCountries.sql
UTF-8
367
3.640625
4
[]
no_license
# 8. What query would you run to summarize the number of countries in each region? # The query should display the name of the region and the number of countries. # Also, the query should arrange the result by the number of countries in descending order. USE world; SELECT region, count(name) AS countries FROM count...
true
1af7bc95263ff5703ae8a53ab603133cc9c4a67e
SQL
mcrobertw/codigosvarios
/SQLSERVER-OperacionImposible-01.sql
UTF-8
400
2.984375
3
[]
no_license
create table DEUDA( iddeuda INTEGER not null constraint DEUDA_PK_IDDEUDA primary key(iddeuda), idcliente INTEGER constraint DEUDA_FKDEUDACLIENTE_idcliente foreign key references CLIENTE(idcliente), descripcion_deuda VARCHAR(90), montooriginal NUMERIC(7,2), montopendiente NUMERIC(7,2) check (montopendiente<=montoo...
true
e1b01f1c86a922f997a1e0501787f03b273d9614
SQL
jchoi0415/sqltraining
/T-SQL/UsingSubQueriesAndAPPLY.sql
UTF-8
613
3.96875
4
[]
no_license
SELECT MAX(UnitPrice) FROM SalesLT.SalesOrderDetail; SELECT * FROM SalesLT.Product WHERE ListPrice > 1467.01; SELECT * FROM SalesLT.Product WHERE ListPrice > (SELECT MAX(UnitPrice) FROM SalesLT.SalesOrderDetail); SELECT CustomerID, SalesOrderID, OrderDate FROM SalesLT.SalesOrderHeader AS so1 WHERE OrderDate = (...
true
b6b7e63fd4c02a1187a56e85315447bd42baec79
SQL
ngarciaiii/sqlzoo.net
/SELECT_within_SELECT.sql
UTF-8
5,663
4.40625
4
[]
no_license
/* | name | continent | area | population | gdp | | Afghanistan | Asia | 652230 | 25500100 | 20343000000 | | Albania | Europe | 28748 | 2831741 | 12960000000 | | Algeria | Africa | 2381741 | 37100000 | 188681000000 | | Andorra | Europe | 468 | 78115 | 3712000000 | | Angola | Africa | 1246700 | 20609294 | 100990000000 |...
true
06ccad8c45e3870325df319eca529b45cf8af24b
SQL
clabnet/DataTestLoader
/ConsoleAppTest/DatabaseScripts/PC-DESKTOP-northwind_mini-POSTDATA.sql
UTF-8
856
2.53125
3
[ "Apache-2.0" ]
permissive
-- -- PostgreSQL database dump -- SET statement_timeout = 0; SET lock_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings = on; SET check_function_bodies = false; SET client_min_messages = warning; SET search_path = public, pg_catalog; SET default_tablespace = ''; -- -- Name: pk_categories; T...
true
30649dc2c9b258b6cc22407544d1310e30e64288
SQL
sergiomt/hipergate
/classes/trunk/com/knowgate/hipergate/datamodel/tables/jobs.ddl
UTF-8
8,922
3.03125
3
[]
no_license
CREATE TABLE k_lu_job_commands ( id_command CHAR(4) NOT NULL, /* Comando de ejecuci�n */ tx_command VARCHAR(254) NULL, /* Descripci�n de la acci�n */ nm_class CHARACTER VARYING(254) NULL, /* Nombre de la clase Java que ejecuta la accion */ CONSTRAINT pk_lu_job_commands PRIMARY KEY(id_command...
true
4435385ef2c41fc8c8542b4af339868b2f08e6cc
SQL
JunpeiAnzai/workflow-examples
/machine-learning/sfdc-predictive-analytics/queries/minmax_test.sql
UTF-8
406
2.515625
3
[]
no_license
SELECT -- fill NULLs w/ mean values AVG(annualrevenue) AS test_avg_annualrevenue, AVG(numberofemployees) AS test_avg_numberofemployees, -- for min-max normalization MAX(annualrevenue) AS test_max_annualrevenue, MIN(annualrevenue) AS test_min_annualrevenue, MAX(numberofemployees) AS test_max_numberofemployee...
true
57fc3fa8f24ca1313fee89eede632c16f9a0279e
SQL
Bgreen23/api-lab-template
/jedi.sql
UTF-8
2,069
2.984375
3
[]
no_license
-- MySQL dump 10.13 Distrib 5.7.18, for Linux (x86_64) -- -- Host: localhost Database: jedidb -- ------------------------------------------------------ -- Server version 5.7.18-0ubuntu0.16.04.1 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET...
true
491cca5b5199a09a55600469b75472144017dd5a
SQL
banthaza/UnionSwiss
/UnionSwiss.Api/UnionSwiss.Db/Finance/Data/Script.TaxYears.sql
UTF-8
684
3.0625
3
[]
no_license
SET IDENTITY_INSERT [Finance].[TaxYears] ON; MERGE INTO [Finance].[TaxYears] AS trgt USING ( VALUES (5, 'Mar 1 2016 12:00:00:000AM', 'Feb 28 2017 12:00:00:000AM' ) ) AS src([Id], [StartDate], [EndDate]) ON trgt.[Id] = src.[Id] WHEN MATCHED THEN UPDATE SET [StartDate] =...
true
1d5de3b5055680ebcb737042abc3c3f2b1498085
SQL
danmuck/dunce.bot
/data/db/build.sql
UTF-8
1,136
3.203125
3
[]
no_license
CREATE TABLE IF NOT EXISTS exp ( UserID integer PRIMARY KEY, UserName text DEFAULT "n/a", XP integer DEFAULT 0, Level integer DEFAULT 0, XPLock text DEFAULT CURRENT_TIMESTAMP ); -- create table for client guilds for custom prefix CREATE TABLE IF NOT EXISTS guilds ( GuildID integer PRIMARY KEY, ...
true
01860541f9cbd9da9ec59675eae750964fa1a7d8
SQL
CSant04y/holbertonschool-higher_level_programming
/0x0E-SQL_more_queries/6-states.sql
UTF-8
337
3.078125
3
[]
no_license
-- script that creates the database hbtn_0d_usa and the table states (in the database hbtn_0d_usa) on your MySQL server -- Creates a database and a table called states CREATE DATABASE IF NOT EXISTS hbtn_0d_usa; CREATE TABLE IF NOT EXISTS hbtn_0d_usa.states (id INT UNIQUE NOT NULL AUTO_INCREMENT PRIMARY KEY, name VARCHA...
true
c185faf195802cc01037d0edf1438bd4a94430d2
SQL
aleleyva10/prime-group-joins
/join-solution.sql
UTF-8
1,143
4.125
4
[]
no_license
-- 1 Get customers and their addresses SELECT * FROM customers JOIN addresses ON customers.id = addresses.customer_id; -- 2 SELECT * FROM orders JOIN line_items ON orders.id = line_items.order_id; -- 3 SELECT warehouse, products.description FROM warehouse JOIN warehouse_product ON warehouse.id = warehouse_product.wa...
true
986793d80f935f3eee63a668c0f73623a34919d7
SQL
Mostafayehya/ITI-Web-Stage
/ORM/HelloWorldDB.sql
UTF-8
1,956
3.046875
3
[]
no_license
-- MySQL Administrator dump 1.4 -- -- ------------------------------------------------------ -- Server version 5.0.18-nt /*!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 *...
true
293db3d1be360fe449b268e741a6dedbe1a1cb55
SQL
evrimulgen/FCR
/TR_ROOMS_SPEC_STOP_MOD.sql
WINDOWS-1251
629
2.859375
3
[]
no_license
-------------------------------------------------------- -- DDL for Trigger TR#ROOMS_SPEC#STOP_MOD -------------------------------------------------------- CREATE OR REPLACE EDITIONABLE TRIGGER "FCR"."TR#ROOMS_SPEC#STOP_MOD" before update or delete on T#ROOMS_SPEC declare A#I number; begin select count(*) ...
true
4e2c496f015913594e55316bc5a9b9b2b860833c
SQL
elundsten/app
/Android back/db copy.sql
UTF-8
1,784
3.484375
3
[]
no_license
use cleaning_firm; drop table `agreements`; drop table `timereports`; drop table `employeeinfos`; drop table `logins`; drop table `ongoingassignments`; create table agreements ( agreementID int(11) NOT NULL AUTO_INCREMENT, price float DEFAULT NULL, city varchar(255) DEFAULT NULL, hours int(11) DEFAULT NULL, ...
true
c343847f33ad67bf42e2cdcb0de6a4d60d2f0bdb
SQL
svan001/site-bsmt
/src/main/resources/db/migration/V3_0_2__16_04_02_member_tof.sql
UTF-8
459
2.5625
3
[]
no_license
/** * Script INSERT Member : predateur */ -- Member INSERT INTO team_member ( nick_name, forname, sexe, role, birth_date, description, gear, status, likes, doesntlikes, membership_date, creation_date ) VALUES ( 'tof raider', 'Christophe', 'M', -- M ou F 'Opérateur', '1974-03-25', 'Paintbal...
true
490e22c095169f02a72fb56d523d503106f7e4c5
SQL
ifgen-it/SQL-Oracle
/lab_9_5.sql
UTF-8
318
3.09375
3
[]
no_license
/*Лаба 9.5 Вывести список сотрудников каждого отдела в строку через запятую */ select distinct department_id, listagg(last_name, ', ') within group (order by last_name) over (partition by department_id ) name_list from employees order by department_id ;
true
b9150a410eb72fba5815e6130caca28128177ff6
SQL
kaelsilva/bd2-monitoria-u2
/q4.sql
UTF-8
487
3.25
3
[ "Unlicense" ]
permissive
DROP PROCEDURE IF EXISTS eVeterano; DELIMITER // CREATE PROCEDURE eVeterano (IN piloto_id DOUBLE) BEGIN DECLARE n DOUBLE; DECLARE s VARCHAR(256); SET n = ( SELECT num_voos FROM piloto WHERE codigo = piloto_id); IF n > 1000 THEN SET s ...
true
351cc00cf30e590134d29960ae2ea3e3abb3aaf2
SQL
viorelcontu/roadmap
/src/main/resources/db/migration/V1.02.00__insert-groups-permissions.sql
UTF-8
1,251
2.859375
3
[]
no_license
INSERT INTO groups (group_id, group_name) VALUES (9, 'ADMIN'); INSERT INTO groups (group_id, group_name) VALUES (7, 'MANAGER'); INSERT INTO groups (group_id, group_name) VALUES (5, 'AUDIT'); INSERT INTO groups (group_id, group_name) VALUES (3, 'CLIENT'); ALTER TABLE groups READ ONLY; --ADMIN 9 -- OPERATOR_ADMIN(8...
true
6d39094dda0d4ed1d3c7b11823451944b3b7bf08
SQL
stobita/bike_api
/db/migrations/00005_recruitment_prefecture.sql
UTF-8
469
3.171875
3
[]
no_license
-- +goose Up -- SQL in this section is executed when the migration is applied. CREATE TABLE recruitment_prefecture ( id int unsigned NOT NULL AUTO_INCREMENT, recruitment_id int NOT NULL, prefecture_id int NOT NULL, created_at datetime, updated_at datetime, PRIMARY KEY (`id`), UNIQUE INDEX `unique` (recrui...
true
4a036205cc076c2d2a27148b339b28216ede440e
SQL
WesleySiNeves/Scripts_SQL_Server
/4.Cursos-SQL/CursoSQL-762-SQL/Chapter3_Implement transactions/311.explicit and implicit transactions.sql
ISO-8859-1
1,407
3.671875
4
[]
no_license
use [ExamBook762Ch3] /*Implicit transactions vc tem que configurar a opo SET IMPLICIT_TRANSACTIONS ON; */ /*Modo padro */ select * from [Examples].[TestParent] SELECT @@TRANCOUNT; INSERT INTO Examples.TestParent(ParentId, ParentName) VALUES (6, 'Lukas'); SELECT @@TRANCOUNT; /*Alterando a configuracao*/ ...
true
623b98867d2ac75bc135eb58c2d22795a5566415
SQL
poissonconsulting/fwapg
/sql/tables/source/fwa_coastlines_sp.sql
UTF-8
1,565
2.890625
3
[ "MIT" ]
permissive
CREATE TABLE whse_basemapping.fwa_coastlines_sp ( linear_feature_id integer PRIMARY KEY, watershed_group_id integer, edge_type integer, blue_line_key integer, watershed_key integer, fwa_watershed_code character varying(143), local_watershed_code character varying(143), watershed_group_co...
true
762c02b1c3871a576c82dca6258e7f9a6c8aef63
SQL
chjuca/Pets_Backend
/sql/db.sql
UTF-8
1,339
3.71875
4
[]
no_license
-- Documento creado para almacenar la esturctura de base de datos a trabajar CREATE TABLE IF NOT EXISTS pets( id integer PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY, name VARCHAR(50)NOT NULL CHECK (name <> ''), age integer NOT NULL, height integer NOT NULL, weight integer NOT NULL, race VARC...
true
237198da39b9cfc5487cd7d16267c8123893c388
SQL
saulo-moura/gfir
/_font/anexo publicacao.sql
UTF-8
2,368
2.984375
3
[]
no_license
-- MySQL Administrator dump 1.4 -- -- ------------------------------------------------------ -- Server version 5.6.25-log /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CON...
true
6c760967c3ff8a44af1406ba76e68a96a37b60ac
SQL
Christianfd/TimeRegistration
/WebToolDB/TimeManagement/Tables/ProjectTables/Country.sql
UTF-8
342
2.984375
3
[]
no_license
CREATE TABLE [TimeManagement].[Country] ( [PK_Id] INT IDENTITY (1, 1) NOT NULL, [CountryName] NVARCHAR (50) NOT NULL DEFAULT 'No Country Assigned', [CountryCode] NVARCHAR(3) NOT NULL DEFAULT '-', CONSTRAINT [PK_Country] PRIMARY KEY ([PK_Id]), CONSTRAINT [UC_Country] UNIQUE ([CountryName],...
true
ca87e1c19b04d6a49f08500ebf6539625a9627ab
SQL
advaitpatel/CSC-453-Database-Technology
/orac_allfiles/oracle_sql/scripts/ch13/create_ar.sql
UTF-8
784
3.5625
4
[]
no_license
SPOOL create_ar.log; PROMPT Creating AR user... PROMPT CONNECT system/system; BEGIN EXECUTE IMMEDIATE 'DROP USER ar CASCADE'; EXCEPTION WHEN OTHERS THEN NULL; END; / CREATE USER ar IDENTIFIED BY ar DEFAULT TABLESPACE users; GRANT ALL PRIVILEGES TO ar; PROMPT Creating AR tables... PROMPT CONNECT ar/ar; C...
true
816e7a4671678dd259b9cc2e879d0461eb5601bf
SQL
thierrydecker/learning_postgresql
/documents/sql/natural_join_001.sql
UTF-8
908
4.25
4
[]
no_license
CREATE TABLE categories ( category_id serial PRIMARY KEY, category_name VARCHAR(255) NOT NULL ); CREATE TABLE products ( product_id serial PRIMARY KEY, product_name VARCHAR(255) NOT NULL, category_id INT NOT NULL, FOREIGN KEY (category_id) REFERENCES categories (category_id) ); I...
true