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
c0a92281d11f6f64de8f0008088c686349ab0f77
SQL
college-design/school-demo
/MessageBoard/html/data.sql
UTF-8
1,399
2.984375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 3.2.0.1 -- http://www.phpmyadmin.net -- -- 主机: localhost -- 生成日期: 2015 年 06 月 10 日 07:56 -- 服务器版本: 5.5.8 -- 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=@@CHARACTER_SET_R...
true
3eeb1b4352d286f268edfc995ecd6cc7402d938f
SQL
git-jendro/sistempakartulang
/database/tulang.sql
UTF-8
6,341
2.859375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: Jun 25, 2019 at 10:39 AM -- Server version: 10.1.38-MariaDB -- PHP Version: 7.1.27 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OL...
true
94a8bd70df4f91cccf6529728f29ca5871db11d4
SQL
anacollado/mvp
/schema.sql
UTF-8
294
2.953125
3
[]
no_license
CREATE DATABASE IF NOT EXISTS vanity; USE vanity; CREATE TABLE products ( productId int NOT NULL AUTO_INCREMENT, brand VARCHAR(100) NOT NULL, productName VARCHAR(150) NOT NULL, notes VARCHAR(1000), datePurchased DATETIME, amountRemaining int NOT NULL, PRIMARY KEY (productId) );
true
36c7c7a96e53ef6c2cf90b205365050542c57525
SQL
silence-do-good/stress-test-Postgres-and-MySQL
/dump/low/day26/select1714.sql
UTF-8
262
2.96875
3
[]
no_license
SELECT sen.name FROM SENSOR sen, SENSOR_TYPE st, COVERAGE_INFRASTRUCTURE ci WHERE sen.SENSOR_TYPE_ID=st.id AND st.name='WiFiAP' AND sen.id=ci.SENSOR_ID AND ci.INFRASTRUCTURE_ID=ANY(array['6132','2231','6044','1423','2038','1403','3069','2061','4091','5221'])
true
dcdae577b2c22e41bc29ff32a8d60c1a8e0b459d
SQL
detrout/htsworkflow
/encode_submission/entex-recursive.sql
UTF-8
1,374
3.5
4
[ "BSD-3-Clause" ]
permissive
-- \pset format unaligned -- \pset fieldsep '\t' with recursive gtex as ( select distinct uri as Donor, substring(jsonb_array_elements_text(payload->'aliases'), '([a-zA-Z0-9]+):') as AliasPrefix from item where object_type = 'HumanDonor' ), biosample(uri, payload, parent_of, part_of, d) as ( ...
true
da7d24d916b923b560e4d2b0aeb7826781ff1e30
SQL
SPDEVGUY/VotingInfoWebsite
/VotingInfo/Database/SQL/Alter/09-DefaultData/Auth/02-Role.sql
UTF-8
635
3.390625
3
[ "MIT" ]
permissive
IF NOT EXISTS(SELECT * FROM [Auth].[Role]) BEGIN INSERT INTO [Auth].[Role] ([Title] ,[Description] ,[IsActive] ,[ApplyToAnon] ,[ApplyToAllUsers] ,[PreventAddingUsers]) SELECT 'Security Admins' ,'A role for the security admin user.' ,...
true
6ba132bf627112526d332c927d5b53268da577a8
SQL
RyanCrowleyCode/sqlforbeginners
/uniqueConstraints.sql
UTF-8
418
3.703125
4
[]
no_license
USE test; -- How to add a unique constraint to a column ALTER TABLE <tablename> ADD CONSTRAINT <constraintname> UNIQUE (<columnname>); -- How to remove a unique constraint from a column -- This means that the column must have unique values. ALTER TABLE <tablename> DROP INDEX <constraintname>; SELECT * FROM pets; A...
true
08e51406466be1b9a5664f968618d8a7d9a85cff
SQL
bnastov/ThesaurusSport
/Thesaurus/test1.1.sql
MacCentralEurope
3,821
3.265625
3
[]
no_license
-------Thesaurus insert into Thesaurus values('sport'); -------Concept insert into Concept values('sport de balle',(select ref(i) from thesaurus i where nom='sport'),null); insert into Concept values('sport collectif',(select ref(i) from thesaurus i where nom='sport'),null); -----Terme insert into Terme values('sport...
true
1c9f8100505fb4b04109d26d0e6c73f11fe4f0f4
SQL
whitefly/Sql-LeetCode
/Q1398_customers_who_bought_products_a_and_b_but_not_c.sql
UTF-8
298
3.515625
4
[]
no_license
-- 组内分开统计即可 select o.customer_id, any_value(c.customer_name) as customer_name from Orders3 o join Customers2 c on o.customer_id = c.customer_id group by o.customer_id having sum(product_name = 'A') > 0 and sum(product_name = 'B') > 0 and sum(product_name = 'C') = 0
true
4650824fa1e974acee00a4c72f68041f44823810
SQL
pavel6767/algorithm-practice
/HackerRank/MySQL/easy.sql
UTF-8
2,732
4.25
4
[]
no_license
------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------- -- CITY ------------------------------------------------------...
true
9ca0264ba95e63ddc277fa281e00b6e6ec2053cd
SQL
HedayatAbedijoo/Framework-Workflow-Foundation-3.5-Employment-System-Demo
/wftools - for - Oracle - MySql - services/Branches/0.3.0.0/DB/Tracking/MySql/StoredProcedures/GetCurrentDefaultTrackingProfile.sql
UTF-8
348
2.609375
3
[]
no_license
DELIMITER $$ DROP PROCEDURE IF EXISTS GetCurrentDefaultTrackingProfile $$ /* * Retrieve the current default tracking profile. */ CREATE PROCEDURE GetCurrentDefaultTrackingProfile() BEGIN SELECT VERSION ,TRACKING_PROFILE_XML FROM DEFAULT_TRACKING_PROFILE ORDER BY INSERT_DATE_TIME DESC, VERSION DESC LIM...
true
a0ab2eddb5cee3bfdf0b5b305d417f171bd1a8ce
SQL
akansha2718/shoping-portal
/database/address.sql
UTF-8
1,085
3.09375
3
[]
no_license
Server: localhost - Database: shopping portal - Table: address_detail -- phpMyAdmin SQL Dump -- version 3.1.3 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Nov 22, 2019 at 10:22 AM -- Server version: 5.1.32 -- PHP Version: 5.2.9 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; -- -- Database: `shoppi...
true
50680c7693918fbb19501df0bde02bfba29e15e2
SQL
cerneigabriel/coleage_projects
/tp8/php/varzari/quiz.sql
UTF-8
2,742
3.28125
3
[]
no_license
CREATE DATABASE quiz_varzari; USE quiz_varzari; CREATE TABLE input_types ( id int NOT NULL AUTO_INCREMENT, name varchar(255) NOT NULL, PRIMARY KEY (id) ); CREATE TABLE questions ( id int NOT NULL AUTO_INCREMENT, question varchar(500) NOT NULL, input_type_id int NOT NULL, PRIMARY KEY (id) )...
true
9dfad942cc6263267a3bce6ea7c8f733bacdeb2e
SQL
alliswell008/Alliswell
/JavaWeb/testspringboot/src/main/resources/dev/import.sql
UTF-8
1,255
3
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : localhost Source Server Version : 50515 Source Host : localhost:3306 Source Database : shop Target Server Type : MYSQL Target Server Version : 50515 File Encoding : 65001 Date: 2017-10-03 20:18:38 */ SET FOREIGN_KEY_CHECKS=0; -- ----...
true
ff184624119819157ed9b9a0cf94326ccbb69637
SQL
CityofToronto/bdit_volumes
/volume_project/estimation_extraction/query_monthly_factors.sql
UTF-8
1,407
4.0625
4
[]
no_license
-- Columns to Replace: place_holder_identifier_name - identifier_name SELECT place_holder_identifier_name, dir_bin, y, array_agg(month_weight ORDER BY m) AS month_weight FROM( SELECT place_holder_identifier_name, dir_bin, y, m, avg_daily_volume/SUM(avg_daily_volume) OVER (PARTITION BY place_holder_identifier_name, d...
true
a32e2c72870091dafb8fac5bfeba7bf106771fc2
SQL
silence-do-good/stress-test-Postgres-and-MySQL
/dump/high/day11/select0403.sql
UTF-8
178
2.546875
3
[]
no_license
SELECT timeStamp, temperature FROM ThermometerOBSERVATION o WHERE timestamp>'2017-11-10T04:03:00Z' AND timestamp<'2017-11-11T04:03:00Z' AND temperature>=10 AND temperature<=52
true
c64ab3804218795a881441051595dc228cbe1b86
SQL
GFZ-Centre-for-Early-Warning/REM_optimized_routing
/pgr_examples1.sql
UTF-8
2,964
3.71875
4
[]
no_license
------------------------------------------------------------------------------------------------------------------------------ --PGROUTING: 1. create routable streetnetwork -- 2. create route stops from sample points -- 3. order stops using TSP based on street length (with custom costmatrix) -- 4. compu...
true
e87628b6a206908047e3d9523442c0ee5211a390
SQL
renzheyu/DSSG19-WMCA-PUBLIC
/sql/create_model_trips.sql
UTF-8
581
3.765625
4
[ "MIT" ]
permissive
DROP TABLE if exists model.trips{suffix}; CREATE TABLE model.trips{suffix} AS ( SELECT row_number() over () as trip_id, oa_id, poi_id, date, time, 0 AS computed FROM model.k_poi{suffix} CROSS JOIN model.timestamps{suffix} ); ALTER TABLE model.trips{suffix} A...
true
481daee471ea0ff10fc0c078b04dff36cd4f0c3d
SQL
Battery233/DBS-PostgreSQL
/CW1/05.sql
UTF-8
137
2.6875
3
[]
no_license
select custid, cname, odate from customers C,(select max(odate) AS odate, ocust from orders group by ocust) AS O where custid = ocust ;
true
672951c0968234c89b0844606a3aa5f8b8b4ce2d
SQL
MarwaMourad15/elgouna
/elgouna-server_old/Database/4_venues_table.sql
UTF-8
1,036
2.578125
3
[]
no_license
CREATE TABLE IF NOT EXISTS `venues` ( `id` mediumint(20) NOT NULL AUTO_INCREMENT, `name` VARCHAR(100) NOT NULL, `type` VARCHAR(15) NOT NULL, `location` VARCHAR(200) NOT NULL, `longitude` DOUBLE(10,2) NOT NULL, `latitude` DOUBLE(10,2) NOT NULL, `reviewScore` DOUBLE(3,2) NOT NULL, `ratingStar` tinyin...
true
8fa4bd7f90ed9e7f03da4eba91a1b01188c375bb
SQL
suchuhong/web_weibo
/src/create_table.sql
UTF-8
1,204
3
3
[]
no_license
CREATE TABLE `web`.`weibo` ( `id` int(11) NOT NULL AUTO_INCREMENT, `content` varchar(45) NOT NULL, `userId` int(11) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB; CREATE TABLE `web`.`comment` ( `id` int(11) NOT NULL AUTO_INCREMENT, `content` varchar(45) NOT NULL, `weiboId` int(1...
true
40acda069ba2d32eec92881a67b549ba510e9cb8
SQL
ousophea/student-attendance
/db_backup/db_saa_1.sql
UTF-8
5,661
2.90625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 2.11.6 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Jan 27, 2012 at 07:51 AM -- Server version: 5.0.51 -- PHP Version: 5.2.6 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_...
true
727958633561ab2a0c7099428b1e9e0460080258
SQL
sophiemw898/Algorithm_Basic
/DataBase/601. Human Traffic of Stadium.sql
UTF-8
987
3.78125
4
[]
no_license
# Write your MySQL query statement below select distinct t1.* from stadium t1, stadium t2, stadium t3 where t1.people >= 100 and t2.people >= 100 and t3.people >= 100 and ( (t1.id - t2.id = 1 and t1.id - t3.id = 2 and t2.id - t3.id =1) -- t1, t2, t3 or (t2.id - t1.id = 1 and t2.id - t3.id = 2 and t1.id - t3...
true
2abf975ef9494919d621a429cb5a47ae2eb391e2
SQL
seoul-ssafy-class-2-studyclub/hyeonhwa
/programmers/sql_kit/sum_max_min.sql
UTF-8
323
3.359375
3
[]
no_license
-- 최댓값 구하기 SELECT DATETIME from ANIMAL_INS order by DATETIME desc limit 1; -- 최솟값 구하기 SELECT DATETIME FROM ANIMAL_INS ORDER BY DATETIME ASC limit 1; -- 동물 수 구하기 SELECT count(*) FROM ANIMAL_INS; -- 중복 제거하기 SELECT count(distinct NAME) FROM ANIMAL_INS where NAME is not null;
true
dad6d9458cf88017507a925748af40ffbff62ea9
SQL
QUANWEIRU/ErpOracleLibrary
/get org id of asset.sql
UTF-8
487
3.390625
3
[]
no_license
select fd.ASSET_NUMBER, b.org_id, gcc.segment1, gcc.concatenated_segments, t.* from FA.FA_DISTRIBUTION_HISTORY t, fa_additions fd, gl_code_combinations_kfv gcc, fpt_branches_v b where 1 = 1 and t.asset_id = &p_asset_id and b.org_id = ...
true
48d29db57737eb741a66bf5226f76a363c97bc6b
SQL
fuhuaxuan/prehoa
/触发器和脚本/P_PrlDZ_Pay_doPay_出纳付款.sql
GB18030
10,057
3.046875
3
[]
no_license
create or replace procedure P_PrlDZ_Pay_doPay(p_EntGid varchar2, --ҵGid p_ModelGid varchar, --ģGid p_ModelCode varchar2, --ģʹ p_FlowGid varchar, --Gid ...
true
a279ca3f43038883e0c3df865d23f5cd04faf3a8
SQL
cdesmarais/WebDB-Test
/WebDB/StoredProcedures/Common/dbo.Admin_User_BlackList.PRC
UTF-8
4,222
3.9375
4
[]
no_license
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Admin_User_BlackList]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) drop procedure [dbo].[Admin_User_BlackList] GO -- -- Proc for Blacklisting a user account -- (calls dbo.Admin_User_ChangeStatus) -- TT 26788 mmc WR2008_11 create procedure dbo.Admin...
true
fed4b117ffc3a955920c0d4825aad4b41bd63a9c
SQL
femaimi9527/SpringBoot-Merge
/merge/src/main/resources/db/sys_role.sql
UTF-8
304
2.734375
3
[]
no_license
CREATE TABLE `sys_role` ( `role_id` int(11) NOT NULL AUTO_INCREMENT COMMENT '角色ID', `role_code` varchar(255) NOT NULL COMMENT '角色编码', `role_name` varchar(255) NOT NULL COMMENT '角色名称', PRIMARY KEY (`role_id`) ); INSERT INTO `sys_role` VALUES ('1', 'ROLE_ADMIN', '管理员');
true
0225bb64d5ab5999473a1fde2772d32aa32698e5
SQL
boltonmark/dev
/SQL/BMI.BI/BMI_BAT_MAN.tests/IcsApp-Tests/test MappingConfigTaskGetCurrentRunIds calls ExceptionHandler on error.sql
UTF-8
622
2.6875
3
[]
no_license
CREATE procedure [IcsApp-Tests].[test MappingConfigTaskGetCurrentRunIds calls ExceptionHandler on error] as begin exec tSQLt.SpyProcedure @ProcedureName = N'log4.ExceptionHandler'; select cast('Failed to output current run Ids for MCT Name: NULL at step: [Validate Inputs]' as varchar(max)) as [ErrorContext] ...
true
0a819a06161b3778a24e3158527d08d0e9f1ae07
SQL
Koutha/DIRDEUPTAEB
/BD_DIRDEUPTAEB_27-04-2018.sql
UTF-8
59,758
2.921875
3
[]
no_license
-- -- PostgreSQL database dump -- -- Dumped from database version 10.1 -- Dumped by pg_dump version 10.1 SET statement_timeout = 0; SET lock_timeout = 0; SET idle_in_transaction_session_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings = on; SET check_function_bodies = false; SET client_min_m...
true
b391a3fcbc476c3f2d8741289a37ae1e1df6af27
SQL
xiaopapasoftware/rms
/db/gen/jeesite_mssql.sql
UTF-8
2,618
3.5
4
[]
no_license
/* Drop Tables*/ DROP TABLE gen_scheme; DROP TABLE gen_table_column; DROP TABLE gen_table; DROP TABLE gen_template; /* Create Tables */ CREATE TABLE gen_scheme ( id varchar(64) NOT NULL, name varchar(200), category varchar(2000), package_name varchar(500), module_name varchar(30), su...
true
c5a454aecd160a762e679bd1fa9efeda89ee74c3
SQL
ariqmuh/sql-journey
/sql-exercise/1.sql
UTF-8
219
2.875
3
[]
no_license
show databases; use sakila; show tables; -- From "payment" table, show 10 first row data of customer_id, rental_id, amount, and payment_date select customer_id, rental_id, amount, payment_date from payment limit 10;
true
46d11c8bef2bf506830d8ec6857eb8e887ea0723
SQL
the-third-brother/edoc
/sql/edoc_category.sql
UTF-8
955
2.59375
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : 94.191.68.55 Source Server Version : 50642 Source Host : 94.191.68.55:3306 Source Database : ssm Target Server Type : MYSQL Target Server Version : 50642 File Encoding : 65001 Date: 2018-12-14 17:25:02 */ SET FOREIGN_KE...
true
d17433217f2859ab4d02bf8d034a4a1a32f4ad20
SQL
yanyongjiang/products
/org/src/com/yyj/apps/work/model/listWorkTree.sql
UTF-8
470
3.0625
3
[]
no_license
select date_format(fldngtime,'%Y') as name, 'true' as isParent from Orgwork where 1=1 and ((state is null or (state!='1' and state!='2'))) <#if initunitid??> and initunitid = '${initunitid}' </#if> <#if showAll??> <#else> and EXISTS (select * from Orgauth wher...
true
4eb2df8447f98751d07f57b427bc153765c7ef58
SQL
stardog-union/stardog-examples
/examples/virtual/optimization/06functions.sql
UTF-8
1,330
3.5625
4
[ "Apache-2.0" ]
permissive
CREATE DATABASE IF NOT EXISTS examples; USE examples; DROP TABLE IF EXISTS Remakes; CREATE TABLE Remakes(id INTEGER, title VARCHAR(40) NOT NULL, release_year INTEGER NOT NULL, PRIMARY KEY (id), KEY (title, release_year)); ...
true
f198aa78949affd18f82b13a3b2a191a3575f81b
SQL
wangchao550586585/codegen
/db/test.sql
UTF-8
1,433
3
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : localhost Source Server Type : MySQL Source Server Version : 80022 Source Host : localhost:3306 Source Schema : test Target Server Type : MySQL Target Server Version : 80022 File Encoding : 65001 Date: 21/11/2020 18:14:5...
true
589853a6e6c36b646f8f86bf3318224220d3e0d1
SQL
TolikChe/NoSqlAttrValues
/ora/jclassNoSqlAPI.sql
WINDOWS-1251
13,696
3.296875
3
[]
no_license
DROP JAVA SOURCE "NoSqlAPI"; CREATE OR REPLACE AND RESOLVE JAVA SOURCE NAMED "NoSqlAPI" as import oracle.kv.*; import java.sql.*; import java.lang.*; import java.math.*; import java.io.*; import oracle.sql.*; import java.util.*; import java.sql.ResultSet; import oracle.jdbc.driv...
true
37302fdbd33787d1a9e37a607e9a7f9c30163f3b
SQL
AliomarADI/NOTEBOOK_JAVA_EE
/target/classes/db/migration/V2_create_notebooks.sql
UTF-8
231
2.59375
3
[]
no_license
create table notebooks ( user_id integer not null, id serial not null constraint notebooks_pk primary key, title varchar, text varchar ); alter table notebooks owner to postgres;
true
8c2428bac6039b7320e22c48fb90162daf5fba34
SQL
LY17java8-dukankgkang/17Java8
/04 SQLServer2005基础/第6章 课程设计/上机作业/17033041628都康康/SQL添加数据.sql
GB18030
3,867
3.734375
4
[]
no_license
-- 鿴Ʒ(Category) select*from Category -- 鿴ƷϢWare select*from Ware -- 鿴ԱEmployee select*from Employee -- 鿴ۼ¼ SalesInfo select*from SalesInfo --Ʒ insert into Category (cname,Description)values('ʳ','ʳ') insert into Category (cname,Description)values('ҵ','') insert into Category (cname,Description)values('װ','...
true
8c9bfcb0075535f394799020edbd32fb627bd551
SQL
IliaIliev94/SoftUni-Work
/C# MS SQL/Subqueries and Joins Exercise/07. Employees with Project.sql
UTF-8
276
4.15625
4
[]
no_license
SELECT TOP(5) e.EmployeeID, e.FirstName, p.[Name] AS ProjectName FROM Employees e INNER JOIN EmployeesProjects ep ON e.EmployeeID = ep.EmployeeID INNER JOIN Projects p ON ep.ProjectID = p.ProjectID WHERE p.StartDate > '2002-08-13' AND p.EndDate IS NULL ORDER BY e.EmployeeID
true
cd16dd1eb3fe9a681f5ea311231062d2abe8a78e
SQL
kimsato1034/SID_AKI-study
/analysis/sql/pasthistory.sql
UTF-8
1,175
3.5
4
[]
no_license
-- this query extracts Past medical history for evey patientunitstayid SELECT patientunitstayid , MAX(CASE WHEN REGEXP_CONTAINS(LOWER(pasthistoryvaluetext), '(congestive heart failure|chf)') THEN 1 ELSE 0 END) AS pasthistory_chf , MAX(CASE WHEN REGEXP_CONTAINS(LOWER(pasthistoryvaluetext), '(peripheral vascular d...
true
ec8e3cc45c6541c0ca006383ce42c74625d7e191
SQL
kahija/videoflix-database
/sql/normal-level/18.sql
UTF-8
470
4.03125
4
[]
no_license
-- 18 - Écrire une requête qui retourne tous les films -- avec l'année de sortie, l'année de production -- et le(s) genre(s). SELECT YEAR(m.released_at) as released_at, m.year, m.title, GROUP_CONCAT(g.type separator ', ') FROM movie m INNER JOIN movie_genre mg ON mg.movie_id = m.id INNER JOIN gen...
true
6c0321767e6746f6c75fe684149419898d4a68fb
SQL
partikus-archive/shoutbox-app
/docker/mariadb/schema.sql
UTF-8
292
2.8125
3
[ "MIT" ]
permissive
CREATE TABLE messages ( `id` VARCHAR(36) NOT NULL PRIMARY KEY, `content` TEXT NOT NULL, `sent_at` DATETIME NOT NULL, `user_agent` TEXT NULL, `user_ip` INT UNSIGNED NULL, CONSTRAINT messages_id_uindex UNIQUE (`id`) ) ENGINE = InnoDB;
true
21403d7b8218c3a1b907de9479b0f410ddf1045b
SQL
dmcardoso/redesocial
/pesquisas/Vantagens e Desvantagens do Uso de Triggers/recursos/sql/MYSQL.sql
UTF-8
1,264
3.78125
4
[ "MIT" ]
permissive
drop database triggers; create database triggers; use triggers; -- ----------------------------------------------------- -- Table `triggers`.`usuario` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `triggers`.`usuario` ( `idUsuario` INT(11) NOT NULL AUTO_INCREMENT, `nomeUsuario...
true
1ecc94ff39d52fec706208049925b10932ab4ede
SQL
syqq888/afcatpay
/pay-web/src/main/resources/dbScript/merchant.sql
UTF-8
5,009
3.90625
4
[]
no_license
-- 创建名为merchant的数据库. create database if not exists `merchant`; -- 在mysql中使用该数据库进行表结构的创建. use merchant; -- 1.用户表 IM_USER create table `IM_USER` ( id_user varchar(32) primary key comment '用户登录的id编号,整张数据表的主键', user_name varchar(64) not null comment '登录系统的用户名', user_acc varchar(20) not null comment '', user_phone...
true
72bf15c24571157164427de2e51831a6abe3b27f
SQL
GuilhermeSRibeiro/Trybe
/03 - Desenvolvimento Back-End/Bloco 20/20.4/questions/exer01.sql
UTF-8
1,334
3.546875
4
[]
no_license
USE sakila; -- 1. Insira um novo funcionário na tabela sakila.staff. -- Para saber quais campos são obrigatórios, clique com o botão direito na tabela sakila.staff e selecione "Table Inspector". Clique na aba "columns" e verifique quais campos aceitam nulos para te guiar. Lembre-se de que valores que são gerados autom...
true
6e2f3676c4307d7cfae4f1135552f79a4c19919b
SQL
Marto86/MSSQL-EntityFramework
/MSSQL/AdditionalExercices/Problem 14. Monasteries by Continents and Countries
UTF-8
858
4.375
4
[]
no_license
--PROBLEM 1-- UPDATE Countries SET CountryName='Burma' WHERE CountryName = 'Myanmar' --PROBLEM 2-- INSERT INTO Monasteries(Name, CountryCode) VALUES ('Hanga Abbey', (SELECT Countries.CountryCode FROM Countries WHERE CountryName = 'Tanzania')) --PROBLEM 3-- INSERT INTO M...
true
0c6006d11a74040de7068f8e786c4fd6f9b5b5ea
SQL
jgarzonext/plsql-testing
/script_plsql/bd_iaxis/script/Scripts Complementarios/IAXIS-4143/04_4143_UPD_FIN_RANGOS_V01.sql
UTF-8
1,278
2.734375
3
[]
no_license
DELETE fin_rangos r WHERE cvariable LIKE 'CALIFICACION_CIFIN%' and r.ANIO = 2019; -- insert into fin_rangos (CVARIABLE, NDESDE, NHASTA, TRANGO, NCALPRO, ANIO) values ('CALIFICACION_CIFIN', -100000, 369, '-', 0.4, 2019); insert into fin_rangos (CVARIABLE, NDESDE, NHASTA, TRANGO, NCALPRO, ANIO) values ('CALIFICACION_CIF...
true
a6357792b971393f6e9a314babf8249efe689fd2
SQL
LucasHuls/OpdrachtenGroep5
/Sam Elfring/Sprint 1/SQL/SIMPLE QUERIES/How times change.sql
UTF-8
214
2.765625
3
[]
no_license
USE [WorldEvents] SELECT EventName AS [Wat] ,EventDate AS [Wanneer] FROM dbo.tblEvent ORDER BY EventDate ASC SELECT EventName AS [Wat] ,EventDate AS [Wanneer] FROM dbo.tblEvent ORDER BY EventDate DESC
true
82a944a997217d41a958dbadee516175f7a6570c
SQL
bigprofession/SQL
/Video.sql
UTF-8
5,605
3.5
4
[]
no_license
drop table member_loan; drop table reservation; drop table vid_copy; drop table member; drop table video; create table member (mem_code number(6) not null primary key, mem_surname varchar2(25) not null, mem_forename varchar2(15) not null, mem_add1 varchar2(30) not null, mem_add2 varchar2(30) not null,...
true
7dc48d1439f701a1442efba8a9f553ca63c24c34
SQL
pro-zw/spring-financial-data
/src/main/sql/etf_index_config.sql
UTF-8
6,435
2.875
3
[]
no_license
DROP TABLE IF EXISTS etf_index_config CASCADE; CREATE TABLE IF NOT EXISTS etf_index_config ( id SERIAL NOT NULL, url VARCHAR(512) NOT NULL, geographic_exposure VARCHAR(128) NOT NULL, suspended BOOLEAN DEFAULT FALSE, CONSTRAINT etf_index_config_pkey PRIMARY KEY (id), CONSTRAINT etf_index_config_url_ukey UNIQ...
true
901a21f528badbda1d077aa86e405a74133d45f6
SQL
roysouravv30/INFO7370
/Chinook/DDL Scripts/dw create chinook_dw MySQL 2020.sql
UTF-8
8,561
3.34375
3
[]
no_license
-- Chinook_DW Schema -- MySQL -- rick sherman -- 2020-10-04 -- USE chinook_dw -- GO drop TABLE if exists Dim_Artist; CREATE TABLE Dim_Artist ( ArtistSK int AUTO_INCREMENT NOT NULL, ArtistId int NOT NULL, -- NK ArtistName VARCHAR(120) NULL, SOR_ID int NULL, -- SOR_L...
true
4543df4a907b4c072fdb1669bae091acd3607539
SQL
FilipStefanov/MySQL
/DATA AGGREGATION/Lab/03. Minimum Salary.sql
UTF-8
164
3.359375
3
[]
no_license
SELECT `department_id`, ROUND(MIN(`salary`), 2) AS 'min_salary' FROM employees GROUP BY `department_id` HAVING `min_salary` > 800 ORDER BY `department_id`;
true
d75583f124984992ce02d172a14980e38f021f34
SQL
ValentinDutin/MyFirstRepository
/task11/11.sql
UTF-8
116
2.71875
3
[]
no_license
select datediff(curtime(), str_to_date(creation_date,'%Y-%m-%d %T')) from photopost order by creation_date limit 1
true
9266065c67382e095be6ba3d67129fd340c7356e
SQL
jmataya/hermes
/sql/20170714133858_create_table_users.up.sql
UTF-8
258
3.375
3
[ "MIT" ]
permissive
CREATE TABLE users ( id SERIAL PRIMARY KEY, email hermes_string NOT NULL, first_name hermes_string, last_name hermes_string, created_at hermes_timestamp, updated_at hermes_timestamp ); CREATE UNIQUE INDEX users_email_idx ON users (lower(email));
true
8b2195deb8510a5554ffbf83cb6aee4d1314abf1
SQL
aidanjgriffiths/Project-Plant
/PlantifulWeb/SQL/main-database-creation-script.sql
UTF-8
7,581
4
4
[]
no_license
-- #### DATABASE CREATION #### DROP DATABASE IF EXISTS Main; CREATE DATABASE Main; USE Main; -- #### TABLE CREATION #### CREATE TABLE PWebConnector ( web_connect_pk INT NOT NULL AUTO_INCREMENT, web_connect_key VARCHAR(30) NOT NULL UNIQUE, PRIMARY KEY (web_connect_pk) ); CREATE TABLE PUser ( user_id_...
true
266b3003bc3748c266da0dbd6beaf34cfec504d9
SQL
CUBRID/cubrid-testcases
/sql/_13_issues/_12_2h/cases/bug_bts_6920.sql
UTF-8
606
3.640625
4
[ "BSD-3-Clause" ]
permissive
drop table if exists t; create table t ( p int primary key, st string); select * from t using index pk_t_p order by p union select * from t using index pk_t_p order by p; (select * from t using index pk_t_p order by p) union (select * from t using index pk_t_p order by p); drop table if exists t; drop table if exists...
true
e525397b509a07dfdf9110df78cd7f33c1bbc887
SQL
BaekUnYeong/dbSql
/2019_11_25.sql
UHC
1,478
4.0625
4
[]
no_license
CREATE TABLE member2 AS SELECT * FROM member; UPDATE member2 SET mem_job = '' WHERE mem_id = 'a001'; COMMIT; SELECT mem_id, mem_name, mem_job FROM member2 WHERE mem_id = 'a001'; SELECT * FROM buyprod; SELECT buy_prod, SUM(buy_qty) SUM_QTY, SUM(buy_cost) SUM_COST FROM buyprod GROUP BY buy_prod ORDER BY buy_prod; ...
true
c7facb9dc2a11e5a1cff84a9fb185515e041b2a9
SQL
justfate/community
/src/main/resources/db/migration/V1__Create_user_table.sql
UTF-8
193
2.875
3
[]
no_license
create table USER ( ID BIGINT auto_increment, ACCOUNT_ID VARCHAR(100), NAME VARCHAR(50), TOKEN VARCHAR(36), GMT_CREATE BIGINT, GMT_MODIFIED BIGINT, constraint USER_PK primary key (ID) );
true
9b341951ee9e6cc16ac5b20c830a0b0f337e0643
SQL
fatfox21/rockOA2
/webrock/install/rainrock.sql
UTF-8
275,939
3.015625
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : rock本地 Source Server Version : 50530 Source Host : localhost:3306 Source Database : rockoa Target Server Type : MYSQL Target Server Version : 50530 File Encoding : 65001 Date: 2016-01-21 23:27:12 */ SET FOREIGN_KEY_CHECKS=0; -- ------...
true
eaff3f4ed3d8a49e85fd1a26da4a85ad01e5a590
SQL
grimgorgon/Orchard
/OrchardSQLScript.sql
UTF-8
4,055
3.53125
4
[]
no_license
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0; SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0; SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL,ALLOW_INVALID_DATES'; -- ----------------------------------------------------- -- Schema mydb -- -----------------------------------------...
true
55821104f091eb2b74762016d0d02117240b3ce4
SQL
mykhalchuk-m/autostorage
/sql/auto.sql
UTF-8
1,285
3
3
[]
no_license
DROP DATABASE IF EXISTS auto; CREATE DATABASE auto USE auto; CREATE TABLE listing ( Id int(11) NOT NULL auto_increment, marka varchar(255) default NULL, model varchar(255) default NULL, price varchar(255) default NULL, additionalinfo varchar(255) default NULL, carcass varchar(255) default NULL, color var...
true
8b0c1ccb449e97692722b5eca9a877a400d17355
SQL
Dasep12/perpustakaan
/perpustakaan.sql
UTF-8
2,077
2.984375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Apr 24, 2019 at 07:54 AM -- Server version: 10.1.37-MariaDB -- PHP Version: 7.3.0 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
true
4ee1a3507e8602ee08676af0ffd2bf01043507fb
SQL
GradedJestRisk/db-training
/RDBMS/PostgreSQL/queries/extension/http/http.sql
UTF-8
1,269
3.015625
3
[]
no_license
--------------- -- Install -- --------------- -- Create image -- git clone https://github.com/pramsey/pgsql-http.git -- cd pgsql-http -- rm -rf .git -- docker build --tag pgsql-http:latest --file ../Dockerfile . -- Create container -- docker rm postgres_http -- docker run --detach --env POSTGRES_HOST_AUTH_METHOD=...
true
6de04683197a6048d9c1d2bec1dc3d0f5d89b5e3
SQL
intCCP/CCP
/Application/Viste/v_mcrei_app_dati_dett_chius_pl.sql
UTF-8
4,085
2.921875
3
[]
no_license
/* Formatted on 21/07/2014 18:39:24 (QP5 v5.227.12220.39754) */ CREATE OR REPLACE FORCE VIEW MCRE_OWN.V_MCREI_APP_DATI_DETT_CHIUS_PL ( COD_ABI, COD_NDG, COD_PROTOCOLLO_PACCHETTO, COD_PROTOCOLLO_DELIBERA, COD_MACROTIPOLOGIA, DESC_MACROTIPOLOGIA, COD_MICROTIPOLOGIA, DESC_MICROTIPOLOGIA, VAL_TOT...
true
2f56294b0a28d79bfa6dedfe348f9fce3ec7c298
SQL
zengzhijie/appx2-CC
/sql/member.sql
UTF-8
3,264
3.359375
3
[]
no_license
DROP TABLE IF EXISTS `mem_hier`; CREATE TABLE `mem_hier` ( `id` char(32) NOT NULL COMMENT '会员等级ID', `sto_id` char(32) NOT NULL COMMENT '店铺ID', `name` char(64) NOT NULL COMMENT '会员等级名称', `sequence` int(2) DEFAULT NULL COMMENT '会员等级顺序', `gro_val` int(8) DEFAULT '0' COMMENT '到达该等级所需成长值', `fre_ship` tinyint(1)...
true
08763c90d3633cd4db3d825a5d116ab07885dd25
SQL
Misterfarouk/ArkountingTraining
/arkounting_training.sql
UTF-8
3,208
2.8125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: May 17, 2019 at 04:14 PM -- Server version: 10.1.39-MariaDB -- PHP Version: 7.3.5 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
true
22c032742c8d38630f5658c58eefde9f94c4d3eb
SQL
JHutter/CapstoneDB
/db/change_login_info.sql
UTF-8
303
2.65625
3
[]
no_license
#instructions: use cemc; update login set pass = '[password here, keep the single quotes but not the brackets]' where teaacher_id = '[teacherfirst.last here, keep the single quotes but not the brackets]' ; #this will grab the info from login so you can see what the logins are select * from login;
true
f6b3817762baf39e8f9a3379b03e1f3d7f3fd408
SQL
MrBrook/Dimensionador-de-Cabos
/Dados/Banco/banco.sql
UTF-8
10,194
3.296875
3
[]
no_license
-- MySQL Script generated by MySQL Workbench -- Mon Jun 26 23:44:28 2017 -- Model: Sakila Full Version: 2.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='...
true
24aa9f274b607e52acd2f62dc44987cca86fdc52
SQL
Opatach/Alexander-Eremich-JT-autumn-2019-FinalTask
/web/WEB-INF/db/db.sql
UTF-8
5,697
3.078125
3
[]
no_license
-- MySQL dump 10.13 Distrib 8.0.18, for Win64 (x86_64) -- -- Host: localhost Database: horseracingdb -- ------------------------------------------------------ -- Server version 8.0.18 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS *...
true
27703ab727be07c088dedd9162be99ed7bec0dea
SQL
softwareCQT/web_camp
/旧项目/大设计递交样本/源文件/secondary_market.sql
UTF-8
7,119
3.1875
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : localhost_3306 Source Server Version : 80015 Source Host : localhost:3306 Source Database : secondary_market Target Server Type : MYSQL Target Server Version : 80015 File Encoding : 65001 Date: 2019-05-15 20:51:38 */ SET FOREIGN_KEY_C...
true
6ff4b7fda1fd89a5f788872d50e99f57d33422e6
SQL
SarnaKhmel/EPAM_homeworks
/Homeworks/EPAM_HW1/EPAM_HW1_18.sql
WINDOWS-1251
306
3.046875
3
[]
no_license
-- 볻. 'Japan'. -- type. SELECT * FROM classes WHERE country='Japan' ORDER BY type DESC;
true
7f763f734765fc622e1766845ced12a9f9ffb93e
SQL
Ray-Hackshaw/hackerrank
/SQL/Employee Names.sql
UTF-8
114
2.53125
3
[]
no_license
SELECT NAME FROM Employee ORDER BY NAME ASC; --https://www.hackerrank.com/challenges/name-of-employees/problem
true
e9cc3e9ff1abece6c2030bae5af3de2b0ecca970
SQL
emmelinetsen/Databases-ECS165
/165a/hw5_p2/d8_ec_qb.sql
UTF-8
412
3.484375
3
[]
no_license
select le.country from GM_LE le, GM_HS hs where le.year = 2000 AND hs.year = 2000 AND le.country = hs.country AND le.le is not null AND hs.hs is not null AND NOT EXISTS ( select le2.country from GM_LE le2, GM_HS hs2 where le2.year = 2000 AND hs2.year = 2000 AND le2.country = hs2.country AND hs2....
true
5533b503077d72b0054b614a4d06191bfc9dc53a
SQL
vijaydairyf/TimelyFish
/SolomonApp/dbo/Views/dbo.vp_03400CashDetail.sql
UTF-8
1,525
3.171875
3
[]
no_license
 --APPTABLE --USETHISSYNTAX CREATE VIEW vp_03400CashDetail AS /****** File Name: 0312vp_03400CashDetail.Sql ******/ /****** Last Modified by Chuck Schroeder 11/06/98 16:00 ******/ /****** Modified by C. Seibert 12/14/98 2:15pm - VC should be an adjustment to Disbursements ******/ /****** Select amounts to ...
true
f2497e42eab09e0af36beb0f7e115a0869c70a76
SQL
Fbullman/Pewlett-Hackard-Analysis
/Employee_Database_challenge.sql
UTF-8
1,120
4.40625
4
[]
no_license
--Retirement employees in Sales and Development dept. SELECT de.emp_no, de.first_name, de.last_name, ti.title, ti.from_date, ti.to_date INTO retirement_titles FROM employees AS e LEFT JOIN titles AS ti ON de.emp_no= ti.emp_no WHERE birth_date BETWEEN '1952-01-01' AND '1955-12-31' ORDER BY emp_no; ...
true
ffc63a917ba6e89a59458b464423bbfd7b8a1b8f
SQL
SoftDevAndy/fullstack-hangman
/db/playerscores_db.sql
UTF-8
470
3.328125
3
[]
no_license
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; CREATE TABLE `scores` ( `username` varchar(50) NOT NULL, `seconds` int(11) NOT NULL, `id` int(11) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; INSERT INTO `scores` (`username`, `seconds`, `id`) VALUES ('Andy', 5, 1), ('Karl', 10, 2), ('Exampl...
true
29b399b0ff3d46724929a21ecd1027c8f6a912d0
SQL
daopmdean/spring-boot-rest-api
/customer.sql
UTF-8
827
3.09375
3
[]
no_license
CREATE DATABASE IF NOT EXISTS `the_company`; USE `the_company`; -- -- Table structure for table `customers` -- DROP TABLE IF EXISTS `customers`; CREATE TABLE `customers` ( `id` int(11) NOT NULL AUTO_INCREMENT, `first_name` varchar(45) DEFAULT NULL, `last_name` varchar(45) DEFAULT NULL, `email` varchar(45) D...
true
6e3ac437f80d33301d8ffabd04cee4e22077f36b
SQL
lbraun/Ethics-app
/sql/queries/universities/list.sql
UTF-8
733
3.625
4
[ "MIT" ]
permissive
SELECT COUNT(*) OVER()::NUMERIC AS full_count, university.university_id, university.created, university.updated, university.university_name, university.university_logo FROM Universities university ORDER BY CASE WHEN $3::TEXT='created.asc' THEN university.created END ASC, CASE ...
true
bae282dffcc4d49d4678fd0d2ee249a3b612027f
SQL
chyroc/sqlfly
/testdata/test.sql
UTF-8
331
2.890625
3
[ "Apache-2.0" ]
permissive
CREATE TABLE `test` ( `id` INT UNSIGNED NOT NULL AUTO_INCREMENT, `name` VARCHAR(32) NOT NULL, `age` INT NOT NULL, `created_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`), UNIQUE `name` (`name`) ) ENGINE = InnoDB AUTO_INCREMENT = 1 DEFAULT CHARSET...
true
8a42143c30463c2536441fdeb11db2f16dbcdc00
SQL
kofiyeboah20/restmyblog
/database/create.sql
UTF-8
1,218
3.3125
3
[]
no_license
CREATE TABLE `crfw`.`form_details` ( `id` INT NOT NULL AUTO_INCREMENT , `formnum` VARCHAR(255) NOT NULL COMMENT 'form number ' , `application_num` VARCHAR(255) NOT NULL COMMENT 'application number ' , `date_of_application` DATETIME NOT NULL COMMENT 'date and time of application ' , `title` INT NOT NULL COM...
true
ed22fe7cf3e849b9d0e7eeb21319562502c97bdf
SQL
too-bug/mytest
/ms1.sql
GB18030
3,737
2.921875
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : cxy1 Source Server Version : 50133 Source Host : localhost:3306 Source Database : school Target Server Type : MYSQL Target Server Version : 50133 File Encoding : 20936 Date: 2019-03-13 23:29:28 */ SET FOREIGN_KEY_CHECKS=0; -- -------...
true
e909e851e887c4d6bb44004e749481f9ed025454
SQL
Zane-Klausing/koala-tracking-app
/database.sql
UTF-8
632
2.5625
3
[]
no_license
CREATE TABLE koalas ( id SERIAL, name varchar(25), gender varchar(1), age int, ready_to_transfer BOOLEAN, notes varchar(200) ); INSERT INTO "koalas" ("id", "name", "gender", "age", "ready_to_transfer", "notes") VALUES ('1', 'Scotty', 'M', '4', 'TRUE', 'Born in Guatemala'), ('2', 'Je...
true
00bdcf7cbc2e84dd8d08dfe5f52ff1763734feb4
SQL
wahyuherlambang/studio
/investor-metrics/monthly_transacting_user_basedonvolume.sql
UTF-8
2,224
4.0625
4
[]
no_license
with distinct_flight as ( select 'flight' as product_type, DATE( TIMESTAMP_TRUNC( TIMESTAMP_ADD( TIMESTAMP_MILLIS( issue_time ), INTERVAL 7 HOUR ), MONTH ) ) AS issued_month, country, profile_id, booking_id, num_seats as volume from ( select *, row_number() over(partition by booking_id order by kafka_p...
true
6695897914136ab876088919a411a87b056eb9d7
SQL
dmitriy-zhluktov/springWebAPP
/src/main/resources/user_roles.sql
UTF-8
456
3.796875
4
[]
no_license
DROP TABLE IF EXISTS user_roles; CREATE TABLE user_roles ( id int(11) NOT NULL AUTO_INCREMENT, user_id int(11) NOT NULL, role varchar(45) NOT NULL, PRIMARY KEY (id), CONSTRAINT fk_userid FOREIGN KEY (user_id) REFERENCES users (id) ON DELETE CASCADE ON UPDATE CASCADE) ENGINE = InnoDB DEFAULT...
true
59d51a0d6bb161031026a4231c098e47d71ed52c
SQL
abrahampll/LearnSqlBootCamp
/Consultas/22-CONVERSION-CADENA.sql
UTF-8
1,297
3.4375
3
[ "MIT" ]
permissive
--SUBSTRING SELECT SUBSTRING('SQLSERVER',4,6) --STUFF SELECT STUFF('SQLSERVER',4,2,'2019') -- REMPLAZA LA CADENA CON 2 CARACTERES --LEN -- LOS ESPACIOS HACIA LA DERECHA NO SE CONSIDERA PERO SI LO ESPACIOS --A LA IZQUIERDA SELECT LEN('SQLSERVER ') SELECT LEN(' SQLSERVER') --LEFTH SELECT LEFT('SQL SER...
true
d0d06ef7bef04a1a622119abee709d353c59f2b3
SQL
roger-mayer/database-exercises
/sporkify/sporkify_queries.sql
UTF-8
363
3.09375
3
[]
no_license
USE sporkify_db; SELECT artist FROM sporkify WHERE song = 'Ntag'; SELECT song,SEC_TO_TIME(duration) FROM sporkify ORDER BY duration DESC LIMIT 3; SELECT count(song) FROM sporkify; SELECT artist, count(*) FROM sporkify GROUP BY artist ORDER BY count(artist) DESC LIMIT 1; SELECT album, song, genre, SEC_TO_TIME(dura...
true
b93f8922c6b26b5b7d7b11d10ddc1e52b024b230
SQL
ArthurSampaio/BancoDeDadosI
/pt3/consultas_grupo07.sql
UTF-8
3,587
4.28125
4
[]
no_license
/*2. Liste o nome dos açudes, ordenados pelo volume máximo e pelo comprimento de forma decrescente.*/ SELECT NOME FROM ACUDE ORDER BY VOLUMEMAXIMO, COMPRIMENTO DESC; /*3. Crie uma visão que liste os valores de chuva diários medidos para o açude de Coremas e seu nome.*/ CREATE VIEW list3 AS SELECT a.NOME, m.VALOR_...
true
2990bea15774ec7645d3542aae8f917acf65b7b8
SQL
MadInt9000/geoapp
/geoapp.sql
UTF-8
2,034
3.09375
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.5.5.1 -- http://www.phpmyadmin.net -- -- Хост: 127.0.0.1 -- Время создания: Июл 17 2016 г., 19:37 -- Версия сервера: 5.7.11 -- Версия PHP: 5.6.19 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!...
true
dcf0fe994105648c67c2dba4fddbe0f3379d75aa
SQL
xiejiajun/hbase-oss
/sql/mysql.sql
UTF-8
2,238
3.796875
4
[ "Apache-2.0" ]
permissive
SET NAMES utf8mb4; SET FOREIGN_KEY_CHECKS = 0; CREATE DATABASE IF NOT EXISTS oss DEFAULT CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI; USE oss; -- ---------------------------- -- Table structure for OSS_BUCKET -- ---------------------------- DROP TABLE IF EXISTS `OSS_BUCKET`; CREATE TABLE `OSS_BUCKET` ( `BUCK...
true
82ff3eb30eed18b7f7a05f156e74fc53823b7eb1
SQL
Gustavo-F/Projeto-POOI-Etapa-3
/Kindle - Etapa 3/Script Kindle.sql
UTF-8
2,427
4.09375
4
[]
no_license
DROP TABLE IF EXISTS genero; CREATE TABLE genero( genero VARCHAR(50) NOT NULL PRIMARY KEY ); DROP TABLE IF EXISTS pessoa; CREATE TABLE pessoa( id_pessoa INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, email VARCHAR(100) NOT NULL UNIQUE ); DROP TABLE IF EXISTS pessoa_fisica; CREATE TABLE pessoa_fisica( id...
true
23197c3433f76605ef8b86e637c9045dc222b225
SQL
availabs/NYSDOT_TrafficData_PostgreSQL
/analysis/shapeFileCompleteness.sql
UTF-8
7,822
3.46875
3
[]
no_license
-- -- Short Counts Shapefile -- -- * 18% of Avg Weekday stations from the speed CSV do not have an entry in the shapefile. -- -- * 19% of Avg Weekday stations from the classification CSV do not have an entry in the shapefile. -- -- * 27% of Avg Weekday stations from the volume CSV do not have an entry in the s...
true
aa484793690f788b34cb2c34468af878bb99ea0d
SQL
trmcnealy/EngineeringToolsServer
/Services/OilGasQueries/Backup.sql
UTF-8
4,726
3.640625
4
[]
no_license
-- table --SELECT "Well" --INNER JOIN "OilProperties" --ON "Well"."OilPropertiesId"="OilProperties"."Id" --INNER JOIN "Location" --ON "Well"."LocationId"="Location"."Id" -- extent_query SELECT min("Location"."Easting83") AS "MinEasting", max("Location"."Easting83") AS "MaxEasting", min("Location"."Northing83") AS "Mi...
true
1b4678b69002cb390a56657495fab55065888349
SQL
george-brand/daily_log
/db.sqlite3.sql
UTF-8
13,605
3.265625
3
[]
no_license
BEGIN TRANSACTION; CREATE TABLE IF NOT EXISTS "django_migrations" ( "id" integer NOT NULL, "app" varchar(255) NOT NULL, "name" varchar(255) NOT NULL, "applied" datetime NOT NULL, PRIMARY KEY("id" AUTOINCREMENT) ); CREATE TABLE IF NOT EXISTS "auth_group_permissions" ( "id" integer NOT NULL, "group_id" integer NOT...
true
5bcb20e4746c6ada953100cfabb1989fbb1037f0
SQL
explore11/ssm
/src/sql/dept.sql
UTF-8
877
2.640625
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : root Source Server Version : 50713 Source Host : localhost:3306 Source Database : ssm Target Server Type : MYSQL Target Server Version : 50713 File Encoding : 65001 Date: 2020-04-19 22:21:08 */ SET FOREIGN_KEY_CHECKS=0; -- ----------...
true
c9f9d4a0b54586480a11137d6165bda8599c0e30
SQL
marcelhoekstra/timesheet-pure
/src/main/resources/db/migration/h2/V2.71__urenboekingen.sql
UTF-8
493
2.65625
3
[]
no_license
DROP TABLE projectboeking; DROP TABLE uren_boekingen; CREATE TABLE IF NOT EXISTS `uren_boekingen` ( `id` bigint(19) NOT NULL AUTO_INCREMENT, `datum` date DEFAULT NULL, `kilometerType` varchar(255) DEFAULT NULL, `kilometers` int(10) NOT NULL, `mutatieDatum` datetime DEFAULT NULL, `opmerking` varchar(255) DEF...
true
78632b89d00095553e7ddcfd988cf43528a9241b
SQL
moiramallison/navicat_mm
/PostgreSQL/servers/dwh-prod/dwh_prod/moiram/dss test.sql
UTF-8
1,442
3.875
4
[]
no_license
select status, count(1) from common.subscription_d group by status; select status, count(1) from common.daily_status_snapshot where day_timestamp::date = current_date::date group by status; SELECT * FROM common.daily_status_snapshot dss WHERE dss.gcsi_user_id= 14432797 ORDER BY dss.day_timestamp DESC LIMIT 20; ...
true
5a901fae040c106aadd54ea9a6a695763776d863
SQL
dhanesh123us/CTR-2015
/basic_parms.sql
UTF-8
5,947
2.828125
3
[]
no_license
--in future use this --http://stackoverflow.com/questions/11740256/refactor-a-pl-pgsql-function-to-return-the-output-of-various-select-queries/11751557#11751557 \set myvar c1 \echo :myvar select count(*) from (select distinct :myvar from train) a; select count(*) from (select distinct :myvar from test) a;select count(*...
true
11ebe14ce35562ee979eeab167473e499bf82bcf
SQL
bellmit/researchmeng2
/derby/468087_DERBY-1377/from/dcl_readOnly.sql
UTF-8
980
2.734375
3
[]
no_license
-- common tests for read-only jarred database select * from EMC.CONTACTS; select e_mail, "emcAddOn".VALIDCONTACT(e_mail) from EMC.CONTACTS; insert into EMC.CONTACTS values(3, 'no@is_read_only.gov', NULL); CALL EMC.ADDCONTACT(3, 'really@is_read_only.gov'); -- same set as dcl.sql for reading resources -- VALUES...
true
62887c208f44afad7c8b7880aa76b46db993c21c
SQL
st780206/ssm
/dbsql/postgresql.sql
UTF-8
384
2.609375
3
[]
no_license
CREATE DATABASE ssm_demo WITH OWNER = postgres ENCODING = 'UTF8' TABLESPACE = pg_default LC_COLLATE = 'en_US.UTF-8' LC_CTYPE = 'en_US.UTF-8' CONNECTION LIMIT = -1; CREATE TABLE demo2 ( username character varying NOT NULL, passwd character varying, CONSTRAIN...
true