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
b86ae06e5cea740450d3fcd71539775ce1fd4b92
SQL
ywang89/leetcode
/solutions/1341-movie-rating.sql
UTF-8
1,035
4.53125
5
[]
no_license
/* ** Question: https://leetcode.com/problems/movie-rating/ */ -- method 1, Oracle/Postgres WITH full_table AS ( SELECT mr.movie_id, mr.user_id, mr.rating, mr.created_at, u.name, m.title FROM Movie_Rating mr INNER JOIN Users u ON mr.user_id = u.user_id INNER JOIN Movies m ON mr.movie_i...
true
87f69dc3cce9d2b670c53daf06d0bab462857c7d
SQL
InnesHerbst/BC-SMS
/SP_View_Campus_Stock.sql
UTF-8
314
3.765625
4
[]
no_license
CREATE PROCEDURE SP_View_Campus_Stock @campID int AS SELECT s.Stock_ID,p.Product_Name,p.Product_Price,s.product_Quantity,c.Category_Name,c.Category_Desc FROM Stock s INNER JOIN Product p ON (s.product_ID = p.Product_ID) INNER JOIN Category c ON (p.Category_ID = c.Category_ID) WHERE campus_ID = @campID
true
cc40a172484a96164b58b35dcde84bd78f3bc6e1
SQL
S-Brand5136/Droid-Reclaimers
/db/schema/02_droids.sql
UTF-8
414
2.78125
3
[]
no_license
DROP TABLE IF EXISTS droids CASCADE; CREATE TABLE droids ( id SERIAL NOT NULL PRIMARY KEY, sellers_id INTEGER NOT NULL REFERENCES users(id) ON DELETE CASCADE, name VARCHAR(255) NOT NULL, description text NOT NULL, price INTEGER NOT NULL, manufacturer VARCHAR(255) NOT NULL, model VARCHAR(255) NOT NULL, ...
true
daffee82f69a04b8c8045cc5f2dc6ce743e34a9c
SQL
dmiex/library
/src/main/resources/static/create_tables.sql
UTF-8
1,740
3.953125
4
[]
no_license
USE librarydb; create table authors ( id bigint auto_increment primary key, all_names varchar(30) null, first_name varchar(30) not null, last_name varchar(30) not null, sex int not null, country_id bigint not null ) engine=InnoDB ; create index FKln690lik2kyd7hatb4ndtwtdx on authors (country_id) ; ...
true
b4c5eccbcd8e7c70e062d572aa376f74e968a3da
SQL
xuweichao010/sites
/web/src/main/resources/db/migration/template.sql
UTF-8
1,047
3.671875
4
[]
no_license
-- 建表 /** CREATE TABLE IF NOT EXISTS `t_user` ( `id` BIGINT NOT NULL COMMENT '用户id', `account` varchar(32) NOT NULL COMMENT '登录账号', `password` VARCHAR(64) NOT NULL COMMENT '账号密码', `email` VARCHAR(64) COMMENT '邮箱', `phone` VARCHAR(11) COMMENT '电话', `name` VARCHAR(64) COMMENT '姓名', `sex` INT(1) COMME...
true
887b59f94eac49b4db902f1bb0b9bf91973afe23
SQL
radtek/abs3
/sql/mmfo/bars/Function/sem_role.sql
WINDOWS-1251
1,672
2.9375
3
[]
no_license
PROMPT ===================================================================================== PROMPT *** Run *** ========== Scripts /Sql/BARS/function/sem_role.sql =========*** Run *** = PROMPT ===================================================================================== CREATE OR REPLACE FUNCTION BA...
true
82e46aa5da678bd003bb2d91ffb4b3a1a4313df7
SQL
janainafortunato/Estudos_PHP_CSV
/ifig-2019-2-vuln-simple-systems-master/sistema-de-chamados/bd-mac.sql
UTF-8
1,054
3.546875
4
[]
no_license
drop database if exists web20192chamados; create database if not exists web20192chamados; use web20192chamados; -- DOWN drop table if exists problems; drop table if exists equipments; drop table if exists users; -- ENDDOWN -- UP create table users( id int primary key auto_increment, name varc...
true
529f34ab645d7cdfed0d8365aa3cfbca581a361c
SQL
Martin1987/myTestCode
/Pro_Oracle_SQL/chapter08_scripts/Listing_8_20.sql
UTF-8
240
2.78125
3
[]
no_license
PROMPT PROMPT Listagg function PROMPT set lines 120 pages 100 select listagg (country, ',') within group (order by country desc) from ( select distinct country from sales_fact order by country ) /
true
a9a5cb441d6a97d90d8d14e1c88d6544d18fc3de
SQL
kArTeL/Security
/FruitStore/DataBase/Inserts.sql
UTF-8
1,651
2.890625
3
[]
no_license
-- INSERTS ROLES, USERS, ETC, ETC ---- INSERT INTO role (name) VALUES("Administrator"); INSERT INTO role (name) VALUES("User"); -- INSERTS INITIAL USERS INSERT INTO user (username,password,email,delivery_address,role) VALUES("administrator","asp128","neilliga@gmail.com", "Carmiol 2 casa #25", 1); INSERT INTO user (us...
true
672bc4756bdb9523891300f19fb1527bb58d54cb
SQL
Assumeru/INFANL01-8
/src/nl/hro/infanl018/opdracht2/tables.sql
UTF-8
325
2.90625
3
[]
no_license
CREATE DATABASE `analyse 8`; USE `analyse 8`; CREATE TABLE IF NOT EXISTS `producten`( naam varchar(200) PRIMARY KEY, aantal int ) ENGINE=InnoDB; CREATE TABLE `veranderingen`( product varchar(200) REFERENCES producten(naam), verandering int ) ENGINE=InnoDB; INSERT INTO `producten` VALUES ('Mac Book'...
true
d669ad04b6cd1ffbb2b61f5469832e21f55993da
SQL
LowCodeAzure/Complete-blog-php
/complete-blog-php.sql
UTF-8
5,467
3.25
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Nov 22, 2018 at 07:31 AM -- Server version: 10.1.34-MariaDB -- PHP Version: 5.6.37 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OL...
true
a46b1cac6b918b7dcecd0f59d7809bbc4fbe88b1
SQL
anandeka/my-project
/DBScripts/MasterScripts/Master_Scripts_560.sql
UTF-8
4,390
3.109375
3
[]
no_license
declare fetchQryPFI CLOB := 'INSERT INTO pfi_d (internal_invoice_ref_no, invoice_ref_no, cp_name, inco_term_location, invoice_quantity, invoice_quantity_unit, invoice_amount, invoice_amount_unit, payment_term, cp_item_stock_ref_no, self_item_stock_ref_no, document...
true
13ee26d859b0841b6a28679a8bcbc8685e8409da
SQL
bo1658a/ultimate-postgresql-mysql
/postgresql/migrations/20200815143131_create_showcase_rule.up.sql
UTF-8
472
2.828125
3
[]
no_license
DROP TABLE IF EXISTS public.showcase_rule; CREATE TABLE public.showcase_rule -- schema public, 权限, 命名空间 ( id bigserial PRIMARY KEY, -- default value bigserial , primary key constrains name varchar(255), period int8range not null, -- not null constrains create_time tim...
true
2aac026bc616018bf35f470ae85bb448ef890952
SQL
IndraMuthaiah/Hibernate
/IdGenerators/src/main/resources/Queries.sql
UTF-8
948
3.5
4
[]
no_license
create database mydb; use mydb; create table Product( id int primary key,name varchar(20),description varchar(50), price decimal(8,3)); select * from mydb.Product; #use with @GeneratedValue(strategy = GenerationType.IDENTITY) create table mydb.employee(id int primary key auto_increment,name varchar(20)); select * fr...
true
f6e8aad002b247407d130029fa5d8f820021fc5e
SQL
mlight0/cpp
/db_scripts/tbl_users.sql
UTF-8
629
3.265625
3
[]
no_license
-- Table: public.tbl_users -- DROP TABLE public.tbl_users; --CREATE EXTENSION pgcrypto; --SELECT gen_random_uuid(); CREATE TABLE public.tbl_users ( users_user_id uuid PRIMARY KEY DEFAULT gen_random_uuid(), user_first_name character varying(50), user_middle_initial character varying(1), user_last_name char...
true
8761f28bb46c51bd6430d1086b39930da57836e1
SQL
satish92/FinancialAnalysis
/Hive/TopDividends.sql
UTF-8
214
3.453125
3
[]
no_license
--Top companies according to dividends payments.-- select a.* from FINANCIAL.STOCK_EXCHANGEDIVID a join (select max(STOCK_PRICE_DIVID) as Divid from FINANCIAL.STOCK_EXCHANGEDIVID)b on a.STOCK_PRICE_DIVID=b.Divid;
true
573d556f2d8e35587c994be0f7f6e83ce1c7c85c
SQL
SadeqR/SQL
/src/Database Systems Module labs/lab7.sql
UTF-8
729
3.3125
3
[]
no_license
CREATE TABLE loans ( lno number(3), empno number(4), type char(1), amnt number(8,2) ); INSERT INTO loans VALUES (23, 7499, 'm', 20000.00); INSERT INTO loans VALUES (42, 7499, 'c', 2000.00); INSERT INTO loans VALUES (65, 7844, 'm', 3564.20); SELECT * FROM loans; ALTER TABLE loans ADD outst number(8,2...
true
ffbf447d2dbd2b9355941c064df9f13cefecb78d
SQL
drmaluta/javarush_test_task
/src/main/java/JavaRushTestQuery_Mike_Kaplunov.sql
UTF-8
440
2.796875
3
[]
no_license
CREATE DATABASE IF NOT EXISTS `test`; CREATE TABLE `user` ( `ID` INT(8) NOT NULL AUTO_INCREMENT PRIMARY KEY, `NAME` VARCHAR(25) NOT NULL, `AGE` INT NOT NULL, `IS_ADMIN` BIT(1) NOT NULL DEFAULT false, `CREATED_DATE` TIMESTAMP DEFAULT CURRENT_TIMESTAMP); INSERT INTO `user` (`NAME`, `AGE`) VALUES ('Kola', '21')...
true
bc4bbf6ca89fc547ee3307bfe8cba335f3764f76
SQL
xjasteria/queueup
/install/queueup.sql
UTF-8
5,852
3.109375
3
[]
no_license
set names utf8; -- -- Database: `queueup` -- -- -------------------------------------------------------- -- -- 表的结构 `category` -- DROP TABLE `category`; CREATE TABLE IF NOT EXISTS `category` ( `id` int(11) NOT NULL, `label` varchar(100) NOT NULL, `description` varchar(100) NOT NULL, `updated_at` int(10) NOT N...
true
693cae04534986b4e1f4d9d9f26e95c12a7d242c
SQL
juancampo95/appMin
/src/assets/appmin_server/appmin_bd.sql
UTF-8
2,407
3.203125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.9.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jun 23, 2020 at 07:11 AM -- Server version: 10.4.8-MariaDB -- PHP Version: 7.1.32 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
true
0f8cc38a8c264e9b8a9779e6a8cbef8269cbc66d
SQL
Jirarit/bangbon_forklift
/sql/info/customer_locations.sql
UTF-8
1,279
3.734375
4
[]
no_license
-- CUSTOMER LOCATIONs CREATE SCHEMA IF NOT EXISTS info; DROP TABLE IF EXISTS info.customer_locations CASCADE; CREATE TABLE info.customer_locations ( id serial NOT NULL, customer_id integer NOT NULL, branch_name character varying(100) NOT NULL, zone_name character varying(100) NOT NULL...
true
049587c5b50b62c962b302f33e0f99c8c7b6d754
SQL
azlanqazi2012/mysqlqueires
/pfqueries.sql
UTF-8
1,127
2.9375
3
[]
no_license
truncate table flatprice_consolidated; insert into flatprice_consolidated SELECT 0, itemid, 'SP Richards', ALIAS, VENDOR_NAME, '', 0, SELLPRICE, SELLPRICE, 0, '', '', '', '', '' FROM flatfile.price_file; update flatprice_consolidated fp join spr_enhanced.productskus ps ON ps.name=fp.DistributorName and ps.sku=fp.sku ...
true
27564cbb3ca0fd939740d215a1d55538c0d4ea78
SQL
qtpeters/adam-work
/cvintl.sql
UTF-8
792
3.5
4
[]
no_license
CREATE TABLE IF NOT EXISTS Foundation ( ein LONG PRIMARY KEY, name TEXT NOT NULL, city TEXT NOT NULL, state TEXT NOT NULL ); CREATE TABLE IF NOT EXISTS Recipient ( id INTEGER PRIMARY KEY, name TEXT NOT NULL, city TEXT NOT NULL, state TEXT NOT NULL ); CREATE TABLE IF NOT EXISTS Giving_Category ( id ...
true
95762f2df2ade225471d2cb06cf8eb0806ab6b39
SQL
andreimacavei/minimarks
/schema.sql
UTF-8
393
2.75
3
[]
no_license
drop table if exists user; create table user ( user_id integer primary key autoincrement, username text not null, email text not null, pw_hash text not null ); drop table if exists bookmark; create table bookmark ( bookmark_id integer primary key autoincrement, author_id integer not null, url text not null, na...
true
1d91ba470e49bf2b3a663ce091bc57a7b11ace3a
SQL
pgarello/inmobiliaria
/script/estadistica.sql
ISO-8859-1
3,560
3.796875
4
[]
no_license
select * from contrato where fecha_desde < now() and fecha_hasta > now() -- CONTRATOS MAL CARGADOS !!! 11 contratos select * from contrato_novedad_pago where periodo_mes = 6 and periodo_anio = 2013 and id_novedad_tipo = 2 and monto = 0 -- SUMATORIA DE COMISIONES $ 24922.20 - lo que debera haber cobrado select sum(m...
true
a8685a92a98447a03beea47b4784fa6800116d3d
SQL
kengardiner/SoftwareGuildJavaFullStackWork
/MySQL-Select-Exercises/Exercise5.sql
UTF-8
144
2.6875
3
[]
no_license
/* Select the orders whose freight is more than $100.00 */ USE Northwind; USE Northwind; SELECT OrderID FROM orders WHERE Freight > 100;
true
603e8a65f7369154a008f7458a0adabf090ec2a1
SQL
Yangtze-Innovation/filmSys
/film.sql
UTF-8
4,755
3.125
3
[]
no_license
/* Navicat Premium Data Transfer Source Server : local_mysql Source Server Type : MySQL Source Server Version : 50729 Source Host : localhost:3306 Source Schema : film Target Server Type : MySQL Target Server Version : 50729 File Encoding : 65001 Date: 17/07/2020 12:...
true
bcc4714feff5cf2c4ccedc7adad7316d9fcf44d0
SQL
GrantShell/Employee_tracker
/db/seeds.sql
UTF-8
1,069
2.796875
3
[]
no_license
USE employee_db; INSERT INTO department (name) VALUES ("Human Resources"); INSERT INTO department (name) VALUES ("Marketing"); INSERT INTO department (name) VALUES ("Information Technology"); INSERT INTO department (name) VALUES ("Corporate"); INSERT INTO role (title, salary, department_id) VALUES ("Analyst", 70, 3);...
true
e6a11c5a4a1e20f39b49a9b1bce1ab1e50e6614d
SQL
OpencachingTeam/opencaching
/code/htdocs/doc/sql/tables/statpics.sql
UTF-8
386
2.546875
3
[]
no_license
SET NAMES 'utf8'; DROP TABLE IF EXISTS `statpics`; CREATE TABLE `statpics` ( `id` tinyint(3) unsigned NOT NULL auto_increment, `tplpath` varchar(200) NOT NULL, `previewpath` varchar(200) NOT NULL, `description` varchar(80) NOT NULL, `maxtextwidth` tinyint(3) unsigned NOT NULL default '0', PRIMARY KEY (`id`...
true
711991f4ea777c9e445a165bf5f9ef8165511b5f
SQL
cckmit/backend-1
/doit-risk/src/sql/history/20190116.sql
UTF-8
9,204
2.953125
3
[]
no_license
start transaction; insert into sysAutoReviewRule(uuid,disabled,createTime,updateTime,createUser,updateUser,remark,ruleType, ruleDetailType,ruleDesc,ruleValue,ruleResult,ruleStatus,ruleRejectDay,ruleSequence,ruleVersion,appliedTo,specifiedProduct) values(replace(uuid(), '-', ''),0,now(),no...
true
d88795f92c5546f9891465358ab00b9c2e326e36
SQL
krishars/Introduction-to-SQL-Server-Datacamp
/4.You've got the power/Insert.sql
UTF-8
804
3.5
4
[]
no_license
-- Create the table CREATE TABLE tracks( -- Create track column track VARCHAR(200), -- Create album column album VARCHAR(160), -- Create track_length_mins column track_length_mins INT ); -- Select all columns from the new table SELECT * FROM tracks; -- Create the table CREATE TABLE tracks( -- ...
true
f7d5cba470c51ae9cf435740026509e7a55cc224
SQL
JoshHumpherys/COS300-Database-Project
/create_tables.sql
UTF-8
2,057
4.03125
4
[]
no_license
DROP SCHEMA IF EXISTS `group1`; CREATE SCHEMA `group1`; USE `group1`; CREATE TABLE `customer` ( CustomerID INT PRIMARY KEY AUTO_INCREMENT, FirstName VARCHAR(45) NOT NULL, LastName VARCHAR(45) NOT NULL, Email VARCHAR(255) NOT NULL, Address VARCHAR(255) NOT NULL, HasMembership BOOLEAN NOT NULL DE...
true
04a895a60b83b31fcf96433fb61d178ba8aae3f6
SQL
kdunn926/psde
/raw_transform.sql
UTF-8
1,326
3.203125
3
[]
no_license
\timing on CREATE TABLE test.ts AS ( WITH tokenized AS ( SELECT regexp_split_to_array(rawrecord, '\|') as fields FROM test.raw_ts --LIMIT 10 ), valid AS ( SELECT fields[1]::int as sid, to_date(fields[2], 'DD/MM/YY') as measure_date, to_timestamp(fields[3], 'HH12:MIAM')::time as ...
true
85d5d6b6db97473fc75c6209e5d5c3795ee4d65c
SQL
jfeliperc/japp-rep
/japp/scriptDataBaseFin.sql
UTF-8
3,409
2.984375
3
[]
no_license
-- DROP TABLE nf_entrada; -- DROP TABLE item_nf_entrada ; -- DROP TABLE parcelas_nfe; -- DROP TABLE cfop_nfentrada; -- tabela:nfentrada ser� a tabela mestre da nf. CREATE TABLE IF NOT EXISTS nf_entrada ( id INT NOT NULL AUTO_INCREMENT, codigo VARCHAR(10) NOT NULL, notafiscal VARCHAR(15) NOT NULL, notafiscali...
true
0958deff234ec8477cc169e7bf809eb200884337
SQL
ankitjain28may/hackerearth-api
/src/Database/migrate.sql
UTF-8
961
2.6875
3
[ "MIT" ]
permissive
-- -- Database: `hackerearth` -- -- -------------------------------------------------------- -- -- Table structure for table `hackerearth_outputs` -- CREATE TABLE `hackerearth_outputs` ( `id` int(10) UNSIGNED NOT NULL, `code_id` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `async` varchar(255) COLLATE...
true
a26e875cbd002c5ed96f419c1db1adcac4179fe8
SQL
xio810/springboot_community_practice
/springboot_community-master/db/schema.sql
UTF-8
7,428
4.125
4
[]
no_license
drop database if exists springboot_community; create database springboot_community; use springboot_community; show tables; CREATE TABLE article ( id INT(10) UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT, regDate DATETIME NOT NULL, updateDate DATETIME NOT NULL, title CHAR(100) NOT NULL, `body` TEXT NOT ...
true
26a8be35b3577b8dae30831645cc96643477160f
SQL
AyaanaPS/RelationalDatabases
/finalWeek/final/pred/test3.sql
UTF-8
971
2.65625
3
[]
no_license
DELETE FROM cycles; DELETE FROM dependencies; DELETE FROM predicates; -- Dependencies: -- -- p8 - -------- -> p6 - -- \ / \ / \ -- v v \ / v -- p5 -> p4 -> p3 -> p2 -> p1 -> p7 -- -- Cycles: -- -- p4 -> p3 -> p2 -> p4 INSERT INTO predicates VALUES (1, 'p1',...
true
9ae3cc446ddbdd1445708b11fc213e2ce61643e8
SQL
IceHeartRes/servlettest
/src/main/resources/create_db.sql
UTF-8
343
2.765625
3
[]
no_license
CREATE USER testuser WITH PASSWORD '123456'; CREATE DATABASE test WITH OWNER = postgres ENCODING = 'UTF8' TABLESPACE = pg_default LC_COLLATE = 'ru_RU.UTF-8' LC_CTYPE = 'ru_RU.UTF-8' CONNECTION LIMIT = -1; GRANT CONNECT, TEMPORARY ON DATABASE test TO PUBLIC; GRANT ALL ON DATABASE test TO postgres; GRANT ALL ON DATABASE...
true
3a5437d58d6b2632f1ad6c4f0c63c3aecb75df26
SQL
Flaviohmm/GerencTCCs
/Base de Dados/QueryProceduresProfessor.sql
UTF-8
1,827
3.875
4
[]
no_license
CREATE PROCEDURE uspProfessorInserir @ProfessorNome nvarchar(70), @ProfessorCPF nvarchar(14), @ProfessorMatricula nvarchar(15), @ProfessorTelefone varchar(15) AS BEGIN INSERT INTO tblProfessor ( ProfessorNome, ProfessorCPF, ProfessorMatricula, ProfessorTelefone ) VALUES ( @ProfessorNome, @Professor...
true
6934ba0ee89cb6d454c4c6c2a1238545d7e88114
SQL
fduan0625/OTP-Tracking
/4b_otp_chargeback_after_signup.sql
UTF-8
3,013
3.25
3
[]
no_license
INSERT OVERWRITE TABLE fduan.otp_chargebacks_after_signup PARTITION (event_utc_date,event_utc_hour) select base.account_id ,su.cell_nbr ,base.country_code ,base.mop_id ,base.event_utc_ms_ts ,base.dimension_sk_map['pmt_mop_metadata_sk'] as pmt_mop_metadata_sk ,cast(base.degenerate_values_map['billin...
true
3a2ef7221053005ec6436fdc90055d85c721cbe9
SQL
JcGaara/SGA-PLSQL-OPE
/SGA-OPERACION/Tables/ETAPA.sql
UTF-8
2,018
2.8125
3
[]
no_license
CREATE TABLE OPERACION.ETAPA ( CODETA NUMBER(5) NOT NULL, CODDPT CHAR(6 BYTE), DESCRIPCION VARCHAR2(100 BYTE) NOT NULL, ABREVI VARCHAR2(20 BYTE) NOT NULL, PORCOSMOCLI NUMBER(8,2) DEFAULT 0 ...
true
4c27490d0a54d14bf61e4ba1e224b8204ff392ed
SQL
anantk17/project-X
/Users.sql
UTF-8
1,404
2.859375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 3.5.8.1deb1 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Feb 16, 2014 at 06:28 PM -- Server version: 5.5.34-0ubuntu0.13.04.1 -- PHP Version: 5.4.9-4ubuntu2.4 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLI...
true
baf2682f539cf16957ec5071c5d77d96eec81a6a
SQL
rexfordcode/codefights
/databases/countriesInfo.sql
UTF-8
558
3.5
4
[]
no_license
/* Your task is to return a new table that contains the number of countries in the given list, along with their average and total population, in columns titled number, average and total. Example For the following table countries name continent population Grenada North America 103328 Monaco Europe 38400 San Marino Eu...
true
2500fbeb2f74b82b1b72c7106b7fd8623e46cfe9
SQL
egraha11/IT2351
/Assignment Two/IT2352Assigment2Part2A.sql
UTF-8
386
3.3125
3
[]
no_license
-- ************************************************************* -- IT2351 Assigment 2 Part 2a - Evan Graham -- selecting columns from multiple tables using join using the -- item_id key -- ************************************************************* SELECT title, artist, unit_price, order_qty FROM items JOIN order_d...
true
833d1a1583797c5f45634b6e86b8a0d4552cbb5b
SQL
jordansilva1990/ExamenDAI
/bdcreditos.sql
UTF-8
4,777
3
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 11-07-2016 a las 01:07:30 -- Versión del servidor: 10.1.10-MariaDB -- Versión de PHP: 5.5.33 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT...
true
c2faa994be4bff19d4a8356da83e08fd397cfed2
SQL
hubson123/serwisogloszen
/serwis (2).sql
UTF-8
2,620
3.25
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.1.14 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: 03 Gru 2016, 18:59 -- Server version: 5.6.17 -- PHP Version: 5.5.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40...
true
7bbc5310951d30a9c855f3facee856d3024d4bd3
SQL
YasukoSasai/g-test
/postgres/volume/db.sql
UTF-8
12,370
3.5
4
[]
no_license
-- -- PostgreSQL database dump -- -- Dumped from database version 11.9 -- Dumped by pg_dump version 11.9 SET statement_timeout = 0; SET lock_timeout = 0; SET idle_in_transaction_session_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings = on; SELECT pg_catalog.set_config('search_path', '', fal...
true
64a86103a5b9ef89e6ffa55f6bbfb43f5d6fe5df
SQL
stanislasveronical/TP-BD
/BTS-SIO2/TPTousceau/creTablesTousceau.sql
UTF-8
6,108
3.765625
4
[]
no_license
/* ** Ce script créé les tables de la base TOUSCEAU SOUSCRIT (NUM, NOM, VILLE, TOTAL) VERSE (#NUM, DATE, MONTANT) ABONNE (#NUM, #CODE-R, DATE-D, DUREE) REVUE (CODE-R, NOM-R, PRIX) (TOTAL : total des sommes versées l'année précédente) */ /* création de la database */ ...
true
ebadb064827bfcc8fe2f5559e4ddbe0285ab4bb0
SQL
louis993546/Loft-API
/database/init.sql
UTF-8
3,078
3.703125
4
[]
no_license
-- TODO: find formatter to clean this things up CREATE SCHEMA IF NOT EXISTS loft; CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; CREATE TABLE IF NOT EXISTS loft.loft ( id uuid PRIMARY KEY DEFAULT uuid_generate_v4(), name text NOT NULL, join_code text NOT NULL, created_at timestamptz NOT NULL DEFAULT NOW(...
true
5b17ca4b54e2b32d4fc2108265483a0fac9c0adc
SQL
m-lab/mlab-vis-pipeline
/dataflow/data/bigquery/queries/base_uploads_ip_by_hour.sql
UTF-8
4,109
3.828125
4
[]
no_license
#standardSQL -- Finds upload median grouped by day and client_ip based on -- passed in timestamps. -- -- Note this assumes that IPs are masked with 0xffffffc0 -- -- Includes: -- * upload median -- -- {0} = start timestamp (>=) -- {1} = end timestamp (<) SELECT -- Counts count(*) AS upload_test_count, -- Gen...
true
227bf04f3c5211e089b1cb58fce67b41fee20175
SQL
FrankXiaoSMU2019/G2T1_LMS
/SQL files/lms_course(2).sql
UTF-8
12,713
3.375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.9.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1:3306 -- Generation Time: Nov 02, 2021 at 02:02 PM -- Server version: 8.0.18 -- PHP Version: 7.4.0 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHA...
true
0d932c30ddebab9b154a13ba5397348f436450c8
SQL
araishaftab5/Student-record-maintenance-system
/student.sql
UTF-8
3,807
3.296875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Sep 28, 2020 at 06:35 PM -- Server version: 10.4.13-MariaDB -- PHP Version: 7.4.7 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIEN...
true
41194720fa52931c70b35f663b2fc5b2569d7f4e
SQL
jabautista/GeniisysSCA
/src/main/resources/sql/procedures/copy_pol_wbond_basic_2.prc
UTF-8
1,695
2.828125
3
[]
no_license
DROP PROCEDURE CPI.COPY_POL_WBOND_BASIC_2; CREATE OR REPLACE PROCEDURE CPI.copy_pol_wbond_basic_2( p_new_policy_id gipi_bond_basic.policy_id%TYPE, p_old_pol_id gipi_bond_basic.policy_id%TYPE ) IS /* This procedure was created for the purpose of extracting information from gipi_wbond_basic ** an...
true
4c5ebfe01d06be1df1d7212749fb7146d5ba5aa8
SQL
Yogias11/E-Catering
/db_cart.sql
UTF-8
7,876
3.078125
3
[ "LicenseRef-scancode-unknown-license-reference", "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.7.0 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: 16 Jan 2018 pada 12.48 -- Versi Server: 10.1.25-MariaDB -- PHP Version: 5.6.31 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CH...
true
f564e1a69eb111d77f4770d2a670c501cea9bd85
SQL
RogerEC/CP-ICPC-Training
/Online-Judges/URI/SQL/2623.sql
UTF-8
304
3.59375
4
[]
no_license
-- Nome: 2623 - Categorias com Vários Produtos -- Nível: 4 -- URL: https://www.urionlinejudge.com.br/judge/pt/problems/view/2623 select p.name, c.name from products p join categories c on p.id_categories=c.id where p.amount > 100 and (c.id=1 or c.id=2 or c.id=3 or c.id=6 or c.id=9) order by c.id asc
true
6368286faaf3b953d7ebcf9eb3e33a116be09439
SQL
nicole-uchoa/banco-de-dados
/teste3.sql
UTF-8
3,447
3.71875
4
[]
no_license
DROP TABLE IF EXISTS demonstracoes_contabeis; DROP TABLE IF EXISTS relatorio_cadop; CREATE TABLE demonstracoes_contabeis( DT_REGISTRO DATE, REG_ANS VARCHAR(10), CD_CONTA_CONTABIL BIGINT, DESCRICAO TEXT, VL_SALDO_FINAL VARCHAR(20) ); CREATE TABLE relatorio_cadop( REGISTRO_ANS VARCHAR(10), CNPJ VARCHAR(20), RAZ...
true
c5b8b6b9b5ace85ec674ed5b772a4c5347462903
SQL
edouards/COMPTEBANCAIRE_CPI2_2013
/query.sql
ISO-8859-1
1,694
4.03125
4
[]
no_license
<!--Vrifie si le client existe dans la base de donne --> SELECT * FROM client WHERE cli_nom = "MACHUT" AND cli_prenom = "NICOLAS"; ##Affiche le dtail des comptes du client en fonction de son nom et prnom SELECT * FROM compte WHERE com_numero IN (SELECT pos1_comNum FROM posseder1 WHERE pos1_idcli = (SELECT cli_id FROM...
true
6c585f3287db1a422996b8a3ec3de9f40611ab3f
SQL
VovaArtWPShalavylo/Databases
/LAB11/lab11.sql
WINDOWS-1251
954
3.203125
3
[]
no_license
use Tour_firm; --Begin Transaction Transaction1; -- Create table TransTable1( -- id int, -- name varchar(50) -- ) -- insert into TransTable1 -- values(1, 'Vova') --commit; --Select TransTable1.id , TransTable1.name --from TransTable1 --Begin transaction Transaction2; -- select top(2) * from H...
true
1289f27a4bb6a2c57f5573d4338c83dc9d3cfbe0
SQL
huriahar/CSC343-Databases
/assignment2/data/q4.sql
UTF-8
3,319
4.125
4
[]
no_license
SET SEARCH_PATH TO parlgov; drop table if exists q4 cascade; -- You must not change this table definition. CREATE TABLE q4( country VARCHAR(50), num_elections INT, num_repeat_party INT, num_repeat_pm INT ); TRUNCATE q4; -- You may find it convenient to do this for each of the views -- that define your intermediate...
true
769a73804bf6e188e261f467adb0a57967981251
SQL
Rohitraj0728/gyansagerweb
/table.sql
UTF-8
1,320
3.03125
3
[]
no_license
CREATE TABLE `user`( `Sch` INT(15) NOT NULL PRIMARY KEY, `Name` VARCHAR(20) NOT NULL, `email` VARCHAR(50) NOT NULL, `Password` VARCHAR(50) NOT NULL, `Mobile` INT(10) NOT NULL, `Gender` ENUM('Male', 'Female') NOT NULL, `role` VARCHAR(10) NOT NULL ) ENGINE = InnoDB DEFAULT CHARSET = la...
true
3bb47c6b2d0f20f9b39ffcda5a9d16d9abba2d7e
SQL
sramachandran/SQLPractice
/first and last day of month.sql
UTF-8
436
3.21875
3
[]
no_license
use AdventureWorks2017 --End of current Month select EOMONTH(getdate()) --replace with any date field for any day of month --First day of current month select dateadd(day,1,EOMONTH(getdate(),-1)) --First day of month of any date select DATEADD(mm, DATEDIFF(mm, 0, GETDATE()), 0) --first monday o each month sele...
true
b1c955b4529ce8f16768571157597a3f204a3b3c
SQL
Natt7/JINSHANG
/schema/T_TM_CHECK_GOODS_LOG.sql
UTF-8
3,650
2.8125
3
[]
no_license
CREATE SCHEMA T_TM_CHECK_GOODS_LOG_schema SOURCE TYPE CSV FIELDS( "request_sn" type str, "sys_id" type str, "dept_id" ...
true
6d154a45bf83b47333d3e97cc48efb4371ed9552
SQL
TalhaJadoon/KOREN-Project
/catalog.sql
UTF-8
9,091
3.171875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.3 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: Dec 29, 2020 at 01:13 AM -- Server version: 10.4.14-MariaDB -- PHP Version: 7.2.34 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIE...
true
d41b526fc749aef7366fb2159ffc07a89501bbcf
SQL
tam003/QuanLySinhVien
/csdl_quanlysinhvien.sql
UTF-8
4,032
3.25
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Máy chủ: 127.0.0.1 -- Thời gian đã tạo: Th12 09, 2020 lúc 06:08 PM -- Phiên bản máy phục vụ: 10.4.14-MariaDB -- Phiên bản PHP: 7.4.9 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHAR...
true
ddf39b7b57b5ddd0aecc5c96f4bc29206fe94699
SQL
danielSanchez98/Redflix-Java-Swing
/bd_script/redlifxBD_script.sql
UTF-8
8,232
3.4375
3
[ "MIT" ]
permissive
DROP DATABASE IF EXISTS redflix; CREATE DATABASE redflix; USE redflix; create table if not exists director( id_director int primary key auto_increment, nombre varchar(20), apellido varchar(20), nacionalidad varchar(40) ); create table if not exists contenido( id_contenido int not null primary key au...
true
f838ccb9544c7d77a6841d58415585b26ae6497d
SQL
bishoybassem/expense-tracker
/tracker/src/main/resources/db/tracker_v1-01-Add transaction table.sql
UTF-8
233
2.59375
3
[]
no_license
CREATE TABLE tracker_v1.transaction ( id UUID PRIMARY KEY, owner_id UUID NOT NULL, transaction_type BOOLEAN NOT NULL, amount DECIMAL(20, 2) NOT NULL, category VARCHAR(30), transaction_date DATE NOT NULL, comment TEXT );
true
b43b5e70356df9dcfec37bc7d913de8432486d97
SQL
9vinny/cw_api
/db/db_creation.sql
UTF-8
7,127
3.5
4
[]
no_license
CREATE DATABASE IF NOT EXISTS charity_wallet; use charity_wallet; CREATE TABLE IF NOT EXISTS donor ( donor_id INTEGER AUTO_INCREMENT PRIMARY KEY, name VARCHAR(255) NOT NULL, username VARCHAR(255) NOT NULL UNIQUE, activation_date DATETIME NOT NULL, donation_cycle_start_date DATETIME, last_logge...
true
8c7a241115dcb7d979061b584dda9abec8332879
SQL
bashierelfergani/SqlProjects
/TestQueries.sql
UTF-8
866
3.609375
4
[]
no_license
/* This script populates the Testing of the Gift Horse LLC Database Written by Bashier Elfergani on October 18 2018*/ -- Test Query 1 SELECT ProdID, ProdName, ProdDesc, ProdPrice FROM Products ORDER BY ProdID -- Test Query 2 SELECT ProdID, ProdName, ItemID, ItemDesc, ItemQty FROM Products INNER JOIN BasketContents ...
true
958a5897946a8608f1bd00c000bcfa08988521b8
SQL
BrunoTroisi/NLP
/crypto-sentiment-analysis/db.sql
UTF-8
29,531
2.765625
3
[]
no_license
-- MySQL dump 10.13 Distrib 8.0.25, for Win64 (x86_64) -- -- Host: 127.0.0.1 Database: nlp -- ------------------------------------------------------ -- Server version 5.5.5-10.4.21-MariaDB /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESU...
true
2a28383f2205fb393900eba7c3fd0b54c172f2ad
SQL
Adub238/New-HW-Repo
/JudithPCHW/09-SQL/code/postgresschemacode.sql
UTF-8
1,070
3.359375
3
[]
no_license
DROP TABLE IF EXISTS departments; DROP TABLE IF EXISTS dept_emp; DROP TABLE IF EXISTS dept_manager; DROP TABLE IF EXISTS employees; DROP TABLE IF EXISTS salaries; DROP TABLE IF EXISTS titles; CREATE TABLE departments( dept_no VARCHAR(4) NOT NULL, dept_name VARCHAR(20) NOT NULL ); CREATE TABLE dept_emp( emp_no IN...
true
341c4f6e3066975ce313ec24c9df3b84ad793c49
SQL
arjenpdevries/arjenpdevries.github.io
/random/list-cte.sql
UTF-8
596
3.828125
4
[]
no_license
-- -- CTE to convert table to list -- -- Credits: -- https://www.sqlmatters.com/Articles/Converting%20row%20values%20in%20a%20table%20to%20a%20single%20concatenated%20string.aspx create table vs (v varchar); insert into vs (values ('f1.parquet'), ('f2.parquet'), ('f3.parquet')); with recursive vl as ( select ...
true
6c3ce9d1a0d8009f3d7451afe3692fcc931b0e46
SQL
itikizera/SQL-querys
/IMPORTAÇÃO QUERYS - EQUIPAV.sql
UTF-8
19,788
2.984375
3
[]
no_license
--MODELO PARA IMPORTAÇÃO FOPAG /*--------------------------- | FUNCIONARIOS - SRA | ---------------------------*/ (SELECT FUN.cvCodFil AS RA_FILIAL, RIGHT(FUN.ccVarFun,7) AS RA_MAT, (CASE FUN.cvCodCdc WHEN '2273' THEN '020101008' WHEN '2260' THEN '030101001' WHEN '2253' THEN '020201001' WHEN '2271' THEN '0...
true
6a38a6ac9722608e2cbb8eee9c97279e6b861d85
SQL
Nicolasribot/PG-sessions-2016
/pgparallel/stats1.sql
UTF-8
2,312
2.765625
3
[]
no_license
-- launches series of queries with sample tables and different workers values set max_parallel_workers_per_gather = 6; explain ANALYSE select p.id as idparc, c.gid as idcarreau, p.annee, clock_timestamp() AS creation_time, st_intersection(p.geom, c.geom) as geom from parcelle_sample1 p join carreau_sample1...
true
de61c495871cc6a55f8a097c79b2580fe999d262
SQL
srtimsina/ITIMS
/itims.sql
UTF-8
10,957
2.75
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.5.2 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Jan 17, 2017 at 01:24 PM -- Server version: 5.7.9 -- PHP Version: 5.6.16 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /...
true
e6e7ce01dc0525dde144eda85b2b4c1ad2975355
SQL
PrzemyslawMorski/advanced-databases
/etap 5/zapytania - column storage/rentals_from_a_city.sql
UTF-8
146
3.203125
3
[]
no_license
select title, c.city from customer_column_storage c join rental_column_storage r on c.customer_id = r.customer_id order by c.city, title;
true
257fc8a69683385afb403ec0fef049cc0c7116f3
SQL
DivXor/epamRD_quiz_form
/sql/db.ddl
UTF-8
2,804
3.875
4
[]
no_license
CREATE TABLE QUIZ_ENGINE.ANSWERS ( ID INTEGER NOT NULL , TITLE VARCHAR2 (200) NOT NULL , TYPE VARCHAR2 (20) NOT NULL , ANSWER_ORDER INTEGER NOT NULL , QUIZZES_ID INTEGER NOT NULL ) ; ALTER TABLE QUIZ_ENGINE.ANSWERS ADD CHECK ( TYPE IN ('many', 'one')) ; ALTER TABLE QUIZ_ENGINE.ANSWE...
true
213f0ef46faa40200afa74959cff2273e7249256
SQL
houmenghui/es-demo
/es-mysql/init.sql
UTF-8
2,293
2.78125
3
[]
no_license
INSERT INTO sys_config(param_key, param_value, remark) VALUE ('agentApi2_login_token_ttl', '2592000', '代理商api2登陆有效时间,单位秒'), ('agentApi2_merchant_quality_search_cur_month_trans_money', '50000', '优质商户 本月交易金额>=x元'), ('agentApi2_merchant_active_search_trans_day', '30', '活跃商户 近x天交易笔数>=x笔,且交易金额>=x元--天数'), ('agentApi2_merchan...
true
84dd866d2c0c40e24f5a7b632d420af45b0721e9
SQL
charlieegan3/photos
/migrations/000023_create_locations_tables.up.sql
UTF-8
2,878
4.25
4
[]
no_license
CREATE SCHEMA locations; -- importers are the names of endpoints which process locations data CREATE TABLE locations.importers ( id SERIAL NOT NULL PRIMARY KEY, name text CONSTRAINT name_present CHECK ((name != '') IS TRUE), created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(), updated_at TIMESTAMPTZ NOT NULL DEFAULT...
true
99810c41aa3651e6372c35d97928abfac0bd4fad
SQL
SISE-Web-Development-Environments/assignment-3-2-v2-dor_marina
/assignment-3-2-dor_marina/codes/sql scripts/INSERT INTO FamilyRecipesDor2.sql
UTF-8
1,761
2.5625
3
[]
no_license
INSERT INTO FamilyRecipes ([user_id],author,recipe_name,durationTime,[image],vegetarian,vegan,gluten,ingredients,instructions,portions,usually_prepared,main_country) VALUES(6,' Ada Elkabetz', 'spaghetti bolognese', 135, 'https://res.cloudinary.com/dnbh9xw8s/image/upload/v1591610119/Dor%20Family/spaghetti-bolognese.jpg'...
true
57761f9201b57253323f62f7565b73ab9c1de90e
SQL
EDlZo/covid.htc.github.io
/learnphp-master/13_php/sql/registers.sql
UTF-8
1,785
2.796875
3
[]
no_license
-- Delete Table If Exists DROP TABLE IF EXISTS registers ; -- Create Table CREATE TABLE registers ( id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY, activity_id INT NOT NULL, person_id INT NOT NULL, paid INT, created_at DATETIME DEFAULT CURRENT_TIMESTAMP ); -- Insert registers data INSERT INTO registers ( activity_...
true
d9601acc9ee832ce94ac8074dfc9c96f7b1a9216
SQL
DurangoJake/SQL-Homework
/SQL Homework/EmployeeSQL/homework2.sql
UTF-8
5,018
4.3125
4
[]
no_license
CREATE TABLE "departments" ( "dept_no" varchar(5) NOT NULL Primary Key, "dept_name" varchar(30) NOT NULL ); select * from "departments"; CREATE TABLE "dept_emp" ( --"pk_id" serial Primary Key, "emp_no" int NOT NULL, "dept_no" varchar(5) NOT NULL --Foreign Key ("dept_no") Refere...
true
1ef505d26014b289005bba041a93574e1098e5d3
SQL
SKIIII/zm-1
/zymember/install/member_collect.sql
UTF-8
1,013
3.03125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.5.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: 2019-01-17 05:25:20 -- 服务器版本: 5.7.11 -- PHP Version: 5.6.19 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; -- -- Database: `phpcmsv9` -- -- --------------------------------------------...
true
a33d512aa42095e9ce04b840c0a2404d27807db3
SQL
akayueh/zabbix-misc
/MySQL-Scripts/ResetZabbix2.sql
UTF-8
914
2.578125
3
[]
no_license
use zabbix; SET FOREIGN_KEY_CHECKS = 0; SET SQL_SAFE_UPDATES = 0; UPDATE zabbix.triggers SET value = 0 where value = 1; UPDATE zabbix.events set value =0 where value = 1; truncate table zabbix.events; optimize table zabbix.events; truncate table escalations; optimize table escalations; truncate table alerts; ...
true
23255412f1267e834fe30a78527dad1defbeecbc
SQL
smussergey/SystemWhatWhereWhenServlet
/src/main/resources/data/populate.sql
UTF-8
5,297
2.984375
3
[]
no_license
CREATE DATABASE IF NOT EXISTS `system_what_where_when_db` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci */; USE `system_what_where_when_db`; -- MySQL dump 10.13 Distrib 8.0.15, for Win64 (x86_64) -- -- Host: localhost Database: system_what_where_when_db -- --------------------------------------...
true
624539e4bf4e39e3d97e65cc3c33573653fe5624
SQL
alexeykuzhelev/akuzhelev
/sqlScripts/DevicesPeopleGroupByAggregate.sql
UTF-8
1,060
4.1875
4
[ "Apache-2.0" ]
permissive
create table devices( id serial primary key, name varchar(255), price float ); create table people( id serial primary key, name varchar(255) ); create table devices_people( id serial primary key, device_id int references devices(id), people_id int references people(id) ); insert into ...
true
8adfbb5e87b5bce7f315cf05bc735bb1ac51d83c
SQL
cvranjith/misc
/mick/sess.sql
UTF-8
499
3.359375
3
[]
no_license
undef sid set pages 200 col name form a30 col username form a12 col sid form 999 col owner form a12 col object form a20 col type form a10 prompt prompt Objects Accessed per Session prompt select b.* from v$access b where b.sid = &&sid / prompt prompt Memory per Session prompt select a.sid, a.username, c.name, b.va...
true
ef0ba24eeda423d21d1252fa4b8b7e907af6651c
SQL
sgmsgood/query
/1105_PL_cursor/test_select1.sql
UHC
1,370
4.03125
4
[]
no_license
-- ȣ Է¹޾ , , , Ի, μȣ ȸ -- , 2000 ̸̶ * 2 Ͽ ϰ -- μȣ 10, 20̶ Ի -- -- ׷ ʴٸ, -- ϼ. set verify off set serveroutput on accept empno prompt 'ȣ Էϼ:' declare i_empno emp.empno%type := &empno; ename emp.ename%type; sal emp.sal%type; job emp.job%type; hiredate emp.hiredate%type; deptno emp.deptno%type; date_format...
true
57cddf7d81aa5648e3920e6f70da8223ae7e2fdd
SQL
mysql-oracle/Mastering-Oracle-SQL-and-SQLPlus
/chapter08/08-37.sql
UTF-8
102
2.578125
3
[]
no_license
select deptno, job , count(empno) headcount from employees group by ROLLUP(deptno, job);
true
55414d2c84260167a2f14abd176f2388acc3a66c
SQL
dajofischer/Datacamp
/Joining_Data_in_SQL/E15_A_table_of_two_cities.SQL
UTF-8
255
3.59375
4
[]
no_license
SELECT c.name AS city, l.name AS language FROM cities AS c CROSS JOIN languages AS l WHERE c.name LIKE 'Hyder%'; SELECT c.name AS city, l.name AS language FROM cities AS c INNER JOIN languages AS l ON c.country_code = l.code WHERE c.name LIKE 'Hyder%';
true
c667029944fd37f409be134cb2ef2f9e551241f9
SQL
anandeka/my-project
/DBScripts/MasterScripts/Master_Scripts_169.sql
UTF-8
2,939
2.734375
3
[]
no_license
SET DEFINE OFF; Insert into RML_REPORT_MASTER_LIST (REPORT_ID, SECTION_ID, REPORT_FILE_NAME, REPORT_DISPLAY_NAME, FEATURE_ID, REPORT_DISPLAY_NAME_DE, REPORT_DISPLAY_NAME_ES, ACTION_METHOD, REPORT_TYPE, IS_ACTIVE) Values ('84', '21', 'DailyOpenUnrealizedPhysicalPnl_Cog.rpt', 'Daily Open Unrealized Physi...
true
20865c6b81c2713552d838c444064a65d8265fb3
SQL
ericSaksa/CapstoneLab
/JavaTunes-portlet/docroot/WEB-INF/sql/tables.sql
UTF-8
948
2.859375
3
[]
no_license
create table Item_BandMembers ( ItemBandMemberId INTEGER not null primary key IDENTITY, ItemId INTEGER, Member VARCHAR(75) null ); create table PurchaseItem ( PurchaseItemId INTEGER not null primary key IDENTITY, PoId INTEGER, ItemId INTEGER, Quantity INTEGER, UnitPrice DOUBLE ); create table PurchaseOrder ( ...
true
866ed9ade4cec9e0e8ea1db5ccbbc67683fbaaec
SQL
alicesilva/Banco-de-Dados-SQL
/parte2/ddl_turma3_grupo02.sql
UTF-8
3,232
3.765625
4
[]
no_license
CREATE TABLE Cliente ( cpf CHAR(11), email VARCHAR(50) NOT NULL, endereco VARCHAR(100) NOT NULL, data_nascimento DATE NOT NULL, sexo VARCHAR(10) NOT NULL, nome VARCHAR(100) NOT NULL, PRIMARY KEY(cpf) ); CREATE TABLE Avaliacao ( id INT GENERATED BY DEFAULT ON NULL AS IDENTITY PRIMARY KEY, nota...
true
ec39052c1c08f77dd2f5ba0ec73867fc5c13591b
SQL
AlexAltR/task-test-SHIFT-CFT-Bank
/Запросы/task_1/DDL-скрипт создания таблицы CLIENTS с заданными ограничениями.sql
UTF-8
509
3.125
3
[]
no_license
/*DDL-скрипт создания таблицы CLIENTS с заданными ограничениями.*/ CREATE TABLE public."CLIENTS" ( "ID" numeric(10) NOT NULL, "NAME" character varying(1000) NOT NULL, "PLACE_OF_BIRTH" character varying(1000) NOT NULL, "DATE_OF_BIRTH" date NOT NULL, "ADDRESS" character varying(1000) NOT NULL, "PA...
true
0dfb2c646ad3d0a62ffbaf833e0463fc2d9a1847
SQL
anacatcam/dp1-2020-g1-05
/bin/src/main/resources/db/hsqldb/data.sql
UTF-8
13,175
2.921875
3
[]
no_license
-- Admin general INSERT INTO users(username,password,enabled) VALUES ('admin1','admin',TRUE); INSERT INTO authorities(id,username,authority) VALUES (1,'admin1','admin'); --admin Juan Jose INSERT INTO users(username,password,enabled) VALUES ('juaperpla','JacoLeah',TRUE); INSERT INTO authorities(id,username,authority) VA...
true
38bee2c385c97b80a0970e6f72566dcda2504799
SQL
akidwell/sql
/sqlfkandjoin.sql
UTF-8
97
3.109375
3
[]
no_license
SELECT c.Name, c.State, c.City from customer c inner join state s on c.state = s.code;
true
9f79124aa5ddb97f312e72fb769d78cca29aebd0
SQL
atlscott/Bamazon
/bamazonSeed.sql
UTF-8
866
3.25
3
[]
no_license
CREATE DATABASE bamazon_DB; USE bamazon_DB; CREATE TABLE products ( item_id INT AUTO_INCREMENT NOT NULL, product_name VARCHAR(150) NOT NULL, department_name VARCHAR(50) NOT NULL, price DECIMAL(10,2) NOT NULL, stock_quantity INT NOT NULL, PRIMARY KEY (item_id) ); -- Insert data into the 'products' table -- INSE...
true
c5f1e840fabeea202a0e25f654e86cc72884aa7f
SQL
FredLauerTransCore/CCSSCompare083016
/Suntoll/ETL/Vehicle/DM_VEHICLE_HST_INFO_PROC.sql
UTF-8
6,567
3
3
[]
no_license
/******************************************************** * * Name: DM_VEHICLE_HST_INFO_PROC * Created by: RH, 6/2/2016 * Revision: 1.0 * Description: This is the template for bulk read/write * DM_VEHICLE_HST_INFO * ********************************************************/ set serveroutput on set verify o...
true
07ff2b6ada41cfd996d61a36910de561f28ac541
SQL
gruter/tajo-elasticsearch
/tajo-core/src/test/resources/queries/TestJoinQuery/testLeftOuterJoinWithEmptyTable2.sql
UTF-8
231
3.390625
3
[ "Apache-2.0", "PostgreSQL", "BSD-3-Clause", "MIT" ]
permissive
select c_custkey, sum(empty_orders.o_orderkey), max(empty_orders.o_orderstatus), max(empty_orders.o_orderdate) from customer left outer join empty_orders on c_custkey = o_orderkey group by c_custkey order by c_custkey ;
true
93a583575830901909aa67c29e979e32a7fe3798
SQL
sparkingdark/almond-cloud
/model/migrations/4b96642-blog.sql
UTF-8
983
3.5625
4
[ "Apache-2.0" ]
permissive
-- -- Table structure for table `blog_posts` -- DROP TABLE IF EXISTS `blog_posts`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `blog_posts` ( `id` int(11) NOT NULL AUTO_INCREMENT, `author` int(11) NOT NULL, `slug` varchar(255) COLLATE u...
true
0245fc0609587667f593c73d399da2df351c9ee2
SQL
loopyhole/CS310_Project_Car_Insurance
/Team3_PDM/6.sql
UTF-8
341
3.546875
4
[]
no_license
use mydb; SELECT DISTINCT t1.* FROM t3_COVERAGE AS t2, t3_CLAIM_SETTLEMENT AS t3, t3_CUSTOMER AS t1 INNER JOIN t3_CLAIM AS t4 ON t1.t3_Cust_Id = t4.t3_Cust_Id WHERE t4.t3_Claim_Amount < t2.t3_Coverage_Amount AND t4.t3_Claim_Amount > (t3.t3_Claim_Settlement_Id + t3.t3_Vehicle_Id + t3.t3_Claim...
true