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
134506e849c66476d2441cc121c7960937f45102
SQL
hikerqing/Covid-19-database
/create_database.sql
UTF-8
3,668
3.71875
4
[ "MIT" ]
permissive
/* create Covid-19 database */ CREATE TABLE drug ( drug_id int, drug_name varchar(50), drug_status varchar(25), drug_type varchar(25), primary key (drug_id) ); CREATE TABLE clinical_trial ( trial_id int, title varchar(50), trial_type varchar(25), trial_stage varchar(25), trial_...
true
bb7c34e4a236ccc97850818a8bfd69579c4f66ac
SQL
pm2kjiagm/bbsmax
/bbsmax5_src/MaxLabs.bbsMax.Project/Database/MsSql/Procedures/bx_SendMessage.sql
UTF-8
2,095
3.640625
4
[]
no_license
--发送短消息 CREATE PROCEDURE [bx_SendMessage] @UserID int ,@MessageID int ,@RelatedUserIDs varchar(500) ,@SenderIP varchar(50) ,@ParentID int ,@ContentType tinyint ,@Content ntext ,@ContentReverter nvarchar(1000) A...
true
f76d2cae13747dd261f5634791dd01c5ed331370
SQL
ScorpionProgramming/scorpionprogramming.github.io
/database.sql
UTF-8
2,913
3.390625
3
[]
no_license
-- -------------------------------------------------------- -- Host: 127.0.0.1 -- Server Version: 10.1.30-MariaDB - mariadb.org binary distribution -- Server Betriebssystem: Win32 -- HeidiSQL Version: 9.5.0.5196 -- ------------------------------------------------...
true
4175408bebfeac290ec12214aa52f992e64012cd
SQL
tunix/docker_izmir_keynote
/dapi/src/main/resources/schema-mysql.sql
UTF-8
553
3.515625
4
[]
no_license
create table message ( id bigint not null, created_at tinyblob not null, message longtext, user_id bigint, primary key (id) ); create table user ( id bigint not null, created_at tinyblob not null, first_name varchar(255), language_code varchar(255), last_name varchar(255), u...
true
7ca1641dc04ca6ed8438d6ca50a658dbafa5cc34
SQL
thanhhungchu95/FISJAVA
/SQL/Meeting.sql
UTF-8
468
4.09375
4
[]
no_license
SELECT MeetingEmployee.MeetingID AS ID, Meeting.name AS Name, Meeting.time AS Time, Meeting.duration AS Duration, GROUP_CONCAT( Employee.name, '(', IF(Depart.name IS NULL, 'NULL', Depart.name), ')') AS Party FROM Employee LEFT JOIN Depart ON Employee.DepartID = Depart.ID JOIN Mee...
true
863de46eef390962955153d268953cfe3ad03390
SQL
Malagutte/training-back-base
/dbs/transactions/files/sql/transaction-manager/h2/upgrade_2_10_4_to_2_11_0/transaction-manager.sql
UTF-8
170
2.671875
3
[]
no_license
ALTER TABLE fin_txn ADD credit_debit_amount DECIMAL(15, 3) NOT NULL; ALTER TABLE fin_txn ADD notes VARCHAR2(4000); CREATE INDEX ix_arrangement ON fin_txn(arrangement_id);
true
a720c76e6c496e2c3e5f5107b1ce89531722dce4
SQL
Melissa-Elizabeth/weekend-challenge-4
/database.sql
UTF-8
293
2.984375
3
[]
no_license
CREATE TABLE task ( id SERIAL PRIMARY KEY, name VARCHAR(80) NOT NULL, completed BOOLEAN NOT NULL DEFAULT FALSE ); -- CREATE TABLE completed_tasks ( -- id SERIAL PRIMARY KEY, -- completed_name VARCHAR(80) NOT NULL -- -- ); // Created a completed_tasks table but it didn't work as planned
true
9090b7603be099629f0c08f9c18eb4f5d3324ee4
SQL
ReemKish/SQL-REMASTERED
/examples/example1.sql
UTF-8
415
3.484375
3
[]
no_license
-- some simple example using small amount of data drop table if exists movies; create table if not exists movies (title varchar, year int, duration int, score float); load data infile "movies2.csv" into table movies; select year, avg(duration) from movies group by year order by year desc; select year, avg(duration)...
true
de02694bb2db92f5e379f4faa951dbbc1030fa63
SQL
yuanfangljy/blsq-upms
/data/sys_blsq.sql
UTF-8
27,468
3.078125
3
[]
no_license
/* SQLyog Ultimate v12.4.1 (64 bit) MySQL - 5.7.17-log : Database - blsq ********************************************************************* */ /*!40101 SET NAMES utf8 */; /*!40101 SET SQL_MODE=''*/; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN...
true
463bbb25861afd247383edfc7fce11f0ac96508d
SQL
abby-lee/SPM-IS212-G1T6
/database/lms_database.sql
UTF-8
12,625
3.375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.9.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1:3306 -- Generation Time: Sept 21, 2021 at 09:48 AM -- 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 = "+08:00"; -- Database: `spm_G1T...
true
3c618ea9f7c9e71cf2f4095b255dc2d9a3cd9e6a
SQL
MirelaMileva/Databases-MSSQL-SoftUni-Homework
/SubqueriesAndJOINsExercise/17.HighestPeakAndLongestRiverByCountry.sql
UTF-8
500
4.09375
4
[ "MIT" ]
permissive
SELECT TOP(5) CountryName, MAX(p.Elevation) AS HighestPeakElevation, MAX(r.Length) AS LongestRiverLength FROM Countries AS c LEFT JOIN MountainsCountries AS mc ON mc.CountryCode = c.CountryCode LEFT JOIN Mountains AS m ON m.Id = mc.MountainId LEFT JOIN Peaks AS p ON p.MountainId = m.Id LEFT JOIN CountriesRivers...
true
708066bb62cce673c8ff02e3eb9c9aa73e68a970
SQL
VinothSelvaraju/SQL-Engine
/sqlfile/pi7.sql
UTF-8
190
2.953125
3
[]
no_license
CREATE TABLE personInfo(id int, first_name string, last_name string, Gender string, age int, State string) SELECT gender, State, avg(age) from personInfo where age<60 group by gender, State
true
af87cd2e05444f43a49e50fd7a91e106f1f6dd9c
SQL
transcom/mymove
/migrations/app/schema/20230504214413_adjust_contract_years.up.sql
UTF-8
197
2.5625
3
[ "MIT", "LicenseRef-scancode-public-domain" ]
permissive
ALTER TABLE re_contract_years DROP CONSTRAINT re_contract_years_daterange_excl, ADD CONSTRAINT re_contract_years_daterange_excl EXCLUDE USING gist(DATERANGE(start_date, end_date, '[]') WITH &&);
true
e7417e89cd7e049e3893c22401708500775abce1
SQL
vincenteichhorn/praystorm-beamer-backend
/database/praystorm_alt_20-03-21.sql
UTF-8
15,977
3.265625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Erstellungszeit: 21. Mrz 2020 um 18:52 -- Server-Version: 10.1.19-MariaDB -- PHP-Version: 7.0.13 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIEN...
true
ad4599dafac2840f0a44bb4f59a0fe5b3a68b706
SQL
redrurm/bbdd-
/PR2 consulta 4.sql
UTF-8
1,421
3.71875
4
[]
no_license
--PENDIENTE DE PRUEBA /* Crea un procedimiento DATOS_CLIENTES que recorra todos los Clientes con un FOR y muestre todos sus datos junto con la suma de importe total de todos sus pedidos. Finalmente se mostrará la suma total de los importes de todos los pedidos de todos los clientes. */ create or replace PROCEDURE D...
true
d07239254717b79e7b70dbfc02d8e23ace6a0d51
SQL
LynxDevelopment/SDMWeb
/SDMWeb/script_db/oracle/core/create/02_references.sql
UTF-8
3,130
3.28125
3
[]
no_license
ALTER TABLE TB_EVENTS ADD CONSTRAINT FK_TB_EVENTS FOREIGN KEY (TYPE_ID) REFERENCES TB_EVENT_TYPE ON DELETE CASCADE; ALTER TABLE TB_FUNCTION_GROUPS ADD CONSTRAINT FK_TR_GROUPS_FUNCTIONS FOREIGN KEY (GROUP_ID) ...
true
3d936846436e51c9e042b6a50f4e521e1492c8d6
SQL
guitar1999/blackosprey
/avaricosa/find_nearest_stream_to_point.sql
UTF-8
1,395
3.921875
4
[]
no_license
WITH index_query AS ( SELECT st_distance(n.geom, a.geom) AS distance, ap_id, gnis_name, n.reachcode FROM avaricosa_point a, nhd.nhd_flowline_nh n WHERE state = 'nh' ORDER BY st_dist...
true
025c3dbb07ed7a680291472ebd386e4c8626a14c
SQL
SimonFans/SQL
/L 601 Human Traffic of Stadium.sql
UTF-8
1,362
4.1875
4
[]
no_license
X city built a new stadium, each day many people visit it and the stats are saved as these columns: id, date, people Please write a query to display the records which have 3 or more consecutive rows and the amount of people more than 100(inclusive). For example, the table stadium: +------+------------+-----------+ ...
true
5daaf357ba94ef7be257031eba7ac42569e524ad
SQL
joao-lusa/Ulbra
/2020_2/FBD/primeiro.sql
UTF-8
1,179
3.53125
4
[]
no_license
-- DDL -- CREAT ** -- ALTER -- DROP /* aqui nós vamos fazer nosso primeiro creare */ /* padorões de nomenclatura pascal case -tudo é inicial maiúscula. -quanto tem nome completo, use-se o segundo nome inicial maiúscula -nome -bomeDoCLiente camelCase -nome -nomeDoCliente no SQL qu...
true
a04d31f62bcf9e3166e2f66f517ec7b8530c09c2
SQL
irawanalkarim/simple-money-management
/improved.sql
UTF-8
1,468
2.953125
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.9.1 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: Dec 13, 2019 at 05:20 AM -- Server version: 10.4.8-MariaDB -- PHP Version: 7.2.24 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
true
0e3fd8f197bd04697ba7b176ba5c3d258c2ed27e
SQL
twocngdagz/TestApp
/dump.sql
UTF-8
6,575
3
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 3.5.1 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Jun 07, 2013 at 10:06 PM -- Server version: 5.5.24-log -- PHP Version: 5.3.13 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */...
true
eecd6c9da86791ae87ab19d3da1f98cb200f46b8
SQL
peguy2n/feelthelearn
/Day3.sql
UTF-8
518
2.703125
3
[]
no_license
UPDATE Customers SET CustomerName = "peguy" WHERE city="London"; UPDATE Customers SET ContactName ="German Jerry" WHERE Country="Germany" AND City IN("Berlin","Brandenburg"); UPDATE Customers SET city ="Berlin" WHERE CustomerID >10; UPDATE OrderDetails SET quantity =34 WHERE OrderDetailID =7; UPDATE Products SET Pr...
true
6413a72472b8f72821dcd8230141cf017fd6fe1b
SQL
MikeTimo/CarShop
/src/main/resources/employee.sql
UTF-8
1,169
3.359375
3
[]
no_license
CREATE DATABASE IF NOT EXISTS carshop COLLATE utf8_general_ci; USE carshop; DROP TABLE IF EXISTS employee; CREATE TABLE employee ( id BIGINT(20) PRIMARY KEY NOT NULL AUTO_INCREMENT, name VARCHAR(50) NULL, surname VARCHAR(50) NULL, dob date ...
true
16742d1057fbedc81ae96feef88d76d0ade692c9
SQL
abdulchakam/CRUD-CI
/database/penjualan (2).sql
UTF-8
12,005
3.09375
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.9.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Waktu pembuatan: 06 Apr 2020 pada 07.39 -- Versi server: 10.4.10-MariaDB-log -- Versi PHP: 7.3.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_...
true
3ef7974fbcaaf8b63dc28dac9eccf74f6e74be18
SQL
Zenuna/BD_TP1
/script.sql
UTF-8
1,377
3.109375
3
[]
no_license
use BD5B6TP1_KoumaJouanique DROP TABLE Invite; DROP TABLE ReservationChambre; DROP TABLE Client; DROP TABLE Chambre; DROP TABLE TypeChambre; CREATE TABLE TypeChambre( NoTypeChambre int not null, Description varchar(50), PrixHaut Numeric(7,2), PrixBas Numeric(7,2), PrixMoyen Numeric(7,2), CONSTRAIN...
true
eef042c831e01f19b3ccfcf357b94055d5440df3
SQL
hamsterish/web-template
/src/main/resources/schema.sql
UTF-8
1,077
3.734375
4
[]
no_license
CREATE TABLE `user` ( `id` int(11) NOT NULL AUTO_INCREMENT, `title` varchar(12) NOT NULL, `gender` varchar(22) DEFAULT NULL, `first_name` varchar(120) NOT NULL, `last_name` varchar(120) NOT NULL, `phone_number` varchar(22) NOT NULL, `email` varchar(120) DEFAULT NULL, `birth` date DEFAULT NULL, `create...
true
5c3166ba1e79ec9d20894a739deae40051801898
SQL
kelsenlima/projeto-wms-store-zyon
/VR_MOVEXPEDICAOPRODUTO_PESOOFI.sql
UTF-8
3,040
3.203125
3
[]
no_license
--CREATOR: KELSEN LIMA -- QR MOVIMENTACAO DE PRODUTO EXPEDICAO CREATE OR REPLACE VIEW VR_MOVEXPEDICAOPRODUTO_PESOOFI AS SELECT DS.CODIGOESTABELECIMENTO, (SELECT EST.NOMEESTABELECIMENTO FROM ESTABELECIMENTO EST WHERE EST.CODIGOESTABELECIMENTO = DS.CODIGOESTABELECIMENTO) AS NOMEESTABELEC...
true
c80b2f2ad3fe31a5dc7b976bbfae18e3bfd7a8fa
SQL
meghashetty16/H1B_VISA
/Hive/Q1a.sql
UTF-8
410
3.421875
3
[]
no_license
use h1bproject; drop table h1b1a; create table h1b1a (year string,total int ) row format delimited fields terminated by '\t' stored as textfile; INSERT OVERWRITE table h1b1a select year,count(case_status) as total from h1b where job_title like '%DATA ENGINEER%' group by year order by year; select a.year,a.total,((...
true
eadfeb4a7c37519752535d9bdcbea017f952f47f
SQL
danolivo/conf
/PGConfRU_2021/joins_plan_dependency.sql
UTF-8
1,120
3.625
4
[ "BSD-3-Clause" ]
permissive
-- EXPLAIN of query plan where join clause has semantic dependencies between variables. -- -- Query -- EXPLAIN (ANALYZE,TIMING OFF,BUFFERS OFF) SELECT count(*) FROM person JOIN employees USING (id) WHERE age<18 AND position='Helper'; -- -- EXPLAIN -- Aggregate (cost=586.53..586.54 rows=1 width=8) (actual rows...
true
7b1ff55f8cbd6773806e620ca6d4c522da9bdba9
SQL
alinangnaiba/migration-java
/sql/ms3Interview.sql
UTF-8
449
2.609375
3
[]
no_license
-- -- File generated with SQLiteStudio v3.2.1 on Sat May 30 20:09:58 2020 -- -- Text encoding used: System -- PRAGMA foreign_keys = off; BEGIN TRANSACTION; -- Table: IMPORT CREATE TABLE import (id INTEGER PRIMARY KEY AUTOINCREMENT UNIQUE NOT NULL, a VARCHAR (250), b VARCHAR (250), c VARCHAR (250), d VARCHAR (250), e V...
true
5a91d5c6a20a42daf414a3b2ada31b83fc90afc6
SQL
rekhaunnam123/Java
/Sql queries.sql
UTF-8
1,821
4.375
4
[]
no_license
SELECT * FROM transcation.customer; ALTER table transcation.customer add column lastname VARCHAR(45); Select * from transcation.customer; /*1)Write a query to display account number, customer�s number, customer�s firstname,lastname,account opening date. Display the records sorted in ascending order based on account num...
true
2980a445f866397784b6265558acf3936abe716a
SQL
leviking/legendary-palm-tree
/micah/create.sql
UTF-8
407
3.046875
3
[ "MIT" ]
permissive
-- Create a table CREATE TABLE locations ( id int autoincrement, primary key(id), name varchar(45), address varchar(45), city varchar(45), zip varchar(5), phone varchar(10) ) -- Create an entry in the locations table INSERT INTO locations ( name, address, city, state, zip, phone ) values ( ...
true
a0cb59a89f1a2848f7a9f3f24b8bc8fe06dde98c
SQL
alejandrom13/mtracks-dotnet
/DB/MT Database/Stored Procedures/AddArtist.sql
UTF-8
308
2.84375
3
[]
no_license
CREATE PROCEDURE AddArtist @ArtistName VARCHAR(100), @biography VARCHAR(MAX), @imageURL VARCHAR(500), @heroURL VARCHAR(500) AS INSERT INTO Artist(title, biography, imageURL, heroURL) VALUES(@ArtistName, @biography, @imageURL, @heroURL) SELECT * FROM Artist WHERE title = 'Rihanna' DROP PROC AddArtist
true
4c317ea460011b7efec7755036a71ecce311640c
SQL
Naveentce/TechTalk
/SERVICES-API/src/main/resources/schema.sql
UTF-8
1,983
3.75
4
[]
no_license
CREATE TABLE `TEAM_MEMBER_DETAILS` ( `ID` INT NOT NULL AUTO_INCREMENT, `EMPID` VARCHAR(255) NOT NULL UNIQUE, `EMPNAME` VARCHAR(255) NOT NULL, `DESIGNATION` VARCHAR(255) NOT NULL, `TEAM_ID` INT, `BU` VARCHAR(255) NOT NULL, `EMAIL` VARCHAR(255) NOT NULL UNIQUE, PRIMARY KEY (`ID`) ); CREATE TABLE `TECHTALK_TEAMS`...
true
cc52862ed1c5dda03ca40bf0fbc724aa53779b14
SQL
jsyrjala/nflow-clj
/resources/sql/executors.sql
UTF-8
723
3.328125
3
[]
no_license
-- :name insert-executor! :insert -- :doc Create new executor insert into nflow_executor(host, pid, executor_group, active, expires) values (:host, :pid, :executor_group, current_timestamp, date_add(current_timestamp, interval :expires_in second)); -- :name update-executor-activity! :! -- :doc update nflow_executor se...
true
b2b99a52001840b42f107a600ea21ae87917772e
SQL
791837060/FastMap
/init-incre-scripts/r_20161209/add_svr_inner_table.sql
UTF-8
344
2.53125
3
[]
no_license
-- used by multisrc2fm create table POI_EDIT_MULTISRC ( pid number(10) not null, source_type varchar2(12) not null, main_type number(2) not null ); CREATE INDEX IDX_POI_EDIT_MS_ID ON POI_EDIT_MULTISRC(PID); CREATE TABLE SVR_MULTISRC_DAY_IMP( FID VARCHAR2(36), START_DATE DATE, END_DATE DATE...
true
3661869117e94d7c827dfb314a28aa135a357fa5
SQL
autorizadabr/atsadmin
/script/Log/19.sql
UTF-8
18,945
2.984375
3
[]
no_license
SET TERM ^ ; CREATE OR ALTER TRIGGER IBE$RECEBIMENTO_AI FOR RECEBIMENTO ACTIVE AFTER INSERT POSITION 32767 as declare variable tid integer; begin tid = gen_id(ibe$log_tables_gen,1); insert into ibe$log_tables (id, table_name, operation, date_time, user_name) values (:tid, 'RECEBIMENTO', 'I', 'N...
true
7cd9fd3daa45cfed1df44b3ea5b59b77731d66d7
SQL
zaenalabid/appz
/appz.sql
UTF-8
15,939
2.859375
3
[ "MIT" ]
permissive
/* SQLyog Ultimate v12.5.1 (64 bit) MySQL - 10.4.13-MariaDB : Database - appz ********************************************************************* */ /*!40101 SET NAMES utf8 */; /*!40101 SET SQL_MODE=''*/; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FO...
true
13d601328dc4ebf7dc3ba5b51e95f8d2989fea38
SQL
darcinetodev/REGISTROPESSOAS
/bd/P_MANUT_PESSOA.sql
UTF-8
1,233
3.328125
3
[]
no_license
CREATE DEFINER=`root`@`localhost` PROCEDURE `P_MANUT_PESSOA`(P_TIPO CHAR, P_CODIGO INT, P_CPF DOUBLE, P_NOME VARCHAR(50), P_SENHA VARCHAR(32), P_DATA VARCHAR(11), P_EMAIL VARCHAR(50)) BEGIN DECLARE EXIT HANDLER FOR SQLEXCEPTION BEGIN ROL...
true
27f54bd16827be02e7c4d8fe9ad0d23f175df719
SQL
bakstansky/bootcamp
/06_Northwind/cities.sql
UTF-8
574
3.203125
3
[]
no_license
DROP TABLE IF EXISTS cities; -- Drop table if it already exists CREATE TABLE cities ( id SERIAL PRIMARY KEY NOT NULL, -- name, data type, contraints. PK = unique! -- SERIAL automatically incremented integer name VARCHAR(50) NOT NULL, population INTEGER NOT NULL, -- 2^32 country VARCHAR(50) NOT NULL ); INSER...
true
9b01486c5cd678fd7f9a3d32cbfc96aa67416d68
SQL
AndreCNF/ISD_Project
/Part3/code/SQL/InsertBloodTest.sql
UTF-8
999
2.984375
3
[]
no_license
DROP PROCEDURE InsertBloodTest; DELIMITER $$ CREATE PROCEDURE InsertBloodTest(IN animal_name VARCHAR(50), IN VAT_owner INTEGER, IN date_timestamp TIMESTAMP, IN num INTEGER, IN VAT_assistant INTEGER, IN white_blood_cell_count NUMERIC(5, 2), IN number_neutrophils NUMERIC(5, 2), IN number_monocytes NUMERIC(5, 2)) BEGIN ...
true
59bf4f5662ab2d4f40978cbdc33f0f8424204de2
SQL
opengauss-mirror/openGauss-server
/src/test/regress/sql/dfs_orc_hw_cstore_char2num.sql
UTF-8
4,030
3.296875
3
[ "LicenseRef-scancode-mulanpsl-2.0-en", "LicenseRef-scancode-unknown-license-reference", "PostgreSQL", "BSD-3-Clause", "LGPL-2.0-or-later", "LicenseRef-scancode-unicode", "LicenseRef-scancode-warranty-disclaimer", "curl", "GPL-1.0-or-later", "LGPL-2.1-or-later", "LGPL-2.1-only", "CC-BY-4.0", ...
permissive
set enable_global_stats = true; CREATE TABLE char_to_num_row ( id int, a char(30), b varchar(30), c bpchar ); CREATE TABLE char_to_num_row1 ( id int, a char(30), b varchar(30), c bpchar ); CREATE TABLE char_to_num_col ( id int, a char(30), b varchar(30), c bpchar )with ( orient...
true
c864097e22acd8b3d0ddb5a3e0a45706caf3563d
SQL
JDavidStevens/simulation-3-async
/helo/db/searchLast.sql
UTF-8
94
2.515625
3
[]
no_license
select * from robots where id != $1 and last_name = $2 order by first_name offset $3 limit 6;
true
e20202ab72bda980a9a2861486424620a312aff8
SQL
nandolrs/sge
/dados/modelos/script/sge/Relational_1/SQL Server 2012/DataObjects/ForeignKey/GEOENDERECO_ITTPESSOA_FK.sql
UTF-8
178
2.625
3
[]
no_license
ALTER TABLE GEOENDERECO ADD CONSTRAINT GEOENDERECO_ITTPESSOA_FK FOREIGN KEY(CD_PESSOA) REFERENCES ITTPESSOA(CD_PESSOA) ON DELETE NO ACTION ON UPDATE NO ACTION GO
true
8cf81ab50be7c17bd711e39ca3d4b6c93432bc2f
SQL
Starzeco/Oracle-SQL
/Lista2/zad32_sql.sql
UTF-8
2,483
3.546875
4
[]
no_license
WITH Czarni AS( SELECT PSEUDO FROM KOCURY K JOIN BANDY B on K.NR_BANDY = B.NR_BANDY AND B.NAZWA='CZARNI RYCERZE' ORDER BY W_STADKU_OD ), Laciaci AS( SELECT PSEUDO FROM KOCURY K JOIN BANDY B on K.NR_BANDY = B.NR_BANDY AND B.NAZWA='LACIAC...
true
8b804c5bd4d9ce408bc82e1c2720d8d93d66c399
SQL
eunh1107/StudySQLServer
/20210513/Select_review.sql
UHC
887
4.0625
4
[]
no_license
-- ȸ SELECT * FROM userTbl; -- ȸ ͸ SELECT * FROM userTbl WHERE userID = 'BBK'; SELECT userID, name, addr FROM userTbl WHERE name LIKE '%%'; -- Ư ̺ ڵ() Ȯ SELECT COUNT(*) FROM userTbl; -- Ű 180̻̰ -- ⵵ 1970Ŀ ¾ -- ̵, ̸, Ű ȸ SELECT userID, name, height FROM userTbl WHERE height >= 180 AND birthYear >= 1970; -- ...
true
fc42cf1be83ac916a1c3eb52e38ac09a2fcc8e96
SQL
RedRoma/aroma-data-operations
/src/main/resources/tech/aroma/sql/ddl/application_ddl.sql
UTF-8
1,017
3.5
4
[ "Apache-2.0" ]
permissive
------------------------------------------------------------------------------ -- APPLICATIONS PROVISIONED TO WORK WITH AROMA ------------------------------------------------------------------------------ CREATE TABLE IF NOT EXISTS Applications ( app_id UUID, app_name TEXT, ...
true
3d79f84ae7e37cc199d7c1c74b45815b9288c469
SQL
xiaopanwei/PatchManagementSystem
/db/dbFile/web_user.sql
UTF-8
997
2.796875
3
[]
no_license
/* Navicat Premium Data Transfer Source Server : 123 Source Server Type : MySQL Source Server Version : 80018 Source Host : rm-bp1ns8gwl0a1ihnyzro.mysql.rds.aliyuncs.com:3306 Source Schema : xpw_patch Target Server Type : MySQL Target Server Version : 80018 File Encoding ...
true
84419984253831d1fa11d4c337ae6b07866ec138
SQL
artyhedgehog/t-systems-webapp
/src/main/resources/db/migration/V1__Init_schema.sql
UTF-8
9,031
3.890625
4
[]
no_license
CREATE TABLE `trucks` ( `id` INT UNSIGNED NOT NULL AUTO_INCREMENT, `reg_number` CHAR(7) NOT NULL COMMENT 'Registration number on licence plate.', `drivers_quantity` TINYINT UNSIGNED NOT NULL COMMENT 'Size of drivers shift for the truck.', `capacity_tons` FLOAT UNSIGNED NOT NULL COMMENT 'Capacity for cargo in to...
true
15f342021a6ec6b67cff02fa530f7f97d0e95d0c
SQL
Hexilee/online-payment-subsystem
/online-payment-data.sql
UTF-8
215,884
2.796875
3
[]
no_license
/* Navicat Premium Data Transfer Source Server : MySQL Source Server Type : MySQL Source Server Version : 80016 Source Host : localhost:3306 Source Schema : onlineorder Target Server Type : MySQL Target Server Version : 80016 File Encoding : 65001 Date: 20/06/2019 10...
true
9ce0ee469a289a044fcb4212a894fcae84b17537
SQL
gregoriB/super-meter-arcade-ecommerce-site
/database/tables/item_categories.sql
UTF-8
236
3.5625
4
[]
no_license
CREATE TABLE item_categories ( ic_id SERIAL PRIMARY KEY, ic_item INT NOT NULL, ic_category INT NOT NULL, FOREIGN KEY (ic_item) REFERENCES items (item_id), FOREIGN KEY (ic_category) REFERENCES categories (cat_id) );
true
542849c5e3b461637fea13a4667e1327f6eb84df
SQL
Honey-lee429/mysql
/generation_game_online.sql
UTF-8
1,635
3.65625
4
[]
no_license
CREATE DATABASE db_generation_game_online; USE db_generation_game_online; CREATE TABLE tb_personagem ( id BIGINT AUTO_INCREMENT, nome VARCHAR(40) NOT NULL, poder_de_ataque INT, poder_de_defesa INT NOT NULL, fk_classe BIGINT(10), PRIMARY KEY (id), FOREIGN KEY (fk_classe) REFERENCES tb_classe (id_c...
true
b066a93be1c0833589d9f6e52ca781283a9c0097
SQL
949410591/read
/mysql/scr/常用函数.sql
UTF-8
856
3.15625
3
[]
no_license
select substr("含数发射东方红",4); select substr("含数发射东方红",1,4); select instr("slfjlasdfj","asd"); select trim(" fasdfsdf "); select trim("a" from "aaaaaaaaaaaaa asdjflkasjfls aaaaaaaaaaaaaafasdf sadf asdfas aaaaaaaaaaaaaaaaa"); select lpad("123",10,".."); select rpad("123",10,".."); select round(123.123,2); select ro...
true
3df5190026a39bcb1c80b3744585be7c50d833d7
SQL
zerojuls/b2b
/SQL/CAJA_GET.sql
UTF-8
917
4.125
4
[]
no_license
DELIMITER $$ DROP PROCEDURE IF EXISTS CAJA_GET$$ CREATE PROCEDURE `CAJA_GET`( IN P_id_caja CHAR(10), IN P_opcion INT ) BEGIN CASE P_opcion WHEN '1' THEN SELECT C.id_caja, C.c_codigo, C.c_caja, C.t_caja, T.c_tipo, C.id_moneda, M.c_moneda AS Moneda, C.id_empresa, C...
true
439e5b64d8756c2035134aa59ddb3ed2f5c5fb36
SQL
rajmgs/login
/src/main/resources/static/user_schema.sql
UTF-8
219
2.90625
3
[]
no_license
CREATE TABLE user ( id INTEGER NOT NULL AUTO_INCREMENT, name VARCHAR(45) NOT NULL, password VARCHAR(45) NOT NULL, created_date DATE NOT NULL DEFAULT CURRENT_TIMESTAMP PRIMARY KEY (id) );
true
c040c35db6d1c69c0c849da54f660e610955b18e
SQL
pei0804/eventory-goa
/migration/ddl.sql
UTF-8
7,334
3.953125
4
[ "MIT" ]
permissive
SET SESSION FOREIGN_KEY_CHECKS=0; /* Drop Tables */ DROP TABLE IF EXISTS event_genres; DROP TABLE IF EXISTS user_follow_events; DROP TABLE IF EXISTS events; DROP TABLE IF EXISTS user_follow_genres; DROP TABLE IF EXISTS genres; DROP TABLE IF EXISTS user_follow_prefs; DROP TABLE IF EXISTS prefs; DROP TABLE IF EXISTS us...
true
828deb43162049c3b58577616810c698112352d5
SQL
vitoorfraga/Impacta
/Linguagem SQL/Exercicios/DB-Empresa.sql
ISO-8859-1
3,145
3.84375
4
[]
no_license
-- Exerccios: --a. Criar Banco de Dados de Empresa --b. Colocar Banco de Dados em Uso --c. Criar Tabelas de: --1. Funcionrio (CPF, Nome, Salrio, Data de Nascimento) --2. Dependentes (CPF, CPF do Responsvel, Nome, Data de Nascimento) --d. Inserir Registros em ambas -- Obs.: Utilize a maior variedade de Tipos de ...
true
62de1e3a94644d5d78c8a2c95715cc82a070d98a
SQL
djwhitten/eHMP
/chef-repo/project_cookbooks/ehmp_oracle/files/default/oracledb/pcmm/pcmm_packages.sql
UTF-8
13,220
3.40625
3
[ "Apache-2.0" ]
permissive
-------------------------------------------------------- -- DDL for Package PCMM_API -------------------------------------------------------- CREATE OR REPLACE PACKAGE "PCMM"."PCMM_API" AS FUNCTION get_base_icn(i_icn IN varchar2) RETURN varchar2; FUNCTION pipe_teams_by_facility(i_facility_id IN VARCHAR2) RETURN ...
true
b773b272dadc6b2269a1e1f6698ff64637677c3e
SQL
es021/cf-app
/test/data-cleanup.sql
UTF-8
1,703
3.84375
4
[]
no_license
-- ###################### -- SUGGESTION UNTUK WHERE IN MALAYSIA xde dlm ref select X.ID, X.val as original_val, X.key_input, X.entity_id, (CASE WHEN X.match_state IS NOT NULL THEN X.match_state ELSE X.match_city END) as matchs from( SELECT s.ID, s.val, s.entity_id, s.key_input...
true
a693708d14c8ddf1f136b73d5d9a25ff201e1279
SQL
eagle2snow/yuedan
/sql.sql
UTF-8
9,091
3.015625
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : selfthis Source Server Version : 50722 Source Host : localhost:3306 Source Database : bar Target Server Type : MYSQL Target Server Version : 50722 File Encoding : 65001 Date: 2018-07-04 18:25:16 */ SET FOREIGN_KEY_CHECK...
true
716847d97e8b5642eb2da7a11e5027a60c32d51b
SQL
lhy274/websource
/shopping1/shopping.sql
UTF-8
398
2.6875
3
[]
no_license
create table productTBL( num number(8), category varchar2(20), name varchar2(50), content varchar2(3000), psize varchar2(10), color varchar2(20), amount number(8), price number(8), goods_date date default sysdate ); alter table productTBL add constraint prod_seq primary key(num); create sequence seq_productT...
true
30ec37dd8dacc6f6448b51df9751108af34e8e7c
SQL
bfletcherbiggs/sql-queries
/day2/day2-practice.sql
UTF-8
4,077
4.21875
4
[]
no_license
/* Return to https://chinook.ml. Feel free to drop the existing tables, as you will use them in the afternoon project. */ --UPDATE -- Create a table or use one of the sql files to create a table. CREATE TABLE IF NOT EXISTS country ( code character(3) not null primary key, name text NOT NULL, ...
true
e9fc350747b9c7329ab6e3f58e4dead417c7630b
SQL
vscherbo/sync-mod-versions
/dev-param-order.sql
UTF-8
794
3.671875
4
[]
no_license
SELECT 'SELECT * FROM crosstab(''' || 'SELECT mp.mod_id, mp.dev_param_id, p.param_id' || ' FROM devmod.modifications m, devmod.modif_param mp, devmod.dev_param dp, devmod.param p' || ' WHERE m.dev_id=mp.dev_id AND m.mod_id=mp.mod_id AND m.version_num=mp.version_num' || ' AND mp.dev_param_id=dp.dev_param...
true
71b8b25ff4f3b0f1fb59de8f03ad0be705701ecd
SQL
gxlimeng/gxlimeng-springmvc
/src/main/java/db/DB.SQL
UTF-8
19,573
3.59375
4
[]
no_license
/* Navicat MySQL Data Transfer Source Server : local Source Server Version : 50622 Source Host : localhost:3306 Source Database : gtrust Target Server Type : MYSQL Target Server Version : 50622 File Encoding : 65001 Date: 2017-01-13 18:03:21 */ SET FOREIGN_KEY_CHECKS=0; -- ------...
true
101907950c4708f1a2967c73adf3e774d00cd00c
SQL
D4rk1ink/Online-Book-Rental-System
/SQL/shopsystem.sql
UTF-8
6,666
3.40625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Nov 07, 2016 at 03:26 PM -- Server version: 10.1.10-MariaDB -- PHP Version: 5.6.19 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CL...
true
a135ea02a971343bbe77b4deec7d539cc4af1350
SQL
NoraCarey/Leetcode-SQL
/SQL/0569. Median Employee Salary/mysql_count_window_function.sql
UTF-8
790
4.25
4
[]
no_license
# Window Function COUNT() calculates the number of employees in each company # Window Function ROW_NUMBER() records the salary ranking for each employee in each company SELECT Id, Company, Salary FROM (SELECT Id, Company, Salary, COUNT(Salary) OVER(PARTITION BY Company) AS count_num, ROW_N...
true
cac86989fdc4c1b3cde53c7855c0bb5dd83f4c32
SQL
neouzer12/VirtualHG
/vhg.sql
UTF-8
1,853
3.375
3
[]
no_license
-- Adminer 4.2.5 MySQL dump SET NAMES utf8; SET time_zone = '+00:00'; SET foreign_key_checks = 0; SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO'; DROP DATABASE IF EXISTS `virtualhg`; CREATE DATABASE `virtualhg` /*!40100 DEFAULT CHARACTER SET latin1 */; USE `virtualhg`; DROP TABLE IF EXISTS `categories`; CREATE TABLE `catego...
true
a2aea161da88e7786584fa96f4e0ef4752b8f42a
SQL
erwinmacaraig/perl-cig-prj
/db_setup/new_realm/singapore/new.userauth.setup.sql
UTF-8
663
3.203125
3
[]
no_license
SET @strRealmName="Singapore", @strStatus="ACTIVE", @intEntityLevel="100"; /** Retrieve target realm id **/ SELECT @intRealmID:=intRealmID FROM tblRealms WHERE strRealmName = @strRealmName; /** Load User Acces Files **/ LOAD DATA LOCAL INFILE '/home/jescoto/src/FIFASPOnline/db_setup/new_realm/singapore/ref_d...
true
ff15a932569694fbd0535b2d65ac0caef22495f4
SQL
Rodrivilas/exportBasesDeDatosxd
/cuarentenaRV.sql
UTF-8
7,273
3.09375
3
[]
no_license
-- MySQL dump 10.13 Distrib 8.0.19, for Win64 (x86_64) -- -- Host: localhost Database: cuarentena -- ------------------------------------------------------ -- Server version 8.0.19 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESUL...
true
9742fba1275003ae190bf9af9f63739eca0b8bc9
SQL
macbre/index-digest
/sql/0032-utf-latin-columns.sql
UTF-8
1,088
3.234375
3
[ "MIT" ]
permissive
-- Report text columns that use non-utf collation -- -- https://github.com/macbre/index-digest/issues/32 DROP TABLE IF EXISTS `0032_utf8_table`; CREATE TABLE `0032_utf8_table` ( `item_id` int(9) NOT NULL AUTO_INCREMENT, `name` varchar(255) NOT NULL, `latin_column` varchar(255) CHARACTER SET latin1 COLLATE latin1_bin...
true
55bdc54a2af2e8967bb154182920e90797c37864
SQL
jdsee/today
/dataBankTableSetup.sql
UTF-8
1,355
3.453125
3
[]
no_license
DROP TABLE noteReferences; DROP TABLE notes; DROP TABLE attachments; DROP TABLE lectures; DROP TABLE sections; DROP TABLE tasks; DROP TABLE courses; DROP TABLE semesters; CREATE TABLE semesters (semesterID INTEGER PRIMARY KEY, semesterNr INTEGER); CREATE TABLE courses (courseID INTEGER PRIMARY KEY, name VARCHAR(12...
true
c8b64895dc29b842243e6f2760b4b202b48b1082
SQL
reeraaaay/Project
/kpop.sql
UTF-8
1,599
2.84375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.9.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Nov 30, 2019 at 09:56 AM -- Server version: 10.4.8-MariaDB -- PHP Version: 7.3.11 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*...
true
52762a52dd2bcf4de670f0352210d38a6b769db6
SQL
wsgan001/Projects-2
/IDS521/NullValues_exercise_session4.sql
UTF-8
388
2.71875
3
[]
no_license
CREATE TABLE colors ( color VARCHAR(25) ); INSERT INTO colors VALUES ('Red'); /*insert into colors values('Blue');*/ insert into colors values('Green'); insert into colors values('Black'); insert into colors values(''); insert into colors values(null); Select * from colors where Color not in ('Blue', 'Black', nu...
true
167076ab55523be64b251f6c31ff9d61f9b5b963
SQL
MichaelKremser/cons2db
/sql/pgsql/systems.sql
UTF-8
348
3.203125
3
[ "MIT" ]
permissive
CREATE TABLE systems ( sys_id serial PRIMARY KEY, sys_name character varying(100) NOT NULL, sys_desc character varying(4000) ) WITH ( OIDS=FALSE ); COMMENT ON COLUMN systems.sys_name is 'System name, like a hostname or a metering point code'; COMMENT ON COLUMN systems.sys_desc is 'A human readable description ...
true
6ab7f8f55705992e2bd64dbc53b8d2fe0b3cd94d
SQL
guilhascorreia24/les
/database/db.sql
UTF-8
43,394
3.25
3
[]
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
fd4487a405e3f3ec266b2e25dddd04873b8ab819
SQL
aliashraf94/Databases-Homework
/week-1/mandatory/homework.sql
UTF-8
3,129
4.1875
4
[]
no_license
drop table if exists mentors cascade; drop table if exists students cascade; drop table if exists topics cascade; drop table if exists classes cascade; drop table if exists attendance cascade; create table mentors ( id serial primary key, name varchar(30) not null, years_living_in_glasgow int default 0 not null, a...
true
c3fbd0970b2c2d92e41cb6fddf317440536c7de8
SQL
jsgilberto/sparkify
/src/schema.sql
UTF-8
852
3.3125
3
[]
no_license
-- Fact table CREATE TABLE IF NOT EXISTS songplays ( songplay_id SERIAL NOT NULL UNIQUE, start_time TIMESTAMP, user_id INTEGER, song_id VARCHAR, artist_id VARCHAR, session_id INTEGER, level VARCHAR, location VARCHAR, user_agent VARCHAR ); -- Dimension tables CREATE TABLE IF NOT EXISTS users ( user_id INTE...
true
7492f64c2ff2b0fa1d54a1674dcca82209c18e87
SQL
flaschenpost/klimawahlen
/struct.sql
UTF-8
1,359
3.5625
4
[ "MIT" ]
permissive
drop table if exists cronrun; create table cronrun( id bigint not null primary key auto_increment, inserted timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, tweets bigint ); drop table if exists tweep; create table tweep( id bigint not null primary key, is_blocked tinyint(4) not null default 0, handle varchar...
true
263813f23d308831c63fb42d6f2f473446edf77f
SQL
douit/cqes_dev
/重庆二师_Dev/dw_mpp/table/fdm/edu_hb_cqshjzhxsttzwyy.sql
UTF-8
1,288
2.53125
3
[]
no_license
/* # DESCRIPTION: # # OPTIONS: --- # REQUIREMENTS: --- # BUGS: --- # NOTES: --- # AUTHOR: song.shengjie@h3c.com # COMPANY: h3c.bigdata # VERSION: 1.0 # CREATED: 2017/08/07 # REVIEWER: # REVISION: --- */ set names utf8; use FDM; DROP TABLE IF EXISTS `edu_hb_cqshjzhxsttz...
true
df4e0d0a7c16dd0120e51439450238fb6cb0b6ce
SQL
chaesiong/rtp-database
/production/PIBICSDM2/tables/crs_deptissuedrc.sql
UTF-8
2,237
2.671875
3
[]
no_license
CREATE TABLE "PIBICSDM2"."CRS_DEPTISSUEDRC" ( "DEPTISSUEDRC_SEQNO" NUMBER, "DEPTISSUEDRC_CODE" CHAR(3 CHAR), "DEPTISSUEDRC_NAME" VARCHAR2(30 CHAR), "ACTFLAG" CHAR(1 CHAR), "CREATE_BY" VARCHAR2(20 CHAR), "CREATE_DATE" TIMESTAMP (6), "UPDATE_BY" VARCHAR2(20 CHAR), "UPDATE_DATE" TIMESTAMP (6), ...
true
ef53e827dd5f69a4d8023f978a4da2d953998c35
SQL
BrandConstantin/php
/prueba/MVC/Model/oferta.sql
UTF-8
1,921
3.0625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.0.6deb1 -- http://www.phpmyadmin.net -- -- Servidor: localhost -- Tiempo de generación: 17-11-2013 a las 21:25:00 -- Versión del servidor: 5.5.34-0ubuntu0.13.10.1 -- Versión de PHP: 5.5.3-1ubuntu2 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40...
true
b654de5478234497465005207ec0fc0496b332c8
SQL
julioale21/alkemy-SQL
/Modulo 2 capsula 1.sql
UTF-8
6,301
3.234375
3
[]
no_license
SELECT MIN(salario) from profesor where fecha_nacimiento LIKE '%198%' CREATE TABLE pais ( idpais int AUTO_INCREMENT NOT NULL, nombre VARCHAR NOT NULL, PRIMARY KEY (idpais) ) CREATE TABLE pasajero ( idpasajero int AUTO_INCREMENT NOT NULL, nombre VARCHAR NOT NULL, apaterno VARCHAR NOT NULL, amaterno VARC...
true
67b8a7fc940ff3787fb16c314d1e912f2724f0e2
SQL
OSGP/open-smart-grid-platform
/osgp/platform/osgp-core/src/main/resources/db/migration/V20170807160951294__Refactors_firmware_for_all_value_streams.sql
UTF-8
10,438
3.9375
4
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
DO $$ BEGIN IF NOT EXISTS ( SELECT 1 FROM pg_tables WHERE schemaname = current_schema AND tablename = 'firmware_file') THEN -- Since we are dealing with firmware files, rename the firmware table to firmware_file. ALTER TABLE firmware RENAME TO firmware_file; -- Rename the sequence ...
true
b5368f68bbb28a50ec9843d21d0a929dad7c7f49
SQL
nicholasmfraser/wos_unpaywall_matching
/sql/criteria/article_title_wos_uniques.sql
UTF-8
147
2.78125
3
[]
no_license
SELECT ROUND((COUNT (DISTINCT ARTICLE_TITLE) / COUNT(*))*100, 2) AS PCT_UNIQUE FROM WOS_B_2019.ITEMS WHERE DOCTYPE IN ('Article', 'Review')
true
0dc139ec8bf26d93ba3ea69d8b71a2adaba16143
SQL
royjoyita/SQL_Challenge
/SQL_Homework/Schemata.sql
UTF-8
492
2.703125
3
[]
no_license
titles - title_id VARCHAR PK title VARCHAR employees - emp_no INT PK emp_title_id VARCHAR FK - titles.title_id birth_date DATE first_name VARCHAR last_name VARCHAR sex VARCHAR hire_date DATE departments - dept_no VARCHAR PK dept_name VARCHAR dept_manager - emp_no INT PK FK - employees.emp_no dept_no VARCHAR PK FK - ...
true
192cdf3390575e8ee2ba895c50a68d1f59ad1360
SQL
leelaohu/sqlstudy
/DQL/findismohu.sql
UTF-8
3,453
4.125
4
[]
no_license
#进阶2 条件查询 /* select 查询列表 from 表名 where 筛选条件 分类 1.按条件表达式查询 简单条件运算符:> < = != <> >= <= 2.按逻辑表达式筛选 用于连接条件表达式 逻辑运算符 : && || ! and or not 3.模糊查询 like between and in is null */ #1.按条件表达式筛选 #ex:查询工资大于12000的员工 SELECT * FROM employees WHERE salary>12000 #ex:查询部门编号不等于90号的员工名和部门编号 SELECT last_...
true
27df40eaf9f3665bee9fc4a90c53b4b10fbb05d4
SQL
jasminekhairunissa/HaiMimpi
/haimimpi.sql
UTF-8
14,189
3.265625
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.9.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Nov 27, 2019 at 04:19 PM -- Server version: 10.4.8-MariaDB -- PHP Version: 7.3.11 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
true
5b206e322d48895d43478a18ce7cacbd12582e75
SQL
zhangpinglong/blog
/migration/article.sql
UTF-8
1,184
3.28125
3
[]
no_license
/* Navicat Premium Data Transfer Source Server : Mysql Source Server Type : MySQL Source Server Version : 50731 Source Schema : blog Target Server Type : MySQL Target Server Version : 50731 File Encoding : 65001 Date: 08/10/2020 21:21:16 */ SET NAMES utf8mb4; SET FOREIGN_KEY_C...
true
7131a3e92fd6b9a0faf218d49b7b788f9700b62b
SQL
UCLALibrary/sql-scripts
/Voyager/Circulation/External 5 Reports.sql
UTF-8
3,309
4.09375
4
[]
no_license
CREATED SINCE 2006 select p.last_name, p.first_name, perm_add.address_line1, perm_add.address_line2, perm_add.city, perm_add.state_province, perm_add.zip_postal, perm_phone_primary.phone_number, email.address_line1 email, pg.patron_group_name patron_group, vger_support.lws_csc.concat_stat_cats(p....
true
77401e51a0e917451d2d8e77eb9bbfa61a00f831
SQL
SextoSistemasDev20/Repo-Desarrollo
/SCRIPTS/scripts 2020 - copia.sql
UTF-8
6,238
3.421875
3
[]
no_license
/*==============================================================*/ /* Database: PROYECTO_INTEGRADOR_6B */ /*==============================================================*/ CREATE DATABASE PROYECTO_INTEGRADOR_6B; USE PROYECTO_INTEGRADOR_6B; /*=================================================...
true
4c761ef32de4d8cbbfb6dbb8a549226836adffdf
SQL
Gdaimon/poliSilabos
/db/Antiguo Sql/scriptCorregido.sql
UTF-8
36,965
3.25
3
[]
no_license
--Creacion de las Tablas CREATE TABLE public .par_usuarios( id SERIAL PRIMARY KEY, id_usuario integer UNIQUE, tipo_cedula text NOT NULL, nombre text NOT NULL, apellido text NOT NULL, email text NOT NULL, password text NOT NULL, perfil integer NOT NULL, fecha_creacion date NOT NULL, estado_usuario boolean NOT ...
true
bc063f6cfc6dfe90e222b0aae85f29a9ae30b7ef
SQL
Jsamps76/SQL
/practice.sql
UTF-8
1,624
4.09375
4
[]
no_license
-- Hellow World SQL Query SELECT * FROM actor; -- Query for first name and last name in actor table SELECT first_name, last_name FROM actor; -- Query for first name that is Nick SELECT first_name, last_name FROM actor WHERE first_name = 'Nick'; -- Query for first name that equals Nick using the Like clause SELECT la...
true
695d680a6c7112746c91654f40ef77d11440d463
SQL
altamira/visualstudio
/Sistema de Informação Altamira/EGISSQL.Database/dbo/Stored Procedures/Procs2/pr_fechamento_caixa_operador.sql
UTF-8
3,077
3.5
4
[]
no_license
 ------------------------------------------------------------------------------- --sp_helptext pr_fechamento_caixa_operador ------------------------------------------------------------------------------- --pr_fechamento_caixa_usuario ------------------------------------------------------------------------------- --GBS...
true
5c7011c091ae57b8f895e2c2598b928b4ec37a97
SQL
nvanhai/tct2013
/Source/Scipt_NTK_3.2.0/1_rcv_dm_tkhai_13.sql
UTF-8
4,701
2.609375
3
[]
no_license
--To khai 02/TNCN thang insert into qlt_ntk.rcv_dm_tkhai (MA, TEN, KIEU_KY, PHIEN_BAN, START_DATE, END_DATE) values ('02A_TNCN13', '02/KK-TNCN', 'M', '320', to_date('01-01-2014', 'dd-mm-yyyy'), null); --To khai 02/TNCN quy insert into qlt_ntk.rcv_dm_tkhai (MA, TEN, KIEU_KY, PHIEN_BAN, START_DATE, END_DATE) valu...
true
ec5016cbb03e7377c0d1c5bdf344d1256ff70012
SQL
erjan/coding_exercises
/stratascratch/medium/active_interview_questions/Book Sales.sql
UTF-8
383
3.703125
4
[ "Apache-2.0" ]
permissive
Calculate the total revenue made per book. Output the book ID and total sales per book. In case there is a book that has never been sold, include it in your output with a value of 0. select a1.book_id, coalesce( unit_price * sum(quantity),0) as total_sales from amazon_books a1 left join amazon_books_order_details ...
true
da74e4c0cd62ff9e19b220b2abf58b72f24bfa54
SQL
goyalrinki/compsoc_freshers_hack
/cs_fh_database/database_create.sql
UTF-8
1,627
4
4
[]
no_license
-- Table: public.video -- DROP TABLE public.video; CREATE TABLE IF NOT EXISTS public.video ( video_id uuid NOT NULL, link text COLLATE pg_catalog."default" NOT NULL, created_at text COLLATE pg_catalog."default", audio_link text COLLATE pg_catalog."default", CONSTRAINT video_pkey PRIMARY KEY (video...
true
640063beac5ced1b7e3070a6724239806d1f52e6
SQL
jiesonMing/sj_shop
/backup/v2.0.3/sql/v2.0.3.sql
UTF-8
1,556
3.234375
3
[]
no_license
ALTER TABLE `__PREFIX__goods` CHANGE `prom_type` `prom_type` tinyint(1) NULL DEFAULT 0 COMMENT '0 普通订单,1 限时抢购, 2 团购 , 3 促销优惠,4预售' after `sales_sum`; ALTER TABLE `__PREFIX__order` ADD COLUMN `order_prom_type` tinyint(4) NULL DEFAULT 0 COMMENT '0默认1抢购2团购3优惠4预售5虚拟' after `pay_time` , CHANGE `order_prom_id...
true
065fa963f89bac12f427107a716dbae5d61db678
SQL
MattMead/SQLiteLab1.5
/SQLiteLab1.5.sql
UTF-8
879
4.0625
4
[]
no_license
--1 SELECT MAX(total) FROM Invoice; --2 SELECT total FROM Invoice ORDER BY total DESC LIMIT 1; --3 SELECT MediaType.name, COUNT(*) as Total FROM Track, MediaType WHERE Track.MediaTypeID = MediaType.MediaTypeId GROUP BY MediaType.name; --4 SELECT MediaType.name, COUNT(*) as Total FROM Track, MediaType WHERE Track.Med...
true
90fa67eec239ffaf1c643013fcd01b7f403bf2d9
SQL
gutonanet/avaliacao20190610
/src/resource/exercicio1.sql
UTF-8
228
4.03125
4
[]
no_license
Select e.event_type, max(e.value) - (select ev.value from events ev where ev.event_type = e.event_type order by ev.time desc limit 1,1) as value from events e group by e.event_type having count(e.event_type) > 1 and min(e.time)
true
d8a9a8cdd1d287bf17dc3374234c869f611639a5
SQL
sprokushev/Delphi
/MASTER/_DATABASE/Procedures/CLOSE_OLD_PRICES.sql
UTF-8
364
2.96875
3
[]
no_license
-- -- CLOSE_OLD_PRICES (Procedure) -- CREATE OR REPLACE PROCEDURE MASTER.CLOSE_OLD_PRICES (DATE_PRICE DATE,CAT_CEN NUMBER,PROD_ID VARCHAR2) IS BEGIN UPDATE npr_prices SET END_DATE=LAST_DAY(BEGIN_DATE) WHERE END_DATE is NULL AND BEGIN_DATE<TRUNC(date_price) AND PROD_ID_NPR=prod_id AND CAT_CEN_ID=c...
true