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
221f33486c0ac8365586ec2f75dad10426a80497
SQL
pfilipiak/porownanie_serwisow
/porownanie_serwisow/src/sql_files/produkts/euro/bp_produkt_euro.sql
UTF-8
2,701
2.875
3
[]
no_license
create table bp_produkt_euro( id bigserial primary key, keyword text, position int4, search_volume int8, url text, traffic_share numeric(4,2), trends text, timestamp timestamp, year int4, month int4 ); alter table bp_produkt_euro add column brand_fraze boolean; update bp_produkt_euro set brand_fraze = case when key...
true
ea616da86a806a00c57f0c7134eb6d5ecece22b4
SQL
alxmtr/filrouge-bdtheque
/BDTheque.sql
UTF-8
8,054
3.046875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.6.4 -- https://www.phpmyadmin.net/ -- -- Client : 127.0.0.1 -- Généré le : Ven 06 Janvier 2017 à 10:35 -- Version du serveur : 5.7.14 -- Version de PHP : 5.6.25 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER...
true
dc23caf7c56e7bb211ef47d766637faef2c729ed
SQL
21sparker/simple-time-tracker
/TimeTracker/table-schema.sql
UTF-8
321
2.984375
3
[]
no_license
BEGIN TRANSACTION; CREATE TABLE IF NOT EXISTS "TaskHistory" ( "LoggedDateTime" INTEGER, "TaskId" INTEGER ); CREATE TABLE IF NOT EXISTS "Task" ( "TaskId" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT UNIQUE, "Description" TEXT NOT NULL, "CreatedDateTime" INTEGER NOT NULL, "DeletedDateTime" INTEGER NOT NULL ); COMMIT;...
true
6c17f33b445153387d918609091e12e05bcfe9e8
SQL
awll1132/weizan2
/addons/lonaking_bb/sql/ims_lonaking_bb_tags.sql
UTF-8
956
2.765625
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : 静安 Source Server Version : 50096 Source Host : 116.255.194.194:3306 Source Database : newwe7 Target Server Type : MYSQL Target Server Version : 50096 File Encoding : 65001 Date: 2015-08-26 17:36:56 */ SET FOREIGN_KEY_CH...
true
d9173cc095198afa43624f394908c0472aec7276
SQL
medwinz/tarwit
/visitor.sql
UTF-8
1,588
2.90625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: 15 Mar 2017 pada 15.05 -- Versi Server: 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_CLIENT ...
true
a326e62532bcc83593c1eb27eb27ab4cb8b853a2
SQL
jkstill/index-effects
/stats.sql
UTF-8
136
2.578125
3
[]
no_license
SELECT column_name, num_distinct, histogram FROM dba_tab_col_statistics WHERE owner = 'JKSTILL' AND table_name = 'INDEX_EFFECTS' /
true
d3f5e8cf5de4e5a93ca30ecfc5651e75d3c9eac5
SQL
Luiscode7/cpp
/bd/cpp_proyecto_tipo.sql
UTF-8
2,074
2.953125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.7.0 -- https://www.phpmyadmin.net/ -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 09-07-2018 a las 18:15:53 -- Versión del servidor: 10.1.25-MariaDB -- Versión de PHP: 5.6.31 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00";...
true
a66e97f7f194f358b191714922999fe69b43d599
SQL
UAMS-DBMI/PosdaTools
/posda/posdatools/migrations/posda_files/add_seg_bitmaps.sql
UTF-8
1,419
2.8125
3
[ "Apache-2.0" ]
permissive
create table seg_bitmap_file( seg_bitmap_file_id integer not null unique, number_segmentations integer not null, num_slices integer not null, rows integer not null, cols integer not null, frame_of_reference_uid text not null, patient_id text not null, study_instance_uid text not null, series_instance_...
true
58716cc073753a793b79089c1eae8fe22caa45e2
SQL
billwright/smsc
/classDemos/db/labs/hikingTrailSite/V1__simplified_schema.sql
UTF-8
905
3.375
3
[]
no_license
CREATE TABLE "userinfo" ( "user_id" SERIAL PRIMARY KEY, "name" VARCHAR(100), "username" VARCHAR(100), "email" VARCHAR(100), "city" VARCHAR(100) ); CREATE TABLE "trails" ( "trail_id" SERIAL PRIMARY KEY, "name" VARCHAR(100), "location" VARCHAR(100), "length" DECIMAL, "elevation_gain" INT, "difficul...
true
4015f47121c9dcdb66df2d038a3701e853845e2c
SQL
kaoru-drosera/PHP_Learning_Pool
/MnavPHP/chap4 15.03.35/sample4-21_codeEscape.sql
UTF-8
2,484
4.09375
4
[]
no_license
--その他便利なSQL --DISTINCT,BETWEEN,IN,LIMIT,AS を学ぶ SELECT items_id FROM carts; -- このコードでは同じデータが重複して出る。 -- 「DISTINCT」を使えば、重複を防げる。 SELECT DISTINCT items_id FROM carts; -- 以上のコードだ。 SELECT * FROM my_item WHERE price>=50 AND price<150; -- 意味:「価格が50以上、150以下」このコード。 -- 「BETWEEN」を使えば省略できる。 SELECT * FROM my_item WHERE price BETW...
true
0456904336aefc8bd2186abf65a4934bb91fc5c5
SQL
ricardorq85/genetic-forex
/ForexGenetic/sql/updateFactorDatosTPO.sql
UTF-8
622
3.40625
3
[]
no_license
UPDATE DATO_ADICIONAL_TPO TPO SET FACTOR_DATOS=( SELECT MAX(TPO2.CANTIDAD_FILTRADA)/(24*13+1) FROM TENDENCIA_PARA_OPERAR TPO2 WHERE TPO.FECHA_BASE=TPO2.FECHA_BASE AND TPO2.TIPO_TENDENCIA NOT LIKE 'EXTREMO%' ) WHERE FACTOR_DATOS IS NULL ; COMMIT; UPDATE TENDENCIA_PARA_OPERAR TPO SET LOTE=GREATEST(NVL((...
true
f0ee60bc1527f72f553410ca80f974ee7bc3a890
SQL
NGUp/VeXeCuaTui
/Source/module/Application/src/Application/System/SqlScripts/StoredProcedure/usp_deleteRegulation.sql
UTF-8
178
2.609375
3
[]
no_license
-- Xóa Điều tiết giá vé -- -- usp_deleteRegulation 'DT2011' Create Procedure usp_deleteRegulation @id nchar(10) As Begin Delete From DieuTietGiaVe Where MaDT = @id End
true
ecf1794956beeb30e4c0f1ddbe517f6156465e30
SQL
vazzanag/DOS_INL
/GTTS/INLDB/vetting/Views/VettingBatchPersonsView.sql
UTF-8
2,003
3.59375
4
[]
no_license
CREATE VIEW [vetting].[VettingBatchPersonsView] AS SELECT -- Vetting pv.PersonsVettingID, pv.VettingBatchID, pv.Name1 AS LeahyName1, pv.Name2 AS LeahyName2, pv.Name3 AS LeahyName3, pv.Name4 AS LeahyName4, pv.Name5 AS LeahyName5, pv.VettingPersonStatusID, vps.Code AS VettingPersonStatus, ...
true
e728155ffc9e8308b8dcecb75cd50aae6da6958c
SQL
vonNiklasson/graph-cloud
/src/schema.sql
UTF-8
701
3.328125
3
[ "MIT" ]
permissive
-- -- Editor SQL for DB table graphs -- Created by http://editor.datatables.net/generator -- CREATE TABLE IF NOT EXISTS graphs ( id serial, node_count integer, edge_count integer, diameter integer, total_edge_cost integer, convergence_rate numeric(9,2), energy_cost numeric(9,2), eccentricity_average numeric(9...
true
1e13c686bf2d07b35504333c36930dc61c9247af
SQL
gymn/graphAnalysis_web
/sqlScript/graph.sql
UTF-8
4,281
3.265625
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : 本地mysql Source Server Version : 50625 Source Host : localhost:3306 Source Database : graph Target Server Type : MYSQL Target Server Version : 50625 File Encoding : 65001 Date: 2018-01-12 18:42:30 */ SET FOREIGN_KEY_CHECKS=0; -- ------...
true
43a6e691f97874507c2c6701fb63f3a9b925f281
SQL
saulo-moura/gfir
/_font/alteracao banco/old/ajustar hist.sql
UTF-8
1,047
3.21875
3
[]
no_license
ALTER TABLE `historicorealizacoescliente` ADD COLUMN `idt` int(10) UNSIGNED NOT NULL AUTO_INCREMENT FIRST , ADD PRIMARY KEY (`idt`); ALTER TABLE `historicorealizacoescliente_anosanteriores` ADD COLUMN `idt` int(10) UNSIGNED NOT NULL AUTO_INCREMENT FIRST , ADD PRIMARY KEY (`idt`); ALTER TABLE `historicoreali...
true
a05b1f867e9a2ac2f7315907686dc20b1ef7d051
SQL
ITOzann/motec
/Motec-Logging/SQLQueries/Channels.sql
UTF-8
315
3.109375
3
[ "MIT" ]
permissive
CREATE TABLE ChannelLog( id INTEGER PRIMARY KEY, entryId INTEGER NOT NULL, channelId INTEGER NOT NULL, FOREIGN KEY(entryId) REFERENCES MasterDirectory(id) FOREIGN KEY(channelId) REFERENCES ChannelName(id) ); CREATE TABLE ChannelName( id INTEGER PRIMARY KEY, channelName TEXT NOT NULL )
true
11e12c7553e0c10ab1a647876a7f1f3fba95c39d
SQL
dkim286/CPSC-332-proj
/3.sql
UTF-8
518
3.796875
4
[]
no_license
/* Create a view which has First Names, Last Names of all doctors who gave out prescriptions for Vicodin. */ DROP VIEW IF EXISTS vicPresc; CREATE VIEW vicPresc AS SELECT firstName, lastName FROM PERSON JOIN DOCTOR ON PERSON.personID = DOCTOR.personID JOIN PATIENTVISIT ON PATIENTVISIT.doctorID = DOCTOR.doctorID JOIN PVI...
true
34e17be635bda66750830d0ac0bdef64f90c0687
SQL
mklv13/C-Sharp-DB-SoftUni
/MSSQL/04. Built In Functions/Find Towns Starting With.sql
UTF-8
195
3.359375
3
[]
no_license
USE SoftUni SELECT TownID,Name FROM Towns WHERE LEFT(Name, 1) IN ('M', 'K', 'B', 'E') ORDER BY Name SELECT TownID,Name FROM Towns WHERE LEFT(Name, 1) LIKE '[MKBE]' ORDER BY Name
true
f12b2e007c74f2eb44162b2f510b1b72b0e99fc1
SQL
rfasioli/java-terminal-admin
/Scripts_DB/DB_ESAFE_MASTER_CREATE_SCRIPT.sql
UTF-8
9,119
3.296875
3
[]
no_license
-- Table: tb_cliente -- DROP TABLE tb_cliente; CREATE TABLE tb_cliente ( id_cliente serial NOT NULL, ds_nome_fantasia character varying(100) NOT NULL, ds_razao_social character varying(100) NOT NULL, ds_cnpj character varying(20) NOT NULL, dt_cadastro timestamp with time zone NOT NULL DEFAULT now(), ic_at...
true
9a4740dedb8b5f7a77fceff5340e98d5cebaee03
SQL
jdiazi/SQL_Projects
/NashvilleHousing_sql.sql
UTF-8
3,385
4.25
4
[]
no_license
--CREATE DATABASE PORTFOLIOPROJECT USE PORTFOLIOPROJECT /* Cleaning Data in SQL Queries */ SELECT*FROM NASHVILLEHOUSING --STANDARDIZE DATE FORMAT SELECT SALEDATE FROM NASHVILLEHOUSING SELECT SALEDATE, CONVERT(DATE, SALEDATE) FROM NashvilleHousing ALTER TABLE NashvilleHousing ADD SaleDateConverted Date...
true
4da31ebaa9b8a483fcfa09aff000b778a1ab2042
SQL
calexdev/help_desk_app
/app_help_desk/connect/banco.sql
UTF-8
384
2.515625
3
[]
no_license
create database help_desk CHARACTER SET utf8 COLLATE utf8_general_ci; create table usuario( id int auto_increment not null primary key, email varchar(50) not null, senha varchar(255) not null ); create table chamado( id_chamado_usuario int not null, titulo varchar(255) not null , categor...
true
f3a31f50ebff752a46f10369d53dee43f2cc1bec
SQL
poojakarthik/PE-Intranet
/db/pen/ajxp_repo.sql
UTF-8
916
2.640625
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 */; CREATE TABLE `ajxp_repo` ( `uuid` varchar(33) NOT...
true
7ddb182d50d94f1de722a2d16157245691743a2a
SQL
VijayMVC/JCC-Data-Warehouse
/SQLDB/dbo/Views/AA_ACR_CARBON_EG_AND_CLASS_BY_YEAR_BUDGET_VIEW.sql
UTF-8
6,387
2.875
3
[]
no_license
create view AA_ACR_CARBON_EG_AND_CLASS_BY_YEAR_BUDGET_VIEW as select CGRP_ID EMISSIONS_GROUP_ID , CGRP_DESCRIPTION EMISSIONS_GROUP_DESCRIPTION , CCLS_CLASS_ID CLASSIFICATION_ID , CCLS_DESCRIPTION CLASSIFICATION_DESCRIPTION...
true
988adff2b2db38468dcf40f3ce8ef430731ee4f8
SQL
akhilmeakkadn2/mylaravel
/db/krackin.sql
UTF-8
2,163
2.859375
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.5.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Nov 15, 2018 at 02:52 AM -- Server version: 5.7.11 -- 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_CLIENT */...
true
ccc37f805540dfd677c1ebd67a1273835eba9243
SQL
Pavel109876/Darth-Vader
/SQL/Postgres/restore_db_from_csv.sql
UTF-8
489
3.109375
3
[]
no_license
create table drivers (driverId int, driverRef text, number text, code text, forename text, surname text, dob date, nationality text, url text) copy public.drivers from 'D:\test\drivers.csv' delimiter ',' csv header; select * from public.drivers where UPPER(forename) = 'MAX' UPDATE public.drivers SET number = NULL W...
true
2fee8365649da8d5a0a63de9b70b0fade949b052
SQL
student10github/fhikers
/fhikers/tools/20201205 SQL.sql
UTF-8
651
3.28125
3
[]
no_license
sudo su postgres psql -- Cambiar el OWNER de una base de datos - Referencia: https://www.realsystems.com.mx/blog/postgresql-13/post/como-cambiar-el-dueno-a-todas-las-tablas-de-una-base-de-datos-postgresql-309 -- ALTER DATABASE $BASEDEDATOS OWNER TO $USER; ALTER DATABASE test2_db OWNER TO test2_user; CTRL + d CTRL + d...
true
66306f14a09e72f87e9074ffccdb530f9ae4e5d4
SQL
wns8628/StudyWrite
/2.데이터베이스/sql문 정리/날짜함수.sql
UTF-8
1,435
3.984375
4
[]
no_license
-- *hr_employees -- -- 현재날짜 select curdate(), current_date; -- 현재시간 select curtime(), current_time; -- 현재날짜 + 시간까지 출력 select now(), sysdate(); select emp_no, now() from employees; -- 처음실행되는시간 다똑같음 select emp_no,sysdate() from employees; -- 이건 쿼리출력하면서 시간이 바뀜 출력할떄 시간정해짐 -- 포맷팅 // 비즈니스조건에따라 포맷팅해서 보내던지 , 글로벌하면 타임스탬프에...
true
29dc183a71b0a078e6f2da7b81a0a2b2bd085d99
SQL
RyanTech/yueji
/tools/db/outsource/yueji/user/readonly.sql
UTF-8
8,207
3.15625
3
[]
no_license
-------------------------------------------------------------------------------------------- -- -- 悦己网络科技有限公司数据库测试用户及表空间创建 -- -------------------------------------------------------------------------------------------- --确认表空间是否修改正确 select tablespace_name,file_name, file_id from dba_data_files; select a.property_name,...
true
e3c34f2a7f8ceac06e684c07c4aade774e6e16ed
SQL
joeldatabox/programacaoIII
/src/main/resources/db/migration/V1__CREATE_DATA_BASE.sql
UTF-8
231
2.59375
3
[]
no_license
DROP TABLE IF EXISTS `pessoa`; CREATE TABLE `pessoa` ( `id` BIGINT(20) NOT NULL AUTO_INCREMENT, `nome` VARCHAR(100) NOT NULL, PRIMARY KEY (`id`) ) ENGINE = InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
true
e31794ee1075d300013b85c76276ae24c5429603
SQL
pepikrastev/SoftUni--CSharp-DB
/MS SQL - September 2019/Exam Preparation 2 - 14.10.2019/04.Delete.sql
UTF-8
194
3.0625
3
[]
no_license
DELETE StudentsTeachers WHERE TeacherId IN (SELECT Id FROM Teachers WHERE Phone LIKE '%72%') --DELETE Teachers --WHERE Phone LIKE '%72%' DELETE Teachers WHERE CHARINDEX('72', Phone) > 0
true
c8e8f7508bbb37a55ecbc3cd8c025e634bbc060e
SQL
VinodRobert/DBCapacite
/VersionSQL/BERACHAH/BSBS_CAPACITE/BI/Procedure/spGenerateAssetMaster.sql
UTF-8
4,239
3.375
3
[]
no_license
/****** Object: Procedure [BI].[spGenerateAssetMaster] Committed by VersionSQL https://www.versionsql.com ******/ CREATE PROCEDURE [BI].[spGenerateAssetMaster](@CHOICE INT) AS SELECT ASSETNUMBER, ASSETNAME, ASSETPDATE, ASSETPPRICE, ASSETPPRICE ASSETVALUE, ASSETSALVAGE, AssetAccumDep, AssetBookValue,...
true
c5a1cf0c2ecfa7ef8a7d241751684b0efa244d88
SQL
postgrespro/sr_plan
/sql/sr_plan.sql
UTF-8
1,253
2.796875
3
[ "PostgreSQL" ]
permissive
CREATE EXTENSION sr_plan; SET sr_plan.log_usage = NOTICE; CREATE TABLE test_table(test_attr1 int, test_attr2 int); INSERT INTO test_table SELECT i, i + 1 FROM generate_series(1, 20) i; SET sr_plan.write_mode = true; SELECT * FROM test_table WHERE test_attr1 = _p(10); SELECT * FROM test_table WHERE test_attr1 = 10; SEL...
true
3e06f671f27d13c80cb8a4f07d661259a36eb155
SQL
wujysh/github-events-spider
/github-transform.sql
UTF-8
2,499
4.1875
4
[]
no_license
DELIMITER // CREATE OR REPLACE PROCEDURE github.extract_commits() BEGIN DECLARE start_id BIGINT; DECLARE end_id BIGINT; SELECT last_aggregated_id+1 INTO start_id FROM github_commits_rollup FOR UPDATE; SELECT MAX(event_id) INTO end_id from github_events; IF start_id <= end_id ...
true
72aba0cef2a80631a217d96cab39dba7ac32a9a8
SQL
radtek/tensordev
/sql/process_top_20_01.sql
UTF-8
974
3.671875
4
[]
no_license
-- ----------------------------------------------------------------------------------- -- File Name : process_top_20_01.sql -- Description : Verifica os 20 top process ativos no banco de dados -- Requirements : Access to the DBA views. -- Call Syntax : @process_top_20_01.sql -- Last Modified: 02/04/2012 -- -...
true
ba38a5c3feea7260595becd374e5919af0316642
SQL
tttnguyen9472/Gymnocercus-Amazonite-Tribes-Backend
/src/main/resources/db/migration/V1__create_tables.sql
UTF-8
1,448
3.328125
3
[]
no_license
create table hibernate_sequence ( next_val bigint ) engine = InnoDB; insert into hibernate_sequence (next_val) VALUES (1); create table building ( dtype varchar(31) not null, id bigint not null auto_increment, finished_at datetime(6), level integer, started_at datetime...
true
10a4dcc523e8d7be75bfb4ba9c6127610b014057
SQL
RussellRiesJr/chinook--RussellRiesJr
/line_item_track_artist.sql
UTF-8
248
3.5625
4
[]
no_license
select i.*, t.Name as 'Purchased Track', a.Name as 'Artist Name' from Invoice i, InvoiceLine l, Track t, Album b, Artist a where i.InvoiceId = l.InvoiceId and l.TrackId = t.TrackId and t.AlbumId = b.AlbumId and b.ArtistId = a.ArtistId
true
767c38c54bb447341df0b03f67fe0701ab7b515f
SQL
nayaranunes/terra-do-nunca
/tables.sql
UTF-8
2,306
3.28125
3
[]
no_license
CREATE SEQUENCE IF NOT EXISTS championship_seq START with 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; CREATE SEQUENCE IF NOT EXISTS teams_seq START with 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; CREATE SEQUENCE IF NOT EXISTS players_seq START with 1 INCREM...
true
efd534394873c921835eeb63ce3bdc42877c3a44
SQL
kasskata/All-HomeWorks-SoftwareUniversity-TelerikAcademy
/[DB]ExamPreparation01.03.2015/[DB]ExamPreparation01.03.2015/06.sql
UTF-8
254
3.765625
4
[]
no_license
SELECT a.Title AS Title, c.Name AS CategoryName, t.Name AS TownName, as1.Status as [Status] FROM Ads a LEFT JOIN Categories c ON a.CategoryId = c.Id LEFT JOIN Towns t ON a.TownId = t.Id LEFT JOIN AdStatuses as1 ON a.StatusId = as1.Id ORDER BY a.Id
true
ee6f6594f20ecf3418c0e9c88eeef243356beb75
SQL
grubmenow/grubmenow-service
/grubmenow-webapp/src/main/sql/find_neighbouring_zip_codes.sql
UTF-8
335
3.453125
3
[]
no_license
SELECT NEIGHBOURING_ZD.ZIP_CODE FROM ZIP_DATA ZD, ZIP_DATA NEIGHBOURING_ZD WHERE ZD.ZIP_CODE = '${zip_code}' AND sqrt( POWER((69.1 * (NEIGHBOURING_ZD.LATTITUDE - ZD.LATTITUDE)), 2) + POWER((69.1 * (NEIGHBOURING_ZD.LONGITUDE - ZD.LONGITUDE) * cos(ZD.LATTITUDE/57.3)), 2) ) < '${dist...
true
d1aa4d25872a6bcce6b17a718b0a84197a09d38e
SQL
shahminfikri/Store
/MySQL_Database.sql
UTF-8
1,012
3.515625
4
[]
no_license
create database store; use store; create user 'user'@'localhost' identified by '123456'; create user 'admin'@'localhost' identified by '123456'; grant insert, select on store.users to 'user'@'localhost'; grant select on store.items to 'user'@'localhost'; grant select, insert on store.orders to 'user'@'localhost'; g...
true
8f896b12ba1891908eea98a214b75bba8a2b1b19
SQL
webclinic017/smc-web
/design/smcdb_ddl.sql
UTF-8
8,808
3.453125
3
[ "MIT" ]
permissive
-- MySQL Script generated by MySQL Workbench -- Wed May 13 18:44:30 2020 -- Model: New Model Version: 1.0 -- 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='TR...
true
9fef9888d9727d891951e6929e57f1ea98634a8c
SQL
Jola-Witaszak/Jola-Witaszak-Kodilla-java
/kodilla-jdbc/src/main/resources/readers_insert.sql
UTF-8
317
2.6875
3
[]
no_license
create trigger readers_insert after insert on readers for each row begin insert into readers_aud(event_date, event_type, reader_id, new_firstname, new_lastname, new_peselid, new_vip_level) values (curtime(), 'insert', new.reader_id, new.firstname, new.lastname, new.peselid, new.vip_level); end;
true
cc2d428d82eb97b68b6e829c52fccf3fe8515cd5
SQL
dpopkov/learndb
/dbillum3e/ch01/reports.sql
UTF-8
281
3.265625
3
[]
no_license
select fa.facId, fa."name", cl.classNumber, st.lastName, st.firstName from faculty as fa inner join "class" as cl on cl.facId = fa.facId inner join enroll as en on en.classNumber = cl.classNumber inner join student as st on st.stuId = en.stuId order by cl.classNumber, st.lastName;
true
87f1c2d4a96983e60ceda71a18856b714930f7bb
SQL
Peter-Schneider/Sample
/AdventureWorksDatabase/Person/Stored Procedures/sp_UpdatePerson_Temporal.sql
UTF-8
1,061
3.6875
4
[]
no_license
 /* Stored procedure for updating columns of Person_Temporal If all parameters except @BusinessEntityID are NULL no update is performed For NON NULL columns NULL values are ignored (i.e. existing values is applied) */ CREATE PROCEDURE [Person].[sp_UpdatePerson_Temporal] @BusinessEntityID INT, @PersonType nchar(2) ...
true
afd566963102c976a7f05671c2a11dbbf17eb1dc
SQL
Shantr0/bullscows
/src/test/java/test.sql
UTF-8
135
2.546875
3
[]
no_license
SELECT COUNT(*),(SELECT count(ID) FROM sessions WHERE userName='admin' AND CLOSED=TRUE ) FROM userstries WHERE userName='admin'
true
dcdf49a2cf5da8f3ab9565e44aec3e096e44401c
SQL
janecms/shopboot
/src/main/resources/db/shopxxboot-schema.sql
UTF-8
18,490
3.21875
3
[]
no_license
/*==============================================================*/ /* DBMS name: MySQL 5.0 */ /* Created on: 2017/12/24 12:46:47 */ /*==============================================================*/ drop table if exists product_attribute; drop table i...
true
ad436d996dead09c0c73ad145bb3343080b8e8c8
SQL
AKMatapady/Database-Design
/Assignment 2 - SQL Queries/SQLQuery1.sql
UTF-8
311
2.90625
3
[]
no_license
Use Company; Insert into EMPLOYEE(fname,lname,ssn, bdate,address,sex,salary,dno) Values ('Amith Kumar','Matapady', '111111111','09-22-1992','3560 Alma Road, Dallas, TX','M','42000','6'); select * from employee where ssn=111111111; Use Company; select dno, COUNT(*) from EMPLOYEE Group by dno having COUNT(*) > 2
true
3f6c2c87e4cf6d139cacb967a8e6122b2ca214a4
SQL
va-collabnet-archive/workbench
/qa-toolkit/tk-qadb-ws/src/main/sql/triggers.sql
UTF-8
2,097
3.140625
3
[]
no_license
CREATE DEFINER=`root`@`%` TRIGGER `qa_db`.`qa_case_uuid_trigger` BEFORE INSERT ON `qa_db`.`qa_case` FOR EACH ROW begin if new.case_uid = '0' then SET new.case_uid = UUID(); end if; end// CREATE DEFINER=`root`@`%` TRIGGER `qa_db`.`qa_case_upd_uuid_trigger` BEFORE UPDATE ON `qa_db`.`qa_case` FOR EACH ROW begin I...
true
8161bf39ec266c70e2c45c29d27c7d3d1f563b9a
SQL
dlwo9503/mariadb_practices
/sql-practice/연습 문제/practice04.sql
UTF-8
5,046
4.5625
5
[]
no_license
-- 서브쿼리(SUBQUERY) SQL 문제입니다. (혼합) -- 문제1. (count) -- 현재 평균 연봉보다 많은 월급을 받는 직원은 몇 명이나 있습니까? -- select avg(b.salary) from employees a, salaries b where a.emp_no = b.emp_no and b.to_date = '9999-01-01'; select count(*) from employees a, salaries b where a.emp_no = b.emp_no and b.salary > (select avg(b.salary) from empl...
true
8412f48a105f3358cd3bbca07ed6cbe1d45c533f
SQL
sprokushev/Delphi
/MASTER/_DATABASE/Constraints/EUL_SUMMARY_OBJS_FK.sql
UTF-8
575
3.015625
3
[]
no_license
-- -- Foreign Key Constraints for Table EUL_SUMMARY_OBJS -- ALTER TABLE MASTER.EUL_SUMMARY_OBJS ADD ( CONSTRAINT EUL_NMSDO_SDO_FK FOREIGN KEY (NMSDO_SDO_ID) REFERENCES MASTER.EUL_SUMMARY_OBJS (SUMO_ID) ENABLE NOVALIDATE); ALTER TABLE MASTER.EUL_SUMMARY_OBJS ADD ( CONSTRAINT EUL_SBO_SRS_FK FOREIGN KEY...
true
818027eea4aafc42b993b479702ff059ce1ab574
SQL
starkjosh/Revature
/SqlLab.sql
UTF-8
9,028
3.921875
4
[]
no_license
--2.1---------------------------------------------------------------------------------------------------------------------- SELECT * FROM EMPLOYEE; SELECT * FROM EMPLOYEE WHERE LASTNAME = 'King'; SELECT * FROM EMPLOYEE WHERE FIRSTNAME = 'Andrew' AND REPORTSTO IS NULL; --2.2-------------------------------------------...
true
73fab69f2a74ad9f2612c31edfe7a5b41749a18a
SQL
adelbrc/nsa-services-web
/nsaservices_db.sql
UTF-8
22,175
3.171875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Hôte : 127.0.0.1:3306 -- Généré le : lun. 04 mai 2020 à 01:27 -- Version du serveur : 5.7.26 -- Version de PHP : 7.3.5 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET ...
true
a5f20612d1edff0194874ce88ef3d6c3b3e560fc
SQL
willianba/movies-data-warehouse
/inserts.sql
UTF-8
2,811,441
2.515625
3
[]
no_license
INSERT INTO dim_movie VALUES (0, 'Avatar', 178.0, 'Color', 'PG-13'); INSERT INTO dim_cast VALUES (0); INSERT INTO dim_actor VALUES (0, 1000.0, 'CCH Pounder'); INSERT INTO bridge_cast VALUES (0, 0); INSERT INTO dim_actor VALUES (1, 936.0, 'Joel David Moore'); INSERT INTO bridge_cast VALUES (0, 1); INSERT INTO dim_actor ...
true
43baa0c2a5a1d38cc980c15dcd7efbfb16a136d8
SQL
adityadees/mk
/mk.sql
UTF-8
22,353
2.8125
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.7.9 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Oct 26, 2018 at 11:46 PM -- Server version: 10.1.31-MariaDB -- PHP Version: 7.2.3 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
true
c4980e8b57a40b17072059b2ad71e93f2418eb57
SQL
ASKJR/URI-judge
/SQL/2737.sql
UTF-8
409
3.078125
3
[]
no_license
/* Problem: Advogados URI Online Judge | 2737 Solution developed by: Alberto Kato */ SELECT name, customers_number FROM lawyers WHERE customers_number = (SELECT MAX(customers_number) FROM lawyers) UNION ALL SELECT name, customers_number FROM lawyers WHERE customers_number = (SELECT MIN(customers_number) FROM lawyers) ...
true
592b49fc58c179c32893bc74b4e0c8e0810eadec
SQL
jampaniuday/work-oracle-dba-sqls
/user-roles.sql
UTF-8
4,119
3.203125
3
[]
no_license
/* bps_ora */ create user bps_ora identified by 12345678; grant connect to bps_ora; grant resource to bps_ora; grant all privileges to bps_ora; /** **/ alter user gjzspt_demo2 identified by Oe123qwe###; alter user gjzspt_demo2 identified by 12345678; alter user gjzspt_demo2_dev account unlock; alter user gjzspt_d...
true
4c489ef60b3925bee7656326e8dd59b9ec5a7211
SQL
rohansingh214/Business_Intelligence_System
/schools_dw_dim_cde_school.sql
UTF-8
3,095
2.71875
3
[]
no_license
-- MySQL dump 10.13 Distrib 8.0.17, for Win64 (x86_64) -- -- Host: localhost Database: schools_dw -- ------------------------------------------------------ -- Server version 8.0.17 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESUL...
true
934dcc3dd3da9d9c6244da7a5317700016665a6f
SQL
mtengmo/Public
/SQL/TDE/Get-TDE_encryptionstatus.sql
UTF-8
709
2.90625
3
[]
no_license
SELECT DB_NAME(database_id) AS DatabaseName, encryption_state, encryption_state_desc = CASE encryption_state WHEN '0' THEN 'No database encryption key present, no encryption' WHEN '1' THEN 'Unencrypted' WHEN '2' THEN 'Encryption in progress' WHEN '3' THEN 'Encrypted' ...
true
9a6c7416ee1d2113dd22b15f32e1512175b7e178
SQL
eleves-ig2i/ig2i-le3-poo-2018-ctp1
/src/Scripts_base_de_donnees/01_derbyGestionStock.sql
UTF-8
2,852
3.328125
3
[]
no_license
DROP TABLE MOUVEMENT; DROP TABLE PRODUIT; CREATE TABLE PRODUIT( nProduit INT NOT NULL generated ALWAYS AS IDENTITY PRIMARY KEY, nom VARCHAR(20), stockMin INT, stockMax INT, CONSTRAINT UK_PRODUIT UNIQUE (nom) ); CREATE TABLE MOUVEMENT( nMouvement INT NOT NULL generated ALWAYS AS IDENTI...
true
6a87492c57c0d3e1681a88280c949aa29a3ff3b2
SQL
aguestuser/downlow
/conf/evolutions/test/1.sql
UTF-8
1,000
3.09375
3
[]
no_license
# --- !Ups # --- Worker Schema create sequence worker_id_seq; create table workers( id bigint not null primary key default nextval('worker_id_seq') ip text not null status text not null ); # --- ScrapeJob Schema create sequence scrape_job_id_seq; create table ...
true
3b2229cc8d544aa77b853185281de6ce2192feba
SQL
TiagoBG/software-colegio-geek
/BACKEND/SQL/scriptPostgres.sql
UTF-8
8,031
3.6875
4
[ "MIT" ]
permissive
CREATE DATABASE colegio_geek; DROP TABLE IF EXISTS modelo_evaluacion; DROP TABLE IF EXISTS grupo_materia; DROP TABLE IF EXISTS grupo_estudiante; DROP TABLE IF EXISTS estudiante; DROP TABLE IF EXISTS grupo; DROP TABLE IF EXISTS materia; DROP TABLE IF EXISTS usuario; DROP TYPE IF EXISTS rol_enum; DROP TYPE IF EXISTS e...
true
284fef0ca9ac1ba33fbd28e55c1738b05098a3ad
SQL
r0yster/employee-cms
/db/seeds.sql
UTF-8
1,246
3.0625
3
[]
no_license
INSERT INTO department (name) VALUES ('Engineering'), ('Application Development'), ('IS Security'), ('Project Management'); INSERT INTO emp_roles (title, salary, department_id) VALUES ('Intern', 1000, 4), ('Engineer', 65000, 1), ('Engineering Manager', 100000, 1), ('Developer', 75000, 2...
true
5aa6fb1b95f3766be45225230e60cab96a8cd654
SQL
DpadamsX/DpadamsX
/tools/how_cool_is_that_generate_series.sql
UTF-8
472
3.46875
3
[]
no_license
DROP TABLE IF EXISTS api.sample_series; -- Define the table. CREATE TABLE IF NOT EXISTS api.sample_series ( id INTEGER NOT NULL DEFAULT 0 PRIMARY KEY, stamp timestamptz NOT NULL DEFAULT NULL ); -- Generate the series and insert the results into the table. INSERT INTO api.sample_series (id,stamp) SELECT hour_...
true
f9e211848dc99d277ae2535d21a5cd4acd8a0ac7
SQL
facherotqda/VB6-Ejercicios
/parte 2/Querys/Consulta Join entre 3 tablas-multitablas.sql
UTF-8
519
3.328125
3
[]
no_license
select * from alumno select * from CARRERA select * from datos /* primera consulta INNER JOIN mail, edad, nombre y carrera , de todos los alumnos */ select datos.EDAD,datos.EMAIL,ALUMNO.NOMBRE,CARRERA.CARRERA from datos join ALUMNO on datos.ID_ALUMNO =ALUMNO.ID_ALUMNO join CARRERA on ALUMNO.ID_CARRERA=...
true
95a55101efaecf59c024fe7250d5d18be97c5cee
SQL
CoralieLarpenteur/le-Margouillat
/sql/le_margouillat.sql
UTF-8
11,780
3.265625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.7.4 -- https://www.phpmyadmin.net/ -- -- Hôte : 127.0.0.1:3306 -- Généré le : mer. 11 avr. 2018 à 18:09 -- Version du serveur : 5.7.19 -- Version de PHP : 5.6.31 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SE...
true
2c95564edc007ec7a7596ce6d87aa9e3076039d4
SQL
DumeGeorgiana/SGBD
/Code/index8.sql
UTF-8
535
3.09375
3
[]
no_license
DROP INDEX HumanResources.TerminationReason.NI_TerminationReason_TerminationReason_DepartmentID --procentul de umplere a paginilor de index este configurat la 50% lansand -- jumatate din spatiu disponibil pentru inregistrari noi -- PAD_INDEX este ON - paginile intermediare ale indexului vor fi de asemenea -- lasate ...
true
7d7a8ec8ce3d86741d10bc04090e2ac2bd523c32
SQL
Cloudyrl/bd2-scripts
/SQL/Procedures/Procedures.sql
UTF-8
10,307
3.46875
3
[]
no_license
set verify off; create or replace procedure generar_inscripcion( v_clave_bodega in number := null, v_clave_catador in number := null, v_clave_concurso in number, v_fecha in date )is begin -- select sysdate into v_fecha from dual; if (v_clave_bodega is null) then insert into inscripcion values (...
true
7b543d836298b29bc079352759082f31ad47e8c4
SQL
NandanBharadwaj/open-kilda
/services/neo4j/init/neo4j-queries.cql
UTF-8
3,605
2.8125
3
[ "Apache-2.0" ]
permissive
CREATE CONSTRAINT ON (`config`:`config`) ASSERT `config`.`entityId` IS UNIQUE; CREATE CONSTRAINT ON (`kilda_configuration`:`kilda_configuration`) ASSERT `kilda_configuration`.`entityId` IS UNIQUE; CREATE CONSTRAINT ON (`flow_cookie`:`flow_cookie`) ASSERT `flow_cookie`.`entityId` IS UNIQUE; CREATE CONSTRAINT ON (`flow_c...
true
5ac066e95d46d6cb95731f624f49f754f3c534f8
SQL
jtw1/miaosha
/src/main/resources/sql/order_info.sql
UTF-8
387
2.78125
3
[]
no_license
CREATE TABLE `miasha`.`order_info` ( `id` VARCHAR(32) NOT NULL, `user_id` INT(11) NOT NULL DEFAULT 0, `item_id` INT(11) NOT NULL DEFAULT 0, `item_price` DOUBLE NOT NULL DEFAULT 0, `amount` INT(11) NOT NULL DEFAULT 0, `order_price` DOUBLE NULL DEFAULT 0, PRIMARY KEY (`id`)) ENGINE = InnoDB DEFAULT CHARACTE...
true
29c932926facc35d67d2d056c6850ddf9c064837
SQL
agusismawan/rusdiantokom
/database/db_pos.sql
UTF-8
11,160
2.984375
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.8.3 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Nov 23, 2018 at 03:47 PM -- Server version: 10.1.36-MariaDB -- PHP Version: 5.6.38 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OL...
true
2b1f460ef1b190b2dde1a9ebf2fb7ef2c942804f
SQL
phili67/ecclesiacrm
/src/Plugins/NewsDashboard/mysql/Install.sql
UTF-8
1,274
2.765625
3
[ "MIT" ]
permissive
INSERT INTO `plugin` ( `plgn_Name`, `plgn_Description`, `plgn_Category`, `plgn_image`, `plgn_installation_path`, `plgn_activ`, `plgn_version`, `plgn_prefix`, `plgn_position`, `plgn_default_orientation`, `plgn_default_color`, `plgn_securities`, `plgn_UserRole_Dashboard_Availability`) VALUES ('NewsDashboard', 'Dashboard ...
true
10b81f843e20ba20690a8a634724436ba02de07d
SQL
sshyran/gpdb
/src/test/tinc/tincrepo/mpp/gpdb/tests/storage/basic/exttab/read/sql/query04.sql
UTF-8
3,563
3.28125
3
[ "Apache-2.0", "PostgreSQL", "LicenseRef-scancode-rsa-md4", "OLDAP-2.8", "HPND-sell-variant", "BSD-4-Clause-UC", "BSD-3-Clause", "Zlib", "LicenseRef-scancode-zeusbench", "LicenseRef-scancode-mit-modification-obligations", "OpenSSL", "MIT", "LicenseRef-scancode-other-copyleft", "bzip2-1.0.6"...
permissive
-- -- table splitting -- -- -- look at lineitem 3 ways, and check that always get the same answer -- -- start_ignore drop external table if exists ext_lineitem; -- end_ignore CREATE EXTERNAL TABLE EXT_LINEITEM ( L_ORDERKEY INTEGER , L_PARTKEY INTEGER , L...
true
b5cd8143da81db350a250f6226067a533a0519f1
SQL
mayaugusto7/postgres-server-programming
/testes_triggers.sql
UTF-8
570
2.8125
3
[]
no_license
insert into fruits_in_stock(name, in_stock, reserved) values ('APPLE',500, 0); insert into fruits_in_stock(name, in_stock, reserved) values ('ORANGE',500, 0); insert into fruit_offer(recipient_name,fruit_name,offered_amount) values('Bob','APPLE',100); update fruit_offer set offered_amount = 115 where offer_id ...
true
1e24d49271ffd5652af72998223f270feb426658
SQL
Juanllamazares/informatica-uam
/TERCERO/SI/PRACTICA4/QUERYS_SCRIPTS/countStatus.sql
UTF-8
1,169
3.265625
3
[]
no_license
-- PRIMERA CONSULTA DEL APENDICE 2 EXPLAIN SELECT count(*) FROM orders WHERE status is null; -- SEGUNDA CONSULTA DEL APENDICE 2 EXPLAIN SELECT count(*) FROM orders WHERE status ='Shipped'; -- CREAMOS UN INDICE CON LA CLUMNA STATUS DE LA TABLA ORDERS CREATE INDEX index_status on orders(status); -- VOLVEMOS A EJECUTRA...
true
cf2b84d8dcd702e8f50a644e96ac1e43e9d4b810
SQL
sys3948/flask_blog
/older_ver/ver5/createTable.sql
UTF-8
1,657
4.03125
4
[]
no_license
drop table if exists comments; drop table if exists posts; drop table if exists follows; drop table if exists users; -- 왜레키 제약으로 users 테이블은 맨 마지막으로 삭제를 해야한다. create table users( -- 사용자 정보를 저장하는 테이블 id int auto_increment, email varchar(64), username varchar(64), password_hash varchar(225), location text, ab...
true
8ee8f1c08fd0a1d83b7af8142f174953da59a973
SQL
TusbolGame/Pegasus
/fluxshop/src/clean_tables.sql
UTF-8
33,891
3.40625
3
[]
no_license
CREATE TABLE IF NOT EXISTS `area` ( `area_id` int(11) NOT NULL AUTO_INCREMENT, `area_title` varchar(200) DEFAULT NULL, `area_url` varchar(200) DEFAULT NULL, PRIMARY KEY (`area_id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=6 ; -- -------------------------------------------------------- -- -- Est...
true
c8f33e87fd791b18493c88fd8d02fc28583b9c65
SQL
XuJ/paxdelay_xu
/sql/mysql/load_data/m_CreateTempItineraryAllocationsTable_load.sql
UTF-8
906
2.921875
3
[]
no_license
-- XuJiao -- It took 12 min -- Record: 69,758,649 LOAD DATA LOCAL INFILE '/mdsg/paxdelay_general_Xu/Allocation_Output/ItineraryLoad_AllData.csv' INTO TABLE temp_itinerary_allocations FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' LINES TERMINATED BY '\n' IGNORE 1 LINES ( first_carrier, @vsecond_car...
true
6709502321235e2e56d515692b1909542271124c
SQL
fuxihouyi/TeyvatMainland-Travel-Web
/tivattravel.sql
UTF-8
17,971
2.8125
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : fuxi-localhost Source Server Version : 50726 Source Host : localhost:3306 Source Database : tivattravel Target Server Type : MYSQL Target Server Version : 50726 File Encoding : 65001 Date: 2021-07-31 21:05:11 */ SET FOREIGN_KEY_CHECKS...
true
0b4599f53481535c99c59e3a758d737324316912
SQL
Syngat/mysql_test_table
/my_books.sql
UTF-8
512
2.796875
3
[ "MIT" ]
permissive
CREATE TABLE `my_books` ( `id` int(11) NOT NULL, `name` varchar(50) NOT NULL, `author` varchar(50) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; INSERT INTO my_books (id, `name`, author) VALUES (1, 'Effective Java', 'Joshua Bloch'); INSERT INTO my_books (id, `name`, author) VALUES (2, 'Jav...
true
c6a7f0b583cccc88d46f041d4b9fa57fba3139e1
SQL
huayonglun/mynote
/J2EE_note/SpringJdbcTemplate/sql/students.sql
UTF-8
580
3.421875
3
[]
no_license
DROP TABLE IF EXISTS students; CREATE TABLE students( sid INT PRIMARY KEY, sname VARCHAR(20), age INT, birthday DATE, school VARCHAR(30) ); INSERT INTO students VALUES(1,'张三',24,'1988-10-29','哈理工'); INSERT INTO students VALUES(2,'李四',28,'1984-4-19','哈工大'); INSERT INTO students VALU...
true
3bbd8bc399797c34d957a3a52c78bebbdb20f462
SQL
tghorms/sql-challenge
/EmployeeSQL/Employee_schemata.sql
UTF-8
1,916
4.1875
4
[]
no_license
DROP TABLE departments; DROP TABLE dept_emp; DROP TABLE dept_manager; DROP TABLE salaries; DROP TABLE employees; DROP TABLE titles; CREATE TABLE departments( dept_no VARCHAR(255) NOT NULL, dept_name VARCHAR(255) NOT NULL, CONSTRAINT pk_departments PRIMARY KEY (dept_no ) ); SELECT * FROM departments; CREATE TA...
true
28423ee73fc7ab7fb03d12146618a9808fde0a6c
SQL
isuru89/oasis
/services/stats-api/src/main/resources/io/github/oasis/db/scripts/eventsource/readEventSourcesOfGame.sql
UTF-8
244
3.140625
3
[ "Apache-2.0" ]
permissive
SELECT id, token, display_name AS name, is_active AS active FROM OA_EVENT_SOURCE_GAME oesg INNER JOIN OA_EVENT_SOURCE oes ON oesg.event_source_id = oes.id WHERE oesg.game_id = :gameId AND oes.is_active = true
true
7c9f97cb938adf22b97afaff985382e531f352b2
SQL
franciscojsf99/databases
/Entrega3/schema.sql
UTF-8
5,515
3.78125
4
[]
no_license
/* * Grupo: 5 * 92433 - Carolina Pereira * 92565 - Tomás Sequeira * 92569 - Vicente Lorenzo * 89443 - Francisco Figueiredo */ DROP TABLE prescricao_venda; DROP TABLE prescricao; DROP TABLE venda_farmacia; DROP TABLE analise; DROP TABLE consulta; DROP TABLE instituicao; DROP TABLE concelho; DR...
true
20b27e1d4b5a33be9cd5141ba6a2575a92602c92
SQL
FrankKai/leetcode-js
/196.Delete_Duplicate_Emails.sql
UTF-8
200
3.09375
3
[]
no_license
# Write your MySQL query statement below -- https://www.mysqltutorial.org/mysql-delete-duplicate-rows/ delete t1 from Person t1 inner join Person t2 where t1.id>t2.id and t1.email = t2.email
true
ab28d78524e6deb4e628a41546eda01f3fe289c4
SQL
Cfood/PewletHackard
/employees/tables.sql
UTF-8
657
3.25
3
[]
no_license
CREATE TABLE IF NOT EXISTS departments( dept_no VARCHAR(50), dept_name VARCHAR(200) ); CREATE TABLE IF NOT EXISTS department_emps( emp_no INT NOT NULL, dept_no VARCHAR (50) ); CREATE TABLE IF NOT EXISTS department_managers( dept_no VARCHAR(50), emp_no INT ); CREATE TABLE IF NOT EXISTS emps( emp_no INT NOT NUL...
true
4ed2b3e421c202dbc7f0ed96de6ad8e2efdd92c2
SQL
tiffanywy1993/ETL
/AVG.sql
UTF-8
118
2.640625
3
[]
no_license
SELECT * FROM NBA_PLAYER_ATL.ATL_NBA_PLAYER; SELECT Position, AVG(Salary) FROM ATL_NBA_PLAYER Group by Position;
true
abc8445cc3a9c7ac3506bdaacb53e1c1561fe06a
SQL
JoshuaHuntley/dbt-utils
/macros/generic_tests/fewer_rows_than.sql
UTF-8
2,363
4.125
4
[ "Apache-2.0" ]
permissive
{% test fewer_rows_than(model, compare_model, group_by_columns = []) %} {{ return(adapter.dispatch('test_fewer_rows_than', 'dbt_utils')(model, compare_model, group_by_columns)) }} {% endtest %} {% macro default__test_fewer_rows_than(model, compare_model, group_by_columns) %} {{ config(fail_calc = 'sum(coalesce(row_...
true
0c89d8b6e8cb3f3068be9ab3d1a5b0955f76226a
SQL
fabianoobispo/phpCrud
/crud.sql
UTF-8
3,473
3.34375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Aug 16, 2020 at 03:56 AM -- Server version: 10.4.13-MariaDB -- PHP Version: 7.2.32 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIE...
true
5e04bf66053bea08b149e7d36750f0e7b5d076f9
SQL
Wolfuryo/cah
/localhost.sql
UTF-8
5,744
3.265625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: Jul 26, 2019 at 09:12 PM -- Server version: 10.1.40-MariaDB -- PHP Version: 7.3.5 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
true
5219e294d19f279ee51fef1de86a1b7cb24b1fd8
SQL
gailpasiona/temp
/mib_fin.sql
UTF-8
30,534
2.71875
3
[]
no_license
CREATE DATABASE IF NOT EXISTS `diffsigm_mibint_server` /*!40100 DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci */; USE `diffsigm_mibint_server`; -- MySQL dump 10.13 Distrib 5.5.37, for debian-linux-gnu (i686) -- -- Host: localhost Database: diffsigm_mibint_server -- --------------------------------------------...
true
94af4ab7b33ee91198e9954d39885f37c3b9a1f1
SQL
funduval/sequelized-burger
/db/schema.sql
UTF-8
258
2.609375
3
[]
no_license
DROP TABLE IF EXISTS `burgers`; CREATE TABLE `burgers` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(255) NOT NULL, `eaten` tinyint(1) DEFAULT '0', `createdAt` datetime NOT NULL, `updatedAt` datetime NOT NULL, PRIMARY KEY (`id`) );
true
a67f5cee04e70b2f4b96cabb4db09a1f4b508850
SQL
bibekuchiha/SQL-PROJECTS
/The Metropolitan Museum of Art/queries.sql
UTF-8
943
4.46875
4
[]
no_license
--1. What are the column names? SELECT * FROM met LIMIT 10; --2. How many pieces are in the American Decorative Art collection? SELECT COUNT(*) FROM met; --3. Count the number of pieces where the category includes ‘celery’. SELECT DISTINCT category, COUNT(*) FROM met WHERE category LIKE '%celery%'; --4. F...
true
28a237ebf937e12b038d587e6279aea8ba903d57
SQL
vasilgramov/database-fundamentals
/DatabasesBasicsMySQL/05.TableRelations/TableRelationsExercises/05.sql
UTF-8
976
4.15625
4
[]
no_license
CREATE TABLE cities ( city_id INT PRIMARY KEY, name VARCHAR(50) ); CREATE TABLE customers ( customer_id INT PRIMARY KEY, name VARCHAR(50), birthday DATE, city_id INT, CONSTRAINT fk_customers_cities FOREIGN KEY (city_id) REFERENCES cities(city_id) ); CREATE TABLE orders ( order_id INT PRIMARY KEY, customer_i...
true
50d58255d993f1e3f5b329332a7092aa7160c076
SQL
fofuiz/trustion-digital-api
/src/main/resources/br/com/trustion/sql/create_inicial_user_role_permission.sql
UTF-8
3,576
3.515625
4
[]
no_license
-- Drop table -- DROP TABLE sch_superdigital.tbl_company; CREATE TABLE sch_superdigital.tbl_company ( company_id int8 NOT NULL, cnpj varchar(255) NULL, address varchar(255) NULL, city varchar(255) NULL, complement varchar(255) NULL, neighbourhood varchar(255) NULL, number_address varchar(255) NULL, state varc...
true
4b9c85cd2d3798ae39a06848f994bbbb129b2fa3
SQL
Harin329/dough-bros
/database/tables/user-table.sql
UTF-8
599
3.296875
3
[]
no_license
USE `doughBros_db`; DROP procedure IF EXISTS `createUserTable`; SET FOREIGN_KEY_CHECKS = 0; DROP TABLE IF EXISTS `user`; SET FOREIGN_KEY_CHECKS = 1; DELIMITER $$ USE `doughBros_db`$$ CREATE PROCEDURE `createUserTable` () BEGIN CREATE TABLE `user` ( `firebase_uid` varchar(255) NOT NULL, `first_name` varchar(100) ...
true
daed3c2ad0368a6c43d268bea25226493d3ff15b
SQL
harshagrama/H3ATT
/sql/Verification.sql
UTF-8
4,723
3.171875
3
[]
no_license
ALTER SESSION set NLS_DATE_FORMAT = 'DD-MM-YYYY HH24:MI:SS' -------------------------------------------------------------------------------- --SERVICE_HISTORY -------------------------------------------------------------------------------- --select count(unique(service_name)) from ( --select count(*) from ( --9685 sel...
true
e3e6c8283c95d98763b605e8a7d52bc8aa4589b7
SQL
Anasss/CC2-ISI
/02-Ressource/01-SPI-SD/02-SPI-SD-Designer/03-CSCI-STA/01-CREATION/01-DDL/csci_sta_pk.sql
UTF-8
1,813
2.84375
3
[]
no_license
-- C:\tmp\dosi15\csci_sta.con -- -- Generated for Oracle 10g on Tue Oct 23 17:41:19 2012 by Server Generator 10.1.2.11.12 PROMPT Creating Primary Key on 'VISITE_STAGE' ALTER TABLE VISITE_STAGE ADD (CONSTRAINT VST_PK PRIMARY KEY (NO_ETUDIANT_NAT ,ANNEE_PRO)) / PROMPT Creating Primary Key on 'AVENANT' ALTER TA...
true
d1fbd6896b036a8134db14144b46246e537a66a9
SQL
VijayMVC/PBD-projekt
/Procedures/DeleteOrder.sql
UTF-8
575
3.28125
3
[]
no_license
CREATE PROC DeleteOrder @OrderID INT AS DELETE FROM dbo.Students WHERE PersonID IN (SELECT PersonID FROM dbo.Tickets WHERE OrderID = @OrderID) DELETE FROM dbo.WorkshopReservations WHERE TicketID IN (SELECT TicketID FROM dbo.Tickets WHERE OrderID = @OrderID) (SELECT PersonID INTO TmpPeople FROM dbo.Tickets WH...
true
da73b3ef2a361174a9a9d3aa731adcbaf94289d3
SQL
AyushChoudhury/CS340-Databases
/sql/Reference.sql
UTF-8
1,773
3.203125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.1 -- https://www.phpmyadmin.net/ -- -- Host: classmysql.engr.oregonstate.edu:3306 -- Generation Time: Jun 09, 2018 at 03:18 PM -- Server version: 10.1.22-MariaDB -- PHP Version: 7.0.30 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "...
true