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
c3537f0bb1cbe5cbff9eba3e83528676fbd810ad
SQL
T4urius/eFincasMobile
/src/assets/seed.sql
UTF-8
1,090
2.734375
3
[]
no_license
CREATE TABLE developer ( id INTEGER PRIMARY KEY IDENTITY, name TEXT, skills TEXT, img TEXT ); INSERT INTO developer VALUES (1, 'Simon', '', 'https://pbs.twimg.com/profile_images/858987821394210817/oMccbXv6_bigger.jpg'); INSERT INTO developer VALUES (2, 'Max', '', 'https://pbs.twimg.com/profile_i...
true
2536438d18d374ffc245ba6c05ec59a92a68716d
SQL
fkomo/Stats4Fun-Api
/server/sql/mysql-tables.sql
UTF-8
3,893
3.4375
3
[]
no_license
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -- DROP TABLES ----------------------------------------------------...
true
c4091ac33b1f90271fc5217d88527ffe8e448a86
SQL
kenyi22/query_sql
/hermetic_reporte_billetes_recontados.sql
UTF-8
5,416
2.96875
3
[]
no_license
SELECT A.COD_CLIE_CNTA CODCLIE, INITCAP(C.NOM_CLIE) NOMCLIE, A.COD_CNTA CODCNTA, (SELECT X.DES_CNTA FROM AC_CUENTA X WHERE X.COD_SUCU_HTB = A.COD_SUCU_HTB_CNTA AND X.COD_CLIE = A.COD_CLIE_CNTA AND X.COD_CNTA = A.COD_CNTA) DESCNTA, A.TIP_DOCU_C...
true
c82b8f4bb099f137d4ec8fe893414ccb06528939
SQL
edeustace/scala-ini
/conf/evolutions/default/2.sql
UTF-8
10,185
3.296875
3
[]
no_license
# --- Sample dataset # --- !Ups insert into app_user (email,name,password) values ('ed.eustace@gmail.com','ed eustace','password'); insert into app_user (email,name,password) values ('edeustace@yahoo.com','ed eustace','password'); insert into puzzle (name,description,body,level,category,user_email, is_on_curr...
true
7c087c8454c848e936b883e7465319380d89d959
SQL
geldrin/PHP-testing-ground
/resources/dbmigration/056-20150305-ldap-nestedgroups.sql
UTF-8
808
2.609375
3
[]
no_license
ALTER TABLE `groups` ADD `organizationdirectoryuserslastsynchronized` DATETIME NULL DEFAULT NULL AFTER `organizationdirectoryldapwhenchanged`, ADD `ispermanent` INT( 10 ) NOT NULL DEFAULT '0' AFTER `organizationdirectoryuserslastsynchronized`; ALTER TABLE `groups_members` ADD `userexternalid` VARCHA...
true
33f025f3ad960813e28a4642e957c53d23fb3a9c
SQL
bethfraser/FlixRatings
/db/flixratings.sql
UTF-8
651
3.140625
3
[]
no_license
DROP TABLE rankings; DROP TABLE films; DROP TABLE users; CREATE TABLE films( id serial4 PRIMARY KEY, title VARCHAR(255), year INT4, imdb_rating FLOAT4, summary TEXT, poster_image TEXT ); CREATE TABLE users( id serial4 PRIMARY KEY, name VARCHAR(255), password VARCHAR(255), current_user_status CHAR...
true
308d32a5bbb3157b40e275811695b0556337a383
SQL
Matias-v/Elecciones
/ProyectoBD/Persona.sql
UTF-8
406
3.046875
3
[]
no_license
CREATE TABLE Persona ( ccSerie varchar(3) not null, ccNum int(3) not null, pNom VARCHAR(20) NOT NULL, sNom varChar(20), pApe VARCHAR(20) NOT NULL, sApe varChar(20), idRol int(1) NOT NULL, numCirc INT(3) NOT NULL, constraint pk_CC primary key (ccSerie,ccNum), constraint FK_Rol foreign key(idRol) references Rol (idRol),...
true
b4064c65ae823b522a38119f44f5cfa21bc418e2
SQL
rameshdahalofficial/blogapp
/rameshblog.sql
UTF-8
4,661
3.34375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Apr 01, 2019 at 12:00 PM -- Server version: 10.1.37-MariaDB -- PHP Version: 5.6.39 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OL...
true
652b8f3fbf5c6de7d100bb993d2b0762db2e83bc
SQL
samstanding/sql_joins_syntax_heroes
/sql_joins_syntax_heroes.sql
UTF-8
3,169
4.25
4
[]
no_license
# sql_joins_syntax_heroes SQL practice -- hero table CREATE TABLE heroes ( id SERIAL PRIMARY KEY, name VARCHAR(100) NOT NULL, alias VARCHAR(200) ); -- hero identity data INSERT INTO heroes (name, alias) VALUES ('Superman', 'Clark Kent'), ('Batman', 'Bruce Wayne'), ('Professor X', 'Charles Xavier'), ('Wolv...
true
e948d3c627822e18837272314e8ee41d251c3902
SQL
hizakozo/photoapp
/src/main/resources/META-INF/com/example/photoapp/dao/ImageDao/findByTagId.sql
UTF-8
232
3.421875
3
[]
no_license
select image.image_id as image_id, user_id, image_path, explanation, image.create_at as create_at from image join image_tag on image.image_id = image_tag.image_id where image_tag.tag_id = /* tagId */1 order by image.image_id desc;
true
8ba73074cf3d9e901b837666215172476fee2d1b
SQL
CUBRID/cubrid-testcases
/sql/_26_features_920/issue_11087_median/cases/11743.sql
UTF-8
741
3.140625
3
[ "BSD-3-Clause" ]
permissive
drop table if exists x; create table x(i int, a char(5), b varchar(5), c char(20), d string); insert into x values (1, '1','2', '2013-10-1', '2013-10-1'); insert into x values (null, null, null, null, null); insert into x values (2, '2','2', '2013-10-2', '2013-10-2'); insert into x values (5, '5','5', '2013-10-5', '201...
true
096e18ab2f094a2af3f823e01ac05d2058c30623
SQL
lcaczk/LuckCode
/src/main/java/com/wkk/top100/sql/LC_1097.sql
UTF-8
2,327
4.5
4
[]
no_license
Activity 活动记录表 +--------------+---------+ | Column Name | Type | +--------------+---------+ | player_id | int | | device_id | int | | event_date | date | | games_played | int | +--------------+---------+ (player_id,event_date)是此表的主键 这张表显示了某些游戏的玩家的活动情况 每一行表示一个玩家的记录,在某一天使用某个设备注销之前,登录并玩了很多游戏(可能...
true
cc87690de49fd3c1b2d1214a6141be92598b2202
SQL
gerins/LinkAja-Exam
/database/mysql/database_scripth.sql
UTF-8
2,020
3.53125
4
[]
no_license
-- 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='ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SU...
true
a2738aa3199c3be12adf6318b5022ca6bd1f2039
SQL
clauchile/sql-python
/Esakila.sql
UTF-8
4,765
4.5
4
[]
no_license
/*1. ¿Qué consulta ejecutarías para obtener todos los clientes dentro de city_id = 312? Su consulta debe devolver el nombre, apellido, correo electrónico y dirección del cliente.*/ select * from city; select * from actor; select * from customer; select * from address; select c.city_id, c.city, cus.first_name, cus.la...
true
824fdd082a14a2c093268f9a1e9b0c0930e22342
SQL
amoraitis/learning-sql
/12.sql
UTF-8
110
3.296875
3
[]
no_license
SELECT t.Name as 'Track Name', * FROM InvoiceLine as il LEFT OUTER JOIN Track as t on (t.TrackId = il.TrackId)
true
1b199a406e972f3718afcb35fac6e863cc65dff5
SQL
alexanderi96/cicerone
/schema.sql
UTF-8
2,572
3.40625
3
[ "MIT" ]
permissive
CREATE TABLE Utenti( IdUtente INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, NomeUtente CHAR(25) NOT NULL, CognomeUtente CHAR(25) NOT NULL, SessoUtente INTEGER NOT NULL, DataNascitaUtente integer NOT NULL, EmailUtente CHAR(50) NOT NULL, PasswordUtente VARCHAR(15) NOT NULL ); CREATE TABLE Ciceroni( IdCicerone REFE...
true
31467754e412a094984ba565a5ea83dbe923a48d
SQL
braianb92/.NET-Capacitacion
/Backend/BDD_querys/creacion_delete.sql
ISO-8859-10
2,241
3.796875
4
[]
no_license
USE pubs sp_help tablaPrueba INSERT INTO TablaPrueba(Descripcion) VALUES ('Primer ingreso') INSERT INTO TablaPrueba(Descripcion) VALUES ('Segundo ingreso') INSERT INTO TablaPrueba(Descripcion) VALUES ('Tercer ingreso') SELECT * FROM TablaPrueba DELETE from TablaPrueba WHERE Codigo=2 TRUNCATE TABLE TablaPrueba ----...
true
f84d11b22d6cb11564209ae33c10df19d5886fab
SQL
rdbms-at-twitter/mysql-tools
/check_executed_query_and_rows.sql
UTF-8
566
2.859375
3
[]
no_license
SELECT THREAD_ID,EVENT_ID, replace(replace(replace(left(SQL_TEXT,30),'\)r\n',''),'\r',''),'\n','') as sql_text, (`TIMER_WAIT` / 1000000000.0) AS `t (ms)`, `ROWS_EXAMINED` AS `ROWS_EXAMINED`, `ROWS_AFFECTED` AS `ROWS_AFFECTED`, `ROWS_SENT` AS `ROWS_SENT`, `CREATED_TMP_TABLES` AS `CREATED_TMP_TABLES`, `CREATED_TMP_DISK_...
true
726eabb265b948dac227819dbe0eb7769ed77943
SQL
SuitedTo/suited-to
/db/evolutions/148.sql
UTF-8
144
2.515625
3
[]
no_license
# --- !Ups ALTER TABLE Job ADD CONSTRAINT unique_name UNIQUE(name, company_id); # --- !Downs ALTER TABLE Company DROP CONSTRAINT unique_name;
true
7b7ee39c65d0ceb2f8f4cf49a336b26c243c02ab
SQL
shinseongsu/Oracle_Tuning
/tuning21.sql
UTF-8
2,973
4.5625
5
[]
no_license
-- 인덱스를 이용한 소트 대체 -- 인덱스는 생성된 컬럼 기준으로 항상 정렬되어 있으므로 SQL 구문에 ORDER BY, GROUP BY 명령이 있더라도 해당 인덱스를 이용해 소트 연산을 생략할 수 있습니다. -- sort Order by Create index EMP_X01 ON EMP(DEPTNO); SELECT * FROM EMP ORDER BY DEPTNO; ========== SORT ORDER BY TABLE ACCESS FULL -- 여전히 SORT ORDER BY 연산이 발생하고, 다음 통계 정보애도 한 번의 정렬이 일어났습니...
true
66cc5f70f6c4dc0d272530c63ceb577cb5b32ecd
SQL
kurozato/ExplorerREC
/src/DomainLayer/Resources/RegistExplorerRecodes.SQL
UTF-8
676
3.9375
4
[ "MIT" ]
permissive
/*Regist Model*/ Delete From ExplorerRecodes Where Path = '@Path'; Update ExplorerRecodes Set DataSrt = DataSrt + 1; Insert Into ExplorerRecodes( Name, Path, DataSrt ) Values( '@Name', '@Path', 0); --make Index Delete From ExplorerRecodes_INDEX; Insert Into ExplorerRecodes_INDEX( ...
true
73ce7435ebfa4f221d7d1f2b305a74bd754a8ff9
SQL
WindhoverLabs/airliner
/apps/hk/test_and_ground/asist/prc/template/template_hk_missingdata.prc
UTF-8
66,955
2.84375
3
[ "NASA-1.3" ]
permissive
PROC $sc_$cpu_hk_missingdata ;******************************************************************************* ; Test Name: hk_missingdata ; Test Level: Build Verification ; Test Type: Functional ; ; Test Description ; The purpose of this test is to verify that Housekeeping (HK) correctly ; handles m...
true
4c06977379557d39e05fbc6538feced64dba53e3
SQL
Bojack0/examination
/sql/ex.sql
UTF-8
4,601
3.390625
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : gcp Source Server Version : 50725 Source Host : www.znzn.me:3306 Source Database : ex Target Server Type : MYSQL Target Server Version : 50725 File Encoding : 65001 Date: 2019-04-09 21:10:12 */ SET FOREIGN_KEY_CHECKS=0; -- ----------...
true
c37251526a616b6203e034185c8faf5e04485ec2
SQL
kishoref22/SoftUni-Homework-Projects
/Databases Fundamentals/Databases Basics/07. FunctionsTriggersProcedures/32. PopulationAndAreaByContinent.sql
UTF-8
384
4.03125
4
[]
no_license
SELECT co.ContinentName, pop.CountriesArea, pop.CountriesPopulation FROM (SELECT c.ContinentCode, SUM(CONVERT(bigint,c.AreaInSqKm)) AS CountriesArea, SUM(CONVERT(bigint,c.Population)) AS CountriesPopulation FROM Countries AS c GROUP BY c.ContinentCode) AS pop INNER JOIN Continents AS co ON pop.Contin...
true
6636cd2658dae8461b88d795dfafd700f304e91d
SQL
ververica/flink-sql-benchmark
/hive-tpcds-setup/ddl-tpcds/bin_partitioned/catalog_sales.sql
UTF-8
2,498
2.953125
3
[ "Apache-2.0" ]
permissive
set hive.exec.max.dynamic.partitions=100000; set hive.exec.max.created.files=1000000; set hive.exec.max.dynamic.partitions.pernode=100000; set hive.optimize.sort.dynamic.partition=true; set mapreduce.job.reduce.slowstart.completedmaps=1; use ${DB}; from ${SOURCE}.catalog_sales cs insert overwrite table catalog_sales pa...
true
704a31e7784005a1b75d01667b0d2c40eca55c87
SQL
artgrin/TRPZ_Labs
/Lab4_2.sql
WINDOWS-1251
3,434
4.1875
4
[]
no_license
use LAB1_2DB select distinct P.PublisherName from Publisher P join Book B on B.PublisherId = P.PublisherId where B.PublishingYear in ('2010-01-01') order by P.PublisherName select distinct P.PublisherName from Publisher P left outer join Book B on B.PublisherId = P.PublisherId where B.BookId is NULL order by P.Publis...
true
d32abaa43cb61a4d71ad198d0eb0dfb1d80f6adb
SQL
JAMSUPREME/mvc-kv-backend
/DBScripts/3_kvRootTable_DML.sql
UTF-8
568
2.6875
3
[]
no_license
TRUNCATE TABLE RootObject --exp active INSERT INTO RootObject(Id,[Description],ActiveFlag) VALUES ('DE3AA882-CC88-456A-A2CB-155D477D00A2','main obj for a person',1) --date range active INSERT INTO RootObject(Id,[Description],[OfferStartDate],[OfferEndDate]) VALUES ('86C3B9D1-5269-4D8B-BA99-4F7B3CEB371D','main obj for...
true
ad84d8dacc8d2b82c08dab2b39bcb8d9c248201f
SQL
zelihami/sql-cevaplar-2
/ödev 10.sql
UTF-8
338
3.140625
3
[]
no_license
/*ÖDEV 10*/ SELECT city,country from country LEFT JOIN city ON city.country_id=country.country_id SELECT payment_id,first_name,last_name from payment RIGHT JOIN customer ON customer.customer_id=payment.payment_id SELECT rental_id,first_name,last_name from rental FULL JOIN customer ON customer.customer_id=ren...
true
a67476d966184cd3ae0426c6a1f548a48563e21b
SQL
tianqin0414/zero-module
/src/main/resources/sql/ums_member_orignal.sql
UTF-8
2,295
3.390625
3
[]
no_license
/* Navicat Premium Data Transfer Source Server : zeromysql Source Server Type : MySQL Source Server Version : 50728 Source Host : 47.97.41.157:3306 Source Schema : mall Target Server Type : MySQL Target Server Version : 50728 File Encoding : 65001 Date: 03/01/2020 13...
true
9817c5441f42b439ff7e4118f734ab7d93b9b2cb
SQL
patricknaka/Nova
/Views LN/VW_CMV_Estoque.sql
UTF-8
1,338
3.5
4
[]
no_license
SELECT ltrim(rtrim(a.t$item)) CD_ITEM, d.t$cwar CD_ARMAZEM, c.t$grid CD_UNIDADE_EMPRESARIAL, cast(sum(a.t$mauc$1) as numeric(15,5)) VL_CMV, cast(sum(d.t$qhnd-d.t$qblk) as numeric(15,0)) QT_ESTOQUE_LIV...
true
ebca6135dc0c00ea51dba788d0b88c18828e1848
SQL
uusilver/lion
/src/lion.sql
UTF-8
8,950
2.984375
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : yyyyf Source Server Version : 50173 Source Host : localhost:3306 Source Database : lion Target Server Type : MYSQL Target Server Version : 50173 File Encoding : 65001 Date: 2014-09-14 13:03:16 */ SET FOREIGN_KEY_CHECKS=...
true
19034210124272b078add792f51eb1167e679cb0
SQL
rahul1sinha/SQL-code
/String-Date-Manipulation.sql
UTF-8
1,384
4
4
[]
no_license
-- -- Q1 -- SELECT GRADE_LEVEL "Job's Grade" FROM JOB_GRADES WHERE &SALARY BETWEEN lowest_sal AND highest_sal ; -- -- Q2 -- SELECT 'Employee ' || EMPLOYEE_ID || ' worked as ' || JOB_ID || ' for ' || (end_date-start_date) || ' days' as "Employee's History" --DAYS IN JOB POSN FROM JOB_HISTORY ...
true
27460d84909266117ed4d51a8423c9ababf8185e
SQL
albertbahia/wdi_june_2014
/w02/d04/patrick_karsh/rental/schema.sql
UTF-8
816
3.4375
3
[]
no_license
DROP TABLE IF EXISTS buildings CASCADE; DROP TABLE IF EXISTS apartments CASCADE; DROP TABLE IF EXISTS tenants CASCADE; DROP TABLE IF EXISTS doormen CASCADE; CREATE TABLE buildings( id SERIAL PRIMARY KEY, name VARCHAR(255) NOT NULL, address VARCHAR(510), num_floors INTEGER ); CREATE TABLE apartments( id SERIAL PRIMA...
true
d8725a6f90c23254d247621c8604c5a070ac07bd
SQL
ThiagoOliveira001/smn-atividade-sql
/izabela/script_Exercicio16.sql
ISO-8859-1
531
4.09375
4
[]
no_license
/* Listar todos os produtos que no foram vendidos listar o nome, tipo, marca e valor de venda de todos os produtos que no foram vendidos */ SELECT pr.NomeProduto, tp.NomeTipoProduto, ma.NomeMarca, pr.ValorVenda FROM Produto pr WITH(NOLOCK) INNER JOIN Marca ma WITH(NOLOCK) ON pr.IdMarca = ma.IdMarca INNE...
true
c8dbe6acf10a47ef73292248d2c995a24cea07fe
SQL
saudabdulaziz/SQL
/CS 460/assignment4/ASSIGNMENT4.sql
UTF-8
2,424
4.3125
4
[]
no_license
/* ************************************************************************************* assignment 4 CS 460 Saud Aljandal 1/22/2018 ************************************************************************************* */ SELECT * FROM item; SELECT * FROM customer; select * from cart; select * from cartitem; -- 1...
true
d75b3afadfc1cc7737e501bc11e19f9851174b8f
SQL
josegomezr/proyecto-t3
/bdd-completa.sql
UTF-8
14,340
3.421875
3
[]
no_license
-- ----------------------------------------------------- -- Schema proyecto -- ----------------------------------------------------- -- ----------------------------------------------------- -- Table conductor -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS conductor ( id_conductor...
true
fa888ae627af6c3bd548d19c4cbc383a0e6e6eea
SQL
didirs/ERNIE
/Postgres/Sessions.sql
UTF-8
1,103
3.46875
3
[]
no_license
-- Session info -- Aliases: current_database(), current_role SELECT current_catalog, current_schema, current_user, current_query(); -- Active server processes -- state: Current overall state of this backend. Possible values are: -- * active: The backend is executing a query. -- * idle: The backend is waiting for a n...
true
d0e8b77e888eeae7ec96da3e9769e33b9b97de06
SQL
OscarVerdugo/empleadostest
/database.sql
UTF-8
3,990
3.0625
3
[]
no_license
-- CREATE TABLE CTL_Turnos( -- nIdTurno INT NOT NULL PRIMARY KEY IDENTITY(1,1), -- cDescripcion VARCHAR(50) NOT NULL, -- bEstatus BIT NOT NULL DEFAULT(1) -- ); -- CREATE TABLE CTL_Tipo_Incidentes( -- nIdTipo_Incidente INT NOT NULL PRIMARY KEY IDENTITY(1,1), -- cDescripcion VARCHAR(50) NOT NULL, --...
true
d8adf898dd863efef901f67d592da780bfc0b2a6
SQL
cognovis/intranet-cust-fud
/sql/postgresql/intranet-cust-fud-create.sql
UTF-8
1,813
3.078125
3
[]
no_license
-- -- -- -- @author Malte Sussdorff (malte.sussdorff@cognovis.de) -- @creation-date 2012-06-08 -- @cvs-id $Id$ -- -- PM Association delete from im_categories where category_id = 1350; insert into im_categories ( category_id, category, category_type, category_gif, category_description) values (1350, ...
true
23eb32a7ccde60cafe5cf22519ec6e315755279e
SQL
giarsyaninuli/itnews
/public/db/itnews.sql
UTF-8
14,362
3.03125
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 3.5.8.1deb1 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Dec 31, 2014 at 11:48 PM -- Server version: 5.5.34-0ubuntu0.13.04.1 -- PHP Version: 5.4.9-4ubuntu2.4 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLI...
true
f5cc2fc6c29720c66bf06657c88688efdc86dc67
SQL
taksaru/FYP
/init_db.sql
UTF-8
786
3.578125
4
[]
no_license
DROP TABLE IF EXISTS tweets, topics, word_counts, mentions, tags, clients; CREATE TABLE tweets ( id VARCHAR(20) PRIMARY KEY, text VARCHAR(200), p_words SMALLINT, n_words SMALLINT, rating FLOAT, username VARCHAR(25), retweets INT, date TIMESTAMP ); CREATE TABLE topics ( topic VARCHAR(25), tweet_id ...
true
c8c3eeebf850c63ace7fe33fee9b7c000a2b2b32
SQL
marcelowender/bolao-project
/Create_DB.sql
UTF-8
5,466
3.34375
3
[]
no_license
-- MySQL Script generated by MySQL Workbench -- Sat Mar 3 01:41:25 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
aa2d60208272152bcd29d7b1e8301755d2bd8d7c
SQL
maureen44/dating
/database/datingDatabase.sql
UTF-8
1,480
3.6875
4
[]
no_license
DROP TABLE IF EXISTS member DROP TABLE IF EXISTS interest; DROP TABLE IF EXISTS member_interest; /*Creating member table*/ CREATE TABLE member ( member_id int NOT NULL AUTO_INCREMENT primary key, fname varchar(20) NOT NULL, lname varchar(20) NOT NULL, age int NOT NULL, gender varchar(6), ...
true
1da979db98f70be1c8d0c37fa86c841df3c42f7a
SQL
FelipeMP0/subway-monitor
/datastore/src/main/resources/sql/db/migration/V1.2__create_status.sql
UTF-8
212
2.703125
3
[]
no_license
CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; CREATE TABLE status ( slug VARCHAR NOT NULL, name VARCHAR NOT NULL, created_at timestamp NOT NULL DEFAULT NOW(), PRIMARY KEY (slug) );
true
b009b14278fb6d6239afd8c494df770791eb43c4
SQL
lanheixingkong/weixin-java-mp-demo-springmvc
/db/wx_mp_user.sql
UTF-8
1,146
2.921875
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : localhost Source Server Version : 50637 Source Host : localhost:3306 Source Database : weixin Target Server Type : MYSQL Target Server Version : 50637 File Encoding : 65001 Date: 2018-04-03 14:11:31 */ SET FOREIGN_KEY_CHECKS=0; -- --...
true
0dbc8f255d30d5f0eaaa95b57f135f35ba1790d2
SQL
yujihamaguchi/sql-QA
/p178_01.sql
UTF-8
280
3.3125
3
[]
no_license
-- Q: Teams2より、隊(team_id)の状態(status)が全て"待機"である隊を検索せよ。(NOT EXISTSを用いて) -- A: SELECT * FROM Teams2 r1 WHERE NOT EXISTS (SELECT * FROM Teams2 r2 WHERE r1.team_id = r2.team_id AND r2.status <> '待機') ;
true
24f3416b056fde1a0c8e1ee6cc79be7acee5425f
SQL
fmzhen/tt-dev-test
/db_tables/user.sql
UTF-8
1,124
3.140625
3
[]
no_license
/* Navicat Premium Data Transfer Source Server : local_pg Source Server Type : PostgreSQL Source Server Version : 100300 Source Host : localhost Source Database : tt-dev-test Source Schema : public Target Server Type : PostgreSQL Target Server Version : 100300 File Enco...
true
711a2e63ad8b36e971217ce3e1eb0aead1ea9fe5
SQL
Yuele-Ji/Leetcode-SQL
/1075. Project Employees I.sql
UTF-8
162
3.640625
4
[]
no_license
SELECT p.project_id, ROUND(AVG(e.experience_years),2) AS average_years FROM Project p LEFT JOIN Employee e ON e.employee_id = p.employee_id GROUP BY p.project_id
true
97cbec2941e8f5e4945c7ac2d0c27e56525f6925
SQL
jcpinto54/FEUP-BDAD-Proj
/sql/int1.sql
UTF-8
385
3.40625
3
[]
no_license
.mode columns .headers on .nullvalue NULL -- easy1: qual o isbn e a média das classificações dos livros mais bem avaliados pelos habitantes de Portugal? SELECT isbn, AVG(rate) FROM BookEvaluation NATURAL JOIN ( SELECT idperson, code FROM User NATURAL JOIN ( SELECT localitycode, code FROM Locality JOIN Country WH...
true
0d4bc57f6b2934dd68607549736a41bc794142da
SQL
panoramichq/fdq-templates
/bing_ads/projections/entity_accounts.sql
UTF-8
1,297
2.984375
3
[]
no_license
CREATE OR REPLACE VIEW "BING_ADS_VIEWS"."ENTITY_ACCOUNTS" AS SELECT DT.ID::VARCHAR AS ACCOUNT_ID, LAST_MODIFIED_TIME, AUTO_TAG_TYPE, BACK_UP_PAYMENT_INSTRUMENT_ID::VARCHAR AS BACK_UP_PAYMENT_INSTRUMENT_ID, BILL_TO_CUSTOMER_ID::VARCHAR AS BILL_TO_CUSTOMER_ID, BILLING_THRESHOLD_AMOUNT, CURRENCY_CODE, ACCO...
true
6cd3c5ce6fbfaf973bec92c6b8619bb6f7512083
SQL
ssingularity/expertSystemFinal
/backend/src/main/resources/schema.sql
UTF-8
3,144
3.203125
3
[]
no_license
create table if not exists `expert` ( `number` VARCHAR(50) NULL DEFAULT '' COMMENT 'number', `company` VARCHAR(50) NULL DEFAULT '' COMMENT 'company', `name` VARCHAR(50) NULL DEFAULT '' COMMENT 'name', `id` VARCHAR(50) NOT NULL COMMENT 'id' PRIMARY KEY , `...
true
d8ade093632003bcfc86916d4997a692d61c5733
SQL
hzr958/myProjects
/scmv6/dbscripts/history/6.0.6/test/v3scnf.sql
UTF-8
545
2.703125
3
[]
no_license
-- 数据库脚本登记示例 --原因(有CQ号带上CQ号) 2016-12-8 WSN begin --中间放sql语句 --原因(有CQ号带上CQ号) 2016-12-8 WSN end -------WSN alpha环境和development用不同的缓存地址 2017-8-23 begin alter table scnf_srv_cache add (env varchar2(50char)); comment on column scnf_srv_cache.env is '配置适用哪个环境的'; --环境有alpha、development、test、uat、run update scnf_srv...
true
5013957be6991f9a13bb3aa6d33813c594b3abce
SQL
anthonywittemann/Sabermetrics-SQL-Scripts
/payroll_of_teams_by_year.sql
UTF-8
266
4.25
4
[]
no_license
SELECT t.yearID, t.teamID, s.Payroll FROM Teams t JOIN ( SELECT yearID, teamID, SUM(salary) as Payroll FROM Salaries GROUP BY teamID, yearID ) s ON t.yearID = s.yearID AND t.teamID = s.teamID ORDER BY yearID, teamID
true
f70e31f9394e35e6eb420ebf3682d5e114151134
SQL
miraDask/DB-Basics-MS-SQL-Server-Sept-2019
/00.EXAM PREP - PREVIOUS EXAMS/Databases MSSQL Server Exam - 16 Apr 2019/SOLUTION/10. Passanger Trips.sql
UTF-8
249
3.90625
4
[]
no_license
SELECT CONCAT(p.FirstName, ' ', p.LastName) AS [Full Name], f.Origin, f.Destination FROM Passengers AS p JOIN Tickets AS t ON t.PassengerId = p.Id JOIN Flights AS f ON f.Id = t.FlightId ORDER BY [Full Name], f.Origin, f.Destination
true
3db310c8c855f36ea07a0dfc76816f83fbf3ba3e
SQL
unmtransinfo/ProteinGraphML
/cql/load_edge_mp.cql
UTF-8
1,144
3.46875
3
[ "BSD-2-Clause" ]
permissive
//// // EDGES ("relationships") //// // NOTE: LOAD CSV vals read as strings. // NOTE: Cypher regex matches ENTIRE string. //// //Debugging: //LOAD CSV WITH HEADERS FROM "file:///ProteinGraphML/kg.tsv" //AS row FIELDTERMINATOR '\t' WITH row //MATCH (s {ID:row.sourceId}), (t {ID:row.targetId}) //WHERE row.node_or_edge = ...
true
a5b0a151dcaa81311143b26e2e26f4b542b75be2
SQL
n-jun-k2/Flask_train
/db/conf.d/create_table.sql
UTF-8
897
3.34375
3
[]
no_license
DROP TABLE IF EXISTS USER; DROP TABLE IF EXISTS CHARS; DROP TABLE IF EXISTS SampleLike; DROP TABLE IF EXISTS Shohin; DROP TABLE IF EXISTS Skills; DROP TABLE IF EXISTS Vehicle; CREATE TABLE USER ( id CHAR(4) NOT NULL PRIMARY KEY, password VARCHAR(100) NOT NULL ); CREATE TABLE CHARS ( chr CHAR(3) NOT NULL, ...
true
2567a230b3d4d87507385bc0f0d30e9adabb9286
SQL
Leidy1007/Actividad1
/Base de datos/diseño web/diarioo.sql
UTF-8
6,367
3.125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 08-02-2018 a las 04:37:42 -- Versión del servidor: 10.1.9-MariaDB -- Versión de PHP: 5.6.15 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=...
true
55dd9d49f42bafa55c49fe085ec10a46640e7282
SQL
lol768/tabula
/config/scripts/schema/migrations/2012-10-22 - feedback forms.sql
UTF-8
403
2.953125
3
[ "ISC" ]
permissive
create table FeedbackTemplate ( id nvarchar2(255) not null, name nvarchar2(255), description nvarchar2(4000), department_id nvarchar2(255), attachment_id nvarchar2(255), CONSTRAINT "FEEDBACKTEMPLATE_PK" PRIMARY KEY ("ID") ); create index feedbacktemplate_department on feedbacktemplate(departmen...
true
b18f4f07a990367d66e603cb17b97ae3ae84eaae
SQL
prodigyK/IpTable
/src/main/resources/db/populateDB.sql
UTF-8
5,340
2.90625
3
[]
no_license
SET FOREIGN_KEY_CHECKS = 0; TRUNCATE ip_addresses; TRUNCATE departments; TRUNCATE device_types; TRUNCATE subnets; TRUNCATE users; TRUNCATE log_changes_details; TRUNCATE log_changes; SET FOREIGN_KEY_CHECKS = 1; ALTER TABLE ip_addresses AUTO_INCREMENT = 100000; ALTER TABLE device_types AUTO_INCREMENT = 1000; ALTER TABLE ...
true
31d54a0d25f8761e705804b2e8899a27cfd2f14c
SQL
josecamps/quickstart_SpringMVC_Hibernate
/env/quickstart.sql
UTF-8
4,804
3.171875
3
[]
no_license
-- -- PostgreSQL database dump -- SET statement_timeout = 0; SET lock_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings = on; SET check_function_bodies = false; SET client_min_messages = warning; -- -- Name: quickstart; Type: DATABASE; Schema: -; Owner: postgres -- CREATE DATABASE quickstart...
true
66d7b32b915d3753b1e5393d7c9fa83eeb7ffcb7
SQL
Sushruth17/CollegeManager
/studentdb (2).sql
UTF-8
9,572
3.40625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jul 12, 2020 at 05:37 PM -- Server version: 10.4.11-MariaDB -- PHP Version: 7.4.6 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIEN...
true
784a725c792e773bd0e5a6e052f676c7ebeed26c
SQL
madoed/UNC-2018
/src/main/resources/sql/008_chat.sql
UTF-8
1,541
2.609375
3
[]
no_license
insert into Obj_types (object_type_id, name) values (6,'chat'); insert into attributes (attr_id, attr_name,attr_type) values (1029,'chatName', 0), (1030,'subscribers', 0), (1088,'chatType', 0), (1089,'lastMessage', 0), (1090,'lastSender', 0), (1091,'lastUpdate', 0); insert into Obj_attributes (object_type_id, attr_id...
true
1140779a666e0a7a68caeb85fb2face994a9c154
SQL
kuflievskiy/test-codeception-on-travis
/tests/dump/db.sql
UTF-8
520
2.5625
3
[]
no_license
-- -- Table structure for table `test_table_1` -- CREATE TABLE IF NOT EXISTS `test_table_1` ( `id` int(11) NOT NULL AUTO_INCREMENT, `field_float` float NOT NULL, `field_varchar_1` varchar(255) NOT NULL, `field_varchar_2` varchar(255) NOT NULL, `field_enum` enum('Y','N') NOT NULL, PRIMARY KEY (`id`) ) ENGIN...
true
cb742f90fd7276890ddad022a494a22307a223b3
SQL
christinasam/hackerrank-challenge-solutions
/SQL/aggregation/weather-observation-station-13.sql
UTF-8
252
3.6875
4
[]
no_license
/* Query the sum of Northern Latitudes (LAT_N) from STATION having values greater than 38.7800 and less than 137.2345. Truncate your answer to 4 decimal places.. */ SELECT ROUND(SUM(lat_n), 4) FROM station WHERE lat_n > 38.7800 AND lat_n < 137.2345;
true
9bd2a09442a4ea81e45cbfd32bc707ed1ba90172
SQL
dowglaz/Projeto-labbd
/ProjetoLabBD/src/arquivos_SQL/PackPessoa.sql
UTF-8
13,416
3.875
4
[]
no_license
create or replace PACKAGE PackPessoa IS /*Neste pacote estão contidos procedimentos e funções relacionadas a tabela pessoa, empregado e piloto. Nele estão alguns dos procedimentos/funções para a consulta: Consulta 2: a partir de um CPF de um determinado empregado, busca seu nome, endereço, salário, turno em ...
true
569fe0caa89143cf88449a564c10676e7a1ea137
SQL
doenny10/TeknologiWeb
/userpasto.sql
UTF-8
1,768
3.0625
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.7.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jul 05, 2018 at 07:12 PM -- Server version: 10.1.26-MariaDB -- PHP Version: 7.1.9 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
true
82d02af66821d8514f14d06c014685db7685a074
SQL
determined-ai/determined
/master/static/srv/get_workspaces.sql
UTF-8
1,139
4
4
[ "Apache-2.0" ]
permissive
SELECT w.id, w.name, w.archived, w.immutable, u.username, w.user_id, (pins.id IS NOT NULL) AS pinned, pins.created_at AS pinned_at, 'WORKSPACE_STATE_' || w.state AS state, w.error_message, w.default_compute_pool, w.default_aux_pool, (CASE WHEN uid IS NOT NULL OR gid IS NOT NULL OR user_ IS NOT NULL OR group_ IS NOT NUL...
true
0573f1cc605db54e7d3a0b0cec4c9b34fa399708
SQL
StefanoChessa/amm2015
/enciclopediafilm/amm15_chessaStefanorai.sql
UTF-8
4,568
3.171875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.0.10deb1 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generato il: Feb 13, 2016 alle 18:36 -- Versione del server: 5.5.41-0ubuntu0.14.04.1 -- Versione PHP: 5.5.9-1ubuntu4.6 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_C...
true
aa8f952435022dbbde3ad277e556d20612dc5233
SQL
opengauss-mirror/openGauss-server
/src/test/regress/sql/vec_sonic_agg3.sql
UTF-8
4,099
3.484375
3
[ "LicenseRef-scancode-mulanpsl-2.0-en", "LicenseRef-scancode-unknown-license-reference", "PostgreSQL", "BSD-3-Clause", "LGPL-2.0-or-later", "LicenseRef-scancode-unicode", "LicenseRef-scancode-warranty-disclaimer", "curl", "GPL-1.0-or-later", "LGPL-2.1-or-later", "LGPL-2.1-only", "CC-BY-4.0", ...
permissive
-- test for replication table set current_schema=vsonic_agg_engine; set enable_sonic_hashjoin=on; set enable_sonic_hashagg=on; set enable_sort = off; set time zone prc; set time zone prc; set datestyle to iso; --groupby columns with different types explain (costs off) select min(col_a2) from VECTOR_AGG_TABLE_04 wher...
true
48cfe1dbddb035a6b5a46c0b02d3d779808295df
SQL
hujingleo/trunk
/carrots-replay-home-service/src/main/resources/dbscript/all.sql
UTF-8
4,712
3.46875
3
[]
no_license
-- ---------------------------- -- Table structure for `company` -- ---------------------------- -- DROP TABLE IF EXISTS `company`; CREATE TABLE `company` ( `id` bigint NOT NULL AUTO_INCREMENT COMMENT '公司id自增主键', `name` varchar NOT NULL COMMENT '公司名称', `province` varchar NOT NULL COMMENT '省编码', ...
true
f99795c798b2e4df161c360f11003a7b6a42fd25
SQL
chiqvito/ygd
/resources/structure.sql
UTF-8
503
3.46875
3
[]
no_license
CREATE TABLE products ( id serial PRIMARY KEY NOT NULL, name VARCHAR(255) NULL ) ENGINE InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci; CREATE TABLE orders ( id serial PRIMARY KEY NOT NULL, product_id BIGINT UNSIGNED NOT NULL, createdate TIMESTAMP NOT NULL DEFAULT now(), quantity BIGINT UNSIGNED...
true
be9012e364c7ebe8e8eb1c5130396fff5b112878
SQL
Markychoco/Php-Reg
/registered_users.sql
UTF-8
390
2.875
3
[ "MIT" ]
permissive
-- -- Table structure for table `registered_users` -- CREATE TABLE IF NOT EXISTS `registered_users` ( `id` int(8) NOT NULL AUTO_INCREMENT, `user_name` varchar(255) NOT NULL, `first_name` varchar(255) NOT NULL, `last_name` varchar(255) NOT NULL, `password` varchar(25) NOT NULL, `email` varchar(55)...
true
857cf1aec86ef2a73f6f8658e0b8b85df623b1cf
SQL
Kevin-Ferri/SQL
/CASE10.sql
UTF-8
426
3.84375
4
[]
no_license
--CASE #10 SELECT patient_history.physician_id, Physician.Physician_last_name, Physician.Physician_first_name, COUNT(DISTINCT patient_history.patient_id) AS "Number of Unique Visits" FROM Patient_history JOIN Physician ON Physician.physician_id=patient_history.physician_id GROUP BY patient_history.physician_i...
true
dbd29bfd9c6d6fe6925de53e6cc5d282ff73cc91
SQL
chingnaw/W205
/exercise1/investigations/hospital_variability/hospital_variability.sql
UTF-8
326
2.75
3
[]
no_license
select measureid, measurename, stddev(score) as stdscore, count(score) as num from care group by measureid, measurename order by stdscore desc limit 10 ; select measureid, measurename, stddev(score) as stdscore, count(score) as num from care group by measureid, measurename having num > 20 order by stdscore desc limit ...
true
8f781d6e55ae4e9ea7cb320f0766b1090435fa01
SQL
lgcarrier/AFW
/5.2.3/Database/Constraints/AFW_12_DOMN_UK1.sql
UTF-8
112
2.5625
3
[ "MIT" ]
permissive
SET DEFINE OFF; ALTER TABLE AFW_12_DOMN ADD ( CONSTRAINT AFW_12_DOMN_UK1 UNIQUE (CODE) ENABLE VALIDATE) /
true
9a50e8d37bbb95a44d715623f1f37cc2144828bc
SQL
santlalvishwakarma/RootBranch
/PortalBase/database/mysql/functions/core/fn_core_get_color_code_based_on_id.sql
UTF-8
442
3.234375
3
[]
no_license
DROP FUNCTION IF EXISTS fn_core_get_color_code_based_on_id; DELIMITER $$ CREATE FUNCTION fn_core_get_color_code_based_on_id(p_color_id INT(10)) RETURNS VARCHAR(60) READS SQL DATA BEGIN DECLARE v_color_code VARCHAR(60); SELECT ccm.color_code INTO v_color_code FROM co...
true
2497a49c4e98d3230b93da6d6a71a6b545cf2be8
SQL
Gabrielopes01/AulasSQL
/DesafiosSql.sql
UTF-8
707
4.0625
4
[]
no_license
--Desafio 1 - Quantos produtos custam mais de 1500? SELECT COUNT(ListPrice) FROM production.product WHERE ListPrice > 1500; --Desafio 2- Quantas pessoas tem sobrenome que começam com P? SELECT COUNT(LastName) FROM person.person WHERE LastName LIKE 'p%'; --Desafio 3 - Quantas cidades distintas estão cadastradas? SEL...
true
2ac9c55bfcaf2f8e84fe9a62517b3e5cb8597a36
SQL
Shweta-Barai/DotNetProjects
/Day9PracticeCRUD&LayerArchitecture/Sql/MyScriptDay7mine.sql
UTF-8
1,413
4.03125
4
[]
no_license
CREATE DATABASE CoffeeShop USE CoffeeShop /**/ /*CREATE TABLE COLUMN*/ CREATE TABLE Items( ID INT IDENTITY(1,1), Name VARCHAR(50), Price FLOAT ) /*drop table items : DROP TABLE Items*/ SELECT * FROM Items /*INSERT VALUE OF attribute in COLUMN*/ INSERT INTO Items (Name, Price) Values ('BLACK',160) INSERT INTO Items...
true
b3d1ccbc220190fd356f5e6e783f1aad8ed69407
SQL
SeokJinCheol/finalPro
/target/team4-1.0.0-BUILD-SNAPSHOT/WEB-INF/db/RegisterBoard.sql
UHC
799
2.78125
3
[]
no_license
//뿩ϱ Խ create table registerBoard( codeNum number(10) PRIMARY KEY, category varchar2(15) not null, title varchar2(100) not null, startDate varchar2(30) not null, endDate varchar2(30) not null, userstartDate varchar2(30), userendDate varchar2(30), contents varchar2(2000) not null, bill number(15), deposit number(15), pa...
true
4c1e8a272f1950e5cc5e6e7278a14a7d5fece6de
SQL
Zhumabaevnurs/LaundryScheduleProject
/ABCDB.sql
UTF-8
513
3.1875
3
[]
no_license
create database CSC350GroupCTerm; create table CSC350GroupCTerm.UserInfo ( USERID varchar(45) not null, PASSWORD varchar(45) not null, FIRSTNAME varchar(45) not null, LASTNAME varchar(45) not null, EMAIL varchar(45) not null, PHONE varchar(10) not null, APT varchar(2) not null, primary key(USERID), key APT (APT...
true
874431625c84f39b8721c5deeb960df8c73109bd
SQL
codesoftware/77DATA_BASE
/uniques/IN_TPPFA_UNIQUES.sql
UTF-8
383
2.71875
3
[]
no_license
-- --Llave con la cual se garantiza que ningun producto o --receta se va ha repetir en la pagina principal de facturacion -- ALTER TABLE IN_TPPFA ADD CONSTRAINT PPFA_PROD_UNIQUE UNIQUE (PPFA_CODIGO,PPFA_TIPO) ; -- --Garantiza que no haya un producto del mismo tipo en la misma posicion -- ALTER TABLE IN_TPPFA ADD CONS...
true
fdbee5ab86140f72fc540defa30d2c6d07139904
SQL
sujeetdiwakar/web-learning-advance-php
/310-update-or-edit-data-using-jquery-dialogify-with-php-ajax/db.sql
UTF-8
2,253
3.109375
3
[]
no_license
-- -- Database: `testing` -- -- -------------------------------------------------------- -- -- Table structure for table `tbl_employee` -- CREATE TABLE `tbl_employee` ( `id` int(11) NOT NULL, `name` varchar(50) NOT NULL, `address` text NOT NULL, `gender` varchar(10) NOT NULL, `designation` v...
true
256cf1c384ec159fd47d91e83fa0337a410cd930
SQL
andermev/ArqSoftwareSpringBootUdeA
/demoUdeA/src/main/resources/universidad.sql
UTF-8
6,153
3.53125
4
[]
no_license
-- -------------------------------------------------------- -- Host: 127.0.0.1 -- Versión del servidor: 5.7.18-log - MySQL Community Server (GPL) -- SO del servidor: Win64 -- HeidiSQL Versión: 9.4.0.5125 -- --------------------------------------------------------...
true
333c205b584585875fab2dfe547fd8d924269638
SQL
ElValenti/GenieLogENSC
/genieLogicielProjet_V11_SchneiderValenti/DAL/DB/gestionMdp_structure.sql
UTF-8
1,014
3.5
4
[]
no_license
 create database if not exists gestionMdp character set utf8 collate utf8_unicode_ci; use gestionMdp; grant all privileges on gestionMdp.* to 'gestionMdp_user'@'localhost' identified by 'secret'; drop table if exists compte; drop table if exists utilisateur; drop table if exists wifi; create table utilisateur ( ...
true
b98ebcef898e321f1da44c95e483edfba1e27904
SQL
faisaltheparttimecoder/Greenplum
/gpdb-check-health/sql/database-segments-orphan-locks.sql
UTF-8
940
4.03125
4
[]
no_license
SELECT w.relation::regclass AS "Table", w.mode AS "Waiters Mode", w.pid AS "Waiters PID", w.mppsessionid AS "Waiters SessionID", b.mode AS "Blockers Mode", b.pid AS "Blockers PID", b.mppsessionid AS "Blockers SessionID", ...
true
564885fa9c6fd049291e0bd4d87affc5350009cc
SQL
OrfaG4/OffersArroundMe
/offers.sql
UTF-8
6,540
2.953125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.2.7.1 -- http://www.phpmyadmin.net -- -- Φιλοξενητής: 127.0.0.1 -- Χρόνος δημιουργίας: 15 Ιαν 2015 στις 23:48:03 -- Έκδοση διακομιστή: 5.6.20 -- Έκδοση PHP: 5.5.15 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_...
true
f5fbcf36e8ce4d1387c3604736ea33c6eb391846
SQL
T-BoneMadSkrilla/sim2prac
/db/create_table.sql
UTF-8
536
2.84375
3
[]
no_license
-- CREATE TABLE mytable ( -- product_id SERIAL PRIMARY KEY NOT NULL, -- name varchar(40) NOT NULL, -- description varchar(80) NOT NULL, -- price integer NOT NULL, -- image_url text NOT NULL -- ); CREATE TABLE beers ( id SERIAL PRIMARY KEY, name VARCHAR(50) NOT NULL, beerstyle VARCHAR(50) NOT NULL...
true
aa43dd46ac3ccf972e794e6c0b1ac39e981df318
SQL
MeghnaPatel1/Kitces-Member-Database
/Membership/Tables/MembershipHistory.sql
UTF-8
467
3.015625
3
[]
no_license
CREATE TABLE [Membership].[MembershipHistory] ( [MembershipHistoryId] INT NOT NULL, [UserId] INT NULL, [MembershipLevelId] INT NULL, [Active] BIT NULL, [AddDate] NCHAR (10) NULL, CONSTRAINT [PK_MembershipHistory] PRIMARY KEY CL...
true
9ff13ff5102d37831fe87fd58edf8bb9bb678de9
SQL
Deyan-Stoyanov/SoftUni_Databases_Frameworks_Hibernate_-_Spring_Data
/9.2 Spring Data Advanced Querying - Exercise/SpringExerciseBookshopSystemProject/src/main/resources/procedure.sql
UTF-8
332
3.625
4
[]
no_license
CREATE PROCEDURE usp_total_books(IN first_name VARCHAR(255), IN last_name VARCHAR(255), OUT number_of_books INT) BEGIN SET number_of_books=(SELECT COUNT(*) AS total_books FROM books AS b JOIN authors AS a ON a.author_id = b.author_id WHERE a.first_name = first_name AND a.last_name = last...
true
f8a872021a462d97a6f04ef1bc98dc9689e689e6
SQL
customme/etl
/etl-shell/sql/新版SDK.sql
UTF-8
1,617
3.34375
3
[]
no_license
-- 留存率统计 SELECT b.platform, STR_TO_DATE(a.create_date, '%Y%m%d'), COUNT(DISTINCT a.uuid, IF(a.date_diff = 0, 1, NULL)) new_cnt, ROUND(COUNT(DISTINCT a.uuid, IF(a.date_diff = 1, 1, NULL)) / COUNT(DISTINCT a.uuid, IF(a.date_diff = 0, 1, NULL)) * 100, 2) keep_pct, ROUND(COUNT(DISTINCT a.uuid, IF(a.date_diff >= 1, 1,...
true
ce83967a9d790c89af11a6141bf8f89d647fb460
SQL
oniubi/github-repositories
/SpringMVC-Mybatis-Shiro-redis-0.2/sql/springmvc-mybatis-shiro-redis-0.2.sql
UTF-8
11,102
3.0625
3
[ "Apache-2.0" ]
permissive
/* Navicat MySQL Data Transfer Source Server : localhost_UR_dahua Source Server Version : 50539 Source Host : localhost:3306 Source Database : springmvc-mybatis-shiro-redis-0.2 Target Server Type : MYSQL Target Server Version : 50539 File Encoding : 65001 Date: 2017-04-15 09:13:18 ...
true
38681fe754570ed69a4e447d248156d010d224bf
SQL
nss-evening-cohort-3/learning-sql-individual-assignment-SandraJones
/QuestionSeven.sql
UTF-8
468
3.84375
4
[]
no_license
--Provide a query that shows the invoices associated --with each sales agent. The resultant table should --include the Sales Agent's full name. SELECT InvoiceId, agentname FROM (SELECT I.InvoiceId, E.FirstName ||' '|| E.LastName AS agentname, E.LastName FROM CUSTOMER C JOIN INVOICE I ON C.Cus...
true
d05ee94bf6162b200a2cf668195aa91289573498
SQL
eurojulien/GTI619LAB5
/conf/evolutions/default/1.sql
UTF-8
1,802
3.140625
3
[ "Apache-2.0" ]
permissive
# --- Created by Ebean DDL # To stop Ebean DDL generation, remove this comment and start using Evolutions # --- !Ups create table passwords ( id bigint not null, askdatetime timestamp, enddatetime timestamp, passphrase varchar(255), isvalid ...
true
0d4ad94261bfbce71789832fb3dbb3c2e8891ba2
SQL
radtek/abs3
/sql/mmfo/bars/Table/ZAY_REF_NULL.sql
WINDOWS-1251
2,717
3.015625
3
[]
no_license
PROMPT ===================================================================================== PROMPT *** Run *** ========== Scripts /Sql/BARS/Table/ZAY_REF_NULL.sql =========*** Run *** ===== PROMPT ===================================================================================== PROMPT *** ALTER_POLICY_INF...
true
1b9cdd9aa74b59254f84eb06ca0a3bdf5ae9bebd
SQL
scheshan/leetcode
/src/main/java/sql/p1445.sql
UTF-8
137
3.453125
3
[]
no_license
select sale_date, sum(case fruit when 'apples' then sold_num when 'oranges' then -1 * sold_num end) as diff from Sales group by sale_date
true
37a73459a4993abdba6bed3c0579eae17f32d701
SQL
sirmasterapu/RestaurantFinder
/StartDatabaseScript.sql
UTF-8
1,924
3.21875
3
[]
no_license
-- 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='ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTI...
true
fc34100abeef4f9a34301e09d3370b83d2f87f1d
SQL
KuntanSutar/Swabhav-Techlabs
/sql/ORCLTOMYSQL.sql
UTF-8
6,818
3.15625
3
[]
no_license
CREATE TABLE DEPT ( DEPTNO integer NOT NULL, DNAME varchar(14), LOC varchar(13), CONSTRAINT DEPT_PRIMARY_KEY PRIMARY KEY (DEPTNO)); INSERT INTO DEPT VALUES (10,'ACCOUNTING','NEW YORK'); INSERT INTO DEPT VALUES (20,'RESEARCH','DALLAS'); INSERT INTO DEPT VALUES (30,'SALES...
true
1a266b3d95346d7bbf528295b03d532c1f61320a
SQL
KarmaScripter/BudgetExecution
/Data/Database/Access/DataModels/UPDATE/UpdateStateGrantObligationsFundNames.sql
UTF-8
194
2.984375
3
[ "MIT" ]
permissive
UPDATE StateGrantObligations INNER JOIN Funds ON Funds.Code = StateGrantObligations.FundCode SET StateGrantObligations.FundName = Funds.Name WHERE StateGrantObligations.FundCode = Funds.Code;
true
d2446e0e1ec31a85a2ee1849fa3c8acbc1154f39
SQL
mattsalo81/adaptive_infrastructure
/SQL_configs/effective_component_info.sql
UTF-8
1,094
2.671875
3
[]
no_license
create table effective_component_info( technology varchar2 (16) not null, program varchar2 (32) not null, component varchar2 (128) not null, constraint eff_comp_pk PRIMARY KEY (technology, program, component) ); insert into effective_component_info (technology, program, component) values ('TEST', 'PRO...
true
73cc9baa7fdcc89bf459a1a98281b68f930ca16b
SQL
anlenhk/framework
/framework-task/framework-task-core/src/main/java/com/fccfc/framework/task/core/dao/sql/JobDao_insertTaskHistory.sql
UTF-8
586
3.109375
3
[]
no_license
INSERT INTO TASK_HISTORY ( TASK_ID, SEQ, TASK_NAME, TASK_STATE, CLASS_NAME, CREATE_TIME, IS_CONCURRENT, LAST_EXECUTE_TIME, METHOD, MODULE_CODE, NEXT_EXCUTE_DATE, OPERATOR_ID, PRIORITY, UPDATE_TIME, UPDATE_OPERATOR_ID ) SELECT TASK_ID, (SELECT COUNT(*) + 1 FROM TASK_HISTORY WHERE TASK_ID = :taskId ) AS...
true