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
14dbabfd284125ea7c4e355e7423b3e5002a0ae2
SQL
xhuanghun/wxapp
/wxapp.sql
UTF-8
15,999
3
3
[ "Apache-2.0" ]
permissive
/* Navicat MySQL Data Transfer Source Server : localhost Source Server Version : 50520 Source Host : 192.168.0.16:3306 Source Database : wxapp Target Server Type : MYSQL Target Server Version : 50520 File Encoding : 65001 Date: 2017-01-20 19:20:13 */ SET FOREIGN_KEY_CHECKS=0; -- ...
true
30b804346ed0cd14c79146c8bc1e16777df1610a
SQL
CassidyGrom/SQLApp
/db/schema.sql
UTF-8
528
3.328125
3
[ "MIT" ]
permissive
DROP DATABASE IF EXISTS company_db; CREATE DATABASE company_db; USE company_db; CREATE TABLE department ( id INTEGER AUTO_INCREMENT NOT NULL, name VARCHAR (30) NOT NULL, PRIMARY KEY (id) ); CREATE TABLE role ( id INTEGER AUTO_INCREMENT NOT NULL, title VARCHAR (30), salary DECIMAL (10,2) DEFAULT 0, de...
true
d5dbff6e73a88149e1e98c99c5faccabacb2329e
SQL
ionpay/Ionpay
/API/example/dump.sql
UTF-8
2,917
3.609375
4
[]
no_license
CREATE TABLE `product` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `code` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `type` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `value` tinyint(3) unsigned DEFAULT NULL, `title` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`id`) ...
true
a1704291d08f4822ea06a3b73b42f77c18761045
SQL
lszel/SQL-Neural-Network
/07 create network.sql
UTF-8
1,777
3.78125
4
[]
no_license
# create network SET SQL_SAFE_UPDATES = 0; set @input_neurons_count=784; #28*28 set @output_neurons_count=10; set @hidden_layers_count=2; set @hidden_layer1_size=300; set @hidden_layer2_size=300; truncate test_accuracy_log; truncate train_accuracy_log; truncate `neurons`; # create input neurons set @last_id=@inpu...
true
b5c9a15cd06972e54acb6269667ab115430337db
SQL
campincarl619/Homework-10
/Homework 10/Homework Queries/6e..sql
UTF-8
151
3.5
4
[]
no_license
SELECT first_name,last_name,SUM(amount) AS 'Total Payment' FROM payment JOIN customer ON payment.customer_id = customer.customer_id GROUP BY last_name;
true
19c3a3dc00fabbcab1ac6ab019451143397ab233
SQL
jerubball/HackerRank
/SQL/Aggregation/employee3.sql
UTF-8
274
3.15625
3
[ "Unlicense" ]
permissive
-- MySQL -- HackerRank SQL Aggregation 8 -- https://www.hackerrank.com/challenges/earnings-of-employees/problem -- Author: Hasol set @max_value = (select max(months * salary) from Employee); select @max_value, count(Name) from Employee where months * salary = @max_value;
true
d368fda2799f09a9ae5d9ca99ec6062edc750028
SQL
ximingren/xiecheng_spider
/hotel.sql
UTF-8
1,607
2.859375
3
[]
no_license
/* Navicat Premium Data Transfer Source Server : 携程 Source Server Type : MySQL Source Server Version : 50725 Source Host : localhost:3306 Source Schema : xiecheng Target Server Type : MySQL Target Server Version : 50725 File Encoding : 65001 Date: 23/01/2019 20:18:03...
true
e7b4fdfde312d310b3c53ce6f96ca97768757500
SQL
mwinterde/jaffle-shop
/models/orders.sql
UTF-8
382
2.875
3
[]
no_license
{{ config( materialized = "incremental", partition_by = { "field": "order_date", "data_type": "date", "granularity": "day" } ) }} select order_date, count(order_id) as number_of_orders from {{ ref('stg_orders') }} where order_date = PARSE_DATE...
true
2396a7660854fa3c7298ba64a92aefb356a00c39
SQL
Anastasov/rebind
/src/main/resources/test_db_migrations/V1.5__add_card_tables.sql
UTF-8
998
2.9375
3
[ "MIT" ]
permissive
CREATE TABLE REBIND_CARD ( id SERIAL PRIMARY KEY NOT NULL, name varchar(150) NOT NULL ); CREATE TABLE REBIND_PROTECTED_USER ( id SERIAL PRIMARY KEY NOT NULL, usernameCheck boolean NOT NULL DEFAULT TRUE, emailCheck boolean N...
true
b7167b85cb69a43d406e4f3657a7235cb17c8e19
SQL
valent0ne/netflics
/db/netflics_2019-04-23_18-13-21.sql
UTF-8
7,627
3.015625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.3 -- https://www.phpmyadmin.net/ -- -- Host: localhost:8889 -- Generation Time: Apr 23, 2019 at 06:13 PM -- Server version: 5.7.24 -- PHP Version: 7.2.10 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CH...
true
61e8868e9e3849d446cacdc018186111ee7a2d64
SQL
luiz87/exemplos_qua209030
/HackerRank/query02.sql
UTF-8
1,986
4.25
4
[]
no_license
SELECT T1.COMPANY_CODE, FOUNDER, COUNT(DISTINCT T2.LEAD_MANAGER_CODE), COUNT(DISTINCT T2.SENIOR_MANAGER_CODE), COUNT(DISTINCT T2.MANAGER_CODE), COUNT(DISTINCT T2.EMPLOYEE_CODE) FROM Company T1 INNER JOIN EMPLOYEE T2 ON T1.COMPANY_CODE = T2.COMPANY_CODE GROUP BY T1.COMPANY_CODE, FOUNDER ORDER...
true
7bcf46d1cb13e87f74dcd62cf3eaca159c4ee1c7
SQL
fandashtic/arc_chennai
/Sivabalan-SQL/VIEW/V_Quotation_Abstract.sql
UTF-8
2,189
3.625
4
[]
no_license
Create VIEW [V_Quotation_Abstract] ([Quotation_ID],[Customer_ID],[From_Date],[To_Date],[Invoice_Scheme_Allowed]) AS SELECT QuotationAbstract.QuotationID,QuotationCustomers.CustomerID,QuotationAbstract.ValidFromDate,QuotationAbstract.ValidToDate, QuotationAbstract.AllowInvoiceScheme FROM ...
true
0e45f1c3017428507d9c4ba85d178a72aefcc8f1
SQL
zzxmm/zxm
/db/tablestructure/xys_bills.sql
UTF-8
3,517
3.484375
3
[]
no_license
/* Date: 23/01/2019 13:03:53 */ SET NAMES utf8mb4; SET FOREIGN_KEY_CHECKS = 0; -- ---------------------------- -- Table structure for xys_bills -- ---------------------------- DROP TABLE IF EXISTS `xys_bills`; CREATE TABLE `xys_bills` ( `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '账单id', `bills_type` tinyint(4...
true
bdcbdee56309e0c23ed71d996e28b1435d6d179f
SQL
shamimgeek/docker-compose-postgres
/SQL/person-car.sql
UTF-8
1,085
3.5
4
[ "Apache-2.0" ]
permissive
create table car ( id BIGSERIAL NOT NULL PRIMARY KEY, make VARCHAR(100) NOT NULL, model VARCHAR(100) NOT NULL, price NUMERIC(19,2) NOT NULL ); create table person ( id BIGSERIAL NOT NULL PRIMARY KEY, first_name VARCHAR(50) NOT NULL, last_name VARCHAR(50) NOT NULL, email VARCHAR(150), gender VARCHAR(7) NOT NUL...
true
04adcab2b8c52dc8ec8afb12c71706c1f34ce6c4
SQL
DanieleMarcolan/Assignments-Database-UNITN-2019
/Assignment 2/query_3.sql
UTF-8
100
3.15625
3
[]
no_license
SELECT DISTINCT B.name, B.manf FROM "Likes" L, "Beers" B WHERE L.drinker='Fred' AND L.beer=B.name;
true
ee296f966fa84c4489c7a72178e220196cca1714
SQL
andergabrielsantos/Curso-SQL-SERVER
/SQL SERVER/35 - FUNÇÃO DE TABELA EMBUTIDA.sql
ISO-8859-1
808
3.546875
4
[ "MIT" ]
permissive
--FUNO VALOR DE TABELA EMBUTIDA --SO SIMILARES A UMA VIEW(EXIBIO), POREM PERMITE --ULTILIZAR PARAMETROS. RETOMAM UM CONJUNTO COMPLETO DE DADOS. --Sintaxe: CREATE FUNCTION NOME_FUNO (PARMETROS) RETURNS TABLE AS RETURN (DECLARAO_SELECT) --EXEMPLO DE FUNO DE VALOR DE TABELA EMBUTIDA CREATE FUNCTION RETORNA_ITENS(@COD...
true
480e4bb8e7e2502ed058f4fbd6168bd3649134cd
SQL
justin404/fitness-tracker
/fitness-tracker-main/src/main/database/objects/ddl/Questionnaire_tables.sql
UTF-8
3,395
3.703125
4
[]
no_license
-- Schema: Questionnaire -- Prefix: QS_ CREATE TABLE QS_Questionnaire ( QuestionnaireID BIGINT NOT NULL GENERATED ALWAYS AS IDENTITY(INCREMENT 1 START 1), Name VARCHAR(250) NOT NULL, SentDate DATE NOT NULL, CompletedDate DATE NOT NULL, ExpireDate DATE NOT NULL, ApplicationUserID BIGINT NOT NULL, CreatedDate...
true
9311343729342921ff3b1ae1e62938ddd7ed92d3
SQL
pporche87/sql-exercises
/khan-academy/sql_basics.sql
UTF-8
1,882
3.71875
4
[]
no_license
-- Solution SQL for the project from the SQL Basics course ("Design a store database") CREATE TABLE clothing_store (id INTEGER PRIMARY KEY, product TEXT, color TEXT, price INTEGER, quantity INTEGER); INSERT INTO clothing_store (product, color, price, quantity) VALUES ("T-Shirt", "green", 9.99, 10); INSERT INTO cloth...
true
f14fb72f06e2dd8341614ffcc5c347832edb12c2
SQL
HtunPythonDummyLabo/student_data_management
/student_info.sql
UTF-8
3,529
2.75
3
[]
no_license
-- ------------------------------------------------------------- -- TablePlus 4.0.0(370) -- -- https://tableplus.com/ -- -- Database: demodb -- Generation Time: 2021-07-04 21:42:28.1480 -- ------------------------------------------------------------- /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /...
true
51a62f691b024a077efaff8f3f26851aa4a748df
SQL
DhaniFauzi/uts-datawarehouse
/dhani_uts.sql
UTF-8
45,449
2.671875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Waktu pembuatan: 07 Nov 2021 pada 10.06 -- Versi server: 10.4.17-MariaDB -- Versi PHP: 8.0.0 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CH...
true
bda50709e4141b90e23bc11e033ab8dea5fec8f1
SQL
talgurevichwework/CSI-Research
/Queries - Tal/manual contrract research.sql
UTF-8
685
3.84375
4
[]
no_license
-- select all accounts that ended signing with manual option select count(a.id), pm.payment_method from spaceman_public.payment_methods pm join spaceman_public.accounts a on a.id=pm.account_id where pm.created_at >= '2018-06-01' and pm.created_at < '2018-07-01' and a.created_at > '2018-06-01' group by pm.payment_metho...
true
3950a8a49bf8e84395a804c585b0a6b9ec589c29
SQL
CUBRID/cubrid-testcases
/sql/_30_banana_pie_qa/issue_20567_limit/cases/20567_limit_UPDATE_hostvar.sql
UTF-8
2,801
3.140625
3
[ "BSD-3-Clause" ]
permissive
--+ holdcas on; --LIMIT opt_limit_expr drop table if exists t; create table t ( i int , j varchar(10)); --Insert 15 rows. prepare stmt from 'insert into t select rownum, substring(class_name,0,10) from _db_class where class_name<>0 limit ?*?+?*?-?/?+5; '; execute stmt using 1, 7, 2, 2, 2,2 ; select * from t order b...
true
f9d06e772562f4cfbb76daba0961c83499ffb952
SQL
transcom/mymove
/migrations/app/schema/20230614231637_add_date_of_contact_column_to_mto_service_item_customer_contacts_table.up.sql
UTF-8
821
3.75
4
[ "MIT", "LicenseRef-scancode-public-domain" ]
permissive
-- New Column ALTER TABLE mto_service_item_customer_contacts ADD COLUMN date_of_contact timestamptz NULL; -- Copying data for null columns UPDATE mto_service_item_customer_contacts SET date_of_contact = first_available_delivery_date WHERE date_of_contact IS NULL; -- Setting column to not null after updating null val...
true
ff114781ddf9218969c8d8b8b4903ec46bf21e28
SQL
KalebDD/database-exercises
/select_exercises.sql
UTF-8
1,122
3.90625
4
[]
no_license
USE codeup_test_db; # The name of all albums by Pink Floyd. SELECT 'All Pink Floyd Albums over 40m in Sales' AS 'CAPTION'; SELECT name FROM albums WHERE artist = 'Pink Floyd'; # The year Sgt. Pepper's Lonely Hearts Club Band was released SELECT 'Sgt. Pepper''s Lonely Hearts Club Band Release Date' AS 'CAPTION'; SELEC...
true
7a3c3455111086c9a7cc7dcca57655b5b386eec4
SQL
kierajcullen/employee-tracker
/schema.sql
UTF-8
786
4.0625
4
[]
no_license
DROP DATABASE IF EXISTS employees; CREATE DATABASE employees; USE employee; CREATE TABLE department ( id INT AUTO_INCREMENT NOT NULL, name VARCHAR(30) NOT NULL, PRIMARY KEY(id) ); CREATE TABLE role ( id INT AUTO_INCREMENT NOT NULL, title VARCHAR(30) NOT NULL, salary DECIMAL(8,2) NOT NULL, department_i...
true
4aa1f2964df231fe08de28e1465470d02e12b43d
SQL
Eranda412/carfi
/Database/Table Create.sql
UTF-8
1,379
3.4375
3
[]
no_license
create table cars( car_id int NOT NULL IDENTITY(1,1) PRIMARY KEY, owner_id varchar(8), brand varchar, model_na varchar, model_yr int ); create table users( user_id int NOT NULL IDENTITY(1,1) PRIMARY KEY, f_name varchar (100), L_name varchar(100), gender varchar(5), stat varchar(8), fam_num int ); c...
true
0d6f39768463193a87eef362b4078d833ad7eb88
SQL
Maglo22/courses_archive
/daw/labs/lab_21/procedimiento.sql
UTF-8
456
2.90625
3
[]
no_license
DROP PROCEDURE IF EXISTS crearEmpleado; DELIMITER // CREATE PROCEDURE crearEmpleado(IN nom VARCHAR(50), IN r VARCHAR(50), IN dep VARCHAR(50)) BEGIN DECLARE nombre VARCHAR(50) DEFAULT 'nombre'; DECLARE rol VARCHAR(50) DEFAULT 'rol'; DECLARE departamento VARCHAR(50) DEFAULT 'departamento'; SET nombre = nom; SET rol ...
true
f44421d514aac98c5b4341ef2045ad94178b8676
SQL
aleciogodoi/MRP-FATEC-GUARULHOS
/MRP-SacoCarvao/MRP-SacoCarvao/Banco de Dados/Script Banco MRP.sql
UTF-8
5,624
3.703125
4
[]
no_license
DROP DATABASE IF EXISTS MRP; CREATE DATABASE MRP; USE MRP; CREATE TABLE PRODUTO ( idProduto int primary key, nomeProduto varchar(100) not null, descrProduto varchar(1000), qtdeMinEstoque int, qtdeMaxEstoque int, qtdeAtualEstoque int, altura decimal(5,2), comprimento decimal(5,2), largura decimal(5,2), peso ...
true
fa3c05b563e77ca130cda2791c511274e38fa5e2
SQL
adambillylee/basics
/sql/5-complementarySelection.sql
UTF-8
310
3.703125
4
[]
no_license
## select student id not in select id, sname from student where student.id not in ## set of student id have not taken class from abc (select distinct(student.id) from student join sc on sc.sid = student.id join course on course.id = sc.cid join teacher on teacher.id = course.tid where teacher.tname = "abc");
true
a4a30e8ab650b8fe35d832c2aa2894fb986a5bb3
SQL
kevinsyehryls/application
/pks_patch_20170916.sql
UTF-8
959
4.375
4
[]
no_license
drop table if exists `tb_months`; create table tb_months( nomor int, bulan varchar(50) ); delete from `tb_months`; insert into tb_months (nomor, bulan) values (1,'January'), (2,'February'), (3,'March'), (4,'April'), (5,'May'), (6,'June'), (7,'July'), (8,'August'), (9,'September'), (10,'October'), (11,'Nov...
true
2e987f1644e51ddba01479adaa1df1f1aedc4490
SQL
CS2102-2021-S1-33/Pet-Caring-Application
/backend/src/db/schema.sql
UTF-8
4,580
4.15625
4
[]
no_license
-- ====================== -- INDENTATION: ALWAYS 2 SPACES!! -- ====================== -- ====================== -- RESET ALL schemas in public DROP SCHEMA public CASCADE; CREATE SCHEMA public; GRANT ALL ON SCHEMA public TO postgres; GRANT ALL ON SCHEMA public TO public; -- ====================== -- ==================...
true
5375737f270a2bb34eaef8df957cd2c35f101a88
SQL
titasakgm/tucdocs
/XLS/detail_plan.sql
UTF-8
1,886
3.109375
3
[]
no_license
-- -- PostgreSQL database dump -- SET statement_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings = on; SET check_function_bodies = false; SET client_min_messages = warning; SET search_path = public, pg_catalog; SET default_tablespace = ''; SET default_with_oids = false; -- -- Name: detail...
true
060fd3f59a9e619323d4c9646c3f6164a2d53696
SQL
lakweer/Bank-Management-Application
/src/DB/UpdatedViews.sql
UTF-8
2,399
3.640625
4
[]
no_license
--customer login view CREATE VIEW customer_login AS SELECT CustomerId, Username, Password, Status FROM customer_online_account; CREATE VIEW individual_online_loan_report AS SELECT LoanId, loan.Amount AS TotalAmount, PaidSettlements, BranchId, LoanTypeName FROM loan LEFT OUTER JOIN loan_request USING(LoanId) INNER J...
true
e3311d5770c77aea0a6768a7fc145c863df36910
SQL
foodshipper/server-application
/sampledata/test_data.sql
UTF-8
2,474
2.703125
3
[]
no_license
TRUNCATE TABLE public.fridge_items, public.products, public.groups_rel, public.groups, public.notification_log, public.users, public.group_recipes, public.group_recipe_vote_log; INSERT INTO public.users (id, token, longitude, latitude) VALUES (1, 'zellescherweg', 13.750865, 51.028659); INSERT INTO public.users (id, to...
true
80941d8bb0d4a811ed44672e73685e30c79405a9
SQL
ILYAF98/GuanLi
/web/score3.0.sql
UTF-8
25,195
2.984375
3
[]
no_license
/* SQLyog Ultimate v12.2.6 (64 bit) MySQL - 5.5.60-log : Database - score ********************************************************************* */ /*!40101 SET NAMES utf8 */; /*!40101 SET SQL_MODE=''*/; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIG...
true
1be2f02b3c1b4231326760eb841ffe856d76a072
SQL
KyleNewt/Project0
/Data Entry.sql
UTF-8
4,472
3.609375
4
[]
no_license
DROP TABLE Barricades; DROP TABLE Items; DROP TABLE Player; DROP TABLE Room; CREATE TABLE Room( room_id INTEGER PRIMARY KEY NOT NULL, north INTEGER, south INTEGER, east INTEGER, west INTEGER, room_long_description VARCHAR2(400), room_description VARCHAR2(200) ); ...
true
f35fb9213ab52914965a7977474e0c15bf66bc86
SQL
eurekastein/Network_QRY
/3_DIJKSTRACOST.sql
UTF-8
1,357
4.03125
4
[]
no_license
## CREA UNA TABLA DONDE SE IDENTIFICAN LOS NODOS DE INICIO LOS NODOS DE LLEGADA Y LOS COSTOS## ## COSTOS DE CULTIVOS A BENEFICIOS ## create table cultivo_beneficios as SELECT DISTINCT ON (start_vid) start_vid, end_vid, agg_cost FROM (SELECT * FROM pgr_dijkstraCost( 'select id, source, target, costo as ...
true
886c4e970e83262c7ca726ac117694a568abc8e0
SQL
edersonsandre/phpconf-gestao-estoque
/banco.sql
UTF-8
4,013
3.21875
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.7.7 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3306 -- Generation Time: 06-Dez-2018 às 13:48 -- Versão do servidor: 5.6.38 -- PHP Version: 7.2.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; -- -- Database: `estoque` -- -- ----------------------------...
true
2bd52f6a82aa85c07d25a0ef5a0ee6079d8a9726
SQL
giostam/ReceiptsEntry
/src/main/java/com/receipts/db/tables.sql
UTF-8
2,592
3.796875
4
[]
no_license
CREATE TABLE `users` ( `id` int(11) NOT NULL AUTO_INCREMENT, `username` varchar(45) NOT NULL, `password` varchar(45) NOT NULL, `firstname` varchar(45) DEFAULT NULL, `surname` varchar(45) DEFAULT NULL, `can_import` int(11) NOT NULL DEFAULT '0', `can_export` int(11) NOT NULL DEFAULT '0', `can_delete` int(...
true
f01245ad90680a44db678ff89b16a9151e6b9068
SQL
guh1994/pontoOnline
/banco/SCRIPT.sql
UTF-8
363
2.703125
3
[]
no_license
-- Geração de Modelo físico -- Sql ANSI 2003 - brModelo. CREATE TABLE cadastroFunc ( CodFunc INT(20) PRIMARY KEY, Nome VARCHAR(100) ); CREATE TABLE ponto ( CodPonto INT(20) PRIMARY KEY, DataPonto DATETIME, HoraEntrada TIME, HoraAlmoco TIME, HoraRetornoAlmoco TIME, HoraSaida TIME, CodFunc INT(20), FOREIGN KEY(CodFun...
true
aba49591859e819c3fe6f02e6e8958f28133d93b
SQL
ngds/data-quality-tools
/clear_harvest_source.sql
UTF-8
3,332
3.25
3
[]
no_license
/* This is the SQL that clears all the records for a harvest source as found in: ckan-harvest/ckanext/harveest/logic/action/update.py harvest_source_clear Sometimes it is necessary to run this manually step by step, since this process can get hung due if the database tables are large and havent been adeq...
true
e8dc85f0bac65fc17f6322fe26b1f1a7d68e789b
SQL
wtsegars/HD-Lead-Sales-DB
/schema.sql
UTF-8
453
2.96875
3
[]
no_license
DROP DATABASE IF EXISTS hd_leadssalesdb; CREATE DATABASE hd_leadssalesdb; USE hd_leadssalesdb; CREATE TABLE july_2019_leadsandsales( departments VARCHAR(10) NOT NULL, dept_weekly_goals INT(3), week_one_dept_leads INT(15), week_two_dept_leads INT(15), week_three_dept_leads INT(15), week_four_dept...
true
0bf601a18ce71f14b3ee49b078fa530313fea121
SQL
rrighetti/pkg_xdollar_search
/sample.sql
UTF-8
2,566
3.59375
4
[]
no_license
------------- -- EXAMPLE -- ------------- SQL> col contents for a30 SQL> col search_qry for a100 -- Searching in all X$ tables any column containing 'DBARJ'. SQL> select * from table(pkg_xdollar_search.f_string('%DBARJ%')); -- Searching in X$KQLFBC table any column with the exactly text 'DBARJ'. SQL> select * from t...
true
39b2165c8d707dc7e2691012ca9d00a3215752f3
SQL
am502/DB
/src/main/resources/task9/prepared/whole.sql
UTF-8
167
2.578125
3
[]
no_license
DO $$ BEGIN PREPARE test_sql AS SELECT SUM(value) FROM part_table; FOR i IN 1..200 LOOP EXECUTE 'EXECUTE test_sql'; END LOOP; DEALLOCATE test_sql; END; $$;
true
5d9f8714b8395096d361f65c10929ded91a40c24
SQL
bahagan/micro
/Release 0.2/ConfRoomFinder/art .sql
UTF-8
459
2.59375
3
[]
no_license
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; CREATE TABLE `art` ( `id` int(11) NOT NULL auto_increment, `title` varchar(100) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=15 ; INSERT INTO `art` (`id`, `title`) VALUES (1, 'c-123'), (2, 'c-124'), (3, 'c-125'), (4, 'c-126'), (5, 'c...
true
c54a47fcde3e6339613fe7c4dcb5fc3dcf09dd6d
SQL
LIULE8/leecode-store
/src/main/java/com/leo/sql/easy/197_rising_temperature.sql
UTF-8
1,097
4.0625
4
[]
no_license
# 197. 上升的温度 # 给定一个 Weather 表,编写一个 SQL 查询,来查找与之前(昨天的)日期相比温度更高的所有日期的 Id。 # # +---------+------------------+------------------+ # | Id(INT) | RecordDate(DATE) | Temperature(INT) | # +---------+------------------+------------------+ # | 1 | 2015-01-01 | 10 | # | 2 | 2015-01-02 | ...
true
ed0267e79fd5f72e6d72ed8ac1176b057a3f365b
SQL
JohnReddyZhang/mysql_database
/zhzhang135DB/count.sql
UTF-8
2,030
3.765625
4
[]
no_license
ANALYZE TABLE Allergies, Appliance, ByMethod, Containers, ContainsAllergy, CookingMethod, Dish, DishTaste, Flavor, Ingredient, IngredientTaste, Isle, KitchenWare, SellsIngredient, SellsKitchenWare, Store, Style, UseIngredient, UseWare, Utensil; -- Method inspired by: -- https://stackoverflow.com/questions/2692340/mysql...
true
85dfc89002b04d4dd28119947d9d2d3d45b84baf
SQL
terezasimoes/project-mysql-one-for-all
/desafio4.sql
UTF-8
870
4.28125
4
[]
no_license
-- Crie uma VIEW com o nome top_3_artistas que deve mostrar somente as três pessoas artistas mais populares no banco SpotifyClone, -- possuindo as seguintes colunas: -- A primeira coluna deve possuir o alias "artista" e exibir o nome da pessoa artista. -- A segunda coluna deve ter o alias "seguidores" e exibir a quanti...
true
132549ed89dd2cdf42510d60d142bae5432e0acd
SQL
ivanszhuravlev/testing_system
/migrations/17-05-16_create_table_users.sql
UTF-8
288
2.578125
3
[]
no_license
CREATE TABLE IF NOT EXISTS `users` ( `id` int(11) NOT NULL AUTO_INCREMENT, `nickname` tinytext NOT NULL, `email` tinytext NOT NULL, `password` text NOT NULL, `stage` tinyint(4) NOT NULL DEFAULT '1', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=59 ;
true
6ece5cfab8fe48b97764eb0e06d6472e1c89ec37
SQL
Lihaij/Erc-node
/ddl/20171208.sql
UTF-8
1,453
2.65625
3
[]
no_license
SET NAMES utf8; SET FOREIGN_KEY_CHECKS = 0; /* your backup sql */ /* tiny */ /*ALTER TABLE `tbl_erc_stockmap`*/ /*ADD COLUMN `min_purchase_amount` int(11) NULL AFTER `updated_at`;*/ /*ADD COLUMN `trigger_safe_model` varchar(4) AFTER `min_purchase_amount`;*/ /*end tiny */ /* chris */ /*call Pro_AddMenu('erc', '物料采...
true
60ee4aef8980dfaa2a2d84ee1164b880aac6ac26
SQL
DrLele08/FarmaciaASL
/Database/InstallazioneDb.sql
UTF-8
1,536
3.421875
3
[ "MIT" ]
permissive
-- Creo Tabella Per Sedi Farmacie CREATE TABLE SediFarmacie ( idSede int AUTO_INCREMENT, Nome VARCHAR(80) NOT NULL UNIQUE, Indirizzo VARCHAR(200) NOT NULL, Telefono VARCHAR(12) NOT NULL, FotoPrincipale VARCHAR(150) NOT NULL, Email VARCHAR(50) NOT NULL, PEC VARCHAR(50) NOT NULL, Citta VARCHAR(22) NOT NUL...
true
1258e706135274105d4c8083fdf6d26365eb3aeb
SQL
jgarzonext/plsql-testing
/script_plsql/bd_iaxis/script/vistas/VI_REEMB_ACEPTADOS.sql
UTF-8
1,674
2.71875
3
[]
no_license
-------------------------------------------------------- -- DDL for View VI_REEMB_ACEPTADOS -------------------------------------------------------- CREATE OR REPLACE FORCE EDITIONABLE VIEW "AXIS"."VI_REEMB_ACEPTADOS" ("NPOLIZA", "NCERTIF", "CBANCAR", "NREEMB", "NFACT", "NLINEA", "IMPORTE", "CTIPO") AS SELECT s....
true
4f63d826d7c41317d0828e2e715f2d82e58f731c
SQL
xym4er/datastudio
/src/main/resources/OldSqls/RI4_SBSQ_Benchmark_view.sql
UTF-8
1,328
3.546875
4
[]
no_license
CREATE OR REPLACE ALGORITHM = UNDEFINED VIEW `RI4_SBSQ_Benchmark_view` AS select `it`.`typeName` AS `typeName`, count(`ci`.`quantity`) AS `qty`, if(`benchmark`.`qty` is null, 0, `benchmark`.`qty`) AS `benchmark` from (((`seat`.`contract_items` `ci` join `seat`.`contract_details` `cc` on (`cc...
true
190e17cc40c719e10062e136a74537b21724350b
SQL
dulfig/DatabaseSystemsHW3
/Cars2019.sql
UTF-8
2,426
3.46875
3
[]
no_license
/* Cars2019.sql Eric J. Schwabe CSC 355 Spring 2019 For use in Assignment 3 only -- do not post, copy, or distribute */ DROP TABLE INVENTORY CASCADE CONSTRAINTS; DROP TABLE CAR CASCADE CONSTRAINTS; DROP TABLE DEALER CASCADE CONSTRAINTS; CREATE TABLE CAR ( ID CHAR(6) PRIMARY KEY, Company VARCHAR2(1...
true
abd34cd6db8b385e8f147c92c532acf9b848d050
SQL
RavenCheng1120/DBMS-final-project-Statistics-tool-in-mysql
/sql/recommand_test.sql
UTF-8
2,522
3.46875
3
[]
no_license
DELIMITER // DROP PROCEDURE IF EXISTS RecommandTest; CREATE PROCEDURE RecommandTest( IN withinGroup BOOL, IN numercial BOOL, IN parametric BOOL, IN groupNum int ) BEGIN DROP TABLE IF EXISTS RecommandTable; CREATE TABLE RecommandTable( recommandTest varchar(50) DEFAULT "", functionUsage varchar(200) DEFA...
true
58ae0777b8dd495a673f443a9662fdadc5423006
SQL
IndulisErgis/ABF
/dbo/Views/ALP_lkpJmFudge.sql
UTF-8
148
2.546875
3
[]
no_license
 CREATE VIEW dbo.ALP_lkpJmFudge AS SELECT FudgeId, FudgeFactor, [Desc], InactiveYN FROM dbo.ALP_tblJmFudge WHERE (InactiveYN = 0)
true
637d9d3225945a97d5d00dc45e41e62be846b115
SQL
sdomccxxv/mysql_c
/db_empresa.sql
UTF-8
3,477
3.21875
3
[]
no_license
-- MySQL dump 10.13 Distrib 5.5.62, for Win64 (AMD64) -- -- Host: localhost Database: db_empresa1 -- ------------------------------------------------------ -- Server version 5.5.5-10.4.13-MariaDB /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHAR...
true
dce238168c151ef7193588f7d70c76ec62ac0519
SQL
majbrittws/FIRE-DDL
/DDL.sql
UTF-8
52,073
3.375
3
[ "MIT" ]
permissive
CREATE TABLE BEREGNING ( OBJEKTID INTEGER GENERATED ALWAYS AS IDENTITY (START WITH 1 INCREMENT BY 1 ORDER NOCACHE) PRIMARY KEY, REGISTRERINGFRA TIMESTAMP WITH TIME ZONE NOT NULL, REGISTRERINGTIL TIMESTAMP WITH TIME ZONE, SAGSEVENTFRAID VARCHAR2(36) NOT NULL, SAGSEVENTTILID VARCHAR2(36) ); CREATE TABLE ...
true
1b03a9682503c7c8d3970baca17999139f702ef4
SQL
TomWang233/LittleProjects
/SQL_Project/Step1.sql
UTF-8
326
3.359375
3
[]
no_license
# 1.Query the number of customers in Beijing, the total number of current deposits, and the average deposit amount; SELECT COUNT(DISTINCT Party_id) AS num, SUM(deposit)/10000 AS total_deposit, ROUND((SUM(deposit)/COUNT(DISTINCT Party_id))/10000,2) AS avg_deposit FROM Custom_Info2 WHERE zone_num='02...
true
1e6a287c14108dce5678778847a5d7f6c1599933
SQL
k-harikrishnan/NFF
/friendfinder.sql
UTF-8
2,563
3.09375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.2.7.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Aug 13, 2016 at 12:22 PM -- Server version: 5.6.20 -- PHP Version: 5.5.15 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */...
true
0839ba4929ec59b69759b299c2e8b19b2f552351
SQL
tohyung85/recipes_in_php_new
/recipes.sql
UTF-8
670
3.265625
3
[]
no_license
CREATE TABLE `recipes` ( `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY, `name` VARCHAR(60) ); CREATE TABLE `recipesteps` ( `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY, `step` TEXT, `photo` VARCHAR(100), `recipe_id` INT NOT NULL, FOREIGN KEY (`recipe_id`) REFERENCES recipes (`id`) ON DELETE CASCADE ON UPD...
true
351fe3ff4297607ac5b99e274fc3311b1e2b92e1
SQL
RetaxMaster/StoredProcedures
/Scripts_DB/fctr_imp/sp_p_get_cafctrimp_byAnyField.sql
UTF-8
1,164
3.640625
4
[]
no_license
/* Recupera un único registro de impuesto de factura filtrándolo por algún campo */ /*DELIMITER $$ DROP PROCEDURE IF EXISTS sp_p_get_cafctrimp_byAnyField$$*/ CREATE PROCEDURE sp_p_get_cafctrimp_byAnyField ( IN field VARCHAR (160), IN val VARCHAR (160), IN shouldJoin TINYINT (1) ) BEGIN SET @val =...
true
6e27a65d9dfc020c3dd076e64ce9c1279c9a240c
SQL
xRuiAlves/FEUP-BDAD-Proj
/Other Queries/int4_extra.sql
UTF-8
266
3.359375
3
[]
no_license
.mode columns .headers on .nullvalue NULL -- Get all the exercises with difficulty in the range [2,4], ordered by difficulty in an ascending way SELECT ExerciseID, difficulty FROM Exercise WHERE difficulty >= 2 AND difficulty <= 4 ORDER BY difficulty ASC
true
507b171f3777015149d535a216f9bf6e55bb7221
SQL
ksokol/myreader
/myreader-backend/src/main/resources/db/migration/V4__Migrate_subscriptionentry_tag.sql
UTF-8
1,162
3.953125
4
[ "Apache-2.0" ]
permissive
CREATE FUNCTION MIGRATION_SPLIT_TAGS(IN id BIGINT) RETURNS VARCHAR(100) ARRAY READS SQL DATA BEGIN ATOMIC DECLARE tags VARCHAR(100) ARRAY; SELECT REGEXP_SUBSTRING_ARRAY(USER_FEED_ENTRY_TAG, '[\p{Graph}&&[^,|\ ]]+') INTO tags FROM USER_FEED_ENTRY WHERE USER_FEED_ENTRY_TAG IS NOT NULL AND USER_FEED_ENTR...
true
c88d9605e6e8bf6c15d68fc35a97bfe9a520eb1c
SQL
auksasful/Onmiva
/Onmiva/script.ddl
WINDOWS-1250
12,310
2.703125
3
[]
no_license
#@(#) script.ddl DROP TABLE IF EXISTS Apmokejimai; DROP TABLE IF EXISTS Uzsakymo_eilutes; DROP TABLE IF EXISTS Team_building_pasiulymai_darbuotojui; DROP TABLE IF EXISTS Saskaitos; DROP TABLE IF EXISTS Pasiulymai_brigadininkui; DROP TABLE IF EXISTS Brigadininku_atostogu_laikai; DROP TABLE IF EXISTS Darbuotoju_atostogu...
true
6eb9c0a554be25e25a25d8a39a20190918acae2f
SQL
AitorRT/tasques
/prouf1.sql
UTF-8
765
3.8125
4
[]
no_license
CREATE TABLE IF NOT EXISTS task_item ( id INT NOT NULL AUTO_INCREMENT, item VARCHAR(255) NOT NULL, completed BOOLEAN NOT NULL, task varchar(100) NOT NULL, PRIMARY KEY (id) ); CREATE TABLE IF NOT EXISTS tasks ( id INT NOT NULL AUTO_INCREMENT, description VARCHAR(100) NOT NULL, user INT N...
true
5afca043cf62a4d8eb5d3767766e020298905be6
SQL
stryveapp/stryve-api
/database/migrations/1492820887_create_communities_table.up.sql
UTF-8
438
3.8125
4
[ "MIT" ]
permissive
CREATE TABLE communities( id SERIAL, owner_id INT NOT NULL, name VARCHAR(50) NOT NULL UNIQUE, is_private BOOLEAN NOT NULL DEFAULT FALSE, created_at TIMESTAMP NOT NULL, updated_at TIMESTAMP NOT NULL, deleted_at TIMESTAMP DEFAULT NULL, PRIMARY KEY (id), FOREIGN KEY (owner_id) REFERENC...
true
15f858f2cd9a00128558703816379fcb66c6fba6
SQL
algorenator/OLIVER
/Tables/BENEFITS_AGE_BASED_310717.sql
UTF-8
1,039
2.6875
3
[]
no_license
-- -- BENEFITS_AGE_BASED_310717 (Table) -- CREATE TABLE OLIVER.BENEFITS_AGE_BASED_310717 ( BAB_CLIENT_ID VARCHAR2(20 BYTE) NOT NULL, BAB_PLAN_ID VARCHAR2(20 BYTE) NOT NULL, BAB_BENEFIT VARCHAR2(20 BYTE) NOT NULL, BAB_CLASS VARCHAR2(10 BYTE) ...
true
48ffe1a96fc70d14b3f466105287b428d9b94326
SQL
singhsavan/splitshare
/a4086541_splitn_sample data_updated.sql
UTF-8
8,425
3.0625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Mar 27, 2016 at 03:18 PM -- Server version: 10.1.9-MariaDB -- PHP Version: 5.6.15 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLI...
true
285dc682a156bc5bd00791c324f52664c3e727ee
SQL
pumaisa/MEDIATECA
/baseprueba/primer_base.sql
UTF-8
6,412
2.734375
3
[]
no_license
drop database prueba_preguntas; create database prueba_preguntas; use prueba_preguntas; create table modulo (no_cta varchar(10), id_sesiones int(3), id_diagnostico int(3), comen_alum int(3), id_comen_prof int(3) ); create table sesiones (id_sesiones int(3) NOT NULL PRIMARY KEY AUTO_INCREMEN...
true
730293e961c0c823750092cf1a0325a3992ce74c
SQL
captainbuggythefifth/dentview
/dentview_db (2).sql
UTF-8
9,965
3.078125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 3.3.9 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Feb 02, 2013 at 01:29 PM -- Server version: 5.5.8 -- PHP Version: 5.3.5 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SE...
true
67232a30f7122eb2a9a62e864219cf6b648aaf33
SQL
BackupTheBerlios/espumito
/espumito-core/init.sql
UTF-8
1,584
3
3
[]
no_license
insert into core_security_objects (name, description) values ('ROOT', 'Root security object'); insert into core_security_objects (name, father_id, description) values ('ADMIN', 1, 'Administration'); insert into core_security_objects (name, father_id, description) values ('PUBLIC', 1, 'Public access'); insert into core...
true
f10d7216c3607a53d05389dfb99e8f23ffa673f6
SQL
RodrigoBarranco/Biblioteca_T2_PI2
/Scripts SQL/Create Usuario.sql
UTF-8
301
2.828125
3
[]
no_license
-- Table: usuario -- DROP TABLE usuario; CREATE TABLE usuario ( id serial NOT NULL, username character varying(64) NOT NULL, password character varying(64) NOT NULL, admin integer, CONSTRAINT usuario_pk PRIMARY KEY (id) ) WITH ( OIDS=FALSE ); ALTER TABLE usuario OWNER TO postgres;
true
bccbe34c5626a8b622d89af90134428207730aee
SQL
ErikHurum/S2Prog
/Win/ANWIN/Database_schema/insert.sql
UTF-8
3,109
2.796875
3
[]
no_license
-- ** Washing machines ** /*INSERT INTO WashingMachines(Id, Identifier, SerialId, NozzleDiameterMM, TankId, RunningTimeSinceLastService, LifeRunningTime) VALUES (74776576, 'SC30H-RC-1', 'SC30HRC-9990', 6, 68812801, 0.0, 0.0), (74776576, 'SC30H-RC-2', 'SC30HRC-9991', 9, 68812801, 0.0, 0.0), (74776576, 'SC30H-RC-3', '...
true
a41c73ca534315fe3e016c82044956cfd648a8c5
SQL
acabe10/Boletines_BBDD
/boletin3.sql
UTF-8
10,115
3.984375
4
[]
no_license
# 1 Averigua el DNI de todos los clientes. SELECT dni FROM clientes; # 2 Consulta todos los datos de todos los programas. SELECT * FROM programas; # 3 Obtén un listado con los nombres de todos los programas. SELECT nombre FROM programas; # 4 Genera una lista con todos los comercios. SELECT nombre FROM comercios;...
true
377154890abf7b0be9f12a2fc5d22882b406c6d4
SQL
Cepave/open-falcon-backend
/scripts/mysql/dbpatch/change-log/schema-portal/masato-5.sql
UTF-8
802
3.34375
3
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
SET NAMES 'utf8'; CREATE TABLE IF NOT EXISTS event ( id VARCHAR(50), endpoint VARCHAR(100) NOT NULL, metric VARCHAR(200) NOT NULL, func VARCHAR(50), cond VARCHAR(200) NOT NULL, note VARCHAR(500), max_step int(10) unsigned, current_step int(10) unsigned, priority INT(6) NOT NULL, ...
true
b7f789b849ed659552529b044b7eb8d07bd479b9
SQL
OliviaKali/Bamazon
/bamazon.sql
UTF-8
1,588
3.546875
4
[]
no_license
DROP DATABASE IF EXISTS bamazon; CREATE DATABASE bamazon; USE bamazon; CREATE TABLE products( item_id INTEGER NOT NULL AUTO_INCREMENT, product_name VARCHAR(45) NOT NULL, department_name VARCHAR(45) NOT NULL, price INTEGER(10) NOT NULL, stock_quantity INTEGER (10) NOT NULL, PRIMARY KEY (item_id) ); INSER...
true
2a88bd605a407dfdd540bf618dfacf11491a45ab
SQL
shellingford/TimeManagementSystem
/backend/TimeManagementSystem/src/main/resources/schema.sql
UTF-8
723
3.125
3
[]
no_license
CREATE TABLE user ( id INTEGER GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY, role int NOT NULL, name varchar(40), password varchar(255) ); CREATE TABLE permission ( id INTEGER GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY, name varchar(40), role int NOT NULL ); CREATE TABLE time_entry ( id INTEGER GENERA...
true
6672bac21232ec2996b484b03f030f46a7250798
SQL
lidstromberg/requestgatewaypg
/schema/002_Schema.sql
UTF-8
664
3.203125
3
[ "MIT" ]
permissive
CREATE TABLE public.gateway ( gatewayid bigserial not null, appscope character varying(510) COLLATE pg_catalog."default" NOT NULL, remoteaddress character varying(255) COLLATE pg_catalog."default" NOT NULL, createddate timestamp with time zone NOT NULL DEFAULT now(), retireddate timestamp with time ...
true
f410aba049f991f472282d187bc3072929b76cdf
SQL
yoojs1/sql-study
/03_단일행함수.sql
UHC
5,174
3.890625
4
[]
no_license
-- Լ -- Լ -- ҹ ȯ UPPER LOWER INITCAP SELECT UPPER('SQL Course'),LOWER('SQL Course'),INITCAP('SQL Course') FROM DUAL; -- ׽Ʈ ̺ ̿Ͽ -- Լ SELECT SUBSTR('ABCDEFG',3,4), LENGTH('ABCDEFG'), INSTR('ABCDEFG','D') FROM DUAL; SELECT TRIM(' ο '),' ο ' FROM DUAL; -- ش. -- Լ SELECT department_id, last_name FROM emplo...
true
0f21359b30ce24790ef100048eca9fe8a40cb17a
SQL
r-tanya/benvolio-bookstore
/install.sql
UTF-8
3,924
3.78125
4
[]
no_license
CREATE TABLE Publishing_House ( pub_id INT AUTO_INCREMENT NOT NULL, pub_name VARCHAR(30) NOT NULL, year_started INT, PRIMARY KEY (pub_id) ); CREATE TABLE Author ( author_id INT AUTO_INCREMENT NOT NULL, author_name VARCHAR(30) NOT NULL, author_birth_date DATE, author_country CHAR(30), ...
true
7342e21918c38e5f1a741e7950c5198681cbdae8
SQL
yswenli/WebBaseFrameV2
/src/Web/DBScripts/查询所有表及字段.sql
UTF-8
4,260
4.25
4
[ "Apache-2.0" ]
permissive
 SELECT TableName = CASE WHEN C.column_id = 1 THEN O.name ELSE N'' END , TableDesc = ISNULL(CASE WHEN C.column_id = 1 THEN PTB.[value] END, N'') , Column_id = C.column_id , ColumnName = C.name , PrimaryKey = ISNULL...
true
6a360ab79bdda74260f7283f619a18c7c0c195db
SQL
maflorvega/Redash_queries
/queries_versioned/439_Top Market by Listing.sql
UTF-8
2,233
3.921875
4
[]
no_license
/* Name: Top Market by Listing Data source: 4 Created By: Admin Last Update At: 2016-09-08T14:33:46.815815+00:00 */ SELECT H_Lis.marketingGroup_name AS Marketing_Group, H_Lis.brokerage_name AS Brokerage, H_Lis.branch_name AS Branch, H_Lis.agent_name AS Agent, H_Lis.listing_id AS Listing_Id, ...
true
944c1e6144623d624d56ac8a2c6caf9aa1922cbd
SQL
bretweinraub/m81
/sm/src/ChainDB/src/schema/src/parentTask.sql
UTF-8
503
2.90625
3
[]
no_license
-- M80_VARIABLE RDBMS_TYPE -- M80_VARIABLE MODULE_NAME -- M80_VARIABLE SEQ_INCREMENT_NO -- M80_VARIABLE SEQ_INCREMENT_VAL m4_include(m4/base.m4) m4_include(db/generic/tables.m4) m4_include(db/RDBMS_TYPE/RDBMS_TYPE.m4) alter table task add (parent_task_id number(10)); _foreignKeyCustom(task,task,3,parent_task_id) a...
true
9a56592de0000bade9856c36d54839c03e112858
SQL
ysm20140508/fund
/sql/2016-10-25.sql
UTF-8
1,319
4.0625
4
[]
no_license
alter table tbl_bill_order add type int; CREATE TABLE `tbl_bill_balance` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `time` varchar(10) DEFAULT NULL, `balance` float(5,2) DEFAULT NULL, `type` int(1) DEFAULT '0' COMMENT '0:月份', `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`i...
true
9f5a4ed7e0eda6321e5f7633a9d18641555f5e70
SQL
maxsad1/cscripts
/sql/oem/IOD_REPEATING_SPACE_SEGMENT_HIST.sql
UTF-8
2,797
3.328125
3
[]
no_license
---------------------------------------------------------------------------------------- -- -- File name: OEM IOD_REPEATING_SPACE_SEGMENT_HIST -- -- Purpose: CDB Segments History -- -- Frequency: Daily at 12AM UTC -- -- Author: Carlos Sierra -- -- Version: 2019/04/19 -- -- Usage: Execute connecte...
true
50a6daa84732446cfde4a1659c0d2a0c24b2bfe3
SQL
jssdocente/AAD
/Tema2/res/sql/jdbc_dao.sql
UTF-8
682
3.375
3
[]
no_license
DROP TABLE IF EXISTS Empleado; DROP TABLE IF EXISTS Producto; CREATE TABLE `Empleado` ( `id` int(11) NOT NULL, `dni` varchar(100) NOT NULL, `nombre` varchar(100) NOT NULL, `apellido1` varchar(100) NOT NULL, `apellido2` varchar(100) DEFAULT NULL, `edad` int(11) DE...
true
66cc1ac24a878eefa8f59ef09fc2f90f64edb227
SQL
facascante/slimerp
/fifs/db_setup/tblPerson.sql
UTF-8
6,355
3
3
[ "MIT" ]
permissive
DROP TABLE IF EXISTS tblPerson; CREATE TABLE tblPerson ( intPersonID int(11) NOT NULL AUTO_INCREMENT, intRealmID int(11) NOT NULL DEFAULT 0, strExtKey varchar(20) NOT NULL DEFAULT '''', strPersonNo varchar(15) NOT NULL DEFAULT '', strNationalNum varchar(30) DEFAULT '', strFIFAID varchar(30) de...
true
c0468687c4dbafd0b4c58f4a18930a8df466cd9f
SQL
wningLemon/taskThirteen
/gitHomeWork/taskEight&Nine/baidunews/jike.sql
UTF-8
3,169
2.765625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: 2016-11-28 16:18:44 -- 服务器版本: 10.1.13-MariaDB -- PHP Version: 5.6.21 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40...
true
87a1a5fc7ee662d269060b1398067c490c20c829
SQL
Khevinn/WEB-I
/Atividade_rani/bds.sql
UTF-8
395
2.890625
3
[]
no_license
DROP DATABASE IF EXISTS lol; CREATE DATABASE lol; use lol; CREATE TABLE usuario ( id INT NOT NULL AUTO_INCREMENT, email VARCHAR(30) NOT NULL, nome VARCHAR(30) NOT NULL, senha VARCHAR(60) NOT NULL, PRIMARY KEY(id) ); CREATE TABLE champions ( id INT NOT NULL AUTO_INCREMENT, nome VARCHAR(30) NOT NULL, cla...
true
fde9d9b5680495a03ce42b3dcb00351feb043652
SQL
telebrett/tagal
/server/schema.sql
UTF-8
2,062
4.09375
4
[]
no_license
-- Requires MySQL/MariaDB 5.6+ CREATE TABLE setting ( id int(10) unsigned auto_increment ,Name varchar(250) ,Value varchar(250) ,PRIMARY KEY(id) ) ENGINE=InnoDB CHARSET=UTF8; CREATE TABLE tag ( id int(10) unsigned auto_increment ,Tag VARCHAR(250) CHARACTER SET utf8 COLLATE utf8_bin ,IsPerson tinyint(0) NOT NULL DEFA...
true
ae113b95b3bc07e7f04e52c03c07f51e99565f79
SQL
ElifKarakutukDinc/dvd_rental
/understanding_dvd_rental_db/Script-51.sql
UTF-8
167
3.109375
3
[]
no_license
--What is the average payment in weekend? Hint: EXTRACT(ISODOW FROM date) IN (6, 7) select avg(amount) from payment where EXTRACT(ISODOW FROM payment_date) IN (6, 7);
true
68eb48a47feeff0cfc4775af7dae1837309afe2f
SQL
tjcsl/iodine
/mysql/permissions.sql
UTF-8
290
2.671875
3
[ "Apache-2.0" ]
permissive
/* ** Defines permissions and maps them to names. */ DROP TABLE IF EXISTS permissions; CREATE TABLE permissions( pid MEDIUMINT UNSIGNED UNIQUE NOT NULL DEFAULT NULL AUTO_INCREMENT, PRIMARY KEY(pid), name VARCHAR(255) NOT NULL DEFAULT '', description VARCHAR(255) NOT NULL DEFAULT '' );
true
dc664b9dc38a4e487bed217ebc19a2147e8e4d22
SQL
ssalgadoe/emergencyAlertGenerator
/database-structure.sql
UTF-8
1,849
2.890625
3
[]
no_license
DROP TABLE public.alertSource; CREATE TABLE public.alertSource ( id serial primary key, name VARCHAR(100), url VARCHAR(200), description VARCHAR(200), sourceTypeID integer NOT NULL, classificationID integer NOT NULL, trustLevel integer, languageId integer NOT NULL ); DROP TABLE publ...
true
5c50b9877cea8be0584dfc656b7797564809197b
SQL
tarunagarwal7/ePos
/ePos Database/Queries/Dashboard - Right panel.sql
UTF-8
2,784
4.40625
4
[]
no_license
-- -- TODAYS METRICS -- Number of Completed Transactions for Today -- @param : Rest_ID ; ID of the restaurant SELECT IFNULL(COUNT(ID),0) FROM ORDERS WHERE DATE(ENDED) = DATE(SYSDATE()) AND REST_ID = 1 AND ACTIVE =0; -- Total Sales for today -- @param : Rest_ID ; ID of the restaurant SELECT IFNULL(SUM(TOTA...
true
96f4b31e690575ce9b49a716cf8f3bd3cb696faa
SQL
imojen/mtg
/data/sql/MTG_Table.sql
UTF-8
5,208
3.484375
3
[]
no_license
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8 */; -- -- Base de données : `MTG` -- CREATE DATABASE...
true
05d63412a78060eb2afa78d6b62878a5c252bc64
SQL
vikgilmuc/sh-dev
/administrator/components/com_shbesuche/sql/updates/sql/install.sql
UTF-8
513
2.703125
3
[]
no_license
DROP TABLE IF EXISTS `#__shbesuche`; CREATE TABLE IF NOT EXISTS `#__shbesuche` ( `id` int(11) NOT NULL AUTO_INCREMENT, `owner` varchar(50) DEFAULT NULL, `category` varchar(50) DEFAULT NULL, `title` varchar(100) DEFAULT NULL, `description` text, `state` varchar(50) DEFAULT NULL, `value` varchar(12) DEFAUL...
true
a360e13e141b1dc0e5eedf6e3acc381a116cb612
SQL
temios/student-exams
/session.sql
UTF-8
6,715
3.25
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.0.10.10 -- http://www.phpmyadmin.net -- -- Хост: 127.0.0.1:3306 -- Время создания: Июн 03 2016 г., 06:53 -- Версия сервера: 5.5.45 -- Версия PHP: 5.6.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT ...
true
e96c1d27d502bdeef030b5827545ff6a48820404
SQL
GeorgeAria/CSProjectFiles
/Quotation Display Webpage/quotes.sql
UTF-8
1,922
3.28125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.0.10deb1 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Dec 12, 2015 at 01:02 PM -- Server version: 5.5.44-0ubuntu0.14.04.1 -- PHP Version: 5.5.9-1ubuntu4.14 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_C...
true
b8f24663d0b7acec9d916d5e9e4a34e6a66729c1
SQL
Noobunaga/weekend-sql-to-do-list
/database.sql
UTF-8
511
3.21875
3
[]
no_license
--add database name: weekend-to-do-app -- query to make table CREATE TABLE toDoList ( "id" serial PRIMARY KEY, "task" varchar(80) NOT NULL, "notes" varchar(250), "completed" boolean ); -- query to populate table INSERT INTO toDoList ("task", "notes", "completed") VALUES ('Laundry', 'kids clothes', 'F...
true