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
b176e9af9a8f488a7cc4d6c684457a5f129e9726
SQL
DanielHowe/DanielHowe
/codeExamples/DatabaseManagement/SQL/4-Views.sql
UTF-8
406
3.109375
3
[]
no_license
/* Daniel Howe Jason Tse CST 363 Final Project - Views */ USE howe_tse_final; /* displays list of artwork to artist and area for guide. */ CREATE VIEW artworkguide AS SELECT CONCAT(first_name,' ', last_name) AS artistName, description, title, room FROM artworks JOIN departments USING (id_dep...
true
983a18f688c4208c159f77c759713da329474c42
SQL
Shawn-Morgan/EmployeeTracker
/db/seed.sql
UTF-8
524
3.28125
3
[]
no_license
USE EmployeeTrackerDB; INSERT INTO department (name) VALUES ("Finance"), ("HR"), ("Engineering"), ("IT"); INSERT INTO role (title, salary, department_id) VALUES ("Intern", 75000, 10), ("Associate", 100000, 20), ("Junior", 125000, 30), ("Expert", 150000, 40), ("Strategist", 175000, 5...
true
c0056ee6fab6fd381a4077cfd5503f31c0cc63df
SQL
pje00427/Oracle_class
/01_DML(SELECT)_KH계정.sql
UHC
15,172
4.0625
4
[]
no_license
/* < SELECT > ȸ Ǵ >> RESULT SET : SELECT ȸ (, ȸ ǹ) >> ǥ << SELECT ȸϰϴ ÷, ÷, ÷,... FROM ̺; ȸϰ ϴ ÷ ݵ FROM ̺ ϴ ÷ */ -- EMPLOYEE ̺ ü ÷ ȸ SELECT * FROM EMPLOYEE; -- EMPLOYEE ̺ ü , ̸, ޿ ȸ -- SELECT ȸϰ ϴ ÷ SELECT EMP_ID, EMP_NAME, SALARY FROM EMPLOYEE; -----...
true
9e4a4093bfcff899d8642f0193ced0296fe6c429
SQL
eugenefe/Hibernate
/hibernate/src/main/resources/portfolio.sql
UHC
1,373
4.0625
4
[]
no_license
/* Drop Tables */ DROP TABLE PORTFOLIO_DETAIL; DROP TABLE PORTFOLIO; DROP TABLE POSITION_DETAIL; DROP TABLE POSITION; /* Create Tables */ CREATE TABLE PORTFOLIO ( ID VARCHAR2(50) NOT NULL, NAME VARCHAR2(50), PARENT_PORT_ID VARCHAR2(50) NOT NULL, PRIMARY KEY (ID) ); CREATE TABLE PORTFOLIO_DETAIL ( -- BS...
true
d10ee5c19d82275a6e68e7f075285d104da793f4
SQL
molokovskikh/af_admininterface
/migrations/595_00_delete_incorrect_permissions.sql
UTF-8
424
2.578125
3
[]
no_license
delete ap from Usersettings.AssignedPermissions ap join Usersettings.UserPermissions p on p.Id = ap.PermissionId join Customers.Users u on u.Id = ap.UserId where u.ClientId is not null and p.AvailableFor = 2; delete ap from Usersettings.AssignedPermissions ap join Usersettings.UserPermissions p on p.Id = ap.Perm...
true
3f1323ca374539aa39b6f67d51eeb2f0c398eb7f
SQL
jungsunghun476/dbSql
/2020416.sql
UHC
4,256
4
4
[]
no_license
SELECT * -- ÷ ȸ FROM prod; --͸ ȸ ̺ --Ư ÷ ؼ ȸ : SELCT ÷1, ÷2.... --PROD_id, prod_name÷ prod ̺ ȸ; SELECT prod_id, prod_name FROM prod; ǽ1; --lprod ̺ ͸ ȸϴ ۼϼ SELECT * FROM lprod; --buyer ̺ buyer_id, buyer_name ÷ ȸϴ ۼϼ SELECT buyer_id, buyer_name FROM buyer; --cart ̺ ͸ ȸϴ ۼϼ SELECT * FROM cart; --member ̺ mem_...
true
91b2de8448730e4e1e472c01310c0b7fd2ee6896
SQL
CUBRID/cubrid-testcases
/sql/_18_index_enhancement_qa/_02_full_test/_06_optimizing_limit/cases/_03_composite_index.sql
UTF-8
998
3.1875
3
[ "BSD-3-Clause" ]
permissive
--+ holdcas on; set system parameters 'dont_reuse_heap_file=yes'; create table t (i1 int, i2 int, i3 varchar(10)); insert into t values (null, null, null); insert into t values (0, 0, '00'), (0, 1, '01'), (0, 2, '02'), (0, 3, '03'), (0, 4, '04'); insert into t values (1, 0, '10'), (1, 1, '11'), (1, 2, '12'), (1, 3, '13...
true
06db3261afb2c667b6f30c2f2572bf8a58cea91e
SQL
Marcustap/ProjetoEngenhariadeDados
/etapa2/Views.sql
MacCentralEurope
1,776
3.875
4
[]
no_license
-- Quais e quantos veculos foram locados por ms? CREATE VIEW qtd_veic_mes AS SELECT v.modelo AS Modelo, date_part('month', l.datalocacao) AS Mes, date_part('year', datalocacao) AS Ano, COUNT(l.*) AS Total FROM Relacional.veiculos v JOIN Relacional.locacao l ON (l.idveiculo = v.idveiculo) GROUP BY v.modelo, date...
true
42bdc0c5eb4e0a890128907407806cdd22a6f7e6
SQL
IceHeartRes/servlettest
/src/test/resources/create.sql
UTF-8
448
3.046875
3
[]
no_license
DROP TABLE IF EXISTS parts; CREATE TABLE parts ( id SERIAL, part_number TEXT, part_name TEXT, vendor TEXT, qty INTEGER, shipped DATE, receive DATE, CONSTRAINT parts_pkey PRIMARY KEY (id) ); INSERT INTO parts (part_number, part_name, vendor, qty, shipped, receive) VALUES...
true
14dcd930e0d545f19ddd1e558c472427720854af
SQL
kamokaizen/Templates
/expressapp/etc/create_test.sql
UTF-8
2,327
2.953125
3
[]
no_license
CREATE DATABASE IF NOT EXISTS `express_test_db` /*!40100 DEFAULT CHARACTER SET utf8 */; USE `express_test_db`; -- MySQL dump 10.13 Distrib 5.7.9, for osx10.9 (x86_64) -- -- Host: localhost Database: example_db -- ------------------------------------------------------ -- Server version 5.5.5-10.1.9-MariaDB /*!4010...
true
5f99601acb26adda05d61928e6f3552d31533f79
SQL
swetharnaik/graphQL-store
/src/main/resources/data.sql
UTF-8
1,374
3.3125
3
[]
no_license
DROP TABLE IF EXISTS store; CREATE TABLE store ( id INT AUTO_INCREMENT PRIMARY KEY, store_name VARCHAR(250) NOT NULL, store_code INT NOT NULL, store_type VARCHAR NOT NULL, pincode INT NOT NULL, address VARCHAR(500) DEFAULT NULL, phone_no INT NOT NULL ); INSERT INTO store (store_name, store_code, store_t...
true
d5db02901da5914fe9c10be903805863dca5ecf2
SQL
warren80/logMonitor
/dbSetup.sql
UTF-8
701
3.046875
3
[]
no_license
drop database if exists eventLogger; create database eventLogger; grant all on eventLogger.* to 'root'@'localhost'; use eventLogger; drop table if exists failedattempts; create table failedattempts ( id int NOT NULL AUTO_INCREMENT, ip varchar(15) NOT NULL, us...
true
5cbcdb878a71982731f6f769a6d932f34ce5248d
SQL
laxman-ka/Bigboss
/bigboss.sql
UTF-8
4,338
3
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.0 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jun 12, 2018 at 05:59 PM -- Server version: 10.1.31-MariaDB -- PHP Version: 7.1.16 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OL...
true
f97506842be4b6348395726472e7b15d2d9d8ef3
SQL
HishamAssi/ElectionInsight
/table_definitions/p2F.sql
UTF-8
1,262
4.375
4
[]
no_license
SET SEARCH_PATH TO parlgov; DROP VIEW IF EXISTS all_results CASCADE; CREATE VIEW all_results AS (SELECT cabinet.id as cabinet_id, election as election_id FROM (SELECT e2.id as election, e1.id as next, e2.e_date as s_date, e1.e_date as end_date, e1.country_id as c_id, e1.e_type as e_type FROM election e1 JOIN el...
true
663adf8e4eadb5f916f629930393f62259c28530
SQL
McPepe26/Punto-de-venta-java
/database.sql
UTF-8
929
3.328125
3
[]
no_license
CREATE DATABASE DBSales; USE DBSales; CREATE TABLE Productos( Clave INT NOT NULL PRIMARY KEY, Descripcion VARCHAR(100), Precio DECIMAL(8,2), Cantidad INT ); CREATE TABLE Usuarios( Clave INT NOT NULL IDENTITY(1,1) PRIMARY KEY, Usuario VARCHAR(20), ClaveUser VARCHAR(20), Rol INT, Salario DECIMAL(8,2), Comisio...
true
7906eeff0f2fa15774fd4f683f17e189eec6d98a
SQL
0lezhka/logos
/Anastasiia_Kudryk/homework1/homework1.sql
UTF-8
825
3.203125
3
[]
no_license
create database library; use library; create table library.book( title varchar(120) not null, description varchar(10000) default "No description", publication_date date not null default "2018-01-01", author varchar(60) not null, category varchar(30) not null ); insert into book values ("title1", "description1", "2011-0...
true
d7ca024c398d74a370326c8b55670a00066a3c3e
SQL
Jagannath-Ramesh/Advanced-Database-Project
/IS 620 Project Code/Features/Feature2.sql
UTF-8
1,184
3.5
4
[]
no_license
/* Sample execute statement for feature 2*/ exec validate_user_identity ('John1@xmail.com','7bk3jb9'); create or replace procedure validate_user_identity ( p_email_id in varchar, p_password in varchar ) as validate_user_result varchar2(1); v_type_result varchar2(1); r_act_flag varchar2(1); begin valid...
true
8b1f8fa7e225e2d0356b452094b9da6e94b9fa94
SQL
mhaculetz23/GTdb
/setup.sql
UTF-8
1,588
3.1875
3
[]
no_license
set echo on connect system/kikumaru --Create PHP Application User --For regular user drop user GT cascade; create user GT identified by qwerty; grant connect, resource to GT; alter user GT default tablespace users temporary tablespace temp account unlock; --Create user owner security...
true
4a24b67c2b0732323c69970694537d422cde0ce5
SQL
jg665/PC-to-Notebook
/src/main/java/javaexp_svn/src/main/java/database/a04_function.sql
UTF-8
6,337
4.59375
5
[]
no_license
/* # database에서 함수(function) 1. sql에서 함수(주로 내장함수) 1) 컬럼의 값이나 데이터 타입이 변경하는 경우 2) 숫자 또는 날짜 데이터의 출력 형식이 변경하는 경우 3) 하나 이상의 행에 대한 집계(aggregation)를 하는 경우 2. sql 함수의 유형 1) 단일 행 함수 : 테이블에 저장되어 있는 개별 행을 대상으로 하는 함수를 적용하여 하나의 결과를 반환하는 함수 ex) 소문자로 변환 처리 2) 복수 행 함수 : 조건에 따라 여러 행을 그룹화하여 그룹별로 결과를 하나씩 반환하는 함수 여러...
true
d486938750b2ba63e3941676f939fd6f64271838
SQL
sirisak-amivoice/aohs_old
/db/view/auto_assessment_criteria.view.sql
UTF-8
406
3.46875
3
[]
no_license
DROP VIEW IF EXISTS auto_assessment_criteria; -- CREATE VIEW auto_assessment_criteria AS SELECT p.id AS evaluation_plan_id, p.revision_no, c.evaluation_question_id, c.question_group_id, c.name FROM evaluation_plans p JOIN evaluation_criteria c ON p.id = c.evaluation_plan_id AND p.revision_no = c.revision_no WHERE...
true
c1d044203ab353d9fd7981c84ea6501a17bec37b
SQL
poedevop-fm/oracle
/scripts/tbs.sql
UTF-8
4,904
3.75
4
[]
no_license
SET PAGESIZE 100 SET LINESIZE 265 SET TRIMOUT ON TRIMS ON PAGESIZE 999 COLUMN tablespace_name FORMAT A20 COLUMN file_name FORMAT A50 DECLARE v_tbs number; BEGIN select count(*) into v_tbs from dba_tables where table_name ='TBS_HISTORY'; if v_tbs >0 then EXECUTE IMMEDIATE 'DELETE FROM SYS.TBS_HISTORY WHERE TRUNC(SNA...
true
1abf8c95cd69e08664f6845162ec33611991714d
SQL
Guarin0821/Telefonia
/flaskcontacts.sql
UTF-8
4,112
3.21875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.7.4 -- https://www.phpmyadmin.net/ -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 30-09-2019 a las 11:28:47 -- Versión del servidor: 10.1.30-MariaDB -- Versión de PHP: 7.2.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; ...
true
5f50efb545eb0219004bdfac7960008c1a960726
SQL
Adam-Ross/SQL_query_practice
/sum.sql
UTF-8
644
3.875
4
[]
no_license
#What customer has paid us the most money. -- SELECT -- p.customer_id, SUM(p.amount) -- FROM -- payment p -- GROUP BY -- 1 -- ORDER BY -- 2 desc -- ; # BRAINBUSTER What store has brought in the most revenue. SELECT i.store_id as "Store ID", sum(p.amount) as Revenue FROM inventory i, payment p, rental r W...
true
d6882b7f2089c912470b373891136ce53b9fc56b
SQL
tiagoviniciuslopes/trabBD4
/documentacao/createDatabase.sql
UTF-8
8,397
3.25
3
[]
no_license
-- MySQL Script generated by MySQL Workbench -- Fri Nov 30 22:27:22 2018 -- 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
6ccd58ce5a08835a4175d857b934a8356cd29a9d
SQL
juch4501/SABRFinalProject
/RCPPSDB.sql
UTF-8
6,075
3.6875
4
[]
no_license
use lahman2016; show tables; #create table with batting and fielding join drop table if exists substats; create table substats as select b.playerID, b.yearID, b.teamID, b.lgID, b.G, b.AB, b.R, b.H, b.2B, b.3B, b.HR, b.RBI, b.SB, b.CS, b.BB, b.SO, b.IBB, b.HBP, b.SH, b.SF, b.GIDP, b.BA, b.PA, b.OBP, b.SLG, b.TB, b.bbr...
true
1b919e5d82adfabd742201b798b52e180961222b
SQL
TylerSanford/CodePractice
/Java-627-Swap_Salary.sql
UTF-8
466
3.625
4
[]
no_license
-- Given a table salary, such as the one below, that has m=male -- and f=female values. Swap all f and m values (i.e., change -- all f values to m and vice versa) with a single update statement -- and no intermediate temp table. -- Note that you must write a single update statement, DO NOT write -- any select stat...
true
3a165f36ae0de08235e580800f36d03c1032ee22
SQL
Gudang-Source/pilketos-smaniwa
/e_vote-initial-setup.sql
UTF-8
2,130
3.359375
3
[]
no_license
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; --------------------------------------------------------- CREATE TABLE `t_admin` ( `id_admin` tinyint(1) NOT NULL, `username` varchar(35) NOT NULL, `fullname` varchar(50) NOT NULL, `password` varchar(255) NOT NULL ) ENGINE=InnoDB DEFAULT CHARS...
true
24c19af1c13ccfd3c8cfcadb36174104567a1ec5
SQL
sonyfe25cp/TDG
/doc/helpservice.sql
UTF-8
3,560
2.53125
3
[]
no_license
-- MySQL dump 10.13 Distrib 5.5.31, for debian-linux-gnu (x86_64) -- -- Host: localhost Database: tdg -- ------------------------------------------------------ -- Server version 5.5.31-0ubuntu0.12.04.2 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARA...
true
b9ec12735ca39c3bf5e08300da770ea15e96f644
SQL
mitshel/TakedaAnalitic
/DOC/Скрипты sql для отчетов/market_part.sql
KOI8-R
1,744
4.25
4
[]
no_license
select CASE WHEN nn.market_id is NULL THEN '' ELSE mt.name END as name, nn.* from ( select market_id, grouping(market_id) as gr, sum([2015-1]) as [2015-1], isnull(sum([2015-2]),0) as [2015-2], IIF(sum([2015-1]) is null,'-',cast(isnull(cast(sum([2015-2])/sum([2015-1])*100 as int),0) as varchar)+'%') as [2015-3], su...
true
236e3d8eee07a2a64eb8d54d5707c6cc15ebc00e
SQL
sebassilva/proyectoBases
/s-13-p-crear-articulo.sql
UTF-8
1,152
3.03125
3
[]
no_license
-- @Autores: López Santibáñez Jiménez, Luis Gerardo -- Silva García, Carlos Sebastián -- Fecha de creación: 10/06/2018 -- Descripción: Prueba el procedimiento de articulo_autor CREATE OR REPLACE PROCEDURE CREAR_ARTICULO( V_ARTICULO_ID IN ARTICULO.ARTICULO_ID%TYPE, V_TITULO IN ARTICULO.TITULO%TYPE, ...
true
26259198e0cfb64fb6c9189636c48a4d046936fa
SQL
rahbr/hierarchical-tree
/vendor/scripts/nested/nestedAggregateFunctions.sql
UTF-8
1,091
3.25
3
[]
no_license
CREATE TABLE product ( product_id INT AUTO_INCREMENT PRIMARY KEY, name VARCHAR(40), category_id INT NOT NULL ); INSERT INTO product(name, category_id) VALUES('20" TV',3),('36" TV',3), ('Super-LCD 42"',4),('Ultra-Plasma 62"',5),('Value Plasma 38"',5), ('Power-MP3 5gb',7),('Super-Player 1gb',8),(...
true
abcee39c740302a085d821b1233c209dbde0d8be
SQL
erinaldo/diprolim
/Scripts/Procedimientos/sp_historicoMovimientos.sql
UTF-8
848
2.875
3
[]
no_license
CREATE PROCEDURE `sp_historicoMovimientos` (iCodigoArticulo INT, dCantidad Double, sMovimiento VARCHAR(45), dExistenciaInicial DOUBLE, dExistenciaFinal DOUBLE, iEmpleadoID INT, iUsuarioID INT, bVendedorSucursal BOOLEAN) BEGIN IF bVendedorSucursal = TRUE THEN INSERT INTO historicodmovimientos( articulos_codigo...
true
12ed53c4dea641c589062b981b93b1f239e5d1b6
SQL
Jarmijo99/LBD
/Views/Tarea7sql.sql
UTF-8
399
3.015625
3
[]
no_license
create view VerInventario select IdProveedor, Modelo from Inventario; create view NombreRegEntrada select Nombre, RegistroEntrada.Fecha from Empleado left join RegistroEntrada on Empleado.Usuario = RegistroEntrada.Usuario; create view ClienteDeudor select Debe, Cliente.idCliente from SistemaApartado left jo...
true
629220478899ab9762c98d00b1596dd0332a2e3d
SQL
nrlftha/projectwebprogramming
/dsl.sql
UTF-8
2,707
3.0625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jun 04, 2021 at 09:48 AM -- Server version: 10.4.17-MariaDB -- PHP Version: 7.4.15 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIE...
true
b1816eee7ad51975302de5b41cc0d5f967534477
SQL
kired2806/DashBoard
/Dashboard/Projet Tableau de bord/Projet TdB Corentin/BDD/Script SQL/script_create_table_SQL_developer.sql
UTF-8
2,911
4.03125
4
[]
no_license
DROP TABLE TOUCHER; DROP TABLE CONTENIR; DROP TABLE CONCERNER; DROP TABLE ECRIRE; DROP TABLE COMPETITION; DROP TABLE SPORT; DROP TABLE KEYWORD; DROP TABLE AUTEUR; DROP TABLE ARTICLE; /*Article*/ CREATE TABLE ARTICLE( idArticle NUMBER(10,0) NOT NULL, titre varchar(1000) NOT NULL, datePubli varcha...
true
2fec9dab888943112991adbc62443b259b2d625a
SQL
Jack-HFK/hfklswn
/pychzrm course/journey_two/MySQL/day15_PM/mysql_/stu.sql
UTF-8
6,841
3.140625
3
[]
no_license
-- MySQL dump 10.13 Distrib 5.7.25, for Linux (x86_64) -- -- Host: localhost Database: stu -- ------------------------------------------------------ -- Server version 5.7.25-0ubuntu0.16.04.2 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RE...
true
1354a56aee4a3cc54d8c503857300f264bb050c7
SQL
viktorcseppento/Tartozaskezelo-honlap
/dbCreate.sql
UTF-8
684
3.3125
3
[]
no_license
CREATE DATABASE tartozasok DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci; USE tartozasok; CREATE TABLE Tag( id NCHAR(8) NOT NULL PRIMARY KEY, nev NVARCHAR(255) NOT NULL, jelszo NVARCHAR(255) NOT NULL, email NVARCHAR(255) NOT NULL ); CREATE TABLE Tartozas( id INT NOT NULL PRIMARY KEY AUTO...
true
78fb1eb92afc85d49e860ec61b8542a7cf0018fe
SQL
satriani04/apigw
/androapi.sql
UTF-8
4,284
3.15625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.1.6 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Aug 31, 2015 at 06:43 AM -- Server version: 5.6.16 -- PHP Version: 5.5.9 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /...
true
c76046a92c4963bf2722b4e68feb61b8ee112f9b
SQL
MaximeS/Projet_php
/projetphp.sql
UTF-8
4,280
3.46875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.1.14 -- http://www.phpmyadmin.net -- -- Client : 127.0.0.1 -- Généré le : Mar 20 Mai 2014 à 11:23 -- Version du serveur : 5.6.17 -- Version de PHP : 5.5.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_...
true
5c131d409819f477b16634eab6aa2829fb554962
SQL
mattzmyname/csci4370-project5
/Dump20171125/air_airport.sql
UTF-8
2,060
3
3
[]
no_license
-- MySQL dump 10.13 Distrib 5.7.17, for Win64 (x86_64) -- -- Host: localhost Database: air -- ------------------------------------------------------ -- Server version 5.7.20-log /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!...
true
b39939315f330946df9eafd4294f1eb4b79df7cc
SQL
sanojkanta/video_pkg
/VIDEO_PKG.sql
UTF-8
821
2.734375
3
[]
no_license
create or replace PACKAGE video_pkg IS PROCEDURE new_member( p_mem_id member.member_id%type, p_lname member.last_name%type, p_fname member.first_name%type, p_addr member.address%type, p_city member.city%type, p_phone member.phone%type ); FUNCTION new_rental( p_mem_id rental.member_id%type, p_title_id rental.title_id%t...
true
738810c5dc21f8cd77f539ecdb78e8c627106e94
SQL
Anjali8881/mvc
/sql/cybercomproject.sql
UTF-8
16,429
3.171875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.3 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Mar 18, 2021 at 02:12 PM -- Server version: 10.4.14-MariaDB -- PHP Version: 7.2.34 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIE...
true
60fc9c89429f9a3baca0daf48e19f5c72b99967a
SQL
saoriyo99/SoccerReferees
/app/data/soccer.sql
UTF-8
1,450
3.609375
4
[]
no_license
CREATE DATABASE IF NOT EXISTS soccerdb; USE soccerdb; DROP TABLE IF EXISTS referees; CREATE TABLE referees ( refereeid int PRIMARY KEY AUTO_INCREMENT , refname varchar(50) UNIQUE NOT NULL, age int, refgrade varchar(30), refstatus varchar(45), skillrating int ); INSERT INTO referees (refereeid, refname, ...
true
a0e20d1e3e61bc3bb439255c04ee028b464d275e
SQL
adityatoshniwal/pgadmin4
/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_parsers/templates/fts_parsers/sql/default/nodes.sql
UTF-8
587
3.75
4
[ "PostgreSQL" ]
permissive
{# FETCH FTS PARSER name statement #} SELECT prs.oid, prsname as name, prs.prsnamespace AS schema, des.description FROM pg_catalog.pg_ts_parser prs LEFT OUTER JOIN pg_catalog.pg_description des ON ( des.objoid=prs.oid AND des.classoid='pg_ts_parser'::regclass ) WHERE {% if scid %} prs.pr...
true
fffa738461cf3dc71a5d0744d6566ea2e338d7e5
SQL
ksqsf/RedBlue_consistency
/src/applications/RUBiStxmud/database/notrubisdata.sql
UTF-8
4,852
3.578125
4
[]
no_license
# MySQL dump 8.16 # # Host: localhost Database: rubis #-------------------------------------------------------- # Server version 3.23.43-max # # Table structure for table 'bids' # CREATE TABLE bids ( id int(10) unsigned NOT NULL auto_increment, user_id int(10) unsigned NOT NULL default '0', item_id int(10) u...
true
79b20f456fb03ad9ea3165457969dc19e23ac691
SQL
settipallisudhakar/SampleRepo
/ekl_logistics_profiler_revenue_new_hive_fact new 06042016.sql
UTF-8
27,343
2.8125
3
[]
no_license
SET hive.auto.CONVERT.JOIN=false; SET hive.auto.CONVERT.JOIN.noconditionaltask=false; SET hive.auto.CONVERT.sortmerge.JOIN=false; SET hive.optimize.skewjoin = true; INSERT overwrite TABLE ekl_logistics_profiler_revenue_new_hive_fact --changes 3pl handover charges --NDD air flag --returns processing charges...
true
006fe95e4b8794c663fd6d7b2909b9c5ce4cc26b
SQL
Maskedman99/ASDL-mini-project
/SQL/ASDL.sql
UTF-8
2,522
3.34375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.6.6deb5 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3306 -- Generation Time: Nov 27, 2019 at 01:42 AM -- Server version: 10.1.43-MariaDB-0ubuntu0.18.04.1 -- PHP Version: 7.2.24-0ubuntu0.18.04.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET...
true
1706f26b01497b661da1308d7f564e63e0f5b689
SQL
Palladin7/nix-4
/unit_2/unit_10_jdbc/src/main/resources/db_script.sql
UTF-8
5,568
3.21875
3
[]
no_license
-- MySQL dump 10.13 Distrib 8.0.24, for Win64 (x86_64) -- -- Host: localhost Database: nix-4 -- ------------------------------------------------------ -- Server version 8.0.24 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40...
true
4c57cd174a1f7d6c3797b6b082218f3416733259
SQL
anggara-code/kompenJTI
/kompenjt_db.sql
UTF-8
8,254
2.71875
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.7.7 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3306 -- Generation Time: Nov 06, 2018 at 10:17 AM -- Server version: 10.1.35-MariaDB-cll-lve -- PHP Version: 5.6.30 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!...
true
6f7b6240413fc999e0938da1ff2e8a17c886850f
SQL
tanvir362/learningCs
/MVCCore/SQL/assgnment3.sql
UTF-8
1,497
4.40625
4
[]
no_license
select * from Student order by Department_Name desc, id desc select * from Course select Name, Course_Title from (Student left join CourseTaken on Student.ID = CourseTaken.Student_ID) left join Course on CourseTaken.Course_ID = Course.Course_ID; select id, name, Salary from Instructor where Department_Name = 'CSE' a...
true
41d819d1793c9fb696190fd43ddd07d307c4d3a3
SQL
co-stig/phpbb-crawler
/phpbb-parser/src/ddl.sql
UTF-8
906
3.453125
3
[ "MIT" ]
permissive
DROP TABLE "PAYLOADS"; DROP TABLE "INTERACTIONS"; DROP TABLE "TOPICS"; CREATE TABLE "TOPICS" ( "ID" VARCHAR2(10), "WHEN" TIMESTAMP(6), "TITLE" VARCHAR2(1000), CONSTRAINT "TOPICS_PK" PRIMARY KEY ("ID") ENABLE ); CREATE TABLE "INTERACTIONS" ( "WHEN" TIMESTAMP(6), "TOPICID" VARC...
true
9b7093d2a45d2d9aaa74759dfc416e30cc2bf57d
SQL
Faresis/1Z0-047
/subqueries_rw.sql
UTF-8
886
3.59375
4
[]
no_license
create table test ( test_id number primary key, test_name varchar2(10) ); insert into test values(1, 'first'); insert into test values(2, 'second'); insert into test values(3, 'third'); insert into test values(4, null); insert into test values(5, 'fourth'); commit; select * from test; /* like requires single row subque...
true
835e853e2d69b7d59aa6f0c2062063dba8587bb9
SQL
NabeelAhmed98/Particle-Sensor
/tachyon.sql
UTF-8
46,246
3.1875
3
[]
no_license
/* Tachyon Database Created by Gene Locklear Nov 20, 2018 EXAM-2 JavaDB Fall 2018 */ DROP DATABASE IF EXISTS Tachyon; CREATE DATABASE Tachyon; USE Tachyon; SELECT 'Database Created and Selected' AS MSG; CREATE TABLE particles( IDNumber VARCHAR(10) NOT NULL, PCode CHAR(4) NOT NULL, CONSTRAINT pk_pc PRIM...
true
915e7942dc0d0367e1452d19eeed26deba1ead92
SQL
evrimulgen/Studies
/M1/HMIN103/TD3/amazonDW.sql
UTF-8
2,388
3.671875
4
[]
no_license
DROP TABLE SALES; DROP TABLE PRODUCT; DROP TABLE USER; DROP TABLE TRANSACTION_NUMBER; DROP TABLE PROMOTION; CREATE TABLE SALES( date DATE, product NUMERIC(5), user NUMERIC(5), promotion NUMERIC(5); unitPrice INT(5); Qte INT(5); transaction_number NUMERIC(5) ); CREATE TABLE PRODUCT( product_id NUMERIC(5), ...
true
f8e59fab515b723b26671ec3c7e21c5cd53d566b
SQL
petko-dimitrov/SoftUni
/PHP Web 09.2018/PHP Basics/10.IntroToMySQL-Exc/28.CountriesAndCurrencies.sql
UTF-8
148
3.21875
3
[]
no_license
select country_name, country_code, (case currency_code when 'EUR' THEN 'Euro' ELSE 'Not Euro' END) as currency from countries order by country_name;
true
636edf7e1d961d2bece0bb3540b45adf945e442e
SQL
hmgero/CN_industry_code_2017
/create_table.sql
UTF-8
944
3.171875
3
[]
no_license
/* mysql Ver 14.14 Distrib 5.7.24, for linux-glibc2.12 (x86_64) using EditLine wrapper */ create database industry DEFAULT CHARACTER SET utf8; use industry; CREATE TABLE dim_industry ( id int AUTO_INCREMENT, industry_id varchar(12), name varchar(1000), parent_id varchar(12), level_type int, description ...
true
1ac70a7e7f095312dbd4eb73b7f514510e3a1163
SQL
Scoindy/webcms
/v0.1/sql/campaign_segments.sql
UTF-8
2,332
3.28125
3
[]
no_license
/******************************************************************************* * Indigo * ******************************************************************************** * Name : campaign_segments.sql * Description : DDL for the campaig...
true
dcd0025530de729298637d609b77fb59f8c16a6a
SQL
AustinDobbins/python_ecommerce_emailer
/CREATE_DATABASE.sql
UTF-8
969
3.765625
4
[]
no_license
CREATE DATABASE IF NOT EXISTS emailer; USE emailer; CREATE TABLE `customer_info` ( `customer_id` int NOT NULL AUTO_INCREMENT, `first_name` varchar(80) DEFAULT NULL, `last_name` varchar(80) DEFAULT NULL, `customer_address` varchar(255) DEFAULT NULL, `customer_birthdate` date DEFAULT NULL, `customer_email` ...
true
9a714637c9d063a8282accf671ea09adfed10c3f
SQL
Evan-acg/InnoTecCommonSQL
/物料追踪明细.sql
UTF-8
387
2.9375
3
[]
no_license
SELECT T1.MFGTRKNUM_0, T1.MATTRKLIN_0, T1.ITMREF_0, T2.ITMREF_0, T1.USEQTY_0, T1.STU_0, T1.IPTDAT_0, T1.ITMREF_0, T1.MFGNUM_0, T1.MFGLIN_0, T1.CREDAT_0, T1.MFGFCY_0 FROM MFGMATTRK T1 LEFT JOIN MFGITM T2 ON T1.MFGNUM_0 = T2.MFGNUM_0 AND T2.MFGLIN_0 = 1000 WHERE T1.IPTDAT_0 BETWEEN '...
true
d565f7d58141b633bbbe7b6c6ad61a96dd4034c6
SQL
BhoiDanny/hostel-allocation-system
/hostel.sql
UTF-8
5,817
2.890625
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.9.3 -- https://www.phpmyadmin.net/ -- -- Host: localhost:8889 -- Generation Time: Sep 16, 2020 at 04:40 PM -- Server version: 5.7.26 -- PHP Version: 7.4.2 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIEN...
true
7be3e078c9b4a4e7408b6036c339d90f8b037062
SQL
Edwinngera/howto
/fullstack/mysql/howto_mysql_date_format.sql
UTF-8
8,104
3.625
4
[]
no_license
################################################### # # DATE FORMAT # ################################################### /* SELECT DATE_ADD(NOW(), INTERVAL 5 DAY) # 5 days in future SELECT DATE_ADD(NOW(), INTERVAL 1 MONTH) # 1 months in future SELECT DATE_ADD(NOW(), INTERVAL 6 HOUR) # 6 hours in future SELECT DA...
true
54327662e96670b24fee58aee42d8193a34abc2f
SQL
MigBap/Online-courses-and-tutorials
/SQL/LinkedIn - Advanced SQL for Data Scientists/Exercise Files/Ch02/Query-4_Window Functions and Ordered Data.sql
UTF-8
2,155
4.03125
4
[]
no_license
-- 5. Window Functions and Ordered Data -------------------------------------------------------------------------------------------------------------------------- -- 1) Window functions: OVER PARTITION SELECT department, last_name, salary, AVG(salary) OVER (PARTITION BY department) -- em vez de uma subquery podemos ...
true
924940634609e5bd46dd92726614d0110569d37c
SQL
OlafMd/MedCon1.0
/mm-libs/dbaccess/Level 5/CL5_APOBilling_Bill/Atomic/Retrieval/SQL/cls_Get_Open_Bills_Basic_Data_for_CustomerID_and_TenantID.sql
UTF-8
3,768
3.328125
3
[]
no_license
SELECT bil_billheader_2_billstatus.Creation_Timestamp AS BillStatusCreationTime ,bil_billheaders.BIL_BillHeaderID ,bil_billheaders.BillNumber ,bil_billheaders.DateOnBill ,cmn_bpt_businessparticipants_billrecipient.DisplayName AS BillRecipientName FROM bil_billheaders INNER JOIN bil_billheader_2_billstatus ON bil_b...
true
7ec2359e40b03ae9b308a2eb3558729007b1c463
SQL
muhammadfariz/aplikasi-dosen
/src/main/resources/db/migration/V1.0.0.0__Skema_Awal.sql
UTF-8
2,466
3.265625
3
[ "Apache-2.0" ]
permissive
create table dosen ( id varchar(255), nama VARCHAR(255), primary key (id) ); CREATE TABLE jenis_surat ( id VARCHAR(36), nama VARCHAR(255), keterangan VARCHAR(255), template VARCHAR(255), PRIMARY KEY (id) ); CREATE TABLE jabatan ( id VARCHAR(36), nama VARCHAR(255), keter...
true
f15ddb2f11109f9f17abfd19e6155df411aa4fe4
SQL
fawadik/hyf-homework
/databases/week1/homework1.sql
UTF-8
7,158
3.640625
4
[]
no_license
-- Part 1 Find out how many tasks are in the task table SELECT * FROM task; SELECT COUNT(ID) AS Task_Count FROM task; -- Output (Task_Count 35) -- Part 2 Find out how many tasks in the task table do not have a valid due date SELECT COUNT(ID) AS TASK_COUNT FROM task WHERE due_date IS NOT NULL; -- Output (TASK_COUNT 35)...
true
6a3b4c4f4eeb0956e8c44937685ae12d3fe883fd
SQL
shammi-udum/DC_Crash_Bot
/SQL/Analyze_311_Requests.sql
UTF-8
6,411
3.640625
4
[]
no_license
--find service code descriptions that are confirmed to be related to traffic safety --confirmed ones: MARKMAIN, SIGNMISS, S0286 select servicecode ,servicecodedescription ,servicetypecodedescription ,count(*) from source_data.all311 group by servicecode ,servicecodedescription ,servicetypecodedescription order ...
true
befc3378ab3b1140f399bf05ab2a4854e5617a65
SQL
anggundw/Dqlab-
/Project Data Analysis for Retail Sales Performance Report/DQLab Store Overall Performance/Overall_Performance_by_Product_Sub_Category.sql
UTF-8
246
3.34375
3
[]
no_license
SELECT year(order_date) as years, product_sub_category, sum(sales) as sales FROM dqlab_sales_store WHERE order_status='order finished' AND YEAR(order_date) IN("2011","2012") GROUP BY product_sub_category, years ORDER BY years, sum(sales) desc
true
17a45ce1abd4cb9a3754cbe31d0a7494b9202f7d
SQL
chphuynh/CMPS180
/lab3/general.sql
UTF-8
555
2.71875
3
[]
no_license
ALTER TABLE Ownerships ADD CONSTRAINT tax_not_negative CHECK ( PropertyTax >= 0); ALTER TABLE Tenants ADD CONSTRAINT positive_rent CHECK ( Rent > 0); ALTER TABLE Tenants ADD CONSTRAINT check_lease CHECK ( LeaseExpirationDate = NULL OR (LeaseExpirationDate <> NULL ...
true
80f9503c9dd8c30a59e8fff6297a17e2f3bb75a3
SQL
scm-aungpyaesone/spring-mvc
/mysql/migration/post.sql
UTF-8
578
3.15625
3
[]
no_license
USE myapp; -- Dumping structure for table bulletinboard.post CREATE TABLE IF NOT EXISTS `post` ( `id` int(10) NOT NULL AUTO_INCREMENT, `title` varchar(255) NOT NULL, `description` varchar(255) NOT NULL, `status` int(1) NOT NULL, `create_user_id` int(11) NOT NULL, `updated_user_id` int(11) DEFAULT NULL, `d...
true
5ec50ac8653afbb8b708ed4d03fae1b0a3abfacd
SQL
ilya-ali/pictag
/pictag-web/src/main/sql/mysql-schema.sql
UTF-8
419
2.59375
3
[]
no_license
create database pictagDB use pictagDB; create table tbl_user( id VARCHAR(255) PRIMARY KEY, username VARCHAR(255) NOT NULL, password VARCHAR(255) NOT NULL, email VARCHAR(255) ) Engine=InnoDB; insert into tbl_user (id, username,password, email) VALUES ('abc123', 'endy', '123', 'endy.muhardin@gmail.com'...
true
e30a569d576ac6fef7f3191b19e46f615f0e4f3a
SQL
asd821226/framework
/framework-task/src/main/java/com/fccfc/framework/task/dao/sql/TriggerDao_selectTriggerByTaskId.sql
UTF-8
449
3.828125
4
[]
no_license
SELECT ST.TRIGGER_ID, ST.TRIGGER_NAME, ST.CREATE_TIME, ST.OPERATOR_ID, TT.TRIGGER_TYPE FROM SIMPLE_TRIGGER ST, TASK_TRIGGER TT WHERE ST.TRIGGER_ID = TT.TRIGGER_ID AND TT.TRIGGER_TYPE = 1 AND TT.TASK_ID = :taskId UNION SELECT CT.TRIGGER_ID, CT.TRIGGER_NAME, CT.CREATE_TIME, CT.OPERATOR_ID, TT.TRIGGER_TYPE FR...
true
ebd30c9263404824141ddd9e918255f7977100b6
SQL
sat8bit/matomepp
/db/init/tables/recommendations.sql
UTF-8
149
2.578125
3
[]
no_license
CREATE TABLE recommendations ( recommendation_id INT PRIMARY KEY AUTO_INCREMENT, keyword VARCHAR(32) UNIQUE KEY, updated_at TIMESTAMP );
true
f5b19a843e2de274f5d0c94c05f387d0fe477221
SQL
trevorguleserian/SQL-Employee-Analysis
/EmployeeSQL/queries.sql
UTF-8
1,986
4.5625
5
[]
no_license
-- Salary by employee SELECT employees.emp_no, employees.last_name, employees.first_name, employees.sex, salaries.salary FROM employees INNER JOIN salaries ON employees.emp_no = salaries.emp_no ; -- Employees hired in 1986 SELECT first_name, last_name, hire_date FROM employees WHERE hire_date BETWEEN '1986-01...
true
c6d396048912f7851ec36632f619f64fe9e76785
SQL
gabriel-sisjr/periodos-UFS
/2019.1/Bancos 2/Avaliacoes/Avaliacao02/Avaliacao02.sql
UTF-8
1,603
3.265625
3
[]
no_license
create table tb_surfista ( id_surfista int not null, nome_surfista varchar(100) not null ) insert into tb_surfista values(10, 'GABRIEL MEDINA') insert into tb_surfista values(17, 'JULIAN WILSON') insert into tb_surfista values(12, 'KELLY SLATER') insert into tb_surfista values(15, 'FILIPE TOLEDO') create tabl...
true
2e368ebd10755a47205aadba741f1948f9dad46b
SQL
vikstar94/chombo
/updates/vik_1.sql
UTF-8
245
2.8125
3
[ "LicenseRef-scancode-unknown-license-reference", "MIT" ]
permissive
CREATE TABLE `db_updates` ( `id` int(11) NOT NULL, `file` varchar(50) NOT NULL, `updated_on` datetime NOT NULL ); ALTER TABLE `db_updates` ADD PRIMARY KEY (`id`); ALTER TABLE `db_updates` CHANGE `id` `id` int(11) NOT NULL AUTO_INCREMENT;
true
0bd0447e938e5a6f26b4c2a62e267a3fa4837be6
SQL
cansuciloglu/Product-Management
/product_management.sql
UTF-8
1,986
3.34375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.4 -- https://www.phpmyadmin.net/ -- -- Anamakine: 127.0.0.1 -- Üretim Zamanı: 19 May 2021, 18:22:47 -- Sunucu sürümü: 10.4.17-MariaDB -- PHP Sürümü: 7.3.27 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT...
true
9920bb9b856ce815bef1a0f4dd86c7bb98e94452
SQL
qiuhy/dl
/sql/3bstock.sql
UTF-8
2,587
3.484375
3
[ "MIT" ]
permissive
-- ---------------------------- -- Table structure for brief -- ---------------------------- DROP TABLE IF EXISTS brief3b; CREATE TABLE brief3b ( "机构ID" TEXT NOT NULL, "机构名称" TEXT, "机构简称" TEXT, "英文全称" TEXT, "英文简称" TEXT, "机构类型(大类)" TEXT, "机构类型(小类)" TEXT, "是否上市" TEXT, "法定代表人" TEXT, "董事长" TEXT, "总经理" TEXT,...
true
8721154a9816f9f0a152e3fb71f0a2d03517024a
SQL
Dtwist12/Schema-seed
/seed.sql
UTF-8
507
2.765625
3
[]
no_license
/*Seeds*/ insert into VideoGames (name , genre , year) Values('pokemon black' , 'adventure rpg', 2010), ('Persona 5', 'action adventure rpg' , 2016), ('Stardew valley', 'sim rpg',2016); insert into TVshows (name , type , year) Values('The Golden Girls', 'sitcom', 1985), ('Teen titans', 'action fiction',2003), ('The ...
true
7a9d5b0272986cd0f57a90d6b5cd95d796c50ea5
SQL
mrotteveel/fb-datagrip
/catalog/queries/fb30/RetrieveFunctionParametersQuery.fb30.sql
UTF-8
5,624
3.109375
3
[]
no_license
-- Query to retrieve functions -- Suitable for Firebird 3.0 and higher select /* package name is null for normal functions */ trim(trailing from PACKAGE_NAME) as PACKAGE_NAME, trim(trailing from FUNCTION_NAME) as FUNCTION_NAME, /* parameter name is null for legacy UDF functions */ trim(trailing from PARAMET...
true
2cc8c2e928081383557f1c4f154e7e402c201526
SQL
sameershukla/Play2-Swagger-Slick
/conf/evolutions/default/1.sql
UTF-8
2,206
3.34375
3
[ "Apache-2.0" ]
permissive
# --- !Ups create table CONSUMERS(id INT UNSIGNED NOT NULL AUTO_INCREMENT, name VARCHAR(254), lastName VARCHAR(254) NOT NULL, gender VARCHAR(254),email VARCHAR(254), password VARCHAR(254), zip VARCHAR(254), phone VARCHAR(254), PRIMARY KEY ( id )); INSERT INTO CONSUMERS(ID, NAME, LASTNAME, GENDER, EMAIL, PASSWORD, ZIP...
true
3a80ea9754ce32203397e23489360980c491248e
SQL
nexemjail/ora-db
/iud_a_from_red/iud_a/manage_users.sql
UTF-8
3,207
4.0625
4
[]
no_license
-- check_user_exists(user_login) -- SOON!!! select * from roles; create or replace function get_role_id_by_name(rolename varchar) return integer as id_ integer; begin select id into id_ from roles where name = rolename; return id_; end; / select * from users; / -- + create or replace function check_...
true
ef546324a125c56fe9a3cbd205171fc4cba98906
SQL
Nisarg-1406/PostgreSQL-Basics-Commands
/SuperMart_Project.sql
UTF-8
32,022
4.71875
5
[]
no_license
-- SQL is the computer language which is used for storing, manipulating and retriving the data. SQL stand for structured query language. -- SQL works in the relational databases. Relational databses are the collection of the table and this tables are related in some ways. -- The record in the table is the row of the...
true
299326ddf8a207db83151462557238214c733131
SQL
ManaliChoudhary/Data-Warehousing-for-Business-Intelligence
/SQL_code/taskC3_simple_reports.sql
UTF-8
2,786
4.46875
4
[]
no_license
---a --Report 1 --Rank --Top 10 suburbs with lowest rent per week for Apartment Property Type --Version 1 SELECT * FROM( SELECT A.suburb AS SUBURB, P.property_type AS "PROPERTY TYPE", SUM(R.total_rental_fees) AS "RENTAL FEES", DENSE_RANK() OVER(ORDER BY SUM(R.total_rental_fees)) AS "RANK BY RENT" FROM rentfact_v1 R, p...
true
cc1430ead0106050f639cfa15f87be33dba91678
SQL
apdaza/universidad-ejercicios
/poo/100 Conexion a mysql/AppParcialesConjuntos/dbinventario.sql
UTF-8
4,164
3.15625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 2.9.1.1 -- http://www.phpmyadmin.net -- -- Servidor: localhost -- Tiempo de generación: 08-12-2006 a las 00:39:11 -- Versión del servidor: 5.0.27 -- Versión de PHP: 5.1.6 -- -- Base de datos: `dbinventario` -- -- -------------------------------------------------------- -- -- Estr...
true
780316a845ff0bab0482093d01ddd33aac253f78
SQL
thesocialngo/thesocialngo
/ngo_site_backup/Database.sql
UTF-8
7,580
2.953125
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.0.10.7 -- http://www.phpmyadmin.net -- -- Host: localhost:3306 -- Generation Time: Mar 28, 2016 at 06:31 AM -- Server version: 5.6.29 -- PHP Version: 5.4.31 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLI...
true
1da6e81db5da215db8b98e4538bb8a2d3f243ba9
SQL
dekoza/i-hate-time-tracking
/migrations/models/0_20211003205601_init.sql
UTF-8
1,155
3.5
4
[ "Apache-2.0" ]
permissive
-- upgrade -- CREATE TABLE IF NOT EXISTS "reporters" ( "id" CHAR(36) NOT NULL PRIMARY KEY, "slug" VARCHAR(100) NOT NULL, "description" TEXT NOT NULL, "enabled" INT NOT NULL DEFAULT 1 ) /* Which plugin reported the entry. */; CREATE INDEX IF NOT EXISTS "idx_reporters_slug_4e163d" ON "reporters" ("slug"...
true
201461d776d108d9716a1cc4b7673d16d2a1dbdf
SQL
ClickHouse/ClickHouse
/tests/queries/0_stateless/00278_insert_already_sorted.sql
UTF-8
556
3.359375
3
[ "Apache-2.0", "BSL-1.0" ]
permissive
DROP TABLE IF EXISTS sorted; set allow_deprecated_syntax_for_merge_tree=1; CREATE TABLE sorted (d Date DEFAULT '2000-01-01', x UInt64) ENGINE = MergeTree(d, x, 8192); INSERT INTO sorted (x) SELECT intDiv(number, 100000) AS x FROM system.numbers LIMIT 1000000; SET max_threads = 1; SELECT count() FROM sorted; SELECT D...
true
44ba0f89ad5b277394d9739a5a042c4241e9b167
SQL
daiemna/vault_cassandra
/environment/scylla_conf/init.cql
UTF-8
368
2.8125
3
[]
no_license
CREATE ROLE vaultadmin WITH SUPERUSER = true AND LOGIN = true and PASSWORD = 'vaultpass'; CREATE KEYSPACE IF NOT EXISTS ks_new WITH REPLICATION = { 'class' : 'SimpleStrategy', 'replication_factor' : 1 }; CREATE TABLE IF NOT EXISTS ks_new.ts_raw ( tsid text, time timestamp, value float, PRIMARY KEY (tsi...
true
ee8a80816b7ed67beda7762fa608f50423f98263
SQL
r50206v/Leetcode-Practice
/2022/SQL-612-ShortestDistanceInAPlane.sql
UTF-8
216
3.640625
4
[]
no_license
SELECT ROUND(distance, 2) AS shortest FROM ( SELECT POW(POW(a.x - b.x, 2) + POW(a.y - b.y, 2), 0.5) AS distance FROM Point2D AS a, Point2D AS b ) AS t WHERE distance > 0 ORDER BY distance ASC LIMIT 1
true
f732c3ae3aad02ba68cf2e11b86291bec94c04c1
SQL
bellmit/origin
/family_order/sql/TF_F_USER_OTHER/SEL_OTHER_RED_PAK_VALUE2.sql
UTF-8
276
2.703125
3
[]
no_license
select T.* from tf_f_user_other t where t.partition_id=MOD(TO_NUMBER(:USER_ID),10000) AND t.user_id=TO_NUMBER(:USER_ID) AND t.RSRV_VALUE_CODE = 'RED_PAK' AND T.RSRV_VALUE = '2' and t.RSRV_STR17 = '0' and t.rsrv_str10 = :PACKAGE_ID and sysdate < t.end_date
true
e4a5a501351e8e8ca9ad1d758a06b471c5c34ecd
SQL
ProfDema/uam
/pam/examples/anon_data/group_0086/a2.sql
UTF-8
2,792
4.0625
4
[]
no_license
-- Add below your SQL statements. -- You can create intermediate views (as needed). Remember to drop these views after you have populated the result tables. -- You can use the "\i a2.sql" command in psql to execute the SQL commands in this file. SET search_path TO A2; -- Query 1 statements INSERT INTO Query1 (SELECT ...
true
8aeb3efcc9d6cf8b3eb59d9cffd6b674d1ec2b5c
SQL
byhoung/em2-dashboard
/conf/evolutions/default/1.sql
UTF-8
4,802
3.046875
3
[]
no_license
# Initial schema # --- !Ups CREATE TABLE SiteData ( timestamp BIGINT NOT NULL, sitename VARCHAR(24) NOT NULL, ghx_ewt double precision NOT NULL, ghx_lwt double precision NOT NULL, ghx_flow double precision NOT NULL, ghx_maxewt double precision, g...
true
3465bb673d66a0d39c645981efe2240dcb0312b9
SQL
TayLight/FilmFinder
/Requests.sql
UTF-8
2,190
4.03125
4
[]
no_license
--Вывести все фильмы, соотетствующие заданной личности и заданной должности select distinct title, issue_year, imdb, length from film where id_film in (select id_film from film_person where id_position in (select id_position from position where name_...
true
b3c36f0a5c172aaf9f62e357c7ec121bd0b8802b
SQL
Bitakh80/UCI-Bootcamp
/Homework-7/HW-7-SQL.sql
UTF-8
4,004
4.3125
4
[]
no_license
select first_name, last_name from actor; select UPPER(CONCAT(first_name, last_name)) as 'Actor Name' from actor; select*from actor; select actor_id, first_name, last_name from actor where first_name = "Joe"; select last_name from actor where last_name like '%GEN%'; select last_name, first_name from actor where las...
true
62c21757bcc1f4d707d0e7a5d1a4921b56d6d50f
SQL
Matheus251170/gitTest
/Generation/MySQL/JOIN/exercicio1.sql
UTF-8
4,121
3.828125
4
[]
no_license
/* Crie um banco de dados para um serviço de um game Online , o nome do banco deverá ter o seguinte nome db_generation_game_online, onde, o sistema trabalhará com as informações dos personagens desse game. O sistema trabalhará com 2 tabelas tb_personagem e tb_classe. siga exatamente esse passo a passo: Crie uma ta...
true
54e6f85cf33ebffaada9b6b730ee71daac3477e4
SQL
donimlbb13/BLADETRX
/base.sql
UTF-8
16,717
3.140625
3
[ "MIT" ]
permissive
-- MySQL dump 10.17 Distrib 10.3.15-MariaDB, for debian-linux-gnu (x86_64) -- -- Host: localhost Database: telegram_bot -- ------------------------------------------------------ -- Server version 10.3.15-MariaDB-1:10.3.15+maria~bionic-log /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 ...
true
0d4d4407839baee2b68f8d8cc69ece5ddfbb8a21
SQL
diatum-org/amigo
/tools/schema/V01__accounts.sql
UTF-8
1,804
3.34375
3
[ "Apache-2.0" ]
permissive
drop table db_node; alter table config drop column name; alter table system add column accounts bigint(64) not null default 0; alter table account add column reset_token varchar(64); alter table account add constraint reset_UNIQUE unique (reset_token); alter table account add column reset_issued bigint(64); alter tab...
true
53168612699e84b75be1e1647a4862196ea3d21d
SQL
luan-silveira/sos_acessivel_laravel
/dados/sos_acessivel.sql
UTF-8
65,506
3.203125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.0.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: 26-Jun-2018 às 16:37 -- Versão do servidor: 10.1.32-MariaDB -- PHP Version: 7.2.5 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @O...
true
e4afd8cd73a2c9e3273f69a5355aecd53f81a006
SQL
pis5430/SQL
/Practice/practice03.sql
UTF-8
7,061
4.53125
5
[]
no_license
-- 테이블간 조인(JOIN) SQL 문제입니다 /*practice03*/ /* 문제1. 직원들의 사번(employee_id), 이름(firt_name), 성(last_name)과 부서명(department_name)을 조회하여 부서이름(department_name) 오름차순, 사번(employee_id) 내림차순 으로 정렬하세요. (106건) */ select e.employee_id 사번, e.first_name 이름, e.last_name 급여, d.department_name 부서명 fro...
true
2c135dd4b354ce4effa7b3cade8739e0bb3114f0
SQL
cchaoqun/MySQL_SelfLearned
/SQL_Notes/21_function.sql
UTF-8
2,206
4.21875
4
[]
no_license
#函数 /* 存储过程和函数: 类似于java中的方法 好处: 1.提高代码的重用性 2. 简化操作 3.减少了编译次数并且减少了和数据库服务器的链接次数,提高了效率 区别: 存储过程 可以有0个或多个返回 适合做批量插入更新 函数: 有且仅有1个返回 处理数据后返回一个结果 */ #一 创建语法 CREATE FUNCTION 函数名(参数列表) RETURNS 返回类型 BEGIN 函数体 END /* 注意: 1.参数列表 包含两部分 参数名 参数类型 2. 函数体: 肯定会有 return语句 如果没有会保存 如果return语句没有放在函数体的最后也不报错 但不建议 return 值; 3. 函数体中仅有...
true