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
4ff889a7bc196d10a132235f123a99e9b2015ec9
SQL
ddc67cd/database-scripts
/oracle/dba/stats_high_low_values_for_columns.sql
UTF-8
1,210
2.796875
3
[]
no_license
declare ty varchar2(100); lvr varchar2(100); hvr varchar2(100); lvd date; hvd date; lvn number; hvn number; lvv varchar2(100); hvv varchar2(100); begin select utc.data_type , utc.low_value , utc.high_value into ty...
true
090e6abb7b000ad2cc2587a7cba7c83561be715e
SQL
Speedwag00n/BisunesLogicOfProgramSystemsLab1
/scripts/create.sql
UTF-8
2,244
3.640625
4
[]
no_license
CREATE TYPE HOTEL_TYPE AS ENUM ('APARTMENT', 'HOTEL', 'GUEST_HOUSES', 'HOSTEL', 'BED_AND_BREAKFASTS', 'HOMESTAYS', 'CAPSULE_HOUSES', 'HOLIDAY_HOMES', 'LOVE_HOTELS', 'VILLAS', 'CAMPSITES', 'MOTELS', 'BOATS', 'COUNTRY_HOUSES', 'CHALETS', 'ECONOMY_HOTELS'); CREATE TYPE FOOD AS ENUM ('SELF_CATERING', 'BREAKFAST', 'THREE_M...
true
6a0282db2fe898fe60c6781abdfb7c0a4ccfeb79
SQL
arif1anto/donatur
/update.sql
UTF-8
652
3.421875
3
[ "MIT" ]
permissive
USE `donatur`; /* Alter table in target */ ALTER TABLE `donatur` CHANGE `tanggal_daftar` `tanggal_daftar` DATE NULL AFTER `foto_donatur` ; /* Create table in target */ CREATE TABLE `galeri`( `id` INT(11) NOT NULL AUTO_INCREMENT , `src` VARCHAR(255) COLLATE latin1_swedish_ci NULL , `ket` VARCHAR(100) COLLAT...
true
5440c3b99ef153655a25b68912deb50706329edb
SQL
renxiaowei-1991/Learn
/04-Oracle/01-baseSQLLearn/015-Oracle分区表.sql
GB18030
8,969
4.03125
4
[]
no_license
--& Oracleڷʽʵǽֶδ洢һͨһδ洢ֳɶΡ Բݹ̶ȶλݲѯλΧĸļڲȻڷڲȥݡ һһ㱣֤ʮݾͱȽˡ ǷҽάҲԽΪһ㣬ĴҲн 1 1) rangeʽ(Χ) Ҳdzõķʽͨijֶλ򼸸ֶεϵֵС󣬰ָķΧ˵з Insertݵʱͻ洢ָķС 2) listʽ(б) һrangeĶ϶࣬һоٷʽз һ㽫ijЩ״ָ̬ıȽл֡ 3) hashʽ ûй̶ĹOracleֻҪֵInsertȥOracleԶһHash㷨ȥַ ֻҪOracleҪּɡ ע⣺ 1ԽϣOracle 11gǰ϶rangeΪһĿͷOracleĿǰ֧2 2Ҫȴٲ 2ϰ /* * *ȷ * ΧֵݵʱֻҪһֵ...
true
aba45eeeecee64dee78df1fb1ce46f6d12cdb1ba
SQL
wesfree163/cs-hu
/CSC-570/HOE2_Creates.sql
UTF-8
1,973
3.5625
4
[ "MIT" ]
permissive
CREATE TABLE STUDENT ( StudentID int NOT NULL, Title varchar(5) NOT NULL DEFAULT 'M.', FirstName varchar(50) NOT NULL, MiddleName varchar(50) NOT NULL, LastName varchar(50) NOT NULL, Address varchar(50) NULL, Zip char(5) NOT ...
true
d2029127c1178adc86a21884ba6734fbac29d1dc
SQL
buyaoyongroot/wulin_java_resources_repository
/java案例/表现层/javaScript/json关于数据库版的应用/city.sql
GB18030
1,218
3.109375
3
[]
no_license
use mydb3; drop table if exists city; create table if not exists city( id int primary key auto_increment, city_name varchar(10) not null, province_name varchar(10) not null ); insert into city(city_name,province_name) values('','ʡ'); insert into city(city_name,province_name) values('','ʡ'); insert into city(city_nam...
true
23d6677f460e5d8e64023f3f83956c9b0f25483c
SQL
szkonopka/advanced-databases
/phase4/2.3/2.3.sql
UTF-8
695
3.296875
3
[]
no_license
alter system flush buffer_cache; alter system flush shared_pool; set autotrace traceonly statistics TIMING START 2.3_1; SELECT c.id, SDO_GEOM.SDO_DISTANCE(c.localization, so.localization, 0.005, 'unit=KM') as distance FROM customer c JOIN sales_outlet so ON c.home_sales_outlet_id = so.id ORDER BY distance DESC; TIMI...
true
5b51c3a128d42d07b1b5fd0a619b8a60c0f4f7a7
SQL
lucasopires/stock-market-app
/src/main/resources/db/schema.sql
UTF-8
471
3.203125
3
[]
no_license
--DROP TABLE IF EXISTS stock_fund_transaction; CREATE TABLE stock ( id SERIAL PRIMARY KEY, ticker VARCHAR(10) NOT NULL CHECK ticker <> '' ); CREATE TABLE stock_fund ( id SERIAL PRIMARY KEY, ticker VARCHAR(10) NOT NULL CHECK ticker <> '', name VARCHAR(100) NOT NULL CHECK name <> '' ); CREATE TABLE stock...
true
c6dd67fd23b95a974b35709513e25d7238079e2d
SQL
axelsheva/experience
/SQL-Tuning/ifi.uzh.ch/vn/ThucHanhCoSoDuLieu/N03_55353/PhamDacDuy_20090488_N0355353.sql
UTF-8
1,161
4.15625
4
[]
no_license
use AdventureWorks --1-- SELECT P.ProductNumber,P.ListPrice,P.Name FROM Production.Product as P,Sales.SalesOrderDetail as SOD WHERE YEAR(P.SellEndDate)=2002 AND MONTH(P.SellEndDate)=5 AND P.ProductID=SOD.ProductID group by P.Name,P.ProductNumber,P.ListPrice having COUNT(SOD.SalesOrderID)=0 --2-- SELECT CustomerID,SO...
true
6cb70a79e931d9033ebb9392c966db417d2117b1
SQL
dhionangga91/asset-management-system-v.1
/api/aset/db_aset.sql
UTF-8
2,667
3.15625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Waktu pembuatan: 28 Mar 2020 pada 05.48 -- Versi server: 10.4.11-MariaDB -- Versi PHP: 7.4.3 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARA...
true
e3d877cca9fe2709c996be5d430c3176bb0b10c2
SQL
vctrmarques/interno-rh-sistema
/rhServer/src/main/resources/db/migration/sprint_11/V1_2019_04_02_15_58__CREATE_TABLE_REQUISICAO_PESSOAL.sql
UTF-8
868
3.546875
4
[]
no_license
-- Railson Silva -- create table requisicao_pessoal IF NOT EXISTS (SELECT * FROM SYS.TABLES WHERE name = 'requisicao_pessoal') CREATE TABLE requisicao_pessoal ( id bigint NOT NULL IDENTITY(1,1), solicitante_id bigint not null, justificativa varchar(255) not null, situacao varchar(25) not null, data_entrada dateti...
true
cce752ffe6f7ae2ffa8e4e4cd4181080f0764a18
SQL
HernanGH/backend
/CLASE11/log.sql
UTF-8
2,162
2.71875
3
[]
no_license
CREATE TABLE `eventos`.`usuarios` ( `id` INT NOT NULL AUTO_INCREMENT , `nombre` VARCHAR(255) NOT NULL , `apellido` VARCHAR(255) NOT NULL , `edad` INT NOT NULL , `estado_civil` VARCHAR(255) NOT NULL , PRIMARY KEY (`id`)) ENGINE = InnoDB; INSERT INTO `usuarios` (`id`, `nombre`, `apellido`, `edad`, `estado_civil...
true
e5d992cda0a69c6cba9c880ad426430f916d36cc
SQL
cherednichenkoivan/IT
/Project/project.sql
UTF-8
2,428
3.171875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.6.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Mar 26, 2017 at 06:48 PM -- Server version: 5.7.15 -- PHP Version: 7.0.10 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */...
true
9a1233f5e9dce2a36fe14779d9c3c6d071663f49
SQL
XielinX/ssm-shiro
/springbootdb.sql
UTF-8
23,015
3.203125
3
[ "MIT" ]
permissive
/* Navicat Premium Data Transfer Source Server : Mysql Source Server Type : MySQL Source Server Version : 50722 Source Host : localhost:3306 Source Schema : springbootdb Target Server Type : MySQL Target Server Version : 50722 File Encoding : 65001 Date: 01/04/2020 1...
true
3dd662570c8efdf95b4518cdd88e6b14b06a39f0
SQL
WorkFilez/fliflet
/src/sql/overview.sql
UTF-8
452
3.796875
4
[]
no_license
USE fiflet; SET NAMES 'UTF8'; SELECT s.navn, COUNT( j.id_journal ) AS antall_dok, ROUND( AVG( DATEDIFF( j.jourdato, j.dokdato ) ) ) AS dager_jour, ROUND( AVG( DATEDIFF( j.pubdato, j.dokdato ) ) ) AS dager_pub FROM supplier s INNER JOIN journal j ON ( s.id_supplier = j.id_supplier ) WHERE j...
true
90595054671216350c5820c0d10f00d24d651504
SQL
bryanrmelo/portal-Funworks
/versoes/01.000.000.1/conta_pagar.sql
UTF-8
860
3.296875
3
[]
no_license
CREATE TABLE public.conta_pagar ( id int4 NOT NULL, data_prevista timestamp NOT NULL, data_vencimento timestamp NOT NULL, descricao varchar NOT NULL, qtd_replica_meses int4, replica_meses bool NOT NULL, valor numeric NOT NULL, conta_id int4 NOT NULL, contapagarrateio_id int4, empresa_id int4 NOT NULL, fornec...
true
4dc95eed859ddfd404f725e3a7aa04b83758098f
SQL
JamesHizon/Euro-Cup-2016-Mini-Project
/sql_q1_sol.sql
UTF-8
305
3.15625
3
[]
no_license
-- 1. Write a SQL query to find the date EURO Cup 2016 started on. -- Think: -- Ask question like, when was the first match? -- Then, go to match_mast table, and observe the play_date column. -- ORDER BY: play_date in ASC order. SELECT play_date FROM euro_cup_2016.match_mast LIMIT 1;
true
3238e2ff742d17f2ec88a385a4660d8746a949c2
SQL
processtec/storeapi
/DB/structure/store_alert.sql
UTF-8
2,458
3.234375
3
[ "MIT" ]
permissive
-- MySQL dump 10.13 Distrib 8.0.21, for macos10.15 (x86_64) -- -- Host: localhost Database: store -- ------------------------------------------------------ -- Server version 8.0.21 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; ...
true
0255e18b8458d6fcbe7299019d16129f29fc9539
SQL
jonpon/bookstore-awzm
/sql/bookstore_questions.sql
UTF-8
246
2.6875
3
[]
no_license
# connection # hostname: 127.0.0.1 # username: root # password: mysql # database: bookstore_awzm # select book by isbn SELECT * FROM books WHERE isbn = {isbn}; # select book by title SELECT * FROM books_with_authors WHERE title = {title}
true
2134639b08a869fae69dc61d139a81c080ec9038
SQL
sehong-park/influencer
/influencer.sql
UTF-8
1,710
3.84375
4
[]
no_license
create table books ( id serial primary key, title varchar(50), author varchar(50), image varchar(255) ); insert into books (title, author, image) values ('자바의정석', '남궁성', 'http://image.yes24.com/goods/24259565/L'); select * from books; create table users ( id serial primary key, email varchar...
true
c95c233133a453081f2c94b8a29c33fc90830165
SQL
maapsystem/MaapSystem
/sql_criação_do_banco.sql
UTF-8
3,851
3.59375
4
[]
no_license
-- CREATE DATABASE DB_SORVETUNES; CREATE TABLE `tbl_login` ( `id_usuario` int NOT NULL AUTO_INCREMENT, `cod_cliente` int NOT NULL UNIQUE, `nome` varchar(200) NOT NULL, `senha` char(20) NOT NULL, `data_login` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id_usuario`) ); CREATE TABLE `tbl_cliente` (...
true
8d885aa84016a0de2c3f3601ad22240bb3862367
SQL
cobyoram/sql-for-data-scientists
/sql_drill_02.sql
UTF-8
3,307
4.59375
5
[]
no_license
-- sql_drills_02 -- 1. Write a query that returns a list of all the unique values -- in the 'country' field. SELECT DISTINCT country FROM ksprojects; -- 2. How many unique values are there for the main_category -- field? What about for the category field? SELECT COUNT(DISTINCT main_category) FROM ksprojects; -- ...
true
aa07f9ec937b128e4ed1d42c44695f80d30f2506
SQL
shaunakv1/masters_course_work
/ror/Assign2/db/createSchema.sql
UTF-8
1,190
3.375
3
[]
no_license
drop table if exists publishers; create table publishers ( id INTEGER primary key, name varchar(100) not null ); INSERT INTO publishers VALUES(null, 'Tata'); INSERT INTO publishers VALUES(null, 'Allied'); INSERT INTO publishers VALUES(null, 'MGG'); drop table if exists authors; create table authors ( id INTEGE...
true
974efbd25c66496502bfec276d36e3624a239af2
SQL
FireCARES/data
/sources/nfirs/scripts/materialized_views/nist.ems_table_cnty.sql
UTF-8
8,650
3.40625
3
[ "MIT" ]
permissive
-- Materialized View: nist.ems_table_cnty CREATE MATERIALIZED VIEW nist.ems_table_cnty AS WITH f AS ( SELECT date_part('year'::text, coded_ems.inc_date) AS year, coded_ems.tr10_fid, count(*) AS calls FROM nist.coded_ems WHERE date_part('year'::text, coded_ems.inc...
true
bf8d1c44c7fc522c697ec0e45b574c83186af9c3
SQL
jtoews32/trade-services
/fx_services_sql/WebContent/currency_statistics_v5_views.sql
UTF-8
4,542
3.25
3
[]
no_license
DROP VIEW IF EXISTS CURRENCY_LIST_VIEW; DROP VIEW IF EXISTS AVERAGES_VIEW; DROP VIEW IF EXISTS STANDARD_DEV_VIEW; DROP VIEW IF EXISTS VIEW_OF_AVERAGES_VIEW; DROP VIEW IF EXISTS CURRENCY_LIST_VIEW_ACTIVE_RECORD; DROP VIEW IF EXISTS CURRENCY_OCCURENCE_STATUS_VIEW; DROP VIEW IF EXISTS PERIOD_MOVES_STATUS_VIEW; DROP VIEW I...
true
a22a337dce6b27a4df3eb9ea8a12115507d196c3
SQL
UlianaStefanishyna/distributed-calculation
/sql/scheme.sql
UTF-8
319
2.65625
3
[]
no_license
DROP SCHEMA distributed_calculation; CREATE SCHEMA distributed_calculation; CREATE TABLE IF NOT EXISTS calculated_data( id SERIAL8 NOT NULL , value DECIMAL NOT NULL , description VARCHAR(255), date TIMESTAMP NOT NULL , CONSTRAINT calculated_data_PK PRIMARY KEY (id) );
true
ce19f7df2ce3828aa2bc0ebf44827cdbedc14b7d
SQL
josepaulajr/Teste_ButiaInvestimentos
/exercicio2/exercicio2.sql
UTF-8
162
3.5
4
[]
no_license
/* QUERY SOLUÇÃO */ SELECT DATE_FORMAT(B.date, "%d/%m/%Y") as Date, A.close FROM BenchmarkPrice B LEFT JOIN AssetPrice A ON B.date = A.date ORDER BY B.date;
true
913d67015c615fc1dd3cecc9916ba9ad23aee500
SQL
XuejieGuo/Sql-practice
/Leetcode/512_GamePlayAnalysisII.sql
UTF-8
229
3.21875
3
[]
no_license
SELECT player_id, device_id FROM ( SELECT player_id, device_id, row_number() OVER (PARTITION BY player_id ORDER BY event_date) AS rn FROM Activity ) AS a WHERE rn = 1
true
f3bfa065834e8f7e534660ff207d97b8bc50287b
SQL
codemazecsg/Demo-Code
/sizing-sqldw/resize.sql
UTF-8
535
2.625
3
[]
no_license
ALTER DATABASE <sqldwname, nvarchar(30), mysqldw> MODIFY (SERVICE_OBJECTIVE = '<dwu, nvarchar(10), DW100c>'); WHILE ( SELECT TOP 1 state_desc FROM sys.dm_operation_status WHERE 1=1 AND resource_type_desc = 'Database' AND major_resource_id = '<sqldwname, nvarchar(30), 'mysqldw'>' ...
true
d03df306194ba2c56f8767f5833a1b11555d1502
SQL
PeterOswDev/SQLServerAdventureWorks2019
/AdventureWorkseExercises.sql
UTF-8
1,094
3.703125
4
[]
no_license
/*SELECT BusinessEntityID, JobTitle FROM HumanResources.Employee; SELECT DISTINCT JobTitle FROM HumanResources.Employee; --to eliminate all the duplicate records and fetching only unique records SELECT BusinessEntityID, JobTitle FROM HumanResources.Employee WHERE JobTitle = 'Research and Development Manager';...
true
f4d1ae57fe983215da250a89c0578e334158392d
SQL
bcgov/PIMS
/backend/dal/Migrations/v01.09.00/Up/PostUp/01-Agencies.sql
UTF-8
4,222
2.578125
3
[ "Apache-2.0" ]
permissive
PRINT 'Update Agencies - Ministries' MERGE INTO dbo.[Agencies] [Target] USING ( VALUES ( 'Advanced Education & Skills Training' , 'AEST' , 'AEST' , '' , null -- parent Id , 'kevin.brewster@gov.bc.ca' , 'Kevin' , 0 -- disabled , 1 -- send email ), ( 'Agriculture, Food and Fisheries' , 'AGRI' , 'AGRI' , '' ...
true
f40ec2af94a5d66e1d4543e30d6cca2138801558
SQL
bellmit/ws
/0 项目文档/.svn/pristine/c3/c3bf53a447707a9a5b5cbb62de606e6d8b72baa0.svn-base
UTF-8
1,021
3.25
3
[]
no_license
CREATE TABLE "LIFE".t_es_listeners ( listener_id NUMBER(9) NOT NULL, listener_name VARCHAR2(200 BYTE), listener_description VARCHAR2(500 BYTE), event_send_type NUMBER(3) DEFAULT 0, event_send_address VARCHAR2(200 BYTE), event_send_concurrency NUMBER(3) DEFAULT 1, CONSTRAINT pk_es_listeners PRIMARY KEY (li...
true
dfa06bf486cacc4b059a1e487074edad4711e599
SQL
bpeterson3134/teacherintouch
/WebContent/WEB-INF/sql/createTables.sql
UTF-8
3,083
4.21875
4
[]
no_license
CREATE database teacherintouch; USE teacherintouch CREATE TABLE teacher ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, first_name VARCHAR(25) NOT NULL, last_name VARCHAR(50) NOT NULL, gender CHAR(1) NOT NULL, homeroom VARCHAR(5), email VARCHAR(50), grade INT NOT NULL ); CREATE TABLE student ( id INT NOT NULL A...
true
9c26f74d14c17e56a2483df9215dabe59cdba713
SQL
dnfernandez/G3_ET3
/ET3 - Copy (2).sql
UTF-8
7,030
2.953125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.2.11 -- http://www.phpmyadmin.net -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 21-12-2014 a las 19:24:33 -- Versión del servidor: 5.6.21 -- Versión de PHP: 5.5.19 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARA...
true
7f98c61833d73da79c19f68388a9f653a6e87434
SQL
asikalo2/AirportApplication
/generate_database.sql
UTF-8
2,168
3.265625
3
[]
no_license
BEGIN TRANSACTION; CREATE TABLE IF NOT EXISTS `users` ( `id` integer NOT NULL, `name` varchar ( 25 ) NOT NULL, `role` integer NOT NULL, PRIMARY KEY(`id`), FOREIGN KEY(`role`) REFERENCES `roles`(`id`) ); INSERT INTO `users` VALUES (1,'Amila Sikalo',1); CREATE TABLE IF NOT EXISTS `roles` ( `id` integer NOT NULL, `...
true
9359b56e64185d6266395bcff7ef53703d12d225
SQL
augusbarbieri/Barbieri_4CSTC
/Barbieri_Cornejo/Base de datos/SQL/trabajo nube/Trabajo Practico Nube/.SQL/create database.sql
UTF-8
30,634
3.390625
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='TRADITIONAL,ALLOW_INVALID_DATES'; -- ----------------------------------------------------- -- Schema mydb -- -...
true
92309c313165e54bd03abcf55c89bed8acbb4226
SQL
jonsimpson10/sql-challenge
/EmployeeSQL/queries.sql
UTF-8
2,452
4.28125
4
[]
no_license
-- 1. List the following details of each employee: employee number, last name, first name, sex, and salary. SELECT emp.emp_no, emp.last_name, emp.first_name, emp.sex, s.salary FROM employees emp JOIN salaries s ON emp.emp_no = s.emp_no; -- 2. List first name, last name, and hire date for employees who were hired in 1...
true
0a8617e6f01835d9085f6caeeb0d20e929a1d7a2
SQL
guillez/ramas
/sql/ddl/60_FK/fk_mug_dptos_partidos_mug_provincias.sql
ISO-8859-2
689
3
3
[]
no_license
-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -- SIU-Kolla 4 - Mdulo de Gestin de Encuestas -- Versin 4.3 -- Tabla: mug_dptos_partidos -- FK: fk_mug_dptos_partidos_mug_provincias -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -- DROP INDEX ifk_mug_dptos_partidos_mu...
true
1c2443d1f9f2a2935aaba7340191d66ed00938ea
SQL
towhers10/appSecurity
/gestordeclaves.sql
UTF-8
6,182
2.859375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.9.0.1 -- https://www.phpmyadmin.net/ -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 29-12-2019 a las 01:19:40 -- Versión del servidor: 10.3.15-MariaDB -- Versión de PHP: 7.3.6 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"...
true
d914be5c4b9e85afced7aaad012d1b74902a222f
SQL
gerardZf2Comments/modules
/data/sql/0.sql
UTF-8
4,290
3.34375
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : local Source Server Version : 50150 Source Host : localhost:3306 Source Database : modules.zendframework.com Target Server Type : MYSQL Target Server Version : 50150 File Encoding : 65001 Date: 2012-10-07 20:53:33 */ SET FOREIGN_KEY_C...
true
65d338c785340e285b31adcdc67ac15d64de3070
SQL
SemyonYa/tv-back
/config/tvdb.sql
UTF-8
4,750
3.125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.9.0.1 -- https://www.phpmyadmin.net/ -- -- Хост: 127.0.0.1:3306 -- Время создания: Апр 18 2021 г., 23:01 -- Версия сервера: 5.6.43-log -- Версия PHP: 7.2.22 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_C...
true
e1956c89b91388076759c18e39bf9268cb8dede0
SQL
deco3500-2017/TeamSupreme
/AskLocal Final Prototype/asklocal.sql
UTF-8
4,650
3.203125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.7.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Oct 11, 2017 at 08:45 AM -- Server version: 10.1.26-MariaDB -- PHP Version: 7.1.9 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
true
30ebe3bb86a70677421eb604468c09fff54a278d
SQL
DeathKnightH/JavaTest
/src/main/java/cn/dk/sql/banch/random_datetime.sql
UTF-8
499
3.34375
3
[]
no_license
DELIMITER $$ USE `dk_test`$$ DROP FUNCTION IF EXISTS `random_datetime`$$ CREATE DEFINER=`root`@`%` FUNCTION `random_datetime`(startdate DATETIME, enddate DATETIME) RETURNS DATETIME BEGIN DECLARE interval_minute INT DEFAULT 0; DECLARE result_datetime DATETIME DEFAULT startdate; SET interval_minute = TIMES...
true
c613fa5258799fd8b1a729b98c21b65f1c9fd676
SQL
ozzy80/bookstore
/bookstore/etc/db/insert.sql
WINDOWS-1250
7,713
3.234375
3
[]
no_license
-- ----------------------------------------------------- -- Table `knjizara`.`autor` -- ----------------------------------------------------- INSERT INTO autor (`Ime`, `Prezime`, `Opis`) VALUES ("Bil", "Brajson", "Bil Brajson roen je 1951. godine u De Moinu u Ajovi. Na svom prvom putovanju po Evropi, s rancem na ...
true
6afbc284c4431b11af9bcadd74fc60ee3d9a7a4c
SQL
Ibrahim-Elsanhouri/Laravel-Restful-API
/larajwt.sql
UTF-8
7,110
2.71875
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.8.3 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: 25 فبراير 2019 الساعة 09:06 -- إصدار الخادم: 10.1.37-MariaDB -- PHP Version: 7.2.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @O...
true
560a7639586e47f526bba3d3b7f7365d71324a51
SQL
gercyc/ITE.ERP
/ITE_Development/ITE.Reports/Dashbords/view_lancamento_financeiros.sql
UTF-8
1,269
3.4375
3
[]
no_license
 SELECT (CASE WHEN lf.DataPagamento IS NULL AND lf.DataVencimento > GETDATE() THEN 'Aberto' WHEN lf.DataPagamento IS NOT NULL AND lf.StatusLancamento <> 3 AND lf.TipoLancamento = 0 THEN 'Pago' WHEN lf.DataPagamento IS NOT NULL AND lf.StatusLancamento <> 3 AND lf.TipoLan...
true
b91f7eeaad78e167d5234448c0f99cd13667b7d6
SQL
TvanSchagen/scm-ddg
/DummyDataGenerator/Queries/SQL/Adjacency List/Delete and Insert/Q9.sql
UTF-8
324
3.265625
3
[ "Apache-2.0" ]
permissive
DELETE consists_of FROM consists_of JOIN product ON consists_of.child_product_id = product.id JOIN supplies ON product.id = supplies.product_id JOIN activity ON supplies.activity_id = activity.id JOIN organization ON supplies.organization_id = organization.id WHERE organization.name = "Reilly - Toy" AND activity.name =...
true
f3531bcb0a8b6d21457c0813e4c9250a8f038f06
SQL
RT28/php_sample
/sql/document_types.sql
UTF-8
2,202
3.28125
3
[ "BSD-3-Clause" ]
permissive
/* SQLyog Community v12.09 (32 bit) MySQL - 10.1.19-MariaDB : Database - gotouniv_db ********************************************************************* */ /*!40101 SET NAMES utf8 */; /*!40101 SET SQL_MODE=''*/; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FORE...
true
c7f22b581317e415465484caa5dd52c16d4e8ea3
SQL
thinkpractice/DeepSolaris
/Queries/predictions_and_register_per_tile.sql
UTF-8
437
3.6875
4
[]
no_license
create table predictions_and_register_per_tile as ( select ti.uuid, max(mp.label) as model_label, case when count(pv.pv_id) > 0 then 1 else 0 end as register_label, ti.area from tiles as ti inner join model_predictions as mp on ti.uuid = mp.uuid left join register_label_per_building as pv on ST_Contain...
true
8d20e60677c1889611230eb3627480d8625c8b81
SQL
nikolagolux/energoprojekt-entel
/backup_epentel.sql
UTF-8
5,426
3.109375
3
[]
no_license
-- MySQL dump 10.13 Distrib 5.5.54, for debian-linux-gnu (x86_64) -- -- Host: 0.0.0.0 Database: epentel -- ------------------------------------------------------ -- Server version 5.5.54-0ubuntu0.14.04.1 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHA...
true
eeea1f2f8c79c0dfd824bc1f97cf7db3b3e340ee
SQL
hoangphung21/SQL-Learning
/SubQuerries.sql
UTF-8
694
4.125
4
[]
no_license
/* Subquerries */ select * from EmployeeSalary -- subquerries in Select select EmployeeID, Salary,(Select avg(Salary) from EmployeeSalary ) as avgSalary from EmployeeSalary -- subquerries in Patition By select EmployeeID, Salary, avg(Salary) over() as avgSalary from EmployeeSalary -- can not work with the group ...
true
1346f8b94ab4f88460cb26a3ed074c327dfa13fc
SQL
Yukics/BBDD-ASIX
/PPairs_ApplyingToCollege/InsertApplyingToCollege.sql
UTF-8
1,403
2.8125
3
[]
no_license
insert into ApplyingToCollege.STUDENTS values (123,'Amy','Smith','3.9',1000), (234,'Bob','Taylor','3.6',1500), (345,'Craig','Davis','3.5',500), (456,'Doris','Roberts','3.9',1000), (543,'Craig','Wilder','3.4',2000), (567,'Edward','Norton','2.9',2000), (654,'Amy','C...
true
76e02802ae4458fe62107fdb5db03e3dad0e547e
SQL
littlehippo147/Bigdata_SQL_Python
/SQL/sql 18_10_25 insa.sql
UHC
1,001
3.640625
4
[]
no_license
-- μ ̺ create table dept ( deptno number primary key, dname char(30) not null, loc varchar2(30)); -- tablespace insa; Ἥ table tablespace ൵ . insert into dept values (10, '', ''); commit; select * from dept; select * from emp1; /* segment ( ʿ Object) table index un...
true
e071da9ef5fcdba751161e12403f8abdaeec7eeb
SQL
gilanghrlmbng/backend_sql_php_apk_botol
/depot_air.sql
UTF-8
2,573
3.125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Waktu pembuatan: 27 Sep 2021 pada 16.09 -- Versi server: 10.4.17-MariaDB -- Versi PHP: 8.0.0 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CH...
true
cf468d27d10ff7a6cd9c96275d2344fa85013419
SQL
lenope1214/capston
/src/main/document/SQL/TEST/익스포트09-10_승우.sql
UTF-8
68,992
3.1875
3
[]
no_license
-------------------------------------------------------- -- 파일이 생성됨 - 목요일-9월-10-2020 -------------------------------------------------------- -------------------------------------------------------- -- DDL for Sequence ENTRY_INFO_SEQ -------------------------------------------------------- CREATE SEQUENCE "CAP"....
true
7e69ddf2428f0961c4cc3fc983f3af69503bb1cd
SQL
eduardoc7/edx_python_javascript
/learning-sql-with-postgres/testing/query-select.sql
UTF-8
2,447
4.0625
4
[ "MIT" ]
permissive
/** O insert seria uma forma de escrever na tabela do banco de dados. E o select seria uma forma de ler o que há na tabela. Uma query é um pedido de uma informação ou de um dado, nesse caso, dentro de uma tabela do banco de dados. Estabelecido através do comando SELECT Para fazermos isso dentro de um banco de dados, u...
true
050d8cc7b3f5f84a54e38bbd2aebd814d34c41f3
SQL
skanapar/DB_SCRIPTS
/DBV/step7_enable_dbv_peoplesoft.sql
UTF-8
877
2.578125
3
[]
no_license
CONNECT c##dbv_owner_root@&pdb EXEC dbms_macadm.create_realm(realm_name => 'PEOPLESOFT_SCHEMA', description => 'Peoplesoft MAIN Schema ', enabled => 'Y', audit_options => 1, realm_type =>'1' ); -- realm_type 1 is mandatory EXEC dbms_macadm.add_object_to_realm(realm_name => 'PEOPLESOFT_SCHEMA', object_owner => 'SYSADM',...
true
c27c1f9fc6fa4aac7adea915fb0078b1eea6053d
SQL
gurpreet19/ec198392_wht
/Database/configuration/03_02_headless_tool/Delta_WST/SourcePackageDefinitions/ECDP_REVN_ACTIONS_COST_HEAD.sql
UTF-8
4,111
2.640625
3
[]
no_license
CREATE OR REPLACE PACKAGE ECDP_REVN_Actions_Cost IS ----------------------------------------------------------------------- -- Ensures journal entries displayed on Journal Entry Interface screen -- doesn't exceed the threshold. ----+----------------------------------+------------------------------- ...
true
7e4aa542056e9592e8824284cb9160f984412efb
SQL
radtek/UGRS
/UGRS_Q/UGRS.AddOn.Cuarentenarias/DAO/SQL/ValidateCertificate.sql
UTF-8
1,257
4.125
4
[]
no_license
 SELECT distinct MAX(case when (t4.Name is not null) then t4.U_UsedDate else GETDATE() end) Date, MAX(T1.U_PE_Certificate) AS NCertificate, MAX(T1.CardCode) AS CardCode, case when (t4.Name is not null) then (t1.Quantity - SUM(t4.U_Quantity)) else t1.Quantity end Quantity, MAX(T1.ItemCode) itemcode, MAX(T3.U_ItemCU) ...
true
e44dc5b32afd9cc33a6226c20cc4d4e0ad21e4ab
SQL
atinvento100/Painting_Rental_application
/dumps/Dump20201112/newschema_hiringinfo.sql
UTF-8
3,086
2.953125
3
[]
no_license
-- MySQL dump 10.13 Distrib 8.0.21, for Win64 (x86_64) -- -- Host: localhost Database: newschema -- ------------------------------------------------------ -- Server version 8.0.21 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /...
true
9082dce168ab0032e3b782a11754f78d8420e2e7
SQL
simi-so/agi_wms
/div/groups_with_private_children.sql
UTF-8
5,970
4.03125
4
[]
no_license
WITH dsv_perm_base AS ( SELECT level_ AS perm_level, p.data_set_view_id AS dsv_id, role_id, (r."name" = 'public') AS is_public_role FROM simi.simidata_data_set_view d JOIN simi.simiiam_permission p ON d.id = p.data_set_view_id JOIN simi.simiiam_role r ON p.role_id = r.id ), ds...
true
0aa69ca3ec398f3fac095fe32573a0287a17e1fe
SQL
sefmangampo/lms_gelo
/sqlscripts/fn_SPLIT_STR.sql
UTF-8
300
2.546875
3
[]
no_license
CREATE DEFINER=`root`@`localhost` FUNCTION `fn_SPLIT_STR`(x VARCHAR(255), delim VARCHAR(12), pos INT) RETURNS varchar(255) CHARSET utf8mb4 DETERMINISTIC BEGIN RETURN REPLACE(SUBSTRING(SUBSTRING_INDEX(x, delim, pos), LENGTH(SUBSTRING_INDEX(x, delim, pos -1)) + 1), delim, ''); END
true
d6b35cf21fc5b68e4b552751ca78c4dd0b2831e4
SQL
zballos/sql_exercises
/Oracle12c/ComplexQueries/Database_Exercise_1.sql
UTF-8
25,070
3.921875
4
[]
no_license
-- Delete all tables, if exists DROP TABLE companies_departments; DROP TABLE employees_benefits; DROP TABLE companies; DROP TABLE employees; DROP TABLE roles; DROP TABLE departments; DROP TABLE benefits; -- Create tables CREATE TABLE companies ( id NUMBER PRIMARY KEY, name VARCHAR2(30) DEFAULT '' NOT NULL ); ...
true
81090b59fe2745db5aef1d139c658509193a9fad
SQL
NackademinDBASGroup5/NackademiskaAuktions
/NackademiskaAuktions/mySQLscripts/oldScripts/Q8.sql
UTF-8
510
4.03125
4
[]
no_license
-- Lista alla vunna auktioner och dess vinnare CREATE VIEW VunnaAuktioner AS SELECT auktion, kronor as VinnandeBud, CONCAT(kund.förnamn, ' ', kund.efternamn) as vinnare FROM auktionshistorik inner join kund on kund.personnummer = auktionshistorik.kund WHERE (auktion, kronor) IN ( SELECT auktion, MAX(kronor) FROM a...
true
f833891f1abafba958fc30feefa4dc5c76bbc094
SQL
ockapus/FateCharGen
/sql/GameTurnOrder.sql
UTF-8
802
3.296875
3
[]
no_license
-- Game turn order table setup for FateCharGen extension -- Created originally for Alien City -- porpentine@gmail.com -- Last Update: May 25, 2016 -- Add game turn order table CREATE TABLE IF NOT EXISTS /*_*/fate_game_turn_order ( -- Unique ID game_turn_order_id int NOT NULL PRIMARY KEY AUTO_INCREMENT, -- ...
true
7c967855ec2f3d549f18ea91f99dae8c159d11a7
SQL
YiiCollection/yii2eshop
/yii2eshop.sql
UTF-8
16,029
2.890625
3
[ "BSD-3-Clause" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Хост: 127.0.0.1 -- Час створення: Гру 05 2016 р., 11:15 -- Версія сервера: 10.1.10-MariaDB -- Версія PHP: 7.0.11 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT *...
true
f660138040d8ab157e69fa0ad88988a52f215d87
SQL
health2030/openmrs-data
/src/main/resources/db/migration/V1_31__AddConceptWordProc.sql
UTF-8
361
2.671875
3
[ "Apache-2.0" ]
permissive
DELIMITER $$ CREATE PROCEDURE add_concept_word (concept_id INT, concept_name_id INT, word VARCHAR(50), weight DOUBLE) BEGIN INSERT INTO concept_word (word, locale, weight, concept_id, concept_name_id) values (UPPER(word), 'en', w...
true
b0ed152753cf11b387c50c3003e2ded21da0f3e1
SQL
Ninja-Squad/globe42
/backend/src/main/resources/db/migration/V0020__task_category.sql
UTF-8
1,223
3.265625
3
[]
no_license
CREATE TABLE task_category ( id BIGINT PRIMARY KEY, name VARCHAR ); INSERT INTO task_category (id, name) VALUES (1, 'Administratif'); INSERT INTO task_category (id, name) VALUES (2, 'Accueil'); INSERT INTO task_category (id, name) VALUES (3, 'Base de données'); INSERT INTO task_category (id, name) VALUES (4, 'Co...
true
1468bf1e66c3f4d274876709a4444fc06df1a50c
SQL
nhadziosma1/Fundamentals-of-Database-Systems-
/homework/homework 1/homework1,queries.sql
UTF-8
6,586
3.703125
4
[]
no_license
/*brise sve kreirane tabele*/ /*BEGIN FOR c IN (SELECT table_name FROM user_tables) LOOP EXECUTE IMMEDIATE ('DROP TABLE "' || c.table_name || '" CASCADE CONSTRAINTS'); END LOOP; END;*/ CREATE TABLE KONTINENT ( kontinent_id INTEGER PRIMARY KEY, ime_kontinenta VARCHAR(40) NOT null ); CR...
true
baad4f5b752656c143869c2ad6e8c7540f4e2eca
SQL
gfis/OEIS-mat
/constant/solvetab3.sql
UTF-8
2,037
2.671875
3
[]
no_license
-- solvetab3.sql - patches for solvetab -- 2023-05-08: offset -> offset1 -- 2021-07-28, Georg Fischer -- UPDATE seq4 SET offset1 = -1 WHERE aseqno IN ('A197135','A197251','A197259'); UPDATE seq4 SET offset1 = 0 WHERE aseqno IN ('A197252','A197519','A198560','A198612','A198613'); UPDATE seq4 SET offset1 = 1 WHERE aseq...
true
d4c7119eb10d77223e90d4e1e39716b640b9876f
SQL
wwjiang007/yugabyte-db
/managed/src/main/resources/db/migration/default_/postgres/V167__Add_Underreplicated_Masters_Alert.sql
UTF-8
1,546
3.40625
3
[ "LicenseRef-scancode-unknown-license-reference", "Apache-2.0", "OpenSSL" ]
permissive
-- Copyright (c) YugaByte, Inc. -- MASTER_UNDER_REPLICATED insert into alert_configuration (uuid, customer_uuid, name, description, create_time, target_type, target, thresholds, threshold_unit, template, active, default_destination) select gen_random_uuid(), uuid, 'Under-replicated master', 'Master is missin...
true
c77fa5c4dbe0f66d905d4c783af346633dc547e9
SQL
preciadosandro/bancoDeIdeas
/baseDatos/Insert_Rol.SolicitudRol.sql
UTF-8
1,401
2.71875
3
[]
no_license
------- Inser TB_ROL Insert into TB_ROL (ID, DESCRIPCION, TIPO, CREADOPOR, CREADOEN, MODIFICADOPOR, MODIFICADOEN) Values (1, 'GENERICO', 'I', 'ADMINISTRADOR', TO_DATE('06/01/2017 19:18:14', 'MM/DD/YYYY HH24:MI:SS'), 'ADMINISTRADOR', TO_DATE('06/01/2017 00:00:00', 'MM/DD/YYYY HH24:MI:SS')); Insert in...
true
527805b645da0c0b8ce563891631cb54579df9fd
SQL
mauricio-melo/analysis-service
/src/main/resources/db/migration/V1__script.sql
UTF-8
1,124
3.25
3
[]
no_license
CREATE TABLE bet ( idt_bet BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, period VARCHAR(255) NOT NULL, name VARCHAR(255) NOT NULL, score BIGINT NOT NULL ); CREATE TABLE rule ( idt_rule BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, idt_bet BIGINT ...
true
18d281bf26e05a1bd43425d4e9fa5bfd9c83beb7
SQL
gravesmw/RiskManager
/GravesConsultingLLC.RiskManager.Database/Content/Tables/ContainerObjects.sql
UTF-8
484
3.53125
4
[]
no_license
CREATE TABLE [Content].[ContainerObjects] ( [ContainerViewID] INT NOT NULL, [ObjectID] BIGINT NOT NULL, CONSTRAINT [PK_ContainerObjects] PRIMARY KEY CLUSTERED ([ContainerViewID] ASC, [ObjectID] ASC), CONSTRAINT [FK_ContainerObjects_ContainerViews] FOREIGN KEY ([ContainerViewID]) REFERENCES [C...
true
3bc89b620b54fc7235f3bc5cc2aef34b48fdd746
SQL
Lucky157/University-Application-Program-UAP-
/UAP.sql
UTF-8
5,151
3.625
4
[ "CC-BY-4.0", "CC-BY-3.0" ]
permissive
CREATE TABLE if not exists `qualification` ( `QID` int(11) primary key NOT NULL AUTO_INCREMENT, `name` varchar(100) NOT NULL, `minScore` varchar(10) NOT NULL, `maxScore` varchar(10) NOT NULL, `resultCalcDescription` varchar(100) NOT NULL, `noOfSubjects` int (1) not null, `gradeList` varchar(200) NO...
true
6a3ccebe6c57940f2cec11533f701c337b8c28fc
SQL
trofiv-IFMO/IFMO-Databases
/Лабораторная 5/Запросы для тренировки/SQLQuery6.sql
UTF-8
203
3.5
4
[]
no_license
select count (ProductID), OrderQty from Sales.SalesOrderDetail group by OrderQty having OrderQty > ( select avg (OrderQty) from Sales.SalesOrderDetail where SpecialOfferID = 1 ) order by OrderQty
true
2679ee3425ab9bf9de831beb967e964a48b41c1d
SQL
ccaballero/nonchalant
/data/sql/axon/script.sql
UTF-8
1,540
3.15625
3
[]
no_license
DROP TABLE IF EXISTS `index`; CREATE TABLE `index` ( `id` int unsigned NOT NULL auto_increment, `parent` int unsigned NULL, `name` varchar(255) NOT NULL, `type` enum('l','f','d') ...
true
8c8cae68cbfbd6f17ca8b2a54218cc992960a0e3
SQL
nahin333/Employee-Recruitment-Management-System
/detabase_lab_project/toad3.sql
UTF-8
394
3.171875
3
[]
no_license
set serveroutput on declare male_no integer; female_no integer; begin select count(gender) into male_no from Candidate_Info where gender = 'M'; select count(gender) into female_no from Candidate_Info where gender = 'F'; if male_no>female_no then dbms_output.put_line('The number of male is more'); els...
true
977682595bc0de0deeeae2833146b5cefb3bc18a
SQL
renzog6/sae-res
/src/main/database/db_empresa.ddl
UTF-8
3,248
3.296875
3
[]
no_license
alter table dir_direccion drop foreign key FK_direccion_localidad; alter table dir_localidad drop foreign key FK_localidad_provincia; alter table empresa drop foreign key FK_empresa_direccion; alter table empresa_rubro drop foreign key FK_empresa_rubro; alter table empresa_rubro drop foreign key FK_rubro_empresa;...
true
c4bce022896b055268f46f1dd3a1c20bdfa07f95
SQL
anitasharma03/The-digital-hub
/Phase1 files/views and indexes/indexes_Query.sql
UTF-8
248
3.140625
3
[]
no_license
/* Create two indexes for two different tables. */ CREATE INDEX Customer_index ON Customer( Customer_Name,Email_Address, Phone ); CREATE INDEX Shipper_index ON Shipper(Shipper_ID); /* Drop one index. */ DROP INDEX Index_One ON Customer;
true
7e4ee3fc7b6805220945c00708e4bf5047fc34cc
SQL
jogando/hcm-hana-poc
/scripts.sql
UTF-8
2,125
2.9375
3
[]
no_license
CREATE COLUMN TABLE PA0001 ( PERNR INTEGER, SUBTY varchar(4), BEGDA DATE, ENDDA DATE, BUKRS varchar(4),--Company Code WERKS varchar(4),--Personnel Area BTRTL varchar(4),--Personnel subarea PLANS integer,--Position STELL integer,--Job ORGEH integer,--Org Unit PRIMARY KEY (...
true
9a087afb5a569483614f5090e8893ce904ac1f84
SQL
Kefikhalil/holbertonschool-higher_level_programming
/0x0E-SQL_more_queries/15-comedy_only.sql
UTF-8
310
3.671875
4
[]
no_license
-- Only Comedy -- script that lists all Comedy shows in the database hbtn_0d_tvshows. SELECT tv_shows.title FROM tv_shows LEFT JOIN tv_show_genres ON tv_show_genres.show_id = tv_shows.id LEFT JOIN tv_genres ON tv_genres.id = tv_show_genres.genre_id WHERE tv_genres.name = 'Comedy' ORDER BY tv_shows.title
true
54fc6c7d12c7566dc41121a11d6a2019a733db54
SQL
jomahay/hotel
/hotel.sql
UTF-8
1,738
3.6875
4
[]
no_license
create sequence chambresequence; create sequence administrateursequence; create sequence equipementsequence; create sequence typechambresequence; create sequence equipementchambresequence; create table typechambre( id int primary key, nomtype varchar(70), imagetype varchar(150); ); insert into typechambre v...
true
e4494d81ffc9c963be0005dd9c757b0eafb9f5a4
SQL
amojohn/ETL
/07_BI_DEPLOY/1_ODS/BLPT/TABLES/t_hand_zc_cost_target.sql
UTF-8
2,308
2.96875
3
[]
no_license
DROP TABLE IF EXISTS ODS_BLPT.T_HAND_ZC_COST_TARGET; create table ODS_BLPT.T_HAND_ZC_COST_TARGET ( ID BIGINT, YEAR_ID STRING COMMENT '年份ID', COST_TARGET STRING COMMENT '降本目标', JAN_AMT STRING COMMENT '1月', FEB_AMT STRING COMMENT '2月', MAR_AMT STRING COMMENT '3月', APR_AMT STRING COMMENT '4月', MAY_AMT STRI...
true
bc5c7478350e82ef7191214e091b3a05945c80ca
SQL
Rnavajo/demo
/mybatis/demo1/student.sql
UTF-8
942
3
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : root@localhost Source Server Version : 50725 Source Host : localhost:3306 Source Database : demo Target Server Type : MYSQL Target Server Version : 50725 File Encoding : 65001 Date: 2019-11-24 20:32:03 */ SET FOREIGN_KEY_CHECKS=0; --...
true
9343ca195216af3c833edcc45ed19d4042766bf9
SQL
vininjr/uri-solutions-sql
/2612.sql
UTF-8
331
3.359375
3
[]
no_license
select movies.id ,movies.name from movies where (movies.id_genres in (select genres.id from genres where genres.description = 'Action')) and (movies.id in (select movies_actors.id_movies from movies_actors where movies_actors.id_actors in (select actors.id from actors where (actors.name ='Marcelo Silva') or(actors....
true
892ea4cc4e5f3cc03c38ea812ec29edf0c5ce5ef
SQL
andreakonomi/Sql57-PracticeProblems
/MySolutions/AdvancedProblems/54.sql
UTF-8
490
4.09375
4
[]
no_license
;With SupplierCountries as (Select Country, COUNT(*) AS SuppliersCount FROM dbo.Suppliers GROUP BY Country) ,CustomerCountries as (SELECT Country, COUNT(*) AS CustomersCount FROM dbo.Customers GROUP BY Country) SELECT ISNULL(s.Country, c.Country) AS Country, ISNULL(s.SuppliersC...
true
ec0960af48d586da32d86f87f6d7771426382ef1
SQL
KarmaScripter/BudgetExecution
/Data/Database/Access/DataModels/UPDATE/UpdateUnliquidatedObligationsBudgetAcccountCodes.sql
UTF-8
351
3.390625
3
[ "MIT" ]
permissive
UPDATE UnobligatedBalances INNER JOIN FundSymbols ON (UnobligatedBalances.FundCode = FundSymbols.FundCode) AND (RIGHT(UnobligatedBalances.TreasurySymbol, 4) = RIGHT(FundSymbols.TreasuryAccountCode, 4)) SET UnobligatedBalances.OmbAccountCode = "020-00-" & RIGHT(FundSymbols.TreasuryAccountCode, 4) WHERE UnobligatedBa...
true
6490ed89b3ef1700b418558660136663c1884db3
SQL
dbodanilo/cc5232-tp-etapa2
/add-fk_voo__modelo_aviao.sql
UTF-8
303
2.921875
3
[]
no_license
-- ALTER TABLE public.voo -- DROP CONSTRAINT fk_voo__modelo_aviao ALTER TABLE public.aviao -- DROP CONSTRAINT aviao_pkey ADD CONSTRAINT aviao_pkey PRIMARY KEY (modelo_aviao) ALTER TABLE public.voo ADD CONSTRAINT fk_voo__modelo_aviao FOREIGN KEY (modelo_aviao) REFERENCES public.aviao(modelo_aviao);
true
64f44c06eb4bce78723960098c25d69a5d7e2095
SQL
First-01/dune_queries
/queries/31277_tvl_by_token.sql
UTF-8
2,703
4.5625
5
[]
no_license
WITH prices AS ( SELECT date_trunc('day', MINUTE) AS DAY, contract_address AS token, AVG(price) AS price FROM prices.usd WHERE MINUTE >= '{{2. Start date}}' AND MINUTE <= '{{3. End date}}' GROUP BY 1, 2 ), dex_prices_1 AS ( ...
true
2c2391d09834e3c4420ac8c0f858e3701578f9e6
SQL
Martin-Galaviz-Bernal/Proyecto-Sistemas-Gestores-de-Bases-de-Datos
/consulta5.SQL
UTF-8
296
3.75
4
[]
no_license
\timing on SELECT name FROM( SELECT casti.name,COUNT(casti.name) as frecuencia FROM crew,casti,metadata WHERE casti.id=crew.id AND job='Director' AND casti.id_movie=metadata.id AND crew.id_movie=metadata.id GROUP BY casti.name ORDER BY frecuencia DESC) subconsulta ;
true
b6fe2eb88bdc5cf68a459ff7f82948373e97dd22
SQL
yjt-1997/multi-table-query-2019-5-21-3-10-2-585
/select.sql
UTF-8
1,633
4.65625
5
[]
no_license
# 1.查询同时存在1课程和2课程的情况 //题目意思没看懂... # 2.查询同时存在1课程和2课程的情况 # 3.查询平均成绩大于等于60分的同学的学生编号和学生姓名和平均成绩 SELECT s.id, s. NAME, avg(c.score) FROM student s JOIN student_course c ON s.id = c.studentId GROUP BY s.id HAVING AVG(c.score) >= 60 # 4.查询在student_course表中不存在成绩的学生信息的SQL语句 SELECT * FROM student WHERE id NOT IN ( S...
true
39b9bdf05817b2d630ecf2c53d4edff0494e204d
SQL
thapliyal20/DBMS
/DBMS SQL_Assign/LAB 5/LAB 5.sql
UTF-8
2,141
3.1875
3
[]
no_license
Lab 5 5.1 Data Manipulation Language 1.Create table employeee as select * from emp where 1=3; desc employeee; select * from employee; EMPNO ENAME DEPTNAME MGR HIREDATE SAL COMM DEPTNO ---------------------- ------...
true
6992a9330b84d6ab6fb7e1c41ba55c7f8c8c1792
SQL
siva19871025/SQL-Practice
/leetcode/Top3DeptSalaries.sql
UTF-8
465
4.25
4
[]
no_license
# https://leetcode.com/problems/department-top-three-salaries/submissions/ SELECT Department, Employee, Salary FROM ( SELECT L.Name As Employee, L.Salary, R.Name AS Department, DENSE_RANK() OVER ( PARTITION BY L.DepartmentId ORDER BY L.Salary DESC)...
true
15993dd47898f3671230acdf1fdd1b5bfb78273e
SQL
Is-Dani/DesarrolloWebdom
/tarea9/bd_hotel.sql
UTF-8
5,833
3.265625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.9.0.1 -- https://www.phpmyadmin.net/ -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 20-04-2020 a las 20:55:02 -- Versión del servidor: 10.4.6-MariaDB -- Versión de PHP: 7.1.32 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"...
true
1e11f2217e0a2dcf23725876b26054baaf7beb71
SQL
haryoiro/CS50IntroductionHaryoiro
/psets/movies/7.sql
UTF-8
172
3.59375
4
[]
no_license
SELECT movies.title, ratings.rating FROM movies JOIN ratings ON movies.id = ratings.movie_id WHERE movies.year = 2010 ORDER BY rating DESC, title ASC;
true
c3835f54bd1b20fee914b53ce052484bbbbad2dd
SQL
trevorassaf/warehouse
/src/php/access_layer/test_db/create_db.sql
UTF-8
657
3.765625
4
[]
no_license
CREATE DATABASE test_db; CREATE TABLE test_db.foo( id SERIAL, PRIMARY KEY(id), created TIMESTAMP DEFAULT CURRENT_TIMESTAMP, last_updated TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, name VARCHAR(20) NOT NULL); CREATE TABLE test_db.bar( id SERIAL, PRIMARY KEY(id), created TIMESTAMP DEFAULT ...
true
8e3b1d41ef11632a78dec337a10f65c3c95a419f
SQL
project-koku/koku
/koku/hcs/database/sql/reporting_azure_hcs_daily_summary.sql
UTF-8
772
3.59375
4
[ "Apache-2.0" ]
permissive
SELECT *, {{ebs_acct_num}} as ebs_account_id, {{org_id}} as org_id FROM hive.{{schema | sqlsafe}}.{{table | sqlsafe}} WHERE source = {{provider_uuid}} AND year = {{year}} AND month = {{month}} AND coalesce(date, usagedatetime) >= {{date}} AND coalesce(date, usagedatetime) < date_add( 'day', 1, {{d...
true
0facd68b8013aaff6aae3a7e3e1cb967039f78c8
SQL
puritanlife/ApplyNow
/ApplyNow/maint/Views/vwGetLogExistingIDAgainstComment.sql
UTF-8
539
2.953125
3
[]
no_license
 CREATE VIEW [maint].[vwGetLogExistingIDAgainstComment] AS /************************************************* Author: Daniel Kelleher Create Date: 6/3/2020 Description: Gets all Apply Now Data. *************************************************/ SELECT tLVC.[Comment] ,tLEAC.[AsOfDate] ,tLEAC.[Exi...
true
721ac97e86c3962d1035b87aede117864d2083cd
SQL
thanosa/cs50-harvard-edu
/pset7_sql_movies/11.sql
UTF-8
309
4.09375
4
[]
no_license
SELECT movies.title FROM stars JOIN movies ON movies.id = stars.movie_id JOIN ratings ON movies.id = ratings.movie_id WHERE person_id IN ( SELECT DISTINCT(stars.person_id) FROM stars JOIN people ON stars.person_id = people.id WHERE people.name = 'Chadwick Boseman') ORDER BY ratings.rating DESC LIMIT 5;
true