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
489545ee9c5591cd8c31354c1e1fade6fe09f380
SQL
MrBean1512/DBMS_Group
/docs/initialize_db.sql
UTF-8
3,888
3.875
4
[]
no_license
DROP database task_manager; CREATE DATABASE task_manager; USE task_manager; CREATE TABLE color ( color varchar(255) NOT NULL PRIMARY KEY, A int NOT NULL, R int NOT NULL, G int NOT NULL, B int NOT NULL ); CREATE TABLE user( ID int NOT NULL PRIMARY KEY AUTO_INCREMENT, password varchar(255) NOT NU...
true
9c5db4ec6215960433d706e5304378c9df076f64
SQL
TomOrth/trenton-catalog-system
/code/queries/insert/insert_locations.sql
UTF-8
319
2.578125
3
[ "MIT" ]
permissive
-- Inserts a street_name into the locations relation -- Values hardcoded for demonstrative purposes. Please update to match the values you want inserted -- Query created as a group. File created by Thomas Orth. Reviewed by Matthew Van Soelen and Justin Pabon INSERT INTO locations(street_name) VALUES ('Union Street'), (...
true
9352b9627703fa3690c790fca5dbb97b3244324d
SQL
WispyBean/planets
/data/sql/create_db.sql
UTF-8
1,437
3.359375
3
[ "MIT" ]
permissive
-- Prepares empty 'devstronomy' database. -- -- 'jconverter' tool currently depends on the empty database being prepared. CREATE DATABASE devstronomy; USE devstronomy; CREATE TABLE planet ( id INT NOT NULL AUTO_INCREMENT, name VARCHAR(255) NOT NULL, mass DECIMAL(16,6) NOT NULL, diameter DECIMAL(16,6) NOT NUL...
true
ee1d426c563d2f8bbeb690276b167f555e341e3a
SQL
smirnovDm/vodonosflowers
/svr_yii.sql
UTF-8
14,394
3.03125
3
[]
permissive
-- phpMyAdmin SQL Dump -- version 4.8.3 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1:3306 -- Generation Time: Sep 17, 2019 at 06:38 PM -- Server version: 5.6.41 -- PHP Version: 7.0.32 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CH...
true
c917c4c2d8ef9fa30d690fbfddb8f3170c0ae287
SQL
t7ahaa00/Parkissa-projekti
/backend/database/Routines/createLog.sql
UTF-8
512
2.671875
3
[]
no_license
CREATE DEFINER=`admin`@`%` PROCEDURE `createLog`( IN idParkingLot INT(11), idParkingArea INT(11) ) BEGIN INSERT INTO log VALUES( idParkingLot, (SELECT name FROM parkinglot WHERE idparkinglot = idParkingLot), null, NOW(), (SELECT COUNT(*) FROM grid WHERE idparkingarea = idParkingArea AND occupi...
true
4984764f7c3e63c41ce85d2af8cc746f60e05fbd
SQL
readybytes/jspt
/test/test/unit/front/acl/sql/AclGroupTest/testCreate.start.sql
UTF-8
1,604
2.875
3
[]
no_license
TRUNCATE TABLE `#__community_users`;; INSERT INTO `#__community_users` (`userid`) VALUES (62), (83), (84), (85), (86), (87), (79), (80), (81), (82) ;; TRUNCATE TABLE `#__xipt_profiletypes` ;; INSERT INTO `#__xipt_profiletypes` (`id`, `name`, `ordering`, `published`) VALUES (1, 'PROFILETYPE-1', 2, 1), (2, 'PROFILETYPE-...
true
bb2911b7980cfd2fd8f48506eda82f73fc560742
SQL
TakeActionNow/OSM
/Ronin/Database1/childcontract/Tables/child_contract_day_rel.sql
UTF-8
1,651
3.484375
3
[]
no_license
CREATE TABLE [childcontract].[child_contract_day_rel] ( [child_contract_day_id] INT IDENTITY (1, 1) NOT NULL, [child_contract_id] INT NOT NULL, [day_of_week_id] INT NOT NULL, [product_id] INT NOT NULL, [organizational_uni...
true
3f9275a5e6f9b88fa4b7eab03ba1b47a179c18c3
SQL
HEDAETUL-ISLAM/Shop-Management-System
/Database/purchase_info.sql
UTF-8
2,504
2.703125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.2 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: Aug 29, 2018 at 03:58 PM -- Server version: 10.1.34-MariaDB -- PHP Version: 7.2.8 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
true
89bce6ef01acda118d571c2dbe4dd60e3629b56c
SQL
bendeleon1226/dbscripts
/pse/BuySellStocks.sql
UTF-8
627
2.9375
3
[]
no_license
CREATE TABLE BUY_SELL_STOCKS( id NUMBER, stock_symbol VARCHAR2(10) NOT NULL, BUY_PRICE NUMBER(11,4), SELL_PRICE NUMBER(11,4), IS_ENABLED CHAR(1) DEFAULT 'Y', IS_DELETED CHAR(1) DEFAULT 'N', CREATED_DATE DATE, MODIFIED_DATE DATE, CONSTRAINT "BUY_SELL_STOCKS_PK" PRIMARY KEY ("ID") ENABLE ) / CREATE TA...
true
4d5133190bac7c4269caa3ef8f52aed1cb972267
SQL
apyoung/Wheres_That_Foam_Roller
/src/sql/view_store_list.sql
UTF-8
174
3.265625
3
[]
no_license
SELECT store.*, company.name AS 'Parent Company' FROM store, company, owns WHERE store.storeid = owns.storeid AND owns.companyname = company.name
true
c6e2bd2e9d033e2da96d275aafbb487561a4636e
SQL
suriyapriya/newscenter
/newscenter_db.sql
UTF-8
2,766
3.09375
3
[]
no_license
CREATE TABLE IF NOT EXISTS news_details ( newsid int(11) NOT NULL AUTO_INCREMENT, username varchar(20) DEFAULT NULL, headline varchar(200) DEFAULT NULL, summary varchar(500) DEFAULT NULL, newsbody varchar(1000) DEFAULT NULL, companyname varchar(30) DEFAULT NULL, companyemail varchar(50) DEFAULT NULL, d...
true
14acb00290e928cc4857cdfb2a12bbe9f8e4a67e
SQL
omika-dd/CSC343---Introduction-to-Databases
/A2/A2Q1.sql
UTF-8
1,959
4.1875
4
[]
no_license
-- q1.sql SET search_path TO bnb, public; drop view if exists BookingsLast10 cascade; drop view if exists RequestsLast10 cascade; -- We want the last 10 completed years from the current date, --so if today is Nov 10, 2016, then we will include 2006-2015 in the result. create view BookingsLast10 as select travelerId...
true
a805a898b090587f872c84e86cc4e713565595cc
SQL
sangyoonlee019/ITE2038_DataBaseSystems
/project1/28.sql
UTF-8
251
3.828125
4
[]
no_license
select t.name, r.lavg from Trainer t, (select c.owner_id, avg(c.level) lavg from CatchedPokemon c, Pokemon p where p.id=c.pid and (p.type='Normal' or p.type='Electric') group by c.owner_id) r where r.owner_id=t.id order by r.lavg;
true
595a60f89d16de19b811e4fb42f3bfd98d969369
SQL
ndiayemtr/Police
/web/maBase/asi_police .sql
UTF-8
21,775
3.09375
3
[ "BSD-3-Clause", "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.6.4 -- https://www.phpmyadmin.net/ -- -- Client : 127.0.0.1 -- Généré le : Mar 22 Janvier 2019 à 16:46 -- Version du serveur : 5.7.14 -- Version de PHP : 7.0.10 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER...
true
b8affc97a9b58cf841e1375ced56c4d8936b3642
SQL
KRMeteor/assignment-02-postgis-analytics
/query04.sql
UTF-8
832
3.84375
4
[]
no_license
/* Using the shapes.txt file from GTFS bus feed, find the two routes with the longest trips. In the final query, give the trip_headsign that corresponds to the shape_id of this route and the length of the trip. */ alter table septa_bus_shapes add column shape_the_geom geometry(Geometry, 32129); UPDATE septa_bus_...
true
71146b654f78a2b8107d3dc77c2775a7862db749
SQL
honzikv/codeguideswebapp
/db/table/role_lov.sql
UTF-8
154
2.984375
3
[]
no_license
create table if not exists role_lov ( id int auto_increment primary key, role varchar(255) null, constraint role_lov_role_uindex unique (role) );
true
3e95c8cba8922863d55d105ab7d969121c3a8bc5
SQL
Omnikron13/phlitebb
/sql/threads_current_title_view.sql
UTF-8
268
3.8125
4
[]
no_license
CREATE VIEW IF NOT EXISTS threads_current_title_view AS WITH edits AS ( SELECT MAX(id) id, title, threadID FROM threads_edits GROUP BY threadID ) SELECT t.id id, IFNULL(e.title, t.title) title FROM threads t LEFT JOIN edits e ON t.id = e.threadID;
true
f1c28702566bf5cb3e236746f584c17c4dad4543
SQL
au-research/ANDS-ResearchData-Registry
/etc/db/postgres/pids_r10.1_to_r10.2.sql
UTF-8
638
3.015625
3
[ "Apache-2.0", "LicenseRef-scancode-warranty-disclaimer", "LicenseRef-scancode-unknown-license-reference" ]
permissive
-- R11 release changes ALTER TABLE trusted_client ADD COLUMN created_when timestamp with time zone DEFAULT now(); CREATE OR REPLACE VIEW search_view AS SELECT encode(handles.handle, 'escape'::text) AS handle, encode(handles.data, 'escape'::text) AS data FROM handles WHERE handles.type = 'DESC'::bytea OR handles.type ...
true
f36836899c2779fb9754d46d7b39ca4737e39995
SQL
ReneRaube/dataV2-labs
/module-1/mySQL/„mySQL-lab“ Challenge2 and 3.sql
UTF-8
2,969
3.53125
4
[]
no_license
USE lab_mysql; CREATE TABLE cars_final ( VIN INT AUTO_INCREMENT PRIMARY KEY, manufacturer VARCHAR(20) NOT NULL, model VARCHAR(20), year INT, color VARCHAR(20), created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ); CREATE TABLE Salespersons ( staff_ID INT AUTO_INCREMENT PRIMARY KEY, staff_name VARCHAR(20) NOT NULL, ...
true
e010d0bba84b77c0e9a226e06b2662cf1cd8ff4c
SQL
amunhotep/lib-th001
/IDE/ERP/CONFIG2/OPER/SYNC/SQL001/PROC$_EXCHANGE_J_1000069_ARC.SQL
UTF-8
1,395
3.40625
3
[]
no_license
CREATE OR ALTER PROCEDURE PROC$_EXCHANGE_J_1000069_ARC ( Q_DATABASEPATH TYPE OF COLUMN TABL$R_FILIALS.DATABASE_NAME, Q_USERNAME TYPE OF COLUMN TABL$_USERS.ID, Q_USERPWD TYPE OF COLUMN TABL$_USERS.PWD, Q_FILIAL_ID TYPE OF COLUMN TABL$R_FILIALS.ID, Q_J_ID TYPE OF COLUMN TABL$J_4.ID) RE...
true
daa55616c7778a5e896531e69c0e1033ac87db68
SQL
josepitteloud/VESPA
/Vespa Projects/002 - Trollied Analysis/002 - Create UK Base for Weighting and Stratification.sql
WINDOWS-1250
44,549
3.5
4
[]
no_license
/*------------------------------------------------------------------------------ Project: Postratification Sky base Version: 1 Created: 20111108 Lead: Gavin Meggs Analyst: Sarah Jackson SK Prod: 10 Updated 20111129 DBarnett --Main Changes - ...
true
274d46c9d88eb4f72cd71fee4d462f1b94b21f80
SQL
vik407/holbertonschool-higher_level_programming
/0x0E-SQL_more_queries/2-create_read_user.sql
UTF-8
296
2.828125
3
[]
no_license
-- A script that creates the database hbtn_0d_2 and the user user_0d_2. -- The database CREATE DATABASE IF NOT EXISTS hbtn_0d_2; -- The user CREATE USER IF NOT EXISTS user_0d_2@localhost IDENTIFIED BY "user_0d_2_pwd"; -- Grant privileges GRANT SELECT ON hbtn_0d_2. * TO user_0d_2@localhost;
true
02b40acf426c573addaf2ae0120b35f3ad378d78
SQL
tamiegf/Db2017
/Db2017_Phase3/SQL_Scripts/user_login_table_insertions.sql
UTF-8
1,023
2.640625
3
[]
no_license
-- This file contains several queries to populate the 'user_login' table -- In pgadmin3 inside 'disaster_app_db' select the sql button, copy this schema and click on the run button. insert into user_login(user_name, user_password, uid) values ('pRivera', 'icom4015@uprm', 1); insert into user_login(user_name, user_pas...
true
df719254e9bef01d2263120a95ed607cb0a5d760
SQL
jeffreyfox/LeetCode
/Database/181_employees_earning_more_than_their_managers.sql
UTF-8
152
3.421875
3
[]
no_license
SELECT Employee.Name AS Employee FROM Employee INNER JOIN Employee AS Manager ON Employee.ManagerId=Manager.Id WHERE Employee.Salary > Manager.Salary
true
6309ead58a5265ec66036100011484aa0c114437
SQL
radtek/Database-3
/oracle/admin/scripts/dba_tab_col_statistics.sql
UTF-8
556
3.28125
3
[]
no_license
--dba_tab_col_statistics set lines 400 clear col col owner for a30 col column_name for a30 col data_type for a30 col table_name for a30 col low_value for a30 col high_value for a30 select a.*, b.data_type from dba_tab_col_statistics a, dba_tab_columns b where a.owner like upper ('%&owner%') and a.table...
true
267c76be696b9e414aed057f48c8c06afd72dad5
SQL
ruanhq/Leetcode
/SQL/1212.sql
UTF-8
610
4.15625
4
[]
no_license
#Team scores in Football Tournament WITH A1 AS( SELECT * FROM Teams LEFT JOIN Matches ON Teams.team_id = Matches.host_team OR Teams.team_id = Matches.guest_team ) SELECT team_id, team_name, SUM(CASE WHEN team_id = host_team AND host_goals > guest_goals THEN 3 ELSE 0 END) + SUM(CASE WHEN team_id = guest_team AND gu...
true
d7a0646b1b7209f4ea9b18bd7f850074f7e2b69e
SQL
lgueye/ha-playground
/platform/ansible/roles/store/db_privileges/files/schema.sql
UTF-8
550
3.796875
4
[]
no_license
DROP TABLE IF EXISTS events_timeline CASCADE; CREATE TABLE events_timeline ( event_id VARCHAR(255) NOT NULL, state VARCHAR(50) NOT NULL, inserted_at BIGINT NOT NULL, timestamp BIGINT NOT NULL, sensor_bid VARCHAR(255) NOT NULL, PRIMARY KEY (event_id) ); CREATE INDEX idx_events_time...
true
eb08e84555497b85c6cc66d7505b3bcefaf2c421
SQL
MikaelCosta10/infoproj
/bd_infoproj.sql
UTF-8
3,994
3.390625
3
[ "Apache-2.0" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.1.14 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: 08-Set-2018 às 04:26 -- Versão do servidor: 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 */;...
true
6ff1f337aca6cdb61e90b9d77c23a894932ee8ef
SQL
carl-richards/Code-Examples
/PL-SQL/OR.sql
UTF-8
2,489
4.5
4
[]
no_license
The OR condition allows you to create an SQL statement where records are returned when any one of the conditions are met. It can be used in any valid SQL statement - select, insert, update, or delete. The syntax for the OR condition is: SELECT columns FROM tables WHERE column1 = 'value1' or column2 = ...
true
19f662ea35b5d22aa4a311d290d9de26b525eecc
SQL
jdebran/KC_Practica_Data-101
/SQL_FILES/FK LLAMADAS.sql
UTF-8
643
3.265625
3
[]
no_license
/* FK LLAMADAS */ USE ODS; ALTER TABLE ODS_HC_LLAMADAS ADD INDEX fk_lla_cli_idx (ID_CLIENTE ASC); ALTER TABLE ODS_HC_LLAMADAS ADD CONSTRAINT fk_lla_cli FOREIGN KEY (ID_CLIENTE) REFERENCES ODS_HC_CLIENTES (ID_CLIENTE); ALTER TABLE ODS_HC_LLAMADAS ADD INDEX fk_lla_dep_idx (ID_DEPARTAMENTO_CC ASC); ALTER TABLE ODS_HC_LL...
true
41f03f883a3dc8e673f56c01b26f6cce136f7c20
SQL
moshiurse/solve_sql_problem
/hackerrank/Weather Observation Station 6.sql
UTF-8
226
3.265625
3
[]
no_license
--Query the list of CITY names starting with vowels (i.e., a, e, i, o, or u) from STATION. --Your result cannot contain duplicates. SELECT distinct `city` FROM STATION WHERE SUBSTRING(`city`,1,1) IN ('a','e','i','o','u')
true
0411b66b2cbb687c924680d596327d3fc70f852b
SQL
infriend/infriend-homework
/data base theory/ex03_create table.sql
UTF-8
381
2.96875
3
[]
no_license
create table student ( Sno char(6) primary key, Sname varchar(24) not null, Ssex char(2) not null, Sage smallint not null, Sdept char(10) not null ) create table Course ( Cno char(2) primary key, Cname varchar(24) not null, Cpno char(2), Ccredit smallint not null ) create table SC ( Sno char(6) not null, Cno...
true
505d3e75de87db9015e3c8213e2fad30e0f8f4e1
SQL
Paradoxis/Siek-Communicatie
/database.sql
UTF-8
3,256
4.03125
4
[ "MIT" ]
permissive
-- Add user CREATE USER 'siek'@'localhost' IDENTIFIED BY ''; -- Create the database create database if not exists `Siek`; use `Siek`; -- Permissions GRANT INSERT ON `Siek`.* TO 'siek'@'localhost'; GRANT SELECT ON `Siek`.* TO 'siek'@'localhost'; GRANT DELETE ON `Siek`.* TO 'siek'@'localhost'; GRANT UPDATE ON `Siek`.* ...
true
67b80e3e244a228ccf1f85e4fb9a576daa2330a8
SQL
ArundeepChohan/Coursework
/2221/Milestone/Milestone4/Create.sql
UTF-8
2,536
3.34375
3
[]
no_license
CREATE TABLE Server ( serverName VARCHAR(20) NOT NULL, timeZone VARCHAR(20) NOT NULL, worldBoss VARCHAR(20) NOT NULL, numberOfPlayers VARCHAR(3) NOT NULL, type VARCHAR(3) NOT NULL, PRIMARY KEY (serverName) ); CREATE TABLE Region ( areaId NUMERIC(2) NOT NULL, RegionName VARCHAR(20) NOT NULL, HostLocation VARC...
true
d7feab591434d247dc6002fb3d04dadf1693b6f0
SQL
microsoft/pgtoolsservice
/pgsmo/objects/collation/templates/+default/nodes.sql
UTF-8
532
3.203125
3
[ "MIT" ]
permissive
{# # pgAdmin 4 - PostgreSQL Tools # # Copyright (C) 2013 - 2017, The pgAdmin Development Team # This software is released under the PostgreSQL Licence #} {% import 'systemobjects.macros' as SYSOBJECTS %} SELECT c.oid, c.collname AS name, nsp.nspname AS schema, nsp.oid AS schemaoid, ...
true
83d91475ade06536319c8855bec21e76831cad31
SQL
RayBeedrill/webCourse
/5.rest&soap/soapTask2/db/geekAuto.sql
UTF-8
7,347
3.171875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.4.15.7 -- http://www.phpmyadmin.net -- -- Хост: 127.0.0.1:3306 -- Время создания: Сен 28 2017 г., 14:56 -- Версия сервера: 5.5.50 -- Версия PHP: 5.6.23 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT *...
true
6a957933db0d1e6d4a1dccc3729832b296d18f05
SQL
hidr0/elsys-db-practices
/2022-2023/School-Assigment/15_School.sql
UTF-8
4,269
4.3125
4
[]
no_license
DROP DATABASE IF EXISTS n15; CREATE DATABASE n15; USE n15; SET sql_safe_updates = 0; SET sql_mode = only_full_group_by; CREATE TABLE School( id int PRIMARY KEY AUTO_INCREMENT, name VARCHAR(50) NOT NULL UNIQUE ); CREATE TABLE Class( id int PRIMARY KEY AUTO_INCREMENT, cl int NOT NULL CHECK(cl BETWEEN 1 AND 1...
true
05a79ae5656ee3d65ae45259717dce6a8a4a6972
SQL
erwinve/4-op-een-rij
/4opeenrij.sql
UTF-8
4,471
3.09375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.7.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Gegenereerd op: 08 feb 2019 om 14:04 -- Serverversie: 10.1.26-MariaDB -- PHP-versie: 7.1.9 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACT...
true
1ed6a0f50fd8aafb2c036e5953d5f4af8dcfccaa
SQL
Roberto-coder/CRUD
/database/db.sql
UTF-8
369
2.96875
3
[]
no_license
CREATE DATABASE db_articulos; USE db_articulos; CREATE TABLE articulo( id INT(12) NOT NULL, nombre VARCHAR(80) NOT NULL, img TEXT NOT NULL, categoria VARCHAR(100) NOT NULL, descripcion VARCHAR(200) NOT NULL ); ALTER TABLE articulo ADD PRIMARY KEY (id); ALTER TABLE articulo MODIFY id INT...
true
01e2dd4148a9c30fec731cee1c94f295b8845024
SQL
tavo1981/phpbar
/libs/scripts/merenda.sql
UTF-8
2,042
3.15625
3
[]
no_license
CREATE TABLE cardapios ( car_id serial NOT NULL, car_nome VARCHAR(35) NULL, car_descr TEXT NULL, PRIMARY KEY(car_id) ); CREATE TABLE grupos_alimentares ( gra_id serial not null, gra_descr VARCHAR NULL, PRIMARY KEY(gra_id) ); CREATE TABLE alimentos ( ali_id serial NOT NULL, ali_descricao VARCHAR(50) ...
true
6ae09db2f4eda23e6581a0748a5233ce039594ef
SQL
AlexanderCust/newproject
/code/db_scripts/sneakers_kononov/views/views.sql
WINDOWS-1251
901
3.703125
4
[]
no_license
create or replace view view_1 as select distinct count(1) pers, to_char(to_date(value_day), 'mm') as month from visitings group by to_char(to_date(value_day), 'mm');-- create or replace view view_2 as select distinct sum(value_amt) sum_val, to_char(to_date(value_day), 'mm') as month from...
true
60f83bcaf7bf12da322da282f1975a379e5d53bf
SQL
amytina1998/movingPHP
/table_sql/vehicle_demand_table.sql
UTF-8
394
2.890625
3
[]
no_license
CREATE TABLE `vehicle_demand`( `order_id` int(10), /*訂單&估價單*/ `num` int(10), /*數量*/ `vehicle_weight` varchar(10), /*車輛噸位*/ `vehicle_type` varchar(99) CHARACTER SET utf8, /*車輛種類*/ PRIMARY KEY (order_id, vehicle_weight, vehicle_type), FOREIGN KEY (order_id) REFERENCES orders(order_id) ON DELETE CASC...
true
cb93d4c8fbf74e56a717114ff8cb4d810d6c511f
SQL
elonable16/oracle-study-ex
/0724 oracle/ex01.sql
UHC
693
3.375
3
[]
no_license
/*TABLESPACE */ CREATE TABLESPACE md_tbs DATAFILE 'D:\elon\oracle\md_tbs_data01.dbf' size 10M; /* */ CREATE USER mdguest IDENTIFIED BY mdguest; CREATE USER mdguest2 IDENTIFIED BY mdguest2 DEFAULT TABLESPACE md_tbs; /* 㰡*/ GRANT CONNECT, RESOURCE TO mdguest; GRANT CONNECT, RESOURCE TO mdguest2; /*ALTER user _____ accou...
true
58f298219663d9d313a4345b786e48716fdb65ac
SQL
LuisPFdez/LoginLogoffTema5
/scriptsDB/CrearDAW204DBProyectoTema5.sql
UTF-8
1,911
3.75
4
[]
no_license
/** * Author: daw2 * Created: 25 nov. 2020 */ -- Script de Miguel Angel -- Crear base de datos -- CREATE DATABASE if NOT EXISTS (Nombre base de datos); -- Uso de la base de datos. -- USE (Nombre base de datos); -- Crear tablas. -- CREATE TABLE IF NOT EXISTS (Nombre tabla);( -- ...
true
5b5355accf654c737c8d48f3de7624008c6eb31e
SQL
IAmNiloy/sudipta-saha
/bear.sql
UTF-8
1,631
4
4
[]
no_license
--DB CREATION SCRIPTS OFTEN BEGIN WITH DROP STATEMENTS --AVOID CLASHES WITH TABLES DROP TABLE BEAR; / DROP TABLE BEAR_TYPE; / DROP TABLE CAVE; / DROP TABLE BEEHIVE; / DROP TABLE BEAR_BEEHIVE; / --TABLE CREATION WITH PRIMARY KEYS CREATE TABLE BEAR ( BEAR_ID INTEGER PRIMARY KEY, BEAR_NAME VARCHAR2(100), --100 ...
true
d05a347fbeecd48bcd28220abe5635e52d6bf456
SQL
Duzhongwen/blog-java
/src/main/resources/sql/Log.sql
UTF-8
320
3.109375
3
[]
no_license
/** 日志Log表 */ CREATE TABLE IF NOT EXISTS Log( --自增id id int(10) primary key AUTO_INCREMENT, --日志内容 content Text, -- 日志类型 logType ENUM('login','comment','post','delete') default 'post', -- 创建时间 create_time datetime NOT NULL, -- 修改时间 update_time timestamp );
true
361b0d8718231756618947b490fe3aaee3854e29
SQL
slimdim/edu-db
/hw-10/ex-2.sql
UTF-8
1,291
4.28125
4
[]
no_license
-- 2е задание. Задание на оконные функции. Построить запрос, который будет выводить следующие столбцы: -- имя группы -- среднее количество пользователей в группах -- самый молодой пользователь в группе -- самый старший пользователь в группе -- общее количество пользователей в группе -- всего пользователей в системе --...
true
e313645a742a06b68d6cd39ebe34d6ee527948b2
SQL
dspearson/authtest
/src/authtest/db/sql/users.sql
UTF-8
591
3.34375
3
[ "ISC" ]
permissive
-- users -- :name create-users-table -- :command :execute -- :result :raw -- :doc Create users table create table users (email blob, password blob, uid string) -- :name get-user :? -- :result :1 select email, password, uid from users where email = :email; -- :name get-user-by-...
true
de1d1275f01f7d842c8a27e4b59cdafd9382ea42
SQL
silence-do-good/stress-test-Postgres-and-MySQL
/dump/high/day16/select2113.sql
UTF-8
478
3.640625
4
[]
no_license
SELECT obs.sensor_id, avg(counts) FROM (SELECT sensor_id, date_trunc('day', timestamp), count(*) as counts FROM WiFiAPObservation WHERE timestamp>'2017-11-15T21:13:00Z' AND timestamp<'2017-11-16T21:13:00Z' AND SENSOR_ID = ANY(array['377005bd_4da2_4564_9e30_e48a769fcd23','3141_clwa_1100','48999848_6010_4aa4_8a3...
true
7d4380aca39c17af34ebd20011f9063f5c58963b
SQL
AnhNguyen92/Java-Core
/src/main/java/javacore/algorithm/leetcode/under0700/not-boring-movies.sql
UTF-8
142
2.65625
3
[]
no_license
/* * LeetCode 620. Not Boring Movies */ select * from cinema where mod(id, 2) = 1 and description != 'boring' order by rating desc;
true
a2055a954a157255bd2a293abc6e6eaa35e8df58
SQL
XuejieGuo/Sql-practice
/Leetcode/1565_UniqueOrdersandCustomersPerMonth.sql
UTF-8
183
3.078125
3
[]
no_license
select DATE_FORMAT(order_date,'%Y-%m') as month, count(distinct order_id) as order_count, count(distinct customer_id) as customer_count from orders where invoice>20 group by 1
true
a6bcfff86e18aa80813d02a95189429c7c14f1e2
SQL
RedlineAlexander/TestovoeZadanie
/testovoezadanielardtrans.sql
UTF-8
5,476
3.390625
3
[]
no_license
create database telephonaya_kniga; use telephonaya_kniga; /* Логин (только английские символы, не меньше 3х, без спецсимволов) Пароль (минимум 5 символов) ФИО (минимум 5 символов) Хранимая информация (одна запись) Фамилия (обязательный, минимум 4 символа) Имя (обязательный, минимум 4 символа) Отчество (обязательный, ми...
true
e378a971d8b256f59f15e331f7815344b2c83896
SQL
pionoor/CSC310-Project
/update.sql
UTF-8
522
3.0625
3
[]
no_license
--update.sql /* Update and Deletion Commands*/ UPDATE Student SET Major = 'Computer Engineering' WHERE Major = 'Computer Science'; UPDATE College SET NumStudents = 25000 WHERE Name = 'Dwight Look College of Engineering'; DELETE FROM Employee WHERE Employment_ID < 2000 AND Employment_ID > 1000; DELETE FROM Professio...
true
6d17dbc86cc2b4fa0ad7d5b6689029565efd7102
SQL
aledjust/AIR-CRAFT
/INSTALLER/AIRCRAFT.sql
UTF-8
8,809
2.984375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Jun 11, 2016 at 02:34 PM -- Server version: 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_CL...
true
2320aaebe8efc2a8bed2587578bb8f8bb4c0ebbc
SQL
silence-do-good/stress-test-Postgres-and-MySQL
/dump/low/day27/select0219.sql
UTF-8
405
3.578125
4
[]
no_license
SELECT obs.sensor_id, avg(counts) FROM (SELECT sensor_id, date_trunc('day', timestamp), count(*) as counts FROM WiFiAPObservation WHERE timestamp>'2017-11-26T02:19:00Z' AND timestamp<'2017-11-27T02:19:00Z' AND SENSOR_ID = ANY(array['wemo_02','3144_clwa_4065','3142_clwa_2209','3141_clwa_1500','3145_clwa_5059'])...
true
3c0dd24eccb540174b31a4b4c5b88d6056014ef5
SQL
MaitRaidmae/AppAnalyzerPLSQL2
/B_LOV_CHECK_PARS_CONSTRAINT.sql
UTF-8
718
2.6875
3
[]
no_license
-------------------------------------------------------- -- Constraints for Table B_LOV_CHECK_PARS -------------------------------------------------------- ALTER TABLE "HUNDISILM"."B_LOV_CHECK_PARS" MODIFY ("LCP_CODE" NOT NULL ENABLE); ALTER TABLE "HUNDISILM"."B_LOV_CHECK_PARS" MODIFY ("LCP_CHK_CODE" NOT NULL ENA...
true
5cc621f596175a32b65019e5e48893487e4b97be
SQL
Anjalips/AJCENSS-main
/minipro (5).sql
UTF-8
20,854
2.9375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.9.0.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Mar 28, 2020 at 04:39 AM -- Server version: 10.4.6-MariaDB -- PHP Version: 7.3.9 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OL...
true
27fd2489fa505f721ae0da1d1977f1c102a464bc
SQL
vijaydairyf/TimelyFish
/SolomonApp/dbo/Views/dbo.vCF402RationSumm.sql
UTF-8
576
2.75
3
[]
no_license
 CREATE VIEW vCF402RationSumm AS --************************************************************* -- Purpose:Ration Summary Report -- Author: Boyer & Associates--LRF -- Date: 8/31/04 -- Usage:Report CF402RationSummary -- Parms: --************************************************************* Select Status, Type =...
true
8b3f81bc1fb53422a1998a7243aa6fe6b40ee5e1
SQL
atiquereza/SignalSystem
/codeBase/signalappdb.sql
UTF-8
15,030
3.1875
3
[]
no_license
-- -------------------------------------------------------- -- Host: 127.0.0.1 -- Server version: 5.5.16 - MySQL Community Server (GPL) -- Server OS: Win32 -- HeidiSQL Version: 9.3.0.5005 -- -------------------------------------------------------- /*...
true
67ee12083e5ab69b30fc1d81c8ccaa29864a1a5d
SQL
mithriock/ezRbac
/schema/data.sql
UTF-8
1,354
2.65625
3
[]
no_license
/* SQLyog Ultimate v9.62 MySQL - 5.1.41 : Database - ezrbac ********************************************************************* */ /*!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
813f4042b37e38d5d8d3ef5e683262f96094597a
SQL
Jungeol/algorithm
/leetcode/easy/596_classes_more_than_5_students/runaway.sql
UTF-8
405
3.5625
4
[]
no_license
# https://leetcode.com/problems/classes-more-than-5-students/ # Runtime: 340 ms, faster than 50.67% of MySQL online submissions for Classes More Than 5 Students. # Memory Usage: 0B, less than 100.00% of MySQL online submissions for Classes More Than 5 Students. # Write your MySQL query statement below SELECT class FRO...
true
3dc7de29913f826859ac49582ffad55b789214f2
SQL
yoheia/yoheia
/oracle/tpt_scripts/stat.sql
UTF-8
2,145
3.21875
3
[ "Apache-2.0" ]
permissive
------------------------------------------------------------------------------ -- -- Copyright 2017 Tanel Poder ( tanel@tanelpoder.com | http://tanelpoder.com ) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a c...
true
f94fd9a4face51df143dc1157c52da46edaa3f71
SQL
lukevandenbosch/HouseRicher
/HouseRicherMVP/HouseRicherDatabaseSetup/Personal_Info.sql
UTF-8
13,323
3.09375
3
[]
no_license
DROP TABLE IF EXISTS HouseRicher.Personal_Person; DROP TABLE IF EXISTS HouseRicher.Personal_Email; DROP TABLE IF EXISTS HouseRicher.Personal_Login; DROP TABLE IF EXISTS HouseRicher.Personal_Realtor; DROP TABLE IF EXISTS HouseRicher.Personal_Profile_Picture; DROP TABLE IF EXISTS HouseRicher.Personal_Reviews; DROP TABLE ...
true
40acbc12787e6845d758e5fb8b530159d9617e51
SQL
kuchita-el/git_activity_reporter
/conf/ddl/0.1.0-SNAPSHOT/02_create_git_social_account.sql
UTF-8
982
3.1875
3
[]
no_license
CREATE TABLE "user_account" ( "id" VARCHAR NOT NULL PRIMARY KEY ); CREATE TABLE "git_account" ( "user_account_id" VARCHAR NOT NULL, "client_id" VARCHAR NOT NULL, "user_name" VARCHAR NOT NULL, "access_token" VAR...
true
fab036dc4ebd7c0289c1d11b4f5aa434b8eb08da
SQL
decaff46/sql-practice-codes
/Practice/LOCK TABLE.sql
UTF-8
1,899
4.125
4
[]
no_license
-- lock table use classicmodels; /* A lock is a flag associated with a table. MySQL allows a client session to explicitly acquire a table lock for preventing other sessions from accessing the same table during a specific period. A client session can acquire or release table locks only for itself. And a client sessi...
true
cd247f8030f0eabaf3f40d0f335012cbb923ecd7
SQL
likuny0415/cs3200
/Assignment2/DB2_website_roles.sql
UTF-8
2,772
3.125
3
[]
no_license
-- MySQL dump 10.13 Distrib 8.0.21, for macos10.15 (x86_64) -- -- Host: localhost Database: DB2 -- ------------------------------------------------------ -- Server version 8.0.21 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*...
true
b8af1bacafc8d0f1597d6cd8cab9506a4bfe28e4
SQL
ebtaleb/DARAPP2
/scripts/follows.sql
UTF-8
456
3.65625
4
[]
no_license
CREATE TABLE IF NOT EXISTS `follows` ( `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY, `user` VARCHAR(45) NOT NULL, `followed_event_id` INT NOT NULL, CONSTRAINT fk_user_follow FOREIGN KEY (user) REFERENCES users (username), CONSTRAINT fk_event_id_follow FOREIGN KEY (followed_event_id) REFERENCES events (id))...
true
6106a4ab8eb1d490ed954a0c4151e5c6affe3677
SQL
danielrhodeswarp/Japxlate
/sql/japxlate_structure.sql
UTF-8
3,853
3.265625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 3.3.9 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Nov 25, 2011 at 06:07 PM -- Server version: 5.1.57 -- PHP Version: 5.3.8-ZS5.5.0 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHA...
true
4f598012d3ca2c8c3dc0fad83f82f34c81d69e45
SQL
rusalinastaneva/Java-DB-Fundamentals
/Database Basics/04. Data Aggregation/Exercises/18. Salary Challenge.sql
UTF-8
404
3.984375
4
[]
no_license
USE soft_uni; SELECT e1.first_name, e1.last_name, e1.department_id FROM employees AS e1, (SELECT e1.department_id, AVG(e1.salary) AS `average_salary` FROM employees AS e1 GROUP BY department_id) AS `avg_salary_ByDepartments` WHERE e1.department_id = `avg_salary_ByDepartments`.department_id AND e1.`salary` > `a...
true
a67a0a9a0a64e6073c93b9cde7a5db6c5667106c
SQL
jgarzonext/paquetes
/PAC_AVISOS.sql
ISO-8859-1
19,107
2.5625
3
[]
no_license
CREATE OR REPLACE PACKAGE "PAC_AVISOS" AS /****************************************************************************** NOMBRE: pac_avisos PROPSITO: Package de avisos REVISIONES: Ver Fecha Autor Descripcin --------- ---------- --------------- ---------------...
true
286903e22384826a7d537a531d58e467a7a61d77
SQL
toannh0104/pineline-demo
/postgresql/migration_sqls/payment/000014_payment_settlement_configuration_4.3.sql
UTF-8
1,065
3.078125
3
[]
no_license
-- +goose Up -- SQL in this section is executed when the migration is applied. USE payment_dev; CREATE TABLE IF NOT EXISTS payment_dev.settlement_configuration ( id SERIAL NOT NULL, currency varchar(3) NOT NULL, service_group_id INT NOT NULL, service_id INT NOT NULL, is_deleted SMALLINT DEFAULT '0', creat...
true
fe5843a7bfd913a4b9a0040819d1fa64561f4bf9
SQL
silence-do-good/stress-test-Postgres-and-MySQL
/dump/high/day19/select1424.sql
UTF-8
239
2.515625
3
[]
no_license
SELECT timeStamp, clientid FROM WiFiAPObservation WHERE timestamp>'2017-11-18T14:24:00Z' AND timestamp<'2017-11-19T14:24:00Z' AND SENSOR_ID=ANY(array['3142_clwa_2065','3141_clwa_1422','3142_clwa_2219','3141_clwa_1429','3144_clwa_4209'])
true
d6ffd0e242a2947a840796371a215cc873b26f57
SQL
brittanyrussell/database-exercises
/albums_migration.sql
UTF-8
295
2.65625
3
[]
no_license
USE codeup_test_db; CREATE TABLE IF NOT EXISTS `albums` ( id int unsigned NOT NULL AUTO_INCREMENT, artist_name varchar(50) DEFAULT NULL, album_name varchar(100) NOT NULL, release_date varchar(100) NOT NULL, sales FLOAT NOT NULL, genre varchar(100) NOT NULL, PRIMARY KEY (id) );
true
520bf4061edefa18e2059558d6580c2f51365608
SQL
ubay887/betaphonik_iot
/DB/betaphonik_iot.sql
UTF-8
8,237
3.1875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.1.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Waktu pembuatan: 16 Agu 2021 pada 05.21 -- Versi server: 10.4.19-MariaDB -- Versi PHP: 7.4.20 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@C...
true
a392c72018251921241e892136f95e8ca0f3a6fa
SQL
RyanQuey/example-cassandra-dsbulk-with-sed-and-awk
/days_worked_by_previous_employees_by_job_title.cql
UTF-8
344
3.109375
3
[]
no_license
CREATE KEYSPACE test WITH REPLICATION={'class': 'SimpleStrategy', 'replication_factor': 1}; CREATE TABLE test.days_worked_by_previous_employees_by_job_title ( job_title text, employee_id uuid, employee_name text, number_of_days_worked int, PRIMARY KEY (job_title, employee_id) ) WITH CLUSTERING ORDE...
true
24503c5acf3005733813bf1aa416ea3e7f587d76
SQL
knopka-0075/web-backend-oplossingen
/file-upload/artikel_cms.sql
UTF-8
5,526
3.21875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.2.7.1 -- http://www.phpmyadmin.net -- -- Хост: localhost -- Время создания: Мар 18 2015 г., 13:59 -- Версия сервера: 5.6.20 -- Версия PHP: 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
d323c71468449775d2a41c8eb3eaeb3285195e04
SQL
AlienAntFarm/Anthive
/assets/sql/init.sql
UTF-8
687
3.40625
3
[]
no_license
CREATE SCHEMA IF NOT EXISTS anthive; -- Set default search_path to schema SET search_path TO anthive,public; DROP TYPE IF EXISTS state; CREATE TYPE state AS enum ('NEW', 'PENDING', 'FINISH', 'ERROR'); -- Creation of tables CREATE TABLE IF NOT EXISTS antling ( id serial primary key ); CREATE TABLE IF NOT EXISTS im...
true
407f6068fc7fe92643b99f71e937576a9e4a4dd7
SQL
Aresmrg/EjerciciosADSQL
/INSTITUTO.sql
ISO-8859-1
6,373
3.625
4
[]
no_license
CREATE OR REPLACE TYPE notas_t AS OBJECT ( nCodAsi NUMBER, nCurAsi NUMBER, nCurso NUMBER, nNota1Ev NUMBER, nNota2Ev NUMBER, nNotaFinal NUMBER ); CREATE OR REPLACE TYPE tNOTAS AS VARRAY(10) OF notas_t; CREATE OR REPLACE TYPE alumnos_t AS OBJECT ( nNumMat NUMBER, dNomAlu VAR...
true
065d8f271e964c8551be9fb65e200750aaa3055d
SQL
kerrykato/SQL-Scripts
/Indexes/Index Usage Stats.sql
UTF-8
384
3.71875
4
[]
no_license
SELECT DB_NAME() AS DATABASENAME, OBJECT_NAME(B.OBJECT_ID) AS TABLENAME, B.NAME AS INDEXNAME, B.INDEX_ID , c.* FROM SYS.OBJECTS A INNER JOIN SYS.INDEXES B ON A.OBJECT_ID = B.OBJECT_ID join SYS.DM_DB_INDEX_USAGE_STATS C on B.OBJECT_ID = C.OBJECT_ID AND B.INDEX_I...
true
da662fa1d0f911d60c6589ef9d0bdc58f757abe7
SQL
AlexandreTomasi/jwt-authentication-quarkus
/src/main/resources/db/migration/V1_02__insercao_dados_iniciais.sql
UTF-8
1,161
2.9375
3
[]
no_license
INSERT INTO public.regras (reg_id, reg_nome, reg_descricao, reg_tipo) VALUES(1, 'pessoa', 'put', 'UPDATE'); INSERT INTO public.regras (reg_id, reg_nome, reg_descricao, reg_tipo) VALUES(2, 'pessoa', 'get', 'SELECT'); INSERT INTO public.perfil (perf_id,perf_nome,perf_descricao,perf_ativo) VALUES (1,'ADMINISTRADOR','Co...
true
a3750602e66a6da7baf85b444e3a51c2a939d552
SQL
pelias/placeholder
/query/match_subject_distinct_subject_ids.sql
UTF-8
152
3.203125
3
[ "MIT" ]
permissive
SELECT DISTINCT( t1.id ) AS subjectId FROM tokens AS t1 WHERE t1.token = $subject -- AND t1.tag NOT IN ( 'colloquial' ) ORDER BY t1.id ASC LIMIT $limit
true
c440c23bba58b52da998c9939cb18d7266833bc1
SQL
msussman/cabi-plus
/test_queries/cabi_same_start_stop.sql
UTF-8
1,334
3.890625
4
[]
no_license
/* Members*/ SELECT CASE WHEN left(bike_number, 1) in ('?', 'w', 'W', 'Z') THEN 'CaBi' ELSE 'CaBi Plus' END as bike_type, SUM(CASE WHEN start_station = end_station THEN 1 ELSE 0 END)/COUNT(*)::float as perc_same_start_stop FROM cabi_trips WHERE start_date::date >= '2018-09-05' AND end_date > start_d...
true
bfdd13e33e3a996f44036d0281f8359264be6418
SQL
Syahrulandri03/latihan-pw5
/mahasiswa.sql
UTF-8
1,724
3.015625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.7.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: 13 Apr 2018 pada 11.43 -- Versi Server: 10.1.30-MariaDB -- PHP Version: 7.2.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHA...
true
01551adeecb8fa521b410bdd276fd63a164bc669
SQL
WeslleyFelizardo/ProjetosPOO
/QuizDB/quiz 20170601 0046.sql
UTF-8
11,821
3.109375
3
[]
no_license
-- MySQL Administrator dump 1.4 -- -- ------------------------------------------------------ -- Server version 5.5.17 /*!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 */; ...
true
2b93556159d7c1273edb16c336e1f71f642017c9
SQL
nuprl/gradual-typing-performance
/pre-benchmark/ecoop/rudybot/lobster-skeleton.sql
UTF-8
204
2.765625
3
[]
no_license
SELECT distinct(log.text) FROM log_word_map lwm1, log_word_map lwm2 JOIN log ON log.rowid = lwm1.log_id WHERE lwm1.log_id = lwm2.log_id AND lwm1.word = 'skeleton' AND lwm2.word = 'lobster';
true
b85e43c12d9f14142a1de60e145dc2dc309889a7
SQL
cckmit/xinfu
/ccms/WebContent/WEB-INF/action/ccms/pub/pick/domain/getCityProvince/query-children.sql
UTF-8
313
3.359375
3
[]
no_license
SELECT t.domain_text_${def:locale} as domain_text, t.domain_value, t.parent_domain_value, t.parent_domain_value2 FROM t_domain t WHERE t.namespace = 'City' and (t.parent_domain_value2 = ${fld:area} or ${fld:area} is null) and t.is_enabled = '1' order by t.show_order ,t.domain_text_${def:locale}
true
c956202d994d7d7de440fe31a89c9e045cb8496c
SQL
V9S/Database
/SQL_Project/Scripts/折旧迁移数据.sql
GB18030
3,822
3.21875
3
[]
no_license
SELECT * FROM NP_USER nu ; SELECT * FROM AUTHZ_IDENTITY ai SELECT * FROM AUTHZ_ROLE ar ; SELECT * FROM GAMS_ASSETDEPREC_H gah ; SELECT * FROM GAMS_ASSETDEPREC_I gai ; SELECT * FROM GAMS_ASSETDEPREC_I gai WHERE CARD_ID =(SELECT gc.ID FROM GAMS_CARD gc WHERE gc.BILLCODE = 'TY2020002627'); SELECT * FR...
true
e9a3a646751fc24644081d3e152e7c6703d1e099
SQL
afbooza/fullstack-interview-prep
/SQL/QUERY/RANK, ROW_NUMBER, DENSE_RANK.sql
UTF-8
444
3.828125
4
[]
no_license
--RANK, ROW_NUMBER, DENSE_RANK WITH T(StyleID, ID, A) AS (SELECT 1,1,1 UNION ALL SELECT 1,1,2 UNION ALL SELECT 1,1,3 UNION ALL SELECT 1,2,4 UNION ALL SELECT 1,2,5) SELECT *, RANK() OVER(PARTITION BY StyleID ORDER BY ID ) AS 'RANK', ROW_NUMBER() OVER(PARTITION BY ...
true
00a5431cd850165ba2db7406027ef048a8be1052
SQL
deeferg/NHLDatabase_2015-16
/NHLDatabase_15-16_DDL.sql
UTF-8
5,649
3.796875
4
[]
no_license
/* Created: 2016-11-23 Modified: 2016-11-23 Model: PostgreSQL 9.4 Database: PostgreSQL 9.4 */ -- Create tables section ------------------------------------------------- -- Table typecategory CREATE TABLE "typecategory"( "id" BigSerial NOT NULL PRIMARY KEY, "categorydescription" Character varying(50) NOT NULL ) ; ...
true
41c907ce9692a167f926266852ba9f7e50c933d7
SQL
s18011/sql
/1219/1219.3.sql
UTF-8
116
2.734375
3
[]
no_license
select last_name, nvl2(commission_pct, to_char(salary * commission_pct), 'No Commission') COMM from employees;
true
0771f4ca30a2b889caa121131755949dbd2652b0
SQL
bubble-software/bubble-api
/app/database/create_table_category.sql
UTF-8
165
2.78125
3
[]
no_license
CREATE TABLE IF NOT EXISTS category_table( category_name VARCHAR(256) PRIMARY KEY, owner_username VARCHAR(256) REFERENCES user_table, date_created timestamptz );
true
434ac16acdc989946afabcc8267740d4d94b84d7
SQL
anna-berg/PrivatBankTest
/schema.sql
UTF-8
880
3.796875
4
[]
no_license
CREATE TYPE translation_part_type AS ENUM ( 'SONG', 'ADERTISE', 'INTERVIEW' ); CREATE TABLE IF NOT EXISTS dj( dj_id SERIAL PRIMARY KEY NOT NULL, name VARCHAR(255) NOT NULL, experience VARCHAR(255) NOT NULL, resume VARCHAR(1000) NOT NULL ); CREATE TABLE IF NOT EXISTS translations( translation_id SERIAL PRIMAR...
true
f00965e2c6c6f7704a637832f625b40675ca9858
SQL
Oscarntnz/DDSISeminario2
/DDSI.sql
UTF-8
2,012
4.0625
4
[]
no_license
/* Prueba inicial */ create table emp(id number(10), name varchar2(40), age number(2)); INSERT INTO emp (id, name, age) VALUES (47, 'sergio', 69); SHOW TABLES; SELECT * FROM emp; COMMIT; /*****************************************************************************/ /* FUNCIÓN RESET ...
true
474e55e6087007c7aae973f0cc19dd84f4e56b2f
SQL
YeonJuJu/Oracle_DB_Study
/210129/210129.sql
UTF-8
2,849
4.375
4
[]
no_license
-- 210129 /* ======================================================== 동의어 => 하나의 객체에 부여하는 다른 이름 ======================================================== */ -- T1 테이블 생성 -- -- PRIMARY KEY : UNIQUE + NOT NULL CREATE TABLE T1 ( C1 NUMBER PRIMARY KEY, C2 NUMBER (2) ); SELECT COUN...
true
d9c7b42925aaeb8ca60cc2d2132511ab9311349b
SQL
min-pro/SQL
/20200811.sql
UTF-8
988
3.609375
4
[]
no_license
익명 block : 데이터가 한건만 나와야 하는 상황 SET SERVEROUTPUT ON; DECLARE v_ename emp.ename%TYPE; BEGIN SELECT ename INTO v_ename FROM emp WHERE empno = 7369; EXCEPTION -- EXCEPTION을 기술 함으로써 에러가 발생해도 실행이 가능하다. WHEN TOO_MANY_ROWS THEN DBMS_OUTPUT.PUT_LINE('TOO_MANY_ROWS'); END; / 예외포장하기 예외를 잡아 사용자가 정의한 새...
true
2253d0207c28d530273542544fbe1d53a0a1f4b9
SQL
KleeGroup/kinetix
/Kinetix/Kinetix.Workflow/SQLResources/FindAllSelectorsByWorkflowDefinitionId.sql
UTF-8
145
3.21875
3
[ "Apache-2.0" ]
permissive
SELECT SEL.* FROM SELECTOR_DEFINITION SEL JOIN WF_ACTIVITY_DEFINITION WAD ON (SEL.ITEM_ID = WAD.WFAD_ID) WHERE WAD.WFWD_ID = @WFWD_ID;
true
ad7dbec4d6ade5bccf0b7b824721d746070d9e44
SQL
BrunuNC/ExerciciosSQL
/clientes.sql
UTF-8
1,815
3.203125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Tempo de geração: 09-Abr-2021 às 16:05 -- Versão do servidor: 10.4.17-MariaDB -- versão do PHP: 8.0.2 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CL...
true
8dc2db1e0a1a75f371eb524b8b0c4b078dbd578f
SQL
Vick-edit/RailwayClient
/RailwayClient/Task_1.sql
UTF-8
1,056
3.78125
4
[]
no_license
/*--------------------------Задание 1.1-------------------------------------*/ SELECT mainQ.* FROM T mainQ JOIN ( SELECT outQ.ID, (SELECT COUNT (*) FROM T inQ WHERE inQ.Value > outQ.Value) as CountOfBigger FROM T outQ ) onMaxSubQ ON mainQ.ID = onMaxSubQ.ID JOIN ( SELECT outQ.ID, (SELECT COU...
true
bfbeca0ceec7da4dec1ae739af6df0da73e9fa58
SQL
silence-do-good/stress-test-Postgres-and-MySQL
/dump/low/day19/select0556.sql
UTF-8
177
2.640625
3
[]
no_license
SELECT timeStamp, temperature FROM ThermometerOBSERVATION o WHERE timestamp>'2017-11-18T05:56:00Z' AND timestamp<'2017-11-19T05:56:00Z' AND temperature>=5 AND temperature<=77
true
fd3f29105199aa3936fee2b2c7c2eafdaa0798f5
SQL
alevel7/teamwork
/dbsql.sql
UTF-8
4,738
3.546875
4
[]
no_license
-- MySQL Workbench Forward Engineering SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0; SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0; SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTI...
true