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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
ad7b5ff487d088568bc9fb658ccc525a49b3a8d2 | SQL | Carsopre/CommunityManagement | /database/CrearTablasVacias.sql | UTF-8 | 4,070 | 3.171875 | 3 | [] | no_license |
Drop table Comunidad if exists cascade;
Drop table Inmueble if exists cascade;
Drop table Factura if exists cascade;
Drop table LineaFactura if exists cascade;
Drop table Concepto if exists cascade;
Drop table Carta if exists cascade;
Drop table NotaInformativa if exists cascade;
Drop table ReciboInmueble if exists ca... | true |
42f379464729c0899a82a18232c58853ea81847e | SQL | Caiiqef/projetomineda | /DDL.sql | UTF-8 | 3,147 | 4.0625 | 4 | [] | no_license | create schema bancodedados;
use bancodedados;
-- create user 'caiiqef'@'localhost' identified by '12345';
grant select, insert, delete, update on bancodedados.* to caiiqef@'localhost';
create table cliente(
cliente_id bigint unsigned not null auto_increment,
cliente_nome varchar(20) not null,
cliente_email varchar(50)... | true |
1bc33f95674643dae4b5e54771a1e0c4c2ebaf34 | SQL | Hatell/Tulospalvelu | /database/tulospalvelu.sql | UTF-8 | 4,441 | 3.46875 | 3 | [] | no_license | -- tulospalvelu.sql
-- vi: et sw=2 fileencoding=utf8
--
-- SQLite tulospalvelu kuvaus
DROP TABLE IF EXISTS luettu_emit_rasti;
DROP TABLE IF EXISTS luettu_emit;
DROP TABLE IF EXISTS rasti;
DROP TABLE IF EXISTS valiaika;
DROP TABLE IF EXISTS tulos;
DROP TABLE IF EXISTS tulos_tila;
DROP TABLE IF EXISTS sarja;
DROP TA... | true |
43e8beed820291d4658b3838871317098b9dee9f | SQL | nyfblack/bitekeji | /班级管理/81班/class81.sql | UTF-8 | 22,688 | 2.875 | 3 | [] | no_license | -- MySQL dump 10.14 Distrib 5.5.60-MariaDB, for Linux (x86_64)
--
-- Host: localhost Database: class81
-- ------------------------------------------------------
-- Server version 5.5.60-MariaDB
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET... | true |
13bd04ac4410c2b88181c73c53da61cb65ccd949 | SQL | roytuts/php | /php-mysql-infinite-level-nested-category/category.sql | UTF-8 | 1,332 | 3.71875 | 4 | [] | no_license | CREATE TABLE IF NOT EXISTS `category` (
`category_id` int UNSIGNED COLLATE utf8mb4_unicode_ci NOT NULL AUTO_INCREMENT,
`category_name` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
`category_link` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`parent_id` int UNSIGNED COLLATE utf8mb4_unicode_ci NOT N... | true |
cb8e03ce1efc9f63c616eb5d7f3934f5b02afc70 | SQL | bsniego/project101 | /Brian/Dana_JOBIETR_MAIN -- Validation Test August 2016.sql | UTF-8 | 1,121 | 3.09375 | 3 | [] | no_license | SELECT
QD_ALL.QSI_FAMILYID || QD_Cat.deptkey || QD_Cat.areakey || TQ_QY.FBDOCID RumbaORM_Code,
QD_ALL.QSI_ORGKEY site,
QD_CAT.DEPARTMENT department,
QD_CAT.AREA area,
TQ_QY.FFQSI_NAME name,
nvl(TQ_QY.FFQSI_SUPERVISOR_CN,'n/a') supervisor,
TP_QY.QSI_URL TP_URL,
QD_ALL.QSI_URL TQ_URL,
QD_ALL.QSI_TIT... | true |
3233ccbda4c24d5ca953fac350dc1627ca01591d | SQL | exastro-suite/it-automation | /ita_install_package/install_scripts/version_up/1.6.1/base_sql_en_US.sql | UTF-8 | 29,846 | 3.4375 | 3 | [
"Apache-2.0",
"LGPL-3.0-only",
"MIT"
] | permissive | ALTER TABLE B_DP_STATUS ADD COLUMN DP_MODE INT AFTER DP_TYPE;
ALTER TABLE B_DP_STATUS ADD COLUMN ABOLISHED_TYPE INT AFTER DP_MODE;
UPDATE B_DP_STATUS SET DP_MODE=1;
UPDATE B_DP_STATUS SET ABOLISHED_TYPE=IMPORT_TYPE;
ALTER TABLE B_DP_STATUS DROP COLUMN IMPORT_TYPE;
ALTER TABLE B_DP_STATUS_JNL ADD COLUMN DP_MODE INT AFT... | true |
c1a56e3fb007f87cd5d1e991cf5a630affefa869 | SQL | mazecode/mercenaries-dashboard | /src/sql/buildTestData.sql | UTF-8 | 2,593 | 4.25 | 4 | [] | no_license | /**
POSTGRESQL
CREATE TABLE users
(
username character varying(100) NOT NULL,
password character varying(100) NOT NULL,
enabled boolean DEFAULT true,
locked boolean DEFAULT false,
failed_logins integer DEFAULT 0,
last_login_date timestamp without time zone,
CONSTRAINT "PK_USER" PRIMARY KEY (username)
);
... | true |
1f0bb6f18b9f5a38ac0d93a1502c2e7dceba0330 | SQL | naidu8242/operox_shopping | /src/main/java/com/bis/operox/db/migrations/V1_1_39__Oct42016.sql | UTF-8 | 624 | 3 | 3 | [] | no_license | ALTER TABLE `operox`.`QC_EXECUTION`
ADD COLUMN `QC_STATUS` VARCHAR(10) NULL DEFAULT NULL AFTER `UPDATED_BY`;
CALL operox.AlterTableAddColumn ('operox','QC_EXECUTION','WORK_ORDER_ID','BIGINT NULL AFTER `ID`');
ALTER TABLE `operox`.`QC_EXECUTION` ADD FOREIGN KEY(WORK_ORDER_ID) REFERENCES WORK_ORDER(ID);
CALL operox.A... | true |
6230cfc337cadee0c9f6fa444caee10e10cfc167 | SQL | gaomc66/saltynote-service | /src/main/resources/db/migration/V0_0_6__vault.sql | UTF-8 | 401 | 2.734375 | 3 | [
"MIT"
] | permissive | create table vault
(
id varchar(40) not null primary key,
user_id varchar(40) not null,
secret varchar(512) not null,
type varchar(64) not null,
created_time timestamp default ... | true |
605f65feebac2b174c8a1b50a1f7aa44c007d476 | SQL | khuongnvph07998/assPHP2 | /assphp2.sql | UTF-8 | 2,801 | 3.15625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.2
-- https://www.phpmyadmin.net/
--
-- Máy chủ: 127.0.0.1
-- Thời gian đã tạo: Th2 22, 2021 lúc 02:14 AM
-- Phiên bản máy phục vụ: 10.4.10-MariaDB
-- Phiên bản PHP: 7.3.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*... | true |
f5005f183c03f10def80a597ac46db00b810c7aa | SQL | bgoonz/UsefulResourceRepo2.0 | /_MY_ORGS/Web-Dev-Collaborative/blog-research/ciriculumn/week.10-/week10-projects/recipe_box_solution/data-access-layer/00b-seed.sql | UTF-8 | 14,315 | 4.5 | 4 | [
"MIT"
] | permissive | -- This file contains instructions for you to create your database tables that
-- will power the application. At the bottom of the file is seed data for your
-- application that matches the structure of each of the tables that you will
-- create. It is meant as a convenience for you so that the application has data
-- ... | true |
f1e5e192c2482f94ff11293563846b81d309f633 | SQL | glqdlt/oauth2-sso | /grant-server/src/ddl/scheme.sql | UTF-8 | 8,433 | 3.3125 | 3 | [] | no_license | -- --------------------------------------------------------
-- 호스트: 127.0.0.1
-- 서버 버전: 10.4.11-MariaDB - mariadb.org binary distribution
-- 서버 OS: Win64
-- HeidiSQL 버전: 10.2.0.5599
-- -----------------------------------------------... | true |
374a0001ab4dcaf9ee2a74eecbf4b80da7270f2b | SQL | babaparashar/Module-10 | /Demo 3.sql | UTF-8 | 927 | 3.25 | 3 | [] | no_license | USE master;
CREATE LOGIN TestContext
WITH PASSWORD = 'Alex@123',
CHECK_POLICY = OFF;
USE AdventureWorks2016
CREATE USER TestContext FOR LOGIN TestContext;
CREATE FUNCTION dbo.CheckContext()
RETURNS TABLE
AS
RETURN ( SELECT * FROM sys.user_token);
SELECT * FROM dbo.CheckContext();
ALTER F... | true |
eede1b36c4d3bb1eb1deeb9b59ea99e0188bbeef | SQL | anuragsharma900/Emp_mangament_system | /empdb_backup/empdb_backup.sql | UTF-8 | 8,363 | 3.203125 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 8.0.23, for Win64 (x86_64)
--
-- Host: localhost Database: empdb
-- ------------------------------------------------------
-- Server version 8.0.23
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40... | true |
7e6ec3294574fffc89813f35336cca2a84fd0fa0 | SQL | Worasapha/myfirststored | /SCRIPT/Comment.sql | UTF-8 | 304 | 2.8125 | 3 | [] | no_license | SELECT *
OBJECT_NAME(id)
FROM SYSCOMMENTS
WHERE [text] LIKE '%เสร็จ%'
AND OBJECTPROPERTY(id, 'IsProcedure') = 1
GROUP BY OBJECT_NAME(id)
SELECT *
OBJECT_NAME(object_id)
FROM SYS.SQL_MODULES
WHERE OBJECTPROPERTY(object_id, 'IsProcedure') = 1
AND definition LIKE '%เสร็จ%'
| true |
c5d42341bae087836a6875ba9ff44784070b41bd | SQL | miguelSantirso/ululand | /tags/alfa_11/data/sql/lib.model.schema.sql | UTF-8 | 14,155 | 3.359375 | 3 | [] | no_license |
# This is a fix for InnoDB in MySQL >= 4.1.x
# It "suspends judgement" for fkey relationships until are tables are set.
SET FOREIGN_KEY_CHECKS = 0;
#-----------------------------------------------------------------------------
#-- sf_guard_user_profile
#----------------------------------------------------------------... | true |
2cf89934cd984a0beb99f443611b1831298baa14 | SQL | YarlinWare/OlimpiadasUD | /static/scripts/script_oracle_carga.sql | UTF-8 | 29,307 | 2.578125 | 3 | [] | no_license |
-- Carga de datos
-- 1 Inscripcion de deportes
INSERT INTO sports_deporte
VALUES('ATH','Atletismo', 8, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO sports_deporte
VALUES('BDM','Bádminton', 2, CURRENT_TIMESTAMP,CURRENT_TIMESTAMP);
INSERT INTO sports_deporte
VALUES('BKB','Baloncesto', 5, CURRENT_TIM... | true |
6ca97cb6c2d0dc79ed67a8ecebb9698a4fa85b3b | SQL | cuevas097/BD_SQL_Proyecto | /s-06-indices.sql | UTF-8 | 735 | 3.359375 | 3 | [] | no_license | --@Autores: Carlos Cuevas, Lisset Galindo
--@Fecha creacion: 07-06-18
--@Descripcion: Definicion de indices
--Indice non unique para las llaves foraneas de la tabla articulo
creat index ar_articulo_ix
on articulo(area_interes_id, status_articulo_id, empleado_id);
--Indice para verificar la unicidad d... | true |
937721772346d24f45872bab4f29e6196fb309e6 | SQL | KaterynaTrushko/sql | /mod-01/SQLQuery6.sql | UTF-8 | 638 | 2.5625 | 3 | [] | no_license | --select*from m_phones
--select distinct battery_type from m_phones
--select distinct body_type from m_phones
--select brand_name,phone_name,memory,os from m_phones
--select*from clients
--select distinct battery_type,body_type from m_phones
--select count(brand_name),count(distinct body_type) from m_phones
--select mi... | true |
52b1051a9ddacecb134a1ba54be5e724c95ed2a8 | SQL | AlexanderAtanasov/SoftUni_MySQL | /MySQL - 04 - Data Agregation/Exercise Tasks/SoftUniDB - Tasks - 12 - 18/Problem.13 - Employees Average Salaries.sql | UTF-8 | 283 | 3.390625 | 3 | [] | no_license | CREATE TABLE `hpe` AS
SELECT * FROM `employees`
WHERE `salary` > 30000 AND `manager_id` != 42;
UPDATE `hpe`
SET `salary` = `salary` + 5000
WHERE `department_id` = 1;
SELECT `department_id`, AVG(`salary`) AS `avg_salary`
FROM `hpe`
GROUP BY `department_id`
ORDER BY `department_id`; | true |
ec61faa4b6ed8ec7948ed6c992b815ef3d721d36 | SQL | LyubomirVasilev/CSharp-DB-Fundamentals | /Database Basics/MSSQL Server Exam - 24 April 2017/MSSQL Server Exam - 24 April 2017/05. Clients by Name.sql | UTF-8 | 103 | 2.625 | 3 | [
"MIT"
] | permissive | SELECT c.FirstName,
c.LastName,
c.Phone
FROM Clients AS c
ORDER BY c.LastName, c.ClientId
| true |
a8b9e1df5ec2baa15faae32fe34ef3ea70232c1c | SQL | dojin1230/SQL-local | /new queries/TM_CMS_0105.sql | UHC | 2,152 | 4.1875 | 4 | [] | no_license | -- CMS -- /// Ҵ ///
SELECT
S.ȸȣ, S.CMS, S.CMSڷʿ, S.ѳΰǼ, S.γ, S., CA.û, CA.ó, CA.
FROM
MRMRT.ǽƽþƼ繫0868.dbo.UV_GP_Ŀ S
LEFT JOIN
(SELECT
ȸȣ
FROM
MRMRT.ǽƽþƼ繫0868.dbo.UV_GP_
WHERE
Ϻз in ('TM_CMS', 'TM___')
AND ó != 'SK-Ϸ') TC
ON
S.ȸȣ = TC.ȸȣ
LEFT JOIN
(SELECT
ȸȣ
FROM
MRMRT.ǽƽþƼ繫0868.dbo.UV_GP_
... | true |
47ca1d65b280c039f05b1b9201328e63f11a6274 | SQL | yeremyjt/gift-exchange | /src/test/resources/giftexchange_db_create.sql | UTF-8 | 928 | 3.53125 | 4 | [] | no_license | SET MODE MySQL;
CREATE TABLE family_group (
name VARCHAR(36),
PRIMARY KEY (name)
) ENGINE = INNODB;
CREATE TABLE family (
name VARCHAR(36),
family_group_name VARCHAR(36),
PRIMARY KEY (name),
FOREIGN KEY (family_group_name) REFERENCES family_group (name)
) ENGINE = INNODB;
CREATE TABLE person... | true |
7cefb7096fd39b6a5a90e81646c2333a200bdafb | SQL | kamy333/ikamych | /sql/historic/links/1_create_table.sql | UTF-8 | 1,094 | 3.578125 | 4 | [] | no_license |
DROP TABLE IF EXISTS links;
DROP TABLE IF EXISTS links_category;
CREATE TABLE IF NOT EXISTS `links_category` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`category` varchar(50) NOT NULL,
`rank` int(10) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
UNIQUE KEY `category` (`category`)
) ENGINE=InnoDB ... | true |
347c86842f55105fff47a62f3bdc8c8262b55934 | SQL | cckmit/xinfu | /ccms/WebContent/WEB-INF/action/ccms/formgen/template/customer/search/query-base.sql | UTF-8 | 177 | 2.78125 | 3 | [] | no_license | select
cust_code,
cust_name,
replace(mobile, substring(mobile, 4, 4), '****') as mobile
from cc_customer
where cust_code not in (${fld:cust_code1})
${filter}
${orderby} | true |
5874d2e900c3154f740108649d65848f80210fb2 | SQL | WalquerX/redhat | /docker/postgres/tables.sql | UTF-8 | 2,533 | 2.90625 | 3 | [] | no_license | CREATE TABLE people (
people_id TEXT PRIMARY KEY,
ppl_char_1 TEXT,
ppl_group_1 TEXT,
ppl_char_2 TEXT,
ppl_date TIMESTAMP,
ppl_char_3 TEXT,
ppl_char_4 TEXT,
ppl_char_5 TEXT,
ppl_char_6 TEXT,
ppl_char_7 TEXT,
ppl_char_8 TEXT,
ppl_char_9 TEXT,
ppl_char_10 BOOLEAN,
pp... | true |
dc1a8a12235140f377cd923aacbbdf04af683684 | SQL | safderalimd01/P1.PY.FLSK.L01.P01 | /db/sproc_product_detail.sql | UTF-8 | 1,738 | 3.78125 | 4 | [] | no_license | -- stored procedure to get details of a given product
delimiter //
DROP PROCEDURE IF EXISTS sproc_product_detail//
delimiter //
CREATE PROCEDURE sproc_product_detail(
IN iparam_product_id int,
OUT oparam_err_flag int,
OUT oparam_err_step varchar(100),
OUT oparam_err_msg varchar(1000))
BEGIN
/*********************... | true |
460f3c7f94320c1f04a9c71241f4ca747cad1b6e | SQL | thangpham7793/DHB-REM-Schema-Testing | /db_scripts/insert.sql | UTF-8 | 920 | 3.421875 | 3 | [] | no_license | -- INSERT INTO
-- team (team_name, on_call_hours)
-- VALUES
-- ('brain_surgeons', 40);
-- SELECT
-- *
-- FROM
-- team;
-- INSERT INTO
-- doctor (first_name, team_name)
-- VALUES
-- ('Mary', 'brain_surgeons'),
-- ('Joe', 'brain_surgeons'),
-- ('Harry', 'brain_surgeons'),
-- ('Denise', 'brain_surgeons')... | true |
e6300d1b23d91b239f7ed3dcd55951a73744ef68 | SQL | YASH01009/Course-Projects | /DBMS_lab/12.04.2021_Lab_09/queries_q1.sql | UTF-8 | 803 | 3.359375 | 3 | [] | no_license | CREATE TABLE my_users (
username VARCHAR(64),
password VARCHAR(64) NOT NULL,
dob DATE,
PRIMARY KEY (username)
);
INSERT INTO my_users VALUES ('Bairstow', 'Bairstow%123', DATE '1999-12-31');
INSERT INTO my_users VALUES ('Gambhir', 'Gambhir%123', NULL);
INSERT INTO my_users VALUES ('Warner', 'Warner%123', NULL);
INS... | true |
17daffebab533978ba19e61be9edff9acf5a6166 | SQL | hainam2101/FHSICT | /Database/Oefeningen/antw5_5.sql | UTF-8 | 901 | 2.96875 | 3 | [] | no_license | /* Hoofdstuk 5 oefening 5 *************************************/
declare
procedure drop_tabel
( p_tabel in varchar2
, p_cascade_mode in varchar2 default 'NO_CASCADE'
)
is
v_error varchar2( 255 );
v_cascade varchar2( 30 );
e_onbekende_parameter exception;
begin
if... | true |
50b3b991e9042cee0f028646b2a35619f9648348 | SQL | cdmmca2007/MISONSERVER | /files/database.sql | UTF-8 | 36,926 | 3.40625 | 3 | [] | no_license | DROP TABLE IF EXISTS `properties`;
CREATE TABLE `properties` (
`id` int(3) NOT NULL AUTO_INCREMENT,
`value` varchar(50) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1;
CREATE TABLE `master` (
`id` varchar(36) NOT NULL,
`value` varchar(50) NOT NULL,
`propertyid` int(3) DEFAULT NULL,
PRIMAR... | true |
7cdce10109733ea35f0ddde891f576b7ea0fca61 | SQL | intCCP/CCP | /Application/Viste/v_mcres_app_operaz_provv_mo02.sql | UTF-8 | 1,550 | 3 | 3 | [] | no_license | /* Formatted on 21/07/2014 18:42:28 (QP5 v5.227.12220.39754) */
CREATE OR REPLACE FORCE VIEW MCRE_OWN.V_MCRES_APP_OPERAZ_PROVV_MO02
(
ID,
COD_ABI,
COD_NDG,
COD_FILIALE,
DTA_CONTABILE,
DTA_VALUTA_INTERESSI,
COD_TIPO_SOFF,
VAL_NUMERO_SOFF,
COD_RAPPORTO_ORIG,
VAL_IMPORTO_CAPITALE,
VAL_INTE... | true |
3b149a848d410a5c3aada35f3123c5f0d6af2e42 | SQL | julianacsmacedo/ExerciciosMySQL | /Aula02/Exercicio06.sql | UTF-8 | 2,190 | 3.734375 | 4 | [] | no_license | create database db_cursoDaMinhaVida;
use db_cursoDaMinhaVida;
-- Criando tb_categoria
create table tb_categoria(
id bigint auto_increment,
tipo varchar(255) not null,
ativo boolean not null,
primary key(id)
);
-- Criando tb_curso
create table tb_curso(
id bigint auto_increment ,
curso varchar (255) no... | true |
8e39f43345e5f3ab204f6414d5ca99f1b1b9c546 | SQL | elias890420/Oracle-EBS-SQL | /PA Capital Project Summary with Asset Detail/PA Capital Project Summary with Asset Detail.sql | UTF-8 | 3,028 | 3.546875 | 4 | [] | no_license | /*************************************************************************/
/* */
/* (c) 2010-2020 Enginatics GmbH */
/* www.enginatics.com */
/* ... | true |
d69d410e82511e672117c57bbc57eec228403b07 | SQL | Sigitalod/suniukai | /suniukai.sql | UTF-8 | 2,419 | 3.21875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: 2021 m. Kov 03 d. 12:16
-- Server version: 10.4.14-MariaDB
-- PHP Version: 7.2.34
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... | true |
b1baae00735791d33ea783a021daf9c385cad4b4 | SQL | ualsg/global-building-morphology-indicators | /query_templates/c1-gbmi/bgi_clipped_by_raster_name.sql | UTF-8 | 21,702 | 3.40625 | 3 | [
"CC-BY-4.0"
] | permissive | -- MATERIALIZED VIEW FOR DEBUGGING
DROP MATERIALIZED VIEW IF EXISTS {{gbmi_schema}}.bgi_clipped_by_{{raster_name}}_duplicates CASCADE;
DROP TABLE IF EXISTS {{gbmi_schema}}.bgi_clipped_by_{{raster_name}} CASCADE;
CREATE TABLE {{gbmi_schema}}.bgi_clipped_by_{{raster_name}} AS (
WITH ... | true |
b17dd25fdbe67fa9d02fda4cac797ddf22425bd6 | SQL | itcpr23/1aycayno | /aycayno_db.sql | UTF-8 | 2,513 | 3.125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Sep 24, 2019 at 05:23 AM
-- Server version: 10.1.26-MariaDB
-- PHP Version: 7.1.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
dedd5b78057460088f68c771fdd7deb9d05240cf | SQL | kunalkalbande/SQLDM | /Development/Idera/rameshwar/SQLdm/CollectionService/Resources/Probes/Sql/Batches/DiskSize2000.sql | UTF-8 | 646 | 2.921875 | 3 | [] | no_license | -- Disk Size 2000
-- Populate unused disk space stats
insert into #disk_drives(drive_letter, unused_size) exec master..xp_fixeddrives -- Fixed
insert into #disk_drives(drive_letter, unused_size) exec master..xp_fixeddrives 1 -- Remote
update #disk_drives
set unused_size = unused_size * 1024.0 * 1024.0,
drive... | true |
62ca6f77540dc1e294bcf008284f760910dea62c | SQL | MItnicckk/Vlad-Ignat | /Laba_11.sql | UTF-8 | 8,798 | 3.1875 | 3 | [] | permissive | -- phpMyAdmin SQL Dump
-- version 4.7.3
-- https://www.phpmyadmin.net/
--
-- Хост: 127.0.0.1:3306
-- Время создания: Янв 28 2019 г., 15:22
-- Версия сервера: 5.6.37
-- Версия PHP: 5.5.38
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACT... | true |
5df98ce5a866b448b0da55fe615c05a9c06f5d7c | SQL | zootakuxy/stable-version | /GGVIARIO [2017-02-01][GGViario 1.1.0 stable]/GGViario/db/.idea/dataSources/05f641e6-fac3-4cac-94a0-4bd13a2d239e/_staging_/schema/SEGUROS/routine/GET_ACCOUNT_ID.sql | UTF-8 | 340 | 2.65625 | 3 | [
"Apache-2.0"
] | permissive | create or REPLACE function get_account_id (
number_account CHARACTER VARYING
) return number
is
recuver number;
BEGIN
SELECT ID into recuver
from VER_ACCOUNT
WHERE "NUMBER" = number_account;
RETURN recuver;
EXCEPTION
WHEN NO_DATA_FOUND THEN
RETURN NULL;
WHEN OTHERS THE... | true |
26d51e2d75188c785aecbb71b6738ded2cc3d1fe | SQL | zb-ty-system/deploy_doc | /release_qjs/release20171130/boss/boss_qjs_20171130_ddl.sql | UTF-8 | 752 | 3.421875 | 3 | [] | no_license | use boss;
--创建模板表
CREATE TABLE `template` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
`template_no` varchar(64) DEFAULT NULL COMMENT '模板编号',
`template_name` varchar(64) DEFAULT NULL COMMENT '模板名称',
`template_content` varchar(2048) DEFAULT NULL COMMENT '模板内容',
`create_time` timestamp NULL DEFA... | true |
d5ea489b065299cb932906e347513e1544ec73a7 | SQL | Limoen/Ride-With-Me | /sql/rwm.sql | UTF-8 | 17,097 | 3.171875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 3.4.10.1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Jun 11, 2013 at 05:19 PM
-- Server version: 5.5.20
-- PHP Version: 5.3.10
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;... | true |
94fa5972c6dfe9e49521c0aceb59429be6930fc5 | SQL | dmitrykirilin/myUniversity | /src/main/resources/db/migration/V1__initDBUniversity.sql | UTF-8 | 3,089 | 3.953125 | 4 | [] | no_license | create sequence hibernate_sequence start 1 increment 1;
CREATE TABLE faculties (
id SERIAL PRIMARY KEY,
name VARCHAR UNIQUE NOT NULL
);
CREATE TABLE groups (
id SERIAL PRIMARY KEY,
... | true |
3c7038bab4014113cbe44735377473c086a6d072 | SQL | christinewoo/DozenDuty | /Database/create_table.sql | UTF-8 | 7,905 | 3.703125 | 4 | [] | no_license | CREATE database dozenduty_new;
use dozenduty_new;
CREATE TABLE dozenDuty_app_member(
memberID INT unsigned AUTO_INCREMENT,
memberName VARCHAR(20),
PRIMARY KEY (memberID)
);
CREATE TABLE dozenDuty_app_money(
moneyID INT unsigned AUTO_INCREMENT,
borrowerID INT unsigned NOT NULL,
lenderID INT u... | true |
c39dd80becc27c193b89b18d59668be49be5a413 | SQL | VastavaAyushi/HackerRank-and-Leetcode-MySQL | /HackerRank - MySQL/ALTERNATIVE QUERIES/Draw The Triangle 1.sql | UTF-8 | 618 | 3.21875 | 3 | [] | no_license | -- SOLUTION 1
set @number= 21; -- intializing the variable to 21 because we are gonna decrement it
select repeat("* ", @number:= @number - 1) from information_schema.tables limit 20; -- repeat function repeats printing * for 20 times (limit specified) operating on @number:= @number -1
-------------------------------... | true |
807a7cea1d0608fc6580a5313dc9bde0a2303815 | SQL | RadostinGerdzhikov/Databases-Basics---MS-SQL-Server | /03-TABLE RELATION EXERCISES/01-One-To-One-Relationship.sql | UTF-8 | 830 | 3.875 | 4 | [] | no_license | CREATE DATABASE Documents
USE Documents
CREATE TABLE Passports (
PassportID INT PRIMARY KEY,
PassportNumber CHAR(8) NOT NULL
)
CREATE TABLE Persons (
PersonID INT PRIMARY KEY,
FirstName NVARCHAR(50) NOT NULL,
Salary DECIMAL(7,2) NOT NULL,
PassportID INT NOT NULL
)
INSERT INTO Persons (PersonI... | true |
ea034ca46fbb6102e0d6548e2d5d89f85f1c72eb | SQL | DanWillisUni/SoftwareEngineeringProjectStage2 | /SQL/table creation.sql | UTF-8 | 9,959 | 3.796875 | 4 | [] | no_license | CREATE TABLE IF NOT EXISTS `softwareengineering`.`User` (
`idUser` INT NOT NULL,
`forename` VARCHAR(45) NOT NULL,
`surname` VARCHAR(45) NOT NULL,
`email` VARCHAR(60) NOT NULL,
`username` VARCHAR(45) NOT NULL,
`password` NVARCHAR(45) NOT NULL,
`DOB` DATE NOT NULL,
`height` SMALLINT,
`gender` VARCHAR(1)... | true |
1ef9ac2b54082d9ca3b198fb53f2c99b89f9d7f0 | SQL | gugacoder/deckin | /Server/.draft/Mercadologic/_draft/Mercadologic.Replicacao/Scripts/Pdv/integracao.tabelas_replicadas.sql | UTF-8 | 189 | 2.671875 | 3 | [] | no_license | create or replace view integracao.tabelas_replicadas
as
select table_name as tabela
from information_schema.tables
where table_schema='integracao'
and table_type = 'BASE TABLE'
;
| true |
f19baef8df53e0df935f12a8cba8ffd1d13555ce | SQL | cupokyle/BootcampX | /4_queries/12_teachers_assisted_names.sql | UTF-8 | 281 | 3.71875 | 4 | [] | no_license | SELECT DISTINCT teachers.name as teacher, cohorts.name as cohort
FROM teachers
JOIN assistance_requests ON teachers.id = teacher_id
JOIN students ON student_id = students.id
JOIN cohorts ON cohort_id = cohorts.id
WHERE cohorts.name = 'JUL02'
ORDER BY teachers.name; | true |
14ef9e8c1fb022679ceeb4a1322056d137bc77e3 | SQL | fredbordel/mapster_project | /db/schema/2_maps.sql | UTF-8 | 260 | 3.0625 | 3 | [] | no_license | DROP TABLE IF EXISTS maps CASCADE;
CREATE TABLE maps (
id SERIAL PRIMARY KEY NOT NULL,
title TEXT NOT NULL,
latitude FLOAT NOT NULL,
longitude FLOAT NOT NULL,
zoom_level SMALLINT NOT NULL,
user_id INTEGER REFERENCES users(id) ON DELETE CASCADE
);
| true |
955385872900cd7765874ef63a8b460ce39b719c | SQL | michelemase/excilys-bank | /excilys-bank-data/src/main/resources/ddl/before-02-tables.sql | UTF-8 | 4,333 | 3.8125 | 4 | [] | no_license | CREATE TABLE ref_account_category
(
id character varying(20) NOT NULL,
"name" character varying(20),
CONSTRAINT ref_account_category_pkey PRIMARY KEY (id)
)
WITH (
OIDS=FALSE
);
CREATE TABLE ref_account_type
(
id character varying(20) NOT NULL,
"name" character varying(20),
category character varying(20) NOT NU... | true |
622003ec3cc5f8478b3f604629e804bfa4a07b72 | SQL | maqroll/clickhouse-cluster | /sql/create.sql | UTF-8 | 6,914 | 3.859375 | 4 | [] | no_license | create database if not exists test_db on cluster all_with_query_cluster;
create database if not exists view_db on cluster test_cluster;
create database if not exists cascade_db on cluster all_with_query_cluster;
CREATE TABLE IF NOT EXISTS test_db.events_shard ON CLUSTER test_cluster(
event_date Date DEFAUL... | true |
64562e9a4feae9120f1f6bb60b932c5a2d6918c1 | SQL | natakamoto/test_poo1 | /bd_empresa.sql | UTF-8 | 3,405 | 3.96875 | 4 | [] | no_license | /*-------- Creacion DATABASE ---------*/
CREATE DATABASE bd_empresa;
/*-------- Usando la BD ---------*/
USE bd_empresa;
/*-------- Creacion Tablas ---------*/
CREATE TABLE trabajador(
id INT AUTO_INCREMENT,
nombre VARCHAR(50),
edad INT,
sexo VARCHAR(1),
jefe TINYINT(1),
PRIMARY KEY(id)
);
CREATE TA... | true |
3919e646302949111312b462bb539b141d62f577 | SQL | Draconim/YuGiOh_Card_Lister | /SQL/createVarazs.sql | UTF-8 | 538 | 2.90625 | 3 | [] | no_license | drop table varazslap;
create table varazslap
(
azonosito varchar2(10) not null,
nev varchar2(60) not null,
leiras varchar2(300),
magic_type varchar2(11) not null,
rarity varchar2(15) not null,
quantity int not null,
constraint pk_varazs primary key(azonosito),
constraint ... | true |
60d74920ef9f6783e12c4964ff103c113cecee3d | SQL | rsimon/simrec-database | /db/schema.mysql.sql | UTF-8 | 3,102 | 4.65625 | 5 | [] | no_license | -- route types, for reference in 'route' table
CREATE TABLE route_type (
id VARCHAR(255) NOT NULL PRIMARY KEY
) DEFAULT CHARSET=utf8;
INSERT INTO route_type (id) VALUES ('PRIMARY');
INSERT INTO route_type (id) VALUES ('SECONDARY');
INSERT INTO route_type (id) VALUES ('TERTIARY');
-- route model
CREATE TABLE route (... | true |
e225d0ed9796308dbc99a44964f7c8dda923e742 | SQL | saurmo/dllo-web-backend-20202 | /api/scripts/tracking/get-tracking-by-motorcycle.sql | UTF-8 | 155 | 3.28125 | 3 | [] | no_license |
select s.*, concat(u2.nombre, ' ', u2.apellido ) nombre_mecanico from seguimientos s
inner join usuarios u2 on u2.id = s.id_mecanico
where s.placa = $1 | true |
587706dfb81273684d74feb03ec5e75e41c51f34 | SQL | H-yhan/oa | /OA/config/oa.sql | UTF-8 | 12,850 | 3.125 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : Students
Source Server Version : 50621
Source Host : localhost:3306
Source Database : itcastoa_20120216
Target Server Type : MYSQL
Target Server Version : 50621
File Encoding : 65001
Date: 2015-09-05 10:42:09
*/
SET FOREIGN_KEY_CHECKS... | true |
ae5da6953abb8b3f0931af358d7fae8dcf9e8ceb | SQL | dkvhin/sample | /Sample.DatabaseMigration/Scripts/3_Users_add_role_db_relationship.sql | UTF-8 | 155 | 2.96875 | 3 | [] | no_license | ALTER TABLE dbo.Users ADD CONSTRAINT
FK_Users_Roles FOREIGN KEY
(
RoleId
) REFERENCES dbo.Roles
(
Id
) ON UPDATE NO ACTION
ON DELETE NO ACTION | true |
ba18081654ff5ba3411eebb2a200e17964e36e51 | SQL | sprokushev/Delphi | /MASTER/_DATABASE/Views/V_ZAKAZ_DECADS_SNP.sql | WINDOWS-1252 | 3,876 | 3.375 | 3 | [] | no_license | --
-- V_ZAKAZ_DECADS_SNP (View)
--
CREATE OR REPLACE FORCE VIEW MASTER.V_ZAKAZ_DECADS_SNP
(DATE_, DECADE_, PREDPR_ID, PREDPR_NAME, PROD_ID_NPR,
NAME_NPR, GROUP_NAME, VES, NOM_ZD)
AS
SELECT month.input_date AS date_,
DECODE
(TRUNC ( ( EXTRACT (DAY FROM month.input_date
... | true |
426c927b18cf08899af6ee6e17ce5b0d82be5b65 | SQL | pstringe/ecommerce-site-php | /db.sql | UTF-8 | 1,334 | 3.34375 | 3 | [] | no_license | SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
--
-- Table structure for table `brands`
--
CREATE TABLE IF NOT EXISTS `brands` (
`brand_id` int(100) NOT NULL AUTO_INCREMENT,
`brand_title` text NOT NULL,
PRIMARY KEY (`brand_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=7 ;
--
-... | true |
f4899106ad241bdf1d97b3de0c50e591d88f5a60 | SQL | insomnia-consulting/pcs | /src/main/scripts/number_of_hpv-and-paps_082.sql | UTF-8 | 393 | 3.171875 | 3 | [] | no_license | select '082 PAPs', count(*)
from lab_requisitions l, lab_results h
where l.lab_number = h.lab_number(+)
and l.preparation in (1, 2, 7)
and l.datestamp > sysdate - 360
and l.practice in (082)
union
select '082 HPVs', count(*)
from lab_requisitions l, hpv_requests h
where l.lab_number = h.lab_number(+)
and h.test_results... | true |
d8f80d8407ebfc4b61583f8e1d09f10736edc13e | SQL | syarhid/appkHosting | /appk (1).sql | UTF-8 | 8,503 | 3.125 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 23 Sep 2020 pada 15.14
-- Versi server: 10.4.11-MariaDB
-- Versi PHP: 7.4.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CH... | true |
ef9d9878b3b69085aa04f6dec1bdae67bad2fcc1 | SQL | vitorfnevess/projetoBandodeDados | /projeto correios.sql | UTF-8 | 2,486 | 3.484375 | 3 | [] | no_license | create database correios
default character set utf8
default collate utf8_general_ci;
create table remetente (
nomeRemetente varchar (30) not null,
cpfRemetente varchar (20) not null,
volume int not null,
primary key (cpfRemetente)
)default charset = utf8;
insert into remetente (nomeRemetente, cpfRemetente, volume)
v... | true |
bc3a233d4b1b234659aea84dada1a596f4a3f6cd | SQL | sprokushev/Delphi | /MASTER/_DATABASE/Constraints/JKCOMMIT_PROD2CENN_NonFK.sql | UTF-8 | 456 | 3.375 | 3 | [] | no_license | --
-- Non Foreign Key Constraints for Table JKCOMMIT_PROD2CENN
--
ALTER TABLE MASTER.JKCOMMIT_PROD2CENN ADD (
CHECK ("PROD_ID_NPR" IS NOT NULL)
DISABLE NOVALIDATE);
ALTER TABLE MASTER.JKCOMMIT_PROD2CENN ADD (
CHECK ("CAT_CEN_ID" IS NOT NULL)
DISABLE NOVALIDATE);
ALTER TABLE MASTER.JKCOMMIT_PROD2CENN ADD (
... | true |
1afcb9939ffa9aca1ee5f2929db30ae7721d7295 | SQL | lgq1997/ssmproject | /mysql.sql | UTF-8 | 776 | 3.21875 | 3 | [] | no_license | create database if not exists `ssmbuild`;
use `ssmbuild`;
drop table if exists `books`;
create table `books`(
`bookID` int(10) not null auto_increment comment '书的id',
`bookName` varchar(100) not null comment '书名',
`author` varchar(100) not null comment '作者',
`price` decimal(6,2) not null comment '价格',
`b... | true |
e7bee668ac28092877cee2bb40f64269ab4c9f30 | SQL | sbsdev/dictionary | /resources/db/queries.sql | UTF-8 | 1,358 | 3.71875 | 4 | [] | no_license | -- name: global-words
-- Get the global words for given grade
SELECT *
FROM dictionary_globalword
WHERE grade = :grade
-- name: global-words-paginated
-- Get the global words for given grade limited by offset and max_rows
SELECT *
FROM dictionary_globalword
WHERE grade = :grade
LIMIT :offset, :max_rows
-- name: globa... | true |
fde806a4e975d958780f57c3fe47d70d59e6351f | SQL | mtienbui97/cargaragemanagement | /GarageV1/database/quanlygarageoto_khachhang.sql | UTF-8 | 2,450 | 3.03125 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 8.0.11, for Win64 (x86_64)
--
-- Host: localhost Database: quanlygarageoto
-- ------------------------------------------------------
-- Server version 8.0.11
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS... | true |
9495bd7c216b216a8e48800be899ceea946178ef | SQL | angkasa27/PeminjamanSapra | /db_sapra.sql | UTF-8 | 4,729 | 3.03125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jun 04, 2019 at 01:29 PM
-- 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 |
c055fa5e155718abb38ecf4f4754b527cafefdce | SQL | Proyectoconstructura/ApiAlmacen | /ApiAlmacen/almacen.sql | UTF-8 | 5,736 | 3.484375 | 3 | [] | no_license | CREATE DATABASE almacen;
USE almacen;
CREATE TABLE partidas(
id_partida BIGINT PRIMARY KEY AUTO_INCREMENT,
descripcion VARCHAR(500)
);
CREATE TABLE partidas(
id_partida BIGINT PRIMARY KEY AUTO_INCREMENT,
descripcion VARCHAR(500)
);
CREATE TABLE insumos(
id_insumo BIGINT PRIMARY KEY AUTO_INCREMEN... | true |
e1f79f2e2a0657cb92002056762d836ea511b317 | SQL | dennis-shuai/FLK_SFC_Source | /Foxlink Report/QualityReport/SQL.sql | UTF-8 | 2,554 | 2.6875 | 3 | [] | no_license |
DELETE FROM sajet.SYS_PROGRAM_name WHERE PROGRAM='Foxlink Report';
Insert into sajet.SYS_PROGRAM_name
(PROGRAM, EXE_FILENAME, TITLE_NAME, UPDATE_USERID, UPDATE_TIME, FUN_TYPE, FUN_TYPE_IDX, MDI_FLAG, PROGRAM_TYPE, SHOW_MAIN)
Values
('Foxlink Report', 'FoxlinkReport', 'Sajet MES / [FoxlinkReport]', 0, TO_DATE('1... | true |
2e31492089a3caeb25f63788f174ed558bb40cd7 | SQL | amolabs/explorer2 | /db/init.sql | UTF-8 | 16,011 | 3.5 | 4 | [
"Apache-2.0"
] | permissive | -- explorer.play_stat definition
CREATE TABLE `play_stat` (
`chain_id` char(32) NOT NULL,
`height` int(11) NOT NULL,
PRIMARY KEY (`chain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- explorer.asset_stat definition
CREATE TABLE `asset_stat` (
`chain_id` char(32) NOT NULL,
`active_coins` char(40) NOT NUL... | true |
2f26cb7371fb38a22b53f968618cfd61ff21b126 | SQL | skutam/IIS | /tables.sql | UTF-8 | 4,826 | 3.984375 | 4 | [] | no_license | CREATE DATABASE web_app;
CREATE USER 'web_app_user'@'localhost' IDENTIFIED BY 'web_app_password';
GRANT ALL PRIVILEGES ON * . * TO 'web_app_user'@'localhost';
use web_app;
CREATE TABLE users (
id int NOT NULL AUTO_INCREMENT,
name varchar(255) NOT NULL,
pass varchar(255) NOT NULL,
admin boolean,
team_id int DEFA... | true |
33ada36c3bd15b6e698118977193f123d4df9683 | SQL | albertomattos/SQL_gerais | /Mega - lista das crianças por idade.sql | UTF-8 | 712 | 3.53125 | 4 | [] | no_license | select distinct(t.pes_st_nome) paimae, u.ben_st_nome filho, u.ben_dt_nascimento
from mgrh.rh_pessoa t, mgrh.rh_rel_colaborador b, mgrh.rh_colaborador c,
mgrh.rh_beneficiario u
where t.pes_in_codigo = u.pes_in_codigo
and b.col_in_codigo = c.col_in_codigo
and c.pes_in_codigo = t.pes_in_codigo
and b.rcol_bo_emrescisao = '... | true |
27ee0776e13850db69c3f9f312b83908b9665b5f | SQL | ThoPeumasschel/MyProjects | /labs/Lab_07_07.sql | UTF-8 | 241 | 3.390625 | 3 | [] | no_license | SELECT
salary,
first_name,
last_name
FROM
employees
WHERE
salary > ALL (
SELECT
avg(salary)
FROM
employees
WHERE
department_id = 60
)
ORDER BY
last_name; | true |
62f3019af7738c58fee6e939f2bcfdfa6d13975e | SQL | NDTChan/API-BASE | /BTS.SP.API.ENTITY/Scripts/PHA/P_DTXD/PHA_DTXD_MAU_02.sql | UTF-8 | 4,809 | 3.0625 | 3 | [] | no_license | create or replace PROCEDURE "PHA_DTXD_MAU_02" (P_CONGTHUC VARCHAR2, TUNGAY_KS IN DATE, DENNGAY_KS IN DATE, TUNGAY_HL IN DATE, DENNGAY_HL IN DATE, DONVI_TIEN number, cur OUT SYS_REFCURSOR) as
QUERY_STR VARCHAR2(32767);
P_CT VARCHAR2(32767);
P_SQL_INSERT VARCHAR2(32767);
MA_TKTN_DT VARCHAR2(50);
MA_T... | true |
b1ca74b2629d764cbc23349814e793bd2cca980c | SQL | flaviaalexandra11/BD2-Project | /gragebook/db/get_teacher_profile.sql | UTF-8 | 421 | 3.65625 | 4 | [] | no_license | DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `get_teacher_profile`(teacher_user_id INT)
BEGIN
-- Error handling.
DECLARE EXIT HANDLER FOR SQLEXCEPTION
BEGIN
SELECT 'An error has occurred, the stored procedure was terminated';
END;
-- Actual select.
SELECT t.first_name, t.last_name,... | true |
26d2e48e03d26c65cfb432820edfebd5323150a1 | SQL | yuey11/adepedia-on-ohdsi | /2.Data_transformation/6.OMOP_observation_table_transformation.sql | UTF-8 | 2,328 | 4.125 | 4 | [] | no_license | --Create temporary schema to store the transformed data.
--There is no required fields in temporary schema in order to facility the data transformation.
--The OMOP schema must be built first! (The public schema in codes is the OMOP CDM schema)
--The observation table in our project mainly stored the adverse events rec... | true |
5d4a4617ca08400e0bd2d9765253c22d49dd54a5 | SQL | phthnhh/Assignment | /SQL/Assignment2/SQL_Testing_System_Assignment2.1.sql | UTF-8 | 1,757 | 3.609375 | 4 | [] | no_license | DROP DATABASE IF EXISTS Testing_system_assignment1;
CREATE DATABASE Testing_system_assignment1;
USE Testing_system_assignment1;
CREATE TABLE Department(
DepartmentID SMALLINT UNSIGNED,
DapartmentName VARCHAR(20)
);
CREATE TABLE `Position`(
PositionID SMALLINT UNSIGNED,
PositionName ENUM ('Dev', 'Test',... | true |
b2e35f1b6ac96d1bd51602801fd2d5efa66de5cc | SQL | arkim42/php-piscine | /d05/ex16/ex16.sql | UTF-8 | 147 | 2.734375 | 3 | [] | no_license | SELECT count(*) AS 'movies' from member_history
WHERE (`date` BETWEEN '2006-10-30' AND '2007-07-27')
OR (MONTH(`date`) = 12 AND DAY(`date`) = 24); | true |
e66e7f003dc4a906f903f745b65ee63b48ea345f | SQL | josgaril/ejercicios_clase | /SQL_BD/Solución Empadronamientos-20200203/empadronamientosConAlquileres.sql | UTF-8 | 5,587 | 3.015625 | 3 | [] | no_license | CREATE DATABASE IF NOT EXISTS `empadronamiento_2.0` /*!40100 DEFAULT CHARACTER SET utf8 */;
USE `empadronamiento_2.0`;
-- MySQL dump 10.13 Distrib 8.0.12, for Win64 (x86_64)
--
-- Host: 127.0.0.1 Database: empadronamiento_2.0
-- ------------------------------------------------------
-- Server version 8.0.12
/*!40... | true |
1aabba62a0f5a76d93fca4def5084375c8063685 | SQL | number317/Doc_online | /database/proc.sql | UTF-8 | 5,570 | 3.53125 | 4 | [] | no_license | use fileOnline_db;
drop procedure if exists pro_GetPerNum$0;
delimiter #
create procedure pro_GetPerNum$0(in Id char(14))
comment "Get permission num by employee's id."
begin
select Employee_Title_PERMISSION_NUM from Employees where Employee_ID=Id;
end#
delimiter ;
drop procedure if exists pro_GetDeptId;
delimiter #
... | true |
8856bf9affda41c2e4d1a4b619266ae055aba9e4 | SQL | nh43de/mssql-utils | /Scripts/Redundant Indexes.sql | UTF-8 | 1,251 | 4.3125 | 4 | [] | no_license | --Redundant Indexes
SELECT [Table] = [s].[name] + N'.' + [t].[name],
[Index1 ID] = [i1].[index_id],
[Index1 Name] = [i1].[name],
[Index2 ID] = [dupIdx].[index_id],
[Index2 Name] = [dupIdx].[name],
[Column] = [c].[name]
FROM [sys].[tables] [t]
JOIN [sys].[indexes] [i1]
ON [... | true |
b455c7d8fb401a4c27eb08e195076dbe4929cc35 | SQL | rudongsu/Emotion-SO | /count_Cross-platform_Posts.sql | UTF-8 | 414 | 3.09375 | 3 | [] | no_license | select distinct count (*) body
from posts p
inner join posttags pt on pt.postid = p.id
inner join tags t on pt.tagid = t.id
where (
t.TagName = 'flutter'
or t.TagName = 'react-native'
or t.TagName = 'angularjs'
or t.TagName = 'vue.js'
or t.TagName = 'xamarin'
or t.TagName... | true |
fa5c0dce17b587d08bbadf84f3913707ed9562f5 | SQL | necamat/webShop | /mySql/assigmet_web.sql | UTF-8 | 5,006 | 3.359375 | 3 | [] | no_license |
--
-- Table structure for table `hibernate_sequence`
--
DROP TABLE IF EXISTS `hibernate_sequence`;
CREATE TABLE `hibernate_sequence` (
`next_val` bigint DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
--
-- Dumping data for table `hibernate_sequence`
--
INSERT INTO `hibernate_seq... | true |
482918e0948af3ad36a0ecfde5504dc091cb447b | SQL | DmitryShuvaev/Oracle-SQL-PLSQL | /Oracle-SQL/lab3.sql | UTF-8 | 1,582 | 3.84375 | 4 | [] | no_license | /*1. Напишите запрос для вывода текущей даты. Назовите столбец Date.*/
SELECT TO_CHAR(SYSDATE, 'DD-MON-YYYY') "DATE" FROM dual;
COLUMN SYSDATE NEW_VALUE report_date
SELECT report_date;
2. Выведите номер служащего, его фамилию,
оклад и новый оклад, повышенный на 15% и округлённый до целого.
Назовите столбец New Salar... | true |
cf5744d148ef75e3291153581687b55f1536b8a8 | SQL | Kritapot/Graduation-project--TawanshopEcommerce | /tawansho_db.sql | UTF-8 | 19,373 | 3.25 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 3.5.8.2
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Jul 26, 2015 at 10:50 AM
-- Server version: 5.5.31
-- PHP Version: 5.4.41
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
... | true |
34909dcd87c01caa684531d91e51ff87537830fc | SQL | ChipEagle/oracle | /Self table Join.sql | UTF-8 | 586 | 3.359375 | 3 | [] | no_license | desc employees;
SELECT worker.last_name AS emp, manager.last_name AS mgr
FROM employees worker
JOIN employees manager
ON (worker.manager_id = manager.employee_id);
SELECT DISTINCT manager.employee_id, manager.last_name AS mgr
FROM employees worker
JOIN employees manager
ON (worker.manager_id = manage... | true |
2e30beea69262d6e5366403c868ea7c3032ce3ff | SQL | ITRS-Group/oracle-database-integration | /sql/oracleLockStatus.sql | UTF-8 | 233 | 2.96875 | 3 | [
"MIT"
] | permissive | SELECT
l.SID,
user,
s.OSUSER,
(s.TYPE) USERTYPE,
s.MACHINE,
s.PROGRAM,
(l.type) LOCKTYPE,
ID1,
ID2,
LMODE,
REQUEST,
(CTIME) Seconds,
"BLOCK"
FROM V$LOCK l, v$SESSION s
WHERE
l.sid = s.SID AND s.TYPE = 'USER' | true |
e918551c9878fdfe6bd5a48c574883b81021980a | SQL | faisal80/agdiary | /agdiary.sql | UTF-8 | 5,544 | 3.375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 3.4.5
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Mar 01, 2012 at 03:05 PM
-- Server version: 5.5.16
-- PHP Version: 5.3.8
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!... | true |
f57b3a337aafd0adb7e589c45513d10d558b4300 | SQL | bgoonz/UsefulResourceRepo2.0 | /_MY_ORGS/Web-Dev-Collaborative/blog-research/ciriculumn/week.10-/week10/recipe_box_solution/data-access-layer/04-insert-new-ingredient.sql | UTF-8 | 502 | 2.9375 | 3 | [
"MIT"
] | permissive | -- This query needs to insert new data into the "recipes" table.
--
-- * Insert into the "ingredients" table:
-- * $1 is amount
-- * $2 is unit of measure id
-- * $3 is food stuff
-- * $4 will contain the recipe id
--
-- It needs to include all four positional parameters in the VALUES section so
-- th... | true |
2126569841c70230ebb3ee027a2fc502b392891e | SQL | leukothea/LegacySQLFromOldJob | /QueryForJohn.sql | UTF-8 | 3,565 | 3.9375 | 4 | [] | no_license | with zz as ((select ((extract(year from pa.authdate::DATE)) || '-' || (extract(month from pa.authdate::DATE))) as date, sum(rsli.customerprice) as summed_customerprice, sum(o.tax) as summed_tax, sum(o.shippingcost) as summed_shipping
from ecommerce.rsorder as o, ecommerce.paymentauthorization as pa, ecommerce.rsaddress... | true |
7507de97f07f7bc32634f766ed48e149217700f1 | SQL | mpassak/db | /ddl/02_VIEW/V_ST_ORG_TRAVEL.sql | UTF-8 | 2,043 | 3.03125 | 3 | [] | no_license | --------------------------------------------------------
-- DDL for View V_ST_ORG_TRAVEL
--------------------------------------------------------
CREATE OR REPLACE FORCE VIEW "METSM_OWNER"."V_ST_ORG_TRAVEL" ("EXTRACT_NAME", "ID_RECORD", "ID_BATCH", "POLICY_NUMBER", "CD_COUNTRY", "PAYMENT_TYPE", "ACTION_TYPE", "PHON... | true |
fb94c472060ee7ec2abc79357b189301886c2a35 | SQL | PatBradley88/Learnify- | /Learnify_ (1).sql | UTF-8 | 8,140 | 3.15625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.2
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Dec 16, 2018 at 07:49 PM
-- Server version: 10.1.35-MariaDB
-- PHP Version: 7.2.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
cc64fec5a61c41872dbb2d1fbcea62a74531a41d | SQL | Ares7/2013-JUL-Module-7 | /DWSO/Req.ChainOfRestaurants (Anton Tserakahu)/u_dw_stage/Tables/lc_geo_regions.sql | UTF-8 | 1,612 | 3.640625 | 4 | [] | no_license | --alter table u_dw_references.lc_geo_regions
-- drop constraint FK_LC_GEO_REGIONS;
--
--alter table u_dw_references.lc_geo_regions
-- drop constraint FK_LOC2LC_GEO_REGIONS;
--
drop table u_dw_stage.lc_geo_regions cascade constraints;
--==============================================================
-- Table: lc_geo... | true |
95b3f253233dac99adb6b35138fd974febe33f6d | SQL | yueyue-Yan/SimpleLibraryManagement | /CreateBook.sql | UTF-8 | 477 | 2.6875 | 3 | [] | no_license | drop table if exists Book;
/*==============================================================*/
/* Table: Book */
/*==============================================================*/
create table Book
(
bno varchar(20) not null,
bname v... | true |
e1843d3a3b0f97aed42b101f43f200e565d313c7 | SQL | ryuichi1208/post-gret-sql | /src/sample01.sql | UTF-8 | 1,385 | 3.09375 | 3 | [
"BSD-3-Clause"
] | permissive | INSERT INTO member SELECT 'Y0099', '2017-03-17', 0, 'f';
INSERT INTO member VALUES('S0003', '2017-05-02', 2700, 'f'), ('S0004', '2017-05-14', 1500, 't');
UPDATE member SET score = score + 2000 WHERE login;
SELECT count(*) FROM member WHERE score < 3000;
CREATE TRIGGER sample_trg BEFORE INSERT OR UPDATE OR DELETE TO sa... | true |
287d74f4e54fc4ffff4ad195fc7f90eec02f2b89 | SQL | bhavinp570/CRM-App | /ds.sql | UTF-8 | 25,325 | 3.21875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: May 31, 2018 at 07:19 AM
-- 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 |
f4e01dbf8b1c9ba31ec08c741e9fc02cfe425efe | SQL | ontop/ontop | /test/rdb2rdf-compliance/src/test/resources/D010/create.sql | UTF-8 | 449 | 2.8125 | 3 | [
"CC-BY-4.0",
"Apache-2.0"
] | permissive | CREATE TABLE "Country Info" (
"Country Code" INTEGER PRIMARY KEY,
"Name" VARCHAR(100),
"ISO 3166" VARCHAR(10)
);
INSERT INTO "Country Info" ("Country Code", "Name", "ISO 3166") VALUES (1, 'Bolivia, Plurinational State of', 'BO');
INSERT INTO "Country Info" ("Country Code", "Name", "ISO 3166") VALUES (2, 'Ir... | true |
04127da994df214eda3cb64315e65648703d84d8 | SQL | codeclimate-testing/java-plazma | /bs.base.db/script/views/payroll/v_employee_result.sql | UTF-8 | 1,249 | 3.296875 | 3 | [] | no_license |
CREATE VIEW V_EMPLOYEE_RESULT (
ID,
EMPLOYEE_ID,
EMPLOYEE_TOTAL_ID,
ORGANIZATION_ID,
PERIOD_ID,
WORK_DAY,
WORK_HOUR,
TOTAL_DAY,
TOTAL_HOUR,
START_BALANCE,
END_BALANCE,
INCREMENT_AMOUNT,
DECREMENT_AMOUNT,
PAYROLL_AMOUNT,
ACU_PENSION,
ACU_TAX,
ACU_VACATION,
ACU_SICK,
ACU_FUND_SALAR... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.