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
2c25e0f73f86ed03c617f70681969b592a3133ca
SQL
skdsh/Beleg_Gruppe8
/kundenkartei.sql
UTF-8
3,582
3.1875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.9.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Erstellungszeit: 06. Jan 2020 um 20:49 -- 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 @OLD_C...
true
f1fc1038803fe8a0d9630f5b26539a1b6fd77e8d
SQL
roylanceMichael/is_6480_datawarehousing_utah
/populate_facts/6_AggregatePopulate.sql
UTF-8
957
4.25
4
[]
no_license
-- select distinct MemberClass from Country where MemberClass is not null -- select * from Country where MemberClass in ('G8', 'BRIC') insert into GDP_Debt_AggregateFact(GDP, DebtTotal, NationalSavingsTotal, GDP_Debt_Ratio, MemberClass_Key, Time_Key) select -- sum(log(GDP)) as LogGDP, -- sum(ifnull(log(DebtTotal...
true
65636f7b50992dae54f0a71ec3ea7e484e5195f2
SQL
CUBRID/cubrid-testcases
/sql/_13_issues/_15_1h/cases/bug_bts_16039.sql
UTF-8
1,643
3.296875
3
[ "BSD-3-Clause" ]
permissive
drop table if exists t; create table t (a int, b int); insert into t values(1,1),(2,2),(3,3); select percentile_cont(0.2) within group (order by a) over(partition by b, a) p_cont from t order by percentile_cont(0.5) within group (order by a) over(); select percentile_cont(0.2) within group (order by a) over(partition...
true
81ec435519ba88fec38f91649ccf88ec4e796b21
SQL
GloryXu/spring-boot
/doc/dbdemo/createSql.sql
UTF-8
1,187
3.125
3
[]
no_license
drop table `department`; CREATE TABLE `department` ( `id` int NOT NULL AUTO_INCREMENT COMMENT '主键', `name` VARCHAR(255) NOT NULL COMMENT '部门名称', PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT= 1 DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='部门表'; drop table `user`; CREATE TABLE `user` ( `id` int NOT NULL AUTO_INC...
true
37d66db5e04fa1d6f5bdad981503125e7a723ade
SQL
ShamimsJava/plsql
/class/exam4/exam.sql
UTF-8
1,098
3.65625
4
[]
no_license
create table employees( eId number primary key, eName varchar2(20), salary number, hireDate date, address varchar2(20) ); desc employees; alter table employees add( phone number, jobTitle varchar2(20) ); desc employees; insert into employees values(101, 'Harry', 25000, '25-JAN-16', 'Mirpur', 52462, 'Programm...
true
b2d4600cab1b9c983755d6e13e7fbdd7c6743537
SQL
erisdinh/work-sher
/Database/create posting & order table.sql
UTF-8
925
3.25
3
[]
no_license
USE `worksher_db`; create table posting( posting_id int(10) unsigned not null auto_increment, user_id int(10) unsigned not null, jobCategory varchar(30) not null, description varchar(100), compensation varchar(30), status varchar(10), portfolio varchar(100), dateCreated date not null, primary key(posting_id), foreign ...
true
e000a612c8cc8ee0b58bd4d139259e79a2916ce0
SQL
Ruk33/AresLands
/sql/tables/items.sql
UTF-8
2,407
3.015625
3
[ "MIT", "LicenseRef-scancode-dco-1.1" ]
permissive
-- -------------------------------------------------------- -- Host: 127.0.0.1 -- Versión del servidor: 5.6.17 - MySQL Community Server (GPL) -- SO del servidor: Win64 -- HeidiSQL Versión: 9.1.0.4867 -- -------------------------------------------------------- /*...
true
c33cf1b2fb7a3d8b4a950877b37c61a9e330f03f
SQL
sergeymong/SQL
/MySQL/sql-ex.ru/96.sql
UTF-8
855
3.765625
4
[]
no_license
# При условии, что баллончики с красной краской использовались # более одного раза, выбрать из них такие, которыми окрашены квадраты, имеющие голубую компоненту. # Вывести название баллончика USE paint; WITH more_one_ballons AS (SELECT B_V_ID FROM utB WHERE B_V_ID IN (SELECT V_ID FROM utV WHERE V_COLOR ...
true
4025b282bb5cb7765083d069cf6ddde9df98188c
SQL
m-linardos/sql
/SchoolDataModel/school_data_model_QUERY.sql
UTF-8
424
3.109375
3
[]
no_license
Select FirstName, LastName from Instructor Where FirstName = 'Mary'; -- Select s.FirstName, s.LastName, c.Subject, c.Number -- from Student s -- INNER JOIN Course c -- ON S.id = C.; Select i.FirstName, i.LastName, c.Subject, c.Number, c.Name From Instructor i Inner Join Cour...
true
9d7041e7fd188395cd05e847726e288668f904ff
SQL
PowerDG/DgBook.architect-awesome
/DesignPattern设计模式/Oriented面向对象/入职培训/SQL分享/SQLServer/示例七:结果集筛选位置不妥.sql
GB18030
1,314
3.265625
3
[]
no_license
/**************************************************************************************** 㣺SQLóִУִмƻһġǷŵ洢ͻֲ졣ԭǴ洢̵Ԥ+εִмƻѡ쳣ڲ̽һ ŻС ԭSQL SELECT UserName,SmsContent,SendTime FROM ( select u.UserName,u.PKCompany,sr.SmsContent,SR.SendTime,ROW_NUMBER() OVER(PARTITION BY u.PKCompany ORDER BY u.ClientLastLoginTime desc) AS CN...
true
c0f543b9acec975e9f250429d840821f384f6a1f
SQL
demetriosmiguel/DOCUMENTOS
/Psd_ClientesInserir.sql
UTF-8
496
2.65625
3
[]
no_license
create PROCEDURE Psd_ClientesInserir @Cli_Nome varchar(255), @Cli_Endereco varchar(255), @Cli_Telefone varchar(100), @Cli_Email varchar(100), @Cli_DataNascimento datetime AS BEGIN INSERT INTO Produtos ( Cli_Nome, Cli_Endereco, Cli_Telefone, Cli_Email, Cli_...
true
6cf6bdb56d1974a1c95af3c16a10ebc7c12eae3a
SQL
ggboomi/filmSource
/src/main/resources/ziyuan.sql
UTF-8
1,834
3.5625
4
[]
no_license
--用户表 --uid --uname --pwd --power --pic --themenum 发布主题数 --score 积分 create table mUserInfo( muid number(10) primary key, uname varchar2(20) not null, pwd varchar2(20) not null, pow number(1), pic varchar2(100), -- themenum number(10), --论坛里面 score number(1...
true
53ffc57a281875e07408f4ac2dac005ebf7fbd24
SQL
aracta/VueThink
/php/oa_admin_rule.sql
UTF-8
6,299
3.125
3
[ "Apache-2.0" ]
permissive
/* Navicat MySQL Data Transfer Source Server : root Source Server Version : 50547 Source Host : localhost:3306 Source Database : vuethink Target Server Type : MYSQL Target Server Version : 50547 File Encoding : 65001 Date: 2020-07-21 09:09:06 */ SET FOREIGN_KEY_CHECKS=0; -- -----...
true
4dcd9872350f44837aa6048239eb7286b49a7a7a
SQL
DenisVasenin/Labs
/BD/Lab5/filler.sql
UTF-8
6,121
3.015625
3
[]
no_license
-- SCRIPT CREATED BY I.EGOSHIN -- FILL COMPANY TABLE PROCEDURE DROP PROCEDURE IF EXISTS fillCompany; DELIMITER // CREATE PROCEDURE fillCompany() BEGIN SET @counter = 0; WHILE (@counter < 100) DO INSERT INTO company VALUES (NULL, concat(substring('ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789', rand(@see...
true
ed423de276d2040e83798d15bf5b0f111b680696
SQL
Tepozyolca/Evaluation-semaine-48
/Gescom Q24.sql
UTF-8
197
3.09375
3
[]
no_license
SELECT @Valeur := SELECT cat_id FROM categories WHERE = "Tondeuses électriques" DELETE FROM products WHERE pro_cat_id = @Valeur AND pro_id NOT IN (SELECT ode_pro_id FROM orders_details WHERE 1)
true
bfe1bca476395bb41d363df34077b7e30a10af85
SQL
Muzaffardjan/qashstat
/module/Media/data/tables/videos.sql
UTF-8
859
2.703125
3
[]
no_license
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00: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_CONNECTION */; /*!40101 SET NAMES utf8 */; -- -- База данных: `soh...
true
6135beef7ca41f79545cf1edac087f90d37f35e0
SQL
karolis1314/Delivery-System
/Sql/TriggerSQL.sql
UTF-8
268
2.75
3
[]
no_license
use newsagent2021; DROP TRIGGER IF EXISTS orders_after_insert; DELIMITER // CREATE TRIGGER orders_after_insert BEFORE INSERT on DELIVERY_DOCKETS FOR EACH ROW BEGIN update publication set stock = stock - 1 where stock > 0 and id = new.publicationID; END//
true
58f972a2908b1c3af5a1e13360c8e75a61dbac9a
SQL
laleman-eng/apiassa
/Querys/Lista de Polizas para crear Tarjeta equipo y entrega.sql
UTF-8
1,115
2.90625
3
[]
no_license
Select T1.idstrNoPoliza ,T2.strIdAseguradora ,T2.strNomAse ,T1.strNoReciboInt ,T2.CardCode ,LEFT(T2.CardName,30) AS CardName ,T6.strRFC AS strRFC ,LEN(T6.strRFC) AS LargoRFC ,T6.bintIdCteOperacion ,T6.bintIdCliente ,T2.intIva ,T5.strCveSap AS Asociado ,T3.strCveSap AS Ejecutivo ,T5.intMTipoCon...
true
03faf54b904869850df4d93decdf1ec54e8144be
SQL
RyanLiu256/pet_hosting
/sql/pethosting.sql
UTF-8
28,404
3.078125
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : localhost_3306 Source Server Version : 50721 Source Host : localhost:3306 Source Database : pethosting Target Server Type : MYSQL Target Server Version : 50721 File Encoding : 65001 Date: 2020-06-18 19:22:09 */ SET FOREIGN_KEY_CHECKS=...
true
6a4077cdeea5a52b01a50a8f86fdd3d4556539f6
SQL
mikejesus/database-assignment
/AssignmentByMichael.sql
UTF-8
259
2.78125
3
[]
no_license
-- Assignment submitted on 31st March, 2020 by Michael S. Olawuni select *, (unit_price * quantity) as total_price from sql_store.order_items where order_id = 6 and (unit_price * quantity) > 30; select * from sql_store.products where quantity_in_stock in (49,38,72);
true
b96ca5a5e1749a06200639a7a74c50ca29a7b128
SQL
shashankshovit/video-library
/111/vlibrary.sql
UTF-8
2,111
2.53125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 3.2.4 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Nov 02, 2011 at 03:29 PM -- Server version: 5.1.41 -- PHP Version: 5.3.1 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_S...
true
633c8e09b0fb2e2477865eb6c6c725abc74a4a10
SQL
LiarZhang/dingcan
/file/database/shiro_dingcan.sql
UTF-8
9,539
2.96875
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : 本地Localhost Source Server Version : 50553 Source Host : localhost:3306 Source Database : shiro_dingcan Target Server Type : MYSQL Target Server Version : 50553 File Encoding : 65001 Date: 2018-07-25 09:32:31 */ SET FORE...
true
bd467a9825989c1c1d67b5e40f85218742857e39
SQL
Everybyte-Digital-Products-Blueberry-Pi/Dalhousie-TA-Management-System
/sql/status.sql
UTF-8
1,467
3.0625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.9.5 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3306 -- Generation Time: Aug 02, 2020 at 01:37 PM -- Server version: 5.7.24 -- PHP Version: 7.4.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHA...
true
05535f584fc2ae421651bf78836a367dc52c20cf
SQL
BoyangDong/Quant
/sumopinrisk/test.sql
UTF-8
245
2.8125
3
[]
no_license
select pf.portfolioName, i.instrumentName, p.position, p.positionId from position as p, instrumentName as i, portfolioName as pf where i.instrumentId = p.instrumentId and p.portfolioId = pf.portfolioId and 1=2;
true
0cb338c9f1873e70a8a343d32f282c47956527ea
SQL
kaito-27/github
/sql/sql42.sql
SHIFT_JIS
143
3.515625
4
[]
no_license
SELECT c.name , MAX(order_date) ŋ߂̒ FROM sales s LEFT JOIN customers c ON s.customer_id = c.id GROUP BY s.customer_id
true
0782de9346459fd243b99d2fb60d18179eee6450
SQL
pns-soa-h/uberoo
/uberoo-meals/src/main/resources/data.sql
UTF-8
513
2.515625
3
[]
no_license
INSERT INTO TAG (id, label) VALUES (1, 'asian'), (2, 'french'); INSERT INTO RESTAURANT (id, name) VALUES (5, 'LE Resto'), (6, 'Asian Resto'); INSERT INTO MEAL (id, label, price, description, restaurant_id, tag_id, category) VALUES (3, 'Jambon-Beurre', 4.99, 'Un sandwich, avec du jambon, et du beurre.', 5, 2...
true
e73530fd043eaf52028ee46f8ce860fe5302ff61
SQL
brimahoney/Gun-Inventory
/Gun Inventory/SQL Scripts/firearms-inventory.sql
UTF-8
711
3.640625
4
[]
no_license
CREATE DATABASE IF NOT EXISTS `firearms_inventory`; USE `firearms_inventory`; DROP TABLE IF EXISTS `firearms`; CREATE TABLE `firearms` ( `serial_number` varchar(30) NOT NULL, `model` varchar(45) DEFAULT NULL, `make` varchar(45) DEFAULT NULL, `type` varchar(15) DEFAULT NULL, `caliber` varchar(10) DEFAULT NULL...
true
dc631faa3233f86baa99f52421168b59f4d2e274
SQL
Juchnowski/FunctionalProgramming-LINQ
/Tutorial.Shared/GettingStarted/Overview.Linq.LinqToNoSql.sql
UTF-8
421
2.921875
3
[ "MIT" ]
permissive
SELECT CAST(BusinessEntityID AS varchar) AS [Id], Name AS [Name], AddressType AS [Address.AddressType], AddressLine1 AS [Address.AddressLine1], City AS [Address.Location.City], StateProvinceName AS [Address.Location.StateProvinceName], PostalCode AS [Address.PostalCode], CountryRegionName AS [A...
true
e8dfbb5b37597ae8fd5de962707acf6ea289738d
SQL
CoderLittleChen/hello-word
/sql/sql常用语句/iSE/53.保存执行sql..sql
UTF-8
2,139
2.796875
3
[]
no_license
select * from specms_SpecBlEntryRel a inner join specms_TabRefBaseLine b on a.blId=b.blId inner join specms_SpecBaseLine c on b.blId=c.blId where b.listId=8349 and a.refId=105206 and b.status=2 and c.status<>1; -- update specms_SpecEntry set verStatus=0,optType=0 -- from -- ( -- ...
true
3235cf85017ba830a02c1356ae5029b95f76a516
SQL
MrXGJ/DatabaseTraining_ClothingWebsiteDesign
/database_SQL/createTable.sql
UTF-8
4,030
3.5625
4
[]
no_license
 hello drop table if exists pictures_items_relation; drop table if exists users; drop table if exists monthlysales; drop table if exists annualsales; drop table if exists stocks; drop table if exists sales; drop table if exists attrTable; drop table if exists items; drop table if exists attrValue; drop table if exists...
true
669d2714245c64c14eb6ad2c143093adf6b898f7
SQL
zinnun/mysql
/SQL5.sql
UTF-8
323
2.71875
3
[]
no_license
# BETWEEN & NOT BETWEEN OPERATOR # BETWEEN & NOT BETWEEN OPERATOR USE WORLD; SELECT * FROM COUNTRY; SELECT * FROM COUNTRY WHERE POPULATION >= 15000000 AND POPULATION <=18000000; SELECT * FROM COUNTRY WHERE POPULATION BETWEEN 15000000 AND 18000000; SELECT * FROM COUNTRY WHERE POPULATION NOT BETWEEN 15000000 AND 1800000...
true
30155c5ff98a2fe4f91b6f4dd9f49c1147de1b8f
SQL
leandroairzone/senaiProjetoInicial-3T
/senaiMateriais_DML.sql
ISO-8859-1
932
2.515625
3
[]
no_license
USE SenaiMateriais; INSERT INTO Usuario (nome,email,senha) VALUES ('Vando silva','vando@gmail.com','van123') , ('Helena souza','helena@gmail.com','hen123'); INSERT INTO TipoEquipamento (nomeTipo) VALUES ('informat...
true
eea8189a49a94920cd5c733c309c49ce8edb82b2
SQL
Missheart/ssm-miner
/doc/ddl.sql
UTF-8
19,986
3.859375
4
[]
no_license
DROP TABLE IF EXISTS contract; CREATE TABLE contract /*矿机租赁合约表*/ ( id BIGINT AUTO_INCREMENT PRIMARY KEY, /*自增主键*/ user_id BIGINT NOT NULL, /*矿机租赁合约用户 ID */ order_id BIGINT NOT NULL, /*矿机租赁合约订单 ID */ machine_id BIGINT ...
true
80ec1e4ec25a1f9344bc891d7f545ee145ce917c
SQL
commercekitchen/cpldl
/db/structure.sql
UTF-8
46,722
3.171875
3
[]
no_license
SET statement_timeout = 0; SET lock_timeout = 0; SET idle_in_transaction_session_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings = on; SELECT pg_catalog.set_config('search_path', '', false); SET check_function_bodies = false; SET xmloption = content; SET client_min_messages = warning; SET row...
true
e7ff9a760b8f53bc211169083c58c3fb0100015d
SQL
Leocardoso94/cursophp7-udemy
/backup.sql
UTF-8
2,013
3.515625
4
[]
no_license
/* SQLyog Ultimate v12.09 (32 bit) MySQL - 5.5.16 : Database - php7 ********************************************************************* */ /*!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
ee6c2cc5d5be3fb6733f370abfa6f9a3fbc6d1f9
SQL
Squibs/freeCodeCamp
/Relational Database/Learn Relational Databases by Building a Mario Database/mario.sql
UTF-8
12,106
3.15625
3
[]
no_license
SELECT pg_terminate_backend(pg_stat_activity.pid) FROM pg_stat_activity WHERE usename = 'freecodecamp'; -- -- PostgreSQL database dump -- -- Dumped from database version 12.3 (Debian 12.3-1.pgdg90+1) -- Dumped by pg_dump version 12.3 (Debian 12.3-1.pgdg90+1) SET statement_timeout = 0; SET lock_timeout = 0; SET idle_...
true
4a0a28fe704739d06f2dbcc6bf023aa17d2f101c
SQL
Andtit4/monstage
/monstage.sql
UTF-8
4,059
3.21875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.3 -- https://www.phpmyadmin.net/ -- -- Hôte : 127.0.0.1 -- Généré le : ven. 04 juin 2021 à 21:16 -- Version du serveur : 10.4.14-MariaDB -- Version de PHP : 7.2.34 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_S...
true
8ec8d7431e70012a5265ef943afdbc59ec6b8a29
SQL
JoshuaMines/SQL
/order.sql
UTF-8
646
3.921875
4
[]
no_license
CREATE TABLE orders ( order_id SERIAL PRIMARY KEY, person_id SERIAL, prodcuct_name VARCHAR(23), product_price DECIMAL (10,2), quantity INTEGER ); INSERT INTO orders (prodcuct_name, product_price, quantity) VALUES ('BALL', 6.00, 5), ('CHAIR', 25.33, 4), ('CALENDAR', 20.29, 12), ('POSTER', 12.22, 13), ('CUP'...
true
c064e8f2833bc74ce2ffca14591d21e42ad4195e
SQL
wonhyukc/mySQL
/206-04 연습01.sql
UTF-8
3,048
4.4375
4
[]
no_license
use hr; select * from employees ; -- 1 모든 직원의 평균 연봉 -- 2. 2000년 이후 입사자 평균 연봉 -- 3. 부서별 평균연봉 -- 4. 부서별 평균 연봉 이 전체 평균연봉 보다 낮은 부서 -- 5. 2000년 이후 입사자 만 대상으로 -- 부서별 평균 연봉 이 전체 평균연봉 보다 낮은 부서 -- 2000년 이후 입사자만 출력 select * from employees where hire_date >= '2000-01-01' ; -- manager_id가 null이면 0으로 입력 null 이 아니면 ...
true
26734786709ca97bad84e13db5c72782d743c23a
SQL
jast92/ironhack-lab-solution
/W2D2/lab-sql-4.sql
UTF-8
1,028
4.125
4
[]
no_license
use sakila; #1. Get film ratings. select distinct rating from film; #2. Get release years. select distinct release_year from film; #3. Get all films with ARMAGEDDON in the title. select title from film where title LIKE '%ARMAGEDDON%'; #4. Get all films with APOLLO in the title select title from film where title...
true
b458e3957ef1b3fed4b842f787ab29ea31ad58a5
SQL
Bobbypip/master-php
/aprendiendo-sql/04-DML/update.sql
UTF-8
212
2.671875
3
[]
no_license
# MODIFICAR FILAS / ACTUALIZAR DATOS # # SE ACTULIZA TODA LA COLUMNA DE fecha A LA VEZ # UPDATE usuarios SET fecha=CURDATE(); # SE ACTUALIZA SOLO EL id 4 # UPDATE usuarios SET fecha='2019-07-09' WHERE id = 4;
true
5fdcad6d9e6738378bb5dc5454acc3ee3d6b6329
SQL
lelgenio/fsg-db-trabalho1
/ex2.sql
UTF-8
598
3.46875
3
[]
no_license
-- Selecionar todas os EMPREGADOS que respondem para o GERENTE FINANCEIRO. Listar primeiro e último nome, e nome do gerente, e cargo de ambos. SELECT EMPREGADO.PRIMEIRO_NOME, EMPREGADO.ULTIMO_NOME, DEPARTAMENTOS.DEPARTAMENTO_NOME, GERENTE.PRIMEIRO_NOME AS 'GERENTE' FROM EMPREGADOS AS EMPREGADO, DEPARTAMENTOS, ...
true
8300f0efcadc7c5fe6f9fdd34d462079f36a69b9
SQL
RTI-Soluctions/kemal-rest
/kemal-rest.sql
UTF-8
2,309
3.28125
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.7.8 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: Apr 17, 2018 at 05:00 AM -- Server version: 5.7.21 -- PHP Version: 7.1.14 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACT...
true
a277f005f33ef3b0e133f08fdd2cc455ff0650a2
SQL
PlainSightAnalytics/WCG
/WCG_DW/model/Views/Violation Charge.sql
UTF-8
966
2.734375
3
[]
no_license
 CREATE VIEW [model].[Violation Charge] AS ------------------------------------------------------------------------------------------ -- Author : Generated from Model -- Date Created : 06 May 2018 1:44:35 PM -- Reason : Semantic View for dbo.DimViolationCharge -- Modified By ...
true
6c6f6e07c64a36ec378e8952206647fc2072086f
SQL
Denabramov054/servicelogs
/migrate/000002_likes.up.sql
UTF-8
186
3.078125
3
[]
no_license
CREATE TABLE likes ( id serial primary key, user_id integer REFERENCES users (id), video_id int not null, created_at TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP );
true
1644d3de587363f46a0d9214642454653603f270
SQL
TheHammerGuy94/MOBAPDE-MP
/Shuffle/DB Shuffle.sql
UTF-8
926
3.78125
4
[]
no_license
CREATE SCHEMA db_shuffle; USE db_shuffle; CREATE TABLE sh_playlist( _id INT PRIMARY KEY AUTO_INCREMENT, name VARCHAR(45) NOT NULL, status INT DEFAULT 1, dateAdded DATETIME DEFAULT CURRENT_TIMESTAMP ) engine = innoDB; CREATE TABLE sh_playlist_songs ( _playlistId INT, song VARCHAR(45), status INT...
true
8aed95fab92c419e58e7a2df968a7291f9e24b9d
SQL
nconforti93/cheatsheets
/Import Demo Data/flights.sql
UTF-8
19,027
2.953125
3
[]
no_license
-- BASED ON FLIGHTS schema in demodb CREATE OR REPLACE CONNECTION EXASOL_DEMO_DATA TO '' --Need to fill in where this data resides USER '' -- hope it's not needed IDENTIFIED BY '' -- hope it's not needed CREATE SCHEMA FLIGHTS; CREATE TABLE "AIRLINE" ( "AIRLINE_ID" INTEGER, "AIRLINE_NAME...
true
20126987d241e21a5a2e38e8ca42d623dcab7d45
SQL
SotirisKavv/Cloud-TUC
/Initial/mysql/init.sql
UTF-8
502
3.359375
3
[]
no_license
CREATE DATABASE IF NOT EXISTS mydb; USE mydb; CREATE TABLE IF NOT EXISTS Teachers ( ID varchar(255) NOT NULL, NAME varchar(255), SURNAME varchar(255), USERNAME varchar(255) NOT NULL UNIQUE, PASSWORD varchar(255) NOT NULL, EMAIL varchar(255), PRIMARY KEY (ID) ); CREATE TABLE IF NOT EXISTS S...
true
77bcca28ea576e2a1b124f037f36f9713483b9f5
SQL
humantom88/geekbrains-databases
/homework5/task2.sql
UTF-8
2,299
3.71875
4
[]
no_license
# 2. Таблица users была неудачно спроектирована. # Записи created_at и updated_at были заданы типом VARCHAR # и в них долгое время помещались значения в формате "20.10.2017 8:10". # Необходимо преобразовать поля к типу DATETIME, сохранив введеные ранее значения. DESC users; ###### Подготовка # В исходной базе столбцы ...
true
2f71b61a5b693d82cc1e8e4bd30786ab6311df1b
SQL
djwood95/Blog
/blog.sql
UTF-8
2,213
3.265625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.6.6deb5 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3306 -- Generation Time: Oct 16, 2019 at 11:47 AM -- Server version: 5.7.27-0ubuntu0.19.04.1 -- PHP Version: 7.3.7-1+ubuntu18.10.1+deb.sury.org+1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101...
true
03963f37bb3d17bde9744b79f8dd82c76720f4d5
SQL
derari/quid-accidit
/mysql/old/createschema.sql
UTF-8
15,145
3.5625
4
[]
no_license
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='TRADITIONAL,ALLOW_INVALID_DATES'; DROP SCHEMA IF EXISTS `accidit` ; CREATE SCHEMA IF NOT EXISTS `accidit` DEFAULT CHARACTER SET latin1 COLLATE latin1_...
true
8ea94bfe6c9bfa5fde6bf345c20dd2cac3f971f3
SQL
smilefengxiaoyan/smile
/Self-project/db/personnel_man.sql
UTF-8
3,768
2.9375
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : localhost_3306 Source Server Type : MySQL Source Server Version : 50721 Source Host : localhost:3306 Source Schema : personnel_man Target Server Type : MySQL Target Server Version : 50721 File Encoding : 65001 Date: 17/0...
true
1592b704075c2e48f73f93c92acc14cab315e31f
SQL
christian-gardner/LA-Tables
/la_assign_detail.sql
UTF-8
958
3.03125
3
[]
no_license
ALTER TABLE LA_ASSIGN_DETAIL DROP PRIMARY KEY CASCADE; DROP TABLE LA_ASSIGN_DETAIL CASCADE CONSTRAINTS; CREATE TABLE LA_ASSIGN_DETAIL ( BILLING_CODE VARCHAR2(20 BYTE), WRITE_OFF_AMOUNT VARCHAR2(30 BYTE), WRITE_OFF_REASON_CODE VARCHAR2(10 BYTE), WRITE_OFF_REASON VARCHAR2(1000 ...
true
aad512b575dc6de10d0f36db7e2b2aeb46d1b21e
SQL
pedrooaugusto/curso-tecnico-projects
/LP2/docs/SQL.sql
UTF-8
16,567
3.21875
3
[ "Apache-2.0" ]
permissive
-- MySQL Administrator dump 1.4 -- -- ------------------------------------------------------ -- Server version 5.6.17 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; ...
true
739a8c27f1e152e79ce201a70c77ddc6cc0f0a22
SQL
danielrpg/POS
/db/pos.sql
UTF-8
23,895
3.0625
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : localhost Source Server Version : 50508 Source Host : localhost:3306 Source Database : pos Target Server Type : MYSQL Target Server Version : 50508 File Encoding : 65001 Date: 2013-09-09 16:44:45 */ SET FOREIGN_KEY_CHECKS=0; -- -----...
true
f26eec6b6ecfc50b081d43fa83650acb4a7acda1
SQL
BgeeDB/bgee_pipeline
/pipeline/download_files/insert_download_file_info.sql
UTF-8
5,930
3.171875
3
[ "CC0-1.0" ]
permissive
-- TODO enable multispecies groups when necessary -- TODO fix insertion of download files -- query to get the single species data groups for easier generation of this file: SELECT speciesDisplayOrder, IF(speciesCommonName IS NOT NULL AND speciesCommonName != '', speciesCommonName, CONCAT(genus, ' ',...
true
0ee88da3700cc3a5493d7bde13bd455aea228b21
SQL
ronniejoshua/seeking-alpha-sql-home-assignment
/5_time_series_dru_paying_subscription.sql
UTF-8
2,524
4.28125
4
[]
no_license
/* QUESTION 5: Create a time series of DRU that are also paying for a subscription, the results should be a table with ts_Date column and 3 DRU columns (one for all paying, one for paying for pro, one for paying for mp) You can use the subscription table to determine who is a paying subscriber. Dialect: POSTGRESQ...
true
861b4a49f0763ff959741d3ea672e109cf29b986
SQL
citusdata/pg_cron
/pg_cron--1.2--1.3.sql
UTF-8
1,428
3.75
4
[]
permissive
/* pg_cron--1.2--1.3.sql */ CREATE SEQUENCE cron.runid_seq; CREATE TABLE cron.job_run_details ( jobid bigint, runid bigint primary key default nextval('cron.runid_seq'), job_pid integer, database text, username text, command text, status text, return_message text, start_time timestamptz, end_time timestamptz...
true
df0e9562e2c98c8a6131a3b41780d60e7a1d4678
SQL
cquzxy/remote-testbed
/remote-db/remote_core/tables/tbl_site.sql
UTF-8
346
3.078125
3
[]
no_license
drop table if exists site; CREATE TABLE site ( `id` int(11) unsigned NOT NULL auto_increment, `sitename` varchar(50) NOT NULL, `position_id` int(11) unsigned default NULL, PRIMARY KEY (`id`), CONSTRAINT `fk_site_pos` FOREIGN KEY (`position_id`) REFERENCES `position` (`id`) ) ENGINE = InnoDB; insert into site(si...
true
c0b0f840c6c7be634d6faa7013d5e64c13582782
SQL
duke326/SWE-241
/SWE-243/Answer/Exercise4_2.sql
UTF-8
1,555
4.1875
4
[]
no_license
select distinct vendor_name from vendors where vendor_id in (select vendor_id from invoices) order by vendor_name; -- exericse 2 select invoice_number, invoice_total from invoices where payment_total >(select avg(payment_total) from invoices where payment_total>0); -- exercise 3 select account_number,account_descri...
true
5bc54b5e75402c17de762c8f0fd8905b357c8771
SQL
mavn2/employee-database
/db/seeds.sql
UTF-8
595
3.140625
3
[ "MIT" ]
permissive
USE employee_db; -- Test department data INSERT INTO departments (name) VALUES ('Marketing'),('Development'); -- Test role data INSERT INTO roles (title, salary, department_id) VALUES ('Manager', 60000, 1),('Associate', 40000, 1),('Intern', 0, 1), ('Lead', 60000, 2), ('Engineer', 45000, 2); -- Test employee data INS...
true
daf2ee82c09595092f5015716ee673276421bed5
SQL
gfis/dbat
/etc/sql/sample_worddb_create.sql
UTF-8
494
2.65625
3
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
-- @(#) $Id$ -- Sample for the creation of a test database -- Caution: modify the password! -- 2017-04-19, GEorg Fischer: -- to be run with: -- mysql -u root -p -- source <this file> -- quit -- DROP DATABASE IF EXISTS worddb; CREATE DATABASE worddb DEFAULT CHARACTER SET utf8 COLLATE utf8_bin; USE worddb;...
true
25403f93001d9427b11424ee13e6972f0639de1f
SQL
fandashtic/arc_chennai
/Sivabalan-SQL/VIEW/V_Customer_Master.sql
UTF-8
1,557
3.203125
3
[]
no_license
Create VIEW [V_Customer_Master] ([Customer_ID],[Customer_Name],[Channel_Type],[Customer_Category],[Sub_Channel],[Phone_Number],[Email], [Default_Payment_Mode],[Contact_Person], [Billing_Address],[Shipping_Address],[DefaultBeat],[Area],[CG_CreditLimit_YN],[Credit_Term], [Credit_Limit],[No_of_Open_Invoices],[Crea...
true
249ca2e829ca87c8000d9f24b75a3e8adddc6b28
SQL
kooyeun/mysql-practice
/sql-practices/practice02/practice02.sql
UTF-8
1,709
4.4375
4
[]
no_license
-- 집계함수 -- 예제1 -- salaries 테이블에서 현재 전체 직원의 평균급여 출력 select avg(salary),max(salary) from salaries where to_date = '9999-01-01'; -- 왜 null 로 나오지?? -- 예제2 -- salaries 테이블에서 사번이 10060인 직원의 급여 평균과 총합ㄱalterㅖ를 출력 select avg(salary),sum(salary) from salaries where emp_no=10060; -- 예제3 -- 이 예제 직원의 최저 임금을 받은 시기와 최대 임금을 "받은 시기"...
true
c6c1af85633fb201442283530fc2375eebd2b7e5
SQL
sanzidul-islam/OBJECT-ORIENTED-PROGRAMMING-2-C-_PROJECT
/Customer-details/SQLQuery1.sql
UTF-8
931
3.671875
4
[]
no_license
CREATE DATABASE CUSTOMER_DB; CREATE TABLE CUSTOMER_DETAILS ( NAME VARCHAR(50), MOBILE INT PRIMARY KEY, ADDRESS_ VARCHAR(50), AMOUNT INT, DATE_ VARCHAR(50), USER__NAME VARCHAR(50), PASS VARCHAR(50), PICTURE IMAGE ); DELETE FROM CUSTOMER_DETAILS WHERE MOBILE='1765532849'; CREATE TABLE CUSTOMER_COMMENTS ( COMMENT VARCHA...
true
25c2e54836c157f5abc0b6a152e84f58eae7fc07
SQL
lucasgomescosta/shhopping-api
/src/main/resources/db/migration/V1__create_shop_table.sql
UTF-8
336
3.1875
3
[]
no_license
create schema if not exists shoppings; create table shoppings.shop ( id bigserial primary key, user_identifier varchar(100) not null, date timestamp not null, total float not null ); create table shoppings.item ( shop_id bigserial REFERENCES shoppings.shop(id), product_identifier varchar(100) not null, price f...
true
f161850bd46b0df27a16909ebd6336860ff7dfba
SQL
Pandailo/MiniProjetGl
/init_sql.sql
UTF-8
738
3.140625
3
[]
no_license
DROP TABLE PGL_Musique; CREATE TABLE PGL_Musique(id INTEGER,titre VARCHAR2(25),duree INTEGER,artiste VARCHAR2(50)); CREATE OR REPLACE TRIGGER trigger_PGL_id BEFORE INSERT ON PGL_Musique FOR EACH ROW DECLARE idm INTEGER; BEGIN SELECT max(id) INTO idm FROM PGL_Musique; IF idm IS NOT NULL THEN idm:=idm+1; :new.i...
true
993770f67bb802534064e8d0b3aae86e4cb849b3
SQL
sbilly/lanmap2
/data/gen-db.sql
UTF-8
13,523
3.125
3
[]
no_license
-- ex: set ff=dos ts=2 et: -- SQL for sqlite3 -- a few aspects we see repeated: -- earliest/latest -- our database is meant to store data over a long period of time, -- but due to the very high level of repeated data in a network we -- cannot store one record per instance. therefore, for each piece -...
true
ddb66541bf2894594d19ee927617d3d33cfa7bd1
SQL
anirbanbagchi1979/SummitOrders
/SummitOrders_Code/EBS_Codebase/1.5_xx_cr_db_orderDetailsRec.sql
UTF-8
1,366
2.625
3
[]
no_license
/*drop TYPE xx_mdx_order_tab; / drop TYPE xx_mdx_order_rec; / drop type xx_mdx_orderline_tab; / drop type xx_mdx_orderline_rec; / */ CREATE TYPE xx_mdx_order_rec as object ( header_id number, Order_Number number, order_Status varchar2(50), Order_Date date, Order_Amount number, order_Currency varchar2(5), check_numb...
true
d5c616e1d75e45f876c5d4f6c11454a6b7c257cc
SQL
chamb-ferly/sql_challenge
/schema.sql
UTF-8
610
3.296875
3
[]
no_license
--build tables and import csv create table departments ( dept_no text, dept_name varchar); create table dept_emp ( emp_no int, dept_no text, from_date date, to_date date); create table dept_manager ( dept_no text, emp_no int, from_date date, to_date date); create table employees ( emp_no int, birth_date date, first_nam...
true
44c7a5553f02fe15836aceee363f639e012769ec
SQL
ShahakBH/jazzino-master
/bi/bi-dbdw/src/main/resources/deltas/140.sql
UTF-8
1,436
3.625
4
[]
no_license
CREATE TABLE IF NOT EXISTS `APP_REQUEST` ( `ID` int(11) NOT NULL AUTO_INCREMENT, `TARGET_CLIENT` varchar(50) NOT NULL, `TITLE` varchar(256) NOT NULL DEFAULT '', `DESCRIPTION` varchar(256) NOT NULL DEFAULT '', `MESSAGE` varchar(100) NOT NULL DEFAULT '', `TRACKING` varchar(2048) DEFAULT NULL, `TARGET_COUNT`...
true
ab2fa48ea9c7a35d1bca05864d3ae22c5de8c764
SQL
LeoMartinsBDS/SQL
/view.sql
UTF-8
465
3.40625
3
[]
no_license
CREATE VIEW V_RELATORIO AS SELECT C.NOME, C.SEXO, IFNULL(C.EMAIL,'SEM EMAIL') AS "E-MAIL", T.TIPO, T.NUMERO, E.BAIRRO, E.CIDADE, E.ESTADO, FROM CLIENTE C INNER JOIN TELEFONE T ON C.IDCLIENTE = T.ID_CLIENTE INNER JOIN ENDERECO E ON C.IDCLIENTE = E.ID_CLIENTE --APOS CRIAR A VIEW --N É RECOMENDADO POR CAUSA D...
true
6a2052fe808f3166e1b482444e283653376d3adf
SQL
wajahata99/myrepo
/SQLScript/Bridge schmea DWH/Queries/pivoting_myquery.sql
UTF-8
17,428
3.765625
4
[]
no_license
--Simple use case of UK, i.e. one date and one process segment --All conditions and aggregates inside --Results mactch select x.date_actual, x.process_segment_name, (x.availability), (y.effectiveness), (z.oee) from ( Select d.date_actual, p.process_segment_name, k.id, round(avg(F.value_mean),2) as availability From d...
true
e13b8cbd0d4bcea05ca77dbc50d87b91ff6bf5cb
SQL
Frimish/rent_house
/source/create.sql
UTF-8
14,278
4
4
[]
no_license
drop database if exists renting; create database renting default charset=utf8; use renting; -- 用户信息表 create table t_user( id int primary key auto_increment comment '用户主键', loginname varchar(32) comment '用户登录名', nickname varchar(50) comment '昵称', password varchar(32) not null comment '密码', phone varchar(...
true
d873fc3a948f6ec0b06776102228c700ca8bc6c3
SQL
WPI-SGA-Financials/Financial-Database-SQL
/Stored Procedure/Budget Allocation Stored Procedure.sql
UTF-8
244
3.0625
3
[]
no_license
Drop PROCEDURE if exists dashBudgetAlloc; Create PROCEDURE dashBudgetAlloc(IN FY integer(2)) SELECT concat('$', format(sum(`Amount Proposed` + `Approved Appeal`), 2)) as 'Total Budget' FROM Budgets WHERE `Fiscal Year` like concat('%', FY, '%');
true
d42b9dbdd39a0d887f134bad99cf888781a205a1
SQL
kevinthesiya242/quick
/quick.sql
UTF-8
10,647
2.78125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jun 23, 2019 at 09:38 AM -- Server version: 10.1.33-MariaDB -- PHP Version: 7.2.6 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
true
87b34312a4816b4a41be30dd54510d5b8ccb2af7
SQL
xiaosatufu/emos_online
/source/tool/emos.sql
UTF-8
23,528
3.3125
3
[]
no_license
/* Navicat Premium Data Transfer Source Server : localmysql Source Server Type : MySQL Source Server Version : 80023 Source Host : localhost:3306 Source Schema : emos Target Server Type : MySQL Target Server Version : 80023 File Encoding : 65001 Date: 16/04/2021 09:5...
true
21c216eb9c6d285f864d3d95d3e8faa8a4218ee7
SQL
MiroX3600/El-Pica-LapisLazuli
/PIA/ProyectoFinal (P6).sql
ISO-8859-1
24,804
3.53125
4
[]
no_license
Create database ProyectoFin use ProyectoFin Create table PtoDeVenta ( Pto_ID int not null primary key, Calle varchar (50) not null, Colonia varchar (50) not null, Ciudad varchar (50) not null, Estado varchar (50) not null, Pais varchar (50) not null, Ubicacion as (Calle + ', ' + Colonia + ', ' + ...
true
2837d282d44800d208d61abe2a9d5ca3c1b9247b
SQL
LetsDoIt-n/Web-Application
/expense.sql
UTF-8
570
3.484375
3
[]
no_license
create database expense_record_db; use expense_record_db; create table expenseCategory( category_id int primary key auto_increment, category_name varchar(100) not null )Engine=InnoDB; create table expense( expense_id int primary key auto_increment, expense_date datetime not null, expense_category...
true
5ae3d001690f2afab35989cb1b6a07e4983aa166
SQL
alex-c4/PruebaUniversidadLaboratorio1
/scripts SQL/tables/stadiums.sql
UTF-8
3,311
2.78125
3
[ "MIT" ]
permissive
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; CREATE TABLE `stadiums` ( `id` int(11) NOT NULL, `name` varchar(150) COLLATE utf8_spanish_ci NOT NULL, `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, `updated_by` int(11) NOT NULL, `updated_at`...
true
61d2bb230e5a1571d2525e475ab83c0c3476fc2d
SQL
danhnguyen-agilityio/spring-boot
/courses/spring-jdbc/ride-tracker/src/main/resources/data.sql
UTF-8
303
2.734375
3
[]
no_license
create table `ride` ( `id` int not null auto_increment, `name` varchar(100) not null, `duration` int not null, primary key (`id`)); alter table `ride` add ride_date DATETIME AFTER duration; insert into ride (name, duration) values ('Bike',45); insert into ride (name, duration) values ('Motobike',60);
true
a404bb847a4506fda4ce8c3a8b1bb07d3a9e0b3f
SQL
haririjal/Online-Examination-System
/database/cee_db.sql
UTF-8
10,547
3.15625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Sep 02, 2021 at 07:39 AM -- Server version: 10.1.34-MariaDB -- PHP Version: 7.2.7 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
true
ad63b0be1dd5526eccf8a00260ab9f0b4c3c129d
SQL
Biggig/database
/code/test12/q1.sql
GB18030
453
2.796875
3
[]
no_license
--дһǶ޸studentsij¼ڲteachersһ¼ʾڲʧܺ޸IJع BEGIN TRAN UPD_STU UPDATE STUDENTS SET GRADE = 2000 WHERE SID='800001216' BEGIN TRAN UPD_TEA INSERT INTO TEACHERS VALUES('123456780', '', '', '') IF @@ERROR != 0 BEGIN ROLLBACK TRAN UPD_STU PRINT 'FAIL' RETURN END COMMIT TRAN UPD_TEA COMMIT TRAN UPD_STU ...
true
71f072527eb28693ceccbff010a94524531c7a23
SQL
Code-4-Community/speak-for-the-trees-backend
/persist/src/main/resources/db/migration/V1__AuthTables.sql
UTF-8
809
3.34375
3
[]
no_license
CREATE TABLE IF NOT EXISTS blacklisted_refreshes ( refresh_hash VARCHAR(64) PRIMARY KEY, expires TIMESTAMP NOT NULL ); CREATE TABLE IF NOT EXISTS users ( id SERIAL PRIMARY KEY, first_name VARCHAR(36), last_name VARCHAR(36), username VARCHAR(36), email VARCHAR(36) UNIQUE NOT NULL, pass_h...
true
d5f4748506ffc53cfceb112d1c65b63803147391
SQL
javaducky/cbtf
/family2family/src/main/resources/data-dev.sql
UTF-8
32,048
2.75
3
[ "Unlicense" ]
permissive
-- noinspection SqlNoDataSourceInspectionForFile --reference data INSERT INTO CATEGORY(CATEGORY_ID, ACTIVE, DESCRIPTION) VALUES (1, TRUE, 'Physical Challenges'), (2, TRUE, 'Treatments'), (3, TRUE, 'Educational Issues'), (4, TRUE, 'Behavioral/Cognative Issues'), (5, TRUE, 'Environment'), (6, TRUE, 'Organizations'); IN...
true
7243ced8a043d345576eb1ca49dbfbe55e9c3110
SQL
goodsoul1914/DBA
/Scripts/Community/Michael J Swart/CollectWaitStats/WaitStats/DropObjects.sql
UTF-8
325
2.53125
3
[]
no_license
IF EXISTS ( SELECT * FROM msdb.dbo.sysjobs WHERE name = 'CollectWaitStats' ) BEGIN EXEC msdb.dbo.sp_delete_job @job_name = 'CollectWaitStats'; END; DROP PROCEDURE IF EXISTS dbo.s_CollectWaitStats; DROP PROCEDURE IF EXISTS dbo.s_WaitStatsHistogram; DROP VIEW IF EXISTS dbo.ImportantWaits; DROP TABLE IF EXISTS dbo.WaitS...
true
e45558491c92bb9dea4219c6b6db7a0b7841eb85
SQL
jtcies/comcast-task
/jtc-sql-test.sql
UTF-8
1,964
4.1875
4
[]
no_license
-- using SQL Server syntax -- question 1 SELECT r.ACCT_NUM, r.PRODUCT, CASE WHEN r.PRODUCT = 'VEG' THEN 'Vegetable' WHEN r.PRODUCT = 'HOT DOG' THEN 'Hot Dog' WHEN r.PRODUCT = 'COOKIE' THEN 'Cookie' ELSE 'other' END as PROD2, r.MONTH, r.REVENUE FROM FINANCE.REVENUE as r -- question 2 ...
true
b6ddb665a28276f9a44b828202aa16c289380fab
SQL
thomasbroussard/2015s2f1
/IamCore/sql_scripts/create_table_identities.sql
UTF-8
207
2.546875
3
[]
no_license
CREATE TABLE IDENTITIES ( ID INTEGER NOT NULL GENERATED ALWAYS AS IDENTITY (START WITH 1, INCREMENT BY 1), DISPLAY_NAME VARCHAR(255), EMAIL_ADDRESS VARCHAR(255), BIRTHDATE DATE, UID VARCHAR(25) )
true
ec42f245d7fdba510f806c101af60b473cf88856
SQL
Jai4/SQL
/HackerRank/Basic Join/AfricanCities.sql
UTF-8
199
3.9375
4
[]
no_license
//Given the CITY and COUNTRY tables, query the names of all cities where the CONTINENT is 'Africa'. SELECT C.NAME FROM CITY C INNER JOIN COUNTRY P ON C.COUNTRYCODE=P.CODE WHERE P.CONTINENT='Africa'
true
ddc434cece48294339aa65aa3367183ffb86efa2
SQL
diahrissa/Tugas-Praktikum-SOAP-Web-Service
/wsmusik/dbmusik.sql
UTF-8
1,988
3.203125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.9.1 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: May 19, 2021 at 04:46 PM -- Server version: 8.0.18 -- PHP Version: 5.6.39 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACT...
true
74ab58fd0601820a7d7d4bfe3bf2689f3d18276f
SQL
Mirgiacomo/api_rest_example
/dump.sql
UTF-8
2,328
3.078125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Creato il: Apr 03, 2021 alle 09:45 -- Versione del server: 10.4.14-MariaDB -- Versione PHP: 7.2.33 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIEN...
true
85af9eaf706c1731b32aa8cdbbb9bef3cb916b38
SQL
objectledge/coral
/coral-tools/src/main/java/org/objectledge/coral/tools/refcheck/IntegrityChecker$resourceDomains.sql
UTF-8
487
3.953125
4
[]
no_license
select ad.resource_class_id attribute_class_id, ar.name attribute_class_name, ad.attribute_definition_id, ad.name ad_name, ad.domain, dr.resource_class_id domain_class_id, ar.db_table_name from coral_attribute_class ac join coral_attribute_definition ad using (attribute_class_id) join coral_res...
true
c94ed54072795198c5feaa4235b7fa1bdabb5407
SQL
DriasFarouk/Piscine-PHP
/D05/ex08/ex08.sql
UTF-8
130
2.8125
3
[]
no_license
SELECT last_name, first_name, DATE(birthdate) AS birthdate FROM user_card WHERE YEAR(birthdate) = 1989 ORDER BY last_name ASC;
true
860610ee61378b820f5bcb53ebff6d32df5ecaad
SQL
steemcn/sole-server
/db/migrations/20160207192901_CreateTableSessions.sql
UTF-8
698
3.65625
4
[ "MIT" ]
permissive
-- +goose Up -- SQL in section 'Up' is executed when this migration is applied CREATE TABLE `sessions` ( `id` INT(11) NOT NULL AUTO_INCREMENT, `user_id` INT(11) NOT NULL, `token` CHAR(36) NOT NULL COMMENT 'token is v4 uuid', `type` VARCHAR(63) NOT NULL DEFAULT '' COMMENT 'type can be reset-password or verify-e...
true
0ea50135037945ec7660c0ec2554906b9a5fd655
SQL
jgoodhcg/chorechart
/resources/sql/add.sql
UTF-8
1,784
4.03125
4
[]
no_license
-- :name add-person! :! :n -- :doc creates a new person record insert into people (user_name, email, pass) values (:user_name, :email, :password) -- :name add-household! :<! :1 -- :doc creates a new household insert into households (house_name) values (:house_name) returning households.id as id -- :name add-roomate! ...
true
27e7c9eaa5784fb5ff817a87bfb42f030230224b
SQL
k0zakinio/arrange-anything
/src/main/resources/db/migration/V1__Create_Events_Table.sql
UTF-8
174
2.578125
3
[]
no_license
CREATE TABLE EVENTS ( id SERIAL PRIMARY KEY, title VARCHAR NOT NULL, owner_name VARCHAR NOT NULL, event_date VARCHAR NOT NULL, created_at TIMESTAMP DEFAULT NOW() );
true
cccb516f7293558dfb4accdaba22b925267a76ff
SQL
juliusskull/aiBsq
/aibsq.sql
UTF-8
3,654
3.1875
3
[]
no_license
-- -------------------------------------------------------- -- Host: 127.0.0.1 -- Versión del servidor: 5.5.25a - MySQL Community Server (GPL) -- SO del servidor: Win32 -- HeidiSQL Versión: 9.4.0.5125 -- -------------------------------------------------------- /...
true
f75fa576254f43d4635c4f54863ad45d47aa7751
SQL
mariomt/TopicosBD
/1.productos.sql
UTF-8
4,007
4.15625
4
[]
no_license
/*------------------------------*/ /*---------ESQUEMA_BD ---------*/ /*----------------------------*/ CREATE TABLE PRODUCTOS( ID INT(11) AUTO_INCREMENT, NOMBRE VARCHAR(80), MARCA VARCHAR(50), DESCRIPCION VARCHAR(255), PRECIO DOUBLE NOT NULL, PRIMARY KEY(ID) ); CREATE TABLE ORDEN_DESCRIPCION( ID INT(11), ID_PRODUCTO ...
true
8521321663729218263b67a8e8db4517ab67b93b
SQL
davidOrtiz09/marketplace_java
/conf/evolutions/default/1.sql
UTF-8
663
3.3125
3
[]
no_license
# Marketplace schema creation # === !Ups create table "usuarios" ("id" SERIAL NOT NULL PRIMARY KEY,"nombre" VARCHAR NOT NULL ,"apellido" VARCHAR NOT NULL); create table "productos" ("id" SERIAL NOT NULL PRIMARY KEY, "descripcion" VARCHAR NOT NULL, "precio" numeric(21,8) NOT NULL); create table "compras" ("id" SERIAL...
true
38abda87d0bbf9b3c83590f4ea98c51ce4bb28dc
SQL
JorgeAlcarazKuv/FashionWoW
/bd.sql
UTF-8
12,277
2.84375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.7.3 -- https://www.phpmyadmin.net/ -- -- Servidor: localhost:8889 -- Tiempo de generación: 24-02-2018 a las 01:09:09 -- Versión del servidor: 5.6.35 -- Versión de PHP: 7.1.8 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; -- -- Base de datos: `fashionwow` -- -- -...
true