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
e5b068f710845485226d881165ffdd65c3ca1d8a
SQL
syi26/cs564
/cs564/syi26_P4/query4_opt.sql
UTF-8
430
3.984375
4
[]
no_license
--.timer on select o_orderpriority, count(*) as order_count from orders indexed by O_ODOP_KEY where o_orderdate >= "1993-07-01" --'[DATE]' and o_orderdate < "1993-10-01" --'[DATE]' and exists ( select l_shipdate, l_commitdate, l_receiptdate from lineitem indexed by L_OCR_KEY where l_orderk...
true
ac7d661701b36bbd3702eb1978c74dd7bb5c4138
SQL
anhducc13/Dictionary-oop
/Dictionary/dist/data/dictionary.sql
UTF-8
332,042
2.765625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.7.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Oct 21, 2018 at 08:51 AM -- Server version: 10.1.28-MariaDB -- PHP Version: 7.1.11 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OL...
true
f4b94bf374f1a4925dca0bd29a61847cb43bc196
SQL
peterlil/sql-tools
/get-server-info/backup/autogrowth.sql
UTF-8
912
3.671875
4
[]
no_license
SELECT CASE WHEN is_percent_growth = 1 THEN 'Warning: Growth is configured as a percentage.' ELSE CASE WHEN sysmsf.type = 0 THEN CASE WHEN ((growth * 100) / size) < 10 THEN 'Warning: Data file growth can be too small. (1/8 of file)' ELSE 'Information: Growth seems ok.' ...
true
7f81a2d86b5981cf91193d6c2cd189551edd6a77
SQL
phanijavvadi/TEST
/migration_queries/10-Feb-2018/add_profile_pic_column.sql
UTF-8
260
3.21875
3
[]
no_license
ALTER TABLE cm_org_patients ADD COLUMN "profilePic" uuid; ALTER TABLE cm_org_patients ADD CONSTRAINT "cm_org_patients_profilePic_fkey" FOREIGN KEY ("profilePic") REFERENCES cm_attachments (id) MATCH SIMPLE ON UPDATE CASCADE ON DELETE NO ACTION;
true
88a2f5f9abafa2a4bb45dfd7306e4b7c20734255
SQL
rlawjddbs/query
/pl1107/function_get_age.sql
UHC
623
3.84375
4
[]
no_license
-- Էµ ֹιȣ ̸ ϴ Լ -- 880101-1234567 -- ⵵ - ¾ + 1 create or replace function get_age(ssn char) return number is age number := 0; b_year varchar2(4); flag char(1); begin if check_ssn(ssn) = 'success' then -- 19 20 Ǵ flag := substr(ssn, 8, 1); if flag in(1,2,5,6) then b_year := '19'||substr(ssn, 1, 2); ...
true
d44a3d1f67c1dbfd5e3f6ab028e2c3b406a21cb9
SQL
SamilAlp/flowerpower
/statements.sql
UTF-8
2,462
3.421875
3
[]
no_license
create database flowerpower; use flowerpower; create table artikel ( id INT NOT NULL AUTO_INCREMENT, artikelcode varchar(255) NOT NULL, artikel varchar(255) NOT NULL, prijs varchar(255) NOT NULL, factuurregelid INT NOT NULL, bestellingid INT NOT NULL, FOREIGN KEY (factuurregelid) REFERENCES fa...
true
f90e5b1299dc034a505ffdc78c6eda6503aef13b
SQL
neostreet/poker_session_data
/num_hands_per_cash_game_nolimit_holdem_session.sql
UTF-8
164
2.671875
3
[]
no_license
use poker select sum(num_hands),count(*),sum(num_hands) / count(*) from poker_sessions where num_hands is not null and poker_style = 0 and poker_flavor = 3; quit
true
80908574e3b93ebea898a1c00d628170811f2805
SQL
mattryderstorm/CatalystX-Examples
/MyFirstGrid/grid.sql
UTF-8
2,691
2.640625
3
[]
no_license
CREATE TABLE inventory ( inv_id int(11) NOT NULL AUTO_INCREMENT, client_id int(11) NOT NULL, amount decimal(10,2) NOT NULL DEFAULT '0.00', ...
true
31cfcdd40cb344b9e87b50ca57d0b43c0c42dbf3
SQL
sjnov11/Database-Management-System
/project1/project1.sql
UTF-8
4,251
4.3125
4
[]
no_license
USE Pokemon; SELECT name FROM Trainer WHERE hometown = 'Blue City'; SELECT name FROM Trainer WHERE hometown = 'Brown City' OR hometown = 'Rainbow City'; SELECT name, hometown FROM Trainer WHERE name LIKE 'a%' OR name LIKE 'e%' OR name LIKE 'i%' OR name LIKE 'o%' OR name LIKE 'u%'; SELECT name FROM Pokemon WHERE typ...
true
ff8f3a9ef4093157851ff96b304cfdc6b8ebc10a
SQL
AyalaJesus/EP2-Pizzeria
/social.sql
UTF-8
11,922
3.078125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.7.0 -- https://www.phpmyadmin.net/ -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 26-06-2017 a las 06:44:18 -- Versión del servidor: 10.1.22-MariaDB -- Versión de PHP: 7.1.4 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; ...
true
4c3f491cdea1dcdb34ea804a074033362dbd0d17
SQL
karobar/SQL-Stuff
/mark.sql
UTF-8
1,431
3.515625
4
[]
no_license
delimiter $ drop procedure if exists Mark; /* This procedure returns pairs (node, depth) where depth is the depth of the node. A tree T has the following structure in your database: +-------+---------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +-------+---------+------+...
true
560666da4d01c73f211b24870bdcf80bb8785529
SQL
AnIllusions/BookManagement
/test1.sql
UTF-8
21,786
3.4375
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : localhost_3306 Source Server Version : 50510 Source Host : localhost:3306 Source Database : test Target Server Type : MYSQL Target Server Version : 50510 File Encoding : 65001 Date: 2018-01-06 23:31:36 */ SET FOREIGN_KEY_CHECKS=0; --...
true
2b7046d4331c60cac05454ac4d854da4a4071c22
SQL
dahee0325/study
/daheeDB/mySQL/0702.sql
UTF-8
421
3.59375
4
[]
no_license
/* CONSTRAINT : 제약조건 */ CREATE TABLE project.DEPT ( DEPTNO int, DNAME VARCHAR(14), LOC VARCHAR(13), CONSTRAINT PK_DEPT PRIMARY KEY (DEPTNO) ); CREATE TABLE project.EMP ( EMPNO int, ENAME VARCHAR(10), JOB VARCHAR(9), MGR int, HIREDATE DATE, SAL int, COMM int, DEPTNO int, CONSTRAINT PK_EMP PRIMARY...
true
6194d61d9abc262eabbf2632a05567579cf5053c
SQL
fujie-xiyou/Summer
/Python-MySQL/database.sql
UTF-8
1,443
3.546875
4
[]
no_license
CREATE DATABASE credit CHARACTER SET utf8; USE credit; CREATE TABLE users ( uid int NOT NULL AUTO_INCREMENT PRIMARY KEY COMMENT '主键,自增', StudentNum char(8) COMMENT '学号', name text COMMENT '姓名', per tinyint COMMENT '权限(0为普通用户,1为管理员)', class text COMMENT '班级', phone text COMMENT '电话', pw text ...
true
c00ce39d8ed54c7ce356dc1f8b4db3dd5290de58
SQL
barend-erasmus/epons-data-corrector
/EPONSDataCorrector/script.sql
UTF-8
1,627
2.828125
3
[ "MIT" ]
permissive
CREATE PROCEDURE [EPONS].[RemoveDuplicatePatient] @keepPatientId UNIQUEIDENTIFIER, @removePatientId UNIQUEIDENTIFIER AS UPDATE [Audit].[PatientImpairmentGroup] SET [PatientId] = @keepPatientId WHERE [PatientId] = @removePatientId; UPDATE [Patient].[MeasurementTools] SET [PatientId] = @keepPatientId WHERE [PatientId...
true
9a81968c7166f7c1f0ef2ba4af96280996834a38
SQL
Lala341/SupermarketSQL-SuperAndes
/data/LimpiezaSuperandes.sql
UTF-8
2,694
3.265625
3
[]
no_license
--- Sentencias SQL para la creacion del esquema de parranderos --- Las tablas tienen prefijo A_ para facilitar su acceso desde SQL Developer -- USO -- Copie el contenido deseado de este archivo en una pestana SQL de SQL Developer -- Ejecutelo como un script - Utilice el boton correspondiente de la pestana utilizada ...
true
d8f3d1c715f8156607b1efe51e4508b43fba2f4d
SQL
xiongzhengjian/onepiece
/captain/src/main/webapp/doc/sqlscript/bios.sql
UTF-8
1,334
3.5
4
[]
no_license
create table bios ( bios_id int(11) primary key auto_increment, chassis varchar(20), platform varchar(20), test_type varchar(25), start datetime, end datetime, bios_version varchar(8), image_build_id varchar(25), test_plan varchar(100), tester varchar(15)); describe bios; insert into bios (bios_id,owner,c...
true
9bd189682145a666c518dbc8069831115515d027
SQL
lupeordaz/csctoss
/tasks/8701_opentaps_change/notes.sql
UTF-8
19,321
3.6875
4
[]
no_license
SELECT '"' || be.billing_entity_id || '"' AS oss_billing_entity_id, '"' || be.name || '"' AS oss_billing_entity_name, -- '"' || map.jbilling_customer_id || '"' AS jbill_customer_id, -- '"' || be.billing_entity_id || '"' AS jbill_...
true
56c6792008343fdc4b4cb70ac9976e5ee004e9a9
SQL
neron0202/3.4.sql_insert_select_requests
/3.4.2_select_requests.sql
UTF-8
355
3.03125
3
[]
no_license
SELECT title, release_year FROM album WHERE release_year=2018; SELECT title, duration FROM track ORDER BY duration DESC LIMIT 1; SELECT title FROM track WHERE duration>=210; SELECT title FROM mixtape WHERE release_year BETWEEN 2018 AND 2020; SELECT name FROM singer WHERE NOT name LIKE '%% %%'; SELECT title FROM...
true
41be054a9cec5a954c3584037e1346ac7de2d2ef
SQL
kirrencovey/chinook-kirrencovey
/sql-queries/18_sales_agent_total_sales.sql
UTF-8
381
4.03125
4
[]
no_license
-- Provide a query that shows total sales made by each sales agent. SELECT CONCAT(e.FirstName, ' ', e.LastName) SalesAgent, t.TotalSales FROM Employee e JOIN ( SELECT e.EmployeeId, SUM(i.Total) TotalSales FROM Employee e JOIN Customer c ON c.SupportRepId = e.EmployeeId JOIN Invoice i ON i.CustomerId = c.Customer...
true
041189b62145af4cad4db45533faaafb480a66d5
SQL
patrikheinonen/TextAdventure
/TekstiseikkailupeliDUus.sql
UTF-8
12,779
3.296875
3
[]
no_license
DROP DATABASE IF EXISTS tekstiseikkailuTEST; #luodaan uusi, tyhjä demoquest-tietotaknta CREATE DATABASE tekstiseikkailuTEST; USE tekstiseikkailuTEST; CREATE TABLE LOCATION ( Id VARCHAR(10) NOT NULL, Description VARCHAR(120), Details VARCHAR(1000), PRIMARY KEY (Id) ) ENGINE=InnoDB; CREATE ...
true
2434ab237d79743d3563cd1596fa19e836fef8a5
SQL
mohamedrasvi/usermanagement
/user.sql
UTF-8
2,550
2.921875
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.5.4.1deb2ubuntu2 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Dec 06, 2017 at 03:41 PM -- Server version: 5.7.16-0ubuntu0.16.04.1 -- PHP Version: 5.6.30-7+deb.sury.org~xenial+1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET...
true
64f3d6a6c2bbb84f9ff8120b97dce4a9a40f280f
SQL
jworkman119/HTC
/Legacy/Macola_SQL/Osceola_Orders.sql
UTF-8
899
3.453125
3
[]
no_license
select cmp_name as customer , rtrim(Family.fam1) as FamilyCode ,Family.Fam2 as Description , cast(sum(oe.qty_ordered)as Int) as Qty , year(request_dt) as year from oelinhst_sql as OE join cicmpy as Customers on OE.cus_no = Customers.cmp_code join items on OE.item_no = items.ItemCode left join zzzhtc_fa...
true
2045a0cb347254e42e66f0fe7707200d5ee49717
SQL
vijaydairyf/TimelyFish
/SolomonApp/dbo/Stored Procedures/dbo.ADG_UpdtShip_OpenShipperLineCnt.sql
UTF-8
613
3.453125
3
[]
no_license
 create proc ADG_UpdtShip_OpenShipperLineCnt @CpnyID varchar(10), @OrdNbr varchar(15), @OrdLineRef varchar(5), @OrdSchedRef varchar(5), @ShipperID varchar(15) -- Current ShipperID (for exclusion). as select count(*) from SOShipLine L join SOShipSched S on L.CpnyID = S.CpnyID and L.ShipperID = S.ShipperID ...
true
95a6d5513e4ae9ed0cddcc9dc266b4db3eecedf5
SQL
Aslan773438/CUNY
/DATA607/Week2/movies.sql
UTF-8
1,541
3.671875
4
[]
no_license
CREATE DATABASE IF NOT EXISTS movies; DROP TABLE IF EXISTS movie_names; CREATE TABLE movie_names ( movie_name varchar(100) NOT NULL ); DROP TABLE IF EXISTS movie_ratings; CREATE TABLE movie_ratings ( user_id int NOT NULL, movie_name varchar(100) NOT NULL, rating int NOT NULL ); INSERT INTO movie_names ...
true
bf55a4129dafc14569ef8497d5079b1ed933be4a
SQL
NTXpro/NTXbases_de_datos
/DatabaseNTXpro/ERP/Stored Procedures/Procs1/Usp_Sel_SCTR_By_ID.sql
UTF-8
274
3.359375
3
[]
no_license
CREATE PROC [ERP].[Usp_Sel_SCTR_By_ID] @IdSctr INT AS BEGIN SELECT SC.* , PE.*, SA.* FROM ERP.SCTR SC INNER JOIN Maestro.TipoPension PE ON PE.ID = SC.IdTipoPension INNER JOIN Maestro.TipoSalud SA ON SA.ID = SC.IdTipoSalud WHERE SC.ID = @IdSctr END
true
f4526afee9141d40dd2375546302c11786ad5be6
SQL
parvaz380/Online_car_parking_and_rent_system
/ocps.sql
UTF-8
2,314
2.96875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Dec 14, 2020 at 03:03 PM -- Server version: 10.4.14-MariaDB -- PHP Version: 7.4.10 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIE...
true
83d1f33184166d1ac96630408b43c155c7e3242e
SQL
russellbwright/revampv2
/db/get_projects.sql
UTF-8
114
2.5625
3
[]
no_license
-- SELECT * FROM projects SELECT * FROM projects FULL OUTER JOIN images ON projects.projectid = images.projectid
true
250c8c030e91176ba46f5cbc149b9e2c1b79e773
SQL
mkanchwala/Spring-Solutions
/country/src/main/sqlscripts/world.sql
UTF-8
9,354
3.34375
3
[]
no_license
# SQL Manager 2010 for MySQL 4.5.0.9 # --------------------------------------- # Host : localhost # Port : 3306 # Database : world /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECT...
true
7ee0cf513356dc35b455548c096fdb52e0791083
SQL
intCCP/CCP
/Application/Viste/vomcre0_app_elenco_pos.sql
UTF-8
2,676
3.171875
3
[]
no_license
/* Formatted on 21/07/2014 18:46:09 (QP5 v5.227.12220.39754) */ CREATE OR REPLACE FORCE VIEW MCRE_OWN.VOMCRE0_APP_ELENCO_POS ( COD_COMPARTO, DESC_COMPARTO, DESC_ISTITUTO, COD_STRUTTURA_COMPETENTE_DC, DESC_STRUTTURA_COMPETENTE_DC, COD_STRUTTURA_COMPETENTE_RG, DESC_STRUTTURA_COMPETENTE_RG, COD_STR...
true
109942ede93f15f4d918f6b54037f02ea5b2d3db
SQL
OneMay/asset_management
/server/mysql/sql.sql
UTF-8
2,536
3.640625
4
[]
no_license
-- create database `Asset` -- on primary -- ( -- `name`=`asset_data`, -- `filename`='E:\学习\数据库\SQL\Asset\asset_data.mdf', -- `size`=`10mb`, -- `maxsize`=`50mb`, -- `filegrowth`=`1mb` -- ) -- log on -- ( -- `name`=asset_log, -- `filename`='E:\学习\数据库\SQL\Asset\asset_log.ldf', -- `size`=`2mb`, -- `maxsize`=`5mb`, -- `file...
true
c8796e70c4ab0007485cc4efbd06765b5b4693da
SQL
irib/variation
/variation/sql/schema-35-documents.sql
UTF-8
3,562
3.71875
4
[]
no_license
-- This file is part of Variation. -- Variation is free software: you can redistribute it and/or modify -- it under the terms of the GNU Affero General Public License as published -- by the Free Software Foundation, either version 3 of the License, or -- (at your option) any later version. -- Variation is distributed...
true
9f6145835719b700471d73c6b221b7b4e1622f3b
SQL
penny-clark/BootcampX
/3_queries_group_by/5_average_completion_time_by_student.sql
UTF-8
617
3.859375
4
[]
no_license
SELECT students.name as student, sum(assignment_submissions.duration) / count(assignment_submissions.duration) as average_assignment_duration FROM assignment_submissions JOIN students ON students.id = student_id WHERE students.end_date IS NULL GROUP BY students.name ORDER BY average_assignment_duration DESC; -- Solut...
true
5d791c62fefc590657be7600be0e2d8f0dd40084
SQL
radtek/abs3
/sql/mmfo/bars/Table/cur_rates_backup.sql
UTF-8
2,383
3.0625
3
[]
no_license
PROMPT ===================================================================================== PROMPT *** Run *** ========== Scripts /Sql/BARS/Table/CUR_RATES_BACKUP.sql =========*** Run PROMPT ===================================================================================== PROMPT *** ALTER_POLICY_INFO...
true
41f739968e0bd2aa9bf63f47e98f1c82e41cbbd1
SQL
omersevim/SEP-assignment-1
/assignment2/q8.sql
UTF-8
115
2.734375
3
[]
no_license
select ProductID, avg(quantity) TheAvg from Production.ProductInventory where LocationID = 10 group by ProductID
true
058dae48bfd2ec9e94254d213735bdc5e2b756c9
SQL
podhmo/individual-sandbox
/daily/20200527/example_sqlboiler/hello.sql
UTF-8
4,775
3.671875
4
[]
no_license
-- https://gist.github.com/syzdek/956669/15ad5f0ae23591e67467f0b0aeb085b57a448f13 -- -- Simple SQLite3 Example -- Copyright (C) 2011 David M. Syzdek <david@syzdek.net> -- -- Run: -- cat hello.sql | sqlite3 hello.db -- -- creates tables CREATE TABLE IF NOT EXISTS people ( peopleId INTEGER PRIMARY KEY AUTOINC...
true
0e186170a723e842a03dade08d99ef959b581006
SQL
eiNetwork/odpreproc-source
/db/drop.sql
UTF-8
3,370
2.75
3
[]
no_license
# ---------------------------------------------------------------------- # # Script generated with: DeZign for Databases v6.3.4 # # Target DBMS: MySQL 5 # # Project file: reindexer.dez # # Project name: ...
true
bbf307d9a30de90c054f1ff281efb7615118c300
SQL
bspur11/personel-tracker
/db/seeds.sql
UTF-8
572
3.21875
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
USE workDB, INSERT INTO department (name) ("Sales"), ("Engineering"), ("Finance"), ("Legal"); INSERT INTO role (title, salary, department_id) ("Salesman", 100000, 1), ("Engineer", 150000, 2), ("Financial Analyst", 120000, 3), ("Accountant", 125000, 3), ("Lawyer", 250000, 4); INSERT INTO employee (first_name, last_n...
true
d83203cbc24f951e3fd92ef4641587f8441bd208
SQL
OmondiKevin/ADT
/assets/queries/proc_check_patient_visit.sql
UTF-8
1,206
3.515625
4
[]
no_license
DROP TRIGGER IF EXISTS before_insert_patient_visits; DELIMITER // CREATE TRIGGER `before_insert_patient_visits` BEFORE INSERT ON `patient_visit` FOR EACH ROW BEGIN CALL proc_check_drug(NEW.patient_id,NEW.drug_id,NEW.dispensing_date,NEW.quantity); END// DELIMITER ; DROP PROCEDURE IF EXISTS proc_check_drug; DELIMIT...
true
47421f2e55d905569bf1bb5c58cd4c74b5f76b39
SQL
alex94115/SocialEQ
/rodlaver-jdbc-batch/src/test/resources/batch-insert.sql
UTF-8
518,999
2.65625
3
[]
no_license
# insert a completed listing and message INSERT INTO listing ( id, amount, quantity, title, type, version, seller_id, created, updated, status) VALUES ( 1000, 1.00, 1, 'Completed Listing', 'DIGITAL', 0, 32, current_timestamp(), current_timestamp(), 'COMPLETED' ); INSERT INTO message ( text, twitterId, user_id, crea...
true
12e574b486e8ea7b0277a09cae30609fb1e7a923
SQL
tajindes/anomalyDetectionProject
/batchQueries/elastic_processLAdata.sql
UTF-8
3,256
3.53125
4
[]
no_license
add jar /usr/local/elasticsearch-hadoop-2.1.1/dist/elasticsearch-hadoop-hive-2.1.1.jar; --Manually create the index for crime_info table and define crimelocation as geopoint for the first time (if you drop the index itself). drop table crime_info; CREATE EXTERNAL TABLE crime_info ( crime_timestamp TIMESTAMP, cri...
true
c5215975b5bbdb61c3928f9df832242d69c40dee
SQL
alexchris0309/database-exercises
/adlister.sql
UTF-8
600
3.4375
3
[]
no_license
Select user_id from users_ads as ua join ads as a on ua.id=a.id join users as u on a.id=us.user_id Where title="insert_text_here"; Select name from ads_categories ac join ads as a on a.id=ac.ad_id; join categoires as c on c.id=ac.category_id Where title="insert_text_here"; select * from...
true
97c05adc7cd1cfc41b3d99e985f9db2fe33dda15
SQL
atsullivan/CMSI486
/crossfit_load_data.sql
UTF-8
6,970
3.4375
3
[]
no_license
-- -- TABLE: Athlete -- CREATE TABLE IF NOT EXISTS Athlete( a_ID INT NOT NULL, a_gender VARCHAR(10), a_height INT, a_weight INT, a_region VARCHAR(16), affiliate VARCHAR(24), a_email VARCHAR(24), app_date DATE, dob D...
true
5d2009bdf335a719ffc0721e6400d6818fbad295
SQL
olicity-wong/Sample
/图书管理系统/数据库.sql
UTF-8
1,861
3.171875
3
[]
no_license
/* SQLyog Ultimate v11.11 (64 bit) MySQL - 5.5.37 : Database - test_1 ********************************************************************* */ /*!40101 SET NAMES utf8 */; /*!40101 SET SQL_MODE=''*/; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=...
true
4244e7aeb4efb7c32a5d3e08d0356129860e7f04
SQL
Gitwangziwang/mxonline
/mxonline.sql
UTF-8
83,525
3.203125
3
[]
no_license
/* Navicat Premium Data Transfer Source Server : djangostart Source Server Type : MySQL Source Server Version : 50722 Source Host : localhost:3306 Source Schema : mxonline Target Server Type : MySQL Target Server Version : 50722 File Encoding : 65001 Dat...
true
7b39b6f85da68723ca62a3a9bc2a4a89691fee42
SQL
serializedowen/LeetCode-SQL
/solution/176.sql
UTF-8
245
3.8125
4
[]
no_license
# Write your MySQL query statement below Select Case When min(S.Salary) = max(S.Salary) then null Else min(S.Salary) End As SecondHighestSalary From (Select Salary From Employee Order By Salary Desc Limit 2 ) S Order By S.Salary Asc Limit 1
true
2342de5790764d7bd882a34cae244fcb9af93f6f
SQL
essence-community/core-backend
/dbms/t_query/MTIcon.sql
UTF-8
1,095
3.125
3
[ "MIT" ]
permissive
--liquibase formatted sql --changeset artemov_i:MTIcon.sql dbms:postgresql runOnChange:true splitStatements:false stripComments:false INSERT INTO s_mt.t_query (ck_id, cc_query, ck_provider, ck_user, ct_change, cr_type, cr_access, cn_action, cv_description) VALUES ('MTIcon', '/*MTIcon*/ select /*Pagination*/ coun...
true
ed7e4e3c7fe6399be0ba4f6d0e030f3754a19e92
SQL
hrpitta/test_sedna_hugo_pitta
/tables.sql
UTF-8
9,021
3.90625
4
[]
no_license
/* Based on the question I didn't want to create a big dataset so I created the tables with suggested schema and did some simple queries to answer the questions the attendance table i created report_date after the date the person went to the event arrival_date the person went only in 1 event and the event_location coul...
true
ceef31e62da3cc69068171a77f6fc106423586d8
SQL
ferdrun/ead
/ead.sql
UTF-8
9,234
2.9375
3
[]
no_license
-- MySQL dump 10.13 Distrib 5.7.28, for Linux (x86_64) -- -- Host: localhost Database: ead -- ------------------------------------------------------ -- Server version 5.7.28-0ubuntu0.18.04.4 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RE...
true
1dbcf21fbf540a047df6e6183e01cc0b0f775b6f
SQL
zacharydhamilton/application-modernization
/postgres/setup.sql
UTF-8
1,089
3.421875
3
[]
no_license
CREATE SCHEMA bank; SET search_path to bank; CREATE EXTENSION postgis; CREATE TABLE customers ( customer_id VARCHAR(50) PRIMARY KEY, first_name VARCHAR(25), last_name VARCHAR(25), phone_number VARCHAR(25), email_address VARCHAR(50), street_address VARCHAR(100), city VARCHAR(50), state_province VARCHAR(50), c...
true
93ae8b58022376de53a0dced3a3a2da94ece1be8
SQL
DilsonMesquita/Openflow-DC-Framework--Web-Platform-
/ODCF-Web/Mysql files/table.sql
UTF-8
1,382
3.34375
3
[]
no_license
-- -- Table structure for table `users` -- CREATE TABLE `users` ( `id` int(11) NOT NULL auto_increment, `usr` varchar(32) collate utf8_unicode_ci NOT NULL default '', `pass` varchar(32) collate utf8_unicode_ci NOT NULL default '', `email` varchar(255) collate utf8_unicode_ci NOT NULL default '', `re...
true
31e2c3e7ba3fe8bd5513a4e5c0659103844eaf85
SQL
ddxxtony/MyCodes
/My codes/Biblioteca/biblioteca/biblioteca base de datos completa.sql
UTF-8
6,347
3.1875
3
[]
no_license
-- MySQL Script generated by MySQL Workbench -- Sun Jun 4 11:58:53 2017 -- 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
04ac88216421a77a96ec9913243b917b442b8a38
SQL
21Neo/springbootbank
/bank/src/main/resources/mysql.sql
UTF-8
2,861
3.234375
3
[]
no_license
-- bank script of bank -- 用户表 CREATE TABLE user ( id BIGINT PRIMARY KEY AUTO_INCREMENT, username VARCHAR(100), password VARCHAR(100), email VARCHAR(100), enabled INT, -- 1 启用 0 禁用 last_password_reset_date DATETIME, login_time DATETIME ); -- 角色表 CREATE TABLE AUTHORITY ( id BIGINT PR...
true
c0c038027b176e9ec50d9164cc2a0afe25e6e7b6
SQL
muthu1982/marketplace
/src/main/resources/data.sql
UTF-8
1,825
2.59375
3
[]
no_license
insert into project(id,budget,code,Description,Last_date,name,status) values(1,1000,'P1','Project1',sysdate,'Project1','OPEN'); insert into project(id,budget,code,Description,Last_date,name,status) values(2,1000,'P2','Project2',sysdate+2,'Project2','OPEN'); insert into project(id,budget,code,Description,Last_date,nam...
true
a7de7111e8720f4a7a3cbaf970ee492a759387a8
SQL
guruskid/OnlineExaminationSystem-3
/oes.sql
UTF-8
14,570
3.140625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.5.2 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Mar 16, 2017 at 02:36 PM -- Server version: 10.1.10-MariaDB -- PHP Version: 5.5.33 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CL...
true
42164c6ad4fa8412ed886582bc258dc570deaf1a
SQL
marciabcs/42aventure
/WEB/piscine/j05/ex20/ex20.sql
UTF-8
295
3.953125
4
[]
no_license
SELECT film.id_genre, genre.nom AS "nom genre", film.id_distrib, distrib.nom AS "nom distrib", film.titre AS "titre film" FROM film LEFT JOIN distrib ON distrib.id_distrib = film.id_distrib LEFT JOIN genre ON film.id_genre = genre.id_genre WHERE film.id_genre >= 4 AND film.id_genre <= 8;
true
a463f50d97f19687c41c6e116dd0f2588da401fa
SQL
yanivos007/node-react-mysql-template-main
/server/utils/schema.sql
UTF-8
830
3.65625
4
[]
no_license
/usersSchema CREATE SCHEMA `project1` ; CREATE TABLE `project1`.`users` ( `id` INT NOT NULL AUTO_INCREMENT, `firstName` VARCHAR(45) NULL, `lastName` VARCHAR(45) NULL, `userName` VARCHAR(45) NULL, `password` VARCHAR(45) NULL, `role` VARCHAR(45) NULL ; PRIMARY KEY (`id`), UNIQUE INDEX `id_UNIQUE` (`id`...
true
bbbaf1df2718295b4123023b75d6f50072baf49b
SQL
carlosfeitosa/zf_project
/rochedo/zendstudio/zf_project/scripts/db/mssql/schema/sprint_0009_create_schema.sql
UTF-8
6,160
3.421875
3
[]
no_license
/* * SCRIPT DE CRIACAO DAS TABELAS DO SPRINT 0009 * * versao: 1.0 (MSSQL 2000) * por: CARLOS FEITOSA (carlos.feitosa@rochedoproject.com) * criacao: 15/03/2011 */ /* CRIACAO DAS TABELAS */ create table basico.acao_aplicacao ( id int identity (1, 1) not null , id_modulo int not null , controller varchar (400) colla...
true
57f40886db36199c8b2c33f35b62f45647fcaee6
SQL
arvindkumar113/Pi-Techniques-Training
/Sql Query/SQLQuery3.sql
UTF-8
6,731
3.9375
4
[]
no_license
CREATE TABLE TESTDATA ( TESTNO NUMERIC(1,0) IDENTITY(1,1) NOT NULL PRIMARY KEY ) SET IDENTITY_INSERT TESTDATA ON SET IDENTITY_INSERT TESTDATA OFF DROP TABLE TESTDATA INSERT INTO TESTDATA DEFAULT VALUES CREATE TABLE dbo.TestIdentity ( RowId INT IDENTITY(1, 1) ) insert into dbo.TestIdentity default valu...
true
1dc0d9fcd54fdca067388780548ba95403243474
SQL
pablonewgen/SchoolWork
/CS648/Ch3 - HW.sql
UTF-8
779
3.75
4
[]
no_license
/* Chapter 3 Homework Assignment: Questions 6, 8, 10, 12 Paul Truong Nguyen */ -- 6 SELECT vendor_name, vendor_contact_last_name, vendor_contact_first_name FROM vendors ORDER BY vendor_contact_last_name, vendor_contact_first_name; -- 8 SELECT invoice_due_date AS dueDate, invoice_total AS invoiceTotal, invoi...
true
a2e6611c74a1c5bafb7fe44dfc6249dca237bb41
SQL
maxkrivich/debezium-data-masking-cdc-poc
/db/schema.sql
UTF-8
340
2.890625
3
[ "MIT" ]
permissive
CREATE TABLE users ( id SERIAL, first_name VARCHAR(64) NOT NULL, last_name VARCHAR(64) NOT NULL, email VARCHAR(255) NOT NULL, credit_card VARCHAR(255) NOT NULL, created_at timestamp NOT NULL DEFAULT current_timestamp, updated_at timestamp NOT NULL DEFAULT current_timestamp, deleted_at timestamp, ...
true
44961aaa2009ebfea155464122f6bac47c908b50
SQL
chetan4651/Maven_Jersey_RESTFULL
/DB/practice.sql
UTF-8
1,618
2.984375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Feb 20, 2017 at 08:02 PM -- Server version: 10.1.13-MariaDB -- PHP Version: 7.0.8 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLI...
true
9ed5c0e3e5b5cf92df08cbbb9dc191653971448e
SQL
hrynt/sql
/offers.sql
UTF-8
1,422
3.171875
3
[]
no_license
-- single SELECT core_offers.id, core_brands.id AS brand_id, core_brands.name AS brand_name, core_vendors.id AS vendor_id, core_vendors.name AS vendor_name FROM core_offers JOIN core_offers_items ON core_offers_items.offer_id = core_offers.id JOIN core_items ON core_items.id = core_offers_items.item_id JOIN core_bran...
true
a90f0909f9fd31877b4e29456ec00f1b305905a6
SQL
r3r0/sportverseny-szakdolgozat
/Horváth Emese - Sportverseny Szakdolgozat/sql files/kuzdo.sql
UTF-8
1,968
3.296875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Apr 04, 2020 at 09:57 PM -- Server version: 10.4.11-MariaDB -- PHP Version: 7.2.29 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIE...
true
e4a9afee1450b5dfb40deec7f5a44fe98297e28c
SQL
davidemoraschi/APISA
/PANDAS_MALAGA/CLAVADO AL MIG.sql
UTF-8
756
2.765625
3
[]
no_license
/* Formatted on 11/6/2014 1:41:33 PM (QP5 v5.163.1008.3004) */ SELECT COUNT (*), TRUNC (NATID_FECHA_INICIO_PARTE, 'MM') F FROM TEMP_INTERVENCIONES_A102004 T WHERE T.IND_MODALIDAD_ASISTENCIAL = 1 AND (T.NATID_FECHA_FIN_EPISODIO IS NULL OR TRUNC (T.NATID_FECHA_INICIO_EPISODIO) <> TRUNC (T.NATID_FECHA_FIN_EPISODI...
true
27692e30ff4e8664d5cda0f45580c86ede6d1e74
SQL
Divya-eluminous/test
/laravel-api.sql
UTF-8
17,610
2.96875
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.9.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1:3308 -- Generation Time: Aug 12, 2021 at 01:40 PM -- Server version: 5.7.28 -- PHP Version: 5.6.40 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CH...
true
06fd9ab2fc25ecd93727ab5891c78d5db9d531ee
SQL
l-xxj/managers
/managers/data/mpf_20190511_133230.sql
UTF-8
924
3.046875
3
[ "Apache-2.0" ]
permissive
-- ---------------------------- -- 日期:2019-05-11 13:32:30 -- MySQL - 5.5.52-MariaDB : Database - managers -- ---------------------------- SET NAMES utf8; SET FOREIGN_KEY_CHECKS = 0; -- ---------------------------- -- Table structure for `mpf` -- ---------------------------- DROP TABLE IF EXISTS `mpf`; C...
true
75b1fcea7f858c71cfe48b365c5063df58415101
SQL
VasilDimitroff/SoftUni-MS-SQL-Server
/9. AdditionalExercises/Peaks and Mountains.sql
UTF-8
177
3.4375
3
[]
no_license
USE Geography SELECT PeakName, MountainRange AS Mountain, Elevation FROM Peaks JOIN Mountains M on M.Id = Peaks.MountainId ORDER BY Elevation DESC, Peaks.PeakName
true
55235bac67d023e5c5f6f97e282e64a9d64329dd
SQL
dylan-tangamen/projet_sd
/jeux.sql
UTF-8
1,565
3
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.5.4.1 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Nov 20, 2020 at 01:53 PM -- Server version: 5.7.11 -- PHP Version: 5.6.18 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */...
true
295cfcef88d95df1cffe79ec712d895eece4b5b6
SQL
caokynguyen1704/devmini_website_php
/sql.SQL
UTF-8
3,165
2.96875
3
[ "Apache-2.0" ]
permissive
CREATE DATABASE devmini; CREATE TABLE memInform( ID int NOT NULL AUTO_INCREMENT, username varchar(255) NOT NULL, pass varchar(255) NOT NULL, office varchar(255), uidMW int, nameMW varchar(255), avatarMW varchar(255), lastLogin DATE, coinVIP int DEFAULT 0, coin int DEFAULT 0, ...
true
8634a4a56513365c1cd936b81243297955b17721
SQL
vaibhav0995/heroku_demo
/src/main/resources/employee_portal.sql
UTF-8
2,232
4
4
[]
no_license
create database employee_portal; use employee_portal; create table employee( emp_code VARCHAR(11) PRIMARY KEY NOT NULL, first_name VARCHAR(100) NOT NULL, last_name VARCHAR(100), dob DATE NOT NULL, gender VARCHAR(1) NOT NULL, primary_contact_number VARCHAR(10), secondary_contact_number VARCHAR(10)...
true
d3e1e53c9cff1192ea7ba5372b4042c9d1286a95
SQL
yarinbirgun/Patika.dev-SQL
/ödev_11.sql
UTF-8
1,017
3.28125
3
[ "MIT" ]
permissive
Merhabalar, Aşağıdaki sorgu senaryolarını dvdrental örnek veri tabanı üzerinden gerçekleştiriniz. 1. actor ve customer tablolarında bulunan first_name sütunları için tüm verileri sıralayalım. ( SELECT first_name FROM actor ) UNION ( SELECT first_name FROM customer ); 2. actor ve customer tablolarında bulunan firs...
true
51e0a1667357dd29f06f225fc8829f67de03f74d
SQL
hqottsz/MXI
/assetmanagement-database/src/base/plsql/maintenix/plsql/isAuthorizedForOperator.sql
UTF-8
2,713
3.390625
3
[]
no_license
--liquibase formatted sql --changeSet isAuthorizedForOperator:1 stripComments:false endDelimiter:\n\s*/\s*\n|\n\s*/\s*$ /******************************************************************************** * * Function: isAuthorizedForAssembly * Arguments: aHrDbId - human resource db id * aHrId...
true
c02dbc857f7cd4f3e0c1b007f5124184980d9e0d
SQL
shubhamdixit863/sspos
/sql/sspos.sql
UTF-8
6,939
2.6875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.7.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1:3306 -- Generation Time: Jul 31, 2018 at 03:31 AM -- Server version: 5.7.19 -- PHP Version: 7.1.9 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHA...
true
3b1e6639204d599444ecec24263ae5b78edd7498
SQL
nlattessi/choferes
/scripts/loadDataProduccion.sql
UTF-8
2,068
2.640625
3
[ "MIT" ]
permissive
LOCK TABLES `choferes`.`rol` WRITE; /*!40000 ALTER TABLE `choferes`.`rol` DISABLE KEYS */; INSERT INTO `choferes`.`rol` VALUES (1,'ROLE_ADMIN'); INSERT INTO `choferes`.`rol` VALUES (2,'ROLE_CNTSV'); INSERT INTO `choferes`.`rol` VALUES (3,'ROLE_PRESTADOR'); INSERT INTO `choferes`.`rol` VALUES (4,'ROLE_CNRT'); INSERT INT...
true
851df19e354f78ac28876551d38f197e25f28484
SQL
Arrowzi/DB
/mysql-init-files/0-create.sql
UTF-8
1,741
3.96875
4
[]
no_license
CREATE DATABASE IF NOT EXISTS bookmarket; USE bookmarket; CREATE TABLE IF NOT EXISTS author ( id INT AUTO_INCREMENT PRIMARY KEY, fname VARCHAR(30) NOT NULL, sname VARCHAR(30) NOT NULL, dob DATE NOT NULL ); CREATE TABLE IF NOT EXISTS book ( id INT AUTO_INCREMENT PRIMARY KEY, title VARCHAR(80) NOT...
true
f85d0908139f35b1c6b0caf19aed285f4e2e4cf7
SQL
SzczepanSz/WebApp
/bazaDanych.sql
UTF-8
3,489
3.234375
3
[]
no_license
CREATE DATABASE IF NOT EXISTS `web_customer_tracker` /*!40100 DEFAULT CHARACTER SET latin1 */; USE `web_customer_tracker`; -- MySQL dump 10.13 Distrib 5.6.13, for osx10.6 (i386) -- -- Host: 127.0.0.1 Database: web_customer_tracker -- ------------------------------------------------------ -- Server version 5.6.16 ...
true
b416327306731872ef2d49b7803d67e9b2b932a8
SQL
optomal7/contacts-snapshot-starter
/src/db/schema/schema.sql
UTF-8
313
2.65625
3
[]
no_license
DROP TABLE IF EXISTS contacts; CREATE TABLE contacts ( id serial, first_name varchar(255) NOT NULL, last_name varchar(255) NOT NULL ); DROP TABLE IF EXISTS users; CREATE TABLE users ( id serial, username varchar(255) unique NOT NULL, pass_hash varchar NOT NULL, role varchar DEFAULT ('regular') );
true
1804b63e900428ce087a9567322fa1f296e01ea3
SQL
jzhnice/20210603
/20210602 (2).sql
UTF-8
3,028
3.921875
4
[]
no_license
create database if not exists xuexiao default charset = utf8; -- 创建数据库 create -- 创建 exists -- 存在 if not exists -- 不存在 use -- 使用 use xuexiao; -- 使用数据库 create table studentInfo( `name` varchar(10), sex char, age int, address varchar(10) ); show tables; -- 显示表格 -- 插入数据 insert i...
true
e2c035c342d61ad64cbd767e4a306179b4f7ed77
SQL
HoodPanther/neonetods
/ddls/species_lists_schema_ddl.sql
UTF-8
8,472
3.421875
3
[]
no_license
--CREATE SCHEMA species_lists; --DoDoBASE: SPECIES LISTS SCHEMA-- ---Species Lists Table ---lists of species at, near, or surrounding NEON sites ---includes only NEON taxa: ground beetles, mosquitoes, small mammals, plants, birds ---conservation status is included here, because status can vary across the geographical ...
true
70cf61128a932a96a677a2c19b5b2dddd6aa6369
SQL
ttzhanghuiyuan/leshare
/sql/school.sql
UTF-8
361
2.765625
3
[ "MIT" ]
permissive
create table ls_school( id int primary key auto_increment comment 'ID', school_name varchar(255) comment '学校名称', create_time int default 0 comment '创建日期', update_time int default 0 comment '修改时间', delete_flag tinyint default 2 comment '删除标识1删除2未删除' ) ENGINE=InnoDB CHARSET=utf8 COMMENT='校区表';
true
402d3cbb9ea52f990f4490ed7d6baf617d3eeab4
SQL
onlinekof2001/Oracle_Auto_Scripts
/oracle_scripts/rdk_switch_interactif_v20.sql
UTF-8
2,258
3.09375
3
[]
no_license
-------------------------------------------------------------------------------- -- AUTHOR: Pierre-Marie Petit -- VALIDATOR: -- SCRIPT: rdk_hold_flows.sql -- SYNOPSIS: hold flows -- USAGE: sqlplus -S -L /nolog @rdk_switch_interactif.sql -- PARAMETERS: -- Version -- 1.0 Creation 20/04/2016 ---------------...
true
7be75a5bf7912f08c609856d6cd1aad251d2715f
SQL
saurabhshukla01/Localhost_database_dump
/laraveldemo.sql
UTF-8
2,379
2.828125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.9.0.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Apr 13, 2020 at 06:22 AM -- Server version: 10.4.6-MariaDB -- PHP Version: 7.2.22 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @O...
true
4ce495078cf219ad4e197063fa1d0fe0053b5eb3
SQL
thinhphamcs/demos
/week2/scripts/joins.sql
UTF-8
3,171
4.78125
5
[]
no_license
--INNER JOIN: Selects all rows from both tables that have a matching common key. --LEFT JOIN: Uses all rows of the table on the left side and finds matching rows from the table on the right side. --RIGHT JOIN: Uses all rows of the table on the right side and finds matching rows from the table on the left side. --FULL J...
true
ba0509880efb898477fad67b24a3691dd164d008
SQL
siminitchi/tekwill
/lesson 11/24.10.18.sql
UTF-8
7,472
4.3125
4
[]
no_license
select last_name || ' ' || first_name "Nume Prenume Angajat" ,job_title ,department_id from employees join jobs using(job_id) where department_id=80 order by 1; select last_name || ' ' || first_name "Nume Prenume Angajat" ,job_title ,department_id from employees a join j...
true
d922379432871cca583886786267b7f10754c411
SQL
Katsarov/DB
/07.Subqueries_And_Joins_Excersise/11_MinAverageSalary.sql
UTF-8
386
4.15625
4
[ "MIT" ]
permissive
SELECT TOP(1) (SELECT AVG(Salary) FROM Employees e WHERE e.DepartmentID = d.DepartmentID) AS MinAverageSalary FROM Departments d ORDER BY MinAverageSalary -- 2nd Solution (using GROUP BY) SELECT TOP(1) AVG(Salary) AS MinAverageSalary FROM Employees e JOIN Departments d ON d.DepartmentID = ...
true
0046fc5fc416047bcba5ab3af9d835c4bf7f4ace
SQL
dougreisss/Cuida-Em-Casa
/banco/procedureHomecare.sql
UTF-8
155,246
3.5625
4
[]
no_license
DELIMITER $$ /* PROCEDURES PARA TODOS OS USUÁRIOS */ /* Procedure criada para verificar login */ DROP PROCEDURE IF EXISTS cadastroCliente$$ CREATE PROCEDURE cadastroCliente(vEmailUsuario VARCHAR(200), vNomeUsuario VARCHAR(200), vTelefoneUsuario VARCHAR(15), vCpfUsuario VARCHAR(15), vSenhaUsuario VARCHAR(128)) BEGIN...
true
9b500ac7714109aa53743e3a3e14a90909337ee0
SQL
bogdan-alov/CSharp-DB-Fundamentals
/Databases Basics - MS SQL Server/3. Built-in Functions/Built-in Functions.sql
UTF-8
2,829
4.40625
4
[]
no_license
01. Find Names of All Employees by First Name SELECT FirstName, LastName FROM Employees WHERE LEFT(FirstName, 2) = 'SA' 02. Find Names of All Employees by Last Name SELECT FirstName, LastName FROM Employees WHERE CHARINDEX('EI', LastName) > 0 03. Find First Names of All Employess SELECT FirstName FROM ...
true
fd2c625e0b3d36ad2094c692ebfeaf2560a026ee
SQL
phong203/ChuyenDeWeb1
/BT_Test_1_2/my_database/facefly.sql
UTF-8
10,240
3.21875
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.8.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1:3306 -- Generation Time: Apr 01, 2019 at 03:46 PM -- Server version: 5.7.24 -- PHP Version: 7.2.14 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CH...
true
0a08d7be6afefcddf67aa9be14b34126fa5e2776
SQL
lockeycher/Database-Technologies
/HW1/Trips.sql
UTF-8
5,288
3.09375
3
[]
no_license
-------------------------------------------------------- -- DDL for Table TRIPS -------------------------------------------------------- --drop table bycar; --drop table byplane; --drop table bytrain; --drop table trips CREATE TABLE TRIPS ( "TID" INTEGER, "TRIPSTATE" VARCHAR2(10 BYTE), "TRAVELMODE" VARCHA...
true
c246f7e58ebae60fbac77e3348d631369286ac3b
SQL
psfile/monimysqlperfschema
/5-monitoring-mysql-performance-schema-m5-exercise-files/demos/before/2-file-io.sql
UTF-8
802
3.203125
3
[]
no_license
SELECT performance_schema.file_summary_by_instance.FILE_NAME AS file, performance_schema.file_summary_by_instance.SUM_NUMBER_OF_BYTES_READ/1000000 AS total_read_mb, performance_schema.file_summary_by_instance.SUM_NUMBER_OF_BYTES_WRITE/1000000 AS total_written_mb, (performance_schema.file_summary_by_instance.SUM_NU...
true
d5513036d2f5dccf82efc9e1a8c348ad910222ad
SQL
daogena/airlinewebsite
/make_airline_sql.sql
UTF-8
18,184
3.796875
4
[]
no_license
/*Make Airline*/ DROP TABLE IF EXISTS bookings CASCADE; DROP TABLE IF EXISTS ticket CASCADE; DROP TABLE IF EXISTS check_bag CASCADE; DROP TABLE IF EXISTS passenger_info CASCADE; DROP TABLE IF EXISTS payment CASCADE; DROP TABLE IF EXISTS boarding_passes CASCADE; DROP TABLE IF EXISTS ticket_flights CASCADE; DROP T...
true
091933fc1766f9c6e789b9a75cffc09a54826790
SQL
pciio1957/Java
/webexp/src/main/java/Database/a01_exp/0624exp.sql
UTF-8
6,030
4.34375
4
[]
no_license
/* # 정리문제 1. 테이블 subquery에서 테이블간 조인관계를 급여가 2000이상인 사원테이블, 부서명이 SALES 이거나 RESEARCH 부서테이블 조인하여 사원명, 부서명, 급여를 출력하세요. (아래) 2. 직책별 최고급여자의 부서번호, 부서명을 출력하세요. (아래.. ) 3. DB 조작어의 종류와 트랜잭션 명령어의 기능에 대하여 기술하세요. DML(Data Manipulation Language) 1. 종류 1) insert : 데이터 입력처리 2) update : 데이터 수정처리 3) dalete...
true
c7bfa60f8674b9310856d9752f72b576d76addbe
SQL
rudycastillo95/Spirit-Airlines-Database
/Back End/AirportDB_Proc_Triggers/DBA_PredefinedJoins.sql
UTF-8
1,645
4
4
[]
no_license
USE airportdb; DROP PROCEDURE IF EXISTS passenger_info; DELIMITER // CREATE PROCEDURE passenger_info ( ) BEGIN SELECT p.passenger_id, FirstName, LastName, email, memberLevel, numPoints, COUNT(p.passenger_id) AS tickets_purchased, SUM(t.price) AS money_paid FROM passenger AS p INNER JOIN loyaltylevel AS l ON l.passeng...
true
88c03d192868962bf7f521c02c0503dd543b6471
SQL
leon230/UTMSReporting
/SQL/SQL/Reports/Ocean/Claims pivot/query 14.05.2015.sql
UTF-8
2,263
3.953125
4
[]
no_license
WITH pivot_data AS ( (SELECT DISTINCT TEMP_1.SHIPMENT_END_DATE AS END_DATE, TEMP_1.ACCESSORIAL AS ACC_NAME, SUM(TEMP_1.COST_EUR) AS SHIPMENT_COST_2 FROM ( SELECT TO_CHAR(SH.end_time,'MM') SHIPMENT_END_DATE, sh.SHIPMENT_GID SH_GID, SH_COST...
true
81adc68a68a72ca345f93ae65fe1afc7587c8d08
SQL
zoltankaszala/web2-beadando2
/forras/menu.sql
UTF-8
663
2.8125
3
[]
no_license
CREATE TABLE `menu` ( `url` varchar(30) NOT NULL, `nev` varchar(30) NOT NULL, `szulo` varchar(30) NOT NULL, `jogosultsag` varchar(3) NOT NULL, `sorrend` tinyint(4) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; INSERT INTO `menu` (`url`, `nev`, `szulo`, `jogosultsag`, `sorrend`) VALUES ('admin', 'Admin', '',...
true
d1aa332e48d5823deef5353d61dda5d2efe14118
SQL
VirtusLab/slick-101
/src/test/resources/db/migration/V2__Create_test_data.sql
UTF-8
5,216
2.859375
3
[ "Apache-2.0" ]
permissive
INSERT INTO student(id, name, middle_name, surname, nationality) VALUES (1, 'Tom', NULL, 'Smith', 'American'); INSERT INTO student(id, name, middle_name, surname, nationality) VALUES (2, 'Mike', NULL, 'Williamns', 'American'); INSERT INTO student(id, name, middle_name, surname, nationality) VALUES (3, 'Michał', NULL, '...
true
48587873aeb6799bd40de76f65b5158219ced063
SQL
nagsrk/bvi
/schemas/bigquery/adoption/gplus_30day_summary_latest.sql
UTF-8
258
2.765625
3
[ "Apache-2.0" ]
permissive
-- gplus_30day_summary_latest (view) SELECT date, total_num_plusones, total_num_replies, total_num_reshares, total_num_shares FROM [YOUR_PROJECT_ID:adoption.gplus_30day_summary], WHERE date = DATE(DATE_ADD(TIMESTAMP(CURRENT_DATE()), -4, "DAY"))
true
86e9a30f26674f0181518118d356a8217b097286
SQL
zometer/mpq-dashboard
/docker/mpq-db/sql/table/TILE.sql
UTF-8
188
2.671875
3
[]
no_license
create table mpq_data.tile ( tile_id integer primary key generated by default as identity, tile_type varchar(20), color_id integer references mpq_data.mpq_color.color_id );
true
672ee6b100252fb2fc78c2e4f73bd13c893afc2a
SQL
hstiv/piscine_php
/day05/ex16/ex16.sql
UTF-8
174
3.125
3
[]
no_license
SELECT COUNT(*) AS movies FROM member_history WHERE DATE(date) BETWEEN '2006-10-30' AND '2007-07-27' OR DATE_FORMAT(DATE(date), '%m-%d') = DATE_FORMAT('1999-12-24', "%m-%d");
true