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
7421db7797f9ef312a1792fc2730ceee3c90f1e8
SQL
akshayabp/vehicle-locator-mysql
/schema.sql
UTF-8
408
2.984375
3
[]
no_license
drop table if exists vehicle; drop table if exists driver; create table driver ( id INT NOT NULL AUTO_INCREMENT, name varchar(25) not null, PRIMARY KEY ( id ) ); create table vehicle ( id INT NOT NULL AUTO_INCREMENT, year INT, model varchar(25), make varchar(25), plate varchar(25), PRIMARY KEY ( ...
true
10a1eda02302a697bed8b239def32c88823dcc1c
SQL
jjelosua/elecciones_2015_arg_ballo_escuelas
/backend/data/sql/create_schema.sql
UTF-8
6,289
3.71875
4
[]
no_license
--TABLES AND INDEXES -- Table: establecimientos DROP TABLE IF EXISTS establecimientos; CREATE TABLE establecimientos ( id_establecimiento integer NOT NULL, key_sie character varying(12) NOT NULL, id_distrito character varying(2) NOT NULL, distrito character varying(50), id_seccion character varying(3) NOT NU...
true
19572d14cc369016e81d124cafcad8a5345e197f
SQL
geobrocks1234/Wantsome_Homework
/week12-sql-from-course-exercises/join ex2.sql
UTF-8
182
3.203125
3
[]
no_license
select concat(e.first_name," ",e.last_name) 'Employee Name',j.name 'Job Title', e.salary-j.min_salary 'Difference Salary-Min_salary' from geo_employees e join geo_jobs j on e.job_id=j.id;
true
d3d17663ed059ffa2f552cff7c4514737389d25c
SQL
RaquelMDiaz/Educational-Game-for-Linguistics
/sql/help_game.sql
UTF-8
5,816
3.03125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 3.5.2.2 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Jan 02, 2015 at 04:32 PM -- Server version: 5.5.27 -- PHP Version: 5.4.7 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /...
true
21ee95eb2999804e0ecdec2b5bb5e16e3e5c0936
SQL
mdm373/ny-data-ingest
/sql/series_reduction_insert.sql
UTF-8
306
3.21875
3
[]
no_license
INSERT INTO {{toTable}} (id, bound_id, timestamp, value) (SELECT ROW_NUMBER() OVER (ORDER BY bound_id), bound_id, date_trunc('{{granularity}}', timestamp) as period, ROUND(AVG(value)) as value FROM {{fromTable}} GROUP BY period, bound_id ORDER BY bound_id, period ) ON CONFLICT DO NOTHING
true
ca28d6fdaa3f945a15e4374ec74203b49e58a398
SQL
JuanSuppicich/dan-app
/dan-ms.sql
UTF-8
8,933
3.671875
4
[]
no_license
-- Database: dan-ms -- DROP DATABASE "dan-ms"; DROP SCHEMA IF EXISTS ms_users CASCADE; DROP SCHEMA IF EXISTS ms_orders CASCADE; DROP SCHEMA IF EXISTS ms_products CASCADE; DROP SCHEMA IF EXISTS ms_accounting CASCADE; DROP SCHEMA IF EXISTS ms_delivery CASCADE; /* CREATE DATABASE "dan-ms" WITH OWNER = postgres ...
true
33bdca88378cc887b527bf7e6d3271a607f72629
SQL
kr1994/Telerik-SmartGarage
/db/smartGarage.sql
UTF-8
14,904
3.28125
3
[]
no_license
-- -------------------------------------------------------- -- Host: 127.0.0.1 -- Server version: 10.5.8-MariaDB - mariadb.org binary distribution -- Server OS: Win64 -- HeidiSQL Version: 11.0.0.5919 -- ------------------------------------------------...
true
188190e41cbc69cf767e8d7d2f32122c707a5aaf
SQL
arpitnarechania/sqlqueries
/aircrack-ng_aircrack-ng.sql
UTF-8
1,937
3.5
4
[]
no_license
SELECT essid_id FROM workbench LIMIT 1; SELECT * from work where net = ? SELECT * from dict where id = ? and lines = ? SELECT * from clients where id = ? INSERT into work values (NULL, ?, ?, ?, ?, datetime(), 1) SELECT COUNT(*) FROM workbench INNER JOIN SELECT * from nets where state = 1 create table dict (id varchar(...
true
9d48295454e3b9f89dc4af43064caa99016b01e9
SQL
lbenezra/dbt-interview
/models/marts/interview_task/dim_user_and_first_order.sql
UTF-8
744
3.859375
4
[]
no_license
with orders as ( select * from {{ ref('stg_orders') }} ), addresses as ( select * from {{ ref('stg_addresses') }} ), joined as ( select addresses.user_id, min(orders.order_id) as first_order_id, case when min(orders.order_id) = orders.order_id then 'new' ...
true
a82ddbb3d61bbb3ec8dec7a3ad3750bd4da251b9
SQL
2010USFJava/MaurerP
/MaurerJDBCBank/JDBCBank.sql
UTF-8
2,747
3.625
4
[ "MIT" ]
permissive
/*Thriving Banking Database * bankdata.sql * Creates and populates the Banks database * DB Server: PostgreSql * Petra Maurer*/ --Create Table employee create table employee ( emp_id serial primary key, emp_email varchar(40) not null unique, emp_password varchar(40) not null, emp_fname varchar(40) not null, ...
true
04010754cb98632e202c08752cebb2c905410024
SQL
KMAThor/spms
/database_scripts/spmsDatabaseCreationScript.sql
UTF-8
4,893
3.703125
4
[]
no_license
CREATE TABLE "user"( id BIGSERIAL PRIMARY KEY, email VARCHAR(254) UNIQUE NOT NULL, first_name VARCHAR(255) NOT NULL, second_name VARCHAR(255) NOT NULL, last_name VARCHAR(255) NOT NULL, password CHAR(60) NOT NULL, is_active BOOLEAN NOT NULL DEFAULT TRUE ); CREATE TABLE application_form( user_id BIGINT PRIMARY...
true
a9d5e8dbb3933385a70fe9760d64bb2821da1613
SQL
h1542462994/homework.dbgrade
/doc/sql/5_create_base_views.sql
UTF-8
15,548
3.734375
4
[ "MIT" ]
permissive
/*创建地区统计视图*/ create or alter view @{middle}_DestSummaryView@{no} as select @{middle}_Provinces@{no}.@{short}_Prno@{no} @{short}_Prno@{no}, @{middle}_Provinces@{no}.@{short}_Name@{no} @{short}_PrName@{no}, @{middle}_Provinces@{no}.@{short}_SummaryCount@{no} @{short}_PrSummaryCount@{no}, @{middle}_Cities@{no}.@{short...
true
910a12a7abbafb648e7b1c14920cc4c1308f0295
SQL
SheKei/COMP3000-Computing-Project
/Hourly/MySQL statements/Tables & Data/task.sql
UTF-8
2,740
3.34375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.9.0.1 -- https://www.phpmyadmin.net/ -- -- Host: proj-mysql.uopnet.plymouth.ac.uk -- Generation Time: Nov 19, 2020 at 10:07 PM -- Server version: 8.0.21 -- PHP Version: 7.2.19 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; ...
true
0c7d0e1b071b15ba582f894e76fc82b342ab337f
SQL
xpgitcup/Lims2019AA
/src/main/webapp/scripts/team.sql
UTF-8
1,748
2.9375
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : sample Source Server Version : 50725 Source Host : localhost:3306 Source Database : lims2018bdb Target Server Type : MYSQL Target Server Version : 50725 File Encoding : 65001 Date: 2019-03-03 14:48:35 */ SET FOREIGN_KEY...
true
23aaca117fe6295a8d44ee130feb77f386068268
SQL
ajumt/artists_gallery
/backup/artists_gallery1.sql
UTF-8
12,908
3.421875
3
[ "LicenseRef-scancode-unknown-license-reference", "MIT" ]
permissive
/* SQLyog Community v13.1.3 (64 bit) MySQL - 5.7.24 : Database - artists_gallery ********************************************************************* */ /*!40101 SET NAMES utf8 */; /*!40101 SET SQL_MODE=''*/; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=...
true
24420ded39f5d46ffb84f88e9c5019599a8ceb84
SQL
WakeDown/UN1T_DataProvider
/DataProvider/SpeCalcDb/Stored Procedures/Claim/Position/ChangePositionsProduct.sql
UTF-8
212
2.65625
3
[]
no_license
 create procedure ChangePositionsProduct ( @ids nvarchar(max), @product nvarchar(500) ) as update ClaimPosition set ProductManager = @product where Deleted = 0 and Id in (select * from dbo.Split(@ids,','));
true
54fe2dbcb72f1e751f4b4013288bb1d844b684fb
SQL
sirbuoanabianca/Car-Fleet-Management
/Car-Fleet-Management/src/sql/rapoarte.sql
UTF-8
1,171
4.125
4
[]
no_license
#5.Raport consum mediu al tuturor masinilor din parc continand numarul de inmatriculare si anul fabricatiei SELECT masina.numar_inmatriculare,masina.an_fabricatie,SUM(cursa.`consum(litri)`)*100/SUM(cursa.nr_km) AS 'consum mediu\n(litri /100 km)' FROM masina JOIN cursa ON masina.ID_masina = cursa.id_masina GROUP BY curs...
true
29d64cf476236da6a3740411f6f7e630058ccca3
SQL
m-01101101/product-analytics
/fight-churn/eda/queries/sliding_event_count.sql
UTF-8
538
4.0625
4
[ "MIT" ]
permissive
with date_vals AS ( select i::timestamp as metric_date from generate_series('%from_yyyy-mm-dd', '%to_yyyy-mm-dd', '7 day'::interval) i ) select account_id , metric_date , count(*) as n_%event2measure from socialnet7.event e inner join date_vals d on e.event_time < metric_date and e.event_time...
true
5fcbbbb78a7297006a6a7130b84dcc4831ea94b4
SQL
PacktPublishing/Learning-PostgreSQL-11-Third-Edition
/Chapter01/and_or_operator.sql
UTF-8
366
3.375
3
[ "MIT" ]
permissive
\pset null null WITH data (v) as (VALUES (true), (false),(null)) SELECT DISTINCT first.v::TEXT as a, second.v::TEXT as b, (first.v AND second.v)::TEXT AS "a and b", (first.v OR second.v)::TEXT as "a or b" FROM data as first cross join data as second O...
true
bb5dac7b062624c0ce15acebee224a8c5c9523ad
SQL
hqottsz/MXI
/assetmanagement-database/src/base/plsql/opr/view/aopr_ad_status_acft_v1.sql
UTF-8
1,007
3.265625
3
[]
no_license
--liquibase formatted sql --changeSet aopr_ad_status_acft_v1:1 stripComments:false CREATE OR REPLACE VIEW AOPR_AD_STATUS_ACFT_V1 AS SELECT opr_asset_ad_status.ID, ref_doc.task_id, asset_id AS inv_id, ref_doc.defn_id AS task_defn_id, assembly_code AS assmbl_code, ref_doc.st...
true
d298d4c6e87daa27d455245ac38874376ae2f21f
SQL
Pyroblast/SIMS
/student.sql
UTF-8
4,890
3.234375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 3.2.4 -- http://www.phpmyadmin.net -- -- 主机: localhost -- 生成日期: 2014 年 04 月 24 日 13:09 -- 服务器版本: 5.1.41 -- PHP 版本: 5.3.1 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RE...
true
f651c1ff9ecf96b3b893abd79c6a0272b748cf77
SQL
joemooretv/GB-db
/lessons/05/5-02.sql
UTF-8
7,897
3.421875
3
[]
no_license
/* 1. Пусть в таблице users поля created_at и updated_at оказались незаполненными. Заполните их текущими датой и временем. */ -- Создаем столбец с датой рождения в таблице users ALTER TABLE `users` ADD COLUMN `birthday` DATE NULL AFTER `password_hash`; -- Заполняем данными (есть ли способ множественного добавления?...
true
c6d61d15a1c420a284666742020a1c5d03e44075
SQL
oussrh/Texstock
/easyscaner.sql
UTF-8
7,106
3.046875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.4.10 -- http://www.phpmyadmin.net -- -- Client : localhost:8889 -- Généré le : Dim 08 Octobre 2017 à 14:59 -- Version du serveur : 5.5.42 -- Version de PHP : 5.6.10 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; -- -- Base de données : `scannerfly` -- CREATE...
true
2527e4fd8ac6cf5d00c3de7d6fa58f0dd52fe8aa
SQL
vartija/arvo-tasks
/resources/sql/uraseuranta.sql
UTF-8
4,935
3.15625
3
[]
no_license
-- :name add-uraseuranta! :! :n INSERT INTO uraseuranta.uraseuranta (name) VALUES (:name); -- :name list-uraseuranta :? :* SELECT * FROM uraseuranta.uraseuranta; -- :name insert-virta-data! :! :n INSERT INTO uraseuranta.virta_data (uraseuranta_id, oppilaitoskoodi, henkilotunnus, oppilaitos_nimi, valmistumisvuosi, val...
true
def48110545b25d95837bcc76697e81a7b66e7ba
SQL
fisenkodv/home-temperature-monitoring
/src/Monitoring.Web/Monitoring.Data/schema.sql
UTF-8
1,000
3.96875
4
[ "MIT" ]
permissive
-- -- Table structure for table `devices` -- CREATE TABLE `devices` ( `id` int(11) NOT NULL, `uuid` varchar(36) NOT NULL, `name` varchar(255) NOT NULL, `is_active` tinyint(1) NOT NULL DEFAULT 1 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT; CREATE TABLE `measurements` ( `id` int(11) NOT NULL, `...
true
06bd84cde6dbc3f174bf6c9a64785ce24da150a4
SQL
bitstadium/QuincyKit
/server/database_schema.sql
UTF-8
6,399
3.375
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 3.1.4deb1 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Jul 17, 2009 at 10:20 AM -- Server version: 5.0.67 -- PHP Version: 5.2.6-3 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; SET FOREIGN_KEY_CHECKS = 0; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT...
true
76b9a8d54405e91665bbd8d4e91b8940abcbe3e0
SQL
PPathole/Everything-About-SQL
/CASE.sql
UTF-8
1,414
3.78125
4
[]
no_license
SELECT customer_id, CASE WHEN (customer_id <= 100) THEN 'Premium' WHEN (customer_id BETWEEN 100 AND 200) THEN 'Plus' ELSE 'Regular' END AS customer_class FROM customer SELECT customer_id, CASE customer_id WHEN 2 THEN 'Winner' WHEN 5 THEN 'Second Place' ELSE 'Normal' END AS raffle_results FROM...
true
dbd464b856938613d88c037382f9ca146872b0e9
SQL
cnsuhao/myown
/sql/mysql_log.sql
UTF-8
27,168
2.953125
3
[]
no_license
# Host: 127.0.0.1 (Version: 5.5.20) # Date: 2015-08-24 16:03:20 # Generator: MySQL-Front 5.3 (Build 2.42) /*!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 S...
true
2be8eb04749929af858d4e61593d220f24ec9a72
SQL
yuhaihui3435/ht_vis_backend
/web/src/main/res/sql/init.sql
UTF-8
16,520
3.203125
3
[]
no_license
-- -------------------------------------------------------- -- 主机: 123.56.24.132 -- 服务器版本: 5.7.21 - MySQL Community Server (GPL) -- 服务器操作系统: Linux -- HeidiSQL 版本: 9.5.0.5261 -- --------------------------------------------------------...
true
917099ecc1ddddebfcef55f33b8629ebf4298b3c
SQL
diegoleismann/locadora
/banco.sql
UTF-8
6,418
2.875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: 29-Dez-2016 às 00:25 -- Versão do servidor: 10.1.13-MariaDB -- PHP Version: 5.6.20 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CL...
true
5d48ecde8dc6e34301baed97b39b63db320ac950
SQL
PraktikumWebdas4104/ta-modul-7-Lugiy
/dbmahasiswa.sql
UTF-8
1,581
2.9375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.3 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Oct 20, 2018 at 02:43 PM -- Server version: 10.1.36-MariaDB -- PHP Version: 7.2.10 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OL...
true
b7bcf713078938af73a2749be564573602e86c59
SQL
jason-nightingale/Data-Analyst-Nano-Degree
/Term 1/Lesson 1 - SQL/Project_1_weather_patterns.sql
UTF-8
944
4.4375
4
[]
no_license
/*This project we will be trending my local Kansas City weather data compared to global trends by year. Per project specs, we first need to do a lookup in the city_list table to locate a city nearest me. Then pull the data from the city_data table for the located city and order by year. Finally, we will pull all city_d...
true
7fa91645f58c3347372cc610e67974887c1a1e11
SQL
fleetmack/mines
/me/Alumni Association/ruth/20101118_mcbride_denver_alumni.sql
UTF-8
387
2.78125
3
[]
no_license
/*** Denver Area McBride People ***/ select id_number from a_dw_address_good where p_zipcode between '80000-0000' and '80505-9999' and record_type_code = 'AL' and p_email_address > ' ' and id_number IN (select id_number from student_activity where student_activity_code = 'MHA') and id_number NOT IN ...
true
c56edbbff7c34c140fec02b9572e793e98df3278
SQL
stabm/SMU_ETL_Team_4
/schema.sql
UTF-8
2,563
3.28125
3
[]
no_license
-- Create table and insert state names and ids CREATE TABLE states( state_id int PRIMARY KEY, state_name varchar(50) ); INSERT INTO states (state_id, state_name) VALUES ( 1 , 'Alabama' ) , ( 2 , 'Alaska' ) , ( 3 , 'Arizona' ) , ( 4 , 'Arkansas' ) , ( 5 , 'California' ) , ( 6 , 'Colorado' ) , ( 7 , 'Connecticut' ) ,...
true
749c9a3117058af8d79fcdb3c4ab15e6adc809fb
SQL
eitah/itah-more-clients
/src/main/resources/db/migration/02.Addresses.sql
UTF-8
482
3.125
3
[]
no_license
CREATE TABLE `itah`.`addresses` ( `id` INT NOT NULL AUTO_INCREMENT, `client_id` INT, `line1` VARCHAR(64) NOT NULL, `line2` VARCHAR(64), `city` VARCHAR(64) NOT NULL, `state` VARCHAR(64) NOT NULL, `zip` VARCHAR(5) not null, `version` INT NOT NULL DEFAULT 0, `created` TIMESTAMP NOT NULL DEFAULT NOW(), ...
true
ebcdddd71d072a6c019ba17756c0606e1c0d61a1
SQL
nahmed23/git-github.com-Life-Time-Inc-database_udw
/ltdatabaseudw/marketing/Views/v_dim_mms_member_attribute.sql
UTF-8
1,713
2.625
3
[]
no_license
CREATE VIEW [marketing].[v_dim_mms_member_attribute] AS select d_mms_member_attribute.member_attribute_id member_attribute_id, d_mms_member_attribute.attribute_value attribute_value, d_mms_member_attribute.dim_mms_member_key dim_mms_member_key, d_mms_member_attribute.effective_from_date_time effec...
true
02355ddfe052ac9a8ce902d4e466c6c0f37a90be
SQL
relax-space/go-api-postgres
/example/data.sql
UTF-8
606
3.0625
3
[]
no_license
-- 导出 表 fruit.fruit 结构 CREATE TABLE IF NOT EXISTS "fruit" ( id serial PRIMARY KEY, code varchar (255) NULL, name varchar (255) NULL, color varchar (255) NULL, price integer NULL, store_code varchar(255) NULL, created_at TIMESTAMP NULL, updated_at TIMESTAMP NULL ); -- 正在导出表 fruit.fruit 的数据:~0 ...
true
f20a768646d36abc6477fce947258fa3fe3575ad
SQL
sahandian/4320FinalProject
/DucksKings_stats.sql
UTF-8
2,634
2.78125
3
[]
no_license
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; CREATE TABLE IF NOT EXISTS `stats` ( `Name` text NOT NULL, `Team` text NOT NULL, `GP` int(11) NOT NULL, `G` int(11) NOT NULL, `A` int(11) NOT NULL, `P` int(11) NOT NULL, `+/-` int(11) NOT NULL, `PIM` int(11) NOT NULL, `PPG` int(11) NOT N...
true
5f3340918e7bf16d7f037f8e9140365c9193edf3
SQL
otherchris/personalfinance
/pf_test.sql
UTF-8
1,229
3.171875
3
[]
no_license
DROP SCHEMA IF EXISTS pf_test; CREATE SCHEMA pf_test; USE pf_test; CREATE TABLE accounts ( acct_id INTEGER AUTO_INCREMENT PRIMARY KEY, acct_name VARCHAR(50), carry_balance BOOLEAN, balance FLOAT(14), rate FLOAT(14), min_floor FLOAT(14), min_rate FLOAT(14), amount DECIMAL, weekly BOOLE...
true
e3e101c5916cd5d15e6725559c4ac2d399c2b126
SQL
FELLSAT/Procedimientos
/Procedimientos/Funciones/CUENTACONTABLExSERVICIO.sql
UTF-8
942
2.90625
3
[]
no_license
CREATE OR REPLACE FUNCTION CUENTACONTABLExSERVICIO -- ============================================= -- Author: FELIPE SATIZABAL -- ============================================= ( v_NU_NUME_LABO IN NUMBER, v_CECOMOVI IN VARCHAR2, v_CENTRO IN VARCHAR2, v_SUBCENTRO IN VARCHAR2, v_TIPOCUENTA I...
true
2ecb257b75900557aad071a1b1f31a23e0378792
SQL
zombodb/zombodb
/test/sql/legacy/issue-61.sql
UTF-8
473
3.15625
3
[ "Apache-2.0" ]
permissive
CREATE TABLE a ( a_id SERIAL8 PRIMARY KEY ); CREATE TABLE b ( b_id SERIAL8 PRIMARY KEY ); CREATE INDEX idxa on a USING zombodb(zdb('a', ctid), zdb(a)) WITH (url='http://localhost:9200/', options='a_id=<b.idxb>b_id'); CREATE INDEX idxb ON b USING zombodb(zdb('b', ctid), zdb(b)) WITH (url='http://localhost:9200/'); ...
true
d508362de579650a6dee39cbf617c35f811586c7
SQL
Azizah99/mrs-danial
/cash/mysql imprt/cash.sql
UTF-8
2,673
3.125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Sep 20, 2017 at 08:36 PM -- Server version: 10.1.13-MariaDB -- PHP Version: 5.6.20 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CL...
true
8b9f82a57838650596c93ffa5e9bc630b0374db2
SQL
MattAllen1992/Data-Science
/Courses/Udemy/SQL for Business Intelligence/My Code/DELETE.sql
UTF-8
553
3.71875
4
[]
no_license
# delete specific rows from tables # if you omit the WHERE clause, it'll delete all rows in the table # if you delete a record which is linked via keys to other tables, you'll lose the linked records too delete from departments where dept_no = 'd009'; # DROP # this drops everything (table, records and relationships/co...
true
271739a68330a80b72aa62489bbbac79fb28a847
SQL
AmirDev83/absensi
/database/db_absensi.sql
UTF-8
15,152
3.1875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Waktu pembuatan: 24 Agu 2021 pada 17.51 -- Versi server: 10.4.14-MariaDB -- Versi PHP: 7.4.9 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CH...
true
cc029ca60f2beb99775d4ba4f43178e752fa351d
SQL
AFFogarty/COMP-421-Databases-Term-Project
/part-2/question-3.sql
UTF-8
8,231
2.859375
3
[]
no_license
-- Question 3 5 queries INSERT INTO Illness VALUES ('i0023358','unclassified disorders of the trigeminal nerves', TRUE, '635.90'); INSERT INTO Illness VALUES ('i0023359','unspecified type of hypertension complicating pregnancy', FALSE, '642.09'); INSERT INTO Illness VALUES ('i0023361','complication due to diabetes mell...
true
6ae20bc0c434b703d91806bcb9c9aca3bd1463a6
SQL
themikesam/gitBook
/book.sql
UTF-8
1,776
3.3125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.7.0 -- https://www.phpmyadmin.net/ -- -- 主機: 127.0.0.1 -- 產生時間: 2017-10-25 05:19:46 -- 伺服器版本: 10.1.26-MariaDB -- PHP 版本: 7.1.8 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTE...
true
429b6af4cbe970bd3f5e0d914d2236a932b30eb9
SQL
nayane-docarmo/projeto-individual-3t
/Banco de Dados Gerenciar.sql
UTF-8
1,360
3.390625
3
[]
no_license
CREATE DATABASE Gerenciar CREATE TABLE Sala_Equipamento( IdSala_Equipamento INT PRIMARY KEY IDENTITY NOT NULL, IdSala INT FOREIGN KEY REFERENCES Sala (IdSala), IdEquipamento INT FOREIGN KEY REFERENCES Equipamento (IdEquipamento), Descricao VARCHAR (250) NOT NULL, DataEntrada DATETIME, StatusG BINARY DEFAULT 0 )...
true
77bb45831eecd91d299717ae9ec4768daae39529
SQL
jeffcox111/SQLTools
/ClusteredIndexStats.sql
UTF-8
694
3.84375
4
[]
no_license
SELECT t.name as 'TableName' ,c.Name as 'ColumnName' ,i.name as 'ClusteredIndexName' ,i.fill_factor as 'FillFactor' ,round(ips.avg_fragmentation_in_percent , 2, 2) as 'Fragemenation' ,ips.page_count as 'PageCount' FROM sys.tables t JOIN sys.indexes i ON t.object_id = i.object_id JOIN sys.index_columns ic ON i....
true
8a4e456656ce52ab86115ebeceff492edb3182e1
SQL
leahawhite/someday-api
/migrations/003.do.create_notes.sql
UTF-8
362
2.9375
3
[]
no_license
CREATE TABLE notes ( id INTEGER PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY, what TEXT NOT NULL, how TEXT, who TEXT, link TEXT, thoughts TEXT, favorite BOOLEAN, author INTEGER REFERENCES users(id) NOT NULL, date_created DATE DEFAULT now() NOT NULL, date_edited DATE DEFAULT now() NOT NULL, folder ...
true
23f3571adf858ea4366681a213bb10de60814873
SQL
darold/pgFormatter
/t/pg-test-files/expected/create_index_spgist.sql
UTF-8
18,711
3.65625
4
[ "Artistic-2.0" ]
permissive
-- -- SP-GiST index tests -- CREATE TABLE quad_point_tbl AS SELECT point(unique1, unique2) AS p FROM tenk1; INSERT INTO quad_point_tbl SELECT '(333.0,400.0)'::point FROM generate_series(1, 1000); INSERT INTO quad_point_tbl VALUES (NULL), (NULL), (NULL); CREATE INDEX sp_quad_ind ON quad_po...
true
86d2184172b8e27094ef2f47019b5cdd71d4520e
SQL
lavac/transaction-service
/src/main/resources/db.migration/V1__TransactionHistory.sql
UTF-8
528
2.734375
3
[]
no_license
CREATE TABLE transaction_detail ( id VARCHAR(256) PRIMARY KEY, user_id VARCHAR(256) NOT NULL, counter_party_id VARCHAR(256) NOT NULL, counter_party_name VARCHAR(256), type VARCHAR(20) NOT NULL, status VARCHAR(20) NOT NULL, description VARCHAR(256), amount BIGINT NOT NULL, currency VARCH...
true
78b466f33f23b57f4d0745d04e84b28b5043499a
SQL
ElifKarakutukDinc/dvd_rental
/story_telling_2/top_25_countries_which_rental_the_most.sql
UTF-8
400
4.15625
4
[]
no_license
--Top 25 countries which rental the most select country, count(r.rental_id) from customer as c inner join address as a on (c.address_id=a.address_id) inner join city on (city.city_id=a.city_id) inner join country on (country.country_id=city.country_id) inner join rental as r on (c.customer_id=r.customer_id) inner joi...
true
abcf11f527b390e88fe7515ddcd31e7be11f93c8
SQL
CluckeyMcCormick/Comp-420-Final-Project-NF
/sqls/data/herodb_series_debut.sql
UTF-8
1,766
2.875
3
[]
no_license
use HeroDB; /* Wonder Woman */ INSERT INTO Series VALUES(1,'All Star Comics'); INSERT INTO Debut VALUES(01, STR_TO_DATE( '12/1/1941', "%m/%d/%Y") , 8, 1); /* Dogwelder, Sectin 8 */ INSERT INTO Series VALUES(2,'Hitman'); INSERT INTO Debut VALUES(02, STR_TO_DATE( '9/1/1997', "%m/%d/%Y") , 18, 2); /* Superman */ INSERT...
true
2aeb084f4684b4976405d8b05c9a0082f0d97230
SQL
silence-do-good/stress-test-Postgres-and-MySQL
/dump/high/day15/select0121.sql
UTF-8
178
2.6875
3
[]
no_license
SELECT timeStamp, temperature FROM ThermometerOBSERVATION o WHERE timestamp>'2017-11-14T01:21:00Z' AND timestamp<'2017-11-15T01:21:00Z' AND temperature>=49 AND temperature<=95
true
01eb409bc2d327e76d9143da2c29de0a6011916a
SQL
cory-imel/database-exercises
/where_exercises.sql
UTF-8
490
3.453125
3
[]
no_license
SELECT first_name,gender FROM employees WHERE (first_name ='Irena' OR first_name ='Vidya' OR first_name ='Maya') AND gender = 'M'; SELECT last_name FROM employees WHERE last_name LIKE 'E%' AND last_name LIKE '%E'; SELECT first_name,last_name,hire_date,birth_date FROM employees WHERE birth_date...
true
f3b4c2a1e56397ced89d198d0074d2ffd82c9aaa
SQL
anlei-fu/code-generator
/test/sql/bk/global.sql
UTF-8
4,703
3.671875
4
[ "MIT" ]
permissive
create or replace procedure sp_warn_order_global as ---------------------------------------------------------------------- -- 主要功能: 全局监控:信息流【白天:7点-24点】10分钟【晚上:0点-7点】30分钟未产生订单、 -- 订单失败率大于【45%】 -- 创建人: yuhao -- 创建时间: 2020-09-04 ---------------------------------------------------------------------- -- 警告阈值 ...
true
5db72ab041cf380e21ecc6d4e4440bc8d4c1ec4e
SQL
ClickHouse/ClickHouse
/tests/queries/0_stateless/01526_complex_key_dict_direct_layout.sql
UTF-8
912
3.34375
3
[ "Apache-2.0", "BSL-1.0" ]
permissive
-- Tags: no-parallel DROP DATABASE IF EXISTS db_01526; CREATE DATABASE db_01526; CREATE TABLE db_01526.table_for_dict1 ( key_column UInt64, second_column UInt64, third_column String ) ENGINE = MergeTree() ORDER BY (key_column, second_column); INSERT INTO db_01526.table_for_dict1 VALUES (1, 2, 'aaa'), (1, 3, ...
true
0aee111b3db552a7f5f727451fb87c7bd5478c94
SQL
nathanctech/fivem_logger
/install.sql
UTF-8
1,692
3
3
[ "LicenseRef-scancode-public-domain", "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.6.6deb4 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3306 -- Generation Time: Feb 26, 2019 at 04:34 PM -- Server version: 10.3.12-MariaDB-1:10.3.12+maria~stretch -- PHP Version: 7.0.33-0+deb9u1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; ...
true
ad435c0d1731612d89f665e58b242a9551552964
SQL
daohoangbk/HPT-2018
/hpt20182.sql
UTF-8
4,704
2.96875
3
[ "Apache-2.0" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.8.3 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: Dec 09, 2018 at 10:38 AM -- Server version: 10.1.36-MariaDB -- PHP Version: 5.6.38 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OL...
true
c3756b4789671efe6e25fcb3f6fb8f9ab33c7296
SQL
c2tarun/FoodOnTime
/dbScript/dbScript.sql
UTF-8
378
2.65625
3
[]
no_license
DROP DATABASE IF EXISTS foodontime; CREATE DATABASE foodontime; USE foodontime; CREATE USER foodontime_user@localhost IDENTIFIED BY 'foodontime'; GRANT ALL ON foodontime.* TO foodontime_user@localhost; GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP ON foodontime.* TO foodontime_user@localhost; alter table fo...
true
66d802e64a7de00a7a35b1b3f398bb2e42230f91
SQL
facualderete/TP_OLAP
/queries/query_1.sql
UTF-8
549
3.9375
4
[]
no_license
-- Del 30% de los clientes que mas pagan el servicio, qué porcentaje de sus ventas es en credito? WITH top_30_charges(id, charged) AS (SELECT id, ROUND(charges/100) FROM SHOP ORDER BY charges desc LIMIT 349 * 0.3) SELECT dreport.id_shop, '$ ' || t30.charged, (round(cast(SUM(credit_sum) as float)/(SUM(credit_sum)...
true
053f6a9bd13d3600d6ed8f5f4ec055c6465ecab0
SQL
BreadBooks/EmployeeTracker
/db/seed.sql
UTF-8
785
3.28125
3
[ "MIT" ]
permissive
use employees; INSERT INTO department (name) VALUES ('Sales'), ('Engineering'), ('Finance'), ('Legal'); INSERT INTO role (title, salary, department_id) VALUES ('Sales Lead', 100000, 1), ('Salesperson', 80000, 1), ('Lead Engineer', 150000, 2), ('Software Engineer', 120000, 2), ...
true
4846a6466d72b2419e681ebd1f640679e2524fbc
SQL
ztimur/moodle-sql
/avg_grades_by_institution.sql
UTF-8
286
3.640625
4
[]
no_license
SELECT u.institution, AVG(gg.finalgrade) AS avg_final_grade, AVG(gg.finalgrade*100/gg.rawgrademax) as pct FROM mdl_grade_grades gg JOIN mdl_grade_items gi ON gi.id=gg.itemid JOIN mdl_user u ON u.id=gg.userid WHERE gi.itemtype='course' GROUP BY u.institution ORDER by pct DESC
true
7f9548a26132d82f78503d6cbab3f3100cbef0ad
SQL
newmediatech/postgresql-sample-async-scan
/preparation.sql
UTF-8
530
3.28125
3
[]
no_license
-- create language (if needed) create language plpython3u; -- create table with data create table test_table as select gs.id, case ceil(random()*5) when 1 then 'Red' when 2 then 'Green' when 3 then 'Blue' when 4 then 'Black' when 5 then 'White' end as color, ceil(random...
true
f83bfe216e5ccd7c29660ca2be8ec19fb5b3f2b6
SQL
usermuser/GeekBrains_MySQL
/les_3_hw/hw3.7.sql
UTF-8
425
3.265625
3
[ "MIT" ]
permissive
# База данных «Сотрудники»: #Найти количество сотрудников в отделах и посмотреть, # сколько всего денег получает отдел. SELECT count(*) as 'Людей в отделе', `depart`.`name` as 'Отдел', sum(zp) as 'Итого' FROM `sotrudniki`.`shtat` LEFT JOIN `depart` ON `depart`.`id` = `shtat`.`otdel` GROUP BY `otdel`;
true
f9c18e036da01c12a15d229f927a75adf8b238eb
SQL
baminmru/MTZ
/MTZAdministrator/ORACLE/--Procedures.Type.Header--MTZFltr_1.sql
WINDOWS-1251
4,345
2.921875
3
[]
no_license
/* --MTZFltr*/ create or replace package MTZFltr as procedure MTZFltr_DELETE(acursession CHAR, aInstanceID CHAR); procedure MTZFltr_HCL(acursession CHAR, aROWID CHAR, aIsLocked out integer); procedure MTZFltr_propagate(acursession CHAR, aROWID CHAR); procedure FilterFieldGroup_BRIEF ( aCURSESSION CHAR, aFil...
true
a1d416b30f5f381a5f50a068a02d83aeea74ec1b
SQL
Tomology/sql-notes
/logical-operators.sql
UTF-8
1,350
3.421875
3
[]
no_license
/* < Less Than <= Less Than or Equal To > Greater Than >= Greater Than or Equal To && Logical And AND Logical And || Logical Or OR Logical Or BETWEEN Between Two Criteria ...
true
cf2aa06202c0831943ada5207806136376963798
SQL
sachinlale/ScalaTutorial
/scala-slick-poc/conf/evolutions/default/1.sql
UTF-8
838
3.328125
3
[]
no_license
# --- !Ups CREATE TABLE "department"("id" Int AUTO_INCREMENT PRIMARY KEY ,"name" varchar(200)); CREATE TABLE "employee"("id" Int AUTO_INCREMENT PRIMARY KEY ,"name" varchar(200) , "email" varchar(200) ,"department_id" Int, "position" varchar, FOREIGN KEY ("department_id") REFERENCES "department"("id")); INSERT INTO "...
true
a59d7aaa835ace61df5726324fd59b0c20b8c1f7
SQL
jamesgossling/CodeWars-Projects
/SQL/6kyu/JGossling-SQL_Simple_IN_no_JOIN.sql
UTF-8
702
4.125
4
[]
no_license
/* 6 kyu - SQL Basics: Simple IN https://www.codewars.com/kata/58113c03009b4fcc66000d29 --------------------------------------------------------- For this challenge you need to create a SELECT statement, this SELECT statement will use an IN to check whether a department has had a sale with a price over 98.00 dollars. ...
true
89037d998f4c3a2308bddb81e4e53f3b6b72c21d
SQL
KarmaScripter/BudgetExecution
/Data/Database/SqlCe/DataModels/INSERT/InsertEmployeeLeaveUpdates.sql
UTF-8
577
3.03125
3
[ "MIT" ]
permissive
INSERT INTO Employees SELECT DISTINCT PayrollCostCodes.RcCode AS RcCode, PayrollCostCodes.DivisionName AS DivisionName, PayrollHours.LastName AS LastName, PayrollHours.FirstName AS FirstName, PayrollHours.EpaNumber AS EpaNumber ...
true
3220d92638d616939b5c389b6bc852f5d5f7399f
SQL
sunilkumararava/SunilFlix
/database.sql
UTF-8
36,376
3.203125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.3 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3306 -- Generation Time: Aug 09, 2020 at 11:03 PM -- Server version: 5.7.23 -- PHP Version: 7.1.22 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; -- -- Database: `flix_2_0` -- -- --------------------------...
true
1bf0be4ce11d723c96a71e42b80b079f0e4fca3f
SQL
koonytrain/projects
/Family Tree Project/group4cc_Roots_Tech.sql
UTF-8
11,990
2.96875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.3 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3306 -- Generation Time: May 11, 2019 at 08:22 PM -- Server version: 5.7.26-log -- 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
189d897a8a0bc0bb80f03c350962f85949a828cf
SQL
jonamuen/sql-reduce
/test/sqlsmith/sqlite/2762.sql
UTF-8
1,272
3.234375
3
[ "MIT" ]
permissive
select 86 as c0, ref_0.id as c1, ref_0.id as c2, ref_0.name as c3, ref_0.id as c4, 24 as c5, ref_0.name as c6 from main.t0 as ref_0 where case when (1) or (((ref_0.id is NULL) and (0)) or ((1) and ((((1) or (EXISTS ( selec...
true
4f06a833c9d4c1973aa16f60d66b1526bf68fc05
SQL
aaronjcolclough/ISTA420
/exercises/TSQL-Ex6-2.sql
UTF-8
1,522
4.1875
4
[]
no_license
use TSQLV4; drop table if exists dbo.banks; create table dbo.banks( bankname varchar(100), city varchar(50), state varchar(5), cert varchar(10), institution varchar(100), closingdate date, updateddate date ); bulk insert dbo.banks from 'D:\ISTA\ISTA420\Exercises\banklist.csv' with ( datafiletype = 'cha...
true
b094a4b94d981bb98bbad7d1cb9e9c922de9a503
SQL
gorkemguneser/Data_Analytics_Labs
/labs/module_1/9_mySQL/seeding.sql
UTF-8
1,595
2.90625
3
[]
no_license
SET SQL_SAFE_UPDATES = 0; SHOW DATABASES; USE lab_mysql; SHOW TABLES; SELECT * FROM invoices; SELECT * FROM customers; SELECT * FROM salespersons; SELECT * FROM cars; TRUNCATE TABLE cars; INSERT INTO CARS (vehicle_ID,manufacturer,model,year,color) VALUES ('3K096I98581DHSNUP','Volkswagen','Tiguan',2019,'Blue'), ('ZM8G7B...
true
478bf3e03fbd65c8e56fcf45ab2dd09f24422e4e
SQL
ramovsky/datasci_course_materials
/assignment2/ducument.sql
UTF-8
681
3.75
4
[]
no_license
SELECT d1.docid, d2.docid, sum(d1.count*d2.count) FROM Frequency d1, Frequency d2 WHERE d1.term=d2.term AND d1.docid < d2.docid GROUP BY d1.docid, d2.docid; /* SELECT docid1, docid2, max(sim) FROM ( SELECT d1.docid as docid1, d2.docid as docid2, sum(d1.count*d2.count) as sim FROM Frequency d1, ...
true
b0af3ea03044cd60db723e2484bb406dec01c0af
SQL
jailtonccruz/in940-ProjetoOOR
/init.sql
UTF-8
297
2.953125
3
[]
no_license
-- Initialization scripts for local databases CREATE USER in940 IDENTIFIED BY pass; GRANT CONNECT, RESOURCE, DBA to in940; CREATE OR REPLACE TRIGGER on_user_logon AFTER LOGON ON DATABASE WHEN (USER = 'in940') BEGIN EXECUTE IMMEDIATE 'ALTER SESSION SET CURRENT_SCHEMA = in940'; END;
true
0b6c3555cd35d55e5a89160e2fc451227cd9f9e7
SQL
Gowthaam/Tomato
/src/main/resources/schema.sql
UTF-8
741
3.0625
3
[]
no_license
drop table if exists users; drop table if exists hotels; drop table if exists items; drop table if exists reviews; drop table if exists orders; create table users (uname varchar(255),password varchar(255),primary key (uname)); create table hotels (hname varchar(255),location varchar(255),primary key (hname)); create ...
true
228522495f6192105f944a7130f18d214eacee13
SQL
limboniatech/limbonia-project-base
/config/Create.sql
UTF-8
3,501
3.734375
4
[ "BSD-3-Clause" ]
permissive
GRANT USAGE ON *.* TO 'limbonia'@'localhost' IDENTIFIED BY '40two'; GRANT ALL PRIVILEGES ON `limbonia`.* TO 'limbonia'@'localhost'; CREATE DATABASE IF NOT EXISTS `limbonia`; USE limbonia; CREATE TABLE IF NOT EXISTS ApiAuth ( UserID INTEGER UNSIGNED NOT NULL, ApiToken VARCHAR(255) NOT NULL, INDEX Unique_UserApi(...
true
5fefdb67a5a3924b20b0e1ded4eede27412a621f
SQL
jscory/summit-2017-dataservices
/labs/lab4_ocp/extensions/sql/initdb-psql.sql
UTF-8
1,523
3.59375
4
[]
no_license
DROP TABLE IF EXISTS wine; DROP TABLE IF EXISTS food; -------------------- -- WINE TABLE DLL -- -------------------- CREATE TABLE wine ( wine_id integer NOT NULL, vineyard varchar(255) NOT NULL, varietal varchar(255) NOT NULL, name varchar(255) NOT NULL, year integer NOT NULL, country varchar(255) NOT NULL, PRIMARY ...
true
9fee3c1a9eb0e06b558c8bafeffd2b011bb6a08c
SQL
have-fun-adventure/Backend
/db/seed.sql
UTF-8
1,107
3.421875
3
[]
no_license
DROP DATABASE IF EXISTS have_fun; CREATE DATABASE have_fun; \c have_fun CREATE TABLE users ( id SERIAL PRIMARY KEY, username VARCHAR NOT NULL, firstname VARCHAR , lastname VARCHAR , email VARCHAR unique NOT NULL, password VARCHAR NOT NULL, phone VARCHAR(10) NOT NULL, gender VARCHAR , location VARCHA...
true
128c7340689ecbbdb3c7a8fdeb4d0b108786d3b2
SQL
sum529-create/classick
/classick/target/classick-1.0.0-BUILD-SNAPSHOT/WEB-INF/views/db/orders.sql
UTF-8
460
3.328125
3
[]
no_license
DROP SEQUENCE ORDERS_SEQ; CREATE SEQUENCE ORDERS_SEQ START WITH 1 INCREMENT BY 1 MAXVALUE 999999 NOCYCLE NOCACHE; DROP TABLE ORDERS; CREATE TABLE ORDERS ( ONO NUMBER PRIMARY KEY, MNO NUMBER REFERENCES MEMBER (MNO), PNO NUMBER REFERENCES PRODUCT (PNO), OAMOUNT NUMBER NOT NULL, ODATE DATE, OADDR VARCHAR2(100)...
true
0c4ae63bd1529cd9f35a9da3a09f2aa3a6f7e96e
SQL
djones01/CHub
/STG_PER_NATIONAL_IDENTIFIER_F1.sql
UTF-8
364
2.640625
3
[]
no_license
-------------------------------------------------------- -- DDL for Index STG_PER_NATIONAL_IDENTIFIER_F1 -------------------------------------------------------- CREATE INDEX "HCM_ADMIN"."STG_PER_NATIONAL_IDENTIFIER_F1" ON "HCM_ADMIN"."STG_PER_NATIONAL_IDENTIFIER" ("PERSON_ID") PCTFREE 10 INITRANS 2 MAXTRANS 255...
true
58dfdf8ae06749df6337173c27ef17b9c27297c6
SQL
alexbartley/SOCO-Test
/104909/CONTENT_REPO/Views/JURIS_TAX_APP_ID_SETS.sql
UTF-8
543
3.109375
3
[]
no_license
CREATE OR REPLACE FORCE VIEW content_repo.juris_tax_app_id_sets ("ID",nkid,rid,next_rid,entity_rid,entity_next_rid,juris_id,juris_nkid,juris_rid) AS select jti.id, jti.nkid, jti.rid, jti.next_rid, jtr.id entity_rid, jtr.next_Rid entity_next_rid, j.id juris_id, j.nkid juris_nkid, j.rid juris_rid from juris_tax_applicabi...
true
a352d246b2b098dc1d80c94c96cd2a7bdd68fe18
SQL
nikhilbhatewara/HackerRank
/SQL/WeatherObservationStation8.sql
UTF-8
273
2.8125
3
[ "MIT" ]
permissive
/* Enter your query here. */ /* Enter your query here. */ /* Enter your query here. */ SELECT DISTINCT CITY FROM STATION WHERE SUBSTRING(CITY, -1 ,1) IN ('a','e','i','o','u','A','E','I','O','U') and SUBSTRING(CITY, 1 ,1) IN ('a','e','i','o','u','A','E','I','O','U')
true
fd01e54170b770d2cbc8b9b5849c769f1381ae6c
SQL
luisbayona01/pruebacicoplans
/bd/pruebaphp.sql
UTF-8
2,889
3.265625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Servidor: localhost:3306 -- Tiempo de generación: 30-04-2020 a las 22:55:25 -- Versión del servidor: 5.7.26 -- Versión de PHP: 7.2.18 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /...
true
158f43a7762cd2d7ef767d27261c20276df476d8
SQL
duckdb/duckdb
/benchmark/ldbc/queries/interactive-short-2.sql
UTF-8
1,124
4.15625
4
[ "MIT" ]
permissive
with recursive cposts(m_messageid, m_content, m_ps_imagefile, m_creationdate, m_c_replyof, m_creatorid) AS ( select m_messageid, m_content, m_ps_imagefile, m_creationdate, m_c_replyof, m_creatorid from message where m_creatorid = 21990232556256 order by m_creationdate desc limit 10 ), parent(postid,reply...
true
89044c9e47aa88074450cfc569172edab31538e5
SQL
rakibulmdalam/musicfestival
/music_festival.ddl
UTF-8
17,688
3.875
4
[]
no_license
-- ----------------------------------------------------- -- Schema MusicFestival -- ----------------------------------------------------- CREATE DATABASE musicfestival; -- GRANT ALL PRIVILEGES ON DATABASE musicfestival_alternative to practical; -- GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO practical; -- C...
true
1eb2d116e23aa0a5a42e3ed9d8c882930aa0b2b8
SQL
jelerak/internal-alerts
/init/schema.sql
UTF-8
303
2.71875
3
[]
no_license
CREATE USER internal_alerts WITH SUPERUSER PASSWORD 'internal_alerts'; CREATE DATABASE internal_alerts WITH OWNER = internal_alerts TABLESPACE = pg_default; GRANT TEMPORARY, CONNECT ON DATABASE internal_alerts TO PUBLIC; \connect internal_alerts CREATE SCHEMA internal_alerts AUTHORIZATION internal_alerts;
true
b616ef2f064560837cd2f26ce136603d2ff55360
SQL
dimasguruh/crm
/crm.sql
UTF-8
25,955
2.953125
3
[ "LicenseRef-scancode-unknown-license-reference", "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: 29 Sep 2016 pada 15.59 -- Versi Server: 10.1.9-MariaDB -- PHP Version: 5.6.15 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT ...
true
aac373ca0c47632451702d9c8fedc57be83ec9a1
SQL
Quercum/galery
/dump.sql
UTF-8
1,193
3.1875
3
[]
no_license
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8 */; CREATE TABLE IF NOT EXISTS `tbl_albums` ( `id` in...
true
71d30c80baf000546bd3ee4378f9bb7d1dea5764
SQL
zadykian/itis-postgres-practice
/task5/flyway/V6.1__create_partitioned_table.sql
UTF-8
1,032
2.6875
3
[]
no_license
set search_path to task_5; create table hub_table ( id int, name varchar(128) ) partition by hash (id); create table partition_0 partition of hub_table for values with (modulus 10, remainder 0); create table partition_1 partition of hub_table for values with (modulus 10, remainder 1); create table partition...
true
6f4b187e125030661898ee03a592d711507526b0
SQL
OlafMd/MedCon1.0
/mm-libs/dbaccess/Level 3/CL3_Taxes/Atomic/Retrieval/SQL/cls_Get_TaxOffices_For_Tenant.sql
UTF-8
910
3.265625
3
[]
no_license
Select acc_tax_taxoffices.ACC_TAX_TaxOfficeID, cmn_bpt_businessparticipants.DisplayName, cmn_com_companyinfo.VATIdentificationNumber, cmn_universalcontactdetails.Country_639_1_ISOCode From acc_tax_taxoffices Inner Join cmn_bpt_businessparticipants On cmn_bpt_businessparticipants.CMN_BPT_BusinessParticip...
true
9a2167f77593d08cb53e6bb09ce36e95e8f40f28
SQL
modelccc/springarin_erp
/db/custom/springrain_mysql.sql
UTF-8
10,151
3.484375
3
[ "Apache-2.0" ]
permissive
SET SESSION FOREIGN_KEY_CHECKS=0; /* Drop Tables */ DROP TABLE custom_email_manager; CREATE TABLE custom_email_manager ( id varchar(64) NOT NULL COMMENT '任务编号', email_id varchar(1000) COMMENT '邮件id', create_by varchar(64) COMMENT '创建者', subject varchar(1000) COMMENT '主题', create_date datetime COMMENT '创建时间', c...
true
0a3f74ab2fd1f62ddd1ad82db12d4499809f20d9
SQL
knaevKMK/DATA_BASE
/MySQL_may2021/EXAM Prepare/Database Basics MySQL Exam - 17 Oct 2020 part 1/Database Basics MySQL Exam - 17 Oct 2020 part 1.sql
UTF-8
1,958
4.28125
4
[]
no_license
CREATE SCHEMA exam_prep01; USE exam_prep01; CREATE TABLE categories( id INT(11) AUTO_INCREMENT PRIMARY KEY, `name` VARCHAR(40) UNIQUE NOT NULL); CREATE TABLE pictures( id INT AUTO_INCREMENT PRIMARY KEY, url VARCHAR(100) NOT NULL, added_on DATETIME NOT NULL); CREATE TABLE products( id INT(11) AUTO_INCREMENT PRIMARY ...
true
b5ca0c44977cc94444d8cf0f356fc423b7def627
SQL
daidaibiebie/strack-install
/install/database/sql/strack_media.sql
UTF-8
2,163
3.15625
3
[ "Apache-2.0" ]
permissive
/* Navicat Premium Data Transfer Source Server : mysql5.7 Source Server Type : MySQL Source Server Version : 50730 Source Host : 10.168.30.17:3306 Source Schema : strack_media Target Server Type : MySQL Target Server Version : 50730 File Encoding : 65001 Date: 31/08/...
true
aed26b100e64640afbdf6c80eaf36abcbd385613
SQL
dbmi-pitt/dbmi-annotator
/translation/d2r-mapping/testMPRelationalQueries.sql
UTF-8
16,615
3.71875
4
[ "Apache-2.0" ]
permissive
-- find a claim mentioning desvenlafaxine and midazolam in the claim text select * from ohdsi.mp_claim_annotation ca inner join ohdsi.oa_claim_body cb on ca.has_body = cb.id inner join ohdsi.qualifier q on q.claim_body_id = cb.id where claim_text like '%desven%midazolam%'; -- We want to create an MP that argues...
true
0a2ca1280677b3c19dcd9dc558f80cea8051bb9f
SQL
PauloPenteado/didactic-clinic
/src/main/resources/db/migration/V1__init.sql
UTF-8
342
2.515625
3
[ "MIT" ]
permissive
CREATE TABLE patient( `id` int(11) NOT NULL AUTO_INCREMENT, `first_name` varchar(45), `last_name` varchar(45), `email` varchar(45), `phone1` varchar(15), `phone2` varchar(15), `birth_date` DATE, `blood_type` varchar(3), `national_id` varchar(15), PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=1...
true
ab53a18f7a8330323f08ddd01fed8718138c2f8f
SQL
LucaContri/dataanalysis
/SFReportEngine/resources/analytics.reports.sql
UTF-8
1,898
3.6875
4
[]
no_license
drop table reports; CREATE TABLE `analytics`.`reports` ( `id` INT NOT NULL AUTO_INCREMENT, `name` VARCHAR(128) NOT NULL, `datasource` VARCHAR(45) NOT NULL, `group` VARCHAR(128) NOT NULL, `description` TEXT NULL, `query` TEXT NOT NULL, `filters` TEXT NULL, PRIMARY KEY (`id`)); insert into analytics.repo...
true
6c8470d6d5133d901ede99f9257a7bf433bb50c5
SQL
DmitryLandy/ISTA420
/Exercises/tsql-ex02-landy.sql
UTF-8
2,331
4.03125
4
[]
no_license
.echo on .headers on -- Name: Dmitry Landy -- File: tsql-ex02-landy.sql -- Date: January 23, 2021 -- 1. List the company name, the contact name and the country of all customers in Poland. select companyName, contactname, country from customers where country like 'Poland'; -- 2. List the order Id, the order date, an...
true