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
94113e02e49641af1c82c8884b490adaeb47442e
SQL
Armaniimus/portfolio_05-nov-2018
/projectFiles/projecten/Y1_P4_over-de-rhein/Database/Create_groen.sql
UTF-8
2,760
3.40625
3
[]
no_license
DROP DATABASE if EXISTS Project_over_de_rhein; CREATE DATABASE Project_over_de_rhein; USE Project_over_de_rhein; CREATE TABLE opdrachten( Opdrachtnummer INT AUTO_INCREMENT NOT NULL, Werkinstuctie VARCHAR(500) NOT NULL, Datum_uitvoering DATE NOT NULL, Kabelleverancier VARCHAR(80) NOT NULL, Waarnemin...
true
f4752f225f3faeb29e61bf2ae05723ebbf239673
SQL
tatsu245/SystemDesign
/tt_match_manager.sql
UTF-8
5,301
3.203125
3
[]
no_license
-- MySQL dump 10.13 Distrib 8.0.11, for osx10.13 (x86_64) -- -- Host: localhost Database: tt_match_manager -- ------------------------------------------------------ -- Server version 8.0.11 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RES...
true
7bae9db24f4ab2286d0e08fe93a850e87b74d6a1
SQL
grvgoel81/leetcode
/friend-requests-ii-who-has-the-most-friends.sql
UTF-8
237
3.28125
3
[]
no_license
SELECT id, COUNT(*) AS num FROM ( SELECT requester_id AS id, accepter_id FROM request_accepted UNION ALL SELECT accepter_id AS id, requester_id FROM request_accepted ) t GROUP BY id ORDER BY num desc LIMIT 1
true
1b0db8c71aff27c6bf8bd6483128e42c19c5aa3a
SQL
karinabarinova/uchat
/server/data/sql/auth.sql
UTF-8
505
3.5625
4
[]
no_license
-- Auth DROP TABLE IF EXISTS auth; CREATE TABLE IF NOT EXISTS auth ( id INTEGER PRIMARY KEY, user_id INTEGER NOT NULL, token TEXT, creation_date INTEGER DEFAULT NULL, FOREIGN KEY (user_id) REFERENCES user (user_id) ); CREATE TRIGGER AutoGenerateDATETIME_auth AFTER INSE...
true
d2cb2339f4d6ce03bb182da37afe413044cf990c
SQL
fabricechatel/bam-app
/src/config/database/createbase.sql
UTF-8
10,620
3.296875
3
[]
no_license
drop schema bamdb; create schema if not exists bamdb; use bamdb; drop table if exists ADRESSE; drop table if exists ARTICLE; drop table if exists CARACTERISTIQUE; drop table if exists CATEGORIE; drop table if exists CLIENT; drop table if exists COMMANDE; drop table if exists COMMENTAIRE; drop table if exists ...
true
16699f32cc4678bf93643aad766ddee3d493421a
SQL
Alphaquest2005/MRManager
/WaterNut - Enterprise/Update Warehouse Errors.sql
UTF-8
9,467
2.765625
3
[]
no_license
update xcuda_Item set WarehouseError = null where WarehouseError = 'Cant find in Warehouse HSCode' update xcuda_Item set WarehouseError = 'impossible to find the given line in warehouse', DoNotEX = 1 where Item_id in (SELECT xcuda_Item.Item_Id FROM xcuda_Item INNER JOIN xcuda_HScode ON xcuda_Item.Item...
true
4acdd10215ad3f9c249953243e4ef884d2670473
SQL
Meosit/MentalAid
/additional/sql/2 user_data.sql
UTF-8
1,317
2.578125
3
[]
no_license
USE `mentalaid`; -- admin@12345 (administrator) INSERT INTO `user` (`id`, `email`, `username`, `pass_hash`, `role`) VALUES (1, 'mksn13@gmail.com', 'admin', '$2a$12$6BskHBTZfhDGOcYLZNOCZui5a7apSqHBzL9zidWANGax9ShKtM1nu', 1); -- Neskwi@54321 (user) INSERT INTO `user` (`email`, `username`, `pass_hash`) VALUES ('some1@em...
true
3735da61f5f2be03e42a7ffaedb49f2c864157cf
SQL
imonweb/Php_Shopping_Cart
/php_shopping_cart.sql
UTF-8
1,702
3.1875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.7.7 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: Apr 19, 2018 at 11:54 PM -- Server version: 5.7.20 -- PHP Version: 7.0.27 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACT...
true
b40a69d032f0dc60bce49dc413a33d96e2ef77f4
SQL
royiwanhamonanganpasaribu/Try_CI_3
/application/assets/database/spk-jabatan.sql
UTF-8
2,599
3.046875
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.6.6 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: Sep 05, 2017 at 04:05 AM -- Server version: 5.7.17-log -- PHP Version: 5.6.30 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIEN...
true
5bdc9f8ff83e081e1d3c09a5954f442dd0760e9e
SQL
ogz00/Micro-Wallet-Leo-Oguz
/microwallet/src/main/resources/schema.sql
UTF-8
2,420
3.65625
4
[]
no_license
create table if not exists db_wallet.app_role ( id bigserial constraint app_role_pkey primary key, created_at timestamp, updated_at timestamp, updated_by varchar(255), version bigint, description varchar(255) not null, role_name varchar(255) not null ); create table i...
true
e04b4b20a14dafda60883dbd90d26d85e2440c17
SQL
jarryll/mvc-tweedr
/tables.sql
UTF-8
216
2.875
3
[]
no_license
CREATE TABLE IF NOT EXISTS users (id SERIAL PRIMARY KEY, username TEXT NOT NULL, password TEXT NOT NULL); CREATE TABLE IF NOT EXISTS tweeds (id SERIAL PRIMARY KEY, tweed TEXT, user_id INTEGER REFERENCES users (id));
true
6d9427ada20e06878348670422ed8d4b1403263b
SQL
phuongit0301/learnlaravel5
/learnlaravel5.sql
UTF-8
7,696
2.90625
3
[ "MIT" ]
permissive
-- MySQL dump 10.13 Distrib 5.5.46, for debian-linux-gnu (x86_64) -- -- Host: localhost Database: learnlaravel5 -- ------------------------------------------------------ -- Server version 5.5.46-0ubuntu0.14.04.2 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESUL...
true
a132ea5f90e69142bc65f9ad8c30b6af1ef9700a
SQL
syrus-ru/amficom
/AMFICOM/v2/database/schema/configuration/type/equipmenttype.sql
UTF-8
543
3.328125
3
[]
no_license
CREATE TABLE EquipmentType ( id NUMBER(20, 0), created DATE NOT NULL, modified DATE NOT NULL, creator_id NUMBER(20, 0) NOT NULL, modifier_id NUMBER(20, 0) NOT NULL, -- codename VARCHAR2(32) NOT NULL, description VARCHAR2(256), -- CONSTRAINT eqptype_pk PRIMARY KEY (id) ENABLE, CONSTRAINT eqptype_creator_fk FORE...
true
e7109c85e12f9442233212ff6e2cf9b1c38f1e63
SQL
yanleping/nlp
/src/main/resources/doc/sql/init.sql
UTF-8
1,242
3.484375
3
[]
no_license
drop table if exists article; drop table if exists similarity; /*==============================================================*/ /* Table: article */ /*==============================================================*/ create table article ( id bigint ...
true
729df4d6b4f6bf51faacc1592e2588c3791c7400
SQL
consrg/web2project-documentation
/locales/en/documentation.inc
UTF-8
3,666
3.25
3
[]
no_license
## ## DO NOT MODIFY THIS FILE BY HAND! ## 'Show project documentation as PDF', '(None)', 'A list of valid special pages can be found at <a href=\"%s\" title=\"%s\">%s</a>.', 'Alternative text', 'Are you sure you want to delete this page ?', 'Big', 'Bold', 'Bulleted list', 'Cancel', 'Categories', 'Category', 'Category t...
true
e3b2f31d41507627f3f6fbd56d3e5d05797d1718
SQL
finlie/SQL
/queries.sql
UTF-8
1,537
4.25
4
[]
no_license
-- Show all albums select * from album; -- Show all albums made between 1975 and 1990. select * from album where release_year>=1975 and release_year <= 1990; -- Show all albums whose names start with Super D SELECT * FROM album WHERE title LIKE "Super D%"; -- Show all albums that have no release year. sele...
true
a81b28fce4e11ae0a10588631d13813ba59d80f1
SQL
ZiyangJiao/JavaDev
/calender/cal/api/sql.sql
UTF-8
351
2.8125
3
[]
no_license
<?php $sql_event = " SELECT EventID, EventTitle, EventContent, EventStartTime, EventEndTime, Tag, GroupUsernames FROM Events WHERE UserID = ? AND ((EventEndTime IS NOT NULL AND EventEndTime > ? AND EventEndTime < ?) OR (EventStartTime > ? AN...
true
ebcf590a6804d6c00daec8410e58b7d9cbff1004
SQL
ksatola/data-science-postgrad
/session15/2_spatial_lab_sql_developer/task_6.sql
UTF-8
211
2.859375
3
[]
no_license
create table ksatola_t6 as SELECT c.city, c.state_abrv, c.location FROM us_interstates i, us_cities c WHERE i.interstate = 'I4' AND sdo_nn(c.location, i.geom, 'sdo_num_res=5') = 'TRUE'; select * from ksatola_t6
true
f65a28a32acdef9abe9c87d7e85245c81c94c0a6
SQL
Ernestas-wq/13_ProjectCMS
/schema/minicmsdb_pages.sql
UTF-8
2,906
3.0625
3
[]
no_license
CREATE DATABASE IF NOT EXISTS `minicmsdb` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci */ /*!80016 DEFAULT ENCRYPTION='N' */; USE `minicmsdb`; -- MySQL dump 10.13 Distrib 8.0.22, for Win64 (x86_64) -- -- Host: 127.0.0.1 Database: minicmsdb -- ---------------------------------------------------...
true
ad256a1b6f6e975f2f906639499675e5cde15ece
SQL
RekGRpth/pg_micromanage
/sql/sorting.sql
UTF-8
7,305
3.578125
4
[]
no_license
CREATE TABLE a (a int); INSERT INTO A VALUES (5); INSERT INTO A VALUES (11); INSERT INTO A VALUES (7); SELECT * FROM run_select(''); -- todo, figure out why this first one fails -- sort nodes aren't allowed to project, and a var doesn't make sense there SELECT encode_protobuf($$ plan: { sort: { subplan: { ...
true
efffe5fdd8ef2a1c81732c9a6dd4cea338081d0b
SQL
paulina-11/mysql
/03-modificar-tablas/modificar-tablas.sql
UTF-8
260
2.515625
3
[]
no_license
-- renombrar tablas ALTER TABLE usuarios RENAME TO users; -- cambiar nombre de columna ALTER TABLE usuarios CHANGE direccion dir VARCHAR(50); -- agregar columnas ALTER TABLE usuarios ADD edad INT NOT NULL; -- BORRAR COLUMNAS ALTER TABLE usuarios DROP edad;
true
3d8a59b2e7440967409b775b3d27c62cd7228b6c
SQL
CrafterKolyan/mmp-practicum-sql-fall-2019
/task1/Goldobina_1_2.sql
UTF-8
163
2.765625
3
[]
no_license
SELECT monthly_income_amt FROM srcdt.cd_customers WHERE year(valid_from_dttm) <= 2014 AND year(valid_to_dttm) >= 2014 ORDER BY monthly_income_amt DESC LIMIT 10;
true
262d4ec106d3538585db0da6fa62c8eee10d1283
SQL
shawnlu96/Top_Trumps
/_sqlscripts/schema_create.sql
UTF-8
834
3.875
4
[]
no_license
--create schema toptrumps; --creates the schema that shall be used if default public schema is taken create table games ( game_id int primary key, winner_player int not null check (0<winner_player and winner_player<6), --we can have maximum 5 players draws int not null, --assume at least 0 draws rounds int not...
true
86cc0865d021bd8c8fbd1c9848e75ce0493ad70d
SQL
HirokiShun/ProgramacionWeb
/Procedures.sql
UTF-8
9,322
3.265625
3
[]
no_license
USE PW; DELIMITER $$ CREATE PROCEDURE CrearUsuario_SP( IN NombreP VARCHAR(50), IN ApellidosP VARCHAR(50), IN FNaP DATE, IN CorreoEP VARCHAR(30), IN ImgPerfilP BLOB, IN NomUP VARCHAR(30), IN PassP VARCHAR(30), IN FRegP DATE ) BEGIN IF ImgPerfilP IS NULL THEN INSERT INTO usuarios ...
true
c567fe831930a7c2a6ad93c1c5cebf6bcc1faef9
SQL
n10o/memolize
/dbflute_mdb/playsql/replace-schema-10-basic.sql
UTF-8
546
3.953125
4
[ "Apache-2.0" ]
permissive
SET SESSION FOREIGN_KEY_CHECKS=0; /* Create Tables */ CREATE TABLE INFO ( INFO_ID bigint NOT NULL AUTO_INCREMENT, MEMBER_ID bigint NOT NULL, INFO_NAME varchar(256) NOT NULL, PRIMARY KEY (INFO_ID) ); CREATE TABLE MEMBER ( MEMBER_ID bigint NOT NULL AUTO_INCREMENT, NAME varchar(64) NOT NULL, PA...
true
50226d5034faf174ed6162ad14a0694714b5fdf3
SQL
dewasugiarta/Digital-Sign
/permohonan_ssl.sql
UTF-8
3,903
3.015625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.6.6deb5 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3306 -- Generation Time: May 15, 2018 at 03:33 PM -- Server version: 5.7.22-0ubuntu18.04.1 -- PHP Version: 7.2.5-0ubuntu0.18.04.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARAC...
true
f90e7a58201e67cb1bdee98df7944abd8c46e012
SQL
dwatson78/database
/updatescripts/from_380alpha/createMrgundo.sql
UTF-8
2,128
3.546875
4
[]
no_license
CREATE TABLE mrgundo ( mrgundo_base_schema TEXT, mrgundo_base_table TEXT, mrgundo_base_id INTEGER, mrgundo_schema TEXT, mrgundo_table TEXT, mrgundo_pkey_col TEXT, mrgundo_pkey_id INTEGER, mrgundo_col TEXT, mrgundo_value TEXT, mrgundo_type TEXT, UNIQUE (...
true
1217173bda234e67ece1618f370425ed10ee5860
SQL
p9madhavi/Madhavi
/SQL/SubQueries.sql
UTF-8
2,060
4.28125
4
[]
no_license
SELECT last_name, hire_date FROM employees WHERE department_id = ( SELECT DEPARTMENT_ID FROM DEPARTMENTS WHERE DEPARTMENT_NAME = 'Executive' ); SELECT last_name, hire_date FROM employees WHERE department_id in ( SELECT DEPARTMENT_ID FROM DEPARTMENTS WHERE DEPARTMENT_NAME LIKE '%ing' ); -...
true
5ddd0d6b3135620fb5d793002c92742a6ffdf4a2
SQL
NordMan10/urfuSite
/student.sql
UTF-8
6,277
3.4375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.6.5.2 -- https://www.phpmyadmin.net/ -- -- Хост: 127.0.0.1:3306 -- Время создания: Янв 14 2019 г., 06:54 -- Версия сервера: 5.7.16 -- Версия PHP: 5.6.29 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT ...
true
ffd58df94f58a5ab6b19a82a053e297fa8de9148
SQL
karthik1211/oru-source-service
/database/release/1.0/ORU_SOURCE_SVC/ddl/create/trigger/006_platform_user_header_updt.sql
UTF-8
182
2.65625
3
[]
no_license
DELIMITER // CREATE TRIGGER platform_user_header_updt BEFORE UPDATE ON platform_user_header FOR EACH ROW BEGIN SET NEW.update_timestamp = CURRENT_TIMESTAMP(); END // DELIMITER ;
true
6bc3250fa76ef7c6480636ba7cf722193e555139
SQL
nelsonmestevao/slides
/intro-to-programming/databases/migrations.sql
UTF-8
1,939
3.953125
4
[]
no_license
CREATE TABLE regions ( region_id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, region_name text NOT NULL ); CREATE TABLE countries ( country_id text NOT NULL, country_name text NOT NULL, region_id INTEGER NOT NULL, PRIMARY KEY (country_id ASC), FOREIGN KEY (region_id) REFERENCES regions (region_id) ON DELETE CASC...
true
2da9a5773cfd1be47a39b0da23b21ed9d248d50c
SQL
biblelamp/SQLExercises
/LightComp/elza_access_point_union.sql
UTF-8
773
3
3
[]
no_license
SELECT ap.access_point_id, ap.uuid FROM ap_state s JOIN ap_access_point ap ON s.access_point_id = ap.access_point_id WHERE s.create_change_id > 3 OR s.delete_change_id > 3 UNION SELECT ap.access_point_id, ap.uuid FROM ap_part p JOIN ap_access_point ap ON p.access_point_id = ap.access_point_id WHERE p.create_c...
true
e611725d0ed671957b16457b3e5b3efacf233966
SQL
spencerking/CSE40746-Final-Project
/schema/crt_transaction.sql
UTF-8
393
3.171875
3
[]
no_license
CREATE TABLE transaction ( transaction_id NUMBER(16) PRIMARY KEY, buyer_id NUMBER(16) NOT NULL, seller_id NUMBER(16) NOT NULL, item_id NUMBER(16) NOT NULL, transaction_date DATE NOT NULL, status NUMBER(1) NOT NULL, FOREIGN KEY (buyer_id) REFERENCES domer(user_id), FOREIGN KEY (seller_id) REFERENCES domer(user_i...
true
be95d27d9030670a18c3fec2736f3e8f39ee50a7
SQL
silence-do-good/stress-test-Postgres-and-MySQL
/dump/low/day23/select1026.sql
UTF-8
178
2.65625
3
[]
no_license
SELECT timeStamp, temperature FROM ThermometerOBSERVATION o WHERE timestamp>'2017-11-22T10:26:00Z' AND timestamp<'2017-11-23T10:26:00Z' AND temperature>=30 AND temperature<=33
true
0ed8639f67d86c22348e9643114658b0ea7fbb6e
SQL
moreaupierrick/ProjetEntrepot
/workbench/dumpV2.sql
UTF-8
5,567
2.8125
3
[]
no_license
CREATE DATABASE IF NOT EXISTS `datawarehouse_accidents` /*!40100 DEFAULT CHARACTER SET utf8 */; USE `datawarehouse_accidents`; -- MySQL dump 10.13 Distrib 5.6.23, for Win64 (x86_64) -- -- Host: localhost Database: datawarehouse_accidents -- ------------------------------------------------------ -- Server ver...
true
e0b0bbd6a02242ccee055ce5cf0bb72cbf4d0da3
SQL
abhiwalia15/CSE-Lab-Manual
/V Semester/Database-Management-System/Problem 1/query4.sql
UTF-8
289
3.859375
4
[ "MIT" ]
permissive
-- Find the names of faculty members who teach in every room in which some class is taught. SELECT DISTINCT F.fname FROM Faculty F WHERE NOT EXISTS ( SELECT * FROM Class C WHERE (C.room) NOT IN ( SELECT C1.room FROM Class C1 WHERE C1.fid = F.fid ) ) ;
true
d5e496603439e02d65ba041d5bd68e1f96ab58e8
SQL
chongtianfeiyu/sql
/vdc_account.sql
UTF-8
592
2.984375
3
[]
no_license
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; CREATE DATABASE IF NOT EXISTS `vdc_account` DEFAULT CHARSET=utf8; CREATE TABLE `vdc_account`.`normal_account` ( `accountid` int(10) unsigned NOT NULL DEFAULT 0, `appointtime` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '账号被accountserver预定时间,此时间内不能分配给其它accountserver使用', PRIM...
true
d41f5b434363e3b4c4941659f1496d6dc0f59ef2
SQL
hungthanh95/spring_reddit_clone
/Databases/2_updated_database.sql
UTF-8
631
3.484375
3
[]
no_license
alter table user modify password varchar(255) not null; alter table post modify post_name varchar(255) not null; alter table subreddit modify name varchar(255) not null; alter table subreddit modify description varchar(255) not null; alter table comment modify text varchar(255) not null; alter table post add constraint...
true
38d35579798f6fe07b3a1829b89f923e0e3ae78e
SQL
cseppan/EMFarchive_EMF
/deploy/db/cost/functions/run_sum.sql
UTF-8
1,324
3.140625
3
[]
no_license
CREATE OR REPLACE FUNCTION public.run_sum(numeric, text, text) RETURNS numeric AS $BODY$ if {![info exists GD(sum.$2.$3)]} { set GD(sum.$2.$3) 0.00 } if {[argisnull 1]} { return $GD(sum.$2.$3) } else { return [set GD(sum.$2.$3) [expr $GD(sum.$2.$3) + $1]] } $BODY$ LANGUAGE 'pltcl...
true
b9aa84848e03e79ee1afca31dbc786751a9a00ba
SQL
mazdik/mazdik.github.io
/blog/notes/SQL/sum_join.sql
UTF-8
1,679
3.734375
4
[]
no_license
-- 1 способ select summa1-summa2 as summa from (select nvl(sum(s.pay_sum),0) summa1, max(l.in_document) docrn1 from bankdocs b, doclinks l, bankdocspec s, dictoper d where b.rn = l.out_document and l.in_document = 318090915 and b.rn = s.prn and exists (select null from doclinks where in_...
true
ed0f97a4d8058375cf4ee03612b1b62c0f2ce0ea
SQL
nikhilmurthy/CPTS-421-423
/Scripts/sp-v9/spSelAllFaculty.sql
UTF-8
252
3.15625
3
[]
no_license
DROP PROCEDURE IF EXISTS spSelAllFaculty; DELIMITER $$ CREATE DEFINER=`root`@`localhost` PROCEDURE `spSelAllFaculty`() BEGIN select email, first_name, last_name, phone, user_id from user where is_faculty = 1 order by first_name asc; END$$ DELIMITER ;
true
f3778e0426cc0518838894a4b72542fdfea697cc
SQL
s4zuk3/hadesspa
/sql/hades_v3.sql
UTF-8
3,579
3.71875
4
[]
no_license
/*==============================================================*/ /* table: cliente */ /*==============================================================*/ create table cliente ( id_cliente int not null, nombre_cliente varchar(30), descripcion ...
true
dbcbd46555b9e79799771898d41009a106f8ce3c
SQL
ucarlos/CSC-4370-PHP-e-commerce
/db/project4.sql
UTF-8
1,902
3.59375
4
[ "MIT" ]
permissive
/* ----------------------------------------------------------------------------- * Created by Ulysses Carlos for CSC 4370 Project 4 -- 12/11/2019 * * Note * Please make sure that you import? this file using whatever system you * have. As I have XAMPP, it's as simple as opening /localhost/phpmyadmin * ...
true
2d08ba55d03d50bc797e1882141fd32a27fc36a3
SQL
joses166/URI_ONLINE_JUDGE
/POSTGRESQL/uri_2738.sql
UTF-8
200
3.34375
3
[]
no_license
SELECT c.name, ( ( ( s.math * 2 ) + ( s.specific * 3 ) + ( s.project_plan * 5 ) ) / 10 )::NUMERIC( 7, 2 ) AS "avg" FROM candidate c INNER JOIN score s ON(c.id = s.candidate_id) ORDER BY 2 DESC;
true
1c1895300249edc442b7bb98a5e5b5e82fce03bc
SQL
fumlefinger/afleveringdokumentation
/blackjack.sql
UTF-8
1,594
3.125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.7.4 -- https://www.phpmyadmin.net/ -- trest -- Vært: 127.0.0.1 -- Genereringstid: 09. 11 2017 kl. 10:55:06 -- Serverversion: 10.1.26-MariaDB -- PHP-version: 7.1.9 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET ...
true
b0ddcec5d54ebcc659d831da6c35b6e3e1067d56
SQL
vitoria2002campos/AtividadesMysql
/banco_de_dados_relacional_Mysql/atividade01- 18_08_21.sql
UTF-8
801
3.109375
3
[]
no_license
-- create database db_rhempresa; use db_rhempresa; create table funcionaries( id bigint auto_increment, nome varchar (255) not null, cpf bigint not null, salario float, cep varchar (255), cargo varchar (255), primary key (id) ); insert into funcionaries( nome,cpf,salario,cep,cargo)values ("Roberta",976290490-72,...
true
eed4d04d48ea02ed5a7f2137742fa5b0d4dcc09c
SQL
acumos/common-dataservice
/cmn-data-svc/cmn-data-svc-server/db-scripts/cds-mysql-upgrade-1.16-to-1.17.sql
UTF-8
2,006
3.46875
3
[ "Apache-2.0", "CC-BY-4.0" ]
permissive
-- ===============LICENSE_START======================================================= -- Acumos Apache-2.0 -- =================================================================================== -- Copyright (C) 2017-2018 AT&T Intellectual Property & Tech Mahindra. All rights reserved. -- ==============================...
true
7f499bbe32f3ecb08f5ad6a2f00a3b64006c2861
SQL
aulbytj/SQL-ZOO-
/1.SELECT_basics.sql
UTF-8
1,416
3.828125
4
[]
no_license
-- Introducing the world table of countries -- world -- name continent area population gdp -- Afghanistan Asia 652230 25500100 20343000000 -- Albania Europe 28748 2831741 12960000000 -- Algeria Africa 2381741 37100000 188681000000 -- Andorra Europ...
true
c4809e328c584fc929b66c8f01e376598d0460f6
SQL
darkirui/IQCareMigration-1
/Four2One/Four2One/Scripts/DBUpdate/PharmacyModule/GetDrugsAvailableInDispensingStore.sql
UTF-8
893
3.859375
4
[ "Apache-2.0" ]
permissive
CREATE PROC sp_PharmacyModule_GetDrugsAvailableInDispensingStore AS BEGIN SET NOCOUNT ON; WITH AvailableDrugs AS( SELECT d.Id , d.DrugName , e.DoseForm , SUM(a.Quantity) - SUM(f.Quantity) Quantity FROM DrugIssued a INNER JOIN DrugDestination b ON a.DrugDestinationId = b.Id INNER JOIN DrugBatch c...
true
f16116230cb81a2c0bc9a523b08fbc314b92da73
SQL
victor7937/JWDFinal
/src/main/resources/dump/dump_footwear.sql
UTF-8
8,272
2.84375
3
[]
no_license
-- MySQL dump 10.13 Distrib 8.0.23, for Linux (x86_64) -- -- Host: 127.0.0.1 Database: footware_db -- ------------------------------------------------------ -- Server version 8.0.23 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;...
true
d975ebd59cbf18bf896ab9acd7e56e830cef1f32
SQL
ChaselRain/mybatis
/test.sql
UTF-8
1,894
3.265625
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : localMySQL Source Server Version : 50634 Source Host : localhost:3306 Source Database : test Target Server Type : MYSQL Target Server Version : 50634 File Encoding : 65001 Date: 2018-03-15 13:30:58 */ SET FOREIGN_KEY_CH...
true
ba3cdfd52c3721dd2d09d633d35d34fecce52dd8
SQL
krishna-dahifale/demo2
/my updated project/ofs_trainee.sql
UTF-8
2,365
3.015625
3
[]
no_license
CREATE DATABASE IF NOT EXISTS `ofs` /*!40100 DEFAULT CHARACTER SET utf8 */; USE `ofs`; -- MySQL dump 10.13 Distrib 5.7.17, for Win64 (x86_64) -- -- Host: localhost Database: ofs -- ------------------------------------------------------ -- Server version 5.7.18-log /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTE...
true
c6f4f5e6a101b4f155e8d0ad2a6bbe8ed3a66de9
SQL
zekiriabd/Java
/MecroECommerce/Customers/src/main/resources/data.sql
UTF-8
362
2.65625
3
[]
no_license
DROP TABLE IF EXISTS customer; CREATE TABLE customer ( id INT AUTO_INCREMENT PRIMARY KEY, firstName VARCHAR(250) NOT NULL, lastName VARCHAR(250) NOT NULL, email VARCHAR(250) NOT NULL ); INSERT INTO customer (firstName,lastName,email) VALUES('customer1','customer11','customer1@gmail.com'),('customer2','custom...
true
14124771f480425eb4069d99d27837110cfc4893
SQL
adisteinfeld/Moneyz
/app/src/main/assets/dataB.db
UTF-8
19,829
2.6875
3
[]
no_license
CREATE TABLE Countries( country VARCHAR(40) NOT NULL PRIMARY KEY ,currency VARCHAR(6) NOT NULL ,rate BIGINT NOT NULL ); INSERT INTO Countries(country,currency,rate) VALUES ('Afghanistan','AFN',0); INSERT INTO Countries(country,currency,rate) VALUES ('Akrotiri and Dhekelia (UK)','EUR',0); INSERT INTO Countr...
true
4a6ddc99fc8145e4d6f39ff6e6be537340043614
SQL
inigo10rodri/MySQL
/Evaluacion 3/Oracle/TriggersOracle/trigger4.sql
UTF-8
240
2.78125
3
[]
no_license
create or replace trigger borrar_detalle before delete on detalle for each row begin update venta_productos set unidades_vendidas = unidades_vendidas - :old.cantidad where id_prod = :old.id_producto; end;
true
03292a58b719948923326316fee4f204961d3926
SQL
zt3f/InPUTj-SQL
/src/DatabaseTransactionExamples/sql/xpath/query1.sql
UTF-8
716
3.6875
4
[ "MIT" ]
permissive
/* Querying the database about which experiments have a problem * feature design with a structural parameter that has the ID * "WSN" and a numeric subparameter which in turn has the ID * "UpperBoundTDMASize" and a value greater than 80 */ SELECT experiment, design, upper_bound_tdma_size[1] FROM (SELECT experiment...
true
e081cc1ad7039e8d6d3584fd877397974b436b63
SQL
DeepSingh93/Grockart
/grockart/grockart/assets/database/CSCI5308_10_DEVINT_tbl_groupOrder.sql
UTF-8
2,286
2.984375
3
[ "MIT" ]
permissive
-- MySQL dump 10.13 Distrib 5.7.17, for Win64 (x86_64) -- -- Host: db-5308.cs.dal.ca Database: CSCI5308_10_DEVINT -- ------------------------------------------------------ -- Server version 5.5.5-10.0.35-MariaDB /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESUL...
true
d09618b53a168e02b8e1731e7b50391c34efd5c6
SQL
HuangChenning/oracle_dba_scripts
/oracle脚本/GCS_GES.sql
UTF-8
230
3.1875
3
[]
no_license
select s.statistic_name stat, owner, object_name obj, sum(value) val from v$segment_statistics s where s.statistic_name like 'global%' and s.value > 0 group by s.statistic_name, owner, object_name order by val desc;
true
a5be6c1079670781c90d95a8f26cedc91324c12e
SQL
blacker50/PM2
/WebContent/mysql/update/pm2.sql
UTF-8
7,337
3.140625
3
[ "MIT" ]
permissive
/* Navicat MySQL Data Transfer Source Server : 127.0.0.1_3306 Source Server Version : 50087 Source Host : 127.0.0.1:3306 Source Database : pm Target Server Type : MYSQL Target Server Version : 50087 File Encoding : 65001 Date: 2017-03-22 17:00:46 */ SET FOREIGN_KEY_CHECKS=0; -- -...
true
ca712a688b01b93ef98e419b6cf5356dcc7e7f8d
SQL
Shivani48/studybuddy
/studdybuddy.sql
UTF-8
3,027
3.359375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Apr 02, 2019 at 06:44 AM -- Server version: 10.1.38-MariaDB -- PHP Version: 7.3.3 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
true
05e7be50d58ab9251b18c2f182ee02eea5909446
SQL
serakoc/AFPA
/BDD/crée la base de donnée/exercice2-manipulerbdd.sql
UTF-8
5,519
3.359375
3
[]
no_license
DROP DATABASE if EXISTS ex02; CREATE DATABASE ex02; USE ex02; CREATE TABLE Client ( num_client INT AUTO_INCREMENT NOT NULL, adresse_client VARCHAR(50) NOT NULL, nom_client VARCHAR(30) NOT NULL, prenom_client VARCHAR(30) NOT NULL, PRIMARY KEY (num_client) ); CREATE TABLE Station ( num_station INT NOT NULL AUTO_INCREM...
true
f66a4fe4eb0286da16903ef5aaab9e1fd40923c5
SQL
geoHeil/tuWienBusinessIntelligence
/ue2/task2/etl/customer.sql
UTF-8
735
3.015625
3
[]
no_license
INSERT INTO BI_OLAP_4.DM_Customer SELECT customerid, concat(FirstName, ' ', (CASE WHEN MiddleName IS NOT NULL AND MiddleName <> '' THEN concat(MiddleName, (CASE WHEN MiddleName LIKE '%.' THEN '' ELSE '.' END), ' ') ELSE '' END), LastName...
true
97a73100e868a0f9360b44d0166a95e742454f43
SQL
cavin12400/purchase
/DATABASE/views/purchase_searcher.sql
UTF-8
1,836
3
3
[ "LicenseRef-scancode-unknown-license-reference", "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.7.0 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Mar 04, 2018 at 12:38 PM -- Server version: 10.1.25-MariaDB -- PHP Version: 7.1.7 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
true
e7cb5f22910c6694c77e30750beed0e5ae4d28b4
SQL
franbardin/BDD
/MySQL/Clase7.sql
UTF-8
529
3.40625
3
[]
no_license
-- 3 SELECT c.customer_id, c.first_name, c.last_name FROM rental r1, customer c WHERE NOT EXISTS (SELECT * FROM rental r2 WHERE r1.customer_id = r2.customer_id AND r1.rental_id <> r2.rental_id) AND r1.customer_id = c.customer_id ORDER BY 1; -- 4 SELECT c.customer_id, c.first_name, c.last_name FROM...
true
58cbfe5a0a4b104297c5668347cb16fc934f3b99
SQL
Sunil2011/growsari1
/data/db/re-dash-queries/49.Store Sub Categories Sale.sql
UTF-8
902
4.75
5
[]
no_license
SELECT s.name AS store_name, a.username AS username, s.customer_name, c.name, no_of_orders, SUM(oi.net_amount) AS sales FROM `store` AS `s` INNER JOIN `account` AS `a` ON `a`.`id` = `s`.`account_id` LEFT JOIN (SELECT s1.id, count(oii.id) AS no_of_orders FROM `store` s1 ...
true
5aaa8ed3b7131f08105692ce9acb2da4939fb587
SQL
scoricov/childprotect.com
/share/schema.main.sql
UTF-8
2,259
3.578125
4
[ "MIT" ]
permissive
# **************************************** # # # # childprotect.com main database schema # # # # **************************************** # DROP TABLE IF EXISTS `token_deleted`; DROP TABLE IF EXISTS `token`; DROP TABLE IF EXISTS `user...
true
8cba74a6188c19832c16301e16f0a67d8644c080
SQL
radtek/abs3
/sql/mmfo/barsaq/Table/ibank_acc.sql
WINDOWS-1251
3,698
3.453125
3
[]
no_license
PROMPT ===================================================================================== PROMPT *** Run *** ========== Scripts /Sql/BARSAQ/Table/IBANK_ACC.sql =========*** Run *** = PROMPT ===================================================================================== PROMPT *** Create table IBA...
true
5b66b4ebdb7febc6428dd2d15d13c491e69774ed
SQL
RJ-SMTR/od-matrix
/sql/vw_onibus_utilisation.sql
UTF-8
4,718
4.25
4
[ "MIT" ]
permissive
-- this table likely wont work with multiple days WITH H3Table AS ( -- H3 table SELECT tile_id, resolution, parent_id, ST_GEOGFROMTEXT(geometry) AS geometry FROM `rj-smtr.br_rj_riodejaneiro_geo.h3_res8` ), ticketing_onibus AS ( SELECT * FROM pytest.vw_...
true
5ec0a79fdc7f42d1c91019dec54420d164a2f9b8
SQL
EwdAger/hnust_score
/hnust_score.sql
UTF-8
1,710
3.15625
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : localhost_3306 Source Server Version : 50721 Source Host : localhost:3306 Source Database : hnust_score Target Server Type : MYSQL Target Server Version : 50721 File Encoding : 65001 Date: 2019-04-20 12:56:15 */ SET FOR...
true
b5716066914752810679b71507d3b6d64961b2f5
SQL
mlg-/mass-health-data
/questions.sql
UTF-8
1,067
4.0625
4
[]
no_license
-- What 3 towns have the highest population of citizens that are 65 years and older? SELECT name, seniors_pop FROM town_health_records WHERE name != 'Massachusetts Total' ORDER BY seniors_pop DESC LIMIT 3; -- What 3 towns have the highest population of citizens that are 19 years and younger? SELECT name, children_pop ...
true
8c2027975d8203c76a351cbaf3ac0eb75d981186
SQL
fast01/chaosframework
/ChaosMDSLite/src/main/java/it/infn/chaos/mds/da/MysqlDatabaseSchemaUpdate_2.sql
UTF-8
633
2.765625
3
[ "Apache-2.0" ]
permissive
CREATE TABLE `chaosms`.`unit_server_cu_instance` ( `unit_server_alias` VARCHAR(64) NOT NULL, `cu_id` VARCHAR(64) NOT NULL, `cu_type` VARCHAR(64) NOT NULL, `cu_param` VARCHAR(256) NULL, `driver_init` MEDIUMTEXT NULL, `state` VARCHAR(64) NOT NULL, `auto_load` VARCHAR(1) NULL DEFAULT 0, PRIMARY KEY (`unit_...
true
0152825afce770e3667dac5c5b8e2b8f14d03c9a
SQL
https-github-com-peadrakw-p1/ispsafe
/ispsafe/ispsafe.sql
UTF-8
19,297
3.015625
3
[]
no_license
-- MySQL dump 10.11 -- -- Host: localhost Database: ispsafe -- ------------------------------------------------------ -- Server version 5.0.75-0ubuntu10.2 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION...
true
506008797a0e2a59326a3585f1139cad67a91e68
SQL
hulkike/explain-plan
/database/explain-plan-04.sql
UTF-8
2,409
3.8125
4
[]
no_license
-- Relación muchos a mucho con indices -- explain plan 4 query 1 -- enlace: https://explain.depesz.com/s/M33f -- costo: 20.55 explain (analyse true, costs true, timing true, buffers true, verbose true) select p.nombre, df.cantidad, df.precio_venta, (df.cantidad * df.precio_venta) as total from public.ex4_factura f ...
true
a14c373224325d4bc1d6e338c53c8643dacd106b
SQL
sachinsamson47/Portfolio
/Covid/covid_on_smokers.sql
UTF-8
9,740
4.15625
4
[]
no_license
/* Covid 19 Data Exploration - Looking at the effect of covid on smokers Skills used: Joins, CTE's, Temp Tables, Windows Functions, Aggregate Functions, Creating Views, Converting Data Types */ SELECT * FROM data WHERE continent IS NOT NULL ORDER BY 3,4 --Looking at total deaths by country SELECT Max(Cast(total_de...
true
7ecb1aba1bda09d161eed12c5f83a0cf82f372c9
SQL
CDFriend/vexdb_miner
/schema/matches.sql
UTF-8
1,141
3.640625
4
[]
no_license
-- Matches -- ~~~~~~~~~ -- -- Data on all matches in the current VRC season. CREATE TABLE data_matches ( event_sku STRING NOT NULL, -- SKU for the event the match happened during red1 STRING NOT NULL, -- First red player in the match red2 STRING NOT NULL, -- Second red ...
true
9deb0fe9a0c23d3dd73c1ddf40ef15e802cdcb96
SQL
kawakita666/BroMoney
/gg/bf2game_mafia.sql
UTF-8
33,979
3.125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 2.6.4-pl2 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Dec 10, 2005 at 06:03 PM -- Server version: 4.0.25 -- PHP Version: 4.3.11 -- -- Database: `bf2game_mafia` -- -- -------------------------------------------------------- -- -- Table structure for tabl...
true
e295ab157b09f86c4a452698d0bfaf4883f32ace
SQL
ganeshbabuNN/Databases
/RDMS/Oracle Database/Listing 21_12.sql
UTF-8
221
2.59375
3
[]
no_license
create or replace Function calcourseamt (code number) return number as netincomeamt number; begin select sum(netincome) into netincomeamt from batch where coursecode = code; return (netincomeamt); end calcourseamt; /
true
180be54482e042fcddb062c18009739e7ed95fff
SQL
Pulsemedic/Application_Engineering_Design
/DBMS Final Exam - Hospital Management System/SQL Queries/SET 4 - FUNCTIONS.sql
UTF-8
755
3.796875
4
[]
no_license
/*Fuctions*/ select count(*) as Total_Count from patient where admitDate >= '2010-01-01'; select avg(amount) as Average from bill where patientID = 18; select patientID as ID, amount as Amount from bill where abs(amount-9000) <= 1000; select max(patientName) from patient; select strcmp(p.patientName, d.doctorN...
true
6e5df5b509522bf9af2261c979cafeebc5c13fa8
SQL
lizziechoi/plp-reports
/one_off/reflections.sql
UTF-8
196
2.65625
3
[ "MIT" ]
permissive
SELECT * FROM reflection_log_entries as entries JOIN users as students ON entries.student_id = students.id JOIN reflection_log_prompts as prompts ON prompts.id = entries.reflection_log_prompt_id ;
true
0944ddf62345a8a23d85e37ddb3cae522e189e60
SQL
NeboLej/TradeCompanyProject
/TradeCompany_DataBase/TradeCompany_DataBase/Stored Procedures/GetProductsByOrderId.sql
UTF-8
494
3.5625
4
[]
no_license
CREATE PROCEDURE [TradeCompany_DataBase].[GetProductsByOrderId] @OrderId int as select ol.ProductID, p.[Name], p.MeasureUnit, ol.Amount, ol.Price, pg.[Name] as ProductGroupName from TradeCompany_DataBase.OrderLists ol inner join TradeCompany_DataBase.Products p on p.ID = ol.ProductID inner join TradeCompany_Da...
true
3df8ca8e0afa302fb4da1a4edf78aa0a031109c0
SQL
silence-do-good/stress-test-Postgres-and-MySQL
/dump/high/day20/select2313.sql
UTF-8
178
2.671875
3
[]
no_license
SELECT timeStamp, temperature FROM ThermometerOBSERVATION o WHERE timestamp>'2017-11-19T23:13:00Z' AND timestamp<'2017-11-20T23:13:00Z' AND temperature>=17 AND temperature<=99
true
f014837827f09dfa17a1f6bf5510ab2fd172f07e
SQL
vita1ity/ebs
/db/project.sql
UTF-8
1,172
2.921875
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : f Source Server Version : 50619 Source Host : localhost:3306 Source Database : project Target Server Type : MYSQL Target Server Version : 50619 File Encoding : 65001 Date: 2014-12-27 17:10:10 */ CREATE DATABASE project; USE project; S...
true
52738cca1d9417ae77db41bf552f3f1ca027e143
SQL
BobbyXBanks/burger
/db/schema.sql
UTF-8
330
2.90625
3
[]
no_license
CREATE DATABASE burgers_db; USE burgers_db; -- Created the table "schools" CREATE TABLE burgers ( id int AUTO_INCREMENT, -- keep burgername as string name VARCHAR(255) NOT NULL, -- devoured needs to be boolean default false devoured BOOLEAN NOT NULL DEFAULT FALSE, -- serve id as primary key PRIMARY KE...
true
8b8adb80904c94f01713ace13242a17a9afcfd50
SQL
Integrador-SWG/Sistema-SWG
/7-Codificación del Sistema/swg/bd/vieja/swg.sql
UTF-8
19,446
3.375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.1.12 -- http://www.phpmyadmin.net -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 21-08-2014 a las 23:20:17 -- Versión del servidor: 5.6.16 -- Versión de PHP: 5.5.11 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARA...
true
e784f6251955b2e9e3f04f81c5f1649b1dfafe60
SQL
gcoronelc/SISTUNI-PLSQL-005
/TRABAJOS/TALAVERA/fcSCRIPTs Guillermo Talavera/fcFUNC.sql
UTF-8
5,666
3.046875
3
[]
no_license
CREATE OR REPLACE FUNCTION funCRUDUPDATE(v_obj varchar2, v_nombre varchar2, v_nombre_cambio varchar2) RETURN varchar2 IS result_update varchar2(150) := ''; cmd varchar2(150) := ''; BEGIN IF (v_obj = 'entrenador') THEN cmd := 'UPDATE FUTBOLCLUB.' || UPPER(v_obj) || 'ES' || ' SET nombre_entrenador =...
true
fe08437eeb99ee0ea8370880d7be9823f33a1662
SQL
tgh12/incubator-kylin
/query/src/test/resources/query/h2/query09.sql
UTF-8
208
3.25
3
[ "Apache-2.0" ]
permissive
select count(*) from (select test_cal_dt.week_beg_dt from test_kylin_fact inner JOIN edw.test_cal_dt as test_cal_dt ON test_kylin_fact.cal_dt = test_cal_dt.cal_dt group by test_cal_dt.week_beg_dt) t
true
068d3045a81d41d92e13270cd5e0781a13f8e187
SQL
cjaramilloalmaximoti/copiaLigitios
/Reclutamiento/Codigo/BD/RespaldoSemReclutamiento001/Reclutamiento004AG.sql
UTF-8
2,245
3.171875
3
[]
no_license
DELIMITER $$ CREATE DEFINER=`root`@`localhost` PROCEDURE `ObtProspectos`( IN `pNombre` VARCHAR(100), IN `pApellido` VARCHAR(100), IN `pActivo` INT, IN `pIdEmpresa` INT ) BEGIN Declare pDesde tinyint; Declare pHasta tinyint; if(pActivo = -1) then SET pDesde = 0; SET pHasta = 1; else SET pDesd...
true
eda6bef1f14ca538de4220f1334a48cc50c8fa0d
SQL
jsostaric/PHPAkademija2020
/PHPAcademyHomework4/script.sql
UTF-8
8,502
3.84375
4
[]
no_license
drop database if exists homework; create database homework character set utf8mb4 collate utf8mb4_unicode_ci; use homework; #mysql -uroot -p --default_character_set=utf8mb4 < c:\xampp\htdocs\PHPAcademyHomework4\script.sql drop trigger if exists trigger_insert_members; create table genres( id int not n...
true
d74e33feb38d9cba88f8fbf91ca97d1f9192f2de
SQL
jerrica-mj/bootcampX
/1_queries/2_total_students_in_cohorts.sql
UTF-8
275
3.703125
4
[]
no_license
-- Select the total number of students who were in the first 3 cohorts. SELECT count(*) FROM students -- WHERE cohort_id <= 3; --> this is less flexible, more redundant for multiple cohorts WHERE cohort_id IN (1,2,3); -- Expected Output: -- count ------- -- 48 (1 row)
true
5fc9d7c6af267a9ffa06ecd2a0ec6e9fab06e325
SQL
DigitalGizmo/tomcat-centures-src
/database/scratch/ohAassociation_fromScratch.sql
UTF-8
498
2.84375
3
[]
no_license
USE centuriesForum; /*DROP TABLE OhAssociation; */ CREATE TABLE OhAssociation ( ID INT NOT NULL IDENTITY (1,1), assocTypeID INT DEFAULT 0 NOT NULL, associateID INT DEFAULT 0 NOT NULL, assocWithID INT DEFAULT 0 NOT NULL, ordinal SMALLINT DEFAULT 0 NOT NULL, CONSTRAINT OhAssociation_PK PRIMAR...
true
ea967716dd81f48bb4251520c916addcc18b33dc
SQL
FCPhoenix/php-create-delete-update-delete-search-app
/database/script.sql
UTF-8
379
2.78125
3
[]
no_license
CREATE DATABASE phpApp; use phpApp; CREATE TABLE student( id INT(11) PRIMARY KEY AUTO_INCREMENT, age INT(10) DEFAULT NULL, specialty VARCHAR(255) DEFAULT NULL, name VARCHAR(25) NOT NULL, surname VARCHAR(25) NOT NULL, gender VARCHAR(6) DEFAULT NULL, matriculation_number VARCHAR(25) NOT NULL, created_at...
true
4ef08bbd7347bc525150f0030b71c451dc04279c
SQL
cvranjith/misc
/mick/all.sql
UTF-8
143
2.546875
3
[]
no_license
SELECT OWNER,RPAD(OBJECT_NAME,30,' ') ||' - '|| OBJECT_TYPE OBJECT FROM ALL_OBJECTS WHERE OBJECT_NAME LIKE REPLACE(upper('%&OB%'),' ','%') /
true
fc2aab538ffde0a6fb493ae7ee4ba454c3ec7639
SQL
flomader/azure-databricks-storage
/notebooks/directconnect_oauthsp_sql.sql
UTF-8
1,589
3.296875
3
[]
no_license
-- Databricks notebook source -- MAGIC %md -- MAGIC %md -- MAGIC ## Azure DataLake Gen2 -- MAGIC -- MAGIC Pre-requisites: -- MAGIC 1. [Create Service Principle](https://docs.microsoft.com/en-us/azure/active-directory/develop/howto-create-service-principal-portal) -- MAGIC 1. Service Principle has [**Storage Data Blob ...
true
e1bff2e74e6199424f0d03f2b12af68acc942a9c
SQL
Ingrid-Deukoue/sql-challenge
/Queries/employee_database.sql
UTF-8
1,493
4.125
4
[]
no_license
CREATE TABLE employees ( emp_no int NOT NULL, emp_title_id varchar(60), birth_date date NOT NULL, first_name varchar(255) NOT NULL, last_name varchar(255) NOT NULL, sex varchar(1) NOT NULL, hire_date date NOT NULL, CONSTRAINT pk_Employees PRIMARY KEY ( emp_no) ); select * from employees ...
true
653fcf7d0e4f9d1a90dfa9788fa092327ca85daa
SQL
harakonan/misc-codes
/SQL/SQL_Puzzle_2nd_Ed/p20/SELECT1.sql
UTF-8
219
2.96875
3
[]
no_license
SELECT DISTINCT test_name FROM TestResults T1 WHERE NOT EXISTS (SELECT * FROM TestResults T2 WHERE T1.test_name = T2.test_name AND T2.comp_date IS NULL);
true
44c26f20d4dc63536386fe86e95734043f7f8c76
SQL
ualbertalib/coral-api
/sql/GetRights_sp.sql
UTF-8
3,446
3.734375
4
[]
no_license
use coral_licensing_prod; DROP PROCEDURE IF EXISTS coral_licensing_prod.GetRights; DELIMITER // CREATE PROCEDURE `GetRights`(IN target varchar(256), IN targetType varchar(10)) BEGIN DECLARE v_eclassId, v_coursePackId, v_linkId, v_printId, v_documentId INT; declare v_eclassTxt, v_coursePackTxt, v_linkTxt, v_print...
true
249a862c444e94ad3952cc7c4c20690a1a175dad
SQL
holnone/StJames_Golf
/doc/teamMatches.sql
UTF-8
2,359
3.078125
3
[]
no_license
select w.week_id, w.wk_date, w.team_match_1_id, t1.team_nbr, t2.team_nbr, w.team_match_2_id, t3.team_nbr, t4.team_nbr, w.team_match_3_id, t5.team_nbr, t6.team_nbr, w.team_match_4_id, t7.team_nbr, t8.team_nbr, w.team_match_5_id, t9.team_nbr, t10.team_nbr, w.team_match_6_id, t11.team_nbr, t12.team_nbr from `STJ_WEEK` w i...
true
d469f86554e0904e656f53b3d8e31353d95c0d10
SQL
rogeriomfneto/django_labjef
/sql/create.sql
UTF-8
4,355
3.8125
4
[]
no_license
-- Dropa tudo /* DO $$ DECLARE r RECORD; BEGIN FOR r IN (SELECT tablename FROM pg_tables WHERE schemaname = current_schema()) LOOP EXECUTE 'DROP TABLE IF EXISTS ' || quote_ident(r.tablename) || ' CASCADE'; END LOOP; END $$; */ CREATE TABLE pessoa ( id_pessoa INT NOT NULL PRIMARY KEY, cpf...
true
2bc903f915e55d506d43dfa7c03e5cfc0971853f
SQL
tapsaism/statsgoon
/statsgoon-sql/publish/d_date_season.sql
UTF-8
414
2.984375
3
[]
no_license
create view publish.D_DATE_SEASON AS SELECT DISTINCT filedate as date, CASE WHEN filedate >= 20161004 AND filedate <= 20170409 THEN '2016-2017'::text WHEN filedate >= 20170410 AND filedate <= 20170631 THEN '2016-2017 playoffs'::text WHEN filedate >= 20171004 and filedate <= 20180631 THEN '2017-2018'::text ELS...
true
56a429ab3cd27f2845856da4d32788e6df59934b
SQL
1538402109/storage_platform
/sql/t_receivables_detail.sql
UTF-8
1,915
2.921875
3
[]
no_license
/* Navicat Premium Data Transfer Source Server : localhost Source Server Type : MySQL Source Server Version : 80012 Source Host : localhost:3306 Source Schema : jtpsi Target Server Type : MySQL Target Server Version : 80012 File Encoding : 65001 Date: 18/05/2021 23:2...
true