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
f900447a1e72954d30bb7d2fbed8f2c1c5ffafca
SQL
NickChadaev/pg_tools
/db_kernel/_rus/1_NSO/8_nso_nso_log_chk_nso_log_impact_type_update.sql
UTF-8
6,527
3.203125
3
[]
no_license
/* ==================================================================== */ /* DBMS name: PostgreSQL 8 */ /* Created on: 10.02.2015 18:25:11 */ /* -------------------------------------------------------------------- */ /* 2015-03-19 Д...
true
684102a1f4dcdc8ad88e4a82ea0ec33344a866bb
SQL
nanisrikanthvaddi/PortalApplication
/src/main/resources/schema.sql
UTF-8
1,696
3.578125
4
[]
no_license
CREATE SEQUENCE IF NOT EXISTS role_sequence START WITH 1 INCREMENT BY 1; CREATE SEQUENCE IF NOT EXISTS facility_sequence START WITH 1 INCREMENT BY 1; CREATE SEQUENCE IF NOT EXISTS permission_sequence START WITH 1 INCREMENT BY 1; CREATE SEQUENCE IF NOT EXISTS users_sequence START WITH 1 INCREMENT BY 1; ...
true
c667ed55d5c26744317d82ead0a25b515e2c4aca
SQL
skeleton-software-community/skeleton-demo
/data-model/scripts/SQL/POSTGRESQL/build/1/ORGANIZATIONS/ORGANIZATION.sql
UTF-8
391
3.0625
3
[]
no_license
-- create table -- CREATE TABLE ORGANIZATION ( id INTEGER, CODE VARCHAR(255) NOT NULL, ORGANIZATION_DESCRIPTION_ID BIGINT NOT NULL ); / ALTER TABLE ORGANIZATION ADD CONSTRAINT PK_ORGANIZATION PRIMARY KEY (ID); / -- create sequence -- CREATE SEQUENCE ORGANIZATION_SEQ INCREMENT 1 MINVALUE 0 MAXVALUE 9223372036854775807...
true
0eb5ebf70dd285840d6f1faddeea44cef1678243
SQL
LousyLeonard/YeovilHealthCareProducts
/Iteration 1 Documentation/design/SQL BrandCount.sql
UTF-8
209
4.09375
4
[]
no_license
select Brand.Brand_Name, count(Product.Brand_ID) count_product from Brand inner join Product on Brand.Brand_ID = Product.Brand_ID group by Brand.Brand_Name order by count_product DESC limit 10;
true
85a1393a34581416f1465517bfbc62a65496741f
SQL
bbrumm/citpsql
/function examples/CASE Expression.sql
UTF-8
3,431
4.375
4
[]
no_license
DROP TABLE customers; CREATE TABLE CUSTOMERS ( first_name varchar2(100), last_name varchar2(100), country varchar2(20), employees number ); INSERT INTO CUSTOMERS (first_name, last_name, country, employees) VALUES ('John', 'Smith', 'USA', 4); INSERT INTO CUSTOMERS (first_name, last_name, country, employees) ...
true
586fcc4c471c2e4335162ca84b47e2023e2703e8
SQL
okhuandou/skill
/server/parent-skill/lk-skill/schema/schema-mysql.sql
UTF-8
1,350
3.8125
4
[]
no_license
-- 数据库初始化脚本 -- 创建数据库 CREATE DATABASE seckill; -- 使用数据库 use seckill; -- 创建秒杀库存秒 CREATE TABLE seckill( seckill_id bigint NOT NULL AUTO_INCREMENT COMMENT '商品库存id', name varchar(120) NOT NULL COMMENT '名称', number int NOT NULL COMMENT '数量', start_time timestamp NOT NULL COMMENT '秒杀开始时间', end_time timestamp NOT NULL C...
true
5f8a27522ba244b5a4622124159d3f28f3824e3d
SQL
go-park-mail-ru/2021_1_DuckLuck
/scripts/postgresql/init_auth_db.sql
UTF-8
471
2.890625
3
[]
no_license
CREATE USER ozon_root WITH password 'qwerty123'; DROP DATABASE IF EXISTS ozon_auth_db; CREATE DATABASE ozon_auth_db WITH OWNER ozon_root ENCODING 'utf8'; GRANT ALL PRIVILEGES ON database ozon_auth_db TO ozon_root; \connect ozon_auth_db; DROP TABLE IF EXISTS auth_users CASCADE; CREATE TABLE auth_users ( i...
true
ea417d07fa55c52b4c64b4fdd99235fafe66b59d
SQL
jhonnyescame/plsql
/Exercícios em PL-SQL/04.sql
UTF-8
1,084
3.875
4
[]
no_license
/* 4.Criar um bloco PL/SQL para atualizar a tabela abaixo, conforme segue: Produtos categoria A deverão ser reajustados em 5% Produtos categoria B deverão ser reajustados em 10% Produtos categoria C deverão ser reajustados em 15% */ /*criar Tabela*/ CREATE TABLE PRODUTO ( CODIGO NUMBER(4), CATEGORIA CHAR(1), ...
true
8806642d6c3202b46129b598af593855fce05e0e
SQL
mafe-rnanda/BootcampX
/4_queries/10_most_confusing_assignments.sql
UTF-8
299
3.828125
4
[]
no_license
-- List each assignment with the total number of assistance requests with it SELECT assignments.id, name, day, chapter, COUNT(assistance_requests.*) AS total_requests FROM assignments JOIN assistance_requests ON assignments.id = assignment_id GROUP BY assignments.id ORDER BY total_requests DESC;
true
8933c9c0cadfd66b893a5d73ce45343f52ebbc84
SQL
BunColak/top250-backend
/prisma/migrations/20201226201001_add_movies/migration.sql
UTF-8
802
4.15625
4
[]
no_license
-- CreateTable CREATE TABLE "Movie" ( "id" SERIAL, "title" TEXT NOT NULL, "imdbRating" DECIMAL(65,30) NOT NULL, "link" TEXT NOT NULL, PRIMARY KEY ("id") ); -- CreateTable CREATE TABLE "_MovieToUserList" ( "A" INTEGER NOT NULL, "B" INTEGER NOT NULL ); -- CreateIndex CREATE UNIQUE INDEX "Movie....
true
467ef09887db72df75d2d5189cc72495984e307d
SQL
hulpi/payDemo
/document/sql/schema/up_batch_query.sql
UTF-8
710
3.140625
3
[]
no_license
drop table up_batch_query cascade constraints; /*==============================================================*/ /* Table: up_batch_query */ /*==============================================================*/ create table up_batch_query ( up_batch_query_oid numeric(19) ...
true
2a935c790289f23932ec70208a1ce635870ba01d
SQL
chunmk/ETL---Korean-NSC
/sql/15.Cost.sql
UTF-8
13,481
3.75
4
[ "Apache-2.0" ]
permissive
/************************************** --encoding : UTF-8 --Author: 이성원 --Date: 2017.02.08 @NHISDatabaseSchema : DB containing NHIS National Sample cohort DB @ResultDatabaseSchema : DB for NHIS-NSC in CDM format @NHIS_JK: JK table in NHIS NSC @NHIS_20T: 20 table in NHIS NSC @NHIS_30T: 30 table in NHIS NSC @NHIS_4...
true
595a3e27293e9abd534a6bfdfc972bff7aab4f25
SQL
MarcosSimao/MeuLar
/meular.sql
UTF-8
9,437
3.109375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Tempo de geração: 03-Dez-2020 às 21:51 -- Versão do servidor: 10.4.11-MariaDB -- versão do PHP: 7.4.3 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @...
true
8d0c3af3521636ec4233b6f86d28a1b0c74b2758
SQL
djmejiaamador/Adventures-in-SQL
/update.sql
UTF-8
4,206
3.171875
3
[]
no_license
EXPLAIN ANALYZE UPDATE hub_movies_temp SET hub_score = hub_score + ( SELECT SUM(auth_score) FROM auth_users a, ratings r WHERE a.userid = r.userid AND hub_movies_temp.movieid = r.movieid AND hub_movies_temp.movieid IN (SELECT movieid FROM ( SELECT movieid, count(movieid) c from ratings group by movieid order by c des...
true
d2786b16b13198fa9ebf9b5a86fe073b51a0a00f
SQL
CafeteriaemzSconcha/Usuarios
/cafe.sql
UTF-8
29,333
2.984375
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.8.3 -- https://www.phpmyadmin.net/ -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 25-02-2019 a las 01:11:56 -- Versión del servidor: 10.1.36-MariaDB -- Versión de PHP: 7.2.10 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00";...
true
b4a0429a330cf68fabcf7caf6b831947ebcc8c7a
SQL
charlesroper/Recorder-6-SQL
/_all taxa under a group.sql
UTF-8
3,048
3.984375
4
[ "MIT" ]
permissive
select itn1.taxon_list_item_key ,itn1.preferred_name ,itn1.common_name ,itg.taxon_list_item_key ,itg.contained_list_item_key from index_taxon_name itn1 inner join index_taxon_group itg on itn1.taxon_list_item_key = itg.taxon_list_item_key where itn1.actual_name = 'chiroptera' select distinct ...
true
0162c93f628edbf8e99c9ebc526692944a73a978
SQL
kevlened/ZK
/zkpm/schema_sqlite3.sql
UTF-8
1,707
3.90625
4
[ "MIT" ]
permissive
DROP TABLE IF EXISTS `users`; -- Dropping the tables to create them again, with IF NOT EXISTS? DROP TABLE IF EXISTS `apps`; -- I know, I'm totally crazy! DROP TABLE IF EXISTS `licenses`; CREATE TABLE IF NOT EXISTS `users` ( -- People who can login. `id` INTEGER PRIMARY KEY, `login` varchar(32) NOT NULL, `username` va...
true
f48746a2c2adbfedd1f9763b6914899783e6d3c6
SQL
shybkoi/WMS-Demo
/sql/161026-1-San-SALETEST.sql
UTF-8
25,631
3.546875
4
[]
no_license
SET TERM ^ ; create or alter procedure U3S_TSELECTDC_TASKF_NEXTWARES ( TASKID type of R_ID) returns ( TWID type of R_ID, WID type of R_ID, WCODE type of R_CODE, WNAME type of R_NAME, QO type of R_QUANTITY, TWSTAT type of R_STATUS, VUFACTOR type of R_MULTIPLE, VUCODE type of R_CODE...
true
d8b490af58fe210d9d3d0582de9d2fd03fd5ed32
SQL
Mariiooo/vodagone1
/vodagone database/vodagone mssql database testquerys.sql
UTF-8
6,459
2.578125
3
[]
no_license
/*==============================================================*/ /* TEST DATA VOOR VODAGONE DATABASE */ /*==============================================================*/ /*==============================================================*/ /* Table: AANBIEDER */ /*==...
true
66a7b72cbd65f29b96ae89c5f3951a1978708a3c
SQL
timitaiwo/SQL-practice
/Assignment_8.sql
UTF-8
1,144
3.90625
4
[]
no_license
/*We saw that library visits have declined recently in most places . But what is the pattern in the use of technology in libraries? Both the 2014 and 2009 library survey tables contain the columns gpterms (the number of internet-connected computers used by the public) and pitusr (uses of public internet computers p...
true
e5c38a252a7bec7520a14ec304c364b77a643912
SQL
puruabhi/mockHMS
/DBMSproject.sql
UTF-8
26,655
2.859375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.5.4.1deb2ubuntu2 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Nov 05, 2017 at 02:28 PM -- Server version: 5.7.20-0ubuntu0.16.04.1 -- PHP Version: 7.0.22-0ubuntu0.16.04.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_C...
true
69fcead0e003771eabc9d8199d31d39f1ee3adc4
SQL
LevanceWam/MySQL
/RDFST/SelectClause/SelectClause.sql
UTF-8
551
3.546875
4
[]
no_license
SELECT first_name, last_name, points, -- here we are using a arithmetic expression -- this creates a new column with a calculated value -- here we are giving the new column a alias using the AS keyword points * 10 + 100 AS discount_factor FROM customers -- -----------------------------...
true
5f6abaa7898208710358f0dbeae8a0e2f6b72da2
SQL
bensh3/assignment-01-intro-to-geographic-queries
/loadcsv.sql
UTF-8
2,089
3.046875
3
[]
no_license
CREATE TABLE indego_trips_2019_q2 ( trip_id INTEGER PRIMARY KEY, duration INTEGER, start_time VARCHAR(17), end_time VARCHAR(17), start_station INTEGER, start_lat NUMERIC, start_lon NUMERIC, end_station INTEGER, end_lat NUMERIC, end_lon NUMERIC, bike_id INTEGER, plan_durat...
true
1b02e330c8ccc9a8d1a0835dfb93d5ee70366fa3
SQL
Mutilar/CSE111
/Lab4/13.sql
UTF-8
582
3.71875
4
[]
no_license
SELECT COUNT(*) FROM ( SELECT l_orderkey FROM lineitem INNER JOIN ( SELECT s_suppkey FROM supplier WHERE s_nationkey IN ( SELECT n_nationkey FROM nation WHERE n_regionkey = ( SELECT r_regionkey FROM region WHERE r_name = 'EUROPE' ) ) ) s ON l_suppkey = s_suppkey INNER JOIN ( SELE...
true
d443a2a3b40b630be463456a8a273b48d5f194e8
SQL
abdulbariktipu/all_project
/db_backup/a_database.sql
UTF-8
3,465
3.28125
3
[]
no_license
/* SQLyog Professional v13.1.1 (64 bit) MySQL - 10.1.26-MariaDB : Database - a_database ********************************************************************* */ /*!40101 SET NAMES utf8 */; /*!40101 SET SQL_MODE=''*/; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_C...
true
acf241543f2e6a10cd57324d963dbecaeebb6d54
SQL
MrTBoll/Partner-projects
/SubQuery-Disha-Wendy-Trevor.sql
UTF-8
344
3.53125
4
[]
no_license
MIN SELECT HoursWorked, EmployeeNumber, ProjectID FROM assignment WHERE HoursWorked> (SELECT MIN(HoursWorked) FROM assignment) ORDER BY HoursWorked; Double NOT Exist SELECT DISTINCT ProjectID FROM Project WHERE NOT EXISTS ( SELECT * FROM assignment WHERE NOT EXISTS( SELECT * FROM Assignment WHERE assignmnet.Project...
true
daba835553273fc80a4edb12756f4d56f8828c8c
SQL
castillojorge/couchinn-grupo26-ing2
/Base de datos/reservas.sql
UTF-8
2,482
2.859375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 10-07-2016 a las 13:30:08 -- Versión del servidor: 10.1.13-MariaDB -- Versión de PHP: 5.6.21 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT...
true
cbcfc941dd0f3bcf533e5df350f37beca181b3ef
SQL
AndyKChen/CS50
/Python/pset7/movies/12.sql
UTF-8
329
3.21875
3
[]
no_license
SELECT movies.title FROM movies INNER JOIN stars ON movies.id = stars.movie_id INNER JOIN people ON stars.person_id = people.id WHERE people.name = "Johnny Depp" INTERSECT SELECT movies.title FROM movies INNER JOIN stars ON movies.id = stars.movie_id INNER JOIN people ON stars.person_id = people.id WHERE people.na...
true
17e95783237d06f293fc22fe635a85781c66cbed
SQL
linecoqueto/db-cassandra
/arithmetic_operators_20210927/arithmetic_operators.cql
UTF-8
3,206
3.015625
3
[]
no_license
# Note, create and USE your own keyspace CREATE TABLE nerd_holidays ( year_bucket int, event_date date, id uuid, name text, PRIMARY KEY (year_bucket, event_date, id) ) WITH CLUSTERING ORDER BY (event_date DESC, id ASC); CREATE TABLE baseball_stats ( team text, name text, a...
true
dae26ceda263f57bc6fc46ac603d6877642490f8
SQL
kongyew/gpdb
/src/test/tinc/tincrepo/mpp/gpdb/tests/package/oid_inconsistency/pg_constraint_alter_part_table_add_primary.sql
UTF-8
565
3.15625
3
[ "Apache-2.0", "LicenseRef-scancode-generic-cla", "PostgreSQL", "LicenseRef-scancode-other-copyleft", "metamail", "BSD-3-Clause", "LicenseRef-scancode-openssl", "LicenseRef-scancode-other-permissive", "ISC", "Python-2.0", "bzip2-1.0.6", "LicenseRef-scancode-ssleay-windows", "LicenseRef-scanco...
permissive
DROP table if exists pg_table_part_add_primary; CREATE table pg_table_part_add_primary (i int, t text) distributed by (i) partition by range(i) (start (1) end (10) every (5) ); ALTER table pg_table_part_add_primary add constraint primary3 primary key (i); select oid, gp_segment_id, conname from pg_constraint where...
true
4a82f23b753c81b9aa01c9a0e07b3206958dbfe5
SQL
a9022400/familytree
/src/main/webapp/sql/test.sql
UTF-8
4,986
3.515625
4
[]
no_license
/* Navicat MySQL Data Transfer Source Server : localhost Source Server Version : 80013 Source Host : localhost:3306 Source Database : test Target Server Type : MYSQL Target Server Version : 80013 File Encoding : 65001 Date: 2019-04-04 16:32:24 */ SET FOREIGN_KEY_CHECKS=0; -- ----...
true
f474419a58f25fba20a9071570906fc582fcf76a
SQL
acoue/GestionCompetitionKendo
/Bdd/bdd.sql
UTF-8
17,078
3.15625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.0.6 -- http://www.phpmyadmin.net -- -- Client: localhost -- Généré le: Sam 26 Juillet 2014 à 16:51 -- Version du serveur: 5.5.33 -- Version de PHP: 5.5.3 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; -- -- Base de données: `gck` -- -- --------------------------...
true
28c4e7febd26a3350aa250185344e1e9fd33e975
SQL
joanjanku2000/quora
/src/main/resources/project.sql
UTF-8
4,781
3.59375
4
[]
no_license
create table users ( id serial not null, first_name character varying(120) not null, last_name character varying(120) not null, birthdate timestamp without time zone not null, gender character varying(10), birth_place character varying(50), email character varying(100), ...
true
497cc77ae25d43a90dca301df7d938e8e9213975
SQL
mclmnop/LightBnB
/seeds/01_seeds.sql
UTF-8
1,788
2.8125
3
[]
no_license
INSERT INTO users (id, name, email, password) VALUES (1, 'Marianne Charlebois', 'mcharlebois@hotmail.com', '$2a$10$FB/BOAVhpuLvpOREQVmvmezD4ED/.JBIDRh70tGevYzYzQgFId2u.'), (2, 'Jo Huang', 'huang@gmail.com', '$2a$10$FB/BOAVhpuLvpOREQVmvmezD4ED/.JBIDRh70tGevYzYzQgFId2u.'), (3, 'Jessica Simpson', 'js@hotmail.com', '$2a$10...
true
255c0cc157e189b1ce1a4af91e08ddf94b9fa7e6
SQL
perfsonar/historical
/perfSONAR_PS-PingER/scripts/create_pingerMA_MySQL.sql
UTF-8
2,047
3.703125
4
[ "Apache-2.0" ]
permissive
drop table if exists data; drop table if exists metaData; drop table if exists host; # # ------------------------------------The part above is for beacons and pinger website ( means administering tasks)-- # #----------------------------------------------- The part below is for collection and pinger MA-------------...
true
aa9552952b8441a029eeb7bc8517d869b16bda0e
SQL
Nicolasfiguerasparras/Mismatch
/mismatch.sql
UTF-8
9,766
2.765625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.4 -- https://www.phpmyadmin.net/ -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 14-12-2020 a las 07:32:39 -- Versión del servidor: 10.4.17-MariaDB -- Versión de PHP: 8.0.0 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_...
true
61d1fa8ec7dc0205631ab16ee0ccb1de97286485
SQL
juniorubuntu/Tourisme
/web/bd/Tourisme.sql
UTF-8
6,739
2.96875
3
[ "MIT", "BSD-3-Clause" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.5.2 -- http://www.phpmyadmin.net -- -- Client : localhost -- Généré le : Sam 13 Août 2016 à 23:24 -- Version du serveur : 10.1.10-MariaDB -- Version de PHP : 5.5.33 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARA...
true
1bc957d707d3c0705805ef89567c27dc9b000e8c
SQL
ajayasud/DBMS_SQL_SqlServer
/Group_07_SQL.sql
UTF-8
13,428
3.625
4
[]
no_license
# WARM UP Queries #1 Finding the three most preferred mode of payments accepted select Rpayment, count(placeID) from chefmozaccepts group by Rpayment order by count(placeID) Desc limit 5; #2 Finding the most popular cuisines served select Rcuisine, count(placeID) from chefmozcuisine group by Rcuisine order by count(pl...
true
9217651733c4225411a5358e51d0709349c39aa3
SQL
enazaroverlan/nomadlife
/nomadlife.sql
UTF-8
8,440
2.984375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Хост: 127.0.0.1 -- Время создания: Июн 20 2016 г., 01:05 -- Версия сервера: 10.1.13-MariaDB -- Версия PHP: 5.6.20 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT ...
true
bd7adb47890dffae0f5e6c1bf1ec813d7b6fd8ed
SQL
connold9/15.458_FDSC
/Project F/taq_04.sql
UTF-8
410
3.5625
4
[]
no_license
use taq04 select Q.date, Q.time_m, Q.ex, Q.sym_root, Q.sym_suffix, Q.bid, Q.bidsiz, Q.ask, Q.qu_cond, Q.bidex, Q.askex, Q.natbbo_ind, Q.nasdbbo_ind, T.tr_scond, T.size, T.price, T.tr_source from dbo.quote_msec Q inner join dbo.trade_msec T on (Q.time_m = T.time_m) and (Q.date = t.date) and (Q.sym_r...
true
7fcb7f85cab294b542e48010b1a62811d4f713fe
SQL
antsla/db-explorer
/app/db/init.sql
UTF-8
881
3.375
3
[]
no_license
CREATE DATABASE `observer`; USE `observer`; DROP TABLE IF EXISTS items; CREATE TABLE items ( id int(11) NOT NULL AUTO_INCREMENT, title varchar(255) NOT NULL, description text NOT NULL, updated varchar(255) DEFAULT NULL, PRIMARY KEY (id) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; INSERT INTO items (id, titl...
true
2f47c5f6a178979f2291f2f703cf0f1420598d30
SQL
paris39/MotosMaroto
/SQL/script_tablas.sql
UTF-8
21,422
3.265625
3
[ "MIT" ]
permissive
CREATE TABLE `accesory` ( `id` int(10) unsigned NOT NULL COMMENT 'Identificador de producto del accesorio', `type` int(10) unsigned NOT NULL COMMENT 'Tipo de accesorio', `size` varchar(100) COLLATE utf8_spanish_ci DEFAULT NULL COMMENT 'Talla', `create_date` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMEN...
true
a9ef09f6044bbd07af5c81ccc2b7a96f9db62d07
SQL
vijaydairyf/TimelyFish
/SolomonApp/dbo/Stored Procedures/dbo.PJEMPPJT_SMSP.sql
UTF-8
551
3.65625
4
[]
no_license
 create procedure PJEMPPJT_SMSP @parm1 smalldatetime as SELECT M1.employee, M1.emp_name, M1.MSPRes_UID, M1.edate, r2.labor_rate from (SELECT e.employee, e.emp_name, e.MSPRes_UID, MAX(r.effect_date)as edate FROM Pjemploy e JOIN Pjemppjt r ON e.employee = r.employee where e.mspinterface = 'Y'...
true
c2936580f828b6f6c95a08e6627f000f15c75336
SQL
OscarAbadNauto/Comedor
/1_crear.sql
UTF-8
7,388
3.6875
4
[]
no_license
CREATE DATABASE comedor; USE comedor; -- =============== -- esquema CLIENTE Y ORGANIZACION -- =============== CREATE TABLE Facultad ( idFacultad INT NOT NULL, detalle VARCHAR(70) NOT NULL, numero VARCHAR(2) ); ALTER TABLE Facultad ADD CONSTRAINT pk_facultad PRIMARY KEY (idFacultad); ALTER TABLE Facultad ...
true
255169280f44785006e468a90f44bb4d56fb62a0
SQL
ElianMelo/consultas-sql
/consultas.sql
UTF-8
20,752
4.03125
4
[]
no_license
/* Nome do autor: Elian Melo Morais Data de criação do arquivo: 26/12/2018 Objetivo sucinto do arquivo: Demonstrar operações na linguagem SQL Referência: https://www.youtube.com/playlist?list=PLHz_AreHm4dkBs-795Dsgvau_ekxg8g1r */ -- Usa o banco de dados cadastro -- USE cadastro; -- Deleta o banco de dados cadastro -- ...
true
b726fd4dc28045746af8801aacd41161a7189f39
SQL
FoxComm/highlander
/phoenix-scala/sql/V1.094__create_coupon_codes.sql
UTF-8
369
3.40625
3
[ "MIT" ]
permissive
create table coupon_codes( id serial primary key, code generic_string not null, coupon_form_id integer not null references object_forms(id) on update restrict on delete restrict, created_at generic_timestamp ); create index coupon_codes_coupon_form_idx on coupon_codes (coupon_form_id); create unique in...
true
81b5145b138aac70e80fcff0fab6fe42d3c1dacd
SQL
assent222/web_advertisement_manager
/web/src/test/resources/db/schema.sql
UTF-8
1,337
3.328125
3
[]
no_license
alter table USER drop constraint UK_r61ihmpmuedleishhqfatav3x; alter table USER drop constraint UK_f2eme58cb7sw3hj6rfqn6hmw9; alter table APP drop constraint FK3a81gkamtyuunogpqfxl916la; alter table APP_CONTETN_TYPE drop constraint FKi0qt7pcceux6rno9do2qcsq5n; drop table APP if exists; drop table APP_CONTETN_TYPE if e...
true
590b8aa40b431cdaa69eb2bf3e120d47d8925659
SQL
Arylmera/Projet-Integration-App
/DB/createDB.sql
UTF-8
1,981
3.609375
4
[]
no_license
/* * Création de la base de données et de ses tables */ CREATE DATABASE `menura` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci */ /*!80016 DEFAULT ENCRYPTION='N' */; CREATE TABLE `oiseaux` ( `idoiseaux` int NOT NULL AUTO_INCREMENT, `nom` varchar(75) NOT NULL, `espece` varchar(75) DEFAULT NUL...
true
00f7b94006ddd6f9f6de9a57b338cc0e53643169
SQL
Mikazukittp/thailand
/docker/mysql/init/create_table.sql
UTF-8
4,031
3.421875
3
[]
no_license
CREATE TABLE users ( id int AUTO_INCREMENT NOT NULL PRIMARY KEY, name varchar(100) NOT NULL UNIQUE KEY, email varchar(100) NOT NULL, password varchar(100) NOT NULL ); -- CREATE TABLE statuses ( -- id int AUTO_INCREMENT NOT NULL PRIMARY KEY, -- user_id int NOT NULL, -- plan_id int NOT NULL, -- status in...
true
e9db7fb62875fe148d1b00fb933abe0f07601651
SQL
dandraden/Database-Scripts
/Oracle/others/user_script/VIW_EMPREGADOS_SIAAM_ddl.sql
UTF-8
2,106
3.140625
3
[]
no_license
CREATE OR REPLACE VIEW viw_empregados_siaam ( emp_numero_matricula, emp_nome, uor_codigo, lotacao, cod_dependencia, sigla_dependencia, emp_data_nascimento, nacionalidade, emp_numero_cpf, identidade, emp_endereco_logradouro, emp_endereco_numero_cep, emp_endereco_bairro...
true
a275b6539190b8dd263ba6c265174357711f7cb0
SQL
trevorassaf/grade_book
/sql/create_tables.sql
UTF-8
1,098
3.75
4
[]
no_license
-- GSI Table CREATE TABLE Gsis ( id INT NOT NULL AUTO_INCREMENT, first_name varchar(30) NOT NULL, last_name varchar(30) NOT NULL, PRIMARY KEY(id) ); -- Stat Set Table CREATE TABLE StatSets ( id INT NOT NULL AUTO_INCREMENT, num_exams INT NOT NULL, total_avg_score DOUBLE NOT NULL, total_s...
true
0b3d6670d7bc40076d75295e75d72ce20c0177a2
SQL
ivanbelmont/BetaProjects
/Comidas_Finanzas/CargarVideosYoutube/Videos.sql
UTF-8
1,348
3.109375
3
[]
no_license
/* SQLyog Community v11.12 (64 bit) MySQL - 5.5.32 : Database - videos ********************************************************************* */ /*!40101 SET NAMES utf8 */; /*!40101 SET SQL_MODE=''*/; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_K...
true
c85d9f6c930323b4bce7f52202f8375c76768cdb
SQL
mcollins33/order
/schema.sql
UTF-8
8,100
4.40625
4
[]
no_license
-- Used for development. DROP DATABASE order_db; CREATE DATABASE order_db; USE order_db; -- CREATE TABLES -- More user information required, outside scope of this project -- For this project, user is already logged in. Table has been created for id and ability to pull orders by user. CREATE TABLE users ( id INT ...
true
7d919da4030e573f331dda394a9d9d32a5fd9d46
SQL
conrrak/GestionBasesDatos
/Tema3/scripts/E09.SQL
UTF-8
2,115
3.5
4
[]
no_license
SET SQLPROMPT ""; SET SQLNUMBER OFF; CONNECT SYSTEM/SYSTEM; DROP USER E09 CASCADE; CREATE USER E09 IDENTIFIED BY "E09"; GRANT CONNECT,RESOURCE TO E09; CONNECT E09/E09; CREATE TABLE CLIENTE ( DNI CHAR(9), NOMBRE VARCHAR2(40), DIRECCION VARCHAR2(40), LOCALIDAD VARCHAR2(40), ...
true
53cd62b5c2291594830de9cf4dc32d1e611b9037
SQL
nathan90/learningNotes
/SQL/TransactSQL/lab8.sql
UTF-8
3,365
4.40625
4
[]
no_license
-- Modify the query so that the results include a grand total for all sales revenue and a subtotal for each country/region in addition to the state/province subtotals that are already returned. Make sure to use the aliases provided, and default column names elsewhere. SELECT a.CountryRegion, a.StateProvince, SUM(soh.T...
true
ef711820b1ac3d7dd4ef73f8de4b5f78065e028f
SQL
BrittanyPruneau/MSSA_SQL
/SQL_Quiz1.sql
UTF-8
1,566
4.4375
4
[]
no_license
USE TSQLV4 -- (20 Points) List all the Customers located in Germany. --(20 Points) Count all the Customers with "Jr." in their name (contactname). --(20 Points) What are the three highest priced Products that we sell? --(20 Points) What is the total quantity of all products that were sold? --(20 Points) What were ...
true
ad92a59a1f4700fc9bc4e1fbc73e067e70b3ae6a
SQL
HCIGrp/HCI_Project_CV.LK
/DB/hci.sql
UTF-8
5,671
2.78125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Oct 16, 2020 at 08:10 PM -- Server version: 10.1.33-MariaDB -- PHP Version: 7.2.6 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
true
ba7fa743a10e133a27650addea00ba1f5f565a48
SQL
Brendan838/employeeTracker
/db/schema.sql
UTF-8
595
3.34375
3
[]
no_license
DROP DATABASE IF EXISTS company_db; CREATE DATABASE company_db; USE company_db; CREATE TABLE dept_tab( dept_id INT NOT NULL AUTO_INCREMENT, dept VARCHAR(30) NOT NULL, PRIMARY KEY (dept_id) ); CREATE TABLE role_tab( role_id INT NOT NULL PRIMARY KEY AUTO_INCREMENT, title VARCHAR(30) NOT NULL, salary DECIMAL...
true
41564c43657f0d5798a79f277681d2fe472bc6f7
SQL
ganeshbabuNN/Databases
/RDMS/Oracle Database/Subquery_In_ORDER_BY_clause.sql
UTF-8
273
3.890625
4
[]
no_license
select first_name, last_name, job_id from employees a order by (select min_salary from jobs b where a.job_id=b.job_id); select first_name, last_name, job_id from employees a order by (select min_salary from jobs b where a.job_id=b.job_id) DESC;
true
2d1579d22ea8049a73ab606945a51d7114245599
SQL
arpitabhi/Hackerrank_SQL
/Hackerrank-Weather-Observation-Station-16-Solution MySql.sql
UTF-8
167
2.515625
3
[]
no_license
/* Author : Arpit Shukla Date : 4th June, 2020 Hackerrank Weather Observation Station 16 Solution MySql */ select round(min(lat_n),4) from station where lat_n >38.7780;
true
bb864f6b49649ca9bc0f1734168973d87602578c
SQL
sampert-git/anecdote
/anecdote.sql
UTF-8
2,333
3.40625
3
[ "MIT" ]
permissive
/* Navicat Premium Data Transfer Source Server : Mysql_local Source Server Type : MySQL Source Server Version : 80019 Source Host : localhost:3306 Source Schema : anecdote Target Server Type : MySQL Target Server Version : 80019 File Encoding : 65001 Date: 20/05/2021...
true
b63193d5186e4cb5201432e896655143f80b756d
SQL
dalimedmrad/SgestionE
/projet.sql
UTF-8
7,989
3.0625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.1.0 -- https://www.phpmyadmin.net/ -- -- Hôte : 127.0.0.1 -- Généré le : dim. 02 mai 2021 à 04:21 -- Version du serveur : 10.4.18-MariaDB -- Version de PHP : 7.3.27 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SE...
true
427fd5244efc27bfd6c4ad8a7a777388223a46ac
SQL
ermueller/TagISA
/SQL_Definitions/Metabolights.ddl
ISO-8859-1
5,961
3.6875
4
[]
no_license
CREATE TABLE `ISA_Tab` ( Accession VARCHAR(10) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL ); ALTER TABLE `ISA_Tab` ADD CONSTRAINT `ISA_Tab_PK` PRIMARY KEY (Accession); CREATE TABLE Study ( ID VARCHAR(10) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL , ...
true
e1789ffb2c79c1a78e05887941718c0c564d100f
SQL
parikshit0412/interview
/car_trading.sql
UTF-8
13,294
2.921875
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jul 11, 2020 at 10:05 AM -- Server version: 10.4.11-MariaDB -- PHP Version: 7.4.4 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIEN...
true
293febf89c89528c6c3154f85020d08361637616
SQL
lemillioncorp/Sistema-gestao-clinica
/SGC_Clinica/bd/clinica.sql
UTF-8
5,104
2.90625
3
[]
no_license
# Host: localhost (Version 5.5.5-10.4.8-MariaDB) # Date: 2020-06-25 00:17:34 # Generator: MySQL-Front 6.0 (Build 1.154) # # Structure for table "consulta" # DROP TABLE IF EXISTS `consulta`; CREATE TABLE `consulta` ( `IdConsulta` int(11) NOT NULL AUTO_INCREMENT, `IdExame` int(11) DEFAULT NULL, `IdDoenca` int...
true
c780a7676f538f87c0eff78bd823273e5b207b16
SQL
slavkus/SoftwareLL
/SoftwareLL/DB/db_src/backup.sql
UTF-8
6,858
2.953125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.5.4.1 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Mar 27, 2019 at 12:49 PM -- Server version: 5.5.62-0+deb8u1 -- PHP Version: 7.2.15-1+0~20190209065041.16+jessie~1.gbp3ad8c0 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @...
true
4b3a9eda4126fc57ada453e38b2c8198dbc43386
SQL
yama1968/db_bench
/cassandra/10k.sql
UTF-8
360
2.90625
3
[]
no_license
USE test; TRUNCATE TABLE Train; COPY Train ( id,click,hour,C1,banner_pos,site_id,site_domain,site_category,app_id,app_domain,app_category,device_id,device_ip,device_model,device_type,device_conn_type,C14,C15,C16,C17,C18,C19,C20,C21 ) FROM '/home/yannick/tmp/train10k.csv' WITH DELIMITER = ',' AND HEADER = t...
true
6474da521a9227137d428bb4b8f38af0fedfc273
SQL
csmanioto/pentaho
/Dooker/BiServerPlusPGSQL.sql
UTF-8
10,715
3.484375
3
[]
no_license
CREATE USER hibuser PASSWORD 'password'; CREATE USER pentaho_user PASSWORD 'password'; CREATE USER jcr_user PASSWORD 'password'; CREATE DATABASE hibernate ENCODING = 'UTF8' CONNECTION LIMIT = -1; CREATE DATABASE jackrabbit ENCODING = 'UTF8' CONNECTION LIMIT = -1; CREATE DATABASE quartz ENCODING = 'UTF8' CONNECTION L...
true
49a4e66e012ce58e57f272496b349da722c9594d
SQL
Lanven/RIS
/SQL_ALL_IN_ORDER/QUERIES/NEW_SQL8.3 NO dblink.sql
UTF-8
520
4.15625
4
[]
no_license
SELECT sb.categories.title, good.model, sb.payment_methods.title, sum(sale_amount) FROM (SELECT id, category_id, model FROM sb.goods_main WHERE company_id = 220) as good JOIN sb.categories ON sb.categories.id = good.category_id JOIN sb.orders_main ON sb.orders_main.goods_id = good.id JOIN sb.payment_methods ON sb.paym...
true
fd8af261db7cddd21141ba924d9b770a66e66dbf
SQL
shelbourn/Udemy-Projects
/oracleDB12cSQL/instructorAssets/chapter-23-part-2.sql
UTF-8
1,357
3.734375
4
[ "MIT" ]
permissive
--the user demo can know his privileges by using this query select * from session_privs; --now if he have create table privileges then he can insert,update,delete, --select, alter, index on any table he create create table emp ( empid number constraint emp_pk primary key, ename varchar2(100) ); insert into emp va...
true
02d7756821c4d695f6c01c5a0e6c4ace3c0098af
SQL
datadrivenempathy/who-wrote-this-training
/sql/links_with_predictions.sql
UTF-8
3,083
4.4375
4
[ "MIT", "Apache-2.0", "LGPL-2.0-only", "BSD-3-Clause" ]
permissive
SELECT joined.title AS title, joined.link AS link, joined.actualSource AS actualSource, ( CASE WHEN joined.actualSource = "CNN" THEN joined.cnnScore WHEN joined.actualSource = "Fox" THEN joined.foxScore WHEN joined.actualSource = "Daily Mail" THEN joined.dailyMailScore WHEN joined.actualSource = "Drud...
true
a23a85e0a43fd37fea35468d8d9d8fc993154c7e
SQL
slopez15/SER322-ProjectPart1_Learning
/src/ShoppingCart.sql
UTF-8
1,739
3.828125
4
[]
no_license
CREATE DATABASE shoppingcart; USE shoppingcart; CREATE table Customer(CID INT NOT NULL, Email VARCHAR(45), PhoneNumber VARCHAR(45), FirstName VARCHAR(45),Middlename VARCHAR(45),LastName VARCHAR(45), primary key(CID));# still have to implement name CREATE table Orders(CID INT NOT NULL, OrderID INT , Date date, foreign ...
true
e95c0d3db0a8338821e7cbe4af1bb141cccd5b56
SQL
richardadinugraha/Daftar_Profesi
/Soal_1_no1.sql
UTF-8
332
3.921875
4
[]
no_license
show databases; use sakila; show tables; select * from film; select film.title, category.name as category, film.length from film inner join film_category on film.film_id = film_category.film_id inner join category on film_category.category_id = category.category_id where category.name = 'Comedy' order by film.length a...
true
ae4dc42da988dc9d6f71490b4f4e58e74e3bbd50
SQL
942669366/mzh
/myproject/test11.sql
UTF-8
26,677
3.265625
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : localhost_3306 Source Server Version : 50168 Source Host : localhost:3306 Source Database : test11 Target Server Type : MYSQL Target Server Version : 50168 File Encoding : 65001 Date: 2018-12-29 16:21:01 */ SET FOREIGN_KEY_CHECKS=0; ...
true
566fbbf06b4b11d6e33e815affcdae367b9285dd
SQL
marcos-moreno/back-e-commerce
/models/AD/sql/user/admin/loginAdmin.sql
UTF-8
629
3.625
4
[]
no_license
SELECT u.userpin ,u.value As user ,u.phone2 ,u.phone ,passwordinfo ,u.ad_user_id ,cp.name cpname ,u.name as userName ,cp.name2 ,cp.description ,cp.taxid ,u.email ,cp.value ,cp.C_BPartner_ID FROM adempiere.AD_User u INNER JOIN adempiere.C_BPartner cp ON cp.C_BPartner_ID= u.C_BPartner_ID WHERE u.isActiv...
true
abcda58896f63413c4f1e1a793f38b37847096f9
SQL
JACD15/da-academy-sql
/martin exercices/exercice 5.sql
UTF-8
182
3.25
3
[]
no_license
#Write a query to get the employee ID, names (first_name, last_name), salary in ascending order of salary. SELECT First_name, last_name, salary FROM employees ORDER BY salary asc;
true
5af96f447e4e7bb288c5941cc35581fe3d6f73d6
SQL
zahedbri/RsCartE-Commerce
/OracleDB/EMAILRESETTOKEN.sql
UTF-8
1,234
2.890625
3
[]
no_license
-------------------------------------------------------- -- File created - Sunday-March-31-2019 -------------------------------------------------------- -------------------------------------------------------- -- DDL for Table EMAILRESETTOKEN -------------------------------------------------------- CREATE TA...
true
194d7be1fa735b0b9b8d6d36868134e130611530
SQL
gaconleocay/MedicalLink
/SQL_MedicalLink/SQL_SuaThongTinBenhAn.sql
UTF-8
1,652
3.484375
3
[]
no_license
--ucSuaThongTinBenhAn --ngay 15/3/2018 SELECT vp.vienphiid as vienphiid, hsba.patientid as patientid, bh.bhytid as bhytid, hsba.hosobenhanid as hosobenhanid, hsba.patientname as patientname, case vp.vienphistatus when 2 then 'Đã duyệt BHYT' when 1 then case vp.vienphistatus_vp when 1 then 'Đã duyệt VP' else ...
true
06ce1c728aafac8b099e6a73c59e21548398d235
SQL
diegobaesv/travesuras-tesis-back
/src/database/creacion.sql
UTF-8
3,838
3.53125
4
[]
no_license
DROP TABLE IF EXISTS apoderados; CREATE TABLE apoderados( id_apoderado SERIAL PRIMARY KEY, documento_identidad CHAR(8) NOT NULL, apellido_paterno VARCHAR(250) NOT NULL, apellido_materno VARCHAR(250), nombres VARCHAR(500) NOT NULL, fecha_nacimiento DATE, fecha_inscripcion DATE, fecha_baj...
true
61bd4e7ac1d4fe6f51bc08a5119eb5854e399043
SQL
Mwalima/ProgrammeerBestanden
/mwalima-opdracht.sql
UTF-8
2,912
2.625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.4.14 -- http://www.phpmyadmin.net -- -- Host: localhost -- Gegenereerd op: 07 okt 2015 om 13:30 -- Serverversie: 5.6.26 -- PHP-versie: 5.5.28 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!4010...
true
1645a3ad108f597cbdd0ab4b443f5ada4ea000cf
SQL
techmotive/open-falcon-scripts
/triger_update_host.sql
UTF-8
282
2.78125
3
[]
no_license
use graph; DELIMITER $$ CREATE TRIGGER trigger_update_host AFTER INSERT ON graph.endpoint FOR EACH ROW BEGIN insert into auto_aggr.endpoint (select * from graph.endpoint where endpoint REGEXP '[a-zA-Z]*-[a-zA-Z_]*-[a-zA-Z]*-[a-zA-Z]*-[0-9]{2}'); END $$ DELIMITER ;
true
6edd69f09ae6eb12a2a467757c8c98356362ec60
SQL
ashwinstar/gpdb
/contrib/pgstattuple/sql/pgstattuple.sql
UTF-8
1,964
3.421875
3
[ "Apache-2.0", "PostgreSQL", "LicenseRef-scancode-generic-cla", "LicenseRef-scancode-rsa-md4", "OLDAP-2.8", "HPND-sell-variant", "bzip2-1.0.6", "BSD-3-Clause", "Beerware", "BSD-4-Clause-UC", "Zlib", "LicenseRef-scancode-zeusbench", "NTP", "LicenseRef-scancode-mit-modification-obligations", ...
permissive
CREATE EXTENSION pgstattuple; -- -- It's difficult to come up with platform-independent test cases for -- the pgstattuple functions, but the results for empty tables and -- indexes should be that. -- create table test (a int primary key, b int[]); select * from pgstattuple('test'); select * from pgstattuple('test'::...
true
119092d77088819551c6a0da3165342225064eaf
SQL
bage2014/study
/study-spring-boot-multi-datasource/src/main/resources/init.sql
UTF-8
1,932
2.890625
3
[]
no_license
-- DB 1 DROP TABLE IF EXISTS oauth_client_details; CREATE TABLE oauth_client_details1 ( client_id VARCHAR(255) PRIMARY KEY, resource_ids VARCHAR(255), client_secret VARCHAR(255), scope VARCHAR(255), authorized_grant_types VARCHAR(255), web_server_redirect_uri VARCHAR(255), authorities VARCHAR(25...
true
1923c11262883d9f037fa511cff7939dc580cf86
SQL
HansolK/Life-Hack-App
/main.sql
UTF-8
470
2.9375
3
[]
no_license
CREATE DATABASE life_hacks; CREATE TABLE users( id SERIAL PRIMARY KEY, name VARCHAR(400), email VARCHAR(500), password_digest VARCHAR(600) ); CREATE TABLE catergories( id SERIAL PRIMARY KEY, name VARCHAR(400) ); CREATE TABLE ideas( id SERIAL PRIMARY KEY, title VARCHAR(600), description TEXT, crea...
true
ca134fe6f14127e6d293740a8c379beb6d7d2bee
SQL
R-Hys/dblec
/test.sql
UTF-8
1,095
2.984375
3
[]
no_license
use dblec; insert into games (year,season,date,which_num,player_id,rank_num,point) values("2019","regular","10-08",1,4,4,-706); insert into games (year,season,date,which_num,player_id,rank_num,point) values("2019","regular","10-29",1,8,1,527); insert into games (year,season,date,which_num,player_id,rank_num,point) valu...
true
21c65ac69397a7e63c2af51033d104cb2d8978f1
SQL
harmlamers/Actemium.L3IC.OrderManager
/Actemium.L3IC.OrderManager.Database/AT/Stored Procedures/ApplicationTranslations_GetDeletedSince.sql
UTF-8
406
3.34375
3
[]
no_license
CREATE PROCEDURE [AT].[ApplicationTranslations_GetDeletedSince] @Since datetime AS SELECT * FROM AT.ApplicationTranslations WHERE ApplicationTranslations.Id IN ( SELECT AT.ApplicationTranslationsHistory.TranslationId FROM AT.ApplicationTranslationsHistory WHERE AT.ApplicationTranslationsHistory.Modified_O...
true
6cf8df8e159de8fb327acc7dbeef44452ce41907
SQL
gor8808/SqlDatebasesAndQueryExamples
/Queryes/SQLQuery14.sql
UTF-8
141
2.984375
3
[]
no_license
SELECT orderid FROM Sales.Orders WHERE empid IN -- = ( SELECT E.empid FROM HR.Employees AS E WHERE E.lastname LIKE N'D%' );
true
630a63cfc5a3ec19a0368ac94d7aa2f1de538e97
SQL
LarsBusk/CrystalReports
/CalibrationControl/CalibrationControlSub_new.sql
UTF-8
1,186
3.4375
3
[]
no_license
Select sa.AnalysisStartUTC , sa.SampleID , pre.DoubleResult , rv.[Value] as ReferenceValue , rv.[Value] - pre.DoubleResult as [Difference] , pm.[Name] as PmName , 0.7 as UpperError , 0.3 as UpperWarning , -0.7 as LowerError , -0.3 as LowerWarning , * From tblMfCdSample sa Inner Join ...
true
213eb4c6ac0964b7672efc8c0fd8c64488b1aa2c
SQL
Vanadiiii/MyBatisTest
/src/main/resources/static/createDb.sql
UTF-8
397
2.59375
3
[]
no_license
-- create database mybatis; create table subscriber ( id integer primary key, name varchar(255) not null, ref_tariff varchar(10) not null ); create table tariff ( id integer primary key, descr varchar(255) not null ); create table payment ( id integer primary key...
true
8c74482480f93e0018c57720428ae011396aed4b
SQL
github89/New_WebRental
/src/main/resources/sql/querytest.sql
UTF-8
1,192
3.859375
4
[]
no_license
select * from board_test where rownum >= 1 order by idx desc as a; select * from a whe select * from ( select * from board_test order by idx desc ) where a.rownum between 5 and 8 SELECT * FROM (SELECT a.rownum as rnum, a.* FROM board_test a) as b WHERE b.rnum BETWEEN 5 AND 9 select * from (select rownum rm, idx, ti...
true
792cd109f03e0a84377c2c008574a9d683ed7698
SQL
SAProdhan/Office-management-with-bulk-mailer
/database.sql
UTF-8
27,944
2.9375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Feb 24, 2021 at 08:50 PM -- Server version: 10.4.13-MariaDB -- PHP Version: 7.4.8 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIEN...
true
babd00b1f0a75ffb90925cc906c34df41c33d79a
SQL
azimganiev/myWorks
/data23.sql
UTF-8
1,333
3.234375
3
[]
no_license
CREATE TABLE IF NOT EXISTS `data2`.`city` ( `id` int(11) NOT NULL AUTO_INCREMENT, `c_id` int(11) NOT NULL, `name` varchar(256) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=7 ; INSERT INTO `data2`.`city` (`id`, `c_id`, `name`) VALUES (1, 1, 'Москва'), (2, 1, 'Астрахань'), (3...
true
78e1363d531501f44d952493f874ac56502f9fc5
SQL
HWYWL/layui-practice
/sql/结构.sql
UTF-8
4,663
3.328125
3
[ "Apache-2.0" ]
permissive
/* Navicat MySQL Data Transfer Source Server : mysql Source Server Version : 50720 Source Host : localhost:3306 Source Database : sg Target Server Type : MYSQL Target Server Version : 50720 File Encoding : 65001 Date: 2018-07-30 10:45:18 */ SET FOREIGN_KEY_CHECKS=0; -- ----------...
true
cf0d56d248a1a863e007eb42d3ac5aac2721bb95
SQL
nikoelvambuena95/sql-challenge
/EmployeeSQL/HerculesName_5.sql
UTF-8
218
3.609375
4
[]
no_license
--List employees by first name 'Hercules' AND last name starts with 'B' SELECT E.first_name, E.last_name, E.sex FROM employees AS E WHERE first_name = 'Hercules%' AND last_name LIKE 'B%' ORDER BY last_name ASC ;
true
af9556ae90f7a5340a983f8e5dd66ac9991a297e
SQL
iKhalidH/IBM-Watson
/robotmovement.sql
UTF-8
1,482
2.921875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jun 26, 2021 at 01:46 PM -- Server version: 10.4.16-MariaDB -- PHP Version: 7.4.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIE...
true
21abe19a8e1b1824d4c76ad39ad29cca5a77a094
SQL
Waqass/hostmayo
/members/library/setup/sql/upgrade_5_3_0a1.sql
UTF-8
2,860
3.34375
3
[]
no_license
DROP TABLE IF EXISTS `translations`; CREATE TABLE `translations` ( `type` int(11) NOT NULL, `itemid` int(11) NOT NULL, `language` varchar(200) NOT NULL, `value` longtext NOT NULL, PRIMARY KEY ( `type` , `itemid` , `language` ) ) DEFAULT CHARACTER SET utf8, ENGINE=MyISAM; ALTER TABLE `users` CHANGE `passwor...
true
f47f6d9f4b9f00168a7bc92cc841ff299f7fee3f
SQL
PacktPublishing/Yii2-Application-Development-Cookbook-Third-Edition
/Chapter03_Code/Recipe07/data.sql
UTF-8
243
2.578125
3
[ "MIT" ]
permissive
DROP TABLE IF EXISTS `blog_post`; CREATE TABLE IF NOT EXISTS `blog_post` ( `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, `title` VARCHAR(255) NOT NULL, `slug` VARCHAR(255) NOT NULL, `text` TEXT NOT NULL, PRIMARY KEY (`id`) );
true
514eeb32c57cb740e93cceaea19e7ec989cf5bec
SQL
BangBang666666/db-sql
/sql/practices/leetcode/181.sql
UTF-8
1,079
4.5
4
[]
no_license
/* Employee 表包含所有员工,他们的经理也属于员工。每个员工都有一个 Id,此外还有一列对应员工的经理的 Id。 +----+-------+--------+-----------+ | Id | Name | Salary | ManagerId | +----+-------+--------+-----------+ | 1 | Joe | 70000 | 3 | | 2 | Henry | 80000 | 4 | | 3 | Sam | 60000 | NULL | | 4 | Max | 90000 | NULL | +----...
true
ca6de899a840b49590843c16585b643596db78ad
SQL
gia01020304/MathManipulative
/yvcgvgtfsb.sql
UTF-8
2,540
3.234375
3
[ "LicenseRef-scancode-unknown-license-reference", "MIT" ]
permissive
/* SQLyog Community v13.0.1 (64 bit) MySQL - 5.7.21 : Database - yvcgvgtfsb ********************************************************************* */ /*!40101 SET NAMES utf8 */; /*!40101 SET SQL_MODE=''*/; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FORE...
true
90c28ebeef1930599f32f4510186d76555ba179c
SQL
pratikbassi/kupit
/db/schema/04_messages.sql
UTF-8
533
3
3
[]
no_license
DROP TABLE IF EXISTS messages CASCADE; CREATE TABLE messages( id SERIAL PRIMARY KEY NOT NULL, sender INTEGER REFERENCES users( id ) ON DELETE CASCADE, reciever INTEGER REFERENCES users( id ) ON DELETE CASCADE, item_id INTEGER REFERENCES items( id ) ON DELETE CASCADE, body TEXT NOT NULL, created TIMESTAMP D...
true