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
f7e037ba9befbeaf8f435659acbde2db48fda736
SQL
ScaryPoppins/media-queries-afternoon-css-animation
/afternoon-projects/sql-2-afternoon/ecommerce_simulation.sql
UTF-8
835
4.0625
4
[]
no_license
-- Let's simulate an e-commerce site. We're going to need users, products, and orders. -- users need a name and an email. -- products need a name and a price -- orders need a ref to product. -- All 3 need primary keys. -- Instructions -- Create 3 tables following the criteria in the summary. -- Add some data to fill...
true
bb3bb86437aa1b12a3543cc39158ddb98a4d2a52
SQL
wave1998/mksc
/mcshop.sql
UTF-8
24,319
2.875
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : ps Source Server Version : 50553 Source Host : localhost:3306 Source Database : mcshop Target Server Type : MYSQL Target Server Version : 50553 File Encoding : 65001 Date: 2019-09-28 14:01:58 */ SET FOREIGN_KEY_CHECKS=0; -- ---------...
true
8a403f34b96916c2b5f93ce639b4b6b0b7090891
SQL
zislam040/REST-API-With-PHP
/demoapi/demoapi.sql
UTF-8
1,751
2.984375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jan 15, 2019 at 02:51 PM -- Server version: 10.1.37-MariaDB -- PHP Version: 7.3.0 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
true
507e2552810149da26f4f0d42ea0564f839f618c
SQL
mebelousov/antlr_psql
/src/test/resources/sql/select/559742b7.sql
UTF-8
225
2.9375
3
[ "MIT" ]
permissive
-- file:limit.sql ln:78 expect:true SELECT (SELECT n FROM (VALUES (1)) AS x, (SELECT n FROM generate_series(1,10) AS n ORDER BY n LIMIT 1 OFFSET s-1) AS y) AS z FROM generate_series(1,10) AS s
true
28f25bb22dc589161ae3126c26353d1c9d4fbb10
SQL
2502-feb25-java-org/alexander
/Coding-Challenges/Week 3/SQLChallenge.sql
UTF-8
2,047
4.59375
5
[ "MIT" ]
permissive
-- Create three tables create table Products ( productID int identity(1,1) primary key, productName varchar(50) not null, productPrice money not null ); create table Customers ( customerID int identity(1,1) primary key, firstName varchar(20) not null, lastName varchar(30) not null, cardNumber varchar(16) -- ca...
true
85644c55eee1cf4f21486aa9640afe068e61b652
SQL
Homainc/ISPLabs
/ISPLabs/SQL/GET_CATEGORY.sql
UTF-8
712
3.671875
4
[]
no_license
CREATE OR REPLACE PROCEDURE GET_CATEGORY( P_ID IN NUMBER, CATEGORY_NAME OUT VARCHAR2, RESULT_TOPICS OUT NOCOPY SYS_REFCURSOR) AS BEGIN SELECT NAME AS CATEGORY_NAME INTO CATEGORY_NAME FROM FORUM_CATEGORY WHERE ID = P_ID; OPEN RESULT_TOPICS FOR SELECT NA...
true
0076c2f7834473afab1f7608fa4582c7a663a94f
SQL
jnatkins/dbt-learn-jnatkins
/models/staging/stg_payments.sql
UTF-8
240
2.578125
3
[]
no_license
with payments as ( select * from {{ source('stripe','payment') }} ) select id as payment_id, orderid as order_id, paymentmethod as payment_method, status as status, amount / 100 as amount, created as created from payments
true
cc7ca463568fe7ce1fd3bda6f50c51b0f774f96d
SQL
jack8051/olc-database
/queries/album_with_longest_song.sql
UTF-8
672
3.828125
4
[]
no_license
-- SQL pro vypsani alba s nejdelsi pisnickou (vcetne interpreta) -- doplnen index na skladba.delka SELECT `interpret`.`nazev` AS `nazev_interpreta`, `album`.`nazev` AS `nazev_alba`, `album`.`datum_vydani`, `skladba`.`delka` AS `delka_skladby` FROM `album` INNER JOIN `album_skladba` ON `album_skladba`.`id_al...
true
f3b9c2c96a43d7db520bb5ac59192ddfaa2b1529
SQL
jrjr-randy/backoffice
/sql/build_new_db/prometheus_tables/cartons.table.sql
UTF-8
812
3.578125
4
[]
no_license
DROP PROCEDURE IF EXISTS table_create_prometheus_cartons; DELIMITER // CREATE PROCEDURE table_create_prometheus_cartons() BEGIN IF NOT EXISTS ( SELECT DISTINCT 1 FROM `information_schema`.`TABLES` WHERE `TABLE_SCHEMA` = DATABASE() AND `TABLE_NAME` = 'cartons' ) THEN CREATE TABLE `cartons` ( `...
true
ed38ecf8e363411a5d895b44c7f22849a82ff50b
SQL
JesseChavez/activerecord-jdbc-adapter
/test/db/db2/rake_test_data.sql
UTF-8
811
3.046875
3
[ "BSD-2-Clause", "LicenseRef-scancode-unknown-license-reference", "MIT" ]
permissive
CREATE TABLE EMPLOYEE ( EMPNO CHAR(6) NOT NULL, FIRSTNME VARCHAR(12) NOT NULL, MIDINIT CHAR(1), LASTNAME VARCHAR(15) NOT NULL, WORKDEPT CHAR(3), PHONENO CHAR(4), HIREDATE DATE, JOB CHAR(8), EDLEVEL SMALLINT NOT NULL, SEX CHAR(1), BIRTHDATE DATE, SALARY DECIMAL(9,2), BONUS DECIMAL(9,2), COMM ...
true
4dfa5b20fb571cd83b343909d21dba3a3a26204e
SQL
MkLHX/gladys-gateway
/src/gladys-gateway-server/migrations/sqls/20190528003318-add-backup-up.sql
UTF-8
643
3.46875
3
[ "Apache-2.0" ]
permissive
CREATE TABLE t_backup ( id uuid DEFAULT uuid_generate_v4() NOT NULL, account_id uuid NOT NULL, path character varying(255) NOT NULL, size integer NOT NULL, created_at timestamptz NOT NULL default now(), updated_at timestamptz NOT NULL default now(), is_deleted boolean DEFAULT false NOT NULL ...
true
ccfa6b0d2165a0417d9d32c9b9fc62fbf10a0492
SQL
tuanngo/openclinica_sqldatamart
/scripts/dm/mv_dm_study_ig_item_identifiers_indexes.sql
UTF-8
676
2.9375
3
[ "MIT" ]
permissive
CREATE UNIQUE INDEX dm_study_ig_item_identifiers_unique ON dm.study_ig_item_identifiers USING BTREE (item_group_id, item_ordinal_per_ig_over_crfv, item_multi_order_over_rsi); CREATE INDEX dm_study_ig_item_identifiers_item_id ON dm.study_ig_item_identifiers USING BTREE (item_id); CREATE INDEX IF NOT EXISTS dm_st...
true