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
5f5e27ab379a777d83609881e28abb142ef5743d
SQL
zxy1994/Sample
/src/main/resources/db/schema.sql
UTF-8
1,037
3.578125
4
[]
no_license
DROP TABLE IF EXISTS IM_USER; DROP TABLE IF EXISTS IM_MSG_CONTENT; DROP TABLE IF EXISTS IM_MSG_RELATION; DROP TABLE IF EXISTS IM_MSG_CONTACT; CREATE TABLE IM_USER ( uid INT PRIMARY KEY, username VARCHAR(500) NOT NULL, password VARCHAR(500) NOT NULL, email VARCHAR(250) DEFAULT NULL, avatar VARCHAR(500) NOT NU...
true
b1d3b45f851666699f4b9967e728934938220027
SQL
itzamna314/commish
/src/sql/auth.sql
UTF-8
1,994
3.75
4
[]
no_license
drop schema if exists `auth`; CREATE SCHEMA if not exists `auth` ; use `auth`; create table if not exists contactType( id int primary key not null auto_increment, name nvarchar(32) not null, createdOn datetime not null default CURRENT_TIMESTAMP ); insert into contactType(name) values ('email'); creat...
true
56abb0aaf8b4e783001a5be566cb684c78340d1e
SQL
adamwight/wmf-open-editing
/export_volunteer_totals.sql
UTF-8
225
3.375
3
[]
no_license
select month, sum(edit_count) as edit_count from woe_wiki_edit_count c join woe_wikidb d on d.dbname = c.wiki join woe_wmf_volunteer_account u on c.username = u.username where d.private = 0 group by c.month;
true
10653b3ab420831b76bac3b1905056616773333d
SQL
jimmycho/mvc_blog
/mvc_blog/WebContent/WEB-INF/sql/board.sql
UTF-8
4,634
3.71875
4
[]
no_license
DROP TABLE board CASCADE CONSTRAINTS PURGE; --board를 누군가 참조한다면 삭제되지 않으나, --cascade constraints 선언하면 지울수 있음 CREATE TABLE board ( num NUMBER(6) NOT NULL, -- 글 일련 번호 name VARCHAR(10) NOT NULL, -- 글쓴이 성명 subject VARCHAR(100) N...
true
8fd0a2e4585c522a9947f42973e48b3def4419b6
SQL
albertbahia/wdi_june_2014
/w02/d03/INSTRUCTOR/wdi_closure_db/answers.sql
UTF-8
529
3.3125
3
[]
no_license
SELECT * FROM instructors; SELECT * FROM students; SELECT name FROM students; SELECT * FROM students WHERE favorite_color = 'black'; SELECT name FROM students WHERE favorite_color = 'orange'; SELECT * FROM instructors WHERE age > 100; SELECT (day, topic) FROM lessons WHERE week = 2; SELECT (topic) FROM lessons WHERE w...
true
ce8b50fc3c19ae08b61108e9cf2aff1b55a6cf87
SQL
hjerichen/dbunit
/tests/Integration/MySQLTestTables.sql
UTF-8
623
3.21875
3
[ "MIT" ]
permissive
DROP TABLE IF EXISTS `productExtension`; DROP TABLE IF EXISTS `product`; CREATE TABLE `product` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `ean` varchar(255) DEFAULT NULL, `stock` int(11) DEFAULT NULL, `other` int(11) NOT NULL, PRIMARY KEY (`id`) ) ENGINE = InnoDB; CREATE TABL...
true
eab1efb10c889638e365a031ce3d72ba2f47eee0
SQL
duylh96/QLCuaHangDDS
/Database/SQLQuery.sql
UTF-8
2,350
3.421875
3
[]
no_license
create table LOAIMATHANG( MaLoaiMH bigint NOT NULL IDENTITY(1,1), TenLoaiMH nvarchar(50), NamSX nvarchar(10), primary key(MaLoaiMH), ); create table MATHANG( MaMH bigint NOT NULL IDENTITY(1,1), MaLoaiMH bigint, TenMH nvarchar(100), DonGia real, Mota nvarchar(100), KinhDoanh bit, primary key(MaMH), foreign key(MaLoaiMH...
true
37c9e26f2307bb136322fe3fec648934a5b8e5da
SQL
manjan/DataAnalyst
/examples/Windowing_examples.sql
UTF-8
2,391
4.6875
5
[]
no_license
-- Question: What is the price of the least expensive product in each brand? SELECT prod_id, brand, price, MIN(price) OVER(PARTITION BY brand) AS m FROM products; -- Question: For each product, how does the price compare to the minimum price for that brand? SELECT prod_id, brand, price, price - MIN(price) OVE...
true
f110f14455385857c48436941a337e5e95987bc6
SQL
robin-zhao/rzLearning
/php/tests/gallery_example/image.sql
UTF-8
220
2.5625
3
[]
no_license
CREATE TABLE IF NOT EXISTS image ( id int(10) NOT NULL AUTO_INCREMENT PRIMARY KEY, uploaded timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, name varchar(255) NOT NULL, note text NULL );
true
c956c2cc9833aa8ccc9ebc3b55d3b5ce0afe915d
SQL
chrisMous/DatabaseCoursework
/ex12.sql
UTF-8
408
2.703125
3
[]
no_license
INSERT INTO CountryAndTerritoryInfo(geoId, countriesAndTerritories, countryterritoryCode,continentExp) SELECT DISTINCT geoId, countriesAndTerritories, countryterritoryCode, continentExp FROM dataset; INSERT INTO PopInfo(geoId,popData2019) SELECT DISTINCT geoId,popData2019 FROM dataset; INSERT INTO COVIDStat...
true
41e0cb3b7fd62888ecacfe8b7f46761aac7b0b3f
SQL
jkthedba/scripts
/sqlh_new.sql
UTF-8
2,333
3.421875
3
[]
no_license
SET VERIFY OFF SET PAGESIZE 30 SET LINESIZE 250 COLUMN BEGIN_INTERVAL_TIME FORMAT A7 COLUMN BEGIN_INTERVAL_DATE FORMAT A11 COLUMN SQL_PROFILE FORMAT A10 COLUMN EXECUTIONS_DELTA FORMAT 999999 COLUMN MILSEC_PER_EXEC FORMAT 9999999990.999 COLUMN ROWS_PER_EXEC FORMAT 9999990.9 COLUMN BUFFER_GETS_PER_EXEC FORMAT 999999990....
true
cfd00b0ff2b9e4df1ce06e7e87420696a6647a48
SQL
lindsaygrizzard/SQLLS-hw
/skills.sql
UTF-8
6,038
4.84375
5
[]
no_license
-- 1. Select all columns for all brands in the Brands table SELECT name FROM Brands; -- 2. Select all columns for all car models made by Pontiac in the Models table. SELECT name FROM Models WHERE brand_name = 'Pontiac'; -- 3. Select the brand name and model -- name for all models made in 1964 from the M...
true
7b6dd53291f5814cd2c91e04d0ade56c49882ec2
SQL
serin113/orgdb
/db.sql
UTF-8
7,550
3.40625
3
[ "BSD-3-Clause", "MIT" ]
permissive
-- Created in 2019-01-31 for PSYSC as part of a system for managing science club affiliations. -- Copyright (c) 2019 Nathankissam Roy Tubis & Elfren Simon Clemente. -- Licensed under the MIT License, refer to https://opensource.org/licenses/MIT for details. -- Code History: -- 2019/02/06 (Nathan) - Initial working co...
true
7a49474984d9d72c790ab274da6762e82800abbf
SQL
maven8919/epamfood
/src/main/resources/database/db-init.sql
UTF-8
476
2.640625
3
[]
no_license
create table food ( id bigint generated by default as identity (start with 1) , name varchar(255) , description varchar(255) , primary key (id) ); insert into food(id, name, description) values (default, 'Palacsinta', 'Folyékony tésztából készített, serpenyőben mindkét oldalán megsütött, tész...
true
9915216af510d14d824395b0ce1cf379ed4863e8
SQL
gabrielrdw20/SQL_MySQL
/Code No 2_GR.sql
UTF-8
709
3.625
4
[]
no_license
author: gabrielrdw20 (github) Zadanie 1 ---------------------------------------------- USE ABDPrzychodnia SELECT Imie, COUNT(W.DataWizyty) AS WI FROM [Wizyty] W JOIN [Pacjenci] P ON P.IdPacjenta = W.IdPacjenta WHERE DataWizyty BETWEEN '20130701' AND '20131231' GROUP BY Imie HAVING COUNT(W.DataWizyty)>=3 ORDER BY WI D...
true
e08d21aa33763fa251dcd164a83f434a7db78e14
SQL
fxhln/PortfolioProjects
/Global Covid Analysis.sql
UTF-8
2,983
3.90625
4
[]
no_license
Select * From [Portfolio Project].dbo.CovidDeaths Where Continent is not null Order By 3, 4; --Select * --From CovidVaccinations --Order By 3, 4 --Select Data that we are going to be using Select location, date, total_cases, new_cases, total_deaths, population From [Portfolio Project].dbo.CovidDeaths ...
true
94aa6f1c16aea345fd2090478df1306965e5b2c3
SQL
marikullom/CISC4900_Portfolio-Projects-for-Business-Analysis
/Project 2/Income.sql
UTF-8
5,461
3.328125
3
[]
no_license
mysql> INSERT INTO CH2_Rehab_Income(info, For_Year_2012) -> VALUES ('Income', 2200000); Query OK, 1 row affected (0.00 sec) mysql> INSERT INTO CH2_Rehab_Income(info, For_Year_2012) VALUES ('Cost of Goods', 550000); Query OK, 1 row affected (0.01 sec) mysql> INSERT INTO CH2_Rehab_Income(info, For_Year_2012) VAL...
true
2004509609625bce8b59bee9a652ffbf2251a0d4
SQL
maschreiber/heatCheck
/sqlqueries.sql
UTF-8
729
3.8125
4
[]
no_license
SELECT name, COUNT(SELECT shot_type FROM shot WHERE shot_type = 3), COUNT(SELECT shot_type FROM shot WHERE shot_type = 2) FROM shot s, game g WHERE g.gid=s.gid AND period = 4 GROUP BY name; --How many threes vs how many twos in the 4th quarter by name SELECT name, x, y FROM shot WHERE made = 1 GROUP BY name;...
true
84f84738eddaa3ebd689e5c62b107ee54266be7a
SQL
flowerbear/leetcode
/src/main/java/com/orlando/java/self001/from1851to1900/Solution1875.sql
UTF-8
2,999
5.15625
5
[]
no_license
Group Employees of the Same Salary Table: Employees +-------------+---------+ | Column Name | Type | +-------------+---------+ | employee_id | int | | name | varchar | | salary | int | +-------------+---------+ employee_id is the primary key for this table. Each row of this table indicates the ...
true
85e2146f88b66bc8e965681e83eb514ed618814f
SQL
msingara/MSSQL
/Create_table_scripts.sql
UTF-8
4,249
3.40625
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
39118577ca14d0669eb399aee3c083180dae717a
SQL
natanxds/PHOS4
/Banco de Dados/individual/Jorge Uliam de Lima/bancoprojeto.sql
UTF-8
1,153
3.03125
3
[]
no_license
create database site_institucional; use site_institucional; -- Dados do Usuário (provavelmente um representante da empresa) create table Usuario ( id_usuario int primary key, nome varchar(60), email varchar(60), senha varchar(255), telefone_celular varchar(11), ); -- Dados mais levados para empresa create table Em...
true
a0efb274c7457f74a512743c31a8b73834aa3011
SQL
diegomtzm/VivaAvion
/Consultar.sql
UTF-8
2,987
3.953125
4
[]
no_license
--Diego Martinez --Info completa de todos los vuelos reservados SELECT v.* FROM Vuelo AS v, ReservacionVuelo AS rv WHERE v.id_vuelo == rv.id_vuelo; --Info completa de todos los clientes con vuelo reservado SELECT c.* FROM Cliente AS c, ReservacionVuelo AS rv WHERE c.id_cliente == rv.id_cliente; --Info de los clientes...
true
d63b1c6900c44d8b9868555d6db4152d821e1214
SQL
TechArpit20/arpit.github.io
/portfolio.sql
UTF-8
3,856
3.09375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.9.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Mar 16, 2021 at 10:00 AM -- Server version: 10.4.11-MariaDB -- PHP Version: 7.2.26 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OL...
true
ad1fa1bff51cf5c6a9a7d8290b8db332919f4f66
SQL
redikx/ORACLE
/create_baseline_from_awr.sql
UTF-8
1,412
3.15625
3
[]
no_license
1. drop staging sqlset: BEGIN DBMS_SQLTUNE.DROP_SQLSET(sqlset_name => 'MySTS01'); END; 2. Create sqlset: BEGIN DBMS_SQLTUNE.CREATE_SQLSET ( sqlset_name => 'staging' , description => 'SQL tuning set to store SQL from the private SQL area' ); END; 3. Load plan into sqlset: DECLARE cur sys_refcursor; BEG...
true
3a241598df415878b300b03d406f1256fe85e35e
SQL
zxjava/jshop
/database.sql
UTF-8
923
3.3125
3
[]
no_license
CREATE DATABASE IF NOT EXISTS `test` DEFAULT CHARSET utf8 COLLATE utf8_general_ci; use test; DROP TABLE IF EXISTS user; CREATE TABLE `user` ( `id` INT UNSIGNED NOT NULL AUTO_INCREMENT, `name` VARCHAR(45) NOT NULL DEFAULT '', `avatar` VARCHAR(100) NOT NULL DEFAULT '', `email` VARCHAR(50) NOT NULL DEFA...
true
9727c571d6954b8281817b745f6876fe0c2ba283
SQL
jatlast/SourceCode
/Database/StoredProcedures/dbo.createLoginInfo.PRC
UTF-8
7,074
3.75
4
[]
no_license
SET QUOTED_IDENTIFIER ON GO SET ANSI_NULLS ON GO if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[createLoginInfo]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) drop procedure [dbo].[createLoginInfo] GO CREATE PROCEDURE [createLoginInfo] @UserId int-- not used , @UserName varcha...
true
3f85624d595f144ec9c9a457f0e5890b8c077a3a
SQL
cloudtestsoftware/biderp
/src/com/biderp/sql/oracle/Myrequest/Insert_Myrequest.sql
UTF-8
1,500
3.359375
3
[]
no_license
CREATE OR REPLACE PROCEDURE Insert_Myrequest(pnObjid NUMBER) IS --Constants for status STATUS_OPEN varchar2(20):='1'; STATUS_ACCEPTED varchar2(20):='2'; --Please Modify the cursor as you need CURSOR m_Transaction_cur IS Select Name, Amount, Debited, Credited, TransactionType, TransactionCode, Vouche...
true
76a8d12c802f68953b848c2743048c48f5f5498d
SQL
akshay9/registration-page
/reverb.sql
UTF-8
2,077
3.0625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.4.14 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Oct 29, 2015 at 06:26 PM -- Server version: 5.6.26 -- PHP Version: 5.6.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;...
true
cf617af698643b4b7b020722b88f2dec50910174
SQL
Jeong-UH/Fit-Got-U
/jellyDB.sql
UTF-8
24,411
2.859375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- 생성 시간: 19-06-14 02:58 -- 서버 버전: 5.6.43 -- PHP 버전: 7.0.33 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIE...
true
22c2ac329000552de3b3654a3605ebf90a340253
SQL
lsk-china/score
/conf/schema.sql
UTF-8
394
2.859375
3
[]
no_license
CREATE DATABASE score; CREATE TABLE score.table1 ( id int(11) NOT NULL AUTO_INCREMENT, name varchar(50) NOT NULL, level varchar(255) NOT NULL DEFAULT '小萌新', score int(11) NOT NULL DEFAULT 0, PRIMARY KEY (id) ) ENGINE = INNODB AUTO_INCREMENT = 1 AVG_ROW_LENGTH = 8192 CHARACTER SET utf8 COLLATE utf8_general_ci...
true
f880780353ff3037e85249421d79ff434958f89c
SQL
rafe721/rfile_utl
/TEST_REMOTE_FTP.sql
UTF-8
2,541
3.046875
3
[]
no_license
CREATE OR REPLACE PACKAGE "VOICE_COMPRESSION"."TEST_REMOTE_FTP" AS PROCEDURE p_put_file_in_remote_system ( p_msg_text OUT VARCHAR2 ); PROCEDURE p_get_file_from_remote_system ( p_clob OUT CLOB, p_msg_text OUT VARCHAR2 ); END TEST_REMOTE_FTP; / ...
true
e8fe710622adc20b34e0db17899b3292a4ab9e1b
SQL
britt-mo/database-exercises
/select_exercise.sql
UTF-8
669
3.453125
3
[]
no_license
USE codeup; Select album as 'The name of all albums by Pink Floyd', artist from albums where artist = 'Pink Floyd'; Select release_date as 'The year Sgt. Pepper''s Lonely Hearts Club Band was released' from albums where album = 'Sgt. Pepper''s Lonely Hearts Club Band'; Select genre as "The genre for Nevermind" from...
true
a53bda7fc96c38f62d4d089f8db1700d88d5c8d8
SQL
DevPlaybook/devplaybook
/math-operations-postgresql.sql
UTF-8
1,614
2.859375
3
[]
no_license
create sequence sales_records_id_seq as integer; create table sales_records ( id bigint default nextval('sales_records_id_seq'::regclass) not null, transaction_date timestamp, transaction_amount money, customer_name varchar(255), quantity bigint, unit_price ...
true
c42d2d13e311fe025fada85a3dcc05d3768bc869
SQL
sinerger/HR_Application
/HR_Application_DB/Stored Procedures/Custom/Departments/UpdateDepartmentsProjects.sql
UTF-8
325
2.75
3
[]
no_license
CREATE PROCEDURE [HRAppDB].[UpdateDepartmentsProjects] @ID int, @ProjectID int, @DepartmentID int AS Update [HRAppDB].[Departments_Projects] set [HRAppDB].[Departments_Projects].ProjectID = @ProjectID, [HRAppDB].[Departments_Projects].DepartmentID = @DepartmentID where [HRAppDB].[Departments_Projects].ID = @...
true
f8ab9b1e858b7a46a07007a6d1a146c45eed2117
SQL
josemarsilva/eval-dynatrace-saas
/src/sql/query-caplanhistorico.sql
UTF-8
159
3.1875
3
[]
no_license
select * from caplan_historico h, caplan_recurso r, caplan_tiporecurso tr where r.id = h.recurso_id and tr.id = r.tipo_id order by 1 ;
true
c74cd2c94b59b0b0d627c7b885465365663f7f58
SQL
koswol/bigquery-course
/06_wyrazenia_warunkowe/02_coalesce.sql
UTF-8
692
3.125
3
[ "MIT" ]
permissive
-- @author: krakowiakpawel9@gmail.com -- @site: e-smartdata.org -- COALESCE(expr1, ..., exprN) CREATE OR REPLACE TABLE functions.coal ( user_id STRING NOT NULL, is_purchased_ad_1 STRING, is_purchased_ad_2 STRING, is_purchased_ad_3 STRING, is_purchased_ad_4 STRING ); INSERT INTO functions.coal VALUES ('01',...
true
63f37f894bf40c2579231859a4d35dfb808967f2
SQL
oktopriima/lemonilo
/domain/core/migrations/mysql/20191130194916-create-users.sql
UTF-8
588
3.203125
3
[]
no_license
-- +migrate Up CREATE TABLE IF NOT EXISTS `lemonilo`.`users` ( `id` INT UNSIGNED NOT NULL AUTO_INCREMENT, `name` VARCHAR(255) NOT NULL, `email` VARCHAR(255) NOT NULL, `address` TEXT NOT NULL, `password` VARCHAR(255) NOT NULL, `created_at` TIMESTAMP NOT NULL DEF...
true
d7c3fa19cd02fce1d2752da70884c2d818b5f29a
SQL
tashfeenMustafa/spms-schema
/1. populate (school, dept, degree).sql
UTF-8
970
2.921875
3
[]
no_license
select * from degree_program; INSERT INTO SCHOOL (schoolName, location, deanInCharge) VALUES ('School of Computer Science and Engineering', '','' ); INSERT INTO Account (accountID, firstName, email, accountType) VALUES ('1821709', 'Shohan1', 'shohan1@school.com', 'Faculty'); ALTER TABLE faculty MODIFY dept...
true
2cf35077f963d6b42215a36684e2e88091d51e55
SQL
ksukhmani/kungFuMaster
/Code/individual dump files/kung_fu_student_id_table.sql
UTF-8
2,359
2.953125
3
[]
no_license
-- MySQL dump 10.13 Distrib 5.7.17, for Win64 (x86_64) -- -- Host: localhost Database: kung_fu -- ------------------------------------------------------ -- Server version 5.7.17-log /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;...
true
34924ea830bb3a11f12bb3e77a9d97e027cdeb96
SQL
fabio97U/querys
/Especificas/Reporte estadístico con cantidad de estudiantes por carrera.sql
ISO-8859-1
2,875
3.671875
4
[]
no_license
select per_codigo, per_carnet, per_nombres, per_apellidos, car_nombre --,dbo.cum_repro(per_codigo), dbo.mat_gral_repro(per_codigo) ,( isnull( stuff( ( select concat (',',convert (date, mov_fecha_real_pago, 103), ',', case when pago_complementario = 0 then '-1' else pago_complementario end,'') from ( sel...
true
570c953f6a8ccb58d0e7004adc18c0c61e17bd41
SQL
galigaribaldi/BDD-Oracle
/Prácticas/Practica 5/s-02-hgcg-n1-ddl.sql
UTF-8
3,483
3.453125
3
[]
no_license
-- -- TABLE: F_HGCG_ARTICULO_2 -- CREATE TABLE F_HGCG_ARTICULO_2( ARTICULO_ID NUMERIC(38, 0) NOT NULL, TITULO VARCHAR2(40) NOT NULL, RESUMEN VARCHAR2(40) NOT NULL, TEXTO VARCHAR2(40) NOT NULL, CONSTRAINT F_HGCG_ARTICULO_ID_2_PK PRIMARY KEY (ARTICULO_ID) )...
true
66bf44b6185e2006609a325234afec8e4a737baf
SQL
harmlamers/Actemium.L3IC.OrderManager
/Actemium.L3IC.OrderManager.Database/UM/Stored Procedures/ViewComputerPropertyValues_GetByComputer.sql
UTF-8
926
3.578125
4
[]
no_license
 -- ============================================= -- Author: <Author,,Name> -- Create date: <Create Date,,> -- Description: <Description,,> -- ============================================= CREATE PROCEDURE [UM].[ViewComputerPropertyValues_GetByComputer] -- Add the parameters for the stored procedure here @Compute...
true
a19ad8e998d30c41a011913ba8e6ff20e19d8613
SQL
YauheniD/GodelDataMasteryPart1
/Tasks/Viachaslau/Task2/query03.sql
UTF-8
1,031
4.03125
4
[]
no_license
SELECT C.CustomerID, CASE WHEN P.FirstName IS NULL THEN NULL WHEN P.MiddleName IS NULL AND P.FirstName IS NOT NULL THEN CONCAT ( P.FirstName, ' ', ...
true
40d53a1dde727d9baf846a64d7765f0f17c09e3c
SQL
matthewrpotter75/FantasyPremierLeagueDB
/FantasyPremierLeagueUserTeam/dbo/Stored Procedures/GetCompetedUserTeamTransferHistoryIds.sql
UTF-8
375
3.65625
4
[]
no_license
CREATE PROCEDURE dbo.GetCompetedUserTeamTransferHistoryIds AS BEGIN SET NOCOUNT ON; SELECT utth.id FROM dbo.UserTeamTransferHistory utth INNER JOIN FantasyPremierLeague.dbo.Gameweeks g ON utth.gameweekId = g.id WHERE g.id = ( SELECT TOP 1 id FROM FantasyPremierLeague.dbo.Gameweeks WHERE deadline_t...
true
32c4b9247c0271275019629969e3ba0a7e194588
SQL
adrenallen/hapr
/setup/db/v1_schema.sql
UTF-8
2,981
3.921875
4
[]
no_license
CREATE TABLE users ( id INT GENERATED ALWAYS AS IDENTITY unique primary key, username VARCHAR NOT NULL unique, password CHAR(60) NOT NULL, email varchar not null unique ); CREATE TABLE user_changelog_seen( id INT GENERATED ALWAYS AS IDENTITY unique primary key, user_id INT REFERENCES u...
true
1abfd6e3ac68291d541db10828ca064ed313dcd4
SQL
greenplum-db/pxf
/automation/tincrepo/main/pxf/features/jdbc/two_secured_hive/sql/query02.sql
UTF-8
378
2.921875
3
[ "Apache-2.0" ]
permissive
-- @description query02 for Multiple JDBC Hive Server queries without partitioning SELECT s1, n1 FROM pxf_jdbc_hive_types_table WHERE tn < 11 ORDER BY n1; SELECT s1, n1 FROM pxf_jdbc_hive_2_types_table WHERE tn < 11 ORDER BY n1; SELECT s1, n1 FROM pxf_jdbc_hive_types_table WHERE tn < 11 UNION ALL SELECT s1, n1 FROM p...
true
87be88dfb781257cb8445e5af8c96f9c27628193
SQL
jrobie8385/sql-scratch-capstone-turn-in
/CapstoneProject/code_JoeRobie.sql
UTF-8
2,745
4.40625
4
[]
no_license
/* 1. Backup SQL Code for Churn Rate by Customer Segment */ WITH months AS ( SELECT '2017-01-01' AS first_day, '2017-01-31' AS last_day UNION SELECT '2017-02-01' AS first_day, '2017-02-28' AS last_day UNION SELECT '2017-03-01' AS first_day, '2017-03-31' AS 'last_day' ), cross_join AS ( SELECT * ...
true
6eb5becfb35e40d11df43c878c5d1148c53deed6
SQL
zjmacm/CippusWebProject
/db_cippus.sql
UTF-8
5,021
3.171875
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : 123 Source Server Version : 50520 Source Host : localhost:3306 Source Database : db_cippus Target Server Type : MYSQL Target Server Version : 50520 File Encoding : 65001 Date: 2015-09-17 07:50:07 */ SET FOREIGN_KEY_CHECKS=0; -- -----...
true
9ff2269356ff3c84ce48b355bc7dc06eb492afc8
SQL
wajahata99/myrepo
/SQLScript/Bridge schmea DWH/Queries/pivoted_1year.sql
UTF-8
27,152
4.125
4
[]
no_license
-- Use case 1 -- Query 1 explain select x.process_segment_name, round(avg(x.availability),2) "availability", round(avg(x.effectiveness),2) "effectivness", round(avg(x.oee),2) "oee" from( SELECT d.date_actual, p.process_segment_name, (CASE WHEN k.id='13' THEN F.value_mean END) "availability", (CASE WHEN k.id='14...
true
385d73fc675c1e8f9595ecd6ec26703342c9cda5
SQL
santoshjoshigithub/sql
/gaps/finding_gaps_in_dates.sql
UTF-8
1,073
4.21875
4
[]
no_license
/* Problem: in a table you have a sequence of dates but few of the dates are missing. how will you identify the missing date range? Reference: T-SQL querying from Itzik Ben-Gan et. al. */ /*data prepration*/ --drop table dateseq create table dateseq (date_seq date) insert into dateseq (date_seq) values (convert(d...
true
9064b28fa5b4166469ffac29b14a41a486d65179
SQL
jayantkodwani/Magento1
/LT_UDW_PRD/Stored Procedures/Procs3/proc_PromptCheckInGroup.sql
UTF-8
555
3.09375
3
[]
no_license
CREATE PROC [reporting].[proc_PromptCheckInGroup] AS BEGIN SET XACT_ABORT ON SET NOCOUNT ON IF 1=0 BEGIN SET FMTONLY OFF END ------ This SP returns 1) check_in_group_description and 2) ref_mms_val_check_in_group_id from v_dim_mms_membership_type. ------ Execution Sample: Exec [reporting].[proc_PromptCheckInGro...
true
e2ada24db56dc1cf4007f9cfd543512a95ad0486
SQL
hellozhuzhuye/nodejsproject
/UserInfoTest.sql
UTF-8
1,740
2.84375
3
[]
no_license
-- -------------------------------------------------------- -- 主机: 127.0.0.1 -- 服务器版本: 5.5.62-log - MySQL Community Server (GPL) -- 服务器OS: Win64 -- HeidiSQL 版本: 10.2.0.5599 -- --------------------------------------------------...
true
b0e2b5e751414c7b4ac910b8d80abeeff8b7f651
SQL
volodymyr-panasenko/ResponsesCollecting
/init.sql
UTF-8
2,591
3.203125
3
[]
no_license
alter table field_options drop constraint FK9nlyse0erepgxl3waya28nbd9 alter table field_options drop constraint FK1xtq52s08h05ucbtshddpv0by alter table field_responses drop constraint FKktmo13kb5kfoilx378sfgdg6s alter table field_responses drop constraint FK71rrpblhav9i962qkl7rgx5br drop table if exists Admin cascade d...
true
5d96b6586007b575ecb904c7052e43e253030902
SQL
paulohuertas/Final-Project-Report
/ExpenseManagementReport/DB/dbo.spEditExpense.sql
UTF-8
507
3.265625
3
[]
no_license
CREATE PROCEDURE spEditExpense @ExpName VARCHAR(100), @ExpTotal DECIMAL(18), @ExpCategory VARCHAR(50), @ReceiptNo INT, @ReceiptDate DATE, @Image VARBINARY(max), @FK_UserId INT, @ActionType VARCHAR(20) AS BEGIN IF @ActionType = 'Edit' BEGIN UPDATE tb_Report SET ExpName = @ExpName, ExpTotal = @ExpTot...
true
2dff81477a98517a795884e6eb29725a1031cada
SQL
silence-do-good/stress-test-Postgres-and-MySQL
/dump/high/day27/select0541.sql
UTF-8
178
2.65625
3
[]
no_license
SELECT timeStamp, temperature FROM ThermometerOBSERVATION o WHERE timestamp>'2017-11-26T05:41:00Z' AND timestamp<'2017-11-27T05:41:00Z' AND temperature>=40 AND temperature<=99
true
50cc48c14f604186f9c3997bf22c76a047e42262
SQL
fredyr01/SitioWebConNodeJs
/ventas.sql
UTF-8
2,141
3.21875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.1.1 -- https://www.phpmyadmin.net/ -- -- Servidor: localhost -- Tiempo de generación: 22-10-2021 a las 21:45:46 -- Versión del servidor: 8.0.21 -- Versión de PHP: 8.0.10 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTE...
true
b168b93bbcc35bc80e9ff286596718e34ae3dde5
SQL
adyach/mrbot
/temp-service/create.cql
UTF-8
359
2.875
3
[]
no_license
CREATE KEYSPACE IF NOT EXISTS temp_service WITH REPLICATION = { 'class' : 'SimpleStrategy', 'replication_factor' : 1 }; CREATE TABLE IF NOT EXISTS temp_service.weather ( timestamp bigint, device_id text, temperature float, humidity float, heat_index float, vcc int, PRIMARY KEY(device_id, timestamp) ) WITH...
true
a97c212baffc6d09e0d6d15c341d3838fcea108d
SQL
sosprz/nettemp
/app/schema/nettemp.sql
UTF-8
6,182
2.703125
3
[ "MIT" ]
permissive
-- MySQL dump 10.17 Distrib 10.3.22-MariaDB, for debian-linux-gnueabihf (armv8l) -- -- Host: localhost Database: nettemp -- ------------------------------------------------------ -- Server version 10.3.22-MariaDB-0+deb10u1 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTE...
true
d623de411f1ef1ba7aec4499c818e4fd09c00226
SQL
SirElric/aulas-back
/crud - teste/db/scrip.sql
UTF-8
830
3.203125
3
[]
no_license
CREATE DATABASE dbcontatos20201a; use dbcontatos20201a; CREATE TABLE tblestados ( idEstado int(11) NOT NULL AUTO_INCREMENT, sigla varchar(2) NOT NULL, nome varchar(100) NOT NULL, PRIMARY KEY (idEstado) ); CREATE TABLE tblcontatos ( idContato int(11) NOT NULL AUTO_INCREMENT, nome varchar(100) NOT NULL, ...
true
ff560615d915b0a41747362aa7dbd85d0a945727
SQL
cool21540125/documentation-notes
/db/mysql/trigger_example_notify/trigger.sql
UTF-8
2,895
3.28125
3
[]
no_license
-- source D:/proj/sql_trigger/tgr.sql USE `notify`; DROP TRIGGER IF EXISTS `notifyq`; -- delete from `notify`; -- delete from `events`; -- Trigger1 - 事件發生後, 增加通知記錄 DELIMITER $$ CREATE TRIGGER `notifyq` AFTER INSERT ON `events` FOR EACH ROW Block1: BEGIN DECLARE v1_gid INT; DECLARE v1_...
true
67cf059718986ad0cf379aded68b1cb93625d63f
SQL
water-lilies/SQL_basics
/sqlday2_1.sql
UTF-8
3,977
4.25
4
[]
no_license
-- 테이블 생성 1 - 새로운 테이블 구조 -- CREATE TABLE 테이블명 (컬럼명 자로형); -- 테이블 생성 2 - 기존 테이블에서 컬럼 추출을 해서 생성 -- 기존 테이블에서 컬럼 추출을 해서 생성 -- 기존 테이블의 데이터도 함께 복사 -- p207 -- CREATE TABLE 테이블명 (SELECT * /컬럼명 FROM 테이블명) USE sqlDB; SELECT * FROM buytb1; CREATE TABLE buytb1_a (SELECT userID, prodName, price FROM buytb1); SELECT * FROM buytb1_a; ...
true
2e8a36d14ac48e79b4d4ae62ca381c6037e35c81
SQL
hailiangchen/testCode
/51vv.sql
UTF-8
5,979
3.09375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.1.4 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: 2017-03-26 12:52:59 -- 服务器版本: 10.1.19-MariaDB -- PHP Version: 5.6.28 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40...
true
6170b7c1920f8d36873bc37fbc35aa99aa6a3922
SQL
geekabhi/uber
/src/main/resources/db/migration/V6__alter_table_fk_cars_city.sql
UTF-8
263
3.09375
3
[]
no_license
ALTER TABLE `cars` ADD COLUMN `city_id` INT NULL AFTER `vin`, ADD INDEX `fk_city_id_idx` (`city_id` ASC); ALTER TABLE `cars` ADD CONSTRAINT `fk_city_id` FOREIGN KEY (`city_id`) REFERENCES `cities` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION;
true
c2763625345acd64d333e286d48eac7bbd1ae6e5
SQL
jrealt/Producto1-DataSafe
/P3/consultas.sql
UTF-8
4,987
4.375
4
[ "MIT" ]
permissive
USE icxp3_7; /* Haz un listado de todos los trabajadores que han sido trasladados a una agencia que no es su lugar de residencia. Añade el año en el que fueron trasladados */ SELECT e.codigo_empleado, e.nombre, e.apellido, e.id_ciudad_res, a.id_ciudad, c.nombre_ciudad, a.nombre_agencia, YEAR(f.fecha) AS año FROM emple...
true
c368e27ab24db4851932c73ba30a391009fe756f
SQL
MiladBhzd/Game-center
/videogames.sql
UTF-8
311
2.765625
3
[]
no_license
DROP TABLE IF EXISTS `videoGame`; CREATE TABLE `videoGame` ( `id` int NOT NULL AUTO_INCREMENT, `name` VARCHAR(255) NOT NULL, `year` YEAR , PRIMARY KEY (`id`) ) ENGINE = InnoDB DEFAULT CHARSET = utf8; INSERT INTO `videoGame` (name, year) VALUES ('Counter-strik 1.6', 2000), ('fifa 2004', 2004), ('Max Payne', 2001);
true
52fccc88d388826817b5c7e75f6b999ac17b879b
SQL
SmartCityGraph/OWL2ERD
/src/result-tables-example.sql
UTF-8
1,184
2.859375
3
[]
no_license
CREATE TABLE road ( idroad INT , label TINYTEXT , category TINYTEXT , CL_BandwidthMax INT , CL_BandwidthMin INT , CL_LinesAmountMax INT , CL_LinesAmountMin INT , CL_MinimalIllumination INT , CL_StandartTravelSpeedMax INT , CL_StandartTravelSpeedMin INT , CL_ProvidedWithIllumination BOOL , CL_Geometry_CL_Coordinates TEX...
true
90e68e393d7c3fb7e3d8b5d9e76ac43e00cb7979
SQL
GrupoETICUndec/boca_elgg
/elggadd.sql
UTF-8
2,774
2.90625
3
[]
no_license
-- MySQL dump 10.13 Distrib 5.7.19, for Linux (i686) -- -- Host: localhost Database: elggadd -- ------------------------------------------------------ -- Server version 5.7.19-0ubuntu0.16.04.1!! /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SE...
true
06a1e0dca03e42d1258e898caea7f239b85d072b
SQL
roberts-ivanovs/itf-ctf-2021
/db/schema.sql
UTF-8
7,163
3.34375
3
[]
no_license
DROP DATABASE actix_todo; CREATE DATABASE actix_todo; ALTER DATABASE actix_todo CHARACTER SET utf8; USE actix_todo; -- BASIC SCHEMA CREATE TABLE nouns ( `id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, `name` VARCHAR(256) NOT NULL UNIQUE ); CREATE TABLE adjactives ( `id` BIGINT UNSIGNED NOT NULL A...
true
dd7fbbd6beb7b8c7b0c4d2e67ee268585fee3de8
SQL
LukaszDusza/bookstore-backend
/src/main/resources/userTableCreation.sql
UTF-8
456
3.8125
4
[]
no_license
create table users ( id int not null auto_increment primary key, username varchar(60) not null, password varchar(60) not null, enabled int not null default 1 ); create table authorities ( id int not null auto_increment primary key, user_id int(60) not null, authority varchar(60) not null, constraint ...
true
d807d28c57af45c6c881608e035825fca7c7e483
SQL
arisolucion/civ6_mod_argentina
/civ6modargentinafixed/sql/SanMartin/Trait_SanMartin.sql
UTF-8
3,098
2.828125
3
[]
no_license
--========================================================================================================================== -- TRAITS --========================================================================================================================== -- LeaderTraits ------------------------------------- ...
true
8798f9b5c4cdaaea0d97be64137fc6d073acf04d
SQL
VeronicaTee/senatorsNg
/search.sql
UTF-8
6,099
2.625
3
[]
no_license
-- -- Database: `search` -- CREATE DATABASE IF NOT EXISTS `search` DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; USE `search`; -- -------------------------------------------------------- -- -- Table structure for table `senators` -- CREATE TABLE `senators` ( `id` bigint(20) UNSIGNED NOT NULL, `state` varch...
true
2df973ea1e33eff1fa1a898681db5ad2054f4276
SQL
P79N6A/hd
/cms/database/20160517-app_popup.sql
UTF-8
1,544
3.046875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.1.14 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: 2016-05-17 11:43:15 -- 服务器版本: 5.6.17 -- PHP Version: 5.5.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET ...
true
9937a80c0b6e0eb97be4a85a461daa207017ee48
SQL
angles-n-daemons/scrutinize
/db/20201022191322_create_metric.sql
UTF-8
336
2.53125
3
[ "MIT" ]
permissive
-- +goose Up -- +goose StatementBegin CREATE TABLE Metric( id SERIAL PRIMARY KEY, name VARCHAR(256) UNIQUE NOT NULL, type VARCHAR(256), created_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP ); -- +goose StatementEnd -- +goose Down -- +goose StatementBegin DROP TABLE Metric; -- +goo...
true
63fc08497056f08b4df4cb14bc7c6d57f9749ebf
SQL
brooh2121/MySQlScripts
/скрипты Oracle/остатки скриптов/ДисмасГеддон.sql
UTF-8
3,153
3.1875
3
[]
no_license
SELECT * FROM rsa2.SUBJECT_OSAGO so JOIN rsa2.kbm_plus kp ON SO.SUBJ_OSAGO_REC_ID = KP.SUBJ_OSAGO_REC_ID JOIN rsa2.SUBJ_DOC sd ON SO.SUBJ_OSAGO_DOC_REC_ID = SD.DOC_REC_ID WHERE so.SUBJ_HASH = '502E50701BEE6647CDA58288E1D358E5005BE97151E430B56024109802EA09DB' AND SD.DOC_REC_ID = '35640531' ORDER BY kbm_plus_beg_date; ...
true
d648a57ff1b6b66bf31e2acd47f6a03c39619f18
SQL
purplemass/projectlist_ben
/localhost.sql
UTF-8
9,107
2.984375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 2.11.7.1 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: May 05, 2009 at 04:51 PM -- Server version: 5.0.41 -- PHP Version: 5.2.6 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTE...
true
999dcca97e432173585b220088300f5cd5cf2092
SQL
wangxiaohui2015/showpic
/src/main/webapp/db/createdb.sql
UTF-8
2,054
2.828125
3
[]
no_license
BEGIN TRANSACTION; CREATE TABLE "mycategory" ( `id` INTEGER PRIMARY KEY AUTOINCREMENT UNIQUE, `name` TEXT NOT NULL, `star` TEXT, `items` TEXT, `account` INTEGER, `memo` TEXT, `create_time` INTEGER ); INSERT INTO `mycategory` VALUES (1,'测试标题','2','3rd/unitegallery/images/big/image2.jpg',10,'',1496822059472); INSE...
true
23f88dc0eb20dc85f31a555d9240e9c1a6ca954f
SQL
devuthopian/card
/database/db_changes.sql
UTF-8
2,220
3.21875
3
[ "MIT" ]
permissive
-- 27 Feb 2018 ALTER TABLE `users` ADD `invite_code` VARCHAR(50) NOT NULL AFTER `password`, ADD `reference_user_id` INT NOT NULL AFTER `invite_code`; ALTER TABLE `users` CHANGE `invite_code` `invite_code` VARCHAR(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL, CHANGE `reference_user_id` `referen...
true
1090fbd1fc4e531842ff9dc614827570d372592f
SQL
LittleGeorgeWatchingStar/Rialto2020
/data_migrations/completed/mantis2598.sql
UTF-8
653
3.03125
3
[]
no_license
alter table StockMaster modify column RoHS varchar(20) not null default ''; drop table if exists SupplierAttribute; CREATE TABLE SupplierAttribute ( supplierID BIGINT unsigned NOT NULL, attribute VARCHAR(50) NOT NULL, value VARCHAR(255) NOT NULL, INDEX supplierID (supplierID), PRIMARY KEY(attribute...
true
2acdc767f7a28795ebe774b1ae4548f0806b2b20
SQL
Squire-J/Showcase
/SQL/queries/Q6.sql
UTF-8
666
4.21875
4
[]
no_license
-- Which Campaigns are understaffed? (Assuming understaffed implies participants < Events x3 within the campaign) SELECT Campaign, COUNT(Staff) AS CurrentStaff, SUM(3 * EventCounts.EventCounter) AS RequiredStaff FROM (SELECT Campaign, COUNT(DISTINCT Participant) AS Staff FROM TakesPartIn GROUP BY Campaign) AS Work...
true
500db469a3238712c493a59727ee90273fb1c698
SQL
flake79936/JETDEVLLC
/DB.sql
UTF-8
2,142
3.15625
3
[]
no_license
CREATE DATABASE EventAdvisor; CREATE TABLE Registration( id INTEGER AUTO_INCREMENT, UFname CHAR(255) NOT NULL, ULname CHAR(255) NOT NULL, UPswd CHAR(255) NOT NULL, Uemail CHAR(255) NOT NULL, Uphone CHAR(15) DEFAULT 'N/A', Uadmin CHAR(1) DEFAULT 0, UuserName CHAR(255) NOT NULL, PRIMARY KEY(id, Uuser...
true
c4e0d273c391a550de3ffa233154ffcc4954a758
SQL
AlissonDill/test-pulse-1308
/documentacao/criar_banco_de_dados_sql/tabelas_negocio.sql
UTF-8
15,293
3.15625
3
[]
no_license
use negocio; SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET GLOBAL time_zone = '+3:00'; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTI...
true
0c519cef1ced6574d394f2779c39990e51c4927b
SQL
ejjang0813/mysource
/myjsp/src/main/webapp/socksTest.sql
UTF-8
2,383
3.5
4
[]
no_license
drop table user cascade constraint; create table user ( user_id varchar2(10) primary key, name varchar2(30) not null, password varchar2(30) not null, address varchar2(60) not null, email varchar2(30) unique, point varchar2(5) ); insert into user values("id-1","이지수","1234","서울","1@n.com",100); ins...
true
b13455373d49087e569dc83a731fab538600a298
SQL
franciswagner/stock
/sql_apuracao.sql
UTF-8
3,826
3.96875
4
[]
no_license
with base_trades as ( select date, titulo, sum(case when compra*1 > 0 then qtd else 0 end) as qtd_compra, sum(case when venda*1 > 0 then qtd else 0 end) as qtd_venda, sum(case when compra*1 > 0 then compra*1*qtd else 0 end) as compra, sum(case when venda*1 > 0 then venda*1*qtd else 0 end...
true
1076181fd54da17012048ab375b0516024865abf
SQL
kalintsenkov/SoftUni-Software-Engineering
/CSharp-DB/Databases-Basics/Homeworks/03Built-InFunctions/03FindFirstNamesOfAllEmployess.sql
UTF-8
140
3.171875
3
[ "MIT" ]
permissive
SELECT FirstName FROM Employees WHERE DepartmentID IN (3, 10) AND HireDate BETWEEN CAST('1995' AS DATE) AND CAST('2006' AS DATE)
true
e213b59f536bba7431395ac33b2c20135a1adfa8
SQL
SolarArbiter/solarforecastarbiter-api
/datastore/migrations/0007_list_statements.up.sql
UTF-8
3,442
3.8125
4
[ "MIT" ]
permissive
CREATE VIEW user_objects AS SELECT users.auth0_id as auth0_id, pom.object_id as object_id, permissions.object_type as object_type FROM permission_object_mapping as pom, users, permissions WHERE pom.permission_id IN ( SELECT permission_id FROM role_permission_mapping WHERE role_id IN ( SELECT role_id FROM us...
true
7af38da02f80347b6e95b52dd8718f8427dd68a7
SQL
notdevi/fp-viafdy-shop
/fp_viafdy_shop.sql
UTF-8
7,439
2.921875
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Waktu pembuatan: 03 Jul 2021 pada 06.56 -- Versi server: 10.4.14-MariaDB -- Versi PHP: 7.4.10 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@C...
true
7d475db710c4390f0713a8be63224c1540d0a548
SQL
fishedee/Demo
/jpa/batch/data.sql
UTF-8
580
3.265625
3
[]
no_license
drop database if exists Test; create database Test; use Test; create table hibernate_sequence ( next_val bigint ) engine=MyISAM; insert into hibernate_sequence(next_val) values(20001); create table car( id integer not null, name varchar(255) not null, create_time timestamp not null, modify_time timestamp no...
true
f23030eba6a2fd68592bac5f2a3e8f98e6aec67a
SQL
RahulLanjewar93/rendigitizing
/DB backup/DB Backup 03-06-2020.sql
UTF-8
23,248
2.9375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.9.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jun 03, 2020 at 05:44 PM -- Server version: 10.4.10-MariaDB -- PHP Version: 7.3.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OL...
true
4ec94e3588cd51539fece14d77020dbfe3f38b3b
SQL
sudhirkulaye/TWealthbookV2017
/src/main/resources/DBScripts/CreateTables.sql
UTF-8
29,236
3.59375
4
[]
no_license
SET SQL_SAFE_UPDATES = 0; Commit; SELECT table_name, table_rows, TABLE_COMMENT FROM information_schema.tables WHERE TABLE_SCHEMA = 'twealthbookdev' ORDER BY table_comment; SELECT a.TABLE_NAME, a.COLUMN_NAME, a.COLUMN_TYPE, a.COLUMN_COMMENT FROM INFORMATION_SCHEMA.COLUMNS a WHERE TABLE_SCHEMA='twealthbookdev' and a.t...
true
2e9d11f7d805191ddc1ec0ab58a96b864d987e12
SQL
JEET-123/Microsoft-SQL-Server-Trainings-Projects
/PART-4/2NF Investigation and Modification SQLQuery1.sql
UTF-8
790
3.484375
3
[]
no_license
SELECT * FROM Transactions -- Separate Customer Specific Columns SELECT [customerid], [firstname], [surname], [shipping_state], [loyalty_discount] INTO TMP FROM Transactions SELECT * FROM TMP -- 3455 rows but originally 942 rows are there -- REMOVE DUPLICATES SELECT...
true
3ef3345773692b4efa593f324f3f4f75309f028d
SQL
jerome13250/RanToolBox_SQL
/Workorder_ADJS_ADJI_generic_delete.sql
UTF-8
1,057
3.21875
3
[]
no_license
--Aggregation des parametres : DROP TABLE IF EXISTS t_xml_allObjects_nokia; CREATE TABLE t_xml_allObjects_nokia AS SELECT xmlconcat( xmlcomment("NOMs" || ' - ' || "NOMv"), --sert a garder l'info cellule dans le xml pour le lire plus facilement xmlelement( --exemple de format: <managedObject class="WBTS" version...
true
d67e9cb996f46a9bf9906c82c6483c3ea42c0906
SQL
karishmakhan12/GITdEMO
/25ques.sql
UTF-8
2,520
4.09375
4
[]
no_license
SELECT w.worker_id id FROM worker w; SELECT first_name AS worker_name FROM worker; SELECT UPPER(first_name) FROM worker; SELECT DISTINCT department FROM worker; SELECT SUBSTRING(first_name ,1,3) FROM worker; SELECT INSTR(first_name,BINARY'a') FROM worker WHERE first_name='amitabh'; SELECT RTRIM(first_name) FROM worker...
true
3a30fe8e4378bf4dff188cbc9d6051b2ab2e75fe
SQL
aventius-software/DataWarehouse
/DataWarehouse.Database/Chronological/Functions/Chronological.FiscalQuarter.sql
UTF-8
150
2.53125
3
[]
no_license
 CREATE FUNCTION [Chronological].[FiscalQuarter] ( @date DATE ) RETURNS TINYINT AS BEGIN RETURN DATEPART(QUARTER, DATEADD(MONTH, -3, @date)) END
true
ec009e524cedf6e1d8316c05314a380173533e15
SQL
EdenKhaos/12-mysql-employee-tracker
/sql/seed.sql
UTF-8
1,437
3.046875
3
[ "MIT" ]
permissive
USE employeesDB; INSERT INTO department (name) VALUES ("Sales"); INSERT INTO department (name) VALUES ("Engineering"); INSERT INTO department (name) VALUES ("Finance"); INSERT INTO department (name) VALUES ("Legal"); INSERT INTO role (title, salary, department_id) VALUES ("Sales Lead", 100000, 1); INSERT INTO role (t...
true
307782b262cd58a7c2be9c288b1096bd078aa182
SQL
ReneNyffenegger/PL-SQL-Parser
/tables/logical_factor_list.sql
UTF-8
500
3.078125
3
[]
no_license
create table nd_logical_factor_list ( -- -- A logical factor list connects factors with "AND"s -- TODO_0055: AND has the higher precedence than OR: -- select count(*) from dual where (1=1 and 2=2) or (3=2 and 2=1) -- vs -- select count(*) from dual where 1=1 and (2=2 or 3=2) and 2=1 -- vs -- sele...
true
b3b0048aef090a0376af84346897ef173a863aab
SQL
tsmithsoftware/dynamic_forms
/docs/docker/db/init.sql
UTF-8
14,566
3.921875
4
[]
no_license
-- creating tables CREATE TABLE countries( countryId SERIAL PRIMARY KEY NOT NULL, countryName VARCHAR(255) NOT NULL ); INSERT INTO countries (countryName) VALUES ('UK'), ('Australia'); -- used for if company not already listed CREATE TABLE whenLoaded ( whenLoadedId SERIAL PRIMARY KEY NOT NULL, whenLoadedValue VAR...
true
3697c205510927ed3566cfb0e1fabf9e17649d03
SQL
MApps-Actuate/UnstructuredDataUtility
/unstructured schema Aug 2017.sql
UTF-8
11,285
3.21875
3
[]
no_license
-- MySQL Script generated by MySQL Workbench -- 08/08/17 09:32:46 -- 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='TRADITION...
true
b6e6fc06cc4be3e18c5eda7410995ca7d1bd57fb
SQL
EchoLiao/nalstudy
/sql/oracle/syjc/sql/04select-view-format/4_23-s_exists.sql
GB18030
288
3.234375
3
[]
no_license
/* ѡȫγ̵ͬѧ */ /* MMMMM */ /* : ûһŹβѡ޵ѧ */ select xm from xs where not exists (select * from kc where not exists (select * from xs_kc where xh=xs.xh and kch=kc.kch ) );
true
5e8fcaa06498de170d19122ec2eb5d6a2bd65c52
SQL
poonasp257/Homepage-PHP
/server/database.sql
UTF-8
10,720
3.484375
3
[]
no_license
drop database if exists project_db; create database project_db; grant all on project_db.* to 'test1'@'localhost'; flush privileges; use project_db; CREATE TABLE Account ( account_id BIGINT NOT NULL AUTO_INCREMENT, account_type INT DEFAULT 1, nickname VARCHAR(40) NOT NULL UNIQUE, userid VARCHAR...
true
23453a378987ca094dbe1ecbe5a9a0d0061825f3
SQL
iwodder/PosiPoint
/src/main/resources/sqlscripts/create.sql
UTF-8
312
3.203125
3
[]
no_license
CREATE TABLE ROLES ( ID INT PRIMARY KEY AUTO_INCREMENT, NAME VARCHAR(255)); CREATE TABLE USERS ( ID INT PRIMARY KEY AUTO_INCREMENT, FIRST_NAME VARCHAR(50), LAST_NAME VARCHAR(50), USER_NAME VARCHAR(51), PASSWORD VARCHAR(255), ACTIVE SMALLINT,ROLE_ID INT, FOREIGN KEY(ROLE_ID) REFERENCES ROLES(ID));
true