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
a9cf5ba051550643d36cb636e30c717c708c4daf
SQL
hstrada/senai-codexp-mobile
/sql/script-tipos-join.sql
UTF-8
1,649
4.25
4
[]
no_license
/* = = Referências: https://dev.mysql.com/doc/refman/5.7/en/create-table-foreign-keys.html = */ /* --------------------------------------------------------------------------------------- */ /* = = Mostrar os diferentes tipos de "join" = */ DROP SCHEMA IF EXISTS senai_codexp_mobile; CREATE SCHEMA senai_codexp_mobile...
true
79595cafa6003fd45ba7955899b016a322a8b89a
SQL
makhloufi-lounis/tuto_symfony
/resources/base_symfony.sql
UTF-8
4,381
3.328125
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.1.14 -- http://www.phpmyadmin.net -- -- Client : 127.0.0.1 -- Généré le : Mar 19 Janvier 2016 à 19:20 -- Version du serveur : 5.6.17 -- Version de PHP : 5.5.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_...
true
dbacc93e60c7a3d6d2f7116dcde14c670ab97013
SQL
cuba-platform/sample-google-map
/modules/core/db/init/hsql/20.create-db.sql
UTF-8
724
2.84375
3
[]
no_license
-- begin SAMPLE_SALESPERSON alter table SAMPLE_SALESPERSON add constraint FK_SAMPLE_SALESPERSON_TERRITORY foreign key (TERRITORY_ID) references SAMPLE_TERRITORY(ID)^ alter table SAMPLE_SALESPERSON add constraint FK_SAMPLE_SALESPERSON_PHOTO foreign key (PHOTO_ID) references SYS_FILE(ID)^ create index IDX_SAMPLE_SALESPER...
true
7584c7e4565355dcec07d4205de240edf9b4569f
SQL
danimrprofe/basesDeDatos
/prueba.sql
UTF-8
650
3.0625
3
[]
no_license
CREATE TABLE productos ( ProductoID INT, NombreProducto VARCHAR(20), PrecioProducto FLOAT(2), Disponible BOOL ); # Llenamos la lista de productos INSERT INTO productos VALUES (1, 'Manzana', 0.20, False); INSERT INTO productos VALUES (1, 'Redbull', 0.20, False); INSERT INTO productos VALUES (1, 'Cafe', 0.20,...
true
ec2f8e44b854d488c052aed4276b0c080435d87f
SQL
Seshareddy12/Sql
/LMS ASS1/IndianC.sql
UTF-8
579
3.984375
4
[]
no_license
-- Find out the list of customers from India who have rented sports movies. use sakila; select distinct concat(first_name,' ',last_name) as CustomerName from film_list INNER JOIN inventory on inventory.film_id=film_list.fid INNER JOIN rental on inventory.inventory_id = rental.inventory_id INNER JOIN customer on renta...
true
86e9b91cef852efd74a77f56ea6964cdfbe9695a
SQL
UAMS-DBMI/PosdaTools
/posda/posdatools/queries/sql/GetRoiList.sql
UTF-8
410
3.15625
3
[ "Apache-2.0" ]
permissive
-- Name: GetRoiList -- Schema: posda_files -- Columns: ['roi_id', 'roi_num', 'roi_name'] -- Args: ['sop_instance_uid'] -- Tags: ['Structure Sets', 'sops', 'LinkageChecks'] -- Description: Get List of ROI's in a structure Set -- -- select roi_id, roi_num ,roi_name from roi natural join structure_set natural jo...
true
e7d5e49abe4a7374c11b20f837a1f538fd3ec90e
SQL
goodSuYeon/dbSql
/20200902.sql
UTF-8
1,964
3.96875
4
[]
no_license
실습 select1 SELECT * FROM lprod; SELECT buyer_id, buyer_name FROM buyer; SELECT * FROM cart; SELECT mem_id, mem_pass, mem_name FROM member; 연산 SELECT ename, sal, sal+10 FROM emp; 데이터 타입 확인 DESC emp; hiredate에서 365일 미래/과거의 일자 SELECT ename, hiredate, hiredate+365 after_lyear, hiredate-365 before_layer FROM emp; SEL...
true
9d3f41fb44ccc8d573cc083cb8974b01ead1b441
SQL
gerardtaliercio/Web-Programming-I-_-II
/SoftwareDev Files/SQL files/presidents.sql
UTF-8
1,109
3.765625
4
[]
no_license
/* Presidents of the United States Author: Gerard Taliercio */ DROP DATABASE IF EXISTS site_db ; CREATE DATABASE site_db ; USE site_db ; DROP TABLE IF EXISTS presidents; CREATE TABLE IF NOT EXISTS presidents ( id INT AUTO_INCREMENT PRIMARY KEY, fname TEXT NOT NULL, lname TEXT NOT NULL, number INT NOT NULL...
true
2a41276b683f2cdf80d1796698f5e70ab6f14978
SQL
iuvfag/MySchedule
/myschedule.sql
UTF-8
1,164
3.4375
3
[]
no_license
DROP DATABASE IF EXISTS myschedule; create database myschedule; \c myschedule; drop table if exists user_info; create table user_info( id serial not null, user_id character varying(100) not null, password character varying(100) not null, registration_date timestamp not null, update_date timestamp no...
true
0a0f5230a14dc0a8201edb62c1dacdfa21496184
SQL
tuantt98/postgresql
/filter-data/limit.sql
UTF-8
460
3.84375
4
[]
no_license
/* Limit: số phần tử giới hạn OFFSET: skip => nhảy bậc => vị trí(bắt đầu từ 0) */ -- 1 select * from customer order by customer_id limit 5 offset 0; -- 2 SELECT film_id, title, release_year FROM film ORDER BY film_id LIMIT 5; -- 3 SELECT film_id, title, release_year FROM film ORDER BY film_id LIMIT 4 OFFS...
true
6862b601912add9da69994ff4a7faa6fdb9cbd3e
SQL
cDillanb/sql-basics-lab
/artist.sql
UTF-8
258
2.6875
3
[]
no_license
INSERT INTO artist (name) VALUES ('AJR'), ('Jon Bellion'), ('Mystery Skulls'); SELECT * FROM artist ORDER BY name DESC LIMIT 10; SELECT * FROM artist ORDER BY name LIMIT 5; SELECT * FROM artist WHERE name LIKE 'Black%'; SELECT * FROM artist WHERE name LIKE '%Black%';
true
106f1c8fc34c51ddb7c05b3f5b697b23166a6a8d
SQL
84tghuynh/DatabaseProgramming
/Final Project/Milestone 3/Processing.sql
UTF-8
3,821
3.8125
4
[]
no_license
/******************************************************************** * GIANG HUYNH * Nov 28th, 2019 * Final Project Milestone 3 * Version: V4.0 * Date: Nov 28th, 2019 ********************************************************************/ CREATE OR REPLACE TRIGGER Validate_Type BEFORE INSERT OR UPDATE ON Renta...
true
9e7302e88d7f553724c3fd1f906d9be21b85fb5a
SQL
raining30/moana
/src/main/resources/mybatis/sql.sql
UTF-8
1,107
3.421875
3
[]
no_license
create table m_user( uid int auto_increment not null comment '用户ID,自增', ucount varchar(250) not null comment '用户帐号', upassword varchar(250) not null comment '用户密码', primary key(uid) comment '主键', unique(ucount) comment '唯一约束')CHARSET=utf8; create table m_film( fid int auto_increment not null comment '电影ID', ...
true
279369ea6a36e3dd980ab0ca948c61cc52f8cf15
SQL
deanrather/nutshell-git
/docs/schema.sql
UTF-8
512
2.9375
3
[]
no_license
CREATE TABLE `git_log` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `hash` varchar(64) NOT NULL, `date` int(11) NOT NULL, `user_name` varchar(45) NOT NULL, `message` varchar(256) NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `hash` (`hash`) ) ENGINE=InnoDB AUTO_INCREMENT=3720 DEFAULT CHARSET=latin1 CREATE...
true
bcf9ce19a8863bf0169ac78347c17f83de200395
SQL
marcoaoteixeira/InfoFenix
/src/InfoFenix.Resources/SQLs/DocumentDirectory/ListDocumentDirectories.sql
UTF-8
684
3.453125
3
[]
no_license
SELECT [document_directories].[document_directory_id], [document_directories].[code], [document_directories].[label], [document_directories].[path], [document_directories].[position], (SELECT COUNT([documents].[document_id]) FROM [documents] WHERE [documents].[document...
true
2fe0ab79520018c6dd915b5f92fe4ceb35495cf3
SQL
konfer/MyIntellijDir
/IntellijPro/IdeaPro/IdeaPro/HN_DB/MWOra9i2_GrantPriviliges.sql
UTF-8
5,900
2.59375
3
[]
no_license
/*------------------------------------------------------------------------------ Summary: This file grant common priviliges to MarahWood database user explictly. Prerequests: The database user exists. Parameters: 1 -- The database user that will be granted with. Examples: start MWOra9i2_GrantPri...
true
8f3972e9de0faa1a34beec84592251a6d31657ed
SQL
OlafMd/MedCon1.0
/mmdocconnect-core/MMDocConnectDBMethods/Case/Atomic/Retrieval/SQL/cls_Get_CaseID_for_BullNumber.sql
UTF-8
793
3.6875
4
[]
no_license
Select hec_cas_case_billcodes.HEC_CAS_Case_RefID From hec_bil_billpositions Inner Join hec_bil_billposition_billcodes On hec_bil_billposition_billcodes.BillPosition_RefID = hec_bil_billpositions.HEC_BIL_BillPositionID And hec_bil_billposition_billcodes.Tenant_RefID = @TenantID And hec_bil_billpos...
true
393f34133e34f5a5dd231e9aaaea95947236a87d
SQL
Jungeol/algorithm
/codewars/7kyu/GROCERY_STORE/dongho.sql
UTF-8
189
2.71875
3
[]
no_license
--https://www.codewars.com/kata/5a8eb3fb57c562110f0000a1/train/sql --PostgreSQL 9.6 SELECT id, name, stock FROM products WHERE stock <= 2 AND producent = 'CompanyA' ORDER BY id
true
e0dc1878d4ad0ce6799aac4fe2cfa3b7376e99f5
SQL
adirz/sample-projects
/samle projects/school projects/Databases/ex5/querye.sql
UTF-8
269
3.671875
4
[]
no_license
SELECT DISTINCT cname FROM Contributor WHERE Contributor.cid IN ( SELECT Donated.cid FROM Donated WHERE Donated.donation >= 50000 ) AND Contributor.cid NOT IN ( SELECT Donated.cid FROM Donated WHERE Donated.donation < 50000 ) ORDER BY cname ASC
true
35c96ec7cb70f5e7e364d31abe357210047e1162
SQL
pnakibar/Intergalactic-Breed
/Querys/q10/query10.6.2.sql
UTF-8
177
2.59375
3
[]
no_license
--query10.6.2-- -- quantidade de mensagems que tem mais de 15 caracteres-- SELECT v.id_dono, i.nomeinimigo FROM view62 v INNER JOIN inimigo i ON i.id_inimigo = v.id_dono
true
498b7b9faa940650b552ebe2118336a559c56ea9
SQL
djones01/CHub
/CFG_HRT_PROFILE_RELATION_PK.sql
UTF-8
372
2.625
3
[]
no_license
-------------------------------------------------------- -- DDL for Index CFG_HRT_PROFILE_RELATION_PK -------------------------------------------------------- CREATE UNIQUE INDEX "HCM_ADMIN"."CFG_HRT_PROFILE_RELATION_PK" ON "HCM_ADMIN"."CFG_HRT_PROFILE_RELATION" ("PROFILE_RELATION_ID") PCTFREE 10 INITRANS 2 MAXT...
true
2273de4e5aa2dbadea93a7f50b0aa3fb77b177b4
SQL
Jiwangreal/learn_cpp_with_me
/P116-P121/mysql.sql
GB18030
22,300
4.0625
4
[]
no_license
ڶʮ /*DDL*/ create table t_emp(empno int, ename varchar(20), esex char(2)); alter table t_emp modify ename varchar(30); alter table t_emp drop esex; alter table t_emp add esex char(2); /* DML:һЩ¼ */ insert into t_emp(empno, ename, esex) values(1000, 'tom', 'm'); insert into t_emp values(1000, 'maggie', 'f'); insert in...
true
90a2226ad7168cc5e35b0688b6fcc9f95d383da5
SQL
tagimoucia-cheryl/emap_icnarc
/dbForge/updates/lab_code_update.sql
UTF-8
776
3.234375
3
[ "BSD-3-Clause" ]
permissive
-- Following codes can be used to check and update 'id' for laboratory values -- finding ABG parameters -- as of 16/9/2021; no lab department is specified for ABG values in star.lab_test_defintion -- finding pH SELECT ltd.lab_department, ltd.test_lab_code, ltd.lab_test_definition_id FROM star.lab_test_de...
true
aee5f1de180f28071af7186fd09e899daedc2874
SQL
AliNiitsu93/gbb_dbx_workshops
/notebooks/Users/alzeltov@microsoft.com/GBB_Customer_Workshops/workshop1/labs/sql/01 Databricks Overview.sql
UTF-8
13,848
3.484375
3
[ "Apache-2.0" ]
permissive
-- Databricks notebook source -- MAGIC %md-sandbox -- MAGIC <div style="text-align: center; line-height: 0; padding-top: 9px;"> -- MAGIC <img src="https://cdn2.hubspot.net/hubfs/438089/docs/training/dblearning-banner.png" alt="Databricks Learning" width="555" height="64"> -- MAGIC </div> -- COMMAND ---------- -- MA...
true
267d62850db84779c3a92c502a400dac4b978d18
SQL
longyg/sbms
/sbms-admin/db/sys_login_log.sql
UTF-8
781
3.078125
3
[]
no_license
CREATE TABLE `sys_login_log` ( `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '编号', `user_name` varchar(50) DEFAULT NULL COMMENT '用户名', `status` varchar(50) DEFAULT NULL COMMENT '登录状态(online:在线,登录初始状态,方便统计在线人数;login:退出登录后将online置为login;logout:退出登录)', `ip` varchar(64) DEFAULT NULL COMMENT 'IP地址', `c...
true
48e9884ebadd89a4f9030e7fc6dece47616a30d9
SQL
anasbadawy/LMS-Uni-Website
/database/GRP1.sql
UTF-8
14,939
3.3125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.1 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: Jun 01, 2020 at 11:08 AM -- Server version: 10.4.11-MariaDB -- PHP Version: 7.4.3 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
true
f0291c6be00cb224ddc5759eb1aecf65a70e38b7
SQL
stackcats/leetcode
/database/easy/sales_analysis_ii.sql
UTF-8
312
3.609375
4
[ "MIT" ]
permissive
# Write your MySQL query statement below select product_id, product_name from Product where product_id in (select product_id from Sales where sale_date between 20190101000000 and 20190401000000) and product_id not in (select product_id from Sales where sale_date < 20190101000000 or sale_date >= 20190401000000)
true
2e09a2a20ed58f8ec12acc637c6bb84f17816866
SQL
tlgs/pgexercises
/solutions/7-recursive/3-Produce-a-CTE-that-can-return-the-upward-recommendation-chain-for-any-member.sql
UTF-8
567
4.28125
4
[ "Unlicense" ]
permissive
WITH RECURSIVE rec_chain(member, recommender) AS ( SELECT memid AS member, recommendedby AS recommender FROM cd.members UNION SELECT recs.member, mems.recommendedby AS recommender FROM rec_chain AS recs INNER JOIN cd.members AS mems ON recs.recommender = mems.memid ) SELEC...
true
7369c9760a638c5fcd3e76c96b8df6abe2a2b617
SQL
lcpandcode/bysj
/毕设/eyeappV3.0.sql
UTF-8
5,786
3.328125
3
[]
no_license
# MySQL-Front 5.0 (Build 1.0) /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE */; /*!40101 SET SQL_MODE='STRICT_TRANS_TABLES,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
17c2557ad3b150ac57eec05ca2b843209e6b6f7e
SQL
shanhuashuiqing/PostGIS-Cookbook-Second-Edition
/Chapter10/Code snippets/chp10_R02.sql
IBM852
1,425
3.203125
3
[ "MIT" ]
permissive
--Chapter 10 --Recipe 2 --Step 1. CREATE ROLE group1 NOLOGIN; CREATE ROLE group2 NOLOGIN; CREATE ROLE user1 LOGIN PASSWORD 'pass1' IN ROLE group1; CREATE ROLE user2 LOGIN PASSWORD 'pass2' IN ROLE group1; CREATE ROLE user3 LOGIN PASSWORD 'pass3' IN ROLE group2; --Step 2. GRANT CONNECT, TEMP ON DATABASE chap...
true
24ad6e420f841a9d3c5a9b0ff0ed28b3b6749811
SQL
av-git/supermarket
/supermarkt-api/src/main/resources/db/migration/V0006__cria-tabela-pedido.sql
UTF-8
285
2.53125
3
[]
no_license
CREATE TABLE pedido ( id bigint(20) NOT NULL AUTO_INCREMENT, data_hora datetime NOT NULL, situacao varchar(255) NOT NULL, supermercado_id bigint(20) NOT NULL, PRIMARY KEY (id), FOREIGN KEY (supermercado_id) REFERENCES supermercado(id) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
true
338df01bc2fb14935c6aa98dfcc2ebda5ebc5042
SQL
Manxiong26/prime-group-joins
/joins-solution.sql
UTF-8
1,321
4.625
5
[]
no_license
##Answers -- Get all the customers and their addresses SELECT * FROM customers JOIN addresses ON customers.id = addresses.customer_id; --Get all orders and their line items (orders, quantity and product). SELECT orders, quantity, products FROM line_items JOIN orders ON orders.id = line_items.order_id JOIN products ON...
true
1ff7873e122aae00e7e075aae17d3d4d67de2cf5
SQL
abhivarma/Hackerrank-SQL-Challenges
/Weather Observation Station 19.sql
UTF-8
98
3.078125
3
[]
no_license
select round(sqrt(power(min(lat_n)-max(lat_n),2)+power(max(long_w)-min(long_w),2)),4) from station
true
ab47637a6313ae5b7e162feaf4b7531b93a9d1a0
SQL
Jamesmbean/AMC
/capa all 2 .sql
UTF-8
3,060
3.296875
3
[]
no_license
SELECT IEP_CAPA.IEP_CAPA_ID IEP_CAPA_ID, PHASE_SETTINGS.DISPLAY_NAME PHASE_SETTINGS_DISPLAY_NAME, IEP_CAPA.ETQ$NUMBER IEP_CAPA_ETQ$NUMBER, USER_SETTINGS_1.DISPLAY_NAME USER_SETTINGS_1_DISPLAY_NAME, IEP_CAPA.DATE IEP_CAPA_DATE, SOURCE_1.DESCRIPTION SOURCE_1_DESCRIPTION, IEP_CAPA.SUBJECT_1 IEP_CAPA_SUBJECT_1, IEP...
true
494f366a312a631b2afbbdff3f809b0b1d872977
SQL
rupakraj/reliefproject
/sql/20150503_updates.sql
UTF-8
1,648
3.34375
3
[]
no_license
ALTER TABLE `tbl_areas` CHANGE `location_category` `location_category` INT( 11 ) NOT NULL; ALTER TABLE `tbl_areas` ADD `vdc_mun_id` INT( 11 ) NOT NULL AFTER `district`; ALTER TABLE `tbl_area_req_items` ADD `expected_date` DATE NOT NULL AFTER `quantity` , ADD `priority` INT( 11 ) NOT NULL AFTER `expected_date...
true
2d7164474be1fa912f7bbda7ae2b4cd4b729a435
SQL
its-people/plscope2
/OUGN 2017/00 Create p1 and p2.sql
UTF-8
818
2.875
3
[ "MIT" ]
permissive
ALTER SESSION SET plscope_settings='identifiers:all, statements:all'; create or replace procedure p1 (p_id number, p_name out varchar2) is begin select last_name || ' OUGN' into p_name from employees where employee_id = p_id; select last_name || '' into p_name ...
true
51a450d84023ec32d9ed1d8f77799911f735cc6a
SQL
AlisonAvelino/banco-dados
/criarTabelaPrefeitos.sql
UTF-8
268
3.140625
3
[]
no_license
create table if not exists prefeitos ( id int unsigned not null auto_increment, nome varchar(255) not null, cidades int unsigned, primary key (id), unique key (cidades), foreign key (cidades) references cidades (id) ); select * from prefeitos;
true
c29cb8268fb367ac7c2e0448f50bc9fe6848e79d
SQL
Hwan0808/MySQL
/5장_실습코드.sql
UTF-8
8,524
4.28125
4
[]
no_license
/* 05장 */ USE employees; USE mysql; SELECT * FROM employees; SELECT * FROM titles ; SELECT * FROM employees.titles; SELECT * FROM employees.titles; SELECT * FROM titles; SELECT first_name FROM employees; SELECT first_name, last_name, gender FROM employees; -- 한줄 주석 연습 SELECT first_name, last_name, gender -- 이름과...
true
985f7a5a470722313ec31dfbecbc8a70b8cfd8c4
SQL
acanoenfr/todolist-web-service
/todolist.sql
UTF-8
2,109
3.421875
3
[ "LicenseRef-scancode-unknown-license-reference", "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Hôte : localhost -- Généré le : mer. 27 mars 2019 à 10:00 -- Version du serveur : 10.3.12-MariaDB -- Version de PHP : 7.2.15 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!4010...
true
71643dac9e4748c139fd876a025316cd29f93921
SQL
berrynadia1/MySQL-Week1
/Week 1 MySQL veryeasy:easy.sql
UTF-8
459
2.796875
3
[]
no_license
-- DROP DATABASE cars; CREATE DATABASE cars; USE cars; CREATE TABLE car_type ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, make VARCHAR (255), fav_car VARCHAR (255), model VARCHAR (255), year_made INT ); CREATE TABLE books ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, title VARCHAR (255), publish_date INT, author_n...
true
b658bf6ba64b2bb6200bdf5a512e873a6d5b93bc
SQL
fakumax/SQL-SERVER-2019
/SQL_DML/Serie 4/TP4_6.1 - SQL SERVER.sql
UTF-8
253
2.90625
3
[]
no_license
/*Serie 6 TP*/ --6. Funciones agregadas. --En todos los casos renombrar las columnas obtenidas por función agregada. -- 6.1. Mostrar el promedio de venta anual de todos los títulos USE editorial; SELECT AVG(venta_anual ) AS 'Promedio' FROM titulos
true
5866f0d4b01b45caee0c7949427427dc5c1299f9
SQL
oldfoot/lams
/install/db/mq_detail.sql
UTF-8
384
3.203125
3
[]
no_license
CREATE TABLE `mq_detail` ( `DetailID` int(5) NOT NULL AUTO_INCREMENT, `MQID` int(5) DEFAULT NULL, `Name` varchar(255) DEFAULT NULL, `Value` text, PRIMARY KEY (`DetailID`), KEY `FK_mq_detail` (`MQID`), CONSTRAINT `FK_mq_detail` FOREIGN KEY (`MQID`) REFERENCES `mq_master` (`MQID`) ON DELETE CASCADE ON UPDAT...
true
dd5b663533aa5b46dbd5b88c7da5b2998754eda8
SQL
equipoviajestransparentes/ViajesTransparentes
/DOCUMENTACION BD/Script BD IFAI/ifai_sin_datos.sql
UTF-8
32,089
3.09375
3
[ "MIT" ]
permissive
-- MySQL Script generated by MySQL Workbench -- 09/26/14 18:58:33 -- 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
f4cb5d45c8f0cf67682c550c87d6bfba0af565e9
SQL
omeryounus/Oracle-SQL-Queries
/HCM/10-Otros/3-QueriesFlujosAprobacion/WorkFlow.sql
UTF-8
1,392
3.65625
4
[]
no_license
--Comentarios de workflow de aprobacion con algunos filtros: SELECT TXN_header.module_identifier ProcessName, WT_task.creator Requestor, WT_task.assignees CurrentAssignee, WT_task.assigneddate AssignedDate, WT_task.title NotificationTitle, WT_task.COMPONENTNAME, TXN_data.status TxnStatus, TXN_header.ob...
true
15e36f0127d93bd68c088ac2b3bd8fcd16a1c9c3
SQL
eeuoo/sql
/MySQL/tr_enroll_stu_sub_delete.sql
UTF-8
643
3.71875
4
[]
no_license
-- 내가 작성한 trigger DELIMITER // Create Trigger tr_enroll_stu_sub_delete before delete on Enroll for each row BEGIN delete from Grade where enroll = (select id from Enroll where student = OLD.student and subject = OLD.subject) ; update Student set subjects = subjects - 1 where id = OLD.student ; END // DE...
true
8de7dd9db1ed0ab396870df49249044e040a5a4b
SQL
sbeidao/smallStar
/app_smallstar.sql
UTF-8
1,283
2.921875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 3.3.8.1 -- http://www.phpmyadmin.net -- -- 主机: w.rdc.sae.sina.com.cn:3307 -- 生成日期: 2016 年 09 月 26 日 15:44 -- 服务器版本: 5.6.23 -- PHP 版本: 5.3.3 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS...
true
b79ea41f5c8bd15709235bbb52afef6435d25304
SQL
SelvaAndina/sa
/BD/db_poo.sql
UTF-8
254,920
2.921875
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : LOCAL Source Server Version : 50524 Source Host : 127.0.0.1:3306 Source Database : db_selva Target Server Type : MYSQL Target Server Version : 50524 File Encoding : 65001 Date: 2014-04-20 23:47:04 */ SET FOREIGN_KEY_CHECKS=0; -- ----...
true
e8d0cc325e1cc70e0d1fe8c31353d26ae2eee20b
SQL
olegtaranenko/prsrc
/sql/transdata/slave_stime.sql
WINDOWS-1251
1,413
3.0625
3
[]
no_license
/* procedure change_mat_qty moved to slave_comtex if exists (select '*' from sysprocedure where proc_name like 'change_mat_qty') then drop procedure change_mat_qty; end if; */ if exists (select '*' from sysprocedure where proc_name like 'order_import') then drop procedure order_import; end if; /* cre...
true
f410d54c1718c65fa6a4413524c734f44b2a6238
SQL
jaisonsteephen/HQL
/mySql.sql
UTF-8
382
2.875
3
[]
no_license
create table EMPLOYEE2 ( empid INT NOT NULL auto_increment, first_name VARCHAR(20) default NULL, last_name VARCHAR(20) default NULL, salary INT default NULL, PRIMARY KEY (empid) ); create table employee_address ( ADDID INT NOT NULL auto_increment, ADDRESS VARCHAR(20) default NULL...
true
6eca511ba1d19558b87260b85e3eaf515c609b48
SQL
Absens1/spring-one
/src/main/resources/db/migration/V1__init.sql
UTF-8
791
3.046875
3
[]
no_license
create table products ( id bigserial primary key, title varchar(255), price numeric (8, 2), category_id bigint references categories (id), created_at timestamp default current_ti...
true
13754641f7b9f325ddd62ca3728c29e080e2a988
SQL
erickbaron/TrabalhoFerias
/Repository/Estrutura.sql
UTF-8
1,282
3.515625
4
[]
no_license
CREATE TABLE usuarios ( id INT PRIMARY KEY IDENTITY(1,1), nome VARCHAR (50), login VARCHAR(50), senha VARCHAR(50) ); CREATE TABLE categorias ( id INT PRIMARY KEY IDENTITY(1,1), nome VARCHAR (50) ); CREATE TABLE estados( id INT PRIMARY KEY IDENTITY (1,1), nome VARCHAR (50), sigla VARCHAR (2) ); CREATE TABLE cidades ...
true
36a9b3489cdc051b890feefdd41c9943a730eee4
SQL
qihui1223/node-login-CRDU
/server/data/test.sql
UTF-8
3,264
3
3
[ "MIT" ]
permissive
/* Navicat MySQL Data Transfer Source Server : localhost Source Server Version : 50721 Source Host : localhost:3306 Source Database : test Target Server Type : MYSQL Target Server Version : 50721 File Encoding : 65001 Date: 2018-04-11 10:47:07 */ SET FOREIGN_KEY_CHECKS=0; -- ----...
true
8761fbeaf5dd2bd3d68b1f0de4d70f4d57211cd6
SQL
Achalsancheti/Multimodal-Biometric-Transaction-System
/Query/storedProcedure1.sql
UTF-8
2,987
4.1875
4
[]
no_license
/**Stored Procedure to find highest balance of customer **/ use biometric_project1; create procedure highestCustomerBalance() SELECT c1.firstName as Name, c1.lastName, a1.balance FROM (( customer c1 INNER JOIN customeraccount ac1 ON c1.CustomerId =ac1.customerId) INNER JOIN account a1 ON a1.accountId = ac1.accountId) ...
true
9b8dd8399bf43cf1af5571c822c696d64aa551f5
SQL
abhinandanacharya/bcafood
/bcafood(3).sql
UTF-8
8,996
3.015625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.9.0.1 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: Jun 29, 2020 at 05:04 AM -- Server version: 10.3.16-MariaDB -- PHP Version: 7.3.6 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @O...
true
dfd165da1ee86e53bda1bfe6124d6cdf86c942b2
SQL
greaterarena/resource-mitfiles-mirror
/CSE/II year/IV sem/RDBMS - LAB/week4/3.1.37.sql
UTF-8
167
3.015625
3
[]
no_license
select customer_name from account as b1 natural join depositor where exists (select * from branch where b1.branch_name = 'Downtown' and b1.branch_name='Brighton');
true
b7a8c67000eddcd89b4d37b47fc34dc883b4a29f
SQL
susannapeek1/seisundid_SQL
/Magistritöö/SQL kood kõigile disainidele/Tõeväärtustüüpi_veerud/4.5_D/4.5_D.sql
UTF-8
877
3.1875
3
[]
no_license
START TRANSACTION; DROP TRIGGER t_kontroll_seisundi_vaartuse_ja_aja_muutusele ON tellimus; CREATE TRIGGER t_kontroll_seisundi_vaartuse_ja_aja_muutusele BEFORE UPDATE OF on_ootel,on_tootlemisel,on_valja_saadetud,on_kohale_toimetatud ON tellimus FOR EACH ROW WHEN (NEW.on_ootel<>OLD.on_ootel OR NEW.on_tootlemise...
true
d978a4373047d7d250f623fbcb53f6b33dabce75
SQL
imclab/pnut
/backups/struct_20090331_1032.sql
UTF-8
11,142
3.484375
3
[]
no_license
-- MySQL dump 10.11 -- -- Host: localhost Database: nastya -- ------------------------------------------------------ -- Server version 5.0.67-0ubuntu6 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CON...
true
9d14ca797138529e7375e21bfc6bef3ee4b12380
SQL
AndresLong01/Employee-Tracker-SQL
/database/seed.sql
UTF-8
597
3.078125
3
[ "MIT" ]
permissive
-- Main seeding USE tracker_DB; INSERT INTO department (dep_name) VALUE ("Engineering") ,("Human Resources") ,("Marketing") ,("Sales") ,("Accounting"); INSERT INTO roles (title, salary, department_id) VALUE ("Lead Programmer", 80000.00, 1) ,("Sales Lead", 60000.00, 4) ,("Hiring Manager", 65000.00, 2) ,("Accountant", ...
true
a7af7ea645c9bf0cea16d02f1b9a7a08e501c1de
SQL
Tboy70/Ideologia
/donnees/nf.sql
UTF-8
30,965
3.34375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 3.4.10.1deb1 -- http://www.phpmyadmin.net -- -- Client: localhost -- Généré le : Ven 09 Août 2013 à 22:28 -- Version du serveur: 5.5.32 -- Version de PHP: 5.3.10-1ubuntu3.7 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARA...
true
09143485e7bc1f668b2e3c480710bd47d549eadf
SQL
hanokhaloni/BaseTomeeApp
/Option2/software/gradle/db/2-scouter-init-data.sql
UTF-8
3,608
2.65625
3
[]
no_license
/**** delete_all_data_from_tables ****/ delete from distribution_client; delete from distribution_lists; delete from actions; delete from alerts; delete from media_viewed; delete from media; delete from message_client; delete from clients; delete from ips; delete from messages; /**************************************...
true
d6301d3cdc65022076da959d11fb8e1bdb5a20f9
SQL
ferkopar/ToDoSchema
/ICALENDAR_UTIL_PKG.sql
UTF-8
1,462
2.921875
3
[]
no_license
-------------------------------------------------------- -- DDL for Package ICALENDAR_UTIL_PKG -------------------------------------------------------- CREATE OR REPLACE PACKAGE "ICALENDAR_UTIL_PKG" as /* Purpose: Package handles the iCalendar protocol (RFC 5545) Remarks: see http://en.wikipe...
true
ec94a71138d638d369c10a7578a223603e5ec46d
SQL
MeghabBaral/SQl_Details
/Sql_Important code/SQL-07152020.sql
UTF-8
1,692
4.28125
4
[]
no_license
use classicmodels; SELECT customerName, phone,country, city , creditLimit FROM classicmodels.customers where country='USA' limit 100; SELECT customerName, phone,country, city , creditLimit FROM classicmodels.customers where country='USA' and creditLimit > 100000 limit 100; SELECT customerName, phone,country, city , ...
true
f594b2f5ac07d7ba200634ac2d6ff44995f03e6c
SQL
denizdg/HackerRank-Solutions
/SQL/Basic Select/BasicSelect.sql
UTF-8
1,821
3.984375
4
[]
no_license
--Revising the Select Query I: SELECT * FROM CITY WHERE COUNTRYCODE = "USA" AND POPULATION > 100000 --Revising the Select Query II: SELECT NAME FROM CITY WHERE COUNTRYCODE = 'USA' AND POPULATION > 120000; --Select All: SELECT * FROM CITY; --Select By ID: SELECT * FROM CITY WHERE ID = 1661; --Jap...
true
dc3f8bf1864792d9acf03f23c1e1fa31e3218ff5
SQL
mjtenmat/ATHENA
/sql/delphos_test_1.sql
UTF-8
2,636
2.875
3
[]
no_license
-- Dumping data for table `Fuente` INSERT INTO `Fuente` (`id`, `url`, `fechaActualizacion`, `idPadre`, `documento`, `titulo`, `descripcion`, `idioma`, `error`, `parseada`, `idHost`) VALUES (1, 'http://www.fomento.gob.es', NULL, NULL, 'doc', 'Título 1', NULL, NULL, NULL, 1, 1), (2, 'http://www.minetur.gob.es', NULL, NU...
true
ffdc18173f17d18220913a718411a3a594c7801a
SQL
Kaloyan-Nikolov/Database
/Exercises/Chapter 1/Solutions PC.sql
UTF-8
377
3.46875
3
[]
no_license
USE PC; --1 SELECT MODEL, speed AS MHZ, hd AS GB FROM pc WHERE price < 1200 ; --2 SELECT DISTINCT maker FROM product WHERE type LIKE 'printer'; --3 SELECT model, hd, screen FROM laptop WHERE price > 1000; --4 SELECT * FROM printer WHERE color LIKE 'y'; --5 SELECT model, speed, hd FROM pc ...
true
1b359d977aa2075744545de9c31cf04cbafbe64f
SQL
nuaa-b730401/wa-elder
/backend/wa-elder/src/main/resources/dbname_users.sql
UTF-8
5,713
2.84375
3
[]
no_license
-- MySQL dump 10.13 Distrib 8.0.13, for osx10.13 (x86_64) -- -- Host: localhost Database: db_wa_elder -- ------------------------------------------------------ -- Server version 8.0.13 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS ...
true
cf09de2f50f09bfac0051a48f76aae1c088314ca
SQL
Vladeks/EPAMtask
/task17_DataBase_3/triggers.sql
UTF-8
3,614
3.6875
4
[]
no_license
USE StoredPr_DB; -- employee post relation DELIMITER // create trigger BeforeDelatePost before delete on post for each row begin if exists( select * from employee where employee.post = old.post) then signal sqlstate '45000' set message_text = 'Entries from the table emploee refer to this entry'; end if; e...
true
f4be8e0cf114310979146e9c620c52734dc97ab6
SQL
proller/clickhouse-dev
/dictionaries/strings1.sql
UTF-8
214
2.71875
3
[]
no_license
CREATE TABLE test.strings (id UInt64, str String, dt DateTime DEFAULT now()) engine = Log; INSERT INTO test.strings SELECT number, hex(1000000+number) FROM system.numbers LIMIT 110000; select * from test.strings;
true
03dbc4ac3a0a87adc75da4024af72850e3d29b51
SQL
hoangthevuongvn/SQL_TEST
/7.sql
UTF-8
202
2.9375
3
[]
no_license
ALTER TABLE countries ADD CHECK (country_name != 'Italy' and country_name != 'India' and country_name != 'China'); -- OR ALTER TABLE countries ADD CHECK (country_name IN ('India', 'China', 'Italy'));
true
71653a84cfcdfbd8fcb0548b827a995e58a2ed43
SQL
S0L4/BancoDeDados
/BancosSeparados/SQLQueryT_SStop.sql
UTF-8
862
3.546875
4
[ "MIT" ]
permissive
USE T_SStop SELECT * FROM EstilosMusicais SELECT * FROM EstilosMusicais WHERE IdEst = 1; SELECT * FROM EstilosMusicais WHERE Nome = 'Rock'; SELECT * FROM EstilosMusicais WHERE Nome = 'Roc'; SELECT * FROM EstilosMusicais WHERE Nome LIKE 'Rock'; SELECT * FROM EstilosMusicais WHERE Nome LIKE 'Ro%'; SELECT * FR...
true
49c57dacf88dae11d4a3ecabc1f72bf6e92181a4
SQL
UndertakerW/USBridges-Data-Analysis
/Code/Step2_Construction.sql
UTF-8
7,272
3.078125
3
[]
no_license
drop table if exists bridge_condtion; create table bridge_condtion ( STATE_CODE_001 VARCHAR(50), STRUCTURE_NUMBER_008 VARCHAR(50), YEAR_BUILT_027 VARCHAR(50), RECORD_TYPE_005A VARCHAR(50), DECK_COND_058 VARCHAR(50), SUPERSTRUCTURE_COND_059 VARCHAR(50), SUBSTRUCTURE_COND_060 VARCHAR(50), ...
true
2474c1e5071d29de86c0e884c23f841683a12bfe
SQL
nkarag/oracle_APEX_data_integrity_manager
/code/dimgr_pkg.sql
UTF-8
116,845
3.828125
4
[]
no_license
CREATE OR REPLACE PACKAGE BODY DIMGR.DIMGR_PKG AS PROCEDURE import_table_from_db (tblowner IN VARCHAR2, name IN VARCHAR2, overwrite IN VARCHAR2) IS BEGIN -- 1. merge into tables MERGE INTO DIMGR.TABLES trg ...
true
5798f0d19f96bb3381937b33b106935851c5ffcf
SQL
KrishnaGMohan/Projects-Database
/DrugProductDatabase/DrugProductDatabase/dpd/Tables/QRYM_PHARMACEUTICAL_STD.sql
UTF-8
383
2.78125
3
[]
no_license
CREATE TABLE [dpd].[QRYM_PHARMACEUTICAL_STD] ( [DRUG_CODE] NCHAR (8) NOT NULL, [PHARMACEUTICAL_STD] NVARCHAR (40) NULL, CONSTRAINT [CK_QRYM_PHARMACEUTICAL_STD_DRUG_CODE] CHECK (NOT [DRUG_CODE] like '%[^0-9 ]%'), CONSTRAINT [FK_QRYM_PHARMACEUTICAL_STD_QRYM_DRUG_PRODUCT] FOREIGN KEY ([DRUG_C...
true
972f456eff7ebf999f87dc1392f3fb078d6e0f3a
SQL
Novahot/novapalautukset
/MaulaKannat/dbexport/lib_lainat.sql
UTF-8
1,766
3.015625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.1.6 -- http://www.phpmyadmin.net -- -- Host: magnesium:3306 -- Generation Time: Sep 21, 2018 at 01:08 PM -- Server version: 5.6.15-log -- PHP Version: 5.5.8 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLI...
true
6b6ae87490a92aae010687da9d7197ae67fd1e4f
SQL
parijke/alt-sym
/sql-backup/sym_muehlsee_amenities_types.sql
UTF-8
1,547
2.9375
3
[]
no_license
create table amenities_types ( id int auto_increment primary key, amenities_id int not null, name varchar(255) not null, status tinyint(1) not null, sort smallint not null ) collate = utf8mb4_unicode_ci; INSERT INTO sym_muehlsee.amenities_t...
true
58aa663c91060ce5c193ae0a23cfe71ebf136ce6
SQL
AlejandroArbelaez21/holbertonschool-web_back_end
/0x0C-MySQL_Advanced/5-valid_email.sql
UTF-8
249
3.3125
3
[]
no_license
-- 3 first students in the Batch ID=3 -- because Batch 3 is the best! DELIMITER // CREATE TRIGGER email_validation BEFORE UPDATE ON users FOR EACH ROW BEGIN IF OLD.email <> NEW.email THEN SET NEW.valid_email = 0; END IF; END;// DELIMITER ;
true
e9610da2f8502c6caa4ab53340706fbe0279ae13
SQL
yoonicode/of-DateBase
/006. Table Management[테이블 관리]/column_management_ex1.sql
UTF-8
397
2.84375
3
[]
no_license
ALTER TABLE shoes RENAME COLUMN name TO model; # shoes 테이블의 name 컬럼을 model 컬럼으로 변경 ALTER TABLE shoes MODIFY size DOUBLE NOT NULL; # size 컬럼의 속성을 DOUBLE형 NN으로 변경 ALTER TABLE shoes DROP COLUMN brand; # brand 컬럼 삭제 ALTER TABLE shoes ADD stock INT NOT NULL; # stock 컬럼을 INT형 NN 속성으로 추가 # 체점용 코드 DESCRIBE shoes;
true
3d5b49ad924c737077eb584f8ed4fa9bf138fbe9
SQL
Esh12/comp6210-18b-assn2-Esh12b
/sql/pictures.sql
UTF-8
433
3.015625
3
[]
no_license
use containerdb; DROP TABLE IF EXISTS tbl_pic; Create Table tbl_pic( ID INT(20) AUTO_INCREMENT, IMAGE VARCHAR(25), PRIMARY KEY (ID) ) AUTO_INCREMENT = 1; INSERT INTO tbl_pic(IMAGE) VALUES ('facebook'); INSERT INTO tbl_pic(IMAGE) VALUES ('md_5a9797d083160'); INSERT INTO tbl_pic(IMAGE) VALUES ('instagram'); INSERT IN...
true
4eafbf15628a7e95cb04c6ae7b8c5fbb3f02fd35
SQL
trpn23e/react_practice
/project/subprj/src/main/resources/schema.sql
UTF-8
1,451
3.21875
3
[]
no_license
/* -- 테스트 페이지 호출을 위한 DB 스크립트 (데이터에 아무 의미없음..) resources 디렉토리에 schema.sql, data.sql을 넣어두면 default이름으로 database가 h2로 설정되있을때 자동으로 스크립트를 읽어들인다. */ DROP TABLE IF EXISTS DEMO_TBL; DROP TABLE IF EXISTS MEMO_TBL; CREATE TABLE IF NOT EXISTS MEMO_TBL ( MEMO_KEY IDENTITY PRIMARY KEY, SEQ numeric(18,0) NULL, NOTE v...
true
74a9ed5f4e39816c753dea7b5ce5fecbf32904b1
SQL
CBIIT/onedata-mdr
/xcustomize/JIRA-494_ALS/VW_ALS_CDE_VD_PV_RAW_DATA.sql
UTF-8
1,381
3.640625
4
[]
no_license
select DE.ITEM_ID CDE_ID, DE.VER_NR CDE_VERSION, CDE.ITEM_NM CDE Long Name, ref.ref_desc Preferred_Question, VD.ITEM_NM VD_Long_Name, VALUE_DOM.ITEM_ID VD_ID, VALUE_DOM.VER_NR VD_VERSION, VALUE_DOM.VAL_DOM_MAX_CHAR , VALUE_DOM.VAL_DOM_HIGH_VAL_NUM VD_Maximum_Length, FMT.FMT_NM VD_Display_Format, PERM_VAL.PE...
true
1804971e588e1a3b778e5351f6a78c91c7e80130
SQL
xpardo/bongust
/Bon_gust/xpardo_botigaonline.sql
UTF-8
20,020
3
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.1.0 -- https://www.phpmyadmin.net/ -- -- Servidor: localhost -- Temps de generació: 21-05-2021 a les 18:30:30 -- Versió del servidor: 5.7.33-0ubuntu0.16.04.1 -- Versió de PHP: 7.4.13 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET ...
true
7704b998f19624bdcc707e1f0c0b522a323b7259
SQL
srijanshetty/by-elections
/localhost.sql
UTF-8
3,124
2.8125
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 3.4.10.1deb1 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Sep 07, 2014 at 02:46 AM -- Server version: 5.5.38 -- PHP Version: 5.5.16-1+deb.sury.org~precise+1 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIE...
true
0724b1942d57e8181540689c1c8c690c7d98ce6d
SQL
sogis/gretljobs
/avt_strassenlaerm/transform_immission_strasse_pointofdetermination.sql
UTF-8
3,182
3.546875
4
[ "MIT" ]
permissive
WITH evaluation_exposure_limit_value AS ( SELECT t_id, CASE WHEN min_exposure_limit = 1 THEN 'Alarmwert überschritten' WHEN min_exposure_limit = 2 THEN 'Immissionsgrenzwert überschritten, Alarmwert eingehalten' WHEN min_exposure_limit = 3 THEN 'Planungswert übe...
true
5501ac1ef31958a3d1f2cb3d39cc7b8dad4140f7
SQL
johndimm/SurfingMint
/db/load_transactions.sql
UTF-8
1,016
3.515625
4
[]
no_license
# # Load the transactions.csv file downloaded from Mint # into a table of strings. # drop table if exists mint_incoming; create table mint_incoming ( `Date` varchar(255), `Description` varchar(255), `Original Description` varchar(255), `Amount` varchar(255), `Transaction Type` varchar(255), `Category` varch...
true
b23b65dc8a0f27fdf220992875386e5244520bb5
SQL
cjuber/sql-2-afternoon
/project.sql
UTF-8
4,473
3.921875
4
[]
no_license
-- Joins --1. select * from invoice inv join invoice_line invline on invline.invoice_id = inv.invoice_id where unit_price > .99; --2. select i.invoice_date, c.first_name, c.last_name, i.total from invoice i join customer c on i.customer_id = c.customer_id; --3. select c.first_name, c.last_name, e.first_name, e.last...
true
47256b64d1a4acb95ceae17e1364dea461f5ade6
SQL
Adrish1999/SQL-Database-Management-System
/Day-07 SQL Clauses/Database-01/Create_rating.sql
UTF-8
239
2.890625
3
[]
no_license
CREATE TABLE `rating` ( `MOV_ID` INT(10) NOT NULL, `REV_STARS` INT(10) NOT NULL, PRIMARY KEY (`MOV_ID`) USING BTREE, CONSTRAINT `FK2` FOREIGN KEY (`MOV_ID`) REFERENCES `movie`.`movies` (`MOV_ID`) ON UPDATE NO ACTION ON DELETE NO ACTION );
true
77bf22cf23e39632a51fec4a8284ccf0841a3b4f
SQL
Chizaram-Igolo/agro-loan
/database_backup/_db - Copy.sql
UTF-8
3,591
3.046875
3
[]
no_license
CREATE TABLE IF NOT EXISTS user ( `user_id` BIGINT(20) NOT NULL AUTO_INCREMENT PRIMARY KEY, `username` VARCHAR(30) NOT NULL, `email_address` VARCHAR(750) NOT NULL, `password` VARCHAR(75) NOT NULL, `salt` VARCHAR(75) NOT NULL, `sign_up_date_UTC` VARCHAR(25) NOT NULL, `sign_up_ip` VARCHAR(20) NOT NULL, `l...
true
d2f75e7aa32e30810784a2f3e71ed2a0a6d951cf
SQL
tauraloke/simplest-auth
/seed.sql
UTF-8
1,407
2.875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 3.5.1 -- http://www.phpmyadmin.net -- -- Хост: 127.0.0.1 -- Время создания: Июл 10 2015 г., 23:31 -- Версия сервера: 5.5.25 -- Версия PHP: 5.3.13 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!4010...
true
6a040a1ed961a455edbbe079d883b2d4f8dc3a26
SQL
adnshr/nextgen
/SQL/DBUpgrade/Oracle/UpgradeDB_To_v1.2.sql
UTF-8
602
2.515625
3
[]
no_license
/** This table is to support WUSTL Key migration */ CREATE TABLE csm_migrate_user ( LOGIN_NAME varchar2(100 Byte) NOT NULL, TARGET_IDP_NAME varchar2(100 Byte), WUSTLKEY varchar2(100 Byte) default NULL UNIQUE, MIGRATION_STATUS varchar2(100 Byte) NOT NULL, primary key (LOGIN_NAME) ); /*Added for removing the unhook...
true
6237d76e691164fe5988d440539002bb64aad479
SQL
SOLA-LESOTHO/database_lesotho
/extension/SamoaExamples/samoa_users_roles.sql
UTF-8
28,948
3.171875
3
[]
no_license
-- Security Role Configurations -- Samoa specific Roles INSERT INTO system.approle (code, display_value, status, description) SELECT 'ApplnNr', 'Set Application Number', 'c', 'Set application number to match number allocated by LRS' WHERE NOT EXISTS (SELECT code FROM system.approle WHERE code = 'ApplnNr'); INSERT I...
true
3dcddc057617fd6fd4156164d8c6fa50261e0df4
SQL
bellmit/origin
/family_order/sql/TD_S_BIZTRANS/SEL_BY_BIZTRANS.sql
UTF-8
168
2.84375
3
[]
no_license
--IS_CACHE=Y SELECT A.*,B.TRANS_NAME FROM TD_S_BIZTRANS A,TD_S_TRANSLIST B WHERE A.TRANS_CODE = B.TRANS_CODE AND A.BIZ_CODE = :BIZ_CODE AND A.TRANS_CODE = :TRANS_CODE
true
d8d69d48a129b7441d5a1f4aae8cedc4aae19984
SQL
VirginiaNdungu/Nish
/tradr_gsoko(3).sql
UTF-8
118,272
3.0625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Jan 17, 2017 at 09:22 AM -- Server version: 10.1.9-MariaDB -- PHP Version: 5.6.15 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLI...
true
38d3eee0c4b7230421849754e3a6bb4ca31755ac
SQL
chandlergregg/eurocup-2016
/sql_q5.sql
UTF-8
180
3.015625
3
[]
no_license
/* * 5. Write a SQL query to find the number of bookings that happened in stoppage time. */ select count(*) as ST_booking_count from player_booked where play_schedule = 'ST';
true
49bef46f495dd37ec54f059457c2bb1cdf314c91
SQL
AndreiLisiutin/FRI3NDS.Angular4Template
/FRI3NDS.Angular4Template.Data/Scripts/Migrations/0_0_1_Admin$CreateTables.sql
UTF-8
1,467
3.640625
4
[]
no_license
-- Процедура создания сущностей для администрирования пользователей в БД. CREATE TABLE public._entity ( _entity_id SERIAL, name text NOT NULL, db_name text NOT NULL, db_scheme text, CONSTRAINT _entity_pkey PRIMARY KEY (_entity_id), CONSTRAINT _entity_db_name_key UNIQUE (db_name) ); CREATE TABLE publi...
true
8048a8d448a5b7c0fd78b0fa2672e22c9f026884
SQL
nuannuanwu/qtxiaoxin
/protected/data/procedure/user_center/php_xiaoxin_GetUserByAttributes.sql
UTF-8
616
3.296875
3
[]
no_license
DELIMITER $$ USE `user_center`$$ DROP PROCEDURE IF EXISTS `php_xiaoxin_GetUserByAttributes`$$ CREATE DEFINER=`dbManager`@`%` PROCEDURE `php_xiaoxin_GetUserByAttributes`(p_attr VARCHAR(64), p_type VARCHAR(16),p_role INT) BEGIN -- 根据account获取用户 IF (p_type = 'mobilephone') THEN SELECT * FROM tb_user WHERE mobilepho...
true
68a9742b6a995957593c3cd94d2b9813ba740d8a
SQL
MisbahKhan789/Stack-Overflow-Statistical-Analysis
/Queries/QuestionsQueryReputation.sql
UTF-8
306
3.921875
4
[]
no_license
SELECT u.id, u.display_name as name, u.reputation, p.id, p.answer_count, p.comment_count, p.score, p.view_count, p.tags FROM users u LEFT JOIN posts p ON p.owner_user_id = u.id WHERE p.post_type_id = 1 GROUP BY u.id, u.display_name, u.reputation, p.id ORDER BY u.reputation DESC
true
a5fe3108e043dbc7b6dde2566aae9307deccb410
SQL
EddyeBoy27/queries-unite
/desafios/desafio3.sql
UTF-8
666
3.40625
3
[]
no_license
-- Desafio 3 - Altere a tabela clone_troopers -- Faça as seguintes alterações na tabela clone_troopers: -- Adicione a coluna nickname, que deve ser do tipo VARCHAR(50), não nulo; -- Altere a coluna current_age, de forma que seu tipo passe a ser TINYINT; -- Altere o nome da coluna full_name para origin_name e garanta qu...
true
50113334600d01fede725be691284005fae26817
SQL
RafhaHarada/Entra21-2018
/MySQL_exemplos/exemplo01/10.sql
UTF-8
402
3.375
3
[]
no_license
-- Soma os registros da coluna preço SELECT SUM(preco) FROM gordices; -- Média os registros da coluna preço SELECT AVG(preco) FROM gordices; -- Retorna o registro com o menor preço SELECT nome, MIN(preco) FROM gordices WHERE preco = (SELECT MIN(preco) FROM gordices); -- Retorna o registro com o maior preço SELECT no...
true
5d56e6f5d4fa7eb59b1c2c533e7c2491110c30a9
SQL
carmenbuta90/quizzer
/quizzer.sql
UTF-8
2,195
3.0625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Sep 13, 2016 at 10:36 AM -- Server version: 10.1.13-MariaDB -- PHP Version: 5.6.23 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CL...
true
cb721208b092da8cc191a500787df3cfe394aed9
SQL
johnehunt/SQLIntro
/lab-solutions/lab4-table-and-data-maintenance.sql
UTF-8
997
3.703125
4
[ "Apache-2.0" ]
permissive
USE trading; DROP TABLE IF EXISTS companies; -- Step 1 Create Company Table CREATE TABLE companies ( id INT NOT NULL, name VARCHAR(255) NOT NULL, url VARCHAR(255) NOT NULL, PRIMARY KEY (id) ); -- Insert Data into table INSERT INTO companies VALUES (1,'PymCo','www.pymco.com'), (2,'Stand Co','www.stand...
true