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
b45c57bfaa938648d35b68d5d7880794be358e4e
SQL
meta-vikas-soni/GET-DBMS
/Session 3/Session 3 File 1.sql
UTF-8
5,287
4.5625
5
[]
no_license
/*Display Count of products as per below price range:*/ SELECT COUNT(o.order_id) FROM orders as o INNER JOIN cart as c ON o.cart_id = c.cart_id WHERE c.total_price BETWEEN 0 and 50 AND c.item_status != "Order Not Placed"; SELECT COUNT(o.order_id) FROM orders as o INNER JOIN cart as c ON o.cart_id = c.cart_id WHERE c.t...
true
e8a55aea834a8ae26ac27e34dd67f9476c68519c
SQL
dohuucong/Spring-001
/spring-empsecurity/sql_scripts/employee.sql
UTF-8
763
3.078125
3
[]
no_license
CREATE DATABASE IF NOT EXISTS `employee_directory`; USE `employee_directory`; -- -- Table structure for table `employee` -- DROP TABLE IF EXISTS `employee`; CREATE TABLE `employee` ( `id` int(11) NOT NULL AUTO_INCREMENT, `first_name` varchar(45) DEFAULT NULL, `last_name` varchar(45) DEFAULT NULL, `email` va...
true
811712384368150c8eaf0d2b76bfeeb97bc14198
SQL
hhugohm/neosuniversity-system-docker
/app_frontend/src/database/database.sql
UTF-8
9,491
3.859375
4
[]
no_license
/*script database neosuniversity */ create user 'neossoftware'@'localhost' identified by 'discom'; CREATE DATABASE neosuniversity CHARACTER SET utf8 COLLATE utf8_spanish_ci; GRANT ALL PRIVILEGES ON neosuniversity.* TO 'neossoftware'@'localhost' WITH GRANT OPTION; flush privileges; /*tables catalogs */ CREATE T...
true
1b887f51bfec6f3167d32c9fe2a65bfd38179f2a
SQL
davinascott/comp2180-project3
/comp2180-project3a/workspace/workspace/schema.sql
UTF-8
872
3.640625
4
[]
no_license
DROP TABLE IF EXISTS Messages; DROP TABLE IF EXISTS MessagesRead; DROP TABLE IF EXISTS Users; CREATE TABLE Users( id int AUTO_INCREMENT NOT NULL PRIMARY KEY, firstname varchar(30) NOT NULL, lastname varchar(30) NOT NULL, username varchar(30) NOT NULL, password varchar(60) NOT NULL, mysession int(20) NOT NULL ); CREAT...
true
984288d31835285533497138150d27efcf72044a
SQL
Moonzoni/ShopperPG
/Script_VfShopper.sql
UTF-8
2,060
4.1875
4
[]
no_license
CREATE TABLE PERFIL ( COD_PERFIL INT IDENTITY(1,1), NOME VARCHAR(100) NOT NULL UNIQUE, PRIMARY KEY(COD_PERFIL) ) CREATE TABLE CATEGORIA ( COD_CATEGORIA INT IDENTITY (1,1), NOME VARCHAR(150) NOT NULL UNIQUE, PRIMARY KEY(COD_CATEGORIA) ) CREATE TABLE STATUSS ( COD_STATUS INT IDENTITY (1,1), NOME V...
true
a832b90ead061d27c6fb5f417e5f3391acbe1234
SQL
noyessie/sms
/sql/create.sql
UTF-8
2,762
4.09375
4
[]
no_license
create database mydb; use mydb; -- Table User #-- creation de la table user CREATE TABLE IF NOT EXISTS user( iduser int AUTO_INCREMENT, nom VARCHAR(50) NOT NULL, prenom VARCHAR(50) , adressemail VARCHAR(200) NOT NULL, motdepasse VARCHAR(200) NOT NULL, CONSTRAINT pk_user PRIMARY KEY(iduser) ); #-- creati...
true
1de561eb2981f5ffdc64d4815c651d2b34d62b23
SQL
hefugu136234/weike_learn
/updated/kalean/lottery_record2016415.sql
UTF-8
1,242
3.046875
3
[]
no_license
/* SQLyog Enterprise - MySQL GUI v7.15 MySQL - 5.1.35-community : Database - zhiliao ********************************************************************* */ /*!40101 SET NAMES utf8 */; /*!40101 SET SQL_MODE=''*/; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; /*!401...
true
8c56d9c6fc46a4627190dbd0984ec1b93832e691
SQL
osmanozz/phpblok3
/FlowerPower/statements.sql
UTF-8
1,719
3.3125
3
[]
no_license
create database flowerpowerdb; use flowerpowerdb; create table klant( klantcode int(10), voorletters text(20), tussenvoegsels text(20), achternaam text(20), adres varchar(20), postcode varchar(255), woonplaats varchar(255), geboortedatum date, gebruikersnaam VARCHAR(255), wachtw...
true
5b5316dbfc2484912ffb5d550a8a68e4d5203608
SQL
charlottelau50/handmade
/projet (5).sql
UTF-8
10,921
3.265625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Hôte : 127.0.0.1:3306 -- Généré le : mar. 27 avr. 2021 à 20:09 -- Version du serveur : 5.7.31 -- Version de PHP : 7.4.9 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CL...
true
f7863d4d1c5c49531cd5fd901fb1702fa70d4e5e
SQL
haripriyamanne/SQLServerSamples
/Indexing/Indexing.sql
UTF-8
137
2.859375
3
[]
no_license
Select * from EmpSalary1 where EmpSalary > 30000 and EmpSalary < 70000 CREATE Index IXtblEmployeeSalary ON EmpSalary1 (EmpSalary ASC)
true
580bf05bb11d2fd7487863c9f8e5f04cfc791d27
SQL
PHPauloReis/avaliacao-oficial1-web2
/extras/db.sql
UTF-8
1,746
3.09375
3
[]
no_license
-- -------------------------------------------------------- -- Servidor: 127.0.0.1 -- Versão do servidor: 10.4.18-MariaDB - mariadb.org binary distribution -- OS do Servidor: Win64 -- HeidiSQL Versão: 11.3.0.6295 -- -----------------------------------------------...
true
a4ae8b54a4b4e5f59f49b5e8ea5be8db0ffd1e03
SQL
SarnaKhmel/EPAM_homeworks
/Homeworks/EPAM_HW2/EPAM_HW2_10.sql
UTF-8
109
3.21875
3
[]
no_license
SELECT maker,type,laptop.model,speed FROM product JOIN laptop ON laptop.model=product.model WHERE speed>600
true
f53ac56012562a0c0696e733bf7db911e1480940
SQL
abd612/database-engineering-lab
/lab-solutions/Queries_of_manual_06.sql
UTF-8
1,862
3.84375
4
[]
no_license
#Q1 SELECT sailor.sname,sailor.age FROM sailor ; #Q2 SELECT sailor.sname FROM sailor WHERE sailor.rating > 7 ; #Q3 SELECT sailor.sname FROM sailor,reserve WHERE sailor.sid=reserve.sid AND reserve.bid='103' ; #Q4 SELECT distinct sailor.sid FROM sailor,reserve,boat WHERE sailor.sid=reserve.sid AND reserve.bid=boat.bid AN...
true
4bbbd5da3acf0f2d00ea887bb59fabbab0acaa26
SQL
riveramatthew/ra_data_warehouse
/models/sources/stg_mailchimp_email/bigquery/stitch/stg_mailchimp_email_lists.sql
UTF-8
1,343
3.453125
3
[ "Apache-2.0" ]
permissive
{{config(enabled = target.type == 'bigquery')}} {% if var("marketing_warehouse_email_list_sources") %} {% if 'mailchimp_email' in var("marketing_warehouse_email_list_sources") %} WITH source AS ( {{ filter_stitch_relation(relation=source('stitch_mailchimp_email', 'lists'),unique_column='id') }} ), renamed as ( selec...
true
b8bffc3a1910c01fcff20f1d844963762275a7ee
SQL
Jose2mil/Gestor_BaseDatos_MarioBros
/DDL_MARIO.sql
ISO-8859-3
16,827
2.828125
3
[]
no_license
-------------------| --MARIO BROS. SQL--| -------------------| ---------------------------| --ESTRUCTURA (TABLAS) DDL--| ---------------------------| DROP TABLE TMP_NUMBERS; DROP TABLE SER_BONIFICACION; DROP TABLE SER_REVANCHA; DROP TABLE DESAFIAR_EN; DROP TABLE SER_COMPATIBLE; DROP TABLE TENER_POSICION_SUPERIOR; DR...
true
52d8728b1360d174e9c54da5d83f715291a4815f
SQL
alvisex/proyectoIoT
/permisosrfid.sql
UTF-8
470
2.59375
3
[]
no_license
CREATE TABLE permisos (id_tarjeta BIGINT NOT NULL PRIMARY KEY, usuario VARCHAR(100), permiso BOOL NOT NULL); INSERT INTO permisos VALUES (441294522346, 'Tarjeta Blanca', 1); USE datos_iot; SELECT * FROM permisos; SELECT permiso FROM permisos WHERE id_tarjeta= DELETE FROM permisos WHERE id_tarjeta=990154079132 ...
true
a51e544c401ab5a86b448d8b162fae5b769f2bcf
SQL
jenli810006995/SQL
/LeetCode/580. Count Student Number in Departments/Count_Student_Number_in_Departments.sql
UTF-8
331
4.0625
4
[]
no_license
select d.dept_name as dept_name, ifnull(student_number, 0) as student_number from department d left join ( select *, count(student_id) as student_number from student group by dept_id ) x on d.dept_id = x.dept_id group by 1 order by 2 desc, 1 asc; -- Link: https://leetcode.com/problems/count-student-number-in-de...
true
a98a0bdf2dae09834fd84fe0c58088a0e2177f3f
SQL
Dragontalker/MySQL-study-notes
/Notes_38.sql
UTF-8
1,795
4.3125
4
[ "MIT" ]
permissive
#函数 /* 和存储过程的区别: 存储过程: 适合做批量插入, 批量更新 函数: 只能有一个返回, 适合做处理数据后返回一个结果 */ #一、创建语法 /* CREATE FUNCTION 函数名(参数列表 RETURNS 返回类型) BEGIN 函数体 END 注意: 1. 参数列表: 包含两部分: 1. 参数名 2. 参数类型 2. 如果return语句没有放在函数体的最后也不会报错, 但不建议 return 值; 3. 函数体中仅有一句话, 则可以忽略begin end 4. 使用DELIMITER语句设置结束标记 */ #二、调用语法 #SELECT 函数名(参数列表) #案例演示 #1. 无...
true
2ad6428a0a8ab61a95a6c40e77500bd624b742c1
SQL
gdiasdasilva/interactive-data-chicago
/sql/views.sql
UTF-8
1,587
4.25
4
[]
no_license
CREATE TABLE view_total_incidents_per_ca ( community_area VARCHAR(100) NOT NULL PRIMARY KEY, total_incidents INT NOT NULL ); INSERT INTO view_total_incidents_per_ca SELECT community_area, count(*) FROM crimes WHERE community_area <> '' and community_area <> '0' and year = 2014 GROUP BY community_area; CREATE ...
true
239f1673a6179a9ad2a4058709d1f4b3d96fc0b7
SQL
efenstakes/Morbit
/db.sql
UTF-8
919
3.703125
4
[]
no_license
drop database if exists mobit; create database if not exists mobit; create table users ( id int auto_increment, name varchar(30), password varchar(200), city varchar(20), email varchar(50), user_type enum('REGULAR', 'ADMIN', 'SUPER_ADMIN') default 'REGULAR', joined_on datetime default NOW(), primary...
true
c983cfa3465e6bfb399f945501bce8bf0a993182
SQL
riazul701/mysqltutorial-org
/Basic/Joining_tables/Joins/left_join_using_keyword_2.sql
UTF-8
140
3.3125
3
[]
no_license
SELECT m.member_id, m.name member, c.committee_id, c.name committee FROM members m LEFT JOIN committees c USING (name);
true
3b2461900dddf0bdae2a77c64ff2e980d9dea134
SQL
pruthanagrikar/mytap
/mytap-event.sql
UTF-8
10,301
3.828125
4
[ "BSD-3-Clause" ]
permissive
-- EVENTS -- ====== -- >= 5.5 /************************************************************************************/ DELIMITER // -- Is the scheduler process running DROP FUNCTION IF EXISTS _scheduler // CREATE FUNCTION _scheduler() RETURNS VARCHAR(3) DETERMINISTIC BEGIN DECLARE ret VARCHAR(3); SELECT @@G...
true
8a5438f0f4d7bf60c095b8fd079613fb7c3073e3
SQL
18918090402/MZJF_Work
/MZJF_Work/0002 Git.nonobank.com/archive_20180806/bi-etl.git/03_DW_HADOOP/02_IDW/03_SCRIPT/FACT_NONO_INVEST_CASH/FACT_NONO_INVEST_CASH.sql
UTF-8
15,701
2.875
3
[]
no_license
set mapreduce.job.name = idw_fact_nono_invest_cash_01; set mapreduce.job.queuename = etl-dw; set hive.exec.parallel=true; set hive.exec.dynamic.partition.mode = nostrict; set hive.exec.dynamic.partition = true; set hive.exec.max.dynamic.partitions.pernode=100000000; set hive.exec.max.dynamic.partitions=100000000; set h...
true
28aea9bbd3c0bb42c4deb1a5de66b5562a1ca51d
SQL
danilsyah/mysql-basic
/tabel wallet.sql
UTF-8
505
4.4375
4
[]
no_license
-- one to one relationship create table wallet( id int not null auto_increment, id_customer int not null, balance int not null default 0, primary key (id), unique key fk_id_customer_unique (id_customer), constraint fk_wallet_customer foreign key (id_customer) references customers (id) )engine = innodb; desc wall...
true
47a7e31680d7dc1c5ff2ca2d3c9d36fd6d664dcf
SQL
deyandim/PHP-Web
/LABs/04.DatabaseRelationsAndDesign/04.SalesEmployees.sql
UTF-8
220
3.671875
4
[]
no_license
SELECT `employee_id`, `first_name`, `last_name`, departments.name FROM employees INNER JOIN departments ON employees.department_id = departments.department_id WHERE departments.name = 'Sales' ORDER BY `employee_id` DESC;
true
077bc7a85a2f548369059ecfd1577095e1427dfc
SQL
rahulmadduluri/convos
/backend/go/src/db/userQueries.sql
UTF-8
1,591
4.28125
4
[]
no_license
-- name: getUser select users.uuid as uuid, users.name as name, users.handle as handle, users.photo_uri as photouri from users where users.uuid = :user_uuid -- name: createUser insert into users (uuid, name, handle, mobile_number, created_timestamp_server, photo_uri) select :user_uuid, :name, :handle, :mo...
true
f31b2cfc2b498ff1759cf134e5e20423c0aa6105
SQL
EsmaNKilic/KampIntro
/SQLQueryWork.sql
UTF-8
235
3.34375
3
[]
no_license
 select ProductName as Products, sum( [Order Details].Quantity * [Order Details].UnitPrice ) as Profit from Products inner join [Order Details] on [Order Details].ProductID = Products.ProductID group by ProductName order by Profit;
true
723cb80c1ca348ddba18ffba4a4c80edfe931222
SQL
plamenborachev/Softuni_DatabaseBasics_MySQL-January2018
/SQL_Script/10.Databases MySQL Exam Preparation II - Databases MySQL Exam - 24 Jun 2017/DatabasesMySQLExam-24Jun2017.sql
UTF-8
7,210
4.4375
4
[]
no_license
-- *********************************01. Table Design CREATE DATABASE closed_judge_system; USE closed_judge_system; CREATE TABLE users( id INT PRIMARY KEY AUTO_INCREMENT, username VARCHAR(30) UNIQUE NOT NULL, `password` VARCHAR(30) NOT NULL, email VARCHAR(50) ); CREATE TABLE categories( id INT PRIMARY KEY AUTO_INCREME...
true
76f75229ddab96818d7ce222b40069ad3a911c7c
SQL
villce/com.vilce.learn
/springboot_vue/doc/wage.sql
UTF-8
5,328
2.6875
3
[]
no_license
CREATE TABLE vilce.wage_order ( code varchar2(255) NOT NULL, name varchar2(255) NOT NULL, order_time date NOT NULL, basic_wage number(10, 2) NOT NULL, job_wage number(10, 2) NOT NULL, benchmark...
true
6020539641132dfc41f3e5fb9ccb87e53e3ddb9e
SQL
lijintaotzx/shopping_store
/db_handler/db_init.sql
UTF-8
1,479
3.71875
4
[]
no_license
CREATE DATABASE shopping_store; USE shopping_store; CREATE TABLE `user` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `name` varchar(16) NOT NULL DEFAULT '', `pn` varchar(32) NOT NULL DEFAULT '', `role` int(11) DEFAULT '0', `password` varchar(500) NOT NULL DEFAULT '', PRIMARY KEY (`id`) ) ENGINE=InnoDB...
true
29890599bb002270dd6bd9b813d593106bbefd2b
SQL
Victoriacapo/ExerciceSQL
/partie8.sql/exercice4.sql
UTF-8
504
3.375
3
[]
no_license
SQL - Partie 8 : Les jointures SELECT languages.name AS `Language`, COUNT(frameworks.languagesId) AS `Total_frameworks` FROM languages LEFT JOIN frameworks ON languages.id = frameworks.languagesId GROUP BY languages.name HAVING `Total_frameworks` > 3; Résultat: +------------+------------------+ | Language | Total_...
true
14bb49f68ad9dcf6fa55c852040a8bcb325a6e57
SQL
MinBZK/woo-besluit-broncode-PLOOI
/verwerken/plooi-dcn/dcn-model/src/main/resources/db/migration/generic/V1_0_9__Fixes.sql
UTF-8
3,929
3.515625
4
[]
no_license
-- Aligns types in the database with the Entities (int vs bigint pks) -- Diagnostic -> Diagnostics PK serial to bigserial update CREATE TABLE Diagnostics ( id bigserial primary key, processing_error_id bigint not null, code varchar(256) null, source_id varchar(256) null, source_label varchar(256) null, targe...
true
15a6b8a96c03c806f7f55afa77f303653f8f97ff
SQL
debbyps/sql-challenge
/EmployeeSQL/Analysis/Question_6.sql
UTF-8
396
4.28125
4
[]
no_license
/* 6. List all employees in the Sales department, including their employee number, last name, first name, and department name. */ SELECT e.emp_no , e.last_name , e.first_name , d.dept_name FROM employees e INNER JOIN dept_emp de ON de.emp_no = e.emp_no INNER JOIN departments d ON de.dept_no = d.dept_no ...
true
0e7188574f261a68098c313266d08f2c396e5c75
SQL
Sanyyouisf/chinook--SanyYousif-
/10-Invoice_37_line_item_count.sql
UTF-8
214
3.46875
3
[]
no_license
/*10- Looking at the InvoiceLine table, provide a query that COUNTs the number of line items for Invoice ID 37.*/ select count (InvoiceId) As numberOfItemsInvoiceID37 from InvoiceLine where InvoiceId = '37'
true
5c1eaa4f0731dc9aec1ce25299a6e83343c13676
SQL
qmuaji/notaris_akta
/notaris_akta.sql
UTF-8
13,118
2.90625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Jun 12, 2017 at 08:19 AM -- Server version: 10.1.19-MariaDB -- PHP Version: 5.6.28 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CL...
true
6055fbd089cfa167281f8c269b7c04724ab9e3b8
SQL
jaredsmithse/DevBootCampWork
/phase_1/week_3/monday/sql_tutor.sql
UTF-8
5,480
3.59375
4
[]
no_license
# No original gist # SQL Tutor answers -- 1 -- SELECT * FROM invoices -- 2 -- SELECT * FROM artists -- 3 -- SELECT name FROM artists -- 4 -- SELECT first_name, last_name FROM employees -- 5 -- SELECT name FROM media_types -- 6 -- SELECT * FROM employees ORDER BY hire_date DESC -- 7 -- SELECT * FROM a...
true
68f1fc162770aef6645132048b3dd9d76d387511
SQL
CARSDev/MedTel
/db/get_patient_medications.sql
UTF-8
268
3.265625
3
[]
no_license
select m.medication_name, p.medication_date_prescribed, p.patient_medication_id, p.medication_side_effects, p.deleted from medications m join patient_medications p on m.medication_id = p.medication_id where p.patient_id = $1 ORDER BY medication_date_prescribed DESC;
true
d4fe2cebac6e4fd4e822418b0cc53d1a18039523
SQL
antoniorafaelcl/projetomv-backend
/script-reajuste-preco-produto.sql
UTF-8
935
3.171875
3
[]
no_license
create or replace package reajustePrecoProduto as procedure reajustarPrecoPorCategoria(categoria varchar2, preco number); procedure reajustarPrecoPorRangePercentual(percentualInicial number, percentualFim number, preco number); end; create or replace package body reajustePrecoProduto as procedure reajustarPr...
true
49754d852e691200c943ddb7634161a5c010dcda
SQL
molokovskikh/af_reportsystem
/migrations/857_00_calculate_orders.sql
UTF-8
281
2.734375
3
[]
no_license
alter table Farm.Regions add column CalculateOrders tinyint(1) unsigned not null default 0; update Farm.Regions set CalculateOrders = 1 where RegionCode in (1, 2, 2048, 4, 8, 32, 64, 16384, 32768, 65536, 128, 16777216, 33554432, 16, 256, 274877906944, 17592186044416, 512);
true
c893dcad902f15d3c7d9dedda700e7e8578a853d
SQL
QPC-database/Dynamics-365-FastTrack-Implementation-Assets
/Analytics/CostCalculator/DI_BYOD_NBBYODTables.sql
UTF-8
172
3.234375
3
[ "LicenseRef-scancode-generic-cla", "MIT" ]
permissive
select count(*) from ( select t.name as TableName, replace(t.name,'staging','') as EntityName from sys.tables t where t.Name like '%staging' ) BYODTableList
true
6d8f6d3f8d44d6d98d56dfedb18143aac7b8e38e
SQL
Trang3598/student_management
/quanlysinhvien.sql
UTF-8
5,236
3.296875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.9.0.1 -- https://www.phpmyadmin.net/ -- -- Máy chủ: 127.0.0.1 -- Thời gian đã tạo: Th7 08, 2019 lúc 11:05 AM -- Phiên bản máy phục vụ: 10.3.16-MariaDB -- Phiên bản PHP: 7.3.6 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /...
true
0a974290192b0f60118a2d3ee0a5d34e19cd4f8e
SQL
zdergatchev/Database-Basic
/12 Subqueries and JOINs Exercises/14 Countries with Rivers.sql
UTF-8
422
3.859375
4
[ "MIT" ]
permissive
USE `geography`; SELECT cou.`country_name`, r.`river_name` FROM `countries` AS cou JOIN `continents` AS con ON cou.`continent_code` = con.`continent_code` AND con.`continent_name` = 'Africa' /* WHERE con.`continent_name` = 'Africa' */ /* WHERE problem */ LEFT JOIN `countries_rivers` AS cr ON cr.`country_code` = c...
true
657e7e556774e61ea07345e0c3827b288f5b30ad
SQL
Emmettippi/tatami-be
/src/main/resources/SQL-Scripts/0009_create_table_green_card.sql
UTF-8
255
2.71875
3
[]
no_license
CREATE TABLE green_card( id BIGINT AUTO_INCREMENT NOT NULL , green_card_type VARCHAR(30) NOT NULL , green_card_subtype VARCHAR(30) NOT NULL , cost BIGINT NOT NULL , description VARCHAR(255) NOT NULL , CONSTRAINT PK_lobby PRIMARY KEY (id) );
true
21e9405aee877e15e10780e8268f8943daa751dc
SQL
vtotev/07.MySQL
/04.Data-Agregation/Data Aggregation - Lab.sql
UTF-8
869
4.21875
4
[]
no_license
# problem 1 - Departments Info select `department_id`, count(`department_id`) as 'Count' from employees group by `department_id` order by `department_id`; # problem 2 - Average Salary select `department_id`, round(avg(`salary`) , 2) as 'Average Salary' from employees group by `department_id` order by `department_i...
true
76aa4be4707e7e33ae539cb9d44adfea161966d2
SQL
handersonbf/AutocompleteScriptaculousDWRJM
/sql/autocomplete 20090928 2236.sql
UTF-8
1,786
2.875
3
[]
no_license
-- MySQL Administrator dump 1.4 -- -- ------------------------------------------------------ -- Server version 5.0.24-community-nt /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CO...
true
2f405bb4ece6220f0164a328cfe13b19ec096889
SQL
samoilovvvvv/KBD1lab
/scripts/task_1/tasks/18.sql
UTF-8
475
3.359375
3
[]
no_license
--№18. Получить номера предметов, номера преподавателей, номера групп, в которых ведут занятия преподаватели с кафедры ЭВМ, имеющих специальность АСОИ. SELECT code_subject, own_number, code_name FROM teacher AS t LEFT JOIN teacher_student_group AS tsg on t.personal_number = tsg.own_number WHERE chair = 'ЭВМ' AND ...
true
1cfbe66f72999dd9fcdf5ad9135b83d8ba9ce15a
SQL
jlouiss/CS50
/pset7/movies/13.sql
UTF-8
493
3.953125
4
[]
no_license
/* People starred in a movie where Kevin Bacon starred */ SELECT name FROM people WHERE people.id IN ( SELECT DISTINCT person_id FROM people JOIN stars ON people.id = stars.person_id JOIN movies ON movies.id = stars.movie_id WHERE movies.id IN ( SELECT movies.id FROM movies JOIN stars ON...
true
7c11ea53e1b60829334d0cf07a56c0e966f31793
SQL
kuronekowen/DbSync
/Schema/CreateSync_Changes.sql
UTF-8
397
2.53125
3
[ "MIT" ]
permissive
CREATE TABLE `Sync_Changes` ( `id` int(10) unsigned NOT NULL auto_increment, `schema` varchar(255) NOT NULL, `table` varchar(255) NOT NULL, `operation` varchar(255) NOT NULL, `pk1` int(10) unsigned NOT NULL, `pk2` int(10) unsigned NULL, `status` int(2) unsigned NOT NULL, `transactionId` int(10) unsigned NOT NUL...
true
e598317c565569429b2ba5eead14d5e83ac9262e
SQL
nandolrs/sge
/dados/modelos/script/sge/Relational_1/SQL Server 2012/DataObjects/FKIndexAssociation/SEGUSUARIOPESSOA_ITTPESSOA_FK.sql
UTF-8
198
2.578125
3
[]
no_license
ALTER TABLE SEGUSUARIOPESSOA ADD CONSTRAINT SEGUSUARIOPESSOA_ITTPESSOA_FK FOREIGN KEY(ITTPESSOA_CD_PESSOA) REFERENCES ITTPESSOA(CD_PESSOA) ON DELETE NO ACTION ON UPDATE NO ACTION GO
true
3bd48d323c10b7eecddae6c76dc6814e199dcfd6
SQL
sanina13/jdbc-program
/caritas.sql
UTF-8
4,886
3.25
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.9.0.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Tempo de geração: 14-Jan-2020 às 23:48 -- Versão do servidor: 10.4.6-MariaDB -- versão do PHP: 7.3.9 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET ...
true
3b31b7da08ff01494cd14166c5ce257c07bd9d4b
SQL
klpdotorg/importers
/klpwww.sql
UTF-8
7,384
3.578125
4
[]
no_license
-- Schema creation script for KLP aggregate DB -- This DB drives the KLP website -- Created: Mon, 07 Jun 2010 13:32:23 IST -- (C) Alok G Singh <alok@klp.org.in> -- This code is released under the terms of the GNU GPL v3 -- and is free software DROP TABLE IF EXISTS "tb_bhierarchy" cascade; CREATE TABLE "tb_bhierarchy...
true
8ad489b85f634a35523c6d5ff28c5c9cea959617
SQL
Stevenwthornton0/Brewbook_server
/migrations/002.do.create_brewbook_reviews.sql
UTF-8
314
3.25
3
[]
no_license
CREATE TABLE brewbook_reviews ( id INTEGER PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY, rating INTEGER NOT NULL, text TEXT NOT NULL, date_created TIMESTAMP DEFAULT now() NOT NULL, brewery_id TEXT NOT NULL, user_id INTEGER REFERENCES brewbook_users(id) ON DELETE CASCADE NOT NULL );
true
a3d4344fdf5d94cc59cc18246cb539d319ccafd2
SQL
darkengines/Nexus
/src/java/darkengines/conference/websocket/messagehandler/get_user_channels.sql
UTF-8
233
3.078125
3
[]
no_license
SELECT c.id, c.name FROM channel_participant AS cp JOIN channel AS c ON c.id = cp.channel_id WHERE cp.user_id = ? UNION SELECT c.id, c.name FROM channel_invitation AS ci JOIN channel AS c ON c.id = ci.channel_id WHERE ci.user_id = ?;
true
3ad0d14f010a52e7c04b15a993ff2cb0ea8f073c
SQL
egoddard/comp4115-project
/scripts/merge_zones.sql
UTF-8
1,165
3.4375
3
[]
no_license
/* * Merges all of the zone2* tables into the wellhead_protection_zone table. */ DO $$ DECLARE tables RECORD; BEGIN TRUNCATE wellhead_protection_zones CASCADE; FOR tables IN SELECT table_name FROM information_schema.tables WHERE table_schema = 'public' AND table_type = 'BASE TABLE' AND tabl...
true
b5c9a76ced8c967d08ebbc30815fe7e2e8379f3c
SQL
tfwright/whiteboard
/db/development_structure.sql
UTF-8
3,694
3.234375
3
[]
no_license
CREATE TABLE "announcements" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "course_id" integer, "subject" varchar(255), "body" text, "created_at" datetime, "updated_at" datetime); CREATE TABLE "assignments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "description" text, "due_at" datetime,...
true
8da4bfc91337c5d47f919831bf7acae9c96e7deb
SQL
daniel2483/SQLPractice
/queries/Checking_KPI_Diciembre_Tabla_Temp_RS.sql
UTF-8
755
2.9375
3
[]
no_license
select count(idTemp_preventivos_revenue_share) from Temp_preventivos_revenue_share where fecha >="2013-12-01" AND fecha<= "2013-12-31" order by fecha; select count(idTemp_preventivos_revenue_share) from Temp_preventivos_revenue_share where fecha_completado is not NULL AND fecha >="2013-12-01" AND fecha<= "2013-12-31" ...
true
c6c5e3901b9d1eb0e2edd82c2a4424ded122e2d1
SQL
jojude/CS180-Intro-to-Databases
/lab1/create.sql
UTF-8
824
3.34375
3
[]
no_license
CREATE SCHEMA lab1; CREATE TABLE Persons( SSN INTEGER, Name CHAR(30), HouseId INTEGER, ApartmentNumber INTEGER, Salary DECIMAL(7,2), PRIMARY KEY(SSN) ); CREATE TABLE Houses( HouseID INTEGER, HouseAddress VARCHAR(40), ApartmentCount INTEGER, Color VARCHAR(40), PRIMARY KEY(HouseID) ); CREATE TABLE Landlor...
true
2d026b1c2411e11d2a9287dad6cea2958721d570
SQL
DiegoGoldRA24/EXAMEN
/SCRIP/EXAMEN.sql
UTF-8
804
3.765625
4
[]
no_license
use sakila; -- 1 select concat(customer.first_name,' ',customer.last_name) AS CLIENTE, address.phone AS TELEFONO, customer.email AS CORREO_ELECTRONICO, address.address AS DIRECCION, address.district AS DISTRITO, country.country AS PAIS from customer inner join address on customer.address_id = address.address inner jo...
true
4875229f344e83d9953796e2a71c1f457f185add
SQL
iamhabee/E-school-web-app
/e_school.sql
UTF-8
20,046
3.140625
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.8.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Feb 13, 2020 at 05:30 PM -- Server version: 10.1.34-MariaDB -- PHP Version: 7.2.7 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
true
039dd40f7584c55cfda401f56156863797478925
SQL
BenediktFrohnen/Weatherstation
/src/main/resources/weather_table.ddl
UTF-8
339
3.109375
3
[]
no_license
CREATE TABLE `weather` ( `ID` INT(11) NOT NULL AUTO_INCREMENT, `time` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `temperature` DECIMAL(5, 2) NOT NULL, `humidity` DECIMAL(5, 2) NOT NULL, PRIMARY KEY (`ID`) ) ENGINE =InnoDB AUTO_INCREMENT =4 DEFA...
true
4b577f94d7306f73a589dddc49a779f106289076
SQL
bigfool-cn/logrus-clickhouse-hook
/migrations/log.sql
UTF-8
242
2.625
3
[ "MIT" ]
permissive
CREATE TABLE logs.log ( `origin` String, `level` String, `msg` String, `time` String, `date` Date DEFAULT toDate(now(),'Asia/Shanghai') ) ENGINE = MergeTree PARTITION BY date ORDER BY time SETTINGS index_granularity = 8192
true
57cabd7e5c4777c9d55bf94856be4cf5614e8ee5
SQL
kosmonafta666/Dababase-Basic
/Built-in functions/Find Towns with Name Length.sql
UTF-8
87
2.84375
3
[]
no_license
SELECT t.Name FROM Towns AS t WHERE LEN(t.Name) = 5 OR LEN(t.Name) = 6 ORDER BY t.Name;
true
32cdd37978c219ba508b6f718a759ddc02ff5cd8
SQL
department-of-veterans-affairs/ChartReview
/web-app/js/ext-5.1.0/examples/simple-tasks/db/schema.sql
UTF-8
732
3.75
4
[ "CC-BY-2.5", "MIT", "GPL-1.0-or-later", "BSD-3-Clause", "LicenseRef-scancode-free-unknown", "GPL-3.0-only", "LicenseRef-scancode-unknown-license-reference", "LicenseRef-scancode-public-domain", "Apache-2.0" ]
permissive
CREATE TABLE config (key VARCHAR(50) PRIMARY KEY, value VARCHAR(255)); CREATE TABLE task (id INTEGER PRIMARY KEY AUTOINCREMENT, title VARCHAR(255), list_id INTEGER, due DATE, reminder DATE, done INTEGER, note BLOB); CREATE TABLE list (id INTEGER PRIMARY KEY AUTOINCREMENT, name VARCHAR(50), leaf INTEGER, lft INTEGER, rg...
true
835d937dcc4c48dcb7168e4485a5b0360a7f8af2
SQL
JustinSGardner/sql_exercises_small
/schema.sql
UTF-8
672
3.71875
4
[]
no_license
/* This is my SCHEMA file */ /* It contains the data structure for my tables */ CREATE TABLE resaurants ( id serial primary key, name text NOT NULL, distance integer, stars integer, category text, favorite_dish text, does_takeout boolean, ate_last timestamp ); CREATE TABLE reviewer ( ...
true
8dcd713b73c0f1c81288d558389ffd8a0dd8cf54
SQL
ssadatGetHub/CIS-2232_Assignment4_Elhan_Sadat
/database/cisis_template_db.sql
UTF-8
32,682
3.03125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.1.8 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Sep 16, 2014 at 11:08 AM -- Server version: 5.1.73-cll -- PHP Version: 5.4.23 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT ...
true
72238f5a6ed9d70553690b4a05ef8905ebbe5de5
SQL
Chonnisat/trainWeb
/mysql/projectScript.sql
UTF-8
1,511
3.265625
3
[]
no_license
-- read-project select concat(param_code,'-',entry_code,'-',item_code) as "pkCode" , item_code as "projCode" , item_desc as "projName" , item_value as "projImage" , item_type as "status" from sc_entry_item where param_code = 'ISSUE' and entry_code = 'PROJECT'; -- readById-project select...
true
b4d2cf0baae99dc614c90ea6b15e436b7f1208c3
SQL
maplebird/url_lookup
/migrations/02_create_default_schema.sql
UTF-8
454
3.078125
3
[]
no_license
CREATE SCHEMA url_lookup CHARACTER SET UTF8 COLLATE utf8_bin; CREATE TABLE url_lookup.fqdns ( fqdn VARCHAR(200) NOT NULL, reputation CHAR(25) NOT NULL DEFAULT 'unknown', INDEX (fqdn), PRIMARY KEY (fqdn) ); CREATE TABLE url_lookup.lookup_paths ( id int NOT NULL AUTO_INCREMENT, fqdn VARCHAR(200)...
true
162a40b847fb6435f458f755950918ff45a72891
SQL
nickcxm/openuserjs
/openuserjs/userjs.sql
UTF-8
1,552
2.9375
3
[]
no_license
/* Navicat Premium Data Transfer Source Server : localhost_3306 Source Server Type : MySQL Source Server Version : 50722 Source Host : localhost:3306 Source Schema : test Target Server Type : MySQL Target Server Version : 50722 File Encoding : 65001 Date: 19/07/2018 ...
true
adb52491dc21d9fc117c258e43857e7d867c4999
SQL
green-fox-academy/czakoilevente
/w6/d2/q5.sql
UTF-8
168
3.234375
3
[]
no_license
SELECT name, title, stars, ratingdate FROM rating LEFT JOIN reviewer ON reviewer.rid = rating.rid LEFT JOIN movie ON movie.mid = rating.mid ORDER BY name, title, stars;
true
95d7b8e99dd6cb60f55a781114532f87e435e36b
SQL
yoonicode/of-DateBase
/005. CREATE TABLE[테이블 생성]/create_table_ex1.sql
UTF-8
983
3.140625
3
[]
no_license
CREATE TABLE `animal_info` ( `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY, `type` VARCHAR(30) NOT NULL, `name` VARCHAR(10) NOT NULL, `age` TINYINT NOT NULL, `sex` CHAR(1) NOT NULL, `weight` DOUBLE NOT NULL, `feature` VARCHAR(500) NULL, `entry_date` DATE NOT NULL); INSERT INTO animal_inf...
true
7c254123b2891128d0421e0eae694581ee84ac8a
SQL
murari-goswami/bi
/ETL/DataVirtuality/views/tableau/tableau.logistics_overview.sql
UTF-8
4,641
3.9375
4
[]
no_license
-- Name: tableau.logistics_overview -- Created: 2015-04-24 18:19:37 -- Updated: 2015-04-24 18:19:37 CREATE view tableau.logistics_overview AS SELECT distinct co.id as order_id, co.country, co.date_picked, ddsoir.order_on_error, ddsoh.transmitted_pending_shipment, bo.backorder_orderid, bo.picklist_created_pendin...
true
01bf90579dc027c5ee04d8cfe4e132138558bc6e
SQL
fmaestre/SqlServerHelpers
/full text indexes fragmented.sql
UTF-8
1,432
4
4
[]
no_license
-- Compute fragmentation information for all full-text indexes on the database SELECT c.fulltext_catalog_id, c.name AS fulltext_catalog_name, i.change_tracking_state, i.object_id, OBJECT_SCHEMA_NAME(i.object_id) + '.' + OBJECT_NAME(i.object_id) AS object_name, f.num_fragments, f.fulltext_mb, f.largest_fragment_...
true
f84c31df8b076beb604c931234bc5c1b1dc61165
SQL
samszo/jardindesconnaissances
/bdd/query/docHierarchie.sql
UTF-8
272
3.796875
4
[]
no_license
SELECT d.titre, count(DISTINCT de.doc_id) nbDocEnf, count(DISTINCT utd.tag_id) nbTagEnf FROM flux_doc d INNER JOIN flux_doc de ON de.tronc = d.doc_id inner join flux_utitagdoc utd on utd.doc_id = de.doc_id GROUP BY d.doc_id -- GROUP BY t.tag_id ORDER BY nbDocEnf DESC
true
0b33a474bf7e3559d78b5a5174345b37ac00e5a9
SQL
rubfan/je3-project
/src/test/resources/db/05_Resource.sql
UTF-8
1,915
2.53125
3
[]
no_license
INSERT INTO `Resource` (`id`, `name`, `description`) VALUES ('1', 'corn','Money, ideals, religion - all does not matter. Without food you are dead.'), ('2', 'eggs','They roll out from the strange building.'), ('3', 'chickens','Future workers , future fighters.'), ('4', 'dung','It shall be useful in ...
true
99022ea47890a1c75ca67d7d462628c8e1f009b8
SQL
cristian-hum/Spring-si-recapiturare
/sql/src/main/resources/data_query_language.sql
UTF-8
2,760
4.65625
5
[]
no_license
# DQL (data query language) # select particular columns SELECT first_name, last_name FROM persons; # select distinct SELECT DISTINCT first_name FROM persons; # where clause SELECT first_name, last_name, birth_date FROM persons WHERE first_name = 'Michael'; # select as SELECT first_na...
true
afd3da41a9f9392afba9bc6db9e6c1c181d27e9f
SQL
igoltz/flex-standalone-site
/src/resources/sql/migrations/0016_message_of_day.sql
UTF-8
668
2.703125
3
[ "CC-BY-4.0" ]
permissive
CREATE TABLE `motd` ( `id` INT UNSIGNED NOT NULL AUTO_INCREMENT, `title` VARCHAR(250) NOT NULL , `message` TEXT NOT NULL , `resource` VARCHAR(250) NOT NULL, `displaydate` DATETIME NOT NULL , `displaywhenloggedin` TINYINT(1) NOT NULL DEFAULT 0, `code` VARCHAR(45) NULL COMMENT 'A numeric code to identify t...
true
101c8eeb6a3ae1a4f14f46ba77878e580e3f3033
SQL
yunhyemin291/hyeminjava
/sql/SQL예제7_프로시저예제.sql
UTF-8
1,556
3.859375
4
[]
no_license
/* 과목코드,강의년도,강의학기,분반,강의실,강의시간,교수번호가 주어졌을때 새로운강의를 등록하는 프로시저를 작성하세요 CONCAT함수:매개변수들을 이어서 하나의 문자열로 만드는 함수 CONCAT(1,'ABC','-')=>1ABC- */ drop procedure if exists insert_course; delimiter // create procedure insert_course( in subject_code varchar(6), in course_year int, in course_seasion int, in course_class int, in co...
true
127eeb40e0ae6d43ce3f5f138e589e18abd7e502
SQL
minhkhiemm/blog-actix
/migrations/2020-09-09-141835_create_posts/up.sql
UTF-8
230
2.609375
3
[]
no_license
-- Your SQL goes here CREATE TABLE posts ( id SERIAL PRIMARY KEY NOT NULL, user_id SERIAL NOT NULL REFERENCES users (id), title VARCHAR NOT NULL, body TEXT NOT NULL, published BOOLEAN NOT NULL DEFAULT 'FALSE' )
true
c574cfead3199a4f852c2297d3b4777f6c406aa2
SQL
AngieSnyder/SQLLabs
/Ch6Ti6Intersect.sql
UTF-8
270
3.453125
3
[]
no_license
SELECT CT.AcctID FROM AccountTransaction AS CT WHERE TransactionDate BETWEEN '20170101' AND '20171231' AND TransactionType = 'ATM' EXCEPT SELECT CT.AcctID FROM AccountTransaction AS CT WHERE TransactionDate BETWEEN '20160101' AND '20161231' AND TransactionType = 'ATM'
true
783bea70815de8ee1163010a07b3f3c445390555
SQL
thiagohrcosta/CodeAcademy
/Data Science/RestaurantProject/RestaurantSolution.sql
UTF-8
2,904
3.875
4
[]
no_license
/* 1. What are the column names? */ SELECT * FROM nomnom; /* ===========================================================================================*/ /* 2. What are the distinct neighborhoods? */ SELECT DISTINCT neighborhood FROM nomnom; /* =====================================================================...
true
d21acfac1bc83f654207b084cef629599ff0baa6
SQL
Appmakers123/YT_SQL_for_DataScience
/SQL Training/SQL_SuperStore_Create_Alter_23May2020.sql
UTF-8
718
2.796875
3
[ "MIT" ]
permissive
create table superstore_customers as SELECT distinct `Customer ID` , `Customer Name` , Segment , City , State , Country , Region , `Postal Code` FROM superstore.superstore_sales; create table superstore_sales_bk as SELECT * from superstore_sales; ALTER TABLE `superstore`.`superstore_sales` DROP COLUMN `Customer...
true
682efd9fda81ccfa195259b629095a34e8e11bcb
SQL
g1uliano/sca
/banco.sql
UTF-8
7,026
3.34375
3
[ "MIT" ]
permissive
# -------------------------------------------------------- # Host: 127.0.0.1 # Server version: 5.5.8 # Server OS: Win32 # HeidiSQL version: 6.0.0.3603 # Date/time: 2011-09-01 14:23:05 # ----------------------------------------...
true
5f533f608002abce4a9201ad040497dbd1b6da8f
SQL
ajmerasaloni10/SQL
/CTE.SQL
UTF-8
940
3.84375
4
[]
no_license
CREATE TABLE StudentClass (ID INT, StudentName VARCHAR(100), ClassName VARCHAR(100), Marks INT); INSERT INTO StudentClass values(1, 'Roger', 'Science', 50); INSERT INTO StudentClass values(2, 'Sara', 'Science', 40); INSERT INTO StudentClass values(3, 'Jimmy', 'Science', 30); INSERT INTO StudentClass values(4, 'Mike...
true
6088b2b5a06e5f3aeb87548e93ae2891e22418b6
SQL
taoxuhenu/PyDaWeb
/pyda.sql
UTF-8
27,373
3.265625
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : root Source Server Version : 50721 Source Host : localhost:3306 Source Database : pyda Target Server Type : MYSQL Target Server Version : 50721 File Encoding : 65001 Date: 2019-06-07 22:51:11 */ SET FOREIGN_KEY_CHECKS=0; -- ---------...
true
a904bf4c84840b8475add3a92f12f7aa48058fce
SQL
CheckAppAsia/webapp
/sql/dev_pharmacy.sql
UTF-8
7,794
3.28125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.2.6 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Jan 07, 2015 at 07:52 PM -- Server version: 5.6.19 -- PHP Version: 5.4.16 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; ...
true
1576d5415b1ce5bbc2fe806e10e2b2ce93fb7fd0
SQL
altamira/visualstudio
/Sistema de Informação Altamira/EGISSQL.Database/dbo/Stored Procedures/Procs2/pr_exclusao_pedido_importacao.sql
UTF-8
2,410
2.765625
3
[]
no_license
 CREATE PROCEDURE pr_exclusao_pedido_importacao ------------------------------------------------------------------------------- --pr_exclusao_pedido_importacao ------------------------------------------------------------------------------- -- GBS - Global Business Sollution Ltda 2004...
true
6e2cd35a232a8d9a5d2490af0a469dc1337da6f4
SQL
jgarzonext/plsql-testing
/script_plsql/bd_iaxis/script/tables/INT_FICHERO_CONDICIONES.sql
ISO-8859-1
1,345
3
3
[]
no_license
-------------------------------------------------------- -- DDL for Table INT_FICHERO_CONDICIONES -------------------------------------------------------- CREATE TABLE "AXIS"."INT_FICHERO_CONDICIONES" ( "NCONDICION" NUMBER(5,0), "NORDCOND" NUMBER(4,0), "TVALCOND" VARCHAR2(50 BYTE) ) SEGMENT CREATION IMME...
true
74a8f06e3303c45a1e0eab742a820bc83538d97e
SQL
nfaggian/record_linkage
/queries/subsets.sql
UTF-8
294
2.71875
3
[ "Apache-2.0" ]
permissive
-- Sub-sample of the donor dataset SELECT * FROM record_link.donors WHERE MOD(ABS(FARM_FINGERPRINT(CAST(donor_id AS STRING))), 1000) = 0 -- Sub-sample of the contributions dataset SELECT * FROM record_link.donors WHERE MOD(ABS(FARM_FINGERPRINT(CAST(donor_id AS STRING))), 1000) = 0
true
85bcb42918d48bc2be83003957ccf5affffcee4c
SQL
Vortlx/PreWork-Security-
/sqlscripts/UserInfo.sql
UTF-8
345
3.28125
3
[]
no_license
CREATE TABLE user_info( id INT UNSIGNED AUTO_INCREMENT, username VARCHAR(255) UNIQUE NOT NULL, password VARCHAR(255) NOT NULL, enabled TINYINT NOT NULL DEFAULT 1, id_role INT UNSIGNED NOT NULL, PRIMARY KEY(id), FOREIGN KEY (id_role) REFERENCES roles(id) ON DELETE CASCADE ON UPDATE CASCADE ) CHARACTER SET = utf8...
true
1244b35af9d2971e51705e5309ab9a03c03ad4fb
SQL
axelvandencamp/DATABEHEER
/DATABEHEER stats Incasso Bestand.sql
UTF-8
887
3.359375
3
[]
no_license
------------------------------------------ -- moet gelopen worden voor een incasso bestand bevestigd worden -- nadien staat alle op "recurring" en kan dus niet meer op "first" gegroepeerd worden ------------------------------------------ DROP TABLE IF EXISTS _AV_myvar; CREATE TEMP TABLE _AV_myvar (incasso_bestanden c...
true
01ace7114d7a6bddf6fca315897d9d580eee7b3e
SQL
felipiberdun/itsanorder
/src/main/resources/db/migration/V1.0__Project_set_up.sql
UTF-8
3,514
3.5625
4
[]
no_license
CREATE TABLE ORDER_STATUS ( ID INTEGER NOT NULL, DESCRIPTION VARCHAR(120) NOT NULL, CONSTRAINT PK_ORDER_STATUS PRIMARY KEY (ID) ); INSERT INTO ORDER_STATUS (ID, DESCRIPTION) VALUES (1, 'Created'); INSERT INTO ORDER_STATUS (ID, DESCRIPTION) VALUES (2, 'Accepted'); INSERT...
true
e151cd18cb5f3baca6395ce76a6e348db5285f76
SQL
sanei-dengyo-jyoho/SQL-Server
/内線管理/工事進捗出来高_Q月別_サブタスク.sql
UTF-8
4,662
4.21875
4
[]
no_license
with t0 as ( select top 100 percent ta0.工事年度 , ta0.工事種別 , ta0.工事項番 , ta0.タスク番号 , ta0.サブタスク番号 , ta0.日付 , ta0.出来高 , ta0.稼働人員 from 工事進捗管理_Tサブタスク_出来高 as ta0 order by ta0.工事年度 , ta0.工事種別 , ta0.工事項番 , ta0.タスク番号 , ta0.サブタスク番号 , ta0.日付 desc ) , v2 as ( select dbo.FuncMakeConstructNumber(a2.工事年度,a2.工事種別,a2.工事項番) AS 工事番号 ,...
true
5dc275a293e4c9af8131485fa2374f6a244ed35a
SQL
PameGatica/MDY3131
/20210427 - Cursores Explícitos.sql
UTF-8
1,542
3.71875
4
[]
no_license
SET SERVEROUTPUT ON; /* DECLARE CURSOR cur_empleados IS SELECT employee_id, first_name, last_name, salary FROM employees ORDER BY employee_id; TYPE tipo_reg_empleado IS RECORD( id employees.employee_id%TYPE, nombre employees.first_name%TYPE, apellido employees.last_name%TYPE, ...
true
9aa1210d7c3f654efc47d6ded458666d5c019a3c
SQL
erda-project/erda
/pkg/database/sqlparser/testdata/new_scripts_test_data/service_a/20200101_01_first_feature.sql
UTF-8
3,139
2.65625
3
[ "Apache-2.0" ]
permissive
# base # baseline CREATE TABLE `dice_api_assets` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT Comment 'id', `asset_id` varchar(191) not NULL Comment '', `asset_name` varchar(191) not NULL Comment '', `descriptions` varchar(1024) not NULL Comment '', `logo` varchar(1024) not NULL Comment '', `org_id` ...
true
5673f888f64fb6a69ae8d267403fd96c5173ca1d
SQL
pillihuaman/wsGamachicas.com.pe
/sp_ListImagenByTop.sql
UTF-8
557
3.890625
4
[]
no_license
use Gamachicas; DELIMITER $$ DROP PROCEDURE IF EXISTS gamachicas.sp_ListImagenByTop $$ CREATE PROCEDURE sp_ListDetImagenByIdImagen ( IN count int(11)) BEGIN select pro.Description, pro.Name ,pro.idProduct,pri.SmallerPrice,pri.HigherPrice, im.CountViews,im.PositionWeb,im.idImagen,det.idDetailImagen from gamachicas.im...
true
058101b10c1ad2dc0ba9e397c73e82a6c1fb7dea
SQL
ipti/br.hb
/banco/old/update-2015-03-04.sql
UTF-8
1,193
3.421875
3
[ "BSD-3-Clause" ]
permissive
ALTER TABLE `enrollment` ADD COLUMN `id` INT NOT NULL AUTO_INCREMENT AFTER `classroom`, DROP PRIMARY KEY, ADD PRIMARY KEY (`id`); ALTER TABLE `enrollment` CHANGE COLUMN `id` `id` INT(11) NOT NULL AUTO_INCREMENT FIRST; ALTER TABLE `term` DROP FOREIGN KEY `fk_term_student`; ALTER TABLE `term` CHANGE COLUMN `student`...
true
167b215eea81b58a0916f44fd9a0bb1d436c4037
SQL
XCentium/NBF
/src/DBScripts/Test Scripts/basic sale price on product.sql
UTF-8
869
3.765625
4
[]
no_license
select top 1000 * from pricematrix where CustomerKeyPart = 'sale' and ProductKeyPart in (select ProductId from CategoryProduct) and ProductKeyPart in (select Id from Product where IsDiscontinued = 0) select Amount01, * from PriceMatrix where ProductKeyPart = '69C3D8B9-87FD-E711-A98C-A3E0F1200094' select ERPNumber, Basi...
true
9676e9b7467ea7ab201f0ea3013573979f25221e
SQL
WillZWL/project
/database/change script/simplyelectronics.net/20130619_1.sql
UTF-8
2,192
3.71875
4
[]
no_license
drop table if exists `so_refund_priority_score`; CREATE TABLE `so_refund_priority_score` ( `so_no` int(10) unsigned NOT NULL, `score` int(10) unsigned NOT NULL, `create_on` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', `create_at` varchar(16) NOT NULL, `create_by` varchar(32) NOT NULL, `modify_on...
true
c6892b000bf54800dd720747d109f3b1a26be4a4
SQL
nvanha/chat_web_application
/sql/database.sql
UTF-8
11,490
3.296875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Mar 31, 2021 at 01:09 PM -- Server version: 10.4.11-MariaDB -- PHP Version: 7.4.3 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*...
true
4264289ea16b192735684f5bd4924e2bb3be6821
SQL
shinyay/testcontainers-mysql-jdbc-gs
/src/main/resources/db/migration/V001__INIT.sql
UTF-8
223
2.671875
3
[ "MIT" ]
permissive
CREATE TABLE books ( id bigint(20) NOT NULL AUTO_INCREMENT, isbn varchar(17) NOT NULL UNIQUE, title varchar(255) NOT NULL, author varchar(20) NOT NULL, price bigint NOT NULL, PRIMARY KEY (id) );
true