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
b99633dcdd8ec2a1b28fb25c8d01114a90283029
SQL
Trisarko/momento2Web2
/animal.sql
UTF-8
2,627
3.15625
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.9.0.1 -- https://www.phpmyadmin.net/ -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 23-11-2020 a las 23:33:37 -- Versión del servidor: 10.4.6-MariaDB -- Versión de PHP: 7.1.31 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"...
true
e650a6c232a974df3cdb08267132260fa15aefa8
SQL
RestoreMonarchy/Marketplace-Web
/src/Database/Tables/ProductTransactions.sql
UTF-8
593
3.265625
3
[ "MIT" ]
permissive
CREATE TABLE dbo.ProductTransactions ( Id INT IDENTITY(1, 1) NOT NULL CONSTRAINT PK_ProductTransactions PRIMARY KEY, ProductId INT NOT NULL CONSTRAINT FK_ProductTransactions_ProductId FOREIGN KEY REFERENCES dbo.Products(Id), ServerId INT NULL CONSTRAINT FK_ProductTransactions_ServerId FOREIGN KEY REFERENCES dbo...
true
55c025bda92dac6d6baa4a7c369f33743061d569
SQL
liyuwei007036/smartCanteen
/sql/ic_card.sql
UTF-8
2,853
3.4375
3
[ "Apache-2.0" ]
permissive
/* Navicat Premium Data Transfer Source Server : mysql8.0 Source Server Type : MySQL Source Server Version : 80018 Source Host : 192.168.3.11:3306 Source Schema : smartcanteen Target Server Type : MySQL Target Server Version : 80018 File Encoding : 65001 Date: 25/03/...
true
72950c57e15e7b32275d911647bb2608ef4d24e3
SQL
Sean-Stilwell/competitionapp
/database/1_schema.sql
UTF-8
3,602
3.546875
4
[]
no_license
-- SQL statement to create the athlete list CREATE TABLE athletes ( id varchar(10), --10 digit id code athlName varchar(255), --255 letter name dob DATE, --10 digit date of birth eg "2000-06-05" gender varchar(1), --1 letter gender eg "...
true
abc7ae6255d6020ec9c77f165c36fca914c7db07
SQL
ounce-k/BI
/WorkingWithMultipleTables/Tasks/Task7_1.sql
UTF-8
308
4.4375
4
[]
no_license
--Show the count of orders made by each customer from France SELECT Customers.CustomerID, Customers.Country, COUNT(Orders.OrderID) AS OrdersCount FROM Customers LEFT JOIN Orders ON Customers.CustomerID = Orders.CustomerID WHERE Customers.Country = 'France' GROUP BY Customers.CustomerID, Customers.Country;
true
5d3ca23e16ec33f0db01f0f861233dc3881c5c49
SQL
sashakrava/chat6272737
/db.sql
UTF-8
517
2.703125
3
[]
no_license
CREATE TABLE `chat` ( `id` int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY, `id_author` int(11) NOT NULL, `text` text CHARACTER SET latin1 NOT NULL, `date` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; CREATE TABLE `users` ( `id` int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY, `login` varchar(30) CHARACT...
true
2a86baa34bbeca3f766e42882a0cf82ebd911aa2
SQL
ksemal/bamazon
/schema.sql
UTF-8
1,443
3.3125
3
[]
no_license
CREATE database bamazon; USE bamazon; CREATE TABLE products ( item_id INT NOT NULL AUTO_INCREMENT, product_name VARCHAR (100) NULL, department_name VARCHAR (100) NULL, price DECIMAL (10,2) NULL, stock_quantity INT NULL, PRIMARY KEY (item_id) ); INSERT INTO products (product_name, depart...
true
e145c551fe8dc7276bfa8e465a9e3e958cce9c6e
SQL
rekenaar/Backups
/storylines.sql
UTF-8
1,902
2.953125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.5.4.1deb2ubuntu2 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Apr 19, 2017 at 11:59 AM -- Server version: 5.7.13-0ubuntu0.16.04.2 -- PHP Version: 5.6.26-1+deb.sury.org~xenial+1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET...
true
eed9b7ce2abf55f7ec4111b071bfa7b20980c491
SQL
AliceMathews/bootcampX
/4_queries/11_total_assignments_duration.sql
UTF-8
127
3
3
[]
no_license
SELECT day, count(day) as number_of_assignments, sum(duration) as total_duration FROM assignments GROUP BY day ORDER BY day;
true
d6656b67b0b754a294bc315aff88403681a7feab
SQL
DAUpub/Text_03
/disk/loop.sql
UTF-8
147
2.875
3
[]
no_license
WITH RECURSIVE rec(n) AS /* テーブル名はrecursiveのrec */ ( VALUES(1) UNION SELECT n + 1 FROM rec WHERE n < 10 ) SELECT n FROM rec;
true
02746474ad94cd947e96e3d585da1dd62319865b
SQL
viniciussobral/PL-SQL
/PLSQL/exercicios2.sql
ISO-8859-1
5,236
3.015625
3
[]
no_license
--Exercicios 2-- --Sistema de calculo de financiamento de carros-- DECLARE V_COMPRA NUMBER := &VALOR_CARRO; V_ENTRADA NUMBER := &ENTRADA; V_PARCELAS NUMBER := &PARCELAS; V_JUROS1 NUMBER := 0; V_JUROS2 NUMBE...
true
50c94c9823e87245cc0a79aeca8449a0c4e81373
SQL
gustavobarbosa-web/rgb-teste
/.database/database.sql
UTF-8
10,663
3.265625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.4 -- https://www.phpmyadmin.net/ -- -- Host: db -- Tempo de geração: 13/05/2021 às 10:09 -- Versão do servidor: 10.1.48-MariaDB-1~bionic -- Versão do PHP: 7.4.13 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_...
true
9f82586a6e7007b7fbb1a04f3b4e6f058f92920f
SQL
agungmahariad/SIM_UKS
/db_uks.sql
UTF-8
10,564
3.140625
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.7.0 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: May 02, 2019 at 02:19 PM -- Server version: 10.1.25-MariaDB -- PHP Version: 7.1.7 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
true
e09fe3c95c5e1b92e7c8ea6d1b6b90b6b4fa03bd
SQL
Diogoemannuelrodrigues/JRCosmeticos
/target/classes/db/migration/V02__criando_tabela_pedido.sql
UTF-8
197
2.90625
3
[]
no_license
create table pedido( id integer primary key auto_increment, quantidade int not null, id_produto integer, constraint fk_id_produto foreign key (id_produto) references produto (id) );
true
4ac5c18dbdd45069cb7796edaea807bd44e5170b
SQL
zbetty/Lab4Task3
/server/database.sql
UTF-8
1,285
3.453125
3
[]
no_license
CREATE TABLE patient ( "ID" serial primary key, "firstName" text, "lastName" text, "DOB" text, "sex" text, "phoneNumber" text, "streetAddress" text, "city" text, "state" text, "zip" integer ); CREATE TABLE physician ( "npiID" serial primary key, "firstName" text, "lastName" text, "sex" text, "phoneNumbe...
true
808b926aae00d0e722171aa7d654f61458c420cd
SQL
yerin327/yerin
/web/src/main/resources/Dump20180723/myschool_ds_school_img_tx.sql
UTF-8
2,786
2.921875
3
[]
no_license
-- MySQL dump 10.13 Distrib 5.7.17, for Win64 (x86_64) -- -- Host: 127.0.0.1 Database: myschool -- ------------------------------------------------------ -- Server version 5.1.46-community /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESU...
true
1cd6fc1771821e3ffcb0faa0b01520ccf53a7e67
SQL
Numperposition/2016-DB-coursework-Beijing-subway-map-inquery-system
/beijingsubway_subline.sql
UTF-8
2,103
2.796875
3
[]
no_license
-- MySQL dump 10.13 Distrib 5.7.9, for Win64 (x86_64) -- -- Host: 127.0.0.1 Database: beijingsubway -- ------------------------------------------------------ -- Server version 5.7.13-log /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULT...
true
ef2d14e79eabcece3b74f347f0fccb278b1cd3b7
SQL
lchase/hub
/hub-api/bin/security_tables.sql
UTF-8
1,892
3.78125
4
[ "MIT" ]
permissive
CREATE TABLE Authority ( Id INT(11) PRIMARY KEY NOT NULL, Name VARCHAR(100) NOT NULL ); CREATE UNIQUE INDEX Authority_Id_uindex ON Authority (Id); CREATE TABLE User ( Id INT(11) PRIMARY KEY NOT NULL, Username VARCHAR(255) NOT NULL, Password VARCHAR(255) NOT NULL, FirstName VARCHAR(100) NOT NULL, LastNam...
true
64260280933d5f6fd19293867ab9074af6966261
SQL
janjagusch/halite-battlestation
/halite_battlestation/bigquery/datasets/benchmark/views/_matches_overview.sql
UTF-8
607
3.203125
3
[ "MIT" ]
permissive
SELECT agents.match_id, agents, results.halite, ranks.rank, matches.configuration, matches.tags, matches.seed, matches.inserted_at FROM `kaggle-halite.benchmark._matches_agent_player_index` AS agents LEFT JOIN `kaggle-halite.benchmark._matches_result` AS results ON agents.match_id = results.match_id AN...
true
3d19539b7ebdacdb909d1537e45ef24afcd3b653
SQL
59364202/test
/tools/installer/initdata/database/001_public/schema/3037_waterquality.sql
UTF-8
7,747
3.25
3
[]
no_license
-- Table: public.waterquality -- DROP TABLE public.waterquality; CREATE TABLE public.waterquality ( id bigserial NOT NULL, -- รหัสข้อมูลคุณภาพน้ำจากการวัดของสถานี waterquality_id bigint, -- รหัสสถานีตรวจวัดคุณภาพน้ำอัตโนมัติ waterquality_datetime timestamp with time zone NOT NULL, -- วันที่ตรวจสอบค่าคุณภาพน้ำอั...
true
d185a97c72a4dde6f57453e63e737ed0a88d0952
SQL
oldlie/z-shop
/doc/sql/article_agree.sql
UTF-8
301
2.75
3
[ "MIT" ]
permissive
-- 文章点赞记录 CREATE TABLE `article_agree` ( `id` BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, `article_id` BIGINT NOT NULL COMMENT '文章ID', `user_id` BIGINT NOT NULL COMMENT '用户ID', `create_at` DATETIME NOT NULL COMMENT '打分时间' ) COLLATE='utf8_unicode_ci' ENGINE=InnoDB ;
true
df4804643252e4c1f2d8d911aa5e29a22320fd11
SQL
piayonl/EmpTracker
/schema.sql
UTF-8
1,916
3.953125
4
[]
no_license
DROP DATABASE IF EXISTS employeeDB; CREATE database employeeDB; USE employeeDB; CREATE TABLE employeeDepartment ( department_id INT, department_name VARCHAR(30), PRIMARY KEY (department_id) ); CREATE TABLE employeeRole ( role_id INT NOT NULL, title VARCHAR(30), salary DECIMAL(19,2) NULL, department_id ...
true
6924b957d8a783ffac6e9bab8c7cde3cbc1df508
SQL
FatThompson/Database
/company-db-scripts/Assg_Oct17_query3.sql
UTF-8
249
3.40625
3
[]
no_license
/* Retrieve the social security number, first name, last name and birth dates of all employee who were born in 1972. */ SELECT ssn, fname, lname, bdate FROM employee /*WHERE bdate BETWEEN "1972-01-01" AND "1972-12-31";*/ WHERE bdate LIKE "1972-%";
true
7a2bbe4c996de916d9a62d9754600d6a6e6546f1
SQL
jdcsma/projavawebapp
/ch23/search-engine/database/create.sql
UTF-8
842
3.75
4
[ "MIT" ]
permissive
CREATE DATABASE SearchEngine DEFAULT CHARACTER SET 'utf8' DEFAULT COLLATE 'utf8_unicode_ci'; USE SearchEngine; CREATE TABLE UserPrincipal ( UserId BIGINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, Username VARCHAR(30) NOT NULL, UNIQUE KEY UserPrincipal_Username (Username) ) ENGINE = InnoDB; CREATE TABLE P...
true
25c3d359800bbf6c62c404042338eb47ff3e2f81
SQL
gavinjackson/junkcode
/eco_scrapy/eco3_query.sql
UTF-8
238
3
3
[ "Unlicense" ]
permissive
select day, date, type from eco_day where mid in (select mid from eco_month where pid in (select pid from eco_property where property_name = 'Ecocrackenback 3' and eid = (select max(eid) from eco_execution_run) ) ) order by date;
true
0329b55bf28dad97949ac584dd65d7f301ced034
SQL
knizhnik/imcs
/sql/sort.sql
UTF-8
913
2.890625
3
[ "Apache-2.0" ]
permissive
select cs_top_max(Close, 3) from Quote_get('IBM'); select cs_top_min(Close, 3) from Quote_get('IBM'); select cs_top_max_pos(Close, 3) from Quote_get('IBM'); select cs_top_min_pos(Close, 3) from Quote_get('IBM'); select Quote_project(q.*, cs_top_max_pos(Close, 3)) from Quote_get('IBM') q; select cs_sort(Close) from Quot...
true
61085cd6d5265aeb7a279ab7bf0cb51f0ad544e5
SQL
healthierjacobsen/vault
/Structure/public/tables/cdc_ost_demographics.sql
UTF-8
505
2.5625
3
[]
no_license
DROP TABLE IF EXISTS public.cdc_ost_demographics; create table public.cdc_ost_demographics ( "p2OrgID" integer not null constraint cdc_ost_demographics_pk primary key, before_after text, school_grounds text ); alter table public.cdc_ost_demographics owner to main; grant delete, insert, references, select, t...
true
b10839962dd92adfebb419aab9c39bd7a6fb2b22
SQL
JeremiePRepo/php-exercices
/site-cochon.local/_dev/comptaperso_local_01022019.sql
UTF-8
3,502
3.4375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.6.6deb4 -- https://www.phpmyadmin.net/ -- -- Client : localhost:3306 -- Généré le : Ven 01 Février 2019 à 06:00 -- Version du serveur : 5.7.25 -- Version de PHP : 7.0.33-0+deb9u1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_...
true
f85b173053ec379cac21350081eee71a0b6fce15
SQL
JusticeArbiter/First_Work
/build_out/sql/71_join/409_join.sql
UTF-8
83
2.671875
3
[]
no_license
select f1,g from int4_tbl a right join lateral generate_series(0, a.f1) g on true;
true
28c2a955bf828706a571f649afbf828168a05efe
SQL
niteshkamboj2811/SQL-LeetCode
/product-sales-analysis-ii/product-sales-analysis-ii.sql
UTF-8
114
2.734375
3
[]
no_license
# Write your MySQL query statement below SELECT product_id, SUM(quantity) AS total_quantity FROM sales GROUP BY 1
true
d8cf87f5306c6bef435ee69e4a8a6e00d064915b
SQL
isuvajitsahoo/Blood-Bank-Inventory
/Blood Bank Inventory/SQLQuery1.sql
UTF-8
871
2.921875
3
[]
no_license
create proc BBank.uspGetBloodBanks as begin select * from BBank.BloodInventory end create proc BBank.uspDeleteBloodInventory ( @ExpiryDate Date ) as begin delete from BBank.BloodInventory where ExpiryDate = @ExpiryDate end create proc BBank.uspEditBloodInventory ( @bId int, @bloodGroup varch...
true
96e375fac0d486d877e13cef36e64b096cc558d3
SQL
sbeparey/databases
/src/Northwind/SqlServer/Views/10. QuarterlyOrders.sql
UTF-8
309
3.5
4
[]
no_license
--DROP VIEW IF EXISTS QuarterlyOrders; --GO CREATE VIEW QuarterlyOrders AS SELECT DISTINCT Customers.CustomerId, Customers.CompanyName, Customers.City, Customers.Country FROM Customers RIGHT JOIN Orders ON Customers.CustomerId = Orders.CustomerId WHERE Orders.OrderDate BETWEEN '19970101' And '19971231';
true
fc43090b490f3294a8194f934a16f144ed5e4cfd
SQL
HL7/cqf-measures
/archived/content/in-progress/OpioidData-0.9.000.cql
UTF-8
317,188
2.8125
3
[]
no_license
library OpioidData version '0.9.000' using QDM version '5.3' codesystem "LOINC": 'urn:oid:2.16.840.1.113883.6.1' codesystem "SNOMEDCT": 'urn:oid:2.16.840.1.113883.6.96' code "Birthdate": '21112-8' from "LOINC" display 'Birthdate' code "Dead": '419099009' from "SNOMEDCT" display 'Dead' parameter "Measurement Period"...
true
0c8e02b26bad730eec6e29514de042ba8372925b
SQL
saif01/Rest-API-Sanctum-laravel-7
/public/DB File/rest-api.sql
UTF-8
8,076
2.890625
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 5.0.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Mar 04, 2021 at 12:35 PM -- Server version: 10.4.17-MariaDB -- PHP Version: 7.4.15 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIE...
true
df59ac1abdfaecb61edaa72ceea0ec20fefe1c5e
SQL
milemonson/Gecons
/structure.sql
UTF-8
2,975
3.828125
4
[]
no_license
DROP DATABASE IF EXISTS `gecons`; CREATE DATABASE `gecons` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_spanish_ci */; USE `gecons`; DROP TABLE IF EXISTS `admins`; CREATE TABLE `admins` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `name` varchar(191) COLLATE utf8mb4_spanish_ci NOT NULL, `password`...
true
67ec77fc392f81c686940655d0272b28535237c3
SQL
dzdykes/LibraryDbSQLDrill
/QueryExercises/SQLDrill6.sql
UTF-8
764
4.5625
5
[]
no_license
/* 6. Retrieve the names, addresses, and number of books checked out for all borrowers who have more than five books checked out. */ select brw.Name, brw.[Address], bl.BooksOut from Borrower as brw inner join (select CardNo, count(CardNo) as BooksOut from BookLoans group by CardNo) as bl on brw.CardNo =...
true
d5d9382ff4bd7fa5b7f156f0b83a8472b92aec8a
SQL
georgetown-cset/ai-definitions-for-policymaking
/analysis/citation_counts_by_dataset_ds_mag.sql
UTF-8
321
3.34375
3
[]
no_license
/* Do citation counts tend to be higher in any of the datasets? This is a standalone descriptive query. */ select coalesce(ds_times_cited, 0) = 0 zero_ds, coalesce(mag_times_cited, 0) = 0 zero_mag, count(*) count from oecd.all_citation_counts where ds_id is not null and mag_id is not null group by 1, 2...
true
49f2473b6ef28384a9e8855044c1b956aee5f92f
SQL
ThePatrickStar/sqlite-test-generator
/minimized/shell7.sql
UTF-8
288
2.984375
3
[]
no_license
CREATE TABLE f1(tn INTEGER PRIMARY KEY, x BLOB); CREATE TABLE f2(tn INTEGER PRIMARY KEY, x BLOB); INSERT INTO f1 VALUES(1, X'01020304'); INSERT INTO f1 VALUES(2, X'01000304'); INSERT INTO f1 VALUES(3, randomblob(200)); SELECT (SELECT x FROM f1 WHERE tn=1)==(SELECT x FROM f2 WHERE tn=1);
true
194f986d432e368240e2512d2904326ea57f7291
SQL
yefc/CBOE
/subprojects/Database/CoeDB/Oracle_Install_Scripts/sql/Patches/Patch 12.6.3/Function/fn_get_next_part_name.sql
UTF-8
345
2.546875
3
[]
no_license
prompt prompt Starting "fn_get_next_part_name.sql"... prompt create or replace function get_next_part_name return varchar2 is str varchar2(32000); begin select max(num)+1 into str from ( select to_number(substr(partition_name,2)) num from user_tab_partitions where table_name='COEFULLPAGE'); ...
true
b15c2100a852a9f697949c43555d72109c978ea4
SQL
nguyenkevin96/PrinterRMAInventory
/src/main/resources/schema.sql
UTF-8
2,296
3.578125
4
[]
no_license
DROP TABLE IF EXISTS printer; DROP TABLE IF EXISTS stage; DROP TABLE IF EXISTS printertype; -- Script for MySQL -- create table stage ( stageid int auto_increment primary key, stagename varchar(45) not null ); create table printertype ( printertypeid int auto_increment primary key, printername va...
true
25d590aa89c1f3598ae3519100b22e688dd79ca4
SQL
deepbaveja/cake-php-sample
/cakephp-sample-db.sql
UTF-8
1,230
3.3125
3
[]
no_license
/* SQLyog - Free MySQL GUI v5.15 Host - 5.1.33-community : Database - cakephp ********************************************************************* Server version : 5.1.33-community */ SET NAMES utf8; SET SQL_MODE=''; create database if not exists `cakephp`; USE `cakephp`; SET @OLD_SQL_MODE=@@SQL_MOD...
true
01fc222c9d558654f5197a60a1e9a757456b49e3
SQL
TahaKazan29/hrmsProject-Backend
/src/main/resources/data.sql
UTF-8
954,065
2.859375
3
[]
no_license
INSERT INTO cities VALUES (0,'Belirtilmedi'), (1, 'Adana'), (2, 'Adıyaman'), (3, 'Afyonkarahisar'), (4, 'Ağrı'), (5, 'Amasya'), (6, 'Ankara'), (7, 'Antalya'), (8, 'Artvin'), (9, 'Aydın'), (10, 'Balıkesir'), (11, 'Bilecik'), (12, 'Bingöl'), (13, 'Bitlis'), (14, 'Bolu'), (15, 'Burdur'), (16, 'Bursa'), (17, 'Çanakkale'), ...
true
d51c30be4e74e3007f1557fcf5d2b19a6d9b945c
SQL
ovaistariq/DBT3-scripts-for-MySQL
/queries/sqlserver/14.sql
UTF-8
442
3.234375
3
[ "Artistic-1.0" ]
permissive
-- @(#)14.sql 2.1.8.1 -- TPC-H/TPC-R Promotion Effect Query (Q14) -- Functional Query Definition -- Approved February 1998 :b :x :o SELECT 100.00 * SUM (CASE WHEN P_TYPE LIKE 'PROMO%%' THEN L_EXTENDEDPRICE*(1-L_DISCOUNT) ELSE 0 END) / SUM(L_EXTENDEDPRICE*(1-L_DISCOUNT)) AS PROMO_REVENUE FROM ...
true
988e4c9e368d984c03ebd672eda81dd20b7dc6fa
SQL
siagung/apo-inventory
/bin/com/apo/database/product_categories.sql
UTF-8
4,030
2.78125
3
[]
no_license
/* -- Query: select * from `apo_db`.`product_category` LIMIT 0, 1000 -- Date: 2011-11-12 16:43 */ INSERT INTO `product_category` (`category_id`,`category_name`,`category_desc`) VALUES (1,'Accessories',NULL); INSERT INTO `product_category` (`category_id`,`category_name`,`category_desc`) VALUES (2,'Attachments',NULL); I...
true
36db1062b2d7ce2707e0f62f0a2fd078ff304ee4
SQL
jpenaa18/Google-Case-Study-Project
/Data Cleaning/2021-02 data cleaning.sql
UTF-8
2,253
4.375
4
[]
no_license
/* Data cleaning in PostgreSQL. Keywords used: SELECT, DISTINCT, GROUP BY, WHERE, CASE, UPDATE, ALTER, CREATE, DATE_PART */ ------------------------------------------------------------------------------------------------------------------- -- Because I'll be deleting rows, I will make a copy of our table. A csv of th...
true
6e616b8d416f04281ff737ef5e50c57bbf0044f1
SQL
dev-potato/meetup-clone
/db/seedTables/eventsSeed.sql
UTF-8
399
2.78125
3
[]
no_license
create table if not exists events ( event_id serial primary key, group_id integer references groups(group_id), event_name varchar(200), event_description varchar(10000), start_date varchar(500), end-date varchar(500), venue_name varchar(200), venue_city varchar(200), venue_state varc...
true
f5abbed828112ff64de162bcdd593272e46ee3dd
SQL
hyuk0520/sqldb
/2019_1031.sql
UHC
5,944
4.59375
5
[]
no_license
--̺ ȸ /* SELECT ÷ | express (ڿ) FROM ͸ ȸ ̺(VIEW) WHERE (collection) */ SELECT 'TEST' FROM emp; DESC user_tables; SELECT table_name, 'SELECT * FROM' || table_name || ',' AS select_query FROM user_tables WHERE TABLE_NAME != 'EMP'; SELECT * FROM user_objects; --ں -- μȣ 30 ũų μ ȸ SELECT * FROM emp WHE...
true
4793348a5e12df227f15f0787d4392a115807149
SQL
Gunavantha/codeangular
/angular_four.sql
UTF-8
1,021
3.15625
3
[]
no_license
-- Dumping structure for table angular_four.user_details CREATE TABLE IF NOT EXISTS `user_details` ( `_id` int(11) NOT NULL AUTO_INCREMENT, `firstName` varchar(255) NOT NULL, `lastName` varchar(255) NOT NULL, `email` varchar(255) NOT NULL, `mobileNumber` varchar(255) NOT NULL, `status` varchar(255) NOT NUL...
true
2b17bf35f36e26b05997c39d546c1aecd20d94bd
SQL
SarveshSingh101/Microsoft-SQL-Server-And-TSQL-Course-For-Beginners
/Part 8 - Practical SQL Scenarios/Problem 4.sql
UTF-8
607
4
4
[ "MIT" ]
permissive
SELECT * FROM HumanResources.Employee SELECT * FROM Person.Person SELECT * FROM HumanResources.EmployeeDepartmentHistory SELECT * FROM HumanResources.Department SELECT CONCAT(p.FirstName, p.LastName) [Full Name], e.Gender [Employee Gender], d.[Name] [Department Name], edh.StartDate [Started On], edh.EndDate [E...
true
6e88b7ed9a7ebe5b0f83f73f23013d2c18bfa212
SQL
VictorFarfan98/MoneyManagerServiceapp
/src/sql/migration/1.0.8/001-update-main-team-model.sql
UTF-8
2,910
4.28125
4
[ "MIT" ]
permissive
use ${DB_MAIN}; CREATE TABLE IF NOT EXISTS TeamProfile ( Id INT UNSIGNED AUTO_INCREMENT NOT NULL, TeamId INT UNSIGNED NOT NULL, SpecialistId INT UNSIGNED, AccountabilityDay INT NOT NULL, AccountabilityTime TIME NOT NULL, `Status` SMALLINT UNSIGNED NOT NULL, PRIMARY KEY (Id) ) ENGINE=INNODB...
true
7461fea378b6e4261a4fc7013426f76c95e9dd28
SQL
sevendee7/C1220G2_TranHongGiaDong_Module3
/case_study/task6.sql
UTF-8
760
3.640625
4
[]
no_license
select dv.id, dv.ten_dich_vu, dv.dien_tich, dv.chi_phi_thue, ldv.ten_loai_dich_vu, hd.ngay_lam_hop_dong from dich_vu dv left join loai_dich_vu ldv on ldv.id = dv.id_loai_dich_vu left join hop_dong hd on hd.id_dich_vu = dv.id where (year(hd.ngay_lam_hop_dong) = 2019 and month(hd.ngay_lam_hop_dong) > 3) or year(hd.ngay_l...
true
1bb04f678ad9a31b5eb18af30338266363b59e12
SQL
co-in/php-freelansim.ru.268997
/db.sql
UTF-8
862
3.203125
3
[]
no_license
CREATE TABLE `proxy_list` ( `ip` CHAR(15) NOT NULL, `port` SMALLINT(6) UNSIGNED NOT NULL, `type_enum` TINYINT(1) UNSIGNED NOT NULL COMMENT 'Смотри класс Mapper', `hide_enum` TINYINT(1) UNSIGNED NULL DEFAULT NULL COMMENT 'Смотри класс Mapper', `country_enum` SMALLINT(3) UNSIGNED NULL DEFAULT NULL COMMENT 'Смотри кл...
true
a99a31f726849d7d1dbfbbce62613019a442b609
SQL
tommyiversonj/openmrs-config-pihemr
/configuration/pih/petl/jobs/labs/tb_lab_results/source.sql
UTF-8
18,377
3.84375
4
[]
no_license
### This query returns tb lab results ### Row per result ### To do add HPV results in the future ### note result no performed duplicates. But its rare to have result not performed ### for culture, smear and genexpert all at once (but if they are in same encounter it will duplicate) SET sql_safe_updates = 0; DROP TEMP...
true
ed123e9cc55758e7094b694d516cf3341f8b7e7a
SQL
connormcd/misc-scripts
/sql/drop.sql
UTF-8
912
2.953125
3
[ "LicenseRef-scancode-warranty-disclaimer", "Apache-2.0" ]
permissive
------------------------------------------------------------------------------- -- -- PLEASE NOTE -- -- No warranty, no liability, no support. -- -- This script is 100% at your own risk to use. -- ------------------------------------------------------------------------------- set autotrace off set verify off undefine ...
true
f5eadd5e067a410183b19b4a263fab2abfb6e321
SQL
apache/spark
/sql/hive/src/test/resources/data/scripts/q_test_init.sql
UTF-8
3,603
3.1875
3
[ "BSD-3-Clause", "CC0-1.0", "CDDL-1.1", "Apache-2.0", "LicenseRef-scancode-public-domain", "BSD-2-Clause", "LicenseRef-scancode-unknown-license-reference", "EPL-2.0", "CDDL-1.0", "MIT", "LGPL-2.0-or-later", "Python-2.0", "LicenseRef-scancode-generic-cla", "LicenseRef-scancode-free-unknown",...
permissive
-- -- Table src -- DROP TABLE IF EXISTS src; CREATE TABLE src (key STRING, value STRING) STORED AS TEXTFILE; LOAD DATA LOCAL INPATH "${hiveconf:test.data.dir}/kv1.txt" INTO TABLE src; -- -- Table src1 -- DROP TABLE IF EXISTS src1; CREATE TABLE src1 (key STRING, value STRING) STORED AS TEXTFILE; LOAD DATA LOCAL INP...
true
302cc900b54b5a455ddfda75cd3681cb5d9455a4
SQL
jingmingh94/Final
/Product_Weight.sql
UTF-8
701
3.46875
3
[]
no_license
USE finalproject; DROP TABLE IF EXISTS Product_Weight; CREATE TABLE Product_Weight ( PartNumber int, `ProductWeight` VARCHAR(30) NOT NULL, PRIMARY KEY ( PartNumber) ) AS SELECT DISTINCT PartNumber , `ProductWeight` FROM invoices WHERE PartNumber IS NOT NULL ORDER BY PartNumber; UPDATE invoice...
true
b47a0ddb97b65498ef0d9a536671fa74f53de82e
SQL
Rushi21-kesh/SQL-Basic
/SQL Work/06_type_of_join.sql
UTF-8
1,027
3.78125
4
[]
no_license
/* use emplpyee database */ use employee; /* Performing Joins : */ /* Syntax : select column_names from table1 join type table2 on table.column_X = table.column_Y - Inner join : return all comman records with respect to given conditions */ select emp.e_name,em...
true
ec043a418883a00fb8e829b8d9786f614b2a8f74
SQL
navula1/DE-100-days
/de100days/day_19/movie_rated.sql
UTF-8
840
2.734375
3
[]
no_license
-- https://www.guru99.com/database-normalization.html -- sqlite CREATE TABLE movie_rating ( full_names TEXT NOT NULL, physical_address TEXT NOT NULL, movie_rated TEXT NOT NULL, saluation TEXT NOT NULL, category TEXT NOT NULL ); INSERT INTO movie_rating (full_names, physical_address, movie_rated, ...
true
0aa4681a90f240400e01032f6b4184e0578801f8
SQL
dejangvozdenac/read-only-postgres
/src/test/regress/sql/create_am.sql
UTF-8
2,159
3.5
4
[ "PostgreSQL" ]
permissive
-- -- Create access method tests -- -- Make gist2 over gisthandler. In fact, it would be a synonym to gist. CREATE ACCESS METHOD gist2 TYPE INDEX HANDLER gisthandler; -- Drop old index on fast_emp4000 DROP INDEX grect2ind; -- Try to create gist2 index on fast_emp4000: fail because opclass doesn't exist CREATE INDEX ...
true
8adee75188475d5dd720792627313f09cce58e9a
SQL
mysema/rdfbean
/rdfbean-rdb/src/main/resources/h2.sql
UTF-8
1,142
3.9375
4
[]
no_license
CREATE TABLE language( id INT NOT NULL, text VARCHAR(256) NOT NULL, PRIMARY KEY(id) ); CREATE INDEX language_text ON language(text); CREATE TABLE symbol( id BIGINT NOT NULL, resource BOOLEAN NOT NULL, lexical VARCHAR(1024) NOT NULL, datatype BIGINT NULL, lang INT NULL, floatval DOUBLE NULL, da...
true
1555b0d1369eb0b950550c45656797632cb6c801
SQL
restcontmx/sqlviews
/category_reports.sql
UTF-8
1,146
3.6875
4
[]
no_license
CREATE MATERIALIZED VIEW cate_reports AS SELECT d.cate_id as id, d.cate_id as cate_id, d.cate_name as cate_name, a.location as location, a.move_date as move_date, b.move_deta_q as move_deta_q, b.move_deta_price as move_deta_price, b.move_deta_tax_value as m...
true
ed807538c5a49da3dc9aaf42a4f0df7af37716bc
SQL
prisma/prisma-engines
/schema-engine/sql-introspection-tests/tests/simple/cockroach/views/simple_view_from_one_table.sql
UTF-8
819
3.453125
3
[ "Apache-2.0" ]
permissive
-- preview_features=views -- tags=cockroachdb CREATE TABLE "User" ( id SERIAL PRIMARY KEY, first_name VARCHAR(255) NOT NULL, last_name VARCHAR(255) NULL ); CREATE VIEW "Schwuser" AS SELECT id, first_name, last_name FROM "User"; /* generator js { provider = "prisma-client-js" previewF...
true
b5241ca937af802ff51b8752f042c8572e9d3742
SQL
silence-do-good/stress-test-Postgres-and-MySQL
/dump/high/day24/select1519.sql
UTF-8
273
3.109375
3
[]
no_license
SELECT sen.name FROM SENSOR sen, SENSOR_TYPE st, COVERAGE_INFRASTRUCTURE ci WHERE sen.SENSOR_TYPE_ID=st.id AND st.name='Thermometer' AND sen.id=ci.SENSOR_ID AND ci.INFRASTRUCTURE_ID=ANY(array['2100_8','4066','3228','4100_7','1429','6088','3072','5100_1','4019','2086'])
true
a238c2a02b1897db685b5de43a92b3d75d72985f
SQL
aagarwal-gtr/DBSLabs
/dbslab6.sql
WINDOWS-1250
3,920
3.6875
4
[]
no_license
CREATE VIEW vrs AS SELECT ingredientid, name, inventory, inventory * unitprice AS value FROM ingredients i, vendors v WHERE i.vendorid = v.vendorid AND companyname = 'Veggies_R_Us'; SELECT * from vrs; SELECT name FROM vrs WHERE inventory > 100; SELECT name FROM ingredients i, vendors v WHERE i.vendorid ...
true
2dce8ee32e62f4026925fde5862d40a0984031af
SQL
Junboom/Programmers
/out/production/Programmers/skill/check/test/level4/Solution_보호소에서중성화한동물.sql
UTF-8
270
3.296875
3
[]
no_license
SELECT i.ANIMAL_ID, i.ANIMAL_TYPE, i.NAME FROM ANIMAL_INS i LEFT JOIN ANIMAL_OUTS o ON i.ANIMAL_ID = o.ANIMAL_ID WHERE i.SEX_UPON_INTAKE LIKE "Intact%" AND (o.SEX_UPON_OUTCOME LIKE "Spayed%" OR o.SEX_UPON_OUTCOME LIKE "Neutered%");
true
f06acdd3abc432099961a316b1ca782f5a4dd181
SQL
jobstoit/website
/dbc/test/0001.sql
UTF-8
653
2.796875
3
[]
no_license
-- 0001.sql TEST INSERT INTO sites (id , created_by, name) VALUES (101, 101, 'testsite'); INSERT INTO pages (id, site_id, uri_path, label) VALUES (101, 101, '/home', 'Home'), (102, 101, '/createrows', 'Create'); INSERT INTO rows (id, sequence, page_id) VALUES (101, 1, 101), (102, 2, 101), (103, 3, 101), (104, 1, 102...
true
665135e9188287e7e101c37ddd76e867a0682f04
SQL
Foxcunning1/somegood
/sql创建/cs_article.sql
UTF-8
1,519
2.984375
3
[]
no_license
# Host: localhost (Version: 5.5.53) # Date: 2017-08-07 20:00:21 # Generator: MySQL-Front 5.3 (Build 4.234) /*!40101 SET NAMES utf8 */; # # Structure for table "cs_article" # DROP TABLE IF EXISTS `cs_article`; CREATE TABLE `cs_article` ( `a_id` int(11) NOT NULL AUTO_INCREMENT, `a_cid` int(11) NOT NU...
true
4601921ec62e7b41159d4ee173553b5f5ed55781
SQL
Asha366/Shopping_kart
/database/kart.sql
UTF-8
11,541
2.90625
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.7.0 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jul 18, 2018 at 07:00 PM -- Server version: 10.1.22-MariaDB -- PHP Version: 7.0.18 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OL...
true
2900189b4ed408c63ed3dc8eebda185003117fdf
SQL
ssriha0/sl-b2b-platform
/MarketBackend/changelogs/ProdSupport/SUPPLIER/SL_5185_Followup_Queue_Changes.sql
UTF-8
786
3.1875
3
[]
no_license
create or replace view vw_pb_queue_follow_up as select `so_hdr`.`so_id` AS `so_id`,`so_hdr`.`buyer_id` AS `buyer_id`,`so_hdr`.`wf_state_id` AS `wf_state_id`,`so_hdr`.`so_substatus_id` AS `so_substatus_id`,`so_hdr`.`service_date1` AS `service_date1`,`wf_alais`.`sort_order` AS `sort_order`,`pb_reque`.`reque_date` AS `RE...
true
7af0d5fef7bab2fd284081f58378787c81039455
SQL
Hab1t1ca/habitica-clone
/DB/seed_file.sql
UTF-8
1,799
3.71875
4
[]
no_license
-- create Auth table CREATE TABLE auth_user ( authid TEXT, userid SERIAL PRIMARY KEY ) -- create user table CREATE TABLE IF NOT EXISTS users ( name TEXT, authID TEXT, userId SERIAL PRIMARY KEY, hp INTEGER, mana INTEGER, avatar TEXT, list TEXT[], inventory TEXT[], class TEXT[], lvl INTEGER, gold INTEGER, damage INT, q...
true
f1ec45243aa3a8e373ed520d19430b70700a49aa
SQL
YIHANCHUNG/NCTU_Database_project
/Data_Import_SQL/create_table_category.sql
UTF-8
369
3.5625
4
[]
no_license
CREATE TABLE category( category_id int NOT NULL, category_name text NOT NULL, primary key (category_id) ); load data INFILE 'US_category_id_def.csv' into table category CHARACTER SET latin1 fields terminated by ',' enclosed by '"' lines terminated by '\n'; alter table detail add foreign key ...
true
dccb2b4e2f40cd14903dd0c2187f1363dceb9bf7
SQL
AlexisLambois/GenesDiffusion
/script.sql
UTF-8
647
2.59375
3
[]
no_license
INSERT INTO form_race VALUES(50,'BLANCHE'); INSERT INTO form_race VALUES(38,'NOIR'); INSERT INTO form_race VALUES(37,'VERTE'); INSERT INTO form_race VALUES(0,'NA'); INSERT INTO form_cheptel VALUES(2,'PHILLIPE'); INSERT INTO form_cheptel VALUES(1,'JEAN'); INSERT INTO form_cheptel VALUES(78355888,'HENRY'); INSERT INTO f...
true
e09e7da798f4ca313ea3aed089e10f5cb80762fd
SQL
rafakrieger/senac-dd-2020-2-rafaelkrieger
/scripts/vacina.sql
UTF-8
1,155
3.328125
3
[]
no_license
SET SQL_SAFE_UPDATES = 0; DROP DATABASE IF EXISTS DBVACINA; CREATE DATABASE DBVACINA; USE DBVACINA; CREATE TABLE PESSOA ( IDPESSOA INT NOT NULL AUTO_INCREMENT , NOME VARCHAR (100) NOT NULL , DT_NASCIMENTO DATE , SEXO ENUM ('M', 'F') , CPF VARCHAR (11) , VOLUNTARIO BOOLEAN , PRIMARY KEY (IDPESS...
true
88333177719149d8d7bec82e9fbb745623ff76e4
SQL
orenzeki/CompEngineeringProjects
/CENG352 Database Management Systems/MP1/Answers/q15.sql
UTF-8
657
4.09375
4
[]
no_license
select fnl.airport_desc from (select ac.airport_desc, cnt + cnt2 as trfc from (select fr.dest_airport_code, count(*) as cnt from flight_reports fr where fr.is_cancelled = 0 group by fr.dest_airport_code) as incoming, (select fr.origi...
true
f5b4f2fdcb3205b10e7d174ea0fcaa8a036cdad6
SQL
baziyad48/temp
/dummy.sql
UTF-8
9,507
3.1875
3
[]
no_license
-- -------------------------------------------------------- -- Host: 127.0.0.1 -- Server version: 10.1.37-MariaDB - mariadb.org binary distribution -- Server OS: Win32 -- HeidiSQL Version: 10.1.0.5464 -- -----------------------------------------------...
true
f5cc2d4b00f0b376d27f22c0d70b77a7065403a2
SQL
stevemazanec/bamazon
/bamazon_db.sql
UTF-8
817
3.4375
3
[]
no_license
DROP DATABASE IF EXISTS bamazon_db; CREATE DATABASE bamazon_db; USE bamazon_db; CREATE TABLE products ( item_id INTEGER AUTO_INCREMENT NOT NULL, product_name VARCHAR(40), department_name VARCHAR (40), price DECIMAL (10,2) NULL, stock_quantity INTEGER NULL, PRIMARY KEY (item_id) ); INSERT INTO products (product_nam...
true
03b7b271c48b9bc4981b3a33a5aefb268a0465a8
SQL
liugu/gameplat
/install/main/wancms.sql
UTF-8
21,011
3.296875
3
[]
no_license
-- -------------------------------------------------------- -- -- 表的结构 `mygame_ad` -- CREATE TABLE IF NOT EXISTS `mygame_ad` ( `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, `title` varchar(80) DEFAULT NULL, `content` varchar(255) DEFAULT NULL, `description` varchar(255) DEFAULT NULL, `addtime` int(11...
true
1c8b4389584ef380398b78beff3ec47d8956ad99
SQL
olukoredebanjo/GroupProjectSelectorCoursework
/webtech.sql
UTF-8
2,022
2.953125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.6.5.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Apr 20, 2017 at 05:09 PM -- Server version: 10.1.21-MariaDB -- PHP Version: 5.6.30 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SE...
true
fb6cce624bac6955142de0be4bbf5fadf00e509e
SQL
sm07sw06/marina
/files/개발사업 산출물 템플릿/설계/SQL/tb_cctvdata.sql
UTF-8
1,006
3.34375
3
[]
no_license
-- Table: public.tb_cctvdata DROP TABLE public.tb_cctvdata; CREATE TABLE public.tb_cctvdata ( cctv_cd character varying(20) COLLATE pg_catalog."default" NOT NULL, send_time character varying(14) COLLATE pg_catalog."default" NOT NULL, photo bytea, photo_base64 text COLLATE pg_catalog."default", bo...
true
8f4db916b03e43b88b904f94f818ca49a2011ba9
SQL
joaorebelo92/CSD2204S2018
/Day6LogJR.sql
UTF-8
27,688
3.125
3
[]
no_license
MariaDB [(none)]> USE CSD2204S18; Database changed MariaDB [CSD2204S18]> show tables; +----------------------+ | Tables_in_csd2204s18 | +----------------------+ | c1 | | c3 | | client | | customer | | orders | | persons ...
true
30393d3753840379b5964f89255dbb13e039aa5a
SQL
Zhydyk/DriadaWebSite
/simpledata.sql
UTF-8
3,770
3.265625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.7.9 -- https://www.phpmyadmin.net/ -- -- Хост: 127.0.0.1 -- Час створення: Квт 11 2018 р., 14:41 -- Версія сервера: 5.7.20-log -- Версія PHP: 7.2.3 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_...
true
2ce684d5741b039d3c034d9cd409f4bd17202c17
SQL
fuquanlin/fishbone
/doc/db/base.sql
UTF-8
4,744
3.546875
4
[ "Apache-2.0" ]
permissive
/*Table structure for table `f_permission` */ DROP TABLE IF EXISTS `f_permission`; CREATE TABLE `f_permission` ( `id` INT(11) NOT NULL AUTO_INCREMENT, `permissioncode` VARCHAR(32) DEFAULT NULL, `permissionname` VARCHAR(32) DEFAULT NULL, `category` VARCHAR(32) DEFAULT NULL, `t...
true
055f00c4da6f98c03693af78bc8c17af48dc082e
SQL
openbadgefactory/salava
/resources/sql/metabadge/queries.sql
UTF-8
9,537
3.859375
4
[ "Apache-2.0" ]
permissive
--name: select-user-badge-by-assertion-url SELECT ub.id AS user_badge_id, bc.name, bc.image_file, ub.issued_on, ub.status, ub.deleted FROM user_badge AS ub JOIN badge AS badge ON (badge.id = ub.badge_id) JOIN badge_badge_content AS bbc ON (bbc.badge_id = badge.id) JOIN badge_content AS bc ON (bc.id = bbc.badge_content_...
true
1ec4e9dbacb616620f4e93d75328559ccb02baac
SQL
shrutitaware/Ace-the-Data-Science-Interview-by-Huo-Singh
/8.8_LinkedIn.sql
UTF-8
601
4.15625
4
[]
no_license
-- Step 1: Find all companies with duplicate listing based on title, description -- CTE- Rank by partitioning by company, title, description; order by porting date -- Step 2: To find duplicate entries, retrive companies having rank more than 1 -- Step 3: Count these companies WITH job_listing_ranks AS ( SELECT co...
true
59941cbae9f800ca6f753ab2949b43ae672085cf
SQL
cantei/aroundtheworld
/01_epi_followup_ipv.sql
UTF-8
1,387
3.984375
4
[]
no_license
# IPV เริ่มใช้เดือนธันวาคม 2558 ฉะนั้น เด็กที่เกิดตั้งแต่ 2015-08-01 ควรจะได้รับทุกราย เพื่อให้มีภูมิคุ้มกันทั้ง 3 types SET @startdate='2016-10-01'; SET @stoptdate='2017-09-30'; SELECT t2.hospcode,t2.person_id,t2.cid,t2.fname,t2.lname,t2.birth ,t2.age_day,t2.hno,substr(t2.villcode,7,2) as moo ,if(AGE_DAY >112 AND NO...
true
6890900ca6e87b096188e3924d963ffbfa4d6660
SQL
TeamHealthcare/sql_scriptsobj
/Sql Statements.sql
UTF-8
8,427
3.265625
3
[]
no_license
INSERT INTO insurancecarrier (Carrier, Address, Active) VALUES ('Aetna', '801 S. Harbor Dr. Orem, UT 84057', 1); INSERT INTO insurancecarrier (Carrier, Address, Active) VALUES ('United Health Care', '2341 Avenida La Plaza. Irvine, CA 92614', 1); INSERT INTO insurancecarrier (Carrier, Address, Active) VALUES ('Blue Cr...
true
307f9b926a50bf8589a00e125dd7d6f84d95a132
SQL
wkdghdrl1/Biz_403_06_Oracle
/관리자(2019-06-21-002)-DML DDL DCL 설명.sql
UTF-8
1,930
3.6875
4
[]
no_license
--관리자 질의 작성기 화면입니다. -- DBA(DataBase Admin) CREAT TABLE (DDL : Data Definition Lang) -- 이 Lang은 주로 DBA가 사용한다. -- 데이터 물리적인 어떤 상태를 변경(생성, 삭제)할 수 있기 때문에 -- 매우 주의를 해서 사용해야 한다. -- 데이터를 물리적으로 변경한다는 것은 -- 어떤 조건에 관계없이 다량의 데이터에 대하여 영향을 미치는 것을 의미 -- 일반사용자 (INSERT INTO DML : Data Manufulation Lang) -- 응용프로그래머 SELECT F...
true
3460728d2874d1c173c640df20d412af634988ac
SQL
cmikus6/09_SQL_Challenge_CJM
/Instructions/Part-1-Mini-Assignments_CJM/01-HW_CRUD_CJM/CRUD_CJM.sql
UTF-8
577
3.25
3
[]
no_license
-- Drop table if exists DROP TABLE firepower; --Show entire table as it exists within the most recent query SELECT * FROM firepower; --Remove rows with no reserve personnel delete from firepower where reservepersonnel = 0; --Add one fighter aircraft to every nation with none update firepower set fighteraircraft = 1...
true
56ff658e34b7af1bf82cb6ed2dc84e2aca536771
SQL
powerfulsheron/Cuitochette
/sql/cuitochette.sql
UTF-8
7,503
3.234375
3
[]
no_license
-- MySQL dump 10.13 Distrib 5.7.17, for Win64 (x86_64) -- -- Host: localhost Database: cuitochette -- ------------------------------------------------------ -- Server version 5.7.14 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;...
true
27035a844d15ee9fe38bacd16f1a91d175b863fd
SQL
DDimitrova90/C-Sharp-Databases-Basics
/Databases MSSQL Server Exam - 16 October 2016/Section2-DML04-Table-Creation.sql
UTF-8
755
3.78125
4
[]
no_license
CREATE TABLE CustomerReviews ( ReviewID INT, ReviewContent VARCHAR(255) NOT NULL, ReviewGrade INT, AirlineID INT, CustomerID INT, CONSTRAINT PK_CustomerReviews PRIMARY KEY (ReviewID), CONSTRAINT CH_ReviewGrade CHECK (ReviewGrade BETWEEN 0 AND 10), CONSTRAINT FK_CustomerReviews_Airlines FOREIGN KEY (AirlineID) REFERENCE...
true
1dbbcbdd25c46b43c1adb066ff3e83e234a10d5d
SQL
Harikachebrole/jala-sql-programs
/Assignment36.sql
UTF-8
240
3.359375
3
[]
no_license
select * from salespeople select * from customerloctn --Produce all the salesperson in London who had at least one customer there. select * from salespeople sp,customerloctn c where sp.scity ='London'and c.ccity='London' and sp.sid= c.cnum
true
ec0672a22389183ae34ac1e8581015845600adfd
SQL
a531227909/lingxidb
/management/demand_source_type.sql
UTF-8
429
2.765625
3
[]
no_license
DROP TABLE IF EXISTS demand_source_type; CREATE TABLE demand_source_type ( `demandSourceTypeId` int auto_increment PRIMARY KEY COMMENT '需求来源类型自增ID', `demandSource` varchar(16) NOT NULL COMMENT '需求来源类型名称' ) ENGINE=InnoDB DEFAULT CHARSET=utf8; insert into demand_source_type (demandSource) values ('自营签单'); insert int...
true
aa84d318761f89e65be8a6de8bd4af596239079f
SQL
LeeBaekHaeng/godsoft2016
/godsoft.com351/src/script2/oracle/dictionary/ALL_TAB_COLS_V1.0_20161122.sql
UTF-8
395
3.5625
4
[]
no_license
select rownum as RN , ALL_TAB_COLS.* , ALL_TAB_COMMENTS.* from ALL_TAB_COLS left outer join ALL_TAB_COMMENTS on ALL_TAB_COMMENTS.OWNER = ALL_TAB_COLS.OWNER and ALL_TAB_COMMENTS.TABLE_NAME = ALL_TAB_COLS.TABLE_NAME where 1 = 1 and ALL_TAB_COLS.OWNER = 'TEST' and ALL_TAB_COLS.DATA_TYPE = 'CLOB...
true
6bef0347d00776fb9131121a24072b28a10f8ac1
SQL
MaitRaidmae/AppAnalyzerPLSQL
/JAVAFX_CONTROLLER_SYNTH.sql
UTF-8
1,827
2.734375
3
[]
no_license
-------------------------------------------------------- -- DDL for Package JAVAFX_CONTROLLER_SYNTH -------------------------------------------------------- CREATE OR REPLACE EDITIONABLE PACKAGE "HUNDISILM"."JAVAFX_CONTROLLER_SYNTH" IS cursor cControllerChildren(p_controller varchar2) is (select * from b_app_chil...
true
6ed5cccaa507d94e697e7e83277153604c19b86e
SQL
himalayasingh-ds/Advance-SQL-Project
/mysql project 1 for BI.sql
UTF-8
6,615
4.25
4
[]
no_license
SELECT * FROM hr.`sql folder`; #1---query to display the names (first_name, last_name) using alias ---------- select first_name "first_name", last_name "last_name" from hr.`sql folder`; #2----query to get unique department ID from employee table ---------------- select department_id from hr.`sql folder`; ...
true
676a2c49160473121669ad8064a8b80360bb565b
SQL
UCLComputerScience/comp0034_SQL
/simpsons_queries_solutions.sql
UTF-8
598
4.15625
4
[]
no_license
--Write queries to answer the following questions: --1. What are the names of all teachers Bart has had? SELECT DISTINCT t.name FROM teachers t JOIN courses c ON c.teacher_id = t.id JOIN grades g ON g.course_id = c.id JOIN students s ON s.id = g.student_id WHERE s.name = 'Bart'; --2. How ma...
true
677c53624726c30e5bfaf98669cb3f0b84a14bfe
SQL
following5/ocde-addons
/tables/page.sql
UTF-8
549
3.234375
3
[]
no_license
SET NAMES 'utf8'; DROP TABLE IF EXISTS `page`; CREATE TABLE `page` ( `id` int(11) NOT NULL AUTO_INCREMENT, `slug` varchar(80) COLLATE utf8mb4_unicode_ci NOT NULL, `meta_keywords` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `meta_description` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `meta_so...
true
ce490a08e0066ed9ae3a435ae76e80043881a541
SQL
Xiaozhu-Zhang1998/School-Management-System
/SQL_files/09_SCHOOL_ MANAGEMENT_ SYSTEM_DDL_TRIGGER 5_ShowUpadatedGrade.sql
UTF-8
912
3.5
4
[]
no_license
-- Create Trigger 5 "ShowUpadatedGrade": Show upadated grade after the instructor update the grade CREATE TRIGGER ShowUpadatedGrade ON Take_S AFTER UPDATE AS BEGIN SET NOCOUNT ON; select i.TakeID as TakeID, s.StudentID as StudentID, s.FirstName +' '+ s.LastName as StudentName, ti.TeachID as TeachID...
true
44e690ccbbcac4be90e402c0b86f486f55dd8ab5
SQL
alldatacenter/alldata
/studio/micro-services/SREWorks/paas/appmanager/APP-META-PRIVATE/db/76_add_helm_meta.up.sql
UTF-8
1,187
3.28125
3
[ "MPL-2.0", "EPL-2.0", "BSD-3-Clause", "MIT", "LicenseRef-scancode-unknown-license-reference", "GPL-2.0-only", "Apache-2.0", "EPL-1.0", "LGPL-2.0-or-later", "JSON" ]
permissive
CREATE TABLE IF NOT EXISTS `am_helm_meta` ( `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID', `gmt_create` datetime DEFAULT NULL COMMENT '创建时间', `gmt_modified` datetime DEFAULT NULL COMMENT '最后修改时间', `app_id` varchar(64) NOT NULL COMMENT '应用 ID', `h...
true
c82a25c8fc27b699b9b9739c7dc584f7afc46200
SQL
blinohod/nibelite
/nibelite/share/sql/core/function-core.update_session.sql
UTF-8
382
2.875
3
[ "MIT" ]
permissive
CREATE OR REPLACE FUNCTION core.update_session(in_session_id character varying, in_ttl_seconds integer) RETURNS boolean AS $BODY$ update core.sessions set expire = now() + $2::text::interval where session_id = $1; select true $BODY$ LANGUAGE sql; COMMENT ON FUNCTION core.update_session(character varying, integer) I...
true