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
b549175f36eae1a4ed3370ab5377fcbaa8a6db81
SQL
HomeIncorporated/BuyingCatalogueOrdering
/src/NHSD.BuyingCatalogue.Ordering.OrderingDatabase/Tables/Address.sql
UTF-8
425
2.796875
3
[]
no_license
CREATE TABLE dbo.[Address] ( AddressId INT IDENTITY(1, 1) NOT NULL, Line1 NVARCHAR(256) NULL, Line2 NVARCHAR(256) NULL, Line3 NVARCHAR(256) NULL, Line4 NVARCHAR(256) NULL, Line5 NVARCHAR(256) NULL, Town NVARCHAR(256) NULL, County NVARCHAR(256) NULL, Postcode NVARCH...
true
95a5d73222508907182e55aa15faf6250c020f82
SQL
emkamp/HW12-Bamazon
/db creation and population.sql
UTF-8
1,878
2.890625
3
[]
no_license
create database Bamazon; use Bamazon; create table products( item_id integer(4) auto_increment not null, product_name varchar(200) not null, department_name varchar(60) not null, price float not null, stock_quantity integer(4) not null, primary key(item_id) ); insert into products (product_name, department_name, pric...
true
30766f6018f4f242bfa12fc880f8a7de28a08e1f
SQL
Chonnisat/trainWeb
/mysql/loginScript.sql
UTF-8
301
2.75
3
[]
no_license
-- login select user_code as "userCode" , user_first_name as "userName" , user_last_name as "userLastName" , user_email as "userEmail" from sc_user where (user_code = '${dat.userCode}' or user_email = '${dat.userCode}') and user_pwd = '${dat.userPwd}' and user_active = 'Y';
true
9077061cdea40fd9976ca9343f9cd6e2d24ed12c
SQL
JavaFS210601/P0-KhaNguyenN
/Project-0/ratingsBoard.sql
UTF-8
2,040
3.65625
4
[]
no_license
CREATE TABLE teacher_things (teacher_id serial PRIMARY KEY, teacher_firstname text, teacher_lastname text, teacher_subject text, teacher_rating int ); create table student_things (student_id serial primary key, student_firstname text, student_lastname text, student_r...
true
d0005640b8d549a621691a81980838181c63639c
SQL
marwa593/Clinic-database
/clinic.sql
WINDOWS-1250
9,594
3.234375
3
[]
no_license
create database clinic; use clinic; create table doctor ( doctor_id int primary key identity , fullname varchar(50), phone decimal(38, 0), gender varchar(50), gmail varchar(50), Specialization varchar(50), ); insert into doctor (fullname,phone,gender,gmail,Specialization)values('ahmedmohamedzaki',012365...
true
2ed695d0806a1e7bc156d79e036f0abaf575eac4
SQL
li6612773/projectHome
/src/main/java/com/sjli/db/DB01_SQL_AutoIcrement.sql
UTF-8
273
2.546875
3
[]
no_license
select max(id) from learnjdbc.students; SELECT LAST_INSERT_ID() ; alter table class MODIFY classid int auto_increment alter table user auto_increment=1 -- /*注auto_increment不能为负数*/ create table test2(id int primary key auto_increment,name VARCHAR(20));
true
e93e840e7232df79f01cd47aa3581b7e3b1dbab1
SQL
rajatj9/COMP3278-Database-Management-Assignments
/a2/q2.sql
UTF-8
98
3.140625
3
[]
no_license
SELECT I.ID, I.name FROM instructor I WHERE I.salary in (SELECT MAX(I2.salary) from instructor I2)
true
f6a22d116ebd9279198edac1f1aa716fd30ae073
SQL
oMitrokhin/dbis
/km52/Mitrokhin_Oleksii/laboratory1.sql
UTF-8
3,833
3.609375
4
[]
no_license
-- LABORATORY WORK 1 -- BY Mitrokhin_Oleksii /*--------------------------------------------------------------------------- 1.Створити схему даних з назвою – прізвище студента, у якій користувач може: видаляти дані з таблиці 4 бали ---------------------------------------------------------------------------*/ --Код від...
true
d5e240775a3acec2f57877d05850f7b13ef930f4
SQL
francisco-cabadas/chatFb
/minifb.sql
UTF-8
3,308
3.203125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.9.1 -- https://www.phpmyadmin.net/ -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 08-01-2020 a las 00:22:01 -- Versión del servidor: 5.5.24-log -- Versión de PHP: 7.2.24 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*...
true
982d9f00ce5692e231348183699c3029fe275579
SQL
Kathleen-Fidelis/MySQL
/Atividade1/exercicio3.sql
UTF-8
1,254
3.453125
3
[]
no_license
create database db_escola; use db_escola; create table tb_alunos( id bigint auto_increment, nome varchar(255) not null, matricula bigint not null, tipo varchar(30) not null, turno varchar(20) not null, nota float not null, primary key (id) ); insert into tb_alunos (nome,matricula,tipo,turno,n...
true
95dfac26fd85040f82c10bf91929ff9f51bd65ed
SQL
CUBRID/cubrid-testcases
/sql/_13_issues/_23_1h/cases/cbrd_24906_2.sql
UTF-8
8,893
3.765625
4
[ "BSD-3-Clause" ]
permissive
drop table if exists tbl_a, tbl_b, tbl_c; create table tbl_a (col_a int primary key, col_b int, col_c int); create table tbl_b (col_a int primary key, col_b int, col_c int); create table tbl_c (col_a int primary key, col_b int, col_c int); insert into tbl_a select rownum, rownum, rownum from db_class a, db_class b, d...
true
958d1f199031721d84456d2ad706376200e8db29
SQL
EnzoFab/on_est_la
/server/init_db.sql
UTF-8
10,856
3.09375
3
[]
no_license
------------------------------------------------------------ -- Script Postgre ------------------------------------------------------------ ------------------------------------------------------------ -- Drop ------------------------------------------------------------ DROP TABLE IF EXISTS public.Participate...
true
c25b132f2867a832977389f1e4db855a0aa76ff5
SQL
YvesSavean/TPAssociation
/Persistance/BDD/initDerbyBDD.sql
ISO-8859-1
4,107
3.25
3
[]
no_license
/* Configuration Base de donnes */ /* 1/ Lancer Derby sur le pc */ /* 2/ puis configurer derby sur eclipse window preference */ /* 3/ puis new Derby sur eclipse perspective Database Development */ /* 4/ Infos : */ /* name : DerbyBDDAssociation */ /* data base : DerbyBDDAssociation */ /* host : localhost */ /* p...
true
5c925305101421fcce94f2b368be430459643153
SQL
FreakishNature/DB
/lab6/ex3.2.sql
UTF-8
562
4.09375
4
[]
no_license
select studenti.Nume_Student,studenti.Prenume_Student, grupe.Cod_Grupa ,avg(cast(Nota as float)) from studenti_reusita join studenti on studenti.Id_Student = studenti_reusita.Id_Student join grupe on grupe.Id_Grupa = studenti_reusita.Id_Grupa group by studenti.Nume_Student,studenti.Prenume_Student, grupe.Cod_Gr...
true
374118344131ff91f8df660a7a5bc39a47db9635
SQL
ambari-extended/ambari-view-control-center
/src/main/resources/db/migration/V1__setup_initial_db.sql
UTF-8
4,543
3.46875
3
[]
no_license
-- Table creation DDLs CREATE TABLE settings ( id BIGINT AUTO_INCREMENT PRIMARY KEY, key_group VARCHAR(50) NOT NULL , name VARCHAR(100) NOT NULL , display_text VARCHAR(512) , help_text VARCHAR(2000) , value ...
true
b7e02e11cbe4987a8ca43168c83c27ca30ae2286
SQL
bravesoftdz/sgts
/sql/oracle/patch_16.10.2007/234_create_view_otv_journal_observations_gmo.sql
WINDOWS-1251
618
2.59375
3
[]
no_license
/* */ CREATE OR REPLACE VIEW S_OTV_JOURNAL_OBSERVATIONS_GMO AS SELECT OTV.*, GMO.UVB, GMO.UNB, GMO.T_AIR, GMO.T_WATER, GMO.RAIN_DAY, GMO.PREC, GMO.PREC_NAME, GMO.UNSET, GMO.INFLUX, GMO.V_VAULT, GMO.UVB_INC, GMO.RAIN_YEAR, GMO.T_AIR_10, GMO.T_AIR_30 FROM S_...
true
cb7766539e43c5a4e34eae246ad646bff415327e
SQL
igorasilveira/BDAD
/3a entrega/gatilho3_verifica.sql
UTF-8
717
2.921875
3
[]
no_license
-- BDAD @ MIEIC, grupo 203 -- TRIGGER 3 - VERIFICA -- Ao seguir um utilizador, é criada uma playlist propria com as musicas favoritas do utilizador seguido select PlaylistGuardaMusica.musicaID AS musicaID_1 from PlaylistGuardaMusica, Playlist where (Playlist.criador = 'jcook11' and PlaylistGuardaMusica.playlistID = Pl...
true
30261bd8153b666856b9502b58d2dcb331b654b2
SQL
MalorieGenoud/Gestion_Projet
/bones.sql
UTF-8
9,295
3.375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.4.12 -- http://www.phpmyadmin.net -- -- Client : 127.0.0.1 -- Généré le : Mar 19 Avril 2016 à 10:31 -- Version du serveur : 5.6.25 -- Version de PHP : 5.6.11 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SE...
true
8898181f3e38ce0f81d66827ee456f1e0d7607ad
SQL
qiangziwwq/iBase4J
/sqls/4.biz.sql
UTF-8
1,990
3.296875
3
[ "Apache-2.0", "ICU" ]
permissive
CREATE DATABASE IF NOT EXISTS `ibase4j_biz`; USE `ibase4j_biz`; CREATE TABLE IF NOT EXISTS `t_member` ( `id_` bigint(20) NOT NULL AUTO_INCREMENT, `user_name` varchar(64) DEFAULT NULL COMMENT '姓名', `password_` varchar(50) DEFAULT NULL COMMENT '密码', `phone_` varchar(11) NOT NULL COMMENT '电话', `nick_nam...
true
ccfae7d13858744191925f3c750f7139bed7c8b9
SQL
muzierixao/Learning-Java
/06-Java-Advanced/03-MySQL-Advanced/04、如何删除索引.sql
UTF-8
507
2.796875
3
[]
no_license
CREATE X DROP INDEX idx_xxx ON emp 1 查出该表有哪些索引,索引名-->集合 SHOW INDEX FROM t_emp 元数据:meta DATA 描述数据的数据 SELECT index_name FROM information_schema.STATISTICS WHERE table_name='t_emp' AND table_schema='mydb' AND index_name <>'PRIMARY' AND seq_in_index = 1 2 如何循环集合 CURSOR 游标 FETCH xxx INTO xxx ...
true
8f46b26160353c83b01f7516ed60e7f78818bd6c
SQL
wlong3000/LiamLongProjects
/SoupaStars/SoupaStarsDatabase.sql
UTF-8
5,008
3.359375
3
[]
no_license
use SoupaStars; create table if not exists SoupaStars.Post (PostID int not null auto_increment, Title varchar(50) not null, PostYear int not null, PostMonth varchar(10) not null, PostDay int not null, Author varchar(50) not null, PostBody text(999999) not null, Category varchar(50) not null, primary key (PostID) ); I...
true
80bfc03e0b61fc699f7cad33cfd3ec6d8892f97a
SQL
nabilblk/hadoop3
/code/drill/drill-yelp.sql
UTF-8
2,050
3.109375
3
[]
no_license
sqlline.bat -u "jdbc:drill:zk=local" !set maxwidth 10000 create view yelp_bus_view as select * from dfs.`D:/KB/Hadoop - Training/Hadoop Materials/data/yelp/yelp_dataset_challenge_academic_dataset/yelp_academic_dataset_business.json` ; create table alias yelp_bus select * from dfs.'D:/KB/Hadoop - Training/Hadoop Ma...
true
c78a36f60d930317028046d69433814223ee0030
SQL
Kreecat/sinatrareact
/sinatra/db/migrations.sql
UTF-8
417
2.90625
3
[ "MIT" ]
permissive
-- psql -a -f migrations.sql CREATE DATABASE eatit; \c eatit; CREATE TABLE users (id SERIAL PRIMARY KEY, username VARCHAR(255), password_digest VARCHAR(255)); CREATE TABLE restaurants (id SERIAL PRIMARY KEY, name VARCHAR(255), truck BOOLEAN, menu VARCHAR(255)); CREATE TABLE reviews (id SERIAL PRIMARY KEY, comments...
true
47756e8ffb0712c443ce368d1168c2acff4ff669
SQL
tecweb-gokart-2020/proj-treni
/src/database/db.sql
UTF-8
2,798
3.8125
4
[]
no_license
SET FOREIGN_KEY_CHECKS=0; DROP TABLE IF EXISTS utente; DROP TABLE IF EXISTS sessione_utente; DROP TABLE IF EXISTS carrello; DROP TABLE IF EXISTS contenuto_carrello; DROP TABLE IF EXISTS prodotto; DROP TABLE IF EXISTS marca; DROP TABLE IF EXISTS prodotto_ordinato; DROP TABLE IF EXISTS ordine; DROP TABLE IF EXISTS spedi...
true
c4f254875db5452be077963ac10e135627fdeee3
SQL
scorpion112345/IonicProyectoConstruccion
/vestidos-server/database/bd.sql
UTF-8
2,347
3.640625
4
[]
no_license
CREATE DATABASE vestidosDB; USE vestidosDB; CREATE TABLE users( id INT(11) NOT NULL, nombre VARCHAR(16) NOT NULL, tipo ENUM('ADMIN', 'NORMAL') NOT NULL DEFAULT 'NORMAL'; password VARCHAR(60) NOT NULL ); ALTER TABLE users ADD PRIMARY KEY (id); ALTER TABLE users MODIFY id INT(11) NOT NULL AUTO...
true
613d63704d2514a74101d55fa5e6b897fad1ad40
SQL
erwinmacaraig/perl-cig-prj
/db_setup/original/tblBusinessRuleSchedule.sql
UTF-8
605
3.265625
3
[]
no_license
DROP TABLE tblBusinessRuleSchedule; CREATE table tblBusinessRuleSchedule ( intBusinessRuleScheduleID INT NOT NULL AUTO_INCREMENT, intBusinessRuleID INT default 0, strScheduleName VARCHAR(100) default '', intRealmID INT default 0, intRealmSubTypeID INT default 0, intScheduleByTableType INT default 0, intSchedu...
true
344d23c5b3f680d5330266aeb1fed53f25ca1f96
SQL
hassan-alshiek/todo_list_rest
/etc/mysql/todo_list.sql
UTF-8
1,281
3.203125
3
[]
no_license
-- SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8mb4 */; -- -- Database: `...
true
bc7aab10ed274ad99e7b0b38e0e53967ec91babf
SQL
dmclark53/thinkful
/Module_11/Aggregating_and_grouping/tripsStartedCount.sql
UTF-8
151
3.390625
3
[]
no_license
-- How many trips started at each station? SELECT start_station, COUNT(*) AS trip_count FROM trips GROUP BY start_station ORDER BY trip_count DESC;
true
de646d969a4468e89601eca719eef2860c7b2e0b
SQL
kishoref22/SoftUni-Homework-Projects
/Databases Fundamentals/Databases Basics/05. DataAggregation/DenseRank2.sql
UTF-8
400
3.921875
4
[]
no_license
SELECT DepartmentID, (SELECT TOP 1 salary FROM (SELECT DISTINCT TOP 3 d.salary FROM employees d WHERE d.DepartmentID= e.DepartmentID ORDER BY d.salary DESC) a ORDER BY a.salary) AS ThirdHighestSalary FROM Employees e WHERE e.DepartmentID IN (SELECT emp.DepartmentId FROM Employees emp GROUP B...
true
a3a42e6682b85279c885583b2cd4e5561c4c3076
SQL
Muzznah/Pewlett-Hackards-People-Analysis
/Queries/Challenge_queri.sql
UTF-8
2,386
4.65625
5
[]
no_license
--Challenge --Drop and recreate to include birth date till 65. DROP TABLE title_info; DROP TABLE current_title_info; DROP TABLE retiree_countBytitle; DROP TABLE mentor_list; --Part 1 -- Number of Retiring Employees by Title SELECT ce.emp_no, ce.first_name, ce.last_name, tt.title, tt.from_date, ...
true
87b1ce44ca8b6f52b05190796af4c77175bb4e8e
SQL
ka10a/DIHT
/DataBases/SQL/013.SQL
UTF-8
107
3.28125
3
[]
no_license
SELECT AVG(speed) FROM PC INNER JOIN Product ON PC.model = Product.model WHERE type = 'PC' AND maker = 'A'
true
78d78590faf09c94b4d6daa570da620c29121deb
SQL
samho2008/Orders
/6.cva格式转换-1704-1-2506/修改版2/showTable.sql
UTF-8
3,621
3.171875
3
[]
no_license
/* SQLyog Ultimate v11.11 (32 bit) MySQL - 5.5.36 : Database - showtable ********************************************************************* */ /*!40101 SET NAMES utf8 */; /*!40101 SET SQL_MODE=''*/; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_CHEC...
true
f49a2ddbb744f74ce051b70b2104be010e121464
SQL
TakashiTakeyama/SQL
/memo.sql
UTF-8
3,986
4.1875
4
[]
no_license
select distinct 列名... from テーブル名 select distinct 費目 from 家計簿 /* select句にしか使えない修飾詞 */ select * from 家計簿 order by 日付 desc select * from 家計簿 order by 日付 desc, 出金額 asc /* offsetで先頭から3行を除外して、4から10行目を取得 */ select * from 家計簿 order by 出入金 desc offset 3 rows fetch next 10 rows onry select * from 家計簿 order by 費目 desc limit...
true
2536516ac79222be178af2ae46c2271a256b70a4
SQL
CollegeBoreal/INF1006-202-20A-01
/2.DQL/300117806/300117806.sql
UTF-8
1,881
4.15625
4
[]
no_license
Imprimer le nom et le montant de la facture totale des personnes habitant la ville de Lubumbashi SELECT city.city, customer.last_name, SUM(payment.amount) FROM city JOIN address USING (city_id) JOIN customer USING (address_id) JOIN payment USING (customer_id) WHERE city = 'Lubumbashi' GROUP BY city.city, customer.la...
true
436dfa663506371c4c2002e975a0d1dc80a20985
SQL
toun0u/CaamhroApi
/app/modules/wce/wce/scripts/scripts.sql
UTF-8
5,271
3.28125
3
[]
no_license
-- Thomas -- 03/09/2012 -- ALTER TABLE `dims_workspace` ADD `twitter` VARCHAR( 255 ) NOT NULL DEFAULT ''; ALTER TABLE `dims_workspace` ADD `facebook` VARCHAR( 255 ) NOT NULL DEFAULT ''; -- Thomas -- 05/09/2012 -- DROP TABLE IF EXISTS `dims_mod_wce_article_visite`; CREATE TABLE IF NOT EXISTS `dims_mod_wce_article...
true
47964c45c46b5719a800a1ef4a3068082d1427ba
SQL
MythicalCreature/Sudoku
/sql/db_sd.sql
UTF-8
1,221
2.71875
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : yunmysql Source Server Version : 50562 Source Host : localhost:3306 Source Database : db_sd Target Server Type : MYSQL Target Server Version : 50562 File Encoding : 65001 Date: 2020-06-11 13:11:11 */ SET FOREIGN_KEY_CHECKS=0; -- ----...
true
b97124bb979be98a05113bde93be4fa0d5993a2e
SQL
alibaba/otter
/docker/image/admin/bin/ddl.sql
UTF-8
14,084
3.15625
3
[ "Apache-2.0" ]
permissive
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `otter` /*!40100 DEFAULT CHARACTER SET utf8 COLLATE utf8_bin */; USE `otter`; CREATE TABLE `ALARM_RULE` ( `ID` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `MONITOR_NAME` varchar(1024) DEFAULT NULL, `RECEIVER_KEY` varchar(1024) DEFAULT NULL, `STATUS` varchar(32) DEFAUL...
true
914278b581f40bb58b310777254e0b3f876eef44
SQL
cenan/bugtracker
/db/migrations/0_base_up.sql
UTF-8
2,135
4.46875
4
[]
no_license
BEGIN TRANSACTION; CREATE TABLE IF NOT EXISTS issue ( id integer primary key, opener_id integer, assignee_id integer, opener_name varchar(255), assignee_name varchar(255), status integer, title text, content text, priority integer, milestone_id integer, create_date datetime ); CREATE TRIGGER IF NOT EXISTS ...
true
be6eb6af4979dbcf57f4f670c64500d676ba93e3
SQL
gahag-db/ibd-tp2
/queries/8.2.sql
UTF-8
154
3.390625
3
[]
no_license
SELECT Fornecedores.id, Fornecedores.nome FROM Fornecedores, Contratos WHERE (Fornecedores.id = Contratos.fornecedor) AND YEAR(Contratos.data) >= 2012
true
900013f509c226040fd65ce0d503cd5faa69611a
SQL
Flo890/awareframework-visualization-server-node
/database_schemas/rescuetime_database_schema.sql
UTF-8
693
2.546875
3
[]
no_license
# to be executed in the aware study database CREATE TABLE IF NOT EXISTS rescuetime_usage_log ( _id BIGINT NOT NULL PRIMARY KEY AUTO_INCREMENT, apikey_hash VARCHAR(255) NOT NULL, timestamp LONG NOT NULL, `date` DATETIME NULL DEFAULT NULL, ti...
true
44b6277d941f9f5d84f2a12d34ea1d8479bfd260
SQL
mambax7/xcl
/html/modules/message/sql/mysql.sql
UTF-8
1,205
2.6875
3
[ "BSD-2-Clause", "GPL-2.0-only", "BSD-3-Clause", "GPL-1.0-or-later", "MIT" ]
permissive
CREATE TABLE {prefix}_{dirname}_inbox ( `inbox_id` int(8) unsigned NOT NULL auto_increment, `uid` int(8) unsigned NOT NULL default '0', `from_uid` int(8) unsigned NOT NULL default '0', `title` varchar(100) NOT NULL, `message` text NOT NULL, `utime` int(11) unsigned NOT NULL default '0', `is_read` int(1) u...
true
299bc614d8c2b2c6567469bec02a0d71c71c8f3a
SQL
compilersadat/Soach
/database/lms.sql
UTF-8
9,345
2.953125
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jul 03, 2019 at 02:00 PM -- Server version: 10.1.38-MariaDB -- PHP Version: 7.2.16 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OL...
true
288212ee97628d976dd4f33555b6c5ec074d30f3
SQL
NCTraCSIDSci/camp-fhir
/CAMP-FHIR/src/main/resources/SQL/ResourceSQL/EnrollmentRequest.sql
UTF-8
1,589
2.703125
3
[]
no_license
drop table if exists `EnrollmentRequest`; CREATE TABLE `EnrollmentRequest` ( id varchar(64), EnrollmentRqst_Candidate TEXT COMMENT 'EnrollmentRequest.Candidate', EnrollmentRqst_Cvg TEXT COMMENT 'EnrollmentRequest.Coverage', EnrollmentRqst_Created TEXT COMMENT 'EnrollmentRequest.Created', EnrollmentRqst_Id_Assigner TEX...
true
a1ca939fd03d62d4390022a2a874a83add7a5f03
SQL
epiii/sister
/shared/db/@tables/situs.sql
UTF-8
1,738
2.78125
3
[]
no_license
# Host: localhost (Version: 5.6.20) # Date: 2015-01-28 16:48:35 # Generator: MySQL-Front 5.3 (Build 4.187) /*!40101 SET NAMES latin1 */; # # Structure for table "situs" # DROP TABLE IF EXISTS `situs`; CREATE TABLE `situs` ( `id` int(2) NOT NULL AUTO_INCREMENT, `email_master` varchar(50) COLLATE latin1_general_...
true
01115dd9fd07b64a633a9e551d1cbf54e18b71f4
SQL
judyliou/CMU15-445
/homeworks/hw1/06.sql
UTF-8
216
3.765625
4
[]
no_license
SELECT (closed_cnt * 100.0) / total_cnt FROM ( SELECT count(case_id) as closed_cnt FROM cases WHERE status = 'Case Closed Statistically'), ( SELECT count(case_id) as total_cnt FROM cases);
true
6ae469a4af1998f5e8a62cf9390e1097607f2bc0
SQL
gotson/komga
/komga/src/flyway/resources/db/migration/sqlite/V20200810154729__thumbnails_part_1.sql
UTF-8
574
3.078125
3
[ "MIT" ]
permissive
-- This is a multi-steps migration, mixing 2 SQL migrations and a Java migration in-between CREATE TABLE THUMBNAIL_BOOK ( ID varchar NOT NULL PRIMARY KEY, THUMBNAIL blob NULL, URL varchar NULL, SELECTED boolean NOT NULL DEFAULT 0, TYPE ...
true
233af4b48b9b04b5bbbc115cb80cada269efac01
SQL
ceroot/cycms
/code/data/add.sql
UTF-8
1,182
2.6875
3
[]
no_license
ALTER TABLE `cy_developer` ADD `status` TINYINT(2) UNSIGNED NOT NULL DEFAULT '1' COMMENT '状态,1为正常,0为禁用' AFTER `content`, ADD `create_uid` INT(11) UNSIGNED NOT NULL DEFAULT '0' COMMENT '创建者id' AFTER `status`, ADD `create_time` INT(11) UNSIGNED NOT NULL DEFAULT '0' COMMENT '创建时间' AFTER `create_uid`, ADD `create_i...
true
63700b733490934e924099c157d29c8708af1b29
SQL
Shimmikee/raffle
/old/db/Dump20181028.sql
UTF-8
2,734
3.09375
3
[]
no_license
CREATE DATABASE IF NOT EXISTS `eraffle` /*!40100 DEFAULT CHARACTER SET latin1 */; USE `eraffle`; -- MySQL dump 10.13 Distrib 5.5.16, for Win32 (x86) -- -- Host: 127.0.0.1 Database: eraffle -- ------------------------------------------------------ -- Server version 5.5.51 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@C...
true
60c9ee4c26ab151ee2707e132de5685f59020baf
SQL
seans888/H-Iris
/advanced/apps/common/extensions/tour/common/data/install.sql
UTF-8
1,412
3.828125
4
[ "BSD-3-Clause" ]
permissive
-- ----------------------------------------------------- -- Table `tour_slideshow` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `tour_slideshow` ( `slideshow_id` INT NOT NULL AUTO_INCREMENT, `name` VARCHAR(100) NOT NULL, `application` VARCHAR(45) NOT NULL, `status` ENUM('a...
true
12a163515928c3146a35888b391924ee8ed526a6
SQL
RGGH/mySqlLearning
/Data Types/challenge4.sql
UTF-8
599
3.609375
4
[]
no_license
-- char can be used when you need to truncate inputs like California to Ca create table Inventory( item_name varchar(50), price float, quantity int ); -- timestamp takes up less space than datetime but cannot store dates before 1970 and after 2038 select current_time(); select current_date...
true
6ba57448b9453783c68808b7cadcae364a7881e4
SQL
Jid77/Absensi-RFID-Web
/File Aplikasi WEB/database/absenrfid.sql
UTF-8
3,154
3.03125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Mar 23, 2020 at 06:33 AM -- Server version: 10.1.38-MariaDB -- PHP Version: 5.6.40 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OL...
true
40faf48afac8eb622273867046dd8516e523098b
SQL
LidmylaSlava/database
/add_constrains.sql
UTF-8
1,101
3.515625
4
[]
no_license
-- 1 We need to check capacity (in the case where we need 1 square m. for 1 person) ALTER TABLE rooms ADD CONSTRAINT capacity_check CHECK (capacity < square); ALTER TABLE rooms ADD CONSTRAINT capacity_check1 CHECK (capacity > 0); ALTER TABLE rooms ADD CONSTRAINT square_check CHECK (square > 0); ALTER TABLE rooms N...
true
a6ee90765c1f9855675d50fc6a8136ee7e9b37a3
SQL
haohonglong/work-shop
/data/eye.sql
UTF-8
11,379
3.5625
4
[ "BSD-3-Clause", "Apache-2.0" ]
permissive
-- creat dataBase DROP DATABASE IF EXISTS `eye_db`; CREATE DATABASE IF NOT EXISTS `eye_db` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci; USE `eye_db`; DROP TABLE IF EXISTS `ushop_family`; CREATE TABLE `ushop_family` ( `id` varchar (16) NOT NULL COMMENT '手机号', `name` varchar (255), PRIMARY KEY (`id`) ) ...
true
9f3ab78900fa0003ccfed645976a8edea9abac95
SQL
mattock/tietokannat2
/db/sql/jarvi.sql
UTF-8
1,252
2.8125
3
[]
no_license
CREATE TABLE jarvi ( jarvitunnus int NOT NULL, nimi varchar(40), jarvityyppi varchar(60), korkeustaso int, tilavuus int, pintaala int, keskisyvyys int ); INSERT INTO jarvi (jarvitunnus, nimi, jarvityyppi, korkeustaso, tilavuus, pintaala, keskisyvyys) VALUES ( 951101001, 'Kakskerranjärvi', '...
true
85317ae2011f6253944eb9c5a9b95b770e02856d
SQL
Lomanfan/LightBnB
/1_queries/4_most_visited_cities.sql
UTF-8
240
3.8125
4
[]
no_license
--Get a list of the most visited cities. SELECT properties.city as city, count(reservations.*) as total_reservations FROM reservations JOIN properties ON property_id = properties.id GROUP BY properties.city ORDER BY total_reservations DESC;
true
f392356ede70bb10eb28564e39760537bd24c6a0
SQL
phamphuchinh1606/remcuawebsite
/database/scriptsql.sql
UTF-8
3,453
3.671875
4
[ "MIT" ]
permissive
create table setting_color( id int not null AUTO_INCREMENT, color_name varchar(255), color_code varchar(255), primary key (id) ); create table setting_size( id int not null AUTO_INCREMENT, size_name varchar(255), size_cde varchar(255), primary key (id) ); create table vendor( id int not null AUTO_INCREMENT, ...
true
bc9b1e2432612bf2d65274a40ae5ad5038d1fe2f
SQL
objectledge/coral
/coral-tools/src/main/java/org/objectledge/coral/tools/refcheck/IntegrityChecker$attrCheckMatchMulti2.sql
UTF-8
460
3.875
4
[]
no_license
select g.data_key, count(*) res_count from (select g.resource_id, g.data_key, ad.attribute_definition_id from coral_attribute_definition ad, coral_generic_resource g where ad.attribute_class_id = %d and g.attribute_definition_id = ad.attribute_definition_id %s ) g join (selec...
true
9eedfdb28caf3441bd7d39f6fbecb6a210dc7b9e
SQL
Overz/senac-dd-20191-Christian_Lima
/scripts/meuBanco.sql
UTF-8
1,535
3.71875
4
[]
no_license
DROP SCHEMA `meubanco` ; CREATE SCHEMA NOT EXISTS `meubanco` DEFAULT CHARSET = utf8 COLLATE = utf8_general_ci; CREATE TABLE `meubanco`.`usuario` ( `id` INT NOT NULL AUTO_INCREMENT, `nome` VARCHAR(200) NOT NULL, `email` VARCHAR(45) NOT NULL, `senha` VARCHAR(45) NOT NULL, `idNivel` INT NOT NULL, PRI...
true
15eb1055f55e54b99152d7a9a882a96912b95d04
SQL
transcom/mymove
/migrations/app/schema/20220511200357_add_actual_final_value_fields_for_zips_and_advances_to_ppm_shipments.up.sql
UTF-8
1,281
3.46875
3
[ "MIT", "LicenseRef-scancode-public-domain" ]
permissive
-- Add new columns to ppm_shipments table to track "actual" values once a customer has moved ALTER TABLE ppm_shipments ADD COLUMN actual_pickup_postal_code varchar, ADD COLUMN actual_destination_postal_code varchar, ADD COLUMN has_requested_advance bool, ADD COLUMN advance_amount_requested int, ADD COLUMN has_rec...
true
8be0a5799554a84bad73ec42cb3279a419051af8
SQL
colindcli/CodeGit
/DataBase/SqlServer/SystemQuery/ForeignKey.sql
UTF-8
1,028
4.21875
4
[ "MIT", "Apache-2.0" ]
permissive
--OUTER_KEYS SELECT FK = OBJECT_NAME(pt.constraint_object_id), Referenced_tbl = OBJECT_NAME(pt.referenced_object_id), Referencing_col = pc.name, Referenced_col = rc.name FROM sys.foreign_key_columns AS pt INNER JOIN sys.columns AS pc ON pt.parent_object_id = pc.[object_id] AND pt.parent_column_id = pc.column_id I...
true
0f393bca1c048e39c4a476e2f4609e60d2d2752c
SQL
silence-do-good/stress-test-Postgres-and-MySQL
/dump/high/day15/select0749.sql
UTF-8
191
2.75
3
[]
no_license
SELECT timeStamp, temperature FROM ThermometerObservation WHERE timestamp>'2017-11-14T07:49:00Z' AND timestamp<'2017-11-15T07:49:00Z' AND SENSOR_ID='59c144da_7d68_4648_b434_1f745e5c02e0'
true
a5ed1739706f28315a6aeded41fee5ef73e1f9a7
SQL
Anitt/EcommerceRentalWebApp_LeaseWithEase
/src/main/resources/tables.sql
UTF-8
1,818
3.609375
4
[]
no_license
DROP TABLE IF EXISTS USER_LOGIN; CREATE TABLE USER_LOGIN ( EMAIL VARCHAR(255) NOT NULL, PASSWORD_HASH VARCHAR(255) NOT NULL, IS_LESSOR BOOLEAN NOT NULL, PRIMARY KEY (EMAIL) ); -- Password: webadmin INSERT INTO USER_LOGIN (EMAIL, PASSWORD_HASH, IS_LESSOR) VALUES ('admin@localhost.com', '874b2ad8869a86bdcb99f3f8820d1...
true
305536c1767fa4d82b4852a0d7fbb6c166f9050f
SQL
jonathonchenvert/Database-Management-Systems
/HW #1/Queries/Query9.sql
UTF-8
124
3.015625
3
[]
no_license
USE accidents; -- Query #9: Display all accidents that occurred last month SELECT * FROM Accidents WHERE MONTH(date) = 1;
true
52148e1e11adaddc2f9ed5d1c8ecdebdd500fbdd
SQL
archer102125220/other-php
/Invoice Maker/install/sql.sql
UTF-8
3,002
3.03125
3
[]
no_license
CREATE TABLE IF NOT EXISTS `config` ( `id` int(11) NOT NULL auto_increment, `name` varchar(32) NOT NULL, `value` text NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=37 ; -- -- Dumping data for table `config` -- INSERT INTO `config` (`id`, `name`, `value`) VALUE...
true
d60438611a96aa461438b4f74e52f73b6767b428
SQL
gianlucahub/codewasher
/nl_codewasher_client/sql/db_scripts.sql
UTF-8
5,482
3.703125
4
[]
no_license
create database neues_leben; CREATE TABLE neues_leben.NL_CODEWASHER_ARTICLE ( ID INT NOT NULL AUTO_INCREMENT, TITLE VARCHAR(250) NOT NULL, CONTENT LONGTEXT NOT NULL, PAGE VARCHAR(50) NOT NULL, MACRO_CATEGORY VARCHAR(50), REPLIABLE TINYINT(1), ARTICLE_DATE DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,...
true
ad66feaa6a88b00a1812466443588c35dbe5e7bc
SQL
edneu/InfoMan
/Adhoc/Roster Analysis.sql
UTF-8
29,384
3.59375
4
[]
no_license
####################################################################################################################### ## COMPUTE Unduplicated Roster Indicator ####### SET SQL_SAFE_UPDATES = 0; drop table if exists work.undup_temp; create table work.undup_temp as SELECT Roster_Key,min(rosterid) AS UndupRec FROM ...
true
14050666fa4dde9413044f65e8889bfbcec0b228
SQL
liuwenqi9/ots
/ots-web/src/main/resources/db/migration/test-user-hotel.sql
UTF-8
691
2.65625
3
[]
no_license
CREATE TABLE `t_test_user` ( `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键', `phone` varchar(20) DEFAULT NULL COMMENT '手机号', `backupfield1` varchar(100) DEFAULT NULL COMMENT '保留字段--设备号', `backupfield2` varchar(20) DEFAULT NULL COMMENT '保留字段', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMME...
true
f51176b4aa87eafc40120dd01f516b4f8b936f1a
SQL
RadoslavNikolov/SoftUni
/Semester_2 (Advanced Level - Back End)/Web_Development_Basic_PHP/Database-Drivers-LAB/Resources/translations.sql
UTF-8
1,189
3.640625
4
[]
no_license
-- Create the database Sales if it does not exist DROP DATABASE IF EXISTS `translations`; CREATE DATABASE `translations` CHARACTER SET utf8 COLLATE utf8_unicode_ci; USE `translations`; -- Drop all existing translations tables, so that we can create them DROP TABLE IF EXISTS `translations`; CREATE TABLE translation...
true
caf3004a976a3616c171834f8d527e064e51206c
SQL
el1638en/messages
/messages-services/src/main/resources/db/migration/V1/V1.8__CREATE_TOKEN.sql
UTF-8
1,150
4.09375
4
[]
no_license
-- Création de la tables des tokens d'authentification CREATE TABLE T_TOKEN( T_ID BIGINT NOT NULL, T_VALUE TEXT NOT NULL, T_EXPIRATION_DATE TIMESTAMP NOT NULL, T_USER_ID BIGINT NOT NULL, CREATE_DATE TIMESTAMP default CURRENT_TIMESTAMP, UPDATE_DATE TIMESTAMP default CURRENT_TIMESTAMP, PRIMARY KEY(T_ID), ...
true
056988325ca8a22440f03a1f68be682b975a88fd
SQL
PlayTech-sudo/pt2k-evmg
/sql file/eas (3).sql
UTF-8
6,537
3.28125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.9.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Feb 18, 2020 at 08:26 AM -- Server version: 10.4.10-MariaDB -- PHP Version: 7.3.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OL...
true
057805c2b2558667dfea141cebda743618b1d710
SQL
zachery-metiva/PersonalProject
/db/init.sql
UTF-8
499
3.296875
3
[]
no_license
DROP TABLE IF EXISTS bills DROP TABLE IF EXISTS groups DROP TABLE IF EXISTS users CREATE TABLE users ( user_id SERIAL PRIMARY KEY, email VARCHAR(250), password VARCHAR(3000) ); CREATE TABLE groups ( group_id SERIAL PRIMARY KEY, group_name VARCHAR(300), admin_user_id INT REFERENCES users(user_...
true
b7497eb3c58d626232516bcdd7158e973a7ce1a9
SQL
ipaulin/klon
/db2.sql
UTF-8
985
4.125
4
[]
no_license
CREATE TABLE `posts` ( `id` int(11) NOT NULL AUTO_INCREMENT, `text` text, `user_id` int(10) unsigned NOT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `id_UNIQUE` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; ALTER TABLE `users` ...
true
7ea0caf4fa6c3f0d715b34f5a174f7d2b96a3b0e
SQL
QATavares/SQL_Server
/aulas-scripts/6-OrderBy.sql
UTF-8
917
3.234375
3
[]
no_license
SELECT coluna1, coluna2 FROM tabela ORDER BY SELECT * FROM person.person ORDER BY FirstName asc === === === === === === === === === === === === === === === === === === === === === === === === === === === === === === === === === === === === Desafio 1 Obter o ProductID dos 10 produtos mais caros cadastrados...
true
06d6b6abe071f11bf9c97a428d19217171916cf3
SQL
valentin122/VZhigalov
/sql/manyToOne.sql
UTF-8
190
2.96875
3
[ "Apache-2.0" ]
permissive
create table cities( id serial primary key, name varchar(50) ); create table countries( id serial primary key, name varchar(50), position_id int references cities(id) );
true
2fba173b6498c8143217cb0163662c8f156b13e2
SQL
BingoBois/ImportDataScript1
/sql/book-strcture.sql
UTF-8
1,949,571
2.765625
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : viter Source Server Version : 50726 Source Host : viter.dk:3306 Source Database : dbbook Target Server Type : MYSQL Target Server Version : 50726 File Encoding : 65001 Date: 2019-05-23 00:05:23 */ SET FOREIGN_KEY_CHECKS...
true
937ea645615a1012ff6df206262e98f9c8222f2a
SQL
tanhau165/DockerDemo
/product_db/create-product-table.sql
UTF-8
330
2.765625
3
[]
no_license
CREATE TABLE product ( code VARCHAR(40) NOT NULL , name VARCHAR(40) NULL, price INT(5) NULL, primary key(code) ) ENGINE = INNODB; INSERT INTO product (code, name,price) VALUES ('001', 'Big Mac', 1000), ('002', 'Lucky Stretch...
true
d849e97b7a38c62c035c9de826263edc9eb1ab9a
SQL
whps51205/whps51205.github.io
/dbfinal.sql
UTF-8
170,172
3
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- 主機: 127.0.0.1 -- 產生時間: 2019 年 06 月 15 日 18:05 -- 伺服器版本: 10.1.38-MariaDB -- PHP 版本: 7.3.4 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARA...
true
082030a8b067cdd70caf56b77cba740736bba59e
SQL
plamen911/softuni-db-fundamentals
/DatabasesBasics/_07SubqueriesAndJoinsLab/_01Managers.sql
UTF-8
218
3.84375
4
[]
no_license
SELECT e.employee_id, CONCAT(first_name, ' ', last_name) AS `full_name`, d.department_id, d.name FROM employees AS e RIGHT JOIN departments AS d ON d.manager_id = e.employee_id ORDER BY e.employee_id LIMIT 5;
true
9fef70a1b45a32ca110495d868ba84df1ee2d247
SQL
Kevin1er/Projet_Java
/Chat3(web)/Sql/chat_jee.sql
UTF-8
1,965
2.890625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.7.4 -- https://www.phpmyadmin.net/ -- -- Hôte : 127.0.0.1:3306 -- Généré le : sam. 14 avr. 2018 à 17:01 -- Version du serveur : 5.7.19 -- Version de PHP : 5.6.31 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET...
true
8a760e77f667f27b16ecabcdfb8706a71f0dfb14
SQL
samszo/gestedit
/bdd/query/exportTresor.sql
UTF-8
1,867
3.90625
4
[]
no_license
SELECT GROUP_CONCAT(DISTINCT a.prenom, ' ',a.nom, ':', la.role) auteurs ,l.titre_en ,l.titre_fr ,pGB.nombre 'Nbre Pages prévision GB' ,pFR.nombre 'Nbre Pages prévision FR' , ELT(FIND_IN_SET(p.langue,'Français,Anglais'), 'FR', 'GB') 'Langue du manuscrit' ,p.publication_en 'Publication prévue...
true
53d57d5e7f137d0a51c65b406bd4fa043bee44f2
SQL
proggustavo/mysql
/ModelagemDeDados - Semestre1/projeto26/script26.sql
UTF-8
2,462
3.734375
4
[]
no_license
DROP DATABASE IF EXISTS DBDELEGACIA; CREATE DATABASE DBDELEGACIA; USE DBDELEGACIA; CREATE TABLE CRIME ( IDCRIME INT NOT NULL, DESCRICAO VARCHAR(255), RUA VARCHAR(100), NUMERO INT, COMPLEMENTO VARCHAR(255), BAIRRO VARCHAR(100), CEP VARCHAR(8), CIDADE VARCHAR(100), ESTADO CHAR(2) ); CREATE TABLE CRIMINOSO( ...
true
30e76a043a346b7d58c14aa80031163958755cd3
SQL
xuhong-/PHP-Cms4APP
/cms/video.sql
UTF-8
4,131
3.125
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : GG Source Server Version : 50553 Source Host : localhost:3306 Source Database : video Target Server Type : MYSQL Target Server Version : 50553 File Encoding : 65001 Date: 2017-12-27 14:00:44 */ SET FOREIGN_KEY_CHECKS=0; -- ----------...
true
48aa2037d1d073d9cee59df90b6c8cae77997dec
SQL
EnderCaster/MyGitExperimentSpace
/old/20171205/mysql/mysql_usefulquery.sql
UTF-8
2,305
4.0625
4
[]
no_license
create database TEST; use TEST; CREATE TABLE shop ( article INT(4) UNSIGNED ZEROFILL DEFAULT '0000' NOT NULL, dealer CHAR(20) DEFAULT '' NOT NULL, price DOUBLE(16,2) DEFAULT '0.00' NOT NULL, PRIMARY KEY(article, dealer)); INSERT INTO shop VALUES (1,'A'...
true
512d7c03ef6499d5e351727f75cfd8f67b51588d
SQL
MithrandirD/common_schema
/routines/script/array/_implode_nospace_array.sql
UTF-8
434
2.96875
3
[ "MIT", "BSD-3-Clause", "GPL-1.0-or-later" ]
permissive
-- -- It is assumed input array elements do not contain spaces. -- delimiter // drop function if exists _implode_nospace_array // create function _implode_nospace_array( array_id VARCHAR(16) charset ascii ) returns text charset utf8 comment 'Return array elements concatenated by commas' language SQL deterministi...
true
dc3651d5bcf8a03737cf270083192ae608a48313
SQL
sminogue/scarab
/scarab/src/main/resources/db/migration/V1/V1_1__Second.sql
UTF-8
124
2.734375
3
[]
no_license
ALTER TABLE project ADD COLUMN displayName VARCHAR(50); CREATE UNIQUE INDEX `project_name_index` ON `project` (`name` ASC) ;
true
27d8a03e840e625a20d4ffca210f1d35c4787fd4
SQL
suvaw/Database
/PLSQL/08Tiggers/18c.sql
UTF-8
237
2.8125
3
[]
no_license
create or replace trigger salary_update_check before update of salary on employees for each row begin if :NEW.salary < :OLD.salary then raise_application_error(-20125,'update salary cannot lesser then current salary'); end if; end; /
true
fd432998a1ec5a1b1b71fd3015f05dda77ff0f68
SQL
dandraden/Database-Scripts
/Oracle/others/Scripts/script_ronei/CHK_OBJETOS_SEM_SINONIMOS.sql
UTF-8
775
3.046875
3
[]
no_license
set heading off SET FEEDBACK OFF set verify off SPOOL C:\Sistemas\Sql\Infraero\Oracle\Scripts\script_ronei\LOG_OBJETOS_SEM_SINONIMOS.LOG SELECT 'DROP '||A.OBJECT_TYPE||' '||A.OWNER||'.'||A.OBJECT_NAME||';' FROM DBA_OBJECTS A WHERE A.OWNER LIKE 'IFR%' AND A.OBJECT_TYPE NOT IN ('INDEX','TRIGGER') AND ...
true
defaac84e8da00d628d9090bb173539c2f4c36a7
SQL
bedinin/mto
/db/mto.sql
UTF-8
975
3.59375
4
[]
no_license
-- ----------------------------------------------------- -- procedure get_nomenclature_to_devisions -- ----------------------------------------------------- USE `mto`; DROP procedure IF EXISTS `mto`.`get_nomenclature_to_devisions`; SHOW WARNINGS; DELIMITER $$ USE `mto`$$ CREATE PROCEDURE `mto`.`get_nomenclature_to_d...
true
217fbd5cf32234a6c37fc381ccaf4d7c05636527
SQL
game1991/go
/Mysql指令/data.sql
GB18030
1,043
4.09375
4
[]
no_license
--ݵݱ --ȴһݱ create table my_teacher(name varchar(10),age int)charset utf8; insert into my_teacher(name,age) values('game',28); insert into my_teacher(age,name) values(49,'tom'); insert into my_teacher(name) values('jack'); insert into my_teacher values('levi',30); --ֵбֶбһ ---ȡ select * from my_teacher; ---ȡֶָ/...
true
77258daccdec9cae978f95c7a60e6e215b09bc03
SQL
uncleyao/LintCode
/Python/2-Integer & Array/test.sql
UTF-8
715
3.984375
4
[]
no_license
-- write your code in SQLite 3.11.0 select b.id as id, COALESCE (t3.passengers_on_board,0) as passengers_on_board from buses b LEFT JOIN ( select t1.b_id, count(t1.p_id) as passengers_on_board from ( SELECT p.id as p_id, b.id as b_id, b.time as b_time from passengers AS p JOIN buses AS b ON b.origin = p.origin AND b...
true
6c3a3ea8a8d4dd7e58090da5bba6c6d89a20f457
SQL
cesarcamp/HackerRank
/MySQL-queries.sql
UTF-8
1,172
4.625
5
[]
no_license
--Asian Population --Given the CITY and COUNTRY tables, query the sum of the populations of all cities where the CONTINENT is 'Asia'. SELECT SUM(c.population) as asian_population FROM city c JOIN country co ON c.CountryCode = co.Code WHERE co.continent = 'Asia' GROUP BY co.continent; --The Re...
true
235e21b19d823837ad51e2ff8a039ce26cc520c5
SQL
MatheusGrenfell/java-projects
/eclipse-projects/credito/servico-a/src/main/resources/db/migration/postgresql/V3__create_table_divida.sql
UTF-8
372
2.953125
3
[]
no_license
CREATE TABLE DIVIDA ( ID NUMERIC(10) PRIMARY KEY, DESCRICAO VARCHAR(250) NOT NULL, VALOR NUMERIC(10,2) NOT NULL, DATA_VENCIMENTO DATE NOT NULL, QUITADO NUMERIC(1) NOT NULL, DATA_CRIACAO TIMESTAMP NOT NULL, DATA_ATUALIZACAO TIMESTAMP NOT NULL, PESSOA_FISICA NUMERIC(10) NOT NULL, CONSTRAINT PESSOA_FISICA_DIVIDA_FK FOREIG...
true
2e946bfa74f9b5682312336a597e6b34b9975d0e
SQL
falcaopetri/trajectory-data
/foursquare_global/sql/create_schema.sql
UTF-8
4,360
3.328125
3
[ "MIT" ]
permissive
-- Enable PostGIS (includes raster) CREATE EXTENSION IF NOT EXISTS postgis; -- Enable Topology CREATE EXTENSION IF NOT EXISTS postgis_topology; -- fuzzy matching needed for Tiger CREATE EXTENSION IF NOT EXISTS fuzzystrmatch; -- rule based standardizer CREATE EXTENSION IF NOT EXISTS address_standardizer; -- exam...
true
7129915d41e367856c2099014741b4a0c72e57b4
SQL
IrinaNek/sql-scratch-capstone-turn-in
/Irina Nekrasov/code.sql
UTF-8
1,561
3.9375
4
[]
no_license
select count(distinct utm_campaign) as total_campaigns from page_visits; select count(distinct utm_source) as total_sources from page_visits; select distinct utm_campaign, utm_source from page_visits; Select distinct page_name from page_visits; WITH first_touch AS ( SELECT user_id, MIN(t...
true
37e8cf7b56218da7f194054dfcfd735d0011fbe3
SQL
Jack-Gitter/HW2DATABASE
/sql triggers/page_roles trigger.sql
UTF-8
1,136
2.859375
3
[]
no_license
CREATE DEFINER=`root`@`localhost` TRIGGER `page_role_AFTER_INSERT` AFTER INSERT ON `page_roles` FOR EACH ROW BEGIN IF NEW.role = 'admin' OR NEW.role = 'owner' THEN INSERT INTO page_priviledges VALUES (null, NEW.developer, NEW.page, 'write'); INSERT INTO page_priviledges VALUES (null, NEW.developer, NEW.page, '...
true
c1245d7f23c16b695e37e64573e59ba4eb6501d0
SQL
luizasch/TF-Banco-de-Dados
/consultas.sql
UTF-8
2,692
3.90625
4
[]
no_license
-- 1) Para cada estúdio, seu nome, o número e os títulos de suas produções, junto com o -- nome das pessoas da indústria que trabalharam nessa produção e sua função na produção select nomeestudio, count(distinct nomeanime) as nroobras, nomeanime, nomepessoa, nomefunc from anime natural join estudioAnime natural j...
true
ce51e92589b2ea9d19bb918f58efc93d1e083d0e
SQL
kmoj/CS5200
/hw2/Implement Queries/Implement Queries 2.d.sql
UTF-8
214
3.640625
4
[]
no_license
SELECT website.id, website.name FROM website JOIN website_role ON website.id = website_role.website JOIN person ON person.id = website_role.developer WHERE person.username = "alice" and website_role.type = "owner"
true
341e9bd9f48a306900e701ab202cc74835a5c3f1
SQL
Glorygal22/Lisa-s-Homework-Assignments
/09 SQL HW/SQL_LISAHW.sql
UTF-8
8,250
4.25
4
[]
no_license
Use Sakila; -- 1a. Display the first and last names of all actors from the table actor. SELECT first_name, last_name FROM actor; -- 1b. Display the first and last name of each actor in a single column in upper case letters. Name the column Actor Name. SELECT UPPER(CONCAT(first_name, ' ', last_name)) AS `...
true
cf65d286d1dae46e07a6d178c974794089a3ee1d
SQL
fmurrie/rva
/rva-database/mysql/schema/20201229_1106_create_table_rvaEndpointStep.sql
UTF-8
833
3.0625
3
[]
no_license
create table rvaEndpointStep ( idRvaEndpointStep int auto_increment, idRvaEndpoint int not null, idRvaProcedure int not null, stepOrder int not null, description varchar(1000), creatorAccount varchar(100) not null, updaterAccount varchar(100) not null, createdDate datetime default(now()), updatedDa...
true
c4ce33bd1a014ffe236aba8c34f67d5a56323398
SQL
maximzaika/amazing-grazing2
/db_backup/emp_state.sql
UTF-8
4,751
3.09375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.9.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Oct 18, 2020 at 06:59 PM -- Server version: 10.4.8-MariaDB -- PHP Version: 7.1.33 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
true