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
3bf3c09311e6a60f190be208c802b60b41899690
SQL
sidduSthawarmath/SpringSecPasswordEncryptWithBcrypt
/data.sql
UTF-8
1,270
3.390625
3
[]
no_license
CREATE TABLE `app_user_details` ( `pkId` int(11) NOT NULL AUTO_INCREMENT, `password` varchar(255) DEFAULT NULL, `userName` varchar(255) DEFAULT NULL, PRIMARY KEY (`pkId`) ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1; INSERT INTO `app_user_details` (`pkId`,`password`,`userName`) VALUES (1,'$2a$10$y...
true
ccbc6e6d6d05ce3509dd3d1c839bf481ac082093
SQL
ashishksinghin/LeetcodeCShaprDotNetCore
/SQL/176. Second Highest Salary.sql
UTF-8
497
4.0625
4
[]
no_license
--solution 1-- SELECT ( SELECT DISTINCT Salary FROM Employee ORDER By Salary DESC OFFSET 1 ROW FETCH NEXT 1 ROW ONLY ) AS SecondHighestSalary --solutioin 2, not consider null-- SELECT TOP 1 Salary FROM ( SELECT DISTINCT TOP 2 Salary FROM Employee ORDER BY Salary DESC ) AS Emp OR...
true
3f65a2a7336b9a48f2edb42f2f3cd2f7b33f7fbc
SQL
kezoneitor/Proyecto1_SO
/proyecto1SO.sql
UTF-8
1,374
4.125
4
[]
no_license
CREATE TABLE palabra ( categoria VARCHAR(100) NOT NULL, palabra VARCHAR (100) NOT NULL ); CREATE TABLE url ( id_url SERIAL PRIMARY KEY, texto VARCHAR(1000) NOT NULL, clasificacion VARCHAR (100) NOT NULL ); CREATE TABLE categoria ( id_url_cat INTEGER, nombre VARCHAR(100) NOT NULL, cantPalabras INTEGER,...
true
6af2c18d5421141744a2495bb858edf2d3714936
SQL
babelroom/clouds
/prime/my_prime.sql
UTF-8
4,213
2.875
3
[]
no_license
-- -- setup / reset databases -- use `my`; DELETE FROM `accounts`; LOCK TABLES `accounts` WRITE; /*!40000 ALTER TABLE `accounts` DISABLE KEYS */; INSERT INTO `accounts` (id,name,balance,balance_limit,max_call_rate,max_users,max_duration,created_at,updated_at,owner_id,plan_code) VALUES (1,'Primary Account','0.00','0....
true
1e2f5d69f5da8711d5e574acc5b63e11dfdbd16c
SQL
rupsis/CS598-cloud-computing-capstone
/task1/question_1/tables.sql
UTF-8
1,537
3.140625
3
[]
no_license
-- Question 1.1 CREATE TABLE cs598_question_1_1_local_2 (origin STRING, dest STRING, flight_total BIGINT) ROW FORMAT DELIMITED FIELDS TERMINATED BY '|' LINES TERMINATED BY '\n'; CREATE EXTERNAL TABLE ddb_cs598_question_1_1_test (origin STRING, dest STRING, flight_total BIGIN...
true
1317295e24ae0103b110a6f933783cda769a41b4
SQL
sipakhti/POSTgres-sipakhti
/IM DB/Popular_actors_desc.sql
UTF-8
1,798
4.28125
4
[]
no_license
SELECT actor_name , final_rating FROM (SELECT aar.actor_name, (sum(aar.round) / (count(aar.actor_name) * 10) * 100 + sum(adr.round) / (count(adr.dir_name) * 10) * 100) / 200 * 100 AS sipakhti, a.pid, ar.count_films, CASE WHEN a.pid = a.pid THEN (ar.count_films + round((sum(aar.round) / (...
true
1564d7b057715919f3fafeed74cc625d803d97bd
SQL
greigsbarrie/floodmaster
/SF02_SCHEME_ATTRIBUTES_REFCONSTRAINT.sql
UTF-8
358
2.65625
3
[]
no_license
-------------------------------------------------------- -- Ref Constraints for Table SF02_SCHEME_ATTRIBUTES -------------------------------------------------------- ALTER TABLE "FLOODMASTER"."SF02_SCHEME_ATTRIBUTES" ADD CONSTRAINT "SF02_SF01_FK" FOREIGN KEY ("SCHEME_ID") REFERENCES "FLOODMASTER"."SF01_FLOOD_PRE...
true
48fbb24980e67b9d56a0000987d3a98baff40a18
SQL
sethsondenaa/MySQL
/MySQL_practice/lead_gen_business/10_clients_websites.sql
UTF-8
212
3.765625
4
[]
no_license
SELECT concat(clients.first_name, " ", clients.last_name) as client_name, GROUP_CONCAT(sites.domain_name SEPARATOR ' / ') FROM clients JOIN sites ON clients.client_id = sites.client_id GROUP BY clients.client_id
true
e2fb4870dd3952036c21d1ffa21df9f937f9067e
SQL
sukruthmk/hack4hire-drive-challenge
/database.sql
UTF-8
5,674
2.921875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 3.4.10.1 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Dec 07, 2014 at 03:04 PM -- Server version: 5.5.20 -- PHP Version: 5.3.10 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;...
true
25ba57f89fb9e0562aa8bb932c5b995db871a566
SQL
t-redactyl/W3-schools-SQL-tutorial
/Computer Store/ComputerStore13.sql
UTF-8
288
4.375
4
[]
no_license
/* Select the average price of each manufacturer's products, showing the manufacturer's name. */ SELECT Manufacturers.Name AS Manufacturer, AVG(Products.Price) AS [Average Price] FROM Manufacturers, Products WHERE Manufacturers.Code = Products.Manufacturer GROUP BY Manufacturers.Name
true
b04b4d563f40a09461413d905e36066571ed32c9
SQL
eric218/xiaoI_traning
/cloud-shijicheng-pretrial/DB File/saql1.sql
UTF-8
49,480
3.078125
3
[]
no_license
CREATE DATABASE IF NOT EXISTS `ticketsystem` /*!40100 DEFAULT CHARACTER SET utf8mb4 */; USE `ticketsystem`; -- MySQL dump 10.13 Distrib 5.6.13, for Win32 (x86) -- -- Host: localhost Database: ticketsystem -- ------------------------------------------------------ -- Server version 5.6.27-log /*!40101 SET @OLD_CHAR...
true
44ac0ade082fbeae1f8e32b95eba529147200a25
SQL
salvajih/LSC-Grants
/Easygrants_Web_LSC/Easygrants_Web_LSC/DBScripts/Build 2014.x/Build 2014.03/07_Modify_a_BUDGET_CATEGORY_sort_order.sql
UTF-8
6,833
3.5625
4
[]
no_license
--Adjust the sort orders to make room for the new budget categories: --1. Bump up everything by three after the new Cy Pres awards category --1.1 Model project UPDATE bc3 SET sort_order = bc3.sort_order + 3 FROM a_BUDGET_CATEGORY bc0 JOIN a_BUDGET_CATEGORY bc1 ON bc0.budget_category_id = bc1.parent_id...
true
8d2c0f11ddc01361d33b44a11abcccd9b85352dc
SQL
Com-Ericmas001/py-userbase
/db/tables.sql
UTF-8
14,772
2.609375
3
[ "MIT" ]
permissive
--- CHANGE MY_USERBASE_USER for your user DROP TABLE user_settings; DROP TABLE user_access_types; DROP TABLE user_authentications; DROP TABLE user_groups; DROP TABLE user_group_types; DROP TABLE user_profiles; DROP TABLE user_recovery_tokens; DROP TABLE user_relation_types; DROP TABLE user_tokens; DROP TABLE users; D...
true
fe0c81b86bfd257b2c2db72f081aa1916790403c
SQL
jennyluciav/php-crud-login
/colegio.sql
UTF-8
4,216
3.171875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.7.4 -- https://www.phpmyadmin.net/ -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 05-11-2017 a las 20:26:23 -- Versión del servidor: 10.1.28-MariaDB -- Versión de PHP: 7.1.10 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00";...
true
93f0615bda7292ad57e0824573f39e0454945143
SQL
peien-tsai/MySQL
/workspace/my_test_db.sql
UTF-8
1,176
3.71875
4
[]
no_license
/* Database Schema : my_test_db */ DROP DATABASE IF EXISTS my_test_db; CREATE DATABASE IF NOT EXISTS my_test_db; CREATE USER IF NOT EXISTS 'dbuser'@'localhost' IDENTIFIED with mysql_native_password by 'aabb1234'; GRANT ALL PRIVILEGES ON my_test_db.* TO 'dbuser'@'localhost'; USE my_test_db; SET FOREIGN_KEY_CHECKS =...
true
92538069a542610834a294bce752cba8565d6530
SQL
0212kr/JavaWork
/Lec_DBMS/08_view/view1.sql
UTF-8
1,061
3.4375
3
[]
no_license
-- 뷰 생성 구문 CREATE VIEW v_prof AS SELECT profno,name,email,hpage FROM T_PROFESSOR ; SELECT * FROM v_prof; SELECT tname FROM tab; -- view 확인 가능 -- 생성할때 삭제후 생성이기때문에 무제한으로 실행가능 CREATE OR REPLACE VIEW v_prof AS SELECT profno, name, email, hpage FROM T_PROFESSOR ; SELECT * FROM v_prof; SELECT tname FROM tab; -- view 확인 가...
true
2cd6644b12978e09d5ec4deccd758f86db57cd9f
SQL
defhacks/wca-ipy
/sql/extract_senior_details.sql
UTF-8
1,120
4.1875
4
[]
no_license
/* Script: Extract Over 40s Created: 2019-06-19 Author: Michael George / 2015GEOR02 Purpose: Extract name, country, age category and details for speedsolving.com */ -- Extract list of seniors SELECT t.personId, personName, c.name AS country, IFNULL(s.username, '?') AS username, usernum, MAX(...
true
ff3cf66041e4a088be9e5b932502f61d384cdf8f
SQL
LudoCarlu/projetphp_fin
/contacts.sql
UTF-8
1,079
3.03125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 3.2.5 -- http://www.phpmyadmin.net -- -- Serveur: localhost -- Généré le : Lun 16 Mars 2015 à 13:56 -- Version du serveur: 5.5.30 -- Version de PHP: 5.5.6 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARAC...
true
664fb1bd4e18c2a20c2b2cfd86dbd6ecb70ff24d
SQL
IMSTang/IMS
/doc/sales.sql
UTF-8
13,590
2.578125
3
[ "Apache-2.0" ]
permissive
-- 一级菜单 insert into sys_menu values('100', 'Sales Management', '0', '30', '#', 'M', '0', '', 'fa fa-shopping-basket font12', 'admin', '2018-03-01', 'admin', '2018-03-01', 'Sales Management'); -- 二级菜单 insert into sys_menu values('110', 'Customer', '100', '1', '/sales/customer', 'C', '0', 'sales:custo...
true
051be5019da82730cea472a70da49ce3d1f60c8b
SQL
duncan-mann/LightBnB
/seeds/01_seeds.sql
UTF-8
1,522
3.109375
3
[]
no_license
INSERT INTO users (name, email, password) VALUES ('Duncan Mann', 'duncan@mann.com', '$2a$10$FB/BOAVhpuLvpOREQVmvmezD4ED/.JBIDRh70tGevYzYzQgFId2u.'), ('Elvis Prestley', 'elvis@elvis.com', '$2a$10$FB/BOAVhpuLvpOREQVmvmezD4ED/.JBIDRh70tGevYzYzQgFId2u.'), ('Steve Harvey', 'steve@harvey.com', '$2a$10$FB/BOAVhpuLvpOREQVmvm...
true
1b5ccea193e7a305f66191adb861d0c5093542db
SQL
nandolrs/sge
/dados/modelos/script/sge/Relational_1/SQL Server 2012/DataObjects/ForeignKey/ORCORCAMENTOMESANO_ORCORCAMENTO_FK.sql
UTF-8
217
2.765625
3
[]
no_license
ALTER TABLE ORCORCAMENTOMESANO ADD CONSTRAINT ORCORCAMENTOMESANO_ORCORCAMENTO_FK FOREIGN KEY(ORCORCAMENTO_CD_ORCAMENTO) REFERENCES ORCORCAMENTO(CD_ORCAMENTO) ON DELETE NO ACTION ON UPDATE NO ACTION GO
true
05e899814e429d81090f85d2b605ad9c00e1aaea
SQL
linixj/templates
/CreateDateDimensionTemplateInSnowflake.sql
UTF-8
7,925
3.828125
4
[]
no_license
--DIM TABLE DDL CREATE OR REPLACE TABLE DW.DIM_DATE ( --METADATA META_NK_COLUMN_HASH VARCHAR NOT NULL ,META_IS_CURRENT BOOLEAN NOT NULL ,META_CREATED_DATE TIMESTAMP_NTZ NOT NULL ,META_UPDATED_DATE TIMESTAMP_NTZ NOT NULL ,META_EFFECTIVE_FROM TIMESTAMP_NTZ NOT NULL ,META_EFFECT...
true
4ce63695ef1adee58b0272677f89f3cd3285289b
SQL
ivaneyvieira/separacaoRessuprimento
/src/main/resources/sqlSaci/proximoNumeroLoja.sql
UTF-8
267
3.046875
3
[]
no_license
SELECT MAX(no) AS proximo FROM ords AS O INNER JOIN oprd AS P ON P.ordno = O.no WHERE O.storeno = :storeno AND O.no BETWEEN (:destino * 100000000) AND (:destino * 100000000 + 99999998) AND O.c4 = 'L' AND P.auxStr LIKE CONCAT(:abreviacao, '%')
true
987cbbf26ea7c15b0a817953bc65b3e74097dd5b
SQL
Edgard-Maximo/Generation-Bloco-2-MySQL
/Atividade BancoDeDados Relacional/Exercicio01.sql
UTF-8
2,712
3.578125
4
[]
no_license
create database db_generation_game_online; use db_generation_game_online; create table tb_classe( id bigint auto_increment, nome varchar(255) not null, vida decimal(10, 2) not null, mana decimal (10, 2)not null, primary key(id) ); insert into tb_classe (nome, vida, mana) values ("Arqueiro", 3000, 2500); -- Arqueiro =...
true
0c0db2c98b29223b4e825d978c20feecb9884cc0
SQL
hatttruong/feature2vec
/mics/view_first_heart_admission.sql
UTF-8
2,168
4.15625
4
[ "MIT" ]
permissive
-- 390-459 Diseases Of The Circulatory System -- 393-398 Chronic Rheumatic Heart Disease -- 410-414 Ischemic Heart Disease -- 420-429 Other Forms Of Heart Disease -- 746 Other congenital anomalies of heart: BETWEEN '7461 ' AND '7469 ' -- 785 Symptoms involving cardiovascular system: '7850', '7851', '7...
true
be2f94cf299094ccd8b5339c3bef1a2f76462ad9
SQL
chaesiong/rtp-database
/production/DL_BORDERCONTROL/apex/application_700/application/pages/page_06260.sql
UTF-8
114,816
2.53125
3
[]
no_license
prompt --application/pages/page_06260 begin wwv_flow_api.create_page( p_id=>6260 ,p_user_interface_id=>wwv_flow_api.id(165585018976055186) ,p_name=>'Watchlist' ,p_page_mode=>'NORMAL' ,p_step_title=>'Watchlist' ,p_step_sub_title=>'Watchlist' ,p_step_sub_title_type=>'TEXT_WITH_SUBSTITUTIONS' ,p_first_item=>'NO_FIRST_ITE...
true
3a128c8512ffff36b4291aead6a7c416702ff0fd
SQL
praveentechie/psql
/crud/insert_row.sql
UTF-8
953
3.28125
3
[]
no_license
DELETE FROM settings; DELETE FROM accounts; \! echo "********** Creating rows for table 'settings' **********"; INSERT INTO settings ("customer_id", "name") VALUES ('100', 'AP'), ('101', 'Stores'), ('102', 'Enterprise'); \! echo "********** Creating rows for table 'accounts' **********"; INSERT INTO acc...
true
042f2b85591f1da54baf9802495e3ace07db8b60
SQL
bellmit/origin
/family_order/sql/.svn/pristine/e1/e1b84099ddbccee9158a4f44520c23fe2a3a1a15.svn-base
UTF-8
510
3.0625
3
[]
no_license
--IS_CACHE=Y select a.res_id,a.res_name,a.eparchy_code,a.res_type_code,a.res_kind_code,a.card_kind_code,b.card_kind_name,a.brand_code,a.model_code,a.class_id,a.use_tag,a.score_code,a.remark from td_m_resgift a,td_s_cardkind b where a.eparchy_code=b.eparchy_code and a.eparchy_code=:EPARCHY_CODE and a.res_type_code=:...
true
81581fef6e9b319d127a36077c9f92bbcf6e124d
SQL
ooq/tpch-gen
/queries/tpch_query16.sql
UTF-8
546
3.84375
4
[]
no_license
drop view if exists tempkey; create view tempkey as select s_suppkey tem_suppkey from supplier where s_comment not like '%Customer%Complaints%' group by s_suppkey; select p_brand, p_type, p_size, count(distinct ps_suppkey) as supplier_cnt from partsupp, part, tempkey where p_partkey = ps_partkey and p_brand ...
true
cc26a7aa1b789a2534a73f82df13acb30e7c5018
SQL
GuoJingFu/ziniuhome
/model/src/main/resources/com.ziuniu.mapper/sql/UmSecUserRole.sql
UTF-8
501
3.046875
3
[]
no_license
-- auto Generated on 2017-05-07 17:16:09 -- DROP TABLE IF EXISTS `um_sec_user_role`; CREATE TABLE `um_sec_user_role`( `id` INT (11) UNSIGNED UNIQUE NOT NULL AUTO_INCREMENT COMMENT 'id', `user_id` INT (11) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'userId', `role_id` INT (11) UNSIGNED NOT NULL DEFAULT 0 COMMENT ...
true
f397100c636dac179689c664901556f6710c8eb9
SQL
chimpnutz/web-service
/simuls/intlamax.sql
UTF-8
18,505
2.984375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.0.4.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Nov 07, 2013 at 10:12 AM -- Server version: 5.6.11 -- PHP Version: 5.5.3 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;...
true
18d4e9f3ca9ca0fd68ef3a73e6a351f3c0b7e68f
SQL
jchristo12/fantasy_football
/table_creation.sql
UTF-8
24,147
2.9375
3
[]
no_license
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; 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 NAMES utf8mb4 */; -- -----------------...
true
abaff2ad2f42ce3de9ccc6da637e341df530ba5c
SQL
mmsdsj/books
/db_book.sql
UTF-8
2,709
3.546875
4
[]
no_license
/* Navicat MySQL Data Transfer Source Server : localhost_3306 Source Server Version : 50720 Source Host : :3306 Source Database : db_book Target Server Type : MYSQL Target Server Version : 50720 File Encoding : 65001 Date: 2018-11-29 15:52:08 */ SET NAMES utf8; SET FOREIGN_KEY_CHEC...
true
bb31814b3098b822b258b530c4fcc1a2c76c4adb
SQL
NeuralNoise/animurecs
/dbv/data/schema/tags.sql
UTF-8
586
3.5
4
[]
no_license
CREATE TABLE `tags` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `name` text NOT NULL, `description` text NOT NULL, `tag_type_id` int(10) unsigned NOT NULL, `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL, `created_user_id` int(10) unsigned NOT NULL, `approved_on` datetime DEFAULT NUL...
true
1e0ad7f47ef3fbf3929b20af5e85f32008432648
SQL
rugao-web-fullstack/homeworks
/pqq/2017-11-30/mailsys.sql
UTF-8
1,672
3.25
3
[]
no_license
/* Navicat Premium Data Transfer Source Server : localhost Source Server Type : MySQL Source Server Version : 50720 Source Host : localhost Source Database : mailsys Target Server Type : MySQL Target Server Version : 50720 File Encoding : utf-8 Date: 11/30/2017 19:17:1...
true
0c8e3249e8c52792060940c4c9a1639438053520
SQL
drerek/microservice_application
/third-service/src/main/resources/dbScripts/constraints.sql
UTF-8
984
3.59375
4
[]
no_license
/*This sql-script creates FOREIGN KEY constraints for the database*/ ALTER TABLE user_event DROP CONSTRAINT u_event_fk_user; ALTER TABLE user_event DROP CONSTRAINT u_event_fk_event; ALTER TABLE user_event DROP CONSTRAINT u_event_fk_role; ALTER TABLE folder DROP CONSTRAINT folder_fk_user; ALTER TABLE event DROP CONSTRA...
true
578ee737e3a2706d5efa5091c5d6800dc398b39d
SQL
rushirajgawande/have-a-break-api
/Database_haveabreak/haveabreak_dev_adventure_tours_img.sql
UTF-8
2,504
2.921875
3
[]
no_license
-- MySQL dump 10.13 Distrib 8.0.19, for Win64 (x86_64) -- -- Host: 103.120.179.40 Database: haveabreak_dev -- ------------------------------------------------------ -- Server version 5.7.29 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_...
true
1ad3e725c2bd989b7d15dff602225586df87f813
SQL
GabrielRiveraB/micropos
/mposdb.sql
UTF-8
6,945
3.390625
3
[]
no_license
/* Navicat Premium Data Transfer Source Server : localhost Source Server Type : MySQL Source Server Version : 100419 Source Host : localhost:3306 Source Schema : mposdb Target Server Type : MySQL Target Server Version : 100419 File Encoding : 65001 Date: 19/10/2021 1...
true
d43ebb0ee835288d3688281a96d75103f457a347
SQL
serbinyo/homeworks.loc
/resources/assets/dumps/Struct_and_Inserts_sanatkr2ru_hmwrk_plus_mass_ttm.sql
UTF-8
31,028
3.3125
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.5.4.1 -- http://www.phpmyadmin.net -- -- Хост: localhost -- Время создания: Мар 30 2018 г., 00:37 -- Версия сервера: 5.6.33-79.0-log -- Версия PHP: 5.6.34-pl0-gentoo SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTE...
true
74dee446cd03fa5e5eb712cec4427a0bfdfc8690
SQL
ismailyou/bi_project
/SQL scripts/date_dim_table.sql
UTF-8
777
2.640625
3
[ "MIT" ]
permissive
create table date_dim( surr_id int primary key, full_date date default '1900-01-01' NOT NULL, day varchar default 'N/A' NOT NULL, month varchar default 'N/A' NOT NULL, year varchar default 'N/A' NOT NULL, day_number varchar default 'N/A' NOT NULL, day_of_month varchar default 'N/A' NOT NULL, month_of_year varch...
true
6f3321a9daecf5bfdc7e689c90d25c68754e2e01
SQL
vmejiaec/setimimpq
/KCG/xDB/Schema Objects/Schemas/dbo/Programmability/Stored Procedures/Procs1/Apu_Presupuesto_Indice_Insert.proc.sql
UTF-8
1,029
3.265625
3
[]
no_license
CREATE PROCEDURE dbo.Apu_Presupuesto_Indice_Insert ( @Id varchar(17), @Codigo varchar(200), @Estado char(3), @Descripcion varchar(2000), @Apu_Origen_Id varchar(17), @Apu_Insumo_Id varchar(17), @Apu_Indice_Id varchar(17), @Apu_Indice_Codigo varchar(200), @Apu_Indice_Nombre varchar(500), @Porcentaje...
true
32163716f0721023d99915da98ed479277ce97a0
SQL
iliasbartolini/sql_intro_twu
/04_PRIMARY_KEY.sql
UTF-8
367
3.046875
3
[]
no_license
DROP TABLE TERMS; CREATE TABLE TERMS ( name VARCHAR( 100 ) primary key, start DATE , end DATE ); INSERT INTO TERMS (name, start, end) VALUES ('twu 27', '2012-07-01', '2012-07-24'); INSERT INTO TERMS (name, start, end) VALUES ('twu 28', '2012-08-01', '2012-08-24'); --this fails INSERT INTO TERMS (name, start, end) V...
true
1e90734add1a501b236da9afeb3e72f2220d2900
SQL
PPE2/PPE2Annee
/MarieTeam/Req tables manquantes.sql
UTF-8
1,207
3.046875
3
[]
no_license
CREATE TABLE IF NOT EXISTS nbpassagers( `nombateau` varchar(100) NOT NULL, `codecategorie` varchar(100) NOT NULL, `nbplaces` integer NOT NULL, PRIMARY KEY(nombateau, codecategorie), FOREIGN KEY(nombateau) REFERENCES bateau(nombateau), FOREIGN KEY(codecategorie) REFERENCES categorie(codecategorie...
true
793c94b0dd99c5c7e43191f16160748f2e5982b7
SQL
MissPeperr/chinook
/sales_agent_invoices.sql
UTF-8
361
3.65625
4
[]
no_license
-- sales_agent_invoices.sql: -- Provide a query that shows the invoices associated with each sales agent. -- The resultant table should include the Sales Agent's full name. SELECT i.InvoiceId, e.FirstName + ' ' + e.LastName AS 'FullName' FROM Invoice i JOIN Customer c ON i.CustomerId = c.CustomerId JOIN Empl...
true
8258738e72a21c3c65f790ca2ef7f5f1d84031f9
SQL
SergeyNemtsov/sql-metodics-matherial
/sql-4/11.1.sql
UTF-8
369
3.25
3
[]
no_license
WITH RECURSIVE r AS ( -- стартовая часть рекурсии (т.н. "anchor") SELECT 2 AS i, 1 AS fn_2, 1 AS fn_1, 2 AS fn UNION -- рекурсивная часть SELECT i+1 AS i, fn_1 AS fn_2, fn AS fn_1, fn_2 + fn_1 AS fn FROM r WHERE i < 15 ) SELECT i, f...
true
a7613dc5d93807d70e39e101b16da6343f274ac0
SQL
hi-noikiy/wowonder-2
/MySQL/u517500732_demo.sql
UTF-8
29,101
3.390625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 3.5.2.2 -- http://www.phpmyadmin.net -- -- Anamakine: localhost -- Üretim Zamanı: 02 Şub 2016, 03:53:39 -- Sunucu sürümü: 10.0.20-MariaDB -- PHP Sürümü: 5.2.17 -- -- scriptarsivim@windowslive.com -- SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_C...
true
128c89c0d2b4fac331396311574dfc0c114741a3
SQL
szhqx/wx_admin_platform
/db/1.0/modify_article_material.sql
UTF-8
795
2.609375
3
[]
no_license
-- alter table article add ad_source_url varchar(1024) default '' comment '推广链接' after `weixin_source_url`; -- alter table material add ad_source_url varchar(1024) default '' comment '推广链接' after `weixin_source_url`; ALTER TABLE article MODIFY source_url varchar(1024) default '' comment '内容连接资源,默认是阿里云的'; ALTER TABLE ar...
true
104bcc5584dbdab3323ace64ab37543967f4dc32
SQL
quangthaile/C0721G2-LeQuangThai
/Module3/_02_thiet_ke_va_tao_co_so_du_lieu/execrise/quan_ly_ban_hang.sql
UTF-8
584
3.625
4
[]
no_license
drop database if exists quanlybanhang; create database quanlybanhang; use quanlybanhang; create table Customer( id int primary key auto_increment, `name` varchar(50), age int); create table `Order`( id int primary key, `date` date, customer_id int, total_price float, foreign key(customer_id) references Customer(id) )...
true
6d43085b15a6cd1154905da53722548e805987ce
SQL
totemsoft/calcite
/postgres/db/init/01.sql
UTF-8
576
2.921875
3
[ "Apache-2.0" ]
permissive
-- ---------------------------------------------------------------------------- -- psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" -- ---------------------------------------------------------------------------- -- ---------------------------------------------------------------------------- ...
true
89273c50ba416347946b3bdaad28b3c2bcc779d9
SQL
omarjcm/websae
/trunk/sql/ac_obtener_opciones_por_usuario.sql
UTF-8
778
3.515625
4
[]
no_license
DELIMITER $$ DROP PROCEDURE IF EXISTS `websae`.`ac_obtener_opciones_por_usuario` $$ CREATE DEFINER=`root`@`localhost` PROCEDURE `ac_obtener_opciones_por_usuario`(email VARCHAR(50), tipo CHAR(1)) BEGIN SELECT op.op_id_opcion, op.op_nombre_es, op.op_nombre_en, op.op_nombre_pt, op.op_url, op.op_url_usuario, op...
true
0def5ee3dc00ac5a1337dd84d2f36978a37a0d72
SQL
chuckconway/the-memorable-moments
/Source/__MVC_BACKUP/TheMemorableMoments.Database/Schema Objects/Schemas/dbo/Programmability/Stored Procedures/Album_Delete.proc.sql
UTF-8
423
3
3
[]
no_license
-- ============================================= -- Author: Chucksoft CodeGen -- Create date: Saturday, November 14, 2009 -- ============================================= CREATE PROCEDURE Album_Delete ( @AlbumId int ) AS BEGIN -- SET NOCOUNT ON added to prevent extra result sets from -- interfering ...
true
e65d37ceb708223d368f387e20b3cde61d300e5b
SQL
krishnamohankaruturi/secret
/aart-web-dependencies/db/ddl/136.sql
UTF-8
354
2.984375
3
[]
no_license
--table for CB CREATE TABLE testaccessibilityflag ( testid bigint NOT NULL, accessibilityflagcode character varying(75), CONSTRAINT testaccessibilityflag_pkey PRIMARY KEY (testid, accessibilityflagcode), CONSTRAINT test_testidid_fkey FOREIGN KEY (testid) REFERENCES test (id) MATCH FULL ON UPDATE...
true
702d018185ac06131df18be9f5ed366fc0dd777c
SQL
dibyamitr/juriscape
/NOTES/juriscape.sql
UTF-8
7,533
3.4375
3
[ "CC0-1.0" ]
permissive
/* SQLyog Community v13.1.5 (64 bit) MySQL - 10.3.16-MariaDB : Database - juriscape ********************************************************************* */ /*!40101 SET NAMES utf8 */; /*!40101 SET SQL_MODE=''*/; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_CHEC...
true
e398f793ab9dde5f810f826a5fc876e93c2c5cd6
SQL
remclellan/sql-challenge
/EmployeeSQL/Q7_Sales_Development_Emps.sql
UTF-8
300
3.71875
4
[]
no_license
select dept_emp.emp_no, employees.last_name, employees.first_name, departments.dept_name from dept_emp left join departments on dept_emp.dep_no=departments.dept_no left join employees on employees.emp_no=dept_emp.emp_no where departments.dept_name='Sales' or departments.dept_name='Development';
true
c6f55fecdeec53abebf72effc78fb49d652e52e8
SQL
patiwwb/Full-Stack-Web-Application
/db/users.sql
UTF-8
1,776
2.96875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Hôte : 127.0.0.1:3306 -- Généré le : Dim 27 juin 2021 à 10:52 -- Version du serveur : 8.0.21 -- Version de PHP : 7.3.21 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CL...
true
f8ffc857eb8d1e5116d16931b71432b6c679acee
SQL
better/dbt
/test/integration/013_context_var_tests/tests/to_yaml.sql
UTF-8
741
2.9375
3
[ "Apache-2.0" ]
permissive
{% set simplest = (toyaml({'a': 1}) == 'a: 1\n') %} {% set default_sort = (toyaml({'b': 2, 'a': 1}) == 'b: 2\na: 1\n') %} {% set unsorted = (toyaml({'b': 2, 'a': 1}, sort_keys=False) == 'b: 2\na: 1\n') %} {% set sorted = (toyaml({'b': 2, 'a': 1}, sort_keys=True) == 'a: 1\nb: 2\n') %} {% set default_results = (toyaml({...
true
401a45e454fb3f7d0493ce9577cdd2facff3d483
SQL
fdesignsltd/aqr8
/aqr8.sql
UTF-8
64,898
2.90625
3
[ "AAL", "BSD-3-Clause" ]
permissive
-- phpMyAdmin SQL Dump -- version 5.0.3 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: Oct 20, 2020 at 02:33 PM -- Server version: 10.4.14-MariaDB -- PHP Version: 7.3.23 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIE...
true
0a07894701cb51cd3da760526dee2d395701928a
SQL
taylornok/mysql-bamazon
/bamazon.sql
UTF-8
1,240
3.234375
3
[]
no_license
DROP DATABASE IF EXISTS bamazon_DB; CREATE DATABASE bamazon_DB; CREATE TABLE stock ( Id INT AUTO_INCREMENT NOT NULL, Item_Name VARCHAR(75) NOT NULL, Department VARCHAR(50), Price DECIMAL(10, 2), Amount_In_Stock INT (11), PRIMARY KEY (Id) ) INSERT INTO stock (Item_Name, Department, Price, Am...
true
5235cf8bbfc96d41147c7cc41147c1bee18e2846
SQL
samurake/Wegas-Game-System
/Database/sql-files/tables.sql
UTF-8
2,233
3.671875
4
[ "Apache-2.0" ]
permissive
DROP TABLE PLAYERS cascade constraints; CREATE TABLE PLAYERS ( userid NUMBER(10,0), username VARCHAR2(30) not null unique, email VARCHAR2(50) not null, passwd VARCHAR2(20) not null, totalPoints number(10), CONSTRAINT pk_user PRIMARY KEY(userid) ); DROP TABLE CITY cascade constraints; CREATE TABLE CITY ( us...
true
51dda86cf0b3795f6971ef592e4b7341c39a319e
SQL
MarcosRigal/Bdd
/P3/P3.1/E3/E3.sql
UTF-8
642
3.21875
3
[]
no_license
SELECT siglas FROM partidos WHERE idpartido = ANY ( SELECT partido FROM eventos_resultados er2 GROUP BY partido HAVING COUNT(*) = ( SELECT MAX(participaciones) FROM ...
true
52d92cf34ec4ad3152aff5f826a885abf34202fd
SQL
tomasjm/dimelo-api
/script.sql
UTF-8
1,951
3.296875
3
[]
no_license
-- MySQL Script generated by MySQL Workbench -- Tue Jun 26 21:42:43 2018 -- 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
6f640ba91cd5eb9b0e15a768a869fec7655724f6
SQL
foyez/postgres
/practice/person-car.sql
UTF-8
1,143
3.59375
4
[]
no_license
CREATE TABLE car ( id BIGSERIAL PRIMARY KEY, make VARCHAR(100) NOT NULL, model VARCHAR(100) NOT NULL, price NUMERIC(19, 2) NOT NULL ); CREATE TABLE person ( id BIGSERIAL PRIMARY KEY, first_name VARCHAR(50) NOT NULL, last_name VARCHAR(50) NOT NULL, email VARCHAR(50), gender VARCHAR(7) NOT NULL, date...
true
8d7aeec2e59172d291680ba1b1a1e7635b8a7442
SQL
filipeoliveirah/php-default-project
/res/sql/procedures/save/sp_projectsstandstypes_save.sql
UTF-8
601
2.8125
3
[]
no_license
CREATE PROCEDURE sp_projectsstandstypes_save( pidstandtype INT, pdesstandtype VARCHAR(64), pdtregister TIMESTAMP ) BEGIN IF pidstandtype = 0 THEN INSERT INTO tb_projectsstandstypes (desstandtype, dtregister) VALUES(pdesstandtype, pdtregister); SET pidstandtype = LAST_INSERT_ID...
true
912f3dc272223fd6588d0c61c0e38df6ca7bda84
SQL
yramirezdesigns/bamazon
/bamazon.sql
UTF-8
415
3.75
4
[]
no_license
DROP DATABASE IF EXISTS bamazon_db; create database bamazon_db; use bamazon_db; create table products( position int not null, item_id SELECT FLOOR(rand() * 90000 + 10000), product_name varchar(200) null, department_name varchar(200) null, price decimal(12, 2), stock_quantity SELECT stock_quantity FROM in_stock LEFT...
true
ac5d9a0f118c91812692cd26adddc0022222dd90
SQL
shadowfax-analytics/Sellers
/Weekwise Seller Active and inactive data.sql
UTF-8
1,297
3.84375
4
[]
no_license
select e.cluster_name,c.store_name,b.id,b.date_active,d.chain_name, (case when b.status = 1 then 'Active' when b.status = 0coreengine_cluster then 'InActive' end) Active_Status, count(distinct(case when date(a.order_time)>= curdate() -7 then a.id end)) as 1st_Week_Count_Nov, count(distinct(case when date(a.order_time)...
true
fb2c68708a4f74fc2ee889a766fece961056586a
SQL
emarosti/semester-project-wellesleyprojectdatabase
/createTables.sql
UTF-8
1,767
3.78125
4
[]
no_license
#createTables.sql use wprojdb_db; /* ## Eliana's original code DROP TABLE if exists user; CREATE TABLE user( uid int(10) unsigned AUTO_INCREMENT PRIMARY KEY NOT NULL, email varchar(50) NOT NULL, name varchar(50) NOT NULL, role set('student', 'client', 'administrator') NOT NULL, hashed char(60) NO...
true
b1b798297e219ed3e6fa792215604b5f73623977
SQL
ScautingBurgum/auti-kafe
/kafeloginv3.sql
UTF-8
2,543
3.234375
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.8.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Gegenereerd op: 24 apr 2019 om 18:17 -- Serverversie: 10.1.37-MariaDB -- PHP-versie: 7.3.0 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACT...
true
0408526dfc2c3bb054f03631b2b95268f691a1d9
SQL
CUBRID/cubrid-testcases
/sql/_15_fbo/_02_qa_test/cases/fbo_ddl03.sql
UTF-8
1,128
3.40625
3
[ "BSD-3-Clause" ]
permissive
-- need change case and answer. create table rt1 (nr int primary key not null auto_increment, b blob, c clob, str varchar(10) ); insert into rt1 values (null, bit_to_blob(X'10011'),char_to_clob('aaa'),'ABC'); insert into rt1 values (null, bit_to_blob(X'10111'),char_to_clob('bbb'),'BCD'); insert into rt1 values (null, b...
true
bb0e542c82cc5f68c93553deeeb8d9b51b1a4eb6
SQL
uudecode/gsidbmigration
/ora2pg/15.Перенос данных из Oracle в Postgres/cr_const_web50.sql
UTF-8
57,643
2.859375
3
[]
no_license
-- Source foreign key: B_AUDIT_EVENT_EVENT_TEMPLAT_FK ALTER TABLE web50.B_AUDIT_EVENT ADD CONSTRAINT B_AUDIT_EVENT_EVENT_TEMPLAT_FK FOREIGN KEY (EVENT_ID) REFERENCES web50.B_AUDIT_EVENT_TEMPLATE(EVENT_ID) MATCH FULL ON DELETE NO ACTION ON UPDATE NO ACTION NOT DEFERRABLE; -- Source foreign key: B_...
true
ec8480a0b96d858cb8420aca812180b91cab922a
SQL
OpenTouryoProject/AsynchronousProcessingService
/root/files/resource/AsyncProcessingService/Sql/sqlserver/SelectTask.sql
UTF-8
370
2.65625
3
[]
no_license
-- SelectTask -- 2015/04/09 Sandeep SELECT TOP(1) [Id] ,[UserId] ,[ProcessName] ,[Data] ,[NumberOfRetries] ,[ReservedArea] ,[CommandId] FROM [AsyncProcessingServiceStatusManagementTable] Where ([RegistrationDateTime] >= @P1 OR [CompletionDateTime] >= @P7) AND [NumberOfRetries] < @...
true
3ecc1c0f5b4c6dd06a3711677b1fae529f915a5a
SQL
keiraaaaa/Job-SearchWebsite
/jobhunter.sql
UTF-8
10,310
3.203125
3
[ "MIT" ]
permissive
CREATE TABLE `Student` ( `sid` VARCHAR(5) NOT NULL, `sname` VARCHAR(20) NOT NULL, `spassword` VARCHAR(20) NOT NULL, PRIMARY KEY (`sid`)); INSERT INTO `Student` VALUES ('S001', 'Sally M. Sampl','sms001'); INSERT INTO `Student` VALUES ('S002', 'John W. Smith','jws002'); INSERT INTO `Student` VALUES ('S003', 'Elise D...
true
4d0a150e15136495217800bd62bdaeafca39f190
SQL
AkshayKrBairwa/TAGIndia
/tagsoftwares .sql
UTF-8
1,961
3.125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Sep 22, 2021 at 04:25 AM -- Server version: 10.4.17-MariaDB -- PHP Version: 7.4.13 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIE...
true
52e50cc244f6c265638d3ad18117caff3d7ea2c2
SQL
db4serv/TOTVS
/SQL Server/CheckingCursors.sql
UTF-8
348
3.546875
4
[]
no_license
--Checking the query used on a CURSOR SELECT c.session_id, es.program_name, es.login_name, es.host_name, DB_NAME(es.database_id) AS DatabaseName, c.properties, c.creation_time, c.is_open, t.text FROM sys.dm_exec_cursors (0) c LEFT JOIN sys.dm_exec_sessions AS es ON c.session_id = es.session_id CROSS APPLY sys.dm_ex...
true
9d080afa45edda3143dee466c919ae25300d0cb0
SQL
murillojulio/KuAdmin
/app/config/mysql/ku_admin.sql
UTF-8
4,156
3.296875
3
[ "BSD-3-Clause" ]
permissive
-- MySQL Script generated by MySQL Workbench -- Sun May 10 19:28:53 2020 -- 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='ON...
true
8b122aece2d441b9fe84ed2c9854795a2209158f
SQL
uron/demos
/full-stack-demo/sql/user.sql
UTF-8
389
2.796875
3
[]
no_license
-- 导出 todolist 的数据库结构 CREATE DATABASE IF NOT EXISTS `todolist` /*!40100 DEFAULT CHARACTER SET utf8 */; USE `todolist`; -- 导出 表 todolist.user 结构 CREATE TABLE IF NOT EXISTS `user` ( `id` int(11) NOT NULL AUTO_INCREMENT, `user_name` char(50) NOT NULL, `password` char(128) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=In...
true
cc67b9fc5d458137a58ce64d064437105bdc1dfa
SQL
apag101/IS360
/quiz14.sql
UTF-8
1,248
3.609375
4
[]
no_license
 ---------------------------------- create table EnergyCategories (EnergyCategoryID Serial PRIMARY KEY NOT NULL, EnergyCategory VARCHAR (25) NULL); Insert into EnergyCategories (EnergyCategory) VALUES ('Fossil'), ('Renewable'); select * from Energycategories; ------------------------------------- create table Energ...
true
90c5dcc2d650253d1362deac26b6e24db51ab42b
SQL
oakstwest/worx-personal-project
/db/products_by_ids.sql
UTF-8
94
2.8125
3
[]
no_license
select * from products p join images i on p.product_id = i.product_id where p.product_id = $1;
true
781a11052a71572371a656e61ef32d393a656af9
SQL
pirocorp/Databases-Basics-MS-SQL-Server
/09. Exam Prep/01. Exam - 22 October 2017/10. Users per Employee/Users per Employee.sql
UTF-8
290
4.09375
4
[ "MIT" ]
permissive
SELECT CONCAT(e.FirstName, ' ', e.LastName) AS [Name], COUNT(r.UserId) AS [Users Number] FROM Employees AS e LEFT JOIN Reports AS r ON r.EmployeeId = e.Id GROUP BY e.Id, CONCAT(e.FirstName, ' ', e.LastName) ORDER BY [Users Number] DESC, [Name]
true
8a1f48038a6dc8ee8c914f3f505ca41a60cdaebf
SQL
NDuggan-dev/IMS-JuneSDET-Niall
/src/test/resources/sql-schema2fail.sql
UTF-8
1,131
3.65625
4
[ "MIT" ]
permissive
drop schema `imstest`; CREATE SCHEMA IF NOT EXISTS `imstest`; USE `imstest` ; CREATE TABLE IF NOT EXISTS `customerss` ( `customer_ids` INT(11) NOT NULL AUTO_INCREMENT, `forenames` VARCHAR(40) DEFAULT NULL, `surnames` VARCHAR(40) DEFAULT NULL, PRIMARY KEY (`customer_ids`) ); CREATE TABLE IF NOT EXISTS ...
true
711bc92fcc0e0673545b8b9d03ce97f4e3d17b61
SQL
CelsoDSoares/Processso_Dito
/01 - SQL/Questão_02.sql
UTF-8
2,318
4.46875
4
[]
no_license
/*De quantos em quantos dias, em média, as pessoas compram? Use a mediana como média.*/ /*Ordenei as comprar por data buscando recuperar qual a próxima compra do cliente, busquei a diferença de dias entre a compra e a próxima comprar, desconsiderando as compras do mesmo dia, tendo a diferença de dias, calculei a...
true
8bc482ab541484077eee99fefa2e046782e7c101
SQL
ZFGCCP/ZFGC3
/src/main/database/tables/AVATAR.sql
UTF-8
707
3.21875
3
[ "MIT" ]
permissive
CREATE TABLE `AVATAR` ( `AVATAR_ID` INT(11) NOT NULL AUTO_INCREMENT, `AVATAR_FILENAME` VARCHAR(256) NULL DEFAULT NULL, `AVATAR_URL` VARCHAR(256) NULL DEFAULT NULL, `AVATAR_GALLERY_ID` INT(11) NULL DEFAULT NULL, `AVATAR_TYPE_ID` INT(11) NOT NULL, PRIMARY KEY (`AVATAR_ID`), INDEX `FK_AVATAR_AVATAR_GALLERY_ID` (`AV...
true
1ab309a33f8e86e1fd12b83bb96487b45d239084
SQL
ramshajawaid23/Library-Management-System
/library.sql
UTF-8
8,140
3.171875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Apr 28, 2021 at 05:36 PM -- Server version: 10.4.17-MariaDB -- PHP Version: 8.0.2 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIEN...
true
9cc246af71e9c9a7f89aca2f88eef7db5ff42575
SQL
AmrElabsy/HIS
/his.sql
UTF-8
11,662
3.15625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.0.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Nov 22, 2019 at 10:55 PM -- Server version: 10.1.32-MariaDB -- PHP Version: 5.6.36 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @...
true
792380dbc89ff3081f057e3ca17cfcef09ab0f85
SQL
guyrux/udacity_statistics
/Aula 29 - SQL joins.sql
UTF-8
7,124
4.625
5
[]
no_license
/* Aula 29 - SQL Joins */ /*Aula 29.04 Text + Quiz: Your First JOIN*/ /*Quiz Questions 1) Try pulling all the data from the accounts table, and all the data from the orders table. 2) Try pulling standard_qty, gloss_qty, and poster_qty from the orders table, and the website and the primary_poc from the a...
true
4526e3a318a46fad2c8ad59b64cd0bcd93a75364
SQL
nick-stebbings/fractal-habit-pyramid-sinatraAPI
/db/sample-queries.sql
UTF-8
1,325
3.484375
3
[ "MIT" ]
permissive
-- domain seed INSERT INTO domains (name, description, rank, hashtag) VALUES ( 'Physical Health', 'Eating, sleeping, not being chased by a bear...', 1, '#physical' ); -- habit seed INSERT INTO habits (name, description, initiation_date, domain_id) VALUES ( 'Shop healthily', 'You are w...
true
ad8faddff2a2c6801523493130de6d76b29d6cb5
SQL
davymartinez/base-de-datos-master
/query-ej-38.sql
UTF-8
278
3.5
4
[ "Unlicense" ]
permissive
/* Agrupar todos los países según el continente al que pertenecen. Mostrar los continentes junto a la cantidad de naciones que pertenecen a cada uno. (Se esperan 2 columnas y 7 registros). */ SELECT country.continent, count(*) FROM world.country GROUP BY continent;
true
7ca228a0030e58d6afd47a5c0757401b7b07b927
SQL
PreslavaKuzova/Python101
/week09/Ships/query3.sql
UTF-8
107
2.921875
3
[ "MIT" ]
permissive
SELECT SHIP FROM OUTCOMES JOIN BATTLES ON OUTCOMES.BATTLE = BATTLES.NAME WHERE BATTLES.DATE LIKE "%1942%";
true
3f3b7288642a0597708ed7379744deb74cfd4f32
SQL
LeoManzini/BootcampSantander
/SQL/testes.sql
UTF-8
705
3.71875
4
[]
no_license
CREATE TABLE IF NOT EXISTS teste ( id SERIAL PRIMARY KEY, nome VARCHAR(50) NOT NULL, created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ); SELECT * FROM teste; DROP TABLE IF EXISTS teste; SELECT * FROM teste; CREATE TABLE IF NOT EXISTS teste ( cpf VARCHAR(11) NOT NULL, nome VARCHAR(50) NOT NULL, created...
true
33006850207052aca7e9dc7b6477a0a33a0e82e8
SQL
jiangzheng1986/ZYDBMS
/ZYDBMS/Executable/英文方式测试数据库/查询03.sql
GB18030
201
3.40625
3
[ "Apache-2.0" ]
permissive
--(3)ѡLIUʦڿγһſγ̵ѧѧ(Ӳѯ) SELECT S.S#,SNAME FROM S,SC,C,T WHERE S.S#=SC.S# AND SC.C#=C.C# AND C.T#=T.T# AND TNAME='LIU'
true
6135ff541736c78c442119f460317ebd39c33624
SQL
gladiopeace/digital-data-syn
/documents/oms/TB_PAYAI.sql
GB18030
2,760
3.28125
3
[]
no_license
/* ================================================================================ ṹ:TB_PAYAI ṹ:Ԥջϸ ṹĿ: ================================================================================ */ drop sequence SEQ_TB_PAYAI; drop index AK_TB_PAYAI; drop table TB_PAYAI; create table TB_PAYAI ( PAYAI_ID INTEGER ...
true
0f48c19092697298d305d666275df39c672a424c
SQL
molokovskikh/af_priceprocessor
/migrations/606_01_deleteAllErrorAutomaticSynon.sql
UTF-8
537
3.5
4
[]
no_license
DROP TEMPORARY TABLE IF EXISTS farm.AutomaticProducerSynonymsForDelete; CREATE TEMPORARY TABLE farm.AutomaticProducerSynonymsForDelete ( SynonymId INT unsigned) engine=MEMORY; INSERT INTO farm.AutomaticProducerSynonymsForDelete SELECT aps.* FROM farm.SynonymFirmCr s join farm.AutomaticProducerSynonyms...
true
4079299df72de6fba32c219555ea22054f425419
SQL
fulongde/GADATA-sql-
/GADATA/NGAC/Tables/rt_DispMaterialConsv.sql
UTF-8
928
2.765625
3
[]
no_license
CREATE TABLE [NGAC].[rt_DispMaterialConsv] ( [id] INT IDENTITY (1, 1) NOT NULL, [rt_csv_file_id] INT NULL, [Date Time] VARCHAR (MAX) NULL, [Alarm Nr] VARCHAR (MAX) NULL, [Txt1] VARCHAR (MAX) NULL, [Txt2] VARCHAR (MAX) NULL, [Txt...
true
00d9800dec9f2a5aa97486d4f8786fb187f8a268
SQL
mukundsood1996/PortalForClubs
/RoomBlocking/Room Blocking Database.sql
UTF-8
866
3.03125
3
[]
no_license
CREATE TABLE `rooms` ( `RoomId` int(4) NOT NULL, `RoomName` varchar(20) DEFAULT NULL, PRIMARY KEY (`RoomId`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; CREATE TABLE `bookings` ( `RoomId` int(4) NOT NULL, `From_D` date NOT NULL, `To_d` date NOT NULL, `B_Name` varchar(20) NOT NULL, KEY `RoomId` (`RoomId`), CONSTRA...
true
bfee01bb271e0bc8b9259f9248debbf5dcfb069f
SQL
Aaron-Usher/Capstone-2017
/SnackOverFlowDB/Old Stuff/update/scriptFiles/sp_reset_user_password.prc
UTF-8
560
2.828125
3
[]
no_license
USE [SnackOverflowDB] GO IF EXISTS(SELECT * FROM sys.objects WHERE type = 'P' AND name = 'sp_reset_user_password') BEGIN DROP PROCEDURE sp_reset_user_password Print '' print ' *** dropping procedure sp_reset_user_password' End GO Print '' print ' *** creating procedure sp_reset_user_password' GO Create PROCEDURE sp...
true
13751b4796c285521cc2f2ecd61b704fe5d83425
SQL
weirdkey/DB-Fundamentals
/Joins, Subqueries, CTE and Indices/17. Highest Peak and Longest River by Country.sql
UTF-8
446
3.875
4
[]
no_license
SELECT TOP(5) c.CountryName,MAX(p.Elevation),MAX(r.Length) FROM Peaks AS p JOIN Mountains AS m ON p.MountainId=m.Id RIGHT JOIN MountainsCountries AS mc ON mc.MountainId=m.Id CROSS JOIN Rivers AS r RIGHT JOIN CountriesRivers AS cr ON cr.RiverId=r.Id RIGHT JOIN Countries AS c ON c.CountryCode=mc.CountryCode WHERE mc.Coun...
true
41b4dc4c75c89b13d0c6cb1b29011f8ab482498e
SQL
charuka-rathnayaka/C-Center
/sql/procedures.sql
UTF-8
9,531
3.65625
4
[]
no_license
DELIMITER $$ DROP PROCEDURE IF EXISTS `add_new_product`$$ CREATE PROCEDURE `add_new_product`( Product_name varchar(30), Description varchar(200), Photo_Link varchar(255), Division_ID int(15), num_categories int, categories varchar(3000), num_sub_categories int, sub_categ...
true
d5dc487328e1468e56ca4c8b0bd989357c2939f1
SQL
flamato/hms
/dev/Setup/Sql/member_projects_schema.sql
UTF-8
375
2.765625
3
[]
no_license
CREATE TABLE IF NOT EXISTS `member_projects` ( `member_project_id` int(11) NOT NULL AUTO_INCREMENT, `member_id` int(11) NOT NULL, `project_name` varchar(100) NOT NULL, `description` text NOT NULL, `start_date` date NOT NULL, `complete_date` date DEFAULT NULL, `state` int(11) NOT NULL, PRIMARY KEY (`memb...
true
5d49b85f246fd150c9678db82455618cbc5c2a7f
SQL
DeboraBSilva/funtionExtenso
/f_extenso.sql
UTF-8
3,712
3.703125
4
[ "MIT" ]
permissive
DELIMITER $$ USE `bancodedados`$$ DROP FUNCTION IF EXISTS `f_extenso`$$ CREATE DEFINER=`root`@`localhost` FUNCTION `f_extenso`(pNumero INT(11)) RETURNS VARCHAR(500) CHARSET latin1 DETERMINISTIC BEGIN DECLARE unidade VARCHAR(500); DECLARE primeiraDezena VARCHAR(500); DECLARE dezenas VARCHAR(500); DECLARE cent...
true
8990207e8eb1d501ac5a81ff6050d4453c693d36
SQL
Ranjitakunwar/ICT-TWO
/feedback.sql
UTF-8
248
2.96875
3
[]
no_license
#File: feedback.sql #Create table named feedback CREATE TABLE if not exists feedback ( id INT NOT NULL AUTO_INCREMENT, name VARCHAR(50), email VARCHAR(50), comment VARCHAR(200) NOT NULL, PRIMARY KEY (id) ); #End feedback.sql
true
c303ec34c8b75206fd0da94d5f75126337e7b746
SQL
ginoghal/Ghalehpardaz_G_FavoriteThings
/switch_games.sql
UTF-8
1,812
2.953125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.9.0.1 -- https://www.phpmyadmin.net/ -- -- Host: localhost:8889 -- Generation Time: Nov 07, 2019 at 09:22 PM -- Server version: 5.7.26 -- PHP Version: 7.3.8 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLI...
true