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
77cdbd27ad2a6fd7fb33004cc0b7a1b48fe69d15
SQL
iuvopoint/T-SQL-AsyncAgent
/tSQLt/tSQLt/Stored Procedures/Private_DisallowOverwritingNonTestSchema.sql
UTF-8
347
2.609375
3
[ "MIT" ]
permissive
 CREATE PROCEDURE tSQLt.Private_DisallowOverwritingNonTestSchema @ClassName NVARCHAR(MAX) AS BEGIN IF SCHEMA_ID(@ClassName) IS NOT NULL AND tSQLt.Private_IsTestClass(@ClassName) = 0 BEGIN RAISERROR('Attempted to execute tSQLt.NewTestClass on ''%s'' which is an existing schema but not a test class', 16, 10, @...
true
e147010fc8a6954f71e7ca5572cce46151a072f2
SQL
kbdancer/myTools
/czip2mysql/ipdb.sql
UTF-8
307
2.625
3
[ "MIT" ]
permissive
CREATE TABLE IF NOT EXISTS `ipdb` ( `id` int(11) NOT NULL, `range` varchar(50) NOT NULL, `location` varchar(200) NOT NULL, `type` varchar(100) NOT NULL, `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ) ENGINE=InnoDB DEFAULT CHARSET=utf8; ALTER TABLE `ipdb` ADD PRIMARY KEY (`id`);
true
44b5404f2e1371bab33f72698da7d844092d8443
SQL
banims/web2
/latihan13/artikel_db.sql
UTF-8
1,158
2.75
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.9.1 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3308 -- Generation Time: Jun 14, 2020 at 01:29 AM -- Server version: 10.4.8-MariaDB -- PHP Version: 7.1.33 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET...
true
26920a4a6a20607a3eca174e31ad3996634be271
SQL
conchonha/Diabetes_Laravel
/diabetes.sql
UTF-8
6,290
3.125
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Máy chủ: 127.0.0.1 -- Thời gian đã tạo: Th12 14, 2020 lúc 12:45 PM -- Phiên bản máy phục vụ: 10.4.14-MariaDB -- Phiên bản PHP: 7.2.33 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHA...
true
f14c17126c41e3139a785a6b0ac2fdfaf9594201
SQL
janssenda/thenewcarag
/DDWA/Databases/Aggregate-Exercises.sql
UTF-8
2,079
4.34375
4
[]
no_license
/* Find the average freight paid for orders placed by companies in the USA */ USE Northwind; -- SELECT Customers.CompanyName, AVG(Orders.Freight), Customers.Country -- FROM Customers -- INNER JOIN Orders ON Customers.CustomerID = Orders.CustomerID -- WHERE Customers.Country = 'USA' -- GROUP BY Customers.CompanyNa...
true
a5c51179e473edcd109b60a6449559c61c458d4d
SQL
pedropefj/api.livraria.auth.v2
/script.sql
UTF-8
2,026
3.015625
3
[]
no_license
-- -------------------------------------------------------- -- Servidor: 127.0.0.1 -- Versão do servidor: 5.7.23-log - MySQL Community Server (GPL) -- OS do Servidor: Win64 -- HeidiSQL Versão: 9.5.0.5196 -- --------------------------------------------------------...
true
2974ec746ed76f6e0825a952de4441930ed41ac6
SQL
lucamartellucci/bookshop-api
/src/main/db-config/mysql/BOOKSHOP_MYSQ.sql
UTF-8
373
2.671875
3
[ "MIT" ]
permissive
/* creazione del database */ CREATE DATABASE IF NOT EXISTS `bookshop` DEFAULT CHARACTER SET utf8; /* creazione utente applicativo*/ CREATE USER 'bookshop'@'localhost' IDENTIFIED BY 'bookshop'; GRANT ALL PRIVILEGES ON bookshop.* TO 'bookshop'@'localhost'; CREATE USER 'bookshop'@'%' IDENTIFIED BY 'bookshop'; GRANT ALL ...
true
33d705d2a9de7353cc3c446d55ff7c0c0c576037
SQL
facundofarias/picturest_nf3
/backend-api/database/scripts/005_create_pin_tag.sql
UTF-8
446
3.796875
4
[ "MIT", "Apache-2.0" ]
permissive
CREATE TABLE IF NOT EXISTS pin_tag ( id bigint unsigned auto_increment, created_at timestamp null, updated_at timestamp null, pin_id bigint unsigned null, tag_id bigint unsigned null, PRIMARY KEY(id), CONSTRAINT pin_tag_pins_id_fk FORE...
true
2ddb810cc3b0bd97295c7acfa94b970153912286
SQL
joostlawerman/ISE-2019
/migrations/2019-06-04 CK_COLOUR_MUST_BE_B_OR_W.test.sql
UTF-8
964
3.03125
3
[]
no_license
-- +migrate Up EXEC tSQLt.NewTestClass 'IR22'; -- +migrate Down EXEC tSQLt.DropClass 'IR22'; -- +migrate Up CREATE PROCEDURE IR22.SetUp AS BEGIN --Arrange EXEC tSQLt.FakeTable 'dbo', 'CHESSMATCHMOVE' EXEC tSQLt.ApplyConstraint @SchemaName= 'dbo', @Tablename = 'CHESSMATCHMOVE', @ConstraintName = 'CK_COLOUR_MUST...
true
34b3326a51b791e9ca31cb2c5e412bd0cd5007b3
SQL
skyFi/transfer
/src/main/script/sql/action_record.sql
UTF-8
690
2.859375
3
[]
no_license
CREATE TABLE `action_record` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `version` bigint(20) NOT NULL, `action_content` longtext, `action_name` varchar(255) DEFAULT NULL, `action_time` datetime DEFAULT NULL, `action_type` varchar(255) DEFAULT NULL, `buyer_nick` varchar(255) DEFAULT NULL, `buyer_phone` ...
true
f9b642b6c9e7dd3b1d9e19e280b9c4b71c005cec
SQL
Marvel-promise/spring_study
/test.sql
UTF-8
4,233
3.5
4
[]
no_license
/* Navicat Premium Data Transfer Source Server : Mysql Source Server Type : MySQL Source Server Version : 80017 Source Host : localhost:3306 Source Schema : test Target Server Type : MySQL Target Server Version : 80017 File Encoding : 65001 Date: 09/05/2021 20:24:31 ...
true
2b7fca299b6aa9bde28be5414637bf227d8d9800
SQL
Han-source/my_projects
/src/main/resources/www/dream/com/common/dictionarySeed.sql
UTF-8
417
3.5
4
[]
no_license
/** truncate 처치하고 있던 공간까지 함께 삭제됩니다. */ truncate table s_id_seed; drop table s_id_seed; create table s_id_seed( seq_id number(19) primary key, seed char(5) ); CREATE OR REPLACE FUNCTION get_id(intSeed number) RETURN char IS ret char(5); BEGIN select seed into ret from s_id_seed where seq_id =...
true
5cee8d48f9d83f62e231bd8c0ced4804f28f20e8
SQL
MatMoore/hacks
/reccommender-system/schema.sql
UTF-8
1,414
4.40625
4
[]
no_license
-- Movie info create table movie ( movie_id integer constraint movie_pk primary key, name text, year integer ); -- User ratings create table rating ( rating_id integer constraint rating_pk primary key, movie_id integer constraint rating_movie_id_fk references movie(movie_id) on delete cascade constraint rating_mo...
true
d9a1cae1ec1e78dcb37d6d6a198df227bd9708f1
SQL
frblazquez/BD
/Practicas/Practise 3/Practica 3.sql
UTF-8
7,525
3.953125
4
[]
no_license
-- FRANCISCO JAVIER BLÁZQUEZ MARTÍNEZ ~ frblazqu@ucm.es -- MANUEL ORTEGA SALVADOR ~ manuor01@ucm.es -- -- Doble grado Ingeniería informática - Matemáticas -- Universidad Complutense de Madrid. -- -- Comentarios: -- -- Hemos optado por convenio nombrar a las tablas de forma que cada barra baja '_' separe los atributos -...
true
8bbb2fbcf11160a3e56d0ef7ac55fdf5a60ce92f
SQL
ivancekic/sql-data-analysis
/sql/Kepu/Nova/Kepu ver 2.sql
UTF-8
6,388
3.421875
3
[ "MIT" ]
permissive
--select distinct vrsta_Dok, tip_dok --from --( Select d.datum_dok, d.datum_unosa, d.godina, d.broj_dok, d.tip_dok, d.vrsta_dok, d.org_deo, d.broj_dok1, d.ppartner , case when d.vrsta_dok = (11) and d.tip_dok in (23,238) then 'Int.Otprema' ...
true
0a0083f5f2cc99e2b5a713ce86c42f27da1b7586
SQL
josepitteloud/VESPA
/Data Governance/Data Definitions/VIQ/Programme_TVR.sql
UTF-8
16,336
3.734375
4
[]
no_license
/*############################################################################### # Created on: 20/08/2012 # Created by: Tony Kinnaird (TKD) # Description: Sample code for deriving the Programme TVR metric for VIQ (derived from # Sebastian Bednaszynski's work) . # ################################################...
true
0f8d3a35be8c07ad024694b52eaf8a8546578a89
SQL
danieldiamond/gitlab-analytics
/transform/snowflake-dbt/models/sources/airflow/airflow_dag.sql
UTF-8
345
2.609375
3
[ "LicenseRef-scancode-unknown-license-reference", "MIT" ]
permissive
WITH source AS ( SELECT * FROM {{ source('airflow', 'dag') }} ), renamed AS ( SELECT dag_id::VARCHAR AS dag_id, is_active::BOOLEAN AS is_active, is_paused::VARCHAR AS is_paused, schedule_interval::VARCHAR AS schedule_interval FROM source ...
true
0d096f9f0988915e18a2f65a0f235a73f17322f9
SQL
elifsagban/Database_Course_Project
/step3/forwarden(er+denorm).sql
UTF-8
14,405
3.609375
4
[]
no_license
-- MySQL Workbench Forward Engineering SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0; SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0; SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTI...
true
92634527f42c5849f8cc008192a45c2e5eee076c
SQL
gcaglion/AAA
/AlgoDB/HistoryData/RecordCount.sql
UTF-8
3,445
3.59375
4
[]
no_license
drop table Categories; create table Categories( Symbol varchar2(16), Category varchar2(32) ); alter table Categories add constraint Categories_PK primary key(Symbol) using index tablespace HistoryIdx; -- insert into categories values('US10YR', 'BONDS'); -- insert into categories values('CATTLE', 'COMMODITIES'); inser...
true
f6b5fde21e206c8dfe3c7991e1daed63d742bf92
SQL
m-loutfi/Project-1-Expense-Reimbursement-System
/images/SQL DB Script.sql
UTF-8
3,068
4.21875
4
[]
no_license
---------PROJECT 1 SQL SCRIPT----------- ---List of tables: -----Reimbursement Table -----Users Table -----Reimbursement Status Table -----Reimbursement Type Table -----User Roles Table --------CREATING ALL TABLES-------- ----User Roles Table CREATE TABLE user_roles( role_ID SERIAL, user_role varchar(50), PRI...
true
58222d7888e9703085095bf42bdecf786cba4cbb
SQL
whatevercamps/sistrans
/Docs/sql/POBLACIONDETABLAS.sql
WINDOWS-1250
89,560
2.734375
3
[ "MIT" ]
permissive
DELETE FROM PREFERENCIAS; DELETE FROM PEDIDOSDEORDEN; DELETE FROM CONDICIONZONA; DELETE FROM REPRESENTA; DELETE FROM PRODUCTOSSIMILARES; DELETE FROM TIPOPRODUCTO; DELETE FROM INGREDIENTESSIMILARES; DELETE FROM CLIENTESFRECUENTES; DELETE FROM MENUS; DELETE FROM BEBIDAS; DELETE FROM PLATOSFUERTES; DELETE FROM ...
true
b7732a1c8f8caa5bd9cbadf284771de5ceddad85
SQL
prabharya910/airflow-etl-mssql-tech-test
/ETL/templates/daily_load_test/load_fact_sales.sql
UTF-8
464
3.84375
4
[]
no_license
INSERT INTO test.dbo.fact_sales ( Fk_loc_id, FK_loc_type_id, FK_item_id, sales_date, sales_amount ) SELECT loc.loc_id, lt.loc_type_id, i.item_id, s.sales_date, s.sales_amount FROM test.dbo.stg_sales s JOIN test.dbo.dim_location loc ON s.location_key= loc.loc_key JOIN test.dbo.dim_location_type lt ...
true
91a57727d28d3bd0d5a0ab1ec1eb23dbdc071234
SQL
dulumary/java_web
/database/03_mysql_query_hard/ex/ex02.sql
UTF-8
2,096
4.65625
5
[]
no_license
# 예시용 테이블 생성과 데이터 삽입 -- 테이블 생성 CREATE TABLE `entrant` ( `id` int NOT NULL AUTO_INCREMENT primary key, `name` varchar(10) NOT NULL, `license` varchar(20) NOT NULL, `score` int NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- 데이터 삽입 insert into `entrant` (`name`, `license`, `score`) values ('김인규', '...
true
943df27ac021bff2d8014d61f8574ef0b5176be9
SQL
xemuliam/misc
/BigQuery/Delta/get_delta_date_partitions_filter_tgt.sql
UTF-8
608
2.5625
3
[]
no_license
create procedure get_delta_date_partitions_filter_tgt( _in_tgt struct< table_name string, event_timestamp_column_name string, additional_filter_condition string >, _in_src struct< table_name string, event_timestamp_column_name string >, out _out_partitions_struct struct< max_tgt_ts ...
true
ef6130f0adb77f57517903bb693ef89e50d8a55f
SQL
mkhira2/sql-exercises
/04-sql-exercise/04-exercises.sql
UTF-8
1,427
4.46875
4
[]
no_license
-- LINK: https://en.wikibooks.org/wiki/SQL_Exercises/The_computer_store -- Select the title of all movies. SELECT title FROM movies; -- Show all the distinct ratings in the database. SELECT DISTINCT rating FROM movies; -- Show all unrated movies. SELECT title FROM movies WHERE rating IS NULL; -- Select all movie th...
true
975cc2b4be5946dc306ade54395c7adff5a0dce0
SQL
dev-tatsuya/influ-dojo
/migration/db/migrations/20200907145035-create_users.sql
UTF-8
435
2.984375
3
[]
no_license
-- +migrate Up CREATE TABLE IF NOT EXISTS `users` ( `user_id` varchar(255) NOT NULL DEFAULT '', `name` varchar(255) NOT NULL DEFAULT '', `screen_name` varchar(255) NOT NULL DEFAULT '', `profile_image` varchar(255) NOT NULL DEFAULT '', `created_at` datetime DEFAULT NULL, `updated_at` datetime DEFAULT NULL, ...
true
39704f7a99377b1829c48203b1891f7b85cf8fdd
SQL
chatlamin/cBackup-docker
/scripts/update/update-db.sql
UTF-8
5,772
3.234375
3
[]
no_license
/* Processes -> Schedules. Создаем три зачади: 1. ежедневно в 06.00 отработает системная задача git на все конфиги резервных копий. 2. ежедневно в 04.00 отработает системная задача backup, в которой настроены хосты из раздела Processes -> Task assignments 3. раз в месяц 1 числа в 06.00 отработает системная задача disco...
true
cd33271919071148d79f9ff5e652a02f61a004a2
SQL
L-elite/projet
/backend/scripts-api-rest/wassim-webservice-nombreDeScout.sql
UTF-8
443
2.84375
3
[]
no_license
CREATE PROCEDURE "DBA"."proc_afficherNombreScout"() result(idPatrouille integer, nomDePatrouille char(255), nbrScoutPatrouille INTEGER ) BEGIN select patrId, patrLib, count(scoutId) from scouts join patrouilles on scouts.scoutPatrouille = patrouilles.patrId GROUP BY patrId, patrLib END -- create ser...
true
ee4559c392477de53f5c9a7a8e23af79edc18017
SQL
Gcorpch/Coding
/BD/sdc.sql
UTF-8
2,927
3.296875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.3 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Oct 02, 2018 at 07:46 AM -- Server version: 10.1.36-MariaDB -- PHP Version: 7.2.10 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OL...
true
cac2c71938230e6c64ba36a54203f4b7665281e5
SQL
bheckel/code
/database/create_table_script.sql
UTF-8
2,714
2.875
3
[ "Apache-2.0" ]
permissive
-- ---------------------------------------------------------------------------- -- Author: Bob Heckel -- Date: 18JAN19 -- Usage: Make the SPAM stop -- JIRA: ROION-34823 -- ---------------------------------------------------------------------------- DECLARE l_defect_num VARCHAR2(50); l_release_num VARC...
true
c74daf93215f9c3270bad5b1bf4fe110dde26602
SQL
pjmilazzo/JavaRestTutorialWithDerby
/docs/JavaRestfulServiceTutorial.sql
UTF-8
1,348
3.1875
3
[]
no_license
DROP TABLE PC_PARTS; CREATE TABLE PC_PARTS ( pc_parts_pk INTEGER NOT NULL GENERATED ALWAYS AS IDENTITY (START WITH 1, INCREMENT BY 1), pc_parts_title VARCHAR(30) NOT NULL, pc_parts_code INTEGER NOT NULL, pc_parts_maker VARCHAR(30) NOT NULL, pc_parts_avail INTEGER NOT NULL, pc_parts_desc VARCHAR(100) NOT NULL,...
true
4d4941aa0dda89d03ab541f080149492808e1d75
SQL
aborngra/STOCKAN
/STOCKAN/DML/SECTORS.sql
UTF-8
1,324
3.25
3
[]
no_license
MERGE INTO sectors trg USING (SELECT 1 AS id, 'Basic Materials' AS name FROM DUAL UNION ALL SELECT 2 AS id, 'Communication' AS name FROM DUAL UNION ALL SELECT 3 AS id, 'Consumer Cyclical' AS name FROM DUAL UNION ALL SELECT 4 AS id, 'Consumer D...
true
33650f017b81bc5e5f03b63914291fc5782bd9ad
SQL
chawikarn/Buffe_Project_JAVA-
/buffetproject.sql
UTF-8
4,838
3.375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Oct 13, 2020 at 10:33 AM -- Server version: 10.4.13-MariaDB -- PHP Version: 7.4.8 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIEN...
true
895850e14691873a6b66df245e6c57e508500d99
SQL
llh1000/MSDS7330
/Query Files/DataFiles.sql
UTF-8
5,704
3.40625
3
[]
no_license
-- Create a table for attendance -- ----------------------------------- create table `attendance` ( `TEAM` varchar(3), `YEAR` numeric, `ATTENDANCE` numeric ); -- Populate the attendance table and check -- -------------------------------------------- LOAD DATA LOCAL INFILE 'C:/MySQL/TermProject/attendance....
true
79c23e27b8654b5d22ea7d2bbc8c28c1c40c3ecc
SQL
vanthuan9902/Rikkei_Batch01_Ha_Van_Thuan
/Module_4/sql1_TaoTable.sql
UTF-8
2,880
3.234375
3
[]
no_license
create database QuanLyNhaSach; create table quanlynhasach.SanPhamSach( MaSPSach varchar(255) NOT NULL, TenSPSach varchar(255) NOT NULL , SoLuong int NOT NULL , DonGia int, DonVi int NOT NULL , MaDMSach varchar(255) NOT NULL , NhaXuatBan varchar(255), NamXuatBan year, TacGia varchar(255...
true
66b5db2fa60d6ad83186a0ee9284614b8d8ca27c
SQL
PacoTeran/Login-POO
/tabla.sql
UTF-8
481
2.75
3
[]
no_license
-- --Los Datos de la base estan en conexion\config.php -- -- Estructura de tabla para la tabla `usuarios` -- CREATE TABLE IF NOT EXISTS `usuarios` ( `id` int(11) NOT NULL AUTO_INCREMENT, `nombre` varchar(25) DEFAULT NULL, `pass` varchar(64) DEFAULT NULL, `email` varchar(80) DEFAULT NULL, PRIMARY KEY (`id`) )...
true
373ed6931f716460170de8af1afc09c14830c614
SQL
CSCfi/antero
/db_archive/sql_archive/226__dw_alter_procedure_p_lataa_f_avop_live_get_taustakysymys_data.sql
UTF-8
2,456
3.1875
3
[ "MIT" ]
permissive
ALTER PROCEDURE dw.p_lataa_f_avop_live AS TRUNCATE TABLE dw.f_avop_live INSERT INTO dw.f_avop_live ( d_organisaatio_id, d_koulutusluokitus_id, d_kieli_id, d_alueluokitus_id, d_kalenteri_id, tunnus, koulutusmuoto, kysymysryhma_fi, kysymysryhma_sv, kysymysryhma_en, kysely_fi, kysely_sv, kysely_en, ...
true
ca05f3589ca1574ac7c5ede3d63be6e92589255f
SQL
nguyenhuuthinhvnpl/INFO_6210
/Project/Jobs_DB_Project/SQL/FinalProjectUseCases.sql
UTF-8
16,846
3.859375
4
[ "MIT" ]
permissive
/* Copyright (c) 2015 Valerie Charry, Andrew Hombach, Andrew Martone Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, m...
true
281c9341b9a95428320aa1b8da9df34266de8616
SQL
LucasGFarias/Teste-Tecnico-Germano
/Script Banco.sql
UTF-8
688
3.71875
4
[]
no_license
create database api use api create table marcas ( id int(11) AUTO_INCREMENT not null, nome varchar(50) not null, constraint id_pk primary key (id) ); create unique index indiceNomeMarca on marcas(nome); create table patrimonios ( numeroTombo int, nome nvarchar(50) not null, idMarca int not null, ...
true
74f8fc6c977596290bf0ec1c48ea4868f369af16
SQL
betoamaya/SQL-Turismo
/Intelisis/Scripts Soporte/Tesoreria - ErrorControlIngresos.sql
ISO-8859-1
2,892
3.6875
4
[ "Apache-2.0" ]
permissive
/*Buscando los parametros del error en log*/ SELECT * FROM dbo.Interfaz_Logs AS il WHERE il.SP = 'Interfaz_tesoreriaDepositarDetalle' ORDER BY il.Fecha DESC; /*Parametros <Parametros> <Empresa>TUN </Empresa> <FechaDeCorte>2018-10-31T00:00:00</FechaDeCorte> <Concepto>VIAJES ESPECIALES</Concepto> <Moneda>Pesos...
true
7ee72cdd228b1b785e9255a2dce1a8d93a956d6a
SQL
AndreyYE/MAGENTO
/dnipro.sql
UTF-8
7,482
3.140625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.9.2 -- https://www.phpmyadmin.net/ -- -- Хост: 127.0.0.1 -- Время создания: Мар 24 2020 г., 10:17 -- Версия сервера: 10.4.10-MariaDB -- Версия PHP: 7.3.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHA...
true
8eac4533d1ebfb9db12e10cd9a206eeb7e0a872a
SQL
nberardi/hMailServer
/trunk/source/DBScripts/Upgrade3301to3400MySQL.sql
UTF-8
1,205
2.515625
3
[]
no_license
ALTER TABLE hm_accounts ADD accountpwencryption TINYINT NOT NULL ALTER TABLE hm_accounts CHANGE accountpassword accountpassword VARCHAR(255) NOT NULL create table hm_deliverylog ( deliveryid int auto_increment not null, primary key(deliveryid), unique(deliveryid), deliveryfrom varchar(255) not null, delive...
true
d46ea9ce77f3501c1af2f716a753e9b5472c0ed8
SQL
netcommons/NetCommons2
/html/webapp/modules/todo/sql/mysql/table.sql
UTF-8
4,053
3.515625
4
[]
no_license
-- -------------------------------------------------------- -- - -- テーブルの構造 `todo` -- - CREATE TABLE `todo` ( `todo_id` int(11) NOT NULL default '0', `room_id` int(11) NOT NULL default '0', `todo_name` varchar(255) NOT NULL default '', `task_authority` tinyint(3) NOT NULL de...
true
e33da5644b490b2ca88f33dc771aeb30743101e6
SQL
TesterRavi/hal0-fixtures
/schema/purchase_orders_line_items.sql
UTF-8
2,087
3.3125
3
[]
no_license
/*!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 */; /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40014 SE...
true
fa3011199e4d40dfea8fc43b4273d7d0b573e2ac
SQL
eyad79/french-touch
/mon_project.sql
UTF-8
3,090
3.375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.0.1 -- https://www.phpmyadmin.net/ -- -- Hôte : 127.0.0.1 -- Généré le : mer. 30 mai 2018 à 11:44 -- Version du serveur : 10.1.32-MariaDB -- Version de PHP : 7.2.5 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!4010...
true
eb0f5a0a5e6fa09b86c2909c62cdf92c46e84cb8
SQL
sandnul025/volunteer
/src/main/resources/sql/nulblog.sql
UTF-8
3,137
3.375
3
[]
no_license
/* SQLyog Ultimate v12.09 (64 bit) MySQL - 5.7.14 : Database - nulblog ********************************************************************* */ /*!40101 SET NAMES utf8 */; /*!40101 SET SQL_MODE=''*/; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_...
true
6f1803e1d11f786302ed85dc528d8bf8f28ed74f
SQL
herrhound/NDMail
/Database/PostgreSQL/Scripts/main/transactionEntityRelation.sql
UTF-8
540
3.765625
4
[]
no_license
CREATE TABLE main.transactionEntityRelation ( transactionEntityRelationId INT NOT NULL, transactionId INT NOT NULL, entityId INT NOT NULL ); ALTER TABLE main.transactionEntityRelation ADD CONSTRAINT main_transcationEntityRelation_transactionId FOREIGN KEY (transactionId) REFERENC...
true
aac9e884484d1513a557b05a2088c1948836a0fb
SQL
hinoki0000/mono
/src/sql/ecsite.sql
UTF-8
2,925
3.171875
3
[]
no_license
drop database if exists newecsite; create database if not exists newecsite; use newecsite; drop table if exists user_info; create table user_info( id int not null primary key auto_increment, user_id varchar(16), login_pass varchar(16), user_name varchar(16), family_name varchar(16), first_name varchar...
true
195d4abaadc4516d9e045f32161e5ffd25522e5d
SQL
aruna9876/SQLServer-100DaysOfSQL
/T-SQL/1068.ProductSalesAnalysisI/InsertIntoProduct.sql
UTF-8
142
2.609375
3
[]
no_license
USE LeetCode_ProductSalesAnalysis INSERT INTO Product( product_id, product_name ) VALUES (100, 'Nokia'), (200, 'Apple'), (300, 'Samsung')
true
2e765f8e06844b21c21a8c0091ad3bb48f9dfdfb
SQL
cameronheard/COSC-471
/historical_migrations/003-standardize_fields.sql
UTF-8
4,677
3.765625
4
[]
no_license
-- Split the name column into first and last names alter table Customer change Name Fname varchar(32) not null; alter table Customer add Lname varchar(32) not null after Fname; -- Increase the email field's max size and move it to after the name alter table Customer modify Email varchar(255) not null after Lname;...
true
8d24571efc143b39a7494a3b0ebce1f8ae1be1b0
SQL
groinder/bd
/lista1/zad14.sql
UTF-8
308
3.203125
3
[]
no_license
select "Plec", count("Plec") "Liczba lingwistow" from (select (select PLEC_WAMPIRA from WAMPIRY where WAMPIRY.PSEUDO_WAMPIRA = JEZYKI_OBCE_W.PSEUDO_WAMPIRA) "Plec" from JEZYKI_OBCE_W group by PSEUDO_WAMPIRA having count(JEZYK_OBCY) > 1) SJ group by "Plec";
true
1b8e2c768390704667994bb3b2b10d469760d0bc
SQL
zjdev-commits/CourseKillScheme_base
/src/main/resourses/sql/institution.sql
UTF-8
1,224
3.28125
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : localhost_3306 Source Server Type : MySQL Source Server Version : 50562 Source Host : localhost:3306 Source Schema : course_selection Target Server Type : MySQL Target Server Version : 50562 File Encoding : 65001 Date: 0...
true
0914fd8882fd636df70feaa238b5cb1f9609ac08
SQL
MayaChandre/AddressBook-DB
/addressbook_service_addressbook.sql
UTF-8
2,297
3.796875
4
[]
no_license
#Uc1 create database AddressBook_Service; show databases; use AddressBook_Service; #Uc2 create table AddressBook( id int unsigned not null auto_increment, first_name varchar (15) not null, last_name varchar (15) not null, address varchar (150) not null, city varchar (150) not null, state varchar (150) not ...
true
6fc7a5fbc8b0450c6edfdb87cd814272a8227922
SQL
UGTU/Old-School
/Support/DBScripts/CreateCSVfileToCheckEge.sql
UTF-8
532
3.34375
3
[]
no_license
select distinct Clastname+'%'+Cfirstname+'%'+Cotch+'%'+Doc_stud.Cd_seria+'%'+Doc_stud.Np_number from ABIT_postup inner join ABIT_Diapazon_spec_fac on ABIT_postup.NNrecord = ABIT_Diapazon_spec_fac.NNrecord inner join Person on Person.nCode = ABIT_postup.nCode left join Doc_stud on ABIT_postup.nCode = Doc_stud.nCode...
true
6bd3903dc3a86b26b167b1984d03bf72c6e63a11
SQL
reddit-clone-wr1/Echo
/db/search/get_search_posts_no_user.sql
UTF-8
682
3.796875
4
[]
no_license
select p.post_id, p.post_title, p.post_url, p.post_time, p.vote_tracker, s.subforum_name, s.subforum_img, s.subforum_id, u.username, u.user_id, p.vote_tracker, count(distinct c.comment_id) from subforums s inner join posts p on p.subforum_id = s.subforum_id inner ...
true
ef1206fb3a763ef9ea1365fdf01f9af0b4bba028
SQL
Sylvain2511/Xamarin_GSB
/gsbmobile_1.sql
UTF-8
2,579
3.4375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.9.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1:3306 -- Generation Time: Mar 30, 2020 at 01:14 PM -- Server version: 10.4.10-MariaDB -- PHP Version: 7.3.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SE...
true
cc67789b3a75dd833bf24b1db86287e05e781bd4
SQL
arenadata/ClickHouse
/tests/queries/0_stateless/01073_bad_alter_partition.sql
UTF-8
588
2.671875
3
[ "Apache-2.0" ]
permissive
DROP TABLE IF EXISTS merge_tree; CREATE TABLE merge_tree (d Date) ENGINE = MergeTree ORDER BY d PARTITION BY d; INSERT INTO merge_tree VALUES ('2020-01-02'); SELECT 1, * FROM merge_tree; -- ALTER TABLE merge_tree DROP PARTITION 2020-01-02; -- This does not even parse -- SELECT 2, * FROM merge_tree; ALTER TABLE merge...
true
660a9963e0acbbdc6eff1a63f875c39807f8b2b9
SQL
mullerpaul/DBAstuff
/warehouse/resources/database/operationalstore/views/legacy/lego_time_to_fill_views.sql
UTF-8
1,688
2.9375
3
[]
no_license
CREATE OR REPLACE FORCE VIEW lego_time_to_fill_vw AS SELECT buyer_org_id, supplier_org_id, job_id, assignment_continuity_id, candidate_id, job_category_id, job_created_date, job_approved_date, job_released_to_supp_date, submi...
true
bc1b0c7c905d4e059b2829fe99ef405e01ea21b4
SQL
ysy2025/daily
/源码分析模板.sql
UTF-8
28,563
3.21875
3
[]
no_license
〇,引出目的 Spark在运行时Driver端和Executor端需要互相通信,那么这种通信是如何进行的? 在SparkEnv中有两个方法createDriverEnv,createExecutorEnv,分别用于创建Driver端和Executor端的SparkEnv对象。 看一下SparkEnv对象的结构,从下面的代码中可以看到SparkEnv包含了Spark中很多重要组件,比如用于通信的RpcEnv,用于序列化的SerializerManager,还包括ShuffleManager、BroadcastManager、BlockManager,MemoryManager等用于管理Shuffle,broadcast,block...
true
a829024b31f0e8008ad9ca5e58e2d0d16b4fdd67
SQL
BabyShung/SAE-online-bookstore
/database/Customer.sql
UTF-8
1,309
2.96875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 3.3.8.1 -- http://www.phpmyadmin.net -- -- 主机: w.rdc.sae.sina.com.cn:3307 -- 生成日期: 2012 年 04 月 18 日 23:14 -- 服务器版本: 5.1.47 -- PHP 版本: 5.2.9 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS...
true
e758e638442ae8663e5ba8c328dcee8bf39012cc
SQL
shivdeepmodi/Setup
/sqlpath/pga-uga.sql
UTF-8
1,799
3.375
3
[]
no_license
COLUMN sid FORMAT 999 HEADING 'SID' COLUMN oracle_username FORMAT a12 HEADING 'Oracle User' JUSTIFY right COLUMN os_username FORMAT a9 HEADING 'O/S User' JUSTIFY right COLUMN session_program FORMAT a18 HEADING 'Sessi...
true
07813c24c3d658fe93252ea0824f7c4194234137
SQL
rafaelpontezup/bootcamp-02-template-casa-do-codigo
/src/main/resources/db/migration/V1.0.0.8__add_coupon_applied.sql
UTF-8
257
3.03125
3
[ "Apache-2.0" ]
permissive
alter table purchases add column coupon_id int8, add column discount numeric(19, 2), add column valid_until date; alter table purchases add constraint FK4sqocqt2sv83kxdti1ebdc1aq foreign key (coupon_id) references coupons;
true
51c7dadc3c020ce17e594bfebd1bdc6f4e556f5e
SQL
geasseur/listeVehicule
/tableListeVehicule.sql
UTF-8
1,861
3.25
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.6.5.2 -- https://www.phpmyadmin.net/ -- -- Client : localhost:8889 -- Généré le : Lun 30 Octobre 2017 à 14:08 -- Version du serveur : 5.6.35 -- Version de PHP : 7.1.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; -- -- Base de données : `listeVehicule` -- ...
true
6767c4d3bea5ed94c7603af359c6cf8e39bd7788
SQL
oynomak/hmis-billing-system
/La Croix du Sud DB Stored Procedures/UPDATE PROCEDURES (LA CROIX DU SUD)/UPDATE_RESULTATS_EXAMEN.sql
UTF-8
456
2.640625
3
[]
no_license
CREATE PROCEDURE UPDATE_RESULTATS_EXAMEN @CODE_EXAMEN nvarchar(10) , @ID_SERVICES_RENDUS nvarchar(10) , @ID_CONSULTATION nvarchar(20) , @DATE_EXAMEN datetime , @ID_TYPE_ECHANTILLON int , @RESULTATS nvarchar(50) AS UPDATE RESULTATS_EXAMEN SET ID_CONSULTATION=@ID_CONSULTATION, DATE_EXAMEN=@DATE_EXAMEN, ID...
true
3a71a6c33af6ed342cb870be1bec2b406a00c669
SQL
Staff36/Lesson6-Hibernate2
/init.sql
UTF-8
2,602
3.984375
4
[]
no_license
drop table if exists products_and_customers.customers_products; drop table if exists products_and_customers.products; drop table if exists products_and_customers.customers; drop schema if exists products_and_customers; create schema products_and_customers; create table products_and_customers.customers ( id s...
true
b2417a84dcee3a2ec2e07295a82986bd50ea20dc
SQL
Aibek21/DatabaseSamples
/quiz1_group2.sql
UTF-8
1,540
4.15625
4
[]
no_license
CREATE TABLE manufacturers ( code SERIAL PRIMARY KEY, name VARCHAR(255) ); CREATE TABLE products ( code SERIAL PRIMARY KEY, name VARCHAR(255), price NUMERIC, manufacturer INTEGER REFERENCES manufacturers (code) ); --1 SELECT DISTINCT ON (manufacturer) name FROM products; --2 SEL...
true
1cd98dbe21660c2739556df204954beac3acb90b
SQL
ClickHouse/ClickHouse
/tests/queries/0_stateless/02346_full_text_search.sql
UTF-8
15,259
3.703125
4
[ "Apache-2.0", "BSL-1.0" ]
permissive
SET allow_experimental_inverted_index = 1; SET log_queries = 1; ---------------------------------------------------- SELECT 'Test inverted(2)'; DROP TABLE IF EXISTS tab; CREATE TABLE tab(k UInt64, s String, INDEX af(s) TYPE inverted(2)) ENGINE = MergeTree() ORDER BY k SETTINGS index_granulari...
true
d9847d547b8dc5b9b5b52e02ef6aa59b654282d0
SQL
kanrar-subhankar/Training-project
/e_blood.sql
UTF-8
2,744
3.203125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.7.7 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: Feb 19, 2018 at 05:50 PM -- Server version: 10.1.30-MariaDB -- PHP Version: 7.1.13 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OL...
true
28fb11dfede4b637df196e867c6bb4355ad516e7
SQL
hpmsnell/measures
/measures/2018/mips/130/spec.cql
UTF-8
1,659
3.328125
3
[]
no_license
library MIPS_130_2017 version '1' /* * Source: MIPS * ID: 130 * Year: 2017 * Version: 1 */ using QDM // Encounter, Performed valueset "MIPS; MIPS 130 Encounter" // Procedure, Performed valueset "VSAC; Current Medications Documented SNMD": '2.16.840.1.113883.3.600.1.462' valueset "MIPS; Performance Met: G8427...
true
ed836d524cf60f29b1ff59a72ca3804dfa87d643
SQL
ThePatrickStar/sqlite-test-generator
/minimized/imposter1.sql
UTF-8
1,378
3.765625
4
[]
no_license
CREATE TABLE t1(a INTEGER PRIMARY KEY, b, c, d NOT NULL); CREATE INDEX t1b ON t1(b); CREATE UNIQUE INDEX t1c ON t1(c); WITH RECURSIVE c(i) AS (VALUES(1) UNION ALL SELECT i+1 FROM c WHERE i<30) INSERT INTO t1(a,b,c,d) SELECT i,1000+i,2000+i,3000+i FROM c; CREATE TEMP TABLE chnglog(desc TEXT); CREATE TEMP TRIGGER xt1_del...
true
f9975684f21df16405f854f927c8fb21d75b944b
SQL
loiduong98/ticketonline
/backend/database/vexeonline.sql
UTF-8
19,712
2.890625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.9.0.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Oct 21, 2019 at 05:40 PM -- Server version: 10.3.16-MariaDB -- PHP Version: 7.3.7 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @O...
true
f1e04ae2b1e2474b4a6c855915a11e38f6d8e708
SQL
DEFRA/water-abstraction-import
/migrations/sqls/20201120135927-create-charge-versions-metadata-table-up.sql
UTF-8
474
2.78125
3
[ "OGL-UK-3.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
CREATE TYPE charge_version_metadata_status AS ENUM('current', 'superseded'); CREATE TABLE IF NOT EXISTS water_import.charge_versions_metadata ( external_id varchar not null, version_number integer not null, start_date date not null, end_date date, status charge_version_metadata_status not null, is_nald_gap boole...
true
34dcdea2f28fe30e993845b110355b9666de1cc7
SQL
muttylion/bamazon
/schema.sql
UTF-8
460
3.0625
3
[]
no_license
DROP DATABASE IF EXISTS bamazon; CREATE database bamazon; USE bamazon; CREATE TABLE products( ITEM_ID INT NOT NULL, PRODUCT_NAME VARCHAR(255), DEPARTMENT_NAME VARCHAR(255), PRICE DECIMAL(18,2), STOCK_QUANTITY INT, PRODUCT_SALES DECIMAL(18,2), PRIMARY KEY (ITEM_ID) ); CREATE TABLE departme...
true
9405d0eb758c13caccda2295187b96a90fd800d4
SQL
itfilip/zend
/scripts/zf-tutorial.sql
UTF-8
7,287
2.859375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 3.3.9 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Jan 30, 2013 at 06:13 PM -- Server version: 5.1.53 -- PHP Version: 5.3.4 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_S...
true
bd5590f65e8f5375abbdf747445ce89979386953
SQL
silence-do-good/stress-test-Postgres-and-MySQL
/dump/low/day16/select0428.sql
UTF-8
178
2.609375
3
[]
no_license
SELECT timeStamp, temperature FROM ThermometerOBSERVATION o WHERE timestamp>'2017-11-15T04:28:00Z' AND timestamp<'2017-11-16T04:28:00Z' AND temperature>=14 AND temperature<=88
true
42c3192c44da3bbeb0021804a1fc907cb8d7f120
SQL
vyesubabu/metview
/odb_api_bundle-0.17.6-Source/odb/src/ddl/nak_resat_averaging_kernel.sql
UTF-8
546
3.171875
3
[]
no_license
// //-- ODB/SQL file 'nak_resat_averaging_kernel.sql' // // New: 12-Sep-2005 // SET $tslot = -1; CREATE VIEW nak_resat_averaging_kernel AS SELECT seqno READONLY, // r/o; MUST BECOME FIRST nak // r/o // FROM timeslot_index, index, hdr, sat, resat, resat_averagin...
true
0edf21c09ca11e5c7913b76ecac5c84c930fc52f
SQL
EgorBanin/vnemliru
/mysql/schema.sql
UTF-8
367
2.90625
3
[]
no_license
use `vnemliru`; drop table if exists `articles`; create table `articles` ( `id` int unsigned not null auto_increment, `src` text not null comment 'исходник', `html` text not null comment 'сгенерённый html', `ct` int unsigned not null comment 'timestamp, время создания', primary key (`id`) ) engine InnoDB comment ...
true
679eb0e1699aca3da1d87193d8c7cfaf902adb97
SQL
MakeSomeFakeNews/leechee-Admin-ant-design
/src/main/resources/sql/leechee.sql
UTF-8
17,094
3.234375
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : localhost_3306 Source Server Version : 50726 Source Host : localhost:3306 Source Database : leechee Target Server Type : MYSQL Target Server Version : 50726 File Encoding : 65001 Date: 2021-02-28 23:56:31 */ SET FOREIGN_KEY_CHECKS=0; ...
true
f51614d5b594dad813646e14492138f062a5dabb
SQL
beauty0/Oracle-RentCar-
/Allfunctions.sql
UTF-8
862
3.578125
4
[]
no_license
----Beauty orjiakor oracle project ------This function is to find out if the CARCUST ID valid,it will 0 when is valid and when is 1 then is invalid SET SERVEROUTPUT ON; CREATE OR REPLACE FUNCTION CHECK_ID (CARCUST_ID NUMBER) RETURN NUMBER AS BEGIN IF CARCUST_ID < 101 THEN RETURN 1; ELSE RETURN 0; ...
true
1886e01fdd1d43060b73413134e7f493deb9133f
SQL
lajimon/example-order
/src/main/resources/db/migration/V1__init_ddl.sql
UTF-8
7,422
3.71875
4
[]
no_license
-- partner create table partners ( id bigint auto_increment primary key comment 'ID', partner_token varchar(255) not null comment 'partner_token', partner_name varchar(255) not null comment '파트너명', business_no varchar(255) not null comment '사업자등록번호', email varchar(255) not null...
true
7ff04f40501332407c3c2721ec180194f5e5448d
SQL
henriquelorenzini/BancoDeDadosII
/Prova.sql
UTF-8
3,166
4.40625
4
[]
no_license
1- use prova; CREATE TABLE CATEGORIA( ID INT NOT NULL, Nome VARCHAR(100) NOT NULL, PRIMARY KEY (ID) ); CREATE TABLE CLIENTE( ID INT NOT NULL, Nome VARCHAR(200) NOT NULL, PRIMARY KEY (ID) ); CREATE TABLE VENDEDOR( ID INT NOT NULL, Nome VARCHAR(200), PRIMARY KEY (ID) ); CREATE ...
true
8ad94708761f72c05b2c2b5090d548609d5a612a
SQL
Bauyr/BookShop
/Book shop/records.sql
UTF-8
358
3
3
[]
no_license
/* CURSOR BASED RECORD */ DECLARE CURSOR showallbooks is SELECT * FROM books; showallbooks_rec showallbooks%rowtype; BEGIN OPEN showallbooks; LOOP FETCH showallbooks into showallbooks_rec; EXIT WHEN showallbooks%notfound; DBMS_OUTPUT.put_line(showallbooks_rec.id || ' ' || showallbo...
true
20e041e2bad7e0932c5ab697b05bd25f7b0ded4a
SQL
SocialGouv/reva
/packages/reva-api/prisma/migrations/20220419121035_companion_not_nullable/migration.sql
UTF-8
621
3.28125
3
[ "Apache-2.0" ]
permissive
/* Warnings: - Made the column `companion_id` on table `candidacy` required. This step will fail if there are existing NULL values in that column. */ -- DropForeignKey ALTER TABLE "candidacy" DROP CONSTRAINT "candidacy_companion_id_fkey"; -- AlterTable ALTER TABLE "candidacy" ALTER COLUMN "companion_id" SET NOT ...
true
60fbd11b9602180ef8234a4bfe369c23980be33e
SQL
aqeel1415/tms_o
/ats_db.sql
UTF-8
14,132
3.328125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.7.1 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3306 -- Generation Time: Sep 20, 2017 at 09:05 AM -- Server version: 5.6.36 -- PHP Version: 5.6.31 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CH...
true
436ebe0d8c7b51162613a7b5ce07068ed08e0541
SQL
MartinRavanov72/Softuni
/Java DB/Database Basics – MySQL/Database Programmability - Exercise/15. Log Accounts Trigger.sql
UTF-8
309
3.234375
3
[]
no_license
CREATE TABLE `logs`( log_id INT PRIMARY KEY NOT NULL AUTO_INCREMENT, account_id INT, old_sum DECIMAL(17, 4), new_sum DECIMAL(17, 4) ); CREATE TRIGGER tr_changed_balances AFTER UPDATE ON accounts FOR EACH ROW BEGIN INSERT INTO `logs`(account_id, old_sum, new_sum) VALUES(OLD.id, OLD.balance, NEW.balance); END
true
4f1c0f81834f24cc1fa432fb9ad4e0677d2cbc5f
SQL
ninobomba/bedu
/session_01/exercise.sql
UTF-8
6,225
3.9375
4
[]
no_license
-- Dentro del mismo servidor de bases de datos, conéctate al esquema classicmodels. use classicmodels; -- Dentro de la tabla employees, obtén el apellido de todos los empleados. SELECT lastname FROM employees; -- Dentro de la tabla employees, obtén el apellido, nombre y puesto de todos los empleados. SELECT ...
true
2c1831c86642da694a12dad72728a5fe77978fa6
SQL
CristianoRibeiro/oficina-ro-a
/admin/DB/oficina_roca_SQL001.sql
UTF-8
12,242
2.921875
3
[]
no_license
-- MySQL Workbench Synchronization -- Generated: 2015-12-01 01:10 -- Model: New Model -- Version: 1.0 -- Project: Name of the project -- Author: Cristiano 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_M...
true
3ee1f8887aedf02641ad5d93b2165ef62819d10a
SQL
KirilPecev/CSharp-DB-Fundamentals
/02. Databases Basics - Exams/03. Databases MSSQL Server Exam - 03 January 2018/12. Age Groups Revenue.sql
UTF-8
732
3.859375
4
[]
no_license
SELECT CASE WHEN YEAR(c.BirthDate) BETWEEN 1970 AND 1979 THEN '70' + char(39) + 's' WHEN YEAR(c.BirthDate) BETWEEN 1980 AND 1989 THEN '80' + char(39) + 's' WHEN YEAR(c.BirthDate) BETWEEN 1990 AND 1999 THEN '90' + char(39) + 's' else 'Others' END AS [AgeGroup], Sum(o.Bill) as [Reve...
true
85a2e02c0e8e5572073a8aae5ce320123f95b767
SQL
znjuko/test-avito-antibot
/db.sql
UTF-8
305
3.203125
3
[]
no_license
DROP TABLE IF EXISTS ip; CREATE EXTENSION IF NOT EXISTS CITEXT; CREATE TABLE ip ( id_ip BIGSERIAL PRIMARY KEY, ip_value CITEXT NOT NULL, counter INT DEFAULT 1, time TIMESTAMP WITH TIME ZONE DEFAULT NULL ); CREATE UNIQUE INDEX idx_ip_uniqueip ON ip(ip_value);
true
48f21c723102a66ff6a04104656831d633796a1e
SQL
gilandk/gradsys
/database/grading.sql
UTF-8
112,105
2.890625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Nov 18, 2019 at 08:20 PM -- Server version: 10.1.9-MariaDB -- PHP Version: 5.6.15 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLI...
true
aa4d02296e154654a6cbd1add6f3ae9dea970fc4
SQL
Dylson14/iEmp-FindMyEmployee-HW12
/db/seeds.sql
UTF-8
711
2.984375
3
[]
no_license
INSERT INTO department (name) VALUES ("Sales"), ("Engineering"), ("Finance"), ("HR"), ("Legal"); INSERT INTO role (title, department_id, salary) VALUES ("Sales Lead", 1, 10000), ("Software Engineering", 2, 12000), ("Recruitment", 4, 8000), ("Technical Consultant", 2, 80...
true
9cdb1fabb7a0c9ef303eb7b958d63d882e82a5cb
SQL
blaws006/burger
/db/schema.sql
UTF-8
218
2.71875
3
[]
no_license
create database burgers_db, use burgers_db create table burgers( id INT NOT NULL AUTO_INCREMENT, burger_name VARCHAR(45) NOT NULL, devoured bit(1) NOT NULL, date DATETIME DEFAULT CURRENT_TIMESTAMP, PRIMARY_KEY (id) );
true
0487522b7b53297bfbe2962e14a8e011acd878be
SQL
radtek/abs3
/sql/mmfo/bars/Sequence/s_w4_acc_inst_upd.sql
UTF-8
1,177
2.765625
3
[]
no_license
PROMPT ===================================================================================== PROMPT *** Run *** ========== Scripts /Sql/BARS/Sequence/S_W4_ACC_INST_UPD.sql =========*** PROMPT ===================================================================================== PROMPT *** Create sequence S_W4...
true
92e9a1a8784595ba63641f434aa102a0c867d451
SQL
josenriquevh/kkoreal
/docs/definition.sql
UTF-8
1,771
3.03125
3
[]
no_license
CREATE TABLE Dept( -- Attributes -- Deptid serial, DeptName text, SubDeptid integer, PRIMARY KEY (Deptid)); CREATE TABLE Userinfo( -- Attributes -- Userid serial, Name text, Deptid integer, EmployDate date, Duty text, PRIMARY KEY (Userid), FOREIGN KEY (Deptid) REFERENCES Dept (Deptid)); CREATE TABLE Checkinout( --...
true
b784378362beabf25c0f39c0f35888db3598b922
SQL
leventarican/data-engineer-nd
/sqlite/DDL.sql
UTF-8
253
3.390625
3
[]
no_license
DROP TABLE film; DROP TABLE inventory; CREATE TABLE film ( film_id int, PRIMARY KEY (film_id) ); CREATE TABLE inventory ( inventory_id int, film_id int, PRIMARY KEY (inventory_id) CONSTRAINT fk_film_id FOREIGN KEY(film_id) REFERENCES film(film_id) );
true
763df30134bd6a94e6147904e8a248add2b69a54
SQL
L-Eli/leetcode
/database/mysql/00596-classes-more-than-5-students.sql
UTF-8
149
3.046875
3
[]
no_license
# Write your MySQL query statement below select class from (select class from courses group by class having count(distinct student) >= 5) as courses
true
df593684420e3564e03e84a032e47cc6eee47e3a
SQL
XuefengZhai/Database_Project
/PLSQL_Programs_XZ/Job/job.sql
UTF-8
462
2.984375
3
[]
no_license
-- This job refresh the consturction_end_today table everyday -- to see which construction project should end today. -- Need to create a new table - CONSTRUCTION_END_TODAY BEGIN DBMS_SCHEDULER.CREATE_JOB ( job_name => 'find_construction_end_today', job_type => 'STORED_PROCEDURE', job_action => 'Update_Cons...
true
ef16bd1276c40f9e9491d81d2618b80abfa9a67e
SQL
dan-whitehouse/api2
/src/main/resources/sql/UserView.sql
UTF-8
3,782
3.421875
3
[]
no_license
CREATE VIEW UserView AS ( select s.StudentRefId as SourcedId, s.StudentSchoolYear as SourcedSchoolYear, 'student' as Role, l.leaId as DistrictId, true as EnabledUser, s.FirstName as GivenName, s.LastName as FamilyName, s.MiddleName as MiddleName, si.StudentId as Identifier, sem.EmailAddress as E...
true
e965734085cc2e08d7bb11b2bff41839259e0693
SQL
ventureum/BigBang
/migrations/20190116041527_purchase_mps_records.up.sql
UTF-8
458
3.015625
3
[]
no_license
CREATE TABLE purchase_mps_records ( uuid uuid NOT NULL DEFAULT gen_random_uuid(), purchaser TEXT NOT NULL REFERENCES actor_profile_records(actor), vetx BIGINT NOT NULL, mps BIGINT NOT NULL, created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(), updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW(), PRIMARY ...
true
4022d3c55baab9d3874c0cbf857ff4c66fa0588a
SQL
maomaodev/ginkgo_blog
/doc/db/ginkgo_picture.sql
UTF-8
1,712
3.296875
3
[ "Apache-2.0" ]
permissive
CREATE DATABASE `ginkgo_picture`; USE `ginkgo_picture`; /*Table structure for table `t_file` */ DROP TABLE IF EXISTS `t_file`; CREATE TABLE `t_file` ( `uid` char(32) NOT NULL COMMENT '唯一uid', `file_old_name` varchar(255) DEFAULT NULL COMMENT '旧文件名', `pic_name` varchar(255) DEFAULT NULL COMMENT '文件名', `pic_...
true