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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
1dab4d2f6b13890180c8a951a125d972f2220eca | SQL | koong17/Project2 | /hotel/WebContent/DB/hotel.sql | UTF-8 | 1,440 | 3.40625 | 3 | [] | no_license |
drop table comments;
drop table board;
drop table reservation;
drop table rooms;
drop table member;
create table member(
id varchar2(50) primary key,
password varchar2(30) not null,
nickname varchar2(30) unique not null,
phone varchar2(30) not null
);
create table rooms(
room_num number(10) ... | true |
27b525fddc5b35d70befc33cc4cdf10597060ab0 | SQL | YauheniD/GodelDataMasteryPart1 | /Tasks/_Origin/Task2/query06.sql | UTF-8 | 743 | 4.03125 | 4 | [] | no_license | --Task#6
SELECT DISTINCT
[soh].[CustomerID],
[BikeName] = [pr].[Name],
[soh].[OrderDate],
[soh].[OnlineOrderFlag]
FROM [Sales].[SalesOrderHeader] [soh]
INNER JOIN [Sales].[SalesOrderDetail] [sod] ON [sod].[SalesOrderID] = [soh].[SalesOrderID]
INNER JOIN [Production].[Product] [pr] ... | true |
8d0a13428e50ee71617e7886ce86b76a089007f9 | SQL | Blackbaud-RakeshGarg/fenxt-npi-dev | /DDL/out_AccountBudgets_fact.sql | UTF-8 | 498 | 2.640625 | 3 | [] | no_license | drop table if exists out_AccountBudgets_fact;
CREATE TABLE out_AccountBudgets_fact
(
_sys_transform_id int NOT NULL encoding rle,
TenantId varchar(255) encoding rle,
AccountBudgetAmount varchar(255),
AccountId varchar(255),
FiscalPeriodId varchar(255),
AccountBudgetFactId varchar(255),
Accou... | true |
ca63832784080294e848abc83d18e2aa1990062b | SQL | dr01d3r/redcap_cypress | /test_db/structure.sql | UTF-8 | 129,995 | 3.4375 | 3 | [
"MIT"
] | permissive | DROP DATABASE `REDCAP_DB_NAME`;
CREATE DATABASE `REDCAP_DB_NAME`;
USE `REDCAP_DB_NAME`;
SET FOREIGN_KEY_CHECKS=0;
CREATE TABLE `redcap_actions` (
`action_id` int(10) NOT NULL AUTO_INCREMENT,
`project_id` int(10) DEFAULT NULL,
`survey_id` int(10) DEFAULT NULL,
`action_trigger` enum('MANUAL','... | true |
feef8d5072eedca53ac9c96bfed05f94d8db5774 | SQL | dsaenztagarro/swing-jaxws-javafx | /scripts/script_migration.sql | UTF-8 | 7,011 | 2.734375 | 3 | [] | no_license | /*
dbf2mysql -vvv -h localhost -U adminHidrocon -P hidrocon123 -d hidrocon -t migration_building -c -f COMUN.DBF
dbf2mysql -vvv -h localhost -U adminHidrocon -P hidrocon123 -d hidrocon -t migration_neighbour -c -f vecin.dbf
*/
alter table migration_neighbour add id INT(11) NOT NULL FIRST;
alter table `hidrocon`.`mi... | true |
4f8ab14338a6bbc769533365a1d280c026b299eb | SQL | Mauro-Rainis/EsameFineCorso2019 | /DatabaseBlockBuster.sql | UTF-8 | 1,322 | 3.15625 | 3 | [] | no_license | create table attori(
id int primary key,
nome varchar(32) not null,
cognome varchar(32) not null,
annoNascita int,
nazionalita varchar(32),
urlFoto varchar(256)
);
insert into attori values (1,'Tom','Cruise',1962,'Statunitense','https://pad.mymovies.it/filmclub/attori/9669.jpg');
insert into at... | true |
2c4919514072798a206de18dd52e0372649e1432 | SQL | EdotJ/crappybudget | /api/src/main/resources/migrations/V14__add_cascades_to_goals.sql | UTF-8 | 546 | 2.84375 | 3 | [] | no_license | ALTER TABLE `goals` DROP CONSTRAINT `fk_goal_account`;
ALTER TABLE `goals`
ADD CONSTRAINT `fk_goal_account` FOREIGN KEY (`account_id`) REFERENCES accounts(`id`) ON DELETE CASCADE;
ALTER TABLE `goals` DROP CONSTRAINT `fk_goal_category`;
ALTER TABLE `goals`
ADD CONSTRAINT `fk_goal_category` FOREIGN KEY (`categor... | true |
056a2b89c9a5b64c943e9bef5438c7f47baf6ecb | SQL | lvguanwei/workCode | /testEmallCode/emall-web/target/classes/sql/user.sql | UTF-8 | 859 | 2.8125 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : localmysqlserver
Source Server Version : 50624
Source Host : 172.7.4.58:3306
Source Database : emall
Target Server Type : MYSQL
Target Server Version : 50624
File Encoding : 65001
Date: 2015-08-26 20:00:11
*/
SET FOREIGN_KEY_CHECKS=0;... | true |
b21175a42c2c2f37d1e298636668180a324ca5c6 | SQL | Kyouru/ANEXO6 | /00 - Crear Tabla TMP_SBS_ANEXO6.sql | UTF-8 | 2,724 | 2.71875 | 3 | [] | no_license | --DROP TABLE SISGODBA.TMP_SBS_ANEXO6;
-->> Se usa para Importar los datos de los creditos con las modificaciones que realiza la sra. Coty
CREATE TABLE SISGODBA.TMP_SBS_ANEXO6
(
NRO VARCHAR2(10 BYTE),
APELLIDOPATERNO VARCHAR2(120 BYTE),
FECHANACIMIENTO VARCHAR2(8 BYTE),
SEXO ... | true |
7a05818be8133a7ac14b745d0d4deabe3762f953 | SQL | Maruf-Reaz/SchoolManagementApp | /db_tables/db_exam_grades.sql | UTF-8 | 1,051 | 2.9375 | 3 | [] | no_license | /*
SQLyog Community v13.0.1 (64 bit)
MySQL - 10.1.32-MariaDB
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
create table `db_exam_grades` (
`id` int (11),
`grade_name` varchar (765),
`grade_point` float ,
`mark_from` int (11),
`mark_upto` int (11),
`note` va... | true |
2ce212304ce91af44d906cfe894e014f7422f77a | SQL | kukuleta/CENG | /CS6830-Database Management Systems/SQL/QueryingData/Query5.sql | UTF-8 | 1,423 | 4.40625 | 4 | [] | no_license | CREATE TABLE Employee
(eid integer PRIMARY KEY,
ename varchar(24),
age integer,
salary real,
CONSTRAINT must_be_greater_than_10000 CHECK (salary > 10000));
CREATE TABLE Works
(eid integer,
did integer,
pct_time integer,
PRIMARY KEY(eid,did),
FOREIGN KEY (eid) REFERENCES Employee(eid) ON DELETE CASCADE,
FOREIGN KEY (di... | true |
871cd4164badc32c07e49dbdfa0772f789fe0792 | SQL | Harmonickey/EnHabit | /Solutions/Database.Enhabit/Database.Enhabit/Tables/Listings.sql | UTF-8 | 1,095 | 3.515625 | 4 | [] | no_license | CREATE TABLE [Enhabit].[Listings]
(
[ListingId] uniqueidentifier NOT NULL,
[UserId] uniqueidentifier NOT NULL,
[LandlordId] uniqueidentifier NOT NULL,
[PicturesId] uniqueidentifier NULL,
[UniversityId] uniqueidentifier NOT NULL,
[Address] VARCHAR(250) NOT NULL,
[Unit] VARCHAR(10) NULL,
[XCoordinate] ... | true |
811c9ddbc88a985672d5b6ac799e3c4fe7c1c60e | SQL | himanshu-14/book-rental-demo | /server/extras/queries.sql | UTF-8 | 2,338 | 4.125 | 4 | [] | no_license | select * from transactions;
delete from transactions where trans_id in (8,9);
select * from books;
select * from book_copies where book_copy_id = '1'
UPDATE book_copies SET book_copy_status = 0 where book_copy_id = 1;
select * from customers;
UPDATE customers SET num_rented = 1 where cust_id = 1;
select * from tra... | true |
f95caa2200bbc9a9462e38b277481216fb23188d | SQL | shenchen1991/buyBallWin | /src/main/resources/sql/驱蚊器翁.sql | UTF-8 | 1,599 | 3.28125 | 3 | [] | no_license | CREATE TABLE `big_small_data` (
`big_small_data_id` bigint(64) NOT NULL AUTO_INCREMENT COMMENT '自增',
`match_id` bigint(64) NOT NULL COMMENT '比赛id',
`league_name_simply` varchar(64) DEFAULT NULL COMMENT '联赛名称',
`host_name` varchar(64) DEFAULT NULL COMMENT '主队',
`guest_name` varchar(54) DEFAULT NULL COMMENT '客队... | true |
314ec3b56ee6b6a1d6cdc16143ef3cb3e22d6657 | SQL | probolinggo-dev/probot | /migrations/2020-07-17-142117_create_users_and_group/up.sql | UTF-8 | 573 | 4 | 4 | [
"MIT"
] | permissive | CREATE TABLE channels (
id VARCHAR(32) PRIMARY KEY NOT NULL,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
CREATE TABLE users (
id VARCHAR(32) PRIMARY KEY NOT NULL,
username VARCHAR(255) UNIQUE NOT NULL,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
CREATE TABLE channels_users (
user_i... | true |
8fc47a0317db959b082d8c055e2696f095817faa | SQL | Balex94/Cours-POEI | /SQL/shop.sql | UTF-8 | 697 | 2.953125 | 3 | [] | no_license | DROP DATABASE IF EXISTS `shop`;
CREATE DATABASE IF NOT EXISTS `shop`;
USE `shop`;
DROP TABLE IF EXISTS `products`;
CREATE TABLE IF NOT EXISTS `products`(
id TINYINT PRIMARY KEY AUTO_INCREMENT NOT NULL,
title VARCHAR(50) NOT NULL DEFAULT "no_title",
url TEXT NOT NULL,
price FLOAT(10,2) NOT NULL DEFAULT 0.0,... | true |
db6f1034f792cc439026a3942d031575f28372ad | SQL | Neilkot/library-servlet | /src/test/resources/create_table_book_requests_journals.sql | UTF-8 | 503 | 3.546875 | 4 | [] | no_license | create_table_book_requests_journals.sqlCREATE TABLE book_requests_journals(
id INT AUTO_INCREMENT,
book_request_id INT NOT NULL UNIQUE,
create_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
approve_date TIMESTAMP DEFAULT NULL,
expiration_date TIMESTAMP DEFAULT NULL,
return_date TIMESTAMP DEFAULT NULL,
CONSTRAINT pk_book_req... | true |
422d09127ac0e3ed59b3dc63df9393903929eacb | SQL | JcGaara/SGA-PLSQL-OPE | /SGA-OPERACION/Triggers/T_TYSTIPSRVGRUPOCORTE_AIUD.sql | UTF-8 | 1,122 | 2.890625 | 3 | [] | no_license | CREATE OR REPLACE TRIGGER OPERACION.T_TYSTIPSRVGRUPOCORTE_AIUD
AFTER INSERT OR UPDATE OR DELETE
ON OPERACION.TYSTIPSRVGRUPOCORTE REFERENCING OLD AS OLD NEW AS NEW
FOR EACH ROW
/**************************************************************************
NOMBRE: T_TYSTIPSRVGRUPOCORTE_AIUD
PROPOSITO: Genera log... | true |
7e166b302175ad0149cabf985c8740d494cf11ed | SQL | ichoukou/Bigdata | /main/law/spark_short/sql/192.168.74.102/laws_doc2/plaintiff_defendant_lawyer_id.sql | UTF-8 | 2,670 | 3.359375 | 3 | [] | no_license | update judgment2_main_etl a,tmp_hzj_JudgeResult b set
a.punish_cate = b.punish_cate,
a.punish_date= b.punish_date,
a.punish_money= b.punish_money,
a.delay_date = b.delay_date where a.uuid = b.uuid ;
update judgment2_main_etl a,tmp_hzj b set
a.edu = b.edu,
a.gender = b.gender,
a.nation = b.nation where a.uuid = b.uu... | true |
43c79d2014da17ecf6b771db141e4255771d0125 | SQL | Squar89/BD | /seriale.sql | UTF-8 | 2,196 | 3.265625 | 3 | [] | no_license | --
-- Oskar Skibski, http://www.mimuw.edu.pl/~oski/bd/
--
-- Przykladowy baza danych seriali
--
DROP TABLE postac;
DROP TABLE serial;
DROP TABLE kanal;
CREATE TABLE kanal (
idkanalu NUMBER(5) PRIMARY KEY,
nazwa VARCHAR2(40) NOT NULL,
rokpowstania NUMBER(4) NOT NULL
);
CREATE TABLE serial (
idserialu NUMBER... | true |
9b3214000bd7663544701c0e6b37ead59dd4769f | SQL | Shenpotato/springjdbc | /src/main/resources/BookShopQuery.sql | UTF-8 | 868 | 3.171875 | 3 | [] | no_license | drop table administor;
create table administor(
aid varchar(20),
apassword varchar(20),
alevel int
)
select * from administor;
insert into administor(aid,apassword,alevel) values('00001','123456',3)
insert into administor(aid,apassword,alevel) values('00002','123456',4)
create table book(
isbn varchar(10),
book_name v... | true |
66307cea51106c2965f2347f070eb1e8caaa0f5a | SQL | Be-libra/WeCare | /WeCare/WeCare/petsitter.sql | UTF-8 | 4,258 | 3.015625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jun 06, 2019 at 05:07 PM
-- Server version: 10.1.36-MariaDB
-- PHP Version: 7.2.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... | true |
d76a1f875af49d96df2ae1ff1a521cae05e7aa09 | SQL | beandaola/nabprep | /NabTask/bin/main/db/migration/V1__init.sql | UTF-8 | 408 | 2.734375 | 3 | [] | no_license | CREATE TABLE `person` (
`id` INT NOT NULL AUTO_INCREMENT,
`name` VARCHAR(50) NOT NULL,
`client` VARCHAR(50) NOT NULL,
PRIMARY KEY (`id`));
CREATE TABLE `todo` (
`id` INT NOT NULL AUTO_INCREMENT,
`summary` VARCHAR(45) NULL,
`discription` VARCHAR(45) NULL,
PRIMARY KEY (`id`));
insert into person(nam... | true |
fa2406a43f8a539b93f2b75c2bfbf5bc706a6c41 | SQL | VerindraHernandaPutra/Covid-19-Website-LastProject- | /covid_19.sql | UTF-8 | 4,216 | 3.0625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Apr 24, 2020 at 11:57 PM
-- Server version: 10.1.8-MariaDB
-- PHP Version: 5.6.14
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLI... | true |
bd95d17c1d7446f9c53a4d2d2d91844e305e8f15 | SQL | 0920CDFSNCN27ARED/clases-resueltas | /modulo-9/clase-42/site/consulta.sql | UTF-8 | 365 | 3.328125 | 3 | [] | no_license | USE mercadoliebre;
SELECT products.name as productName, categories.name as categoryName
from products INNER JOIN
categories ON products.categoryId = categories.id;
USE mercadoliebre;
SELECT products.name as productName, categories.name as categoryName
from products INNER JOIN
categories ON products.categoryId = cate... | true |
df0ff00c734fbe89af40867a107cd984bea39339 | SQL | adang48/File-Structures-and-Database-Project | /makeTables.sql | UTF-8 | 11,409 | 3.5 | 4 | [] | no_license | CREATE TABLE PROFESSOR
(
_Ssn numeric(9) not null,
_name varchar(20) not null,
_StreetAddr varchar(30) not null,
_City varchar(20) not null,
_State char(2) not null,
_Zip numeric(5) not null,
_Area_code numeric(3) not null,
... | true |
a81dad6c655d7fbf039e3990e4bf0d9afa1ccdca | SQL | lgeter1/db-class | /practice/task7.5/book.sql | UTF-8 | 1,447 | 3.671875 | 4 | [] | no_license | CREATE DATABASE book;
\c book
CREATE TABLE books
(isbn VARCHAR(20) NOT NULL,
title VARCHAR(100),
author VARCHAR(100),
format VARCHAR(20),
price DECIMAL,
pages INTEGER,
datepublished DATE,
publisher VARCHAR(100),
PRIMARY KEY(isbn)
);
CREATE TABLE author
(
id INTEGER NOT NULL,
name VARCHAR(35),
residence VA... | true |
41e9ce9ed59e3f40b0b885f35e29d530d4025ee0 | SQL | rossvin/api | /secret1.sql | UTF-8 | 1,227 | 2.71875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.4.15.5
-- http://www.phpmyadmin.net
--
-- Хост: 127.0.0.1:3308
-- Время создания: Окт 28 2018 г., 20:07
-- Версия сервера: 5.6.29
-- Версия PHP: 7.0.4
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */... | true |
e41c5edd94e702212b8ddf8551c049787711ce7b | SQL | ibpavlov/Interview-U | /scheme/scheme.sql | UTF-8 | 3,274 | 3.1875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.0.10.14
-- http://www.phpmyadmin.net
--
-- Хост: localhost:3306
-- Време на генериране: 5 юли 2016 в 16:13
-- Версия на сървъра: 5.5.50-cll
-- Версия на PHP: 5.4.31
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTE... | true |
f5e0567715d8a57fce4da430ac90737a61aa48b4 | SQL | usmanjamil83/storefront_mini | /seeds.sql | UTF-8 | 1,445 | 2.890625 | 3 | [] | no_license | CREATE DATABASE Bamazon;
USE bamazon;
CREATE TABLE products (
item_id INTEGER AUTO_INCREMENT NOT NULL,
product_name VARCHAR(100) NOT NULL,
department_name VARCHAR(100) NOT NULL,
price DECIMAL(10,2) NOT NULL,
stock_quantity INTEGER NOT NULL,
PRIMARY KEY(item_id)
);
INSERT INTO products (product_n... | true |
a221e9362bef35f3d1f421c39a1b3db5dc1afaae | SQL | rlminers/rick | /sql/sql_profiles_used.sql | UTF-8 | 483 | 3.3125 | 3 | [] | no_license | col name format a32
SELECT p.name,
p.status,
to_char(p.created,'MM/DD/YYYY') created,
s.sql_id,
s.plan_hash_value,
s.executions execs,
ROUND( (s.elapsed_time / 1000000) / DECODE (NVL (s.executions, 0), 0, 1, s.executions), 2) avg_etime,
ROUND( s.buffer_gets / DECODE (NVL (s.executions, 0), 0, 1, s.exe... | true |
fb6b2d00434c12a9880b7204553da9aa88aa4fdf | SQL | silence-do-good/stress-test-Postgres-and-MySQL | /dump/low/day16/select1344.sql | UTF-8 | 178 | 2.640625 | 3 | [] | no_license |
SELECT timeStamp, temperature FROM ThermometerOBSERVATION o
WHERE timestamp>'2017-11-15T13:44:00Z' AND timestamp<'2017-11-16T13:44:00Z' AND temperature>=46 AND temperature<=79
| true |
4ea3c2002bba18b079b731ce141e012efde789b2 | SQL | NJSilva/cursoort | /BaseDeDatos/ProyectoORT/ProyectoDatosORT/Pruebas.sql | UTF-8 | 866 | 3.265625 | 3 | [] | no_license | CALL ESQUEMA.SP_PRESTAMOS_OBTENER_POR_CEDULA('19716428');
Select
PRESTAMOS.LIBROS_ID,
PRESTAMOS.PERSONAS_ID,
CHAR(PRESTAMOS_FECHA_DESDE, ISO) as PRESTAMOS_FECHA_DESDE,
CHAR(PRESTAMOS_FECHA_HASTA, ISO) as PRESTAMOS_FECHA_HASTA,
LIBROS.LIBROS_ID,
LIBROS.LIBROS_TITULO,
LIBROS.LIBROS_CODIGO,
LIBROS.LIBROS_AUTOR,
... | true |
9bc32b00e6524ddee56df6a3af0592747963f4a2 | SQL | genoufox/sql-scripts | /mas_edm0219.sql | ISO-8859-7 | 849 | 3.53125 | 4 | [] | no_license | SELECT a.userid as ˻id,
a.account as ˺,
a.phone as ֻ,
a.mail as
FROM (SELECT USERID,
REGEXP_REPLACE(ACCOUNT, '^.{3}', '***') ACCOUNT,
PHONE,
MAIL,
ROLE_NAME,
ROLE_ID,
ROLE_MAX_LEV,
GR... | true |
3190b9a9050f9b9e16753b8a3e5893717cfc9acf | SQL | nguyenvanhien141194/hiennvT1904a | /baitap3sql.sql | UTF-8 | 644 | 3 | 3 | [] | no_license | CREATE TABLE bo_phan(
ma_bp int IDENTITY(1,1) PRIMARY KEY,
ten_bp varchar (255)
);
CREATE TABLE nhan_vien(
nv_id INT IDENTITY (1,1) PRIMARY KEY,
ten_sv VARCHAR(100),
chuc_vu VARCHAR(250),
bang VARCHAR (250),
sdt int,
dia_chi VARCHAR(255),
ngay_sinh DATE,
ma_bp int FOREIGN KEY REFERENCES bo_phan(... | true |
b97f52e8eb4fe361386bd34990c618f4d148e7ea | SQL | thinkful-ei20/noteful-v2-darren | /scratch/queries.sql | UTF-8 | 1,220 | 3.84375 | 4 | [] | no_license |
-- SELECT * FROM notes
-- ORDER BY id;
-- SELECT * FROM folders;
-- SELECT * FROM tags;
-- SELECT * FROM notes_tags;
-- SELECT notes.id as "NoteID",notes.name as "name", notes.folder_id as "noteFolderID", folder.name as "FolderName", tags.id as "TagID", tags.name as "tagName", folders.name as "FolderName"
-- FR... | true |
87344fe43ced4be8f2ce634b15b8133044603b9a | SQL | silence-do-good/stress-test-Postgres-and-MySQL | /dump/high/day26/select0049.sql | UTF-8 | 177 | 2.609375 | 3 | [] | no_license |
SELECT timeStamp, temperature FROM ThermometerOBSERVATION o
WHERE timestamp>'2017-11-25T00:49:00Z' AND timestamp<'2017-11-26T00:49:00Z' AND temperature>=3 AND temperature<=18
| true |
bc0feaa4a8a7f191a9818d98c92ea41df0165f6d | SQL | CM0R31R4/motor_desarrollo | /fuentes/prod-base/bono3/BANMEDICA/sp_oracle/BANDATOSPREST_PKG.sql | UTF-8 | 2,486 | 2.546875 | 3 | [] | no_license |
SQL*Plus: Release 11.2.0.3.0 Production on Wed Feb 5 18:34:29 2014
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
SQL> SQL> PROCEDURE BANDATOSPREST
Argument Name Type In/Out Default?
--------------------------... | true |
14ad48f5759d0ef4ac66a9a3b436c8bcdcaf57e0 | SQL | LouLeBlanc/spring-data-jpa2 | /src/main/resources/sql/test-data.sql | UTF-8 | 3,033 | 3.078125 | 3 | [] | no_license | SET FOREIGN_KEY_CHECKS = 0;
TRUNCATE table author_book;
TRUNCATE table author;
TRUNCATE table book;
TRUNCATE table category;
SET FOREIGN_KEY_CHECKS = 1;
INSERT INTO category (id, name) VALUES (1, 'Classics');
INSERT INTO category (id, name) VALUES (2, 'Novels');
INSERT INTO category (id, name) VALUES (3, 'Java');
INSE... | true |
425b8b415659ce479fb3f657201b39c05325c760 | SQL | RobertGarciadSilva/sql | /general_SQL/trash/simpleExamples01.sql | UTF-8 | 3,017 | 4.0625 | 4 | [] | no_license |
-- ALGUNS SIMPLES EXERCICIOS
CREATE DATABASE `sql_learn_clinica`;
USE `sql_learn_clinica`;
CREATE TABLE AMBULATORIOS (
nroa INT PRIMARY KEY,
andar NUMERIC(3) NOT NULL,
capacidade SMALLINT
);
CREATE TABLE MEDICOS (
codm INT PRIMARY KEY,
nome VARCHAR (40) NOT NULL,
idade SMALLINT NOT NULL,
especialidade CHAR (20),
CP... | true |
568f80f26a9a094fdd0a6d5077b749cfa61f8897 | SQL | devg1120/timmy-rocket | /migrations/20170725152903_create_activities/up.sql | UTF-8 | 282 | 2.703125 | 3 | [] | no_license | CREATE TABLE activities (
id SERIAL PRIMARY KEY,
project_id INTEGER REFERENCES projects(id),
description VARCHAR,
start_time TIMESTAMP WITH TIME ZONE NOT NULL,
end_time TIMESTAMP WITH TIME ZONE NOT NULL,
tags TEXT[] NOT NULL DEFAULT '{}'
)
| true |
c55072bccc7f4c9331a52598616316f9c5e840ad | SQL | javami2017/provagit | /ristorante/src/com/begear/ristorante/util/GRAZIE_GERSON_COMPLETO_CON_TUTTO.sql | UTF-8 | 3,658 | 3.25 | 3 | [] | no_license | DROP DATABASE IF EXISTS ristorante;
CREATE DATABASE ristorante CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
USE ristorante;
CREATE TABLE piatto (
idpiatto INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
nomepiatto VARCHAR(45),
costo DECIMAL,
portata VARCHAR(45)
);
CREATE TABLE ordine (
idordine INT NOT N... | true |
fd89d892317745f931994f1775971fb21fdff363 | SQL | bhaveshdangi/flight-search | /connection-builder-service/src/main/resources/queries.sql | UTF-8 | 282 | 3.078125 | 3 | [] | no_license | SELECT * FROM FLIGHT_SCHEDULE ;
SELECT fs1.*, fs2.*, DATEDIFF(MINUTE,fs1.arrival_time,fs2.departure_time) FROM FLIGHT_SCHEDULE fs1, FLIGHT_SCHEDULE fs2 WHERE fs1.arrival_airport = fs2.departure_airport AND DATEDIFF(MINUTE,fs1.arrival_time,fs2.departure_time) BETWEEN 120 AND 480 ; | true |
0328d639f8ef65d053d907bfe8ca9f9f688d2b46 | SQL | Invenietis/CK-DB | /CK.DB.Zone/Res/Model.CK.GroupTable-Zone.Install.5.0.1.sql | UTF-8 | 622 | 3.28125 | 3 | [] | no_license | --[beginscript]
alter table CK.tGroup add
ZoneId int not null constraint DF_TEMP0 default(0);
alter table CK.tGroup drop constraint DF_TEMP0;
--[endscript]
--[beginscript]
alter table CK.tGroup add
constraint FK_CK_tGroup_ZoneId foreign key (ZoneId) references CK.tZone( ZoneId );
exec CKCore.sInvariantRegist... | true |
69be3a02f24ae29851ec3aa88b834e6747f258c4 | SQL | LawKyle/SYSC4907 | /database/seeds/FourthYearProject.sql | UTF-8 | 3,592 | 3.765625 | 4 | [] | no_license | CREATE DATABASE IF NOT EXISTS FourthYearProject;
USE FourthYearProject;
CREATE TABLE IF NOT EXISTS Product (
product_id INT NOT NULL AUTO_INCREMENT,
nfc_id VARCHAR(255),
description VARCHAR(2083),
name VARCHAR(255) NOT NULL,
tag SET('meat', 'produce', 'organic', 'deli', 'seafood', 'grocery', 'bakery'),
PRIMARY KEY (p... | true |
1f13a527d4c6edba9035838b5c97baca4c631e0f | SQL | zlw1987/forkit | /swe690capstone.sql | UTF-8 | 153,347 | 3.046875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Dec 17, 2019 at 04:10 PM
-- Server version: 5.6.46-cll-lve
-- 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 ... | true |
0e72221b9d9cf8f830abc6dc06077dfab51d1a32 | SQL | hpie/hpie | /FoxSol/db/foxsol_Dharamsala.sql | UTF-8 | 12,373 | 2.828125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 3.5.6
-- http://www.phpmyadmin.net
--
-- Host: 208.91.198.197:3306
-- Generation Time: Jul 05, 2013 at 08:19 AM
-- Server version: 5.5.30-log
-- 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... | true |
63bc853b03aba39cb2755f28e431e3f071904143 | SQL | Exclr8/CloudCore | /DataLayer/DB/CloudCoreDB/cloudcore/Stored Procedures/DashboardCreate.sql | UTF-8 | 570 | 2.875 | 3 | [] | no_license | create procedure [cloudcore].[DashboardCreate]
@DashboardID int output,
@SystemModuleId int,
@Title varchar(100),
@Description varchar(MAX),
@IntervalInMinutes int,
@DashboardGuid uniqueidentifier
as
begin
if not exists (select null from [cloudcore].Dashboard where DashboardGuid = @DashboardGuid)
begin
i... | true |
d66132a1e9c5c5bf9036d4cdd12c8b6d9921ce7c | SQL | jagolu/Universidad | /2/2_Cuatrimestre/FBD/Practicas/sesion3.sql | UTF-8 | 2,776 | 4.125 | 4 | [] | no_license | --PRUEBAS DE SELECT Y WHERE
select cantidad*12, codpro, codpie from ventas;
select cantidad*12 cant_anual, codpro, codpie from ventas;
select cantidad*12 cant_anual, codpro, codpie from ventas where cantidad/10>=150;
--PRUEBAS SUM() MAX MIN AVG STDDEV COUNT
select sum(cantidad) from ventas;
select sum(cantidad), avg(ca... | true |
c33ebe1d1a79154c397dd9be5c385d1c87e7d9c7 | SQL | gjun-neusoft/G-Mell-mobile | /mart.sql | UTF-8 | 11,800 | 3.03125 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : localhost_3306
Source Server Version : 50625
Source Host : localhost:3306
Source Database : mart
Target Server Type : MYSQL
Target Server Version : 50625
File Encoding : 65001
Date: 2019-12-13 17:05:20
*/
SET FOREIGN_KEY_CHECKS=0;
--... | true |
858f9fb4401733a01879bd2137be6f2dec76e328 | SQL | PS2Solutions/Cars_DataBase | /DML/V3/ReportLabourPayslip.sql | UTF-8 | 1,154 | 4 | 4 | [] | no_license | DROP PROCEDURE IF EXISTS ReportLabourPayslip;
DELIMITER $$
CREATE PROCEDURE `ReportLabourPayslip`(IN `DateFrom` datetime,IN `DateTo` datetime, IN `ContractID` int,IN `QuoteID` int, IN `LaborID` int)
BEGIN
SELECT
IFNULL(APD.AmountPayed,0) as 'Amount Paid'
,IFNULL(lacd.AmountToPay,0)+ IFNULL(epdd.extraPurchase,0) as 'Am... | true |
da3459f67f3413688e21c649454d0d57b226a502 | SQL | mustfun/learnExample | /src/test/Resource/Sql/stb.sql | UTF-8 | 23,226 | 2.75 | 3 | [] | no_license | SELECT * from admin LIMIT 100;
SELECT * from user_info ORDER BY id desc limit 100;
SELECT * from site_flash_setting
SELECT * from user_sign_record ORDER BY id desc limit 100
select * from site_flash_setting
where position = 'mxdAppTp'
and enabled = 1
ORDER BY sort desc
limit 1
select * from site_fla... | true |
8e0569b6e4553e12ac865216cc2b9f524217f187 | SQL | mtiendat/AdminAndroid | /doannhomlaravel.sql | UTF-8 | 10,303 | 2.90625 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.9.2
-- https://www.phpmyadmin.net/
--
-- Máy chủ: 127.0.0.1:3306
-- Thời gian đã tạo: Th10 18, 2020 lúc 12:48 PM
-- Phiên bản máy phục vụ: 10.4.10-MariaDB
-- Phiên bản PHP: 7.4.0
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";... | true |
95f905a86b5655850a2275dc314e4c9f218c340c | SQL | Marlowess/PRTS-ESP32-server | /mysql-scripts/create_table_probes_requests/create_table_probes_requests.sql | UTF-8 | 543 | 3.0625 | 3 | [] | no_license | -- drop to clean probe_requests table
DROP TABLE IF EXISTS probe_requests;
-- create from scratch probe_requests table
-- after having removed it in order to
-- throw away hold useless records
CREATE TABLE IF NOT EXISTS probe_requests (
-- probe_id INT AUTO_INCREMENT,
mac_address_board VARCHAR(255) NOT NULL,
... | true |
e8fd3c1c3a92ca854132b17c518520bfa535e03c | SQL | rflban/Databases | /lab_02/modifications.sql | UTF-8 | 751 | 3.53125 | 4 | [] | no_license | -- #16
insert into client (fname, mname, lname, phone)
values ('Богдан', NULL, 'Старых', '+79998887656');
-- #17
insert into client (fname, mname, lname, phone)
select fname, mname, lname, phone
from master
where id = 1;
-- #18
update tattoo
set price = 5000::money
where price = 5000::money;
-- #19
update tattoo
set... | true |
4067b8777a87e6ac5972d06bc59c80c6f4ed6465 | SQL | philmcc/postgrescheatsheet | /General_Admin.sql | UTF-8 | 1,787 | 3.625 | 4 | [] | no_license | -- Reload conf
-- Option 1: From the command-line shell
-- su - postgres
-- /usr/bin/pg_ctl reload
-- Option 2: Using SQL
SELECT pg_reload_conf();
-- Using either option will not interrupt any active queries or connections to the database, thus applying these changes seemlessly.
-- Kill Everything on a db:... | true |
6978314134a8c771a6cbae96600afc1382d53977 | SQL | lyyyuna/jjtest | /mybatistest/src/main/resources/blogtest.sql | UTF-8 | 876 | 3.15625 | 3 | [] | no_license | CREATE TABLE blog (
blog_id bigserial NOT NULL PRIMARY KEY,
blog_title CHARACTER VARYING(100),
blog_author_id INTEGER
)
WITH (OIDS=FALSE);
CREATE TABLE author (
author_id bigserial NOT NULL PRIMARY KEY,
author_name CHARACTER VARYING(100),
author_password CHARACTER VARYING(100),
author_email... | true |
6de55dd6e5a4d82cf95d56462d39b1c562ae5f91 | SQL | thetylerb/employee-tracker | /seed.sql | UTF-8 | 524 | 2.6875 | 3 | [] | no_license | INSERT INTO departments(name) VALUES('IT');
INSERT INTO departments(name) VALUES('HR');
INSERT INTO roles (title, salary, department_id) VALUES ('Full Stack Developer', 70000, 2);
INSERT INTO roles (title, salary, deparment_id) VALUES ('Junior Developer', 40000, 2);
INSERT INTO employee (first_name, last_name, role_i... | true |
10d7ec6ed5afb35938b3cf045252b34087e2cbd6 | SQL | victorluccassvl/UniversityMaterial | /MC536/Querry/SearchQuerry/20_Querry.sql | UTF-8 | 200 | 2.65625 | 3 | [] | no_license | -- 20) O número de consultas realizadas por dia em um periodo determinado
SELECT anamdata, COUNT(anamdata)
FROM anamnese
WHERE anamdata BETWEEN '2002-06-23' AND '2002-06-23'
GROUP BY anamdata
| true |
62ffba8040b247b10086980936450fd526dac5e5 | SQL | touchdownli/scrapy | /scrapytest/delta_price.sql | UTF-8 | 608 | 4.15625 | 4 | [] | no_license | select c.id, d.list_price as last_price,e.list_price as price,(e.list_price-d.list_price) as delta,f.* from
(select a.id,a.min,b.max from
(select id,min(crawl_date) as min from second_hand_house_price_info group by id having count(*)>1) as a
inner join
(select id,max(crawl_date) as max from second_hand_hous... | true |
f0e8f553b3f221c821d7e62162db513e527a6e38 | SQL | hvk99/SQL-and-PL-SQL | /PL SQL 2/Ques1.sql | UTF-8 | 382 | 2.734375 | 3 | [] | no_license | DECLARE
a NUMBER;
b NUMBER;
c NUMBER;
BEGIN
a := &a;
b := &b;
c := &c;
IF (a > b AND a > c) THEN
DBMS_OUTPUT.PUT_LINE('The greatest number is : ');
DBMS_OUTPUT.PUT_LINE(a);
ELSIF b > c THEN
DBMS_OUTPUT.PUT_LINE('The greatest number is : ');
DBMS_OUTPUT.PUT_LINE(b);
ELSE
DBMS_OUTPUT.PUT_LINE('The greate... | true |
42cc9cc2cfb7fb7dd88fd93fed4e8b73c700d71c | SQL | bulentgucuk/DBA-Scripts | /Find CPU Intensive Queries.sql | UTF-8 | 1,431 | 3.921875 | 4 | [] | no_license | --https://www.simple-talk.com/blogs/2016/02/16/how-to-find-cpu-intensive-queries/
--check the most cpu intensive queries in our system:
--comment out the database name to get the queries for all the databases
SELECT
-- using statement_start_offset and
-- statement_end_offset we get the query text
-... | true |
f72adc575c59c1b72b762be18300aa3ac43537da | SQL | mmlcasag/website | /tabela/web_virtual_selo.sql | UTF-8 | 498 | 3.171875 | 3 | [] | no_license | CREATE TABLE "WEBSITE"."WEB_VIRTUAL_SELO" (
"CODIGO" NUMBER(10,0) NOT NULL ENABLE,
"SELO" NUMBER(6,0) NOT NULL ENABLE,
"TIPO" CHAR(1 BYTE) NOT NULL ENABLE,
"CODIGO_TIPO" NUMBER(10,0) NOT NULL ENABLE,
"FL_ATIVO" CHAR(1 BYTE) DEFAULT 'S' NOT NULL ENABLE,
CONSTRAINT "PK_WEB_VITUAL_SELO" PRIMARY KEY ("CODIGO"),
CONS... | true |
3ba67de1eea9f695c6ed0f0ba8da2866be2e16d8 | SQL | gabrielsouza1/look | /look.sql | UTF-8 | 2,846 | 3.046875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 3.4.5
-- http://www.phpmyadmin.net
--
-- Servidor: localhost
-- Tempo de Geração: 04/06/2018 às 23h34min
-- Versão do Servidor: 5.5.16
-- Versão do PHP: 5.3.8
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIEN... | true |
fa22e0d10a079da30c07566b31f76e345c9443eb | SQL | jeremy-brooks/Rwanda-weather-website | /extensions/forecast/ext_tables.sql | UTF-8 | 3,164 | 3.578125 | 4 | [] | no_license | --
-- Table structure for table `forecasts`
--
DROP TABLE IF EXISTS `forecasts`;
CREATE TABLE `forecasts` (
`id` int(11) NOT NULL auto_increment,
`issue_time` datetime default '',
`published` datetime default '',
`headline` text,
`severe_weather` text,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=... | true |
3c0c59a7e949175553a663a1e530068d15d32a2e | SQL | Asccess/Material-management-information-system | /Database/store_m.sql | UTF-8 | 23,950 | 3.578125 | 4 | [] | no_license | /*
Navicat Premium Data Transfer
Source Server : localhost_3306
Source Server Type : MySQL
Source Server Version : 80019
Source Host : localhost:3306
Source Schema : store_m
Target Server Type : MySQL
Target Server Version : 80019
File Encoding : 65001
D... | true |
59c8aeadc4852b6ebb57a465ad3e1265d694a437 | SQL | leekenki/Hotel_manager | /[Study]WinForm2/sqlSave/SQLQuery5class.sql | WINDOWS-1252 | 836 | 3.28125 | 3 | [] | no_license | SELECT B.RoomType, B.PeoNum, B.roomNum,
B.ResFlag , A.noShow, B.MAKEDATE, B.MAKER,
B.EDITDATE, B.EDITOR , B.RoomPrice
FROM TB_2_RESV A LEFT JOIN TB_2_ROOM B ON A.roomNum = B.roomNum
WHERE B.roomType LIKE '%%'
AND B.peoNum LIKE '%3~4%'
AND B.ResFlag = '... | true |
ba57d53136257306a91af174024c3f9c8a4cbe3c | SQL | datapolitan/niceridestatus | /code/summary_stats.sql | UTF-8 | 593 | 3.765625 | 4 | [
"MIT"
] | permissive | --Average by hour for the plot
WITH hour_ex AS (
SELECT
extract(hour from execution_time) as hour_ex,
minneapolis,
st_paul,
falcon_heights,
golden_valley,
fort_snelling
FROM niceride_mn.nr_city_stats
--account for the 4 hours for UTC
WHERE execution_ti... | true |
54ff9104a7589334bba17419431785354ff4a50b | SQL | juliaSSCC/Web2Login | /webproject.sql | UTF-8 | 1,713 | 3.078125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: 12-Jun-2019 às 18:48
-- Versão do servidor: 10.1.38-MariaDB
-- versão do PHP: 7.1.27
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @... | true |
0082707e334931c811635b89fff56f8de3dade3b | SQL | rybicon/4-1-sql | /data/mtcars-init.sql | UTF-8 | 482 | 2.6875 | 3 | [] | no_license | -- launch with:
-- sqlite3 mtcars.sqlite < mtcars-init.sql
-- drop the results table to start from scratch
---drop table results;
-- create results table
create table results (
mpg float,
cylinders int,
displacement float,
horsepower float,
weight float,
acceleration float,
year int,
o... | true |
78fa296559d3d359d5e7de47b8e55b461c30b9e6 | SQL | ichoukou/yipin | /yipinResources/sql/category/prop2014-01-10.sql | UTF-8 | 8,057 | 2.84375 | 3 | [] | no_license | create table prop (
propId int primary key AUTO_INCREMENT,
name varchar(64) not null,
code varchar(64),
level int,
parentid int,
rank int,
status int,
createTime timestamp null,
updateTime timestamp not null DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) AUTO_INCREMENT=1000... | true |
ff50af7a63571dffcde31a0e55886cea52080c8b | SQL | uai-python/tim-8 | /Statisktik.sql | UTF-8 | 3,153 | 2.703125 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.6.5.2
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Apr 05, 2017 at 01:25
-- Server version: 10.1.21-MariaDB
-- PHP Version: 7.1.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_C... | true |
9c66ba18772ffa5a9643da2780329e8b2449ace9 | SQL | Prithvirajbilla/RecursiveQueries | /recursive_procedures/query.sql | UTF-8 | 691 | 3.5625 | 4 | [] | no_license | CREATE OR REPLACE PROCEDURE find_all_a(p_a_id NUMBER,p_tier NUMBER DEFAULT 1 ) IS
v_a_id NUMBER,v_a_name VARCHAR(20),v_a_details VARCHAR(20);
CURSOR c1 IS
SELECT a_id,a_name,a_details FROM A WHERE c_key in
(SELECT c_id FROM C WHERE b_key in
(SELECT b_id from B where a_key = p_a_id));
BEGIN
SELECT a_id INTO v_a_... | true |
3d8f24a372fc543a821ced4773765504bf8f0724 | SQL | bryantqo/SAM-ple | /Backend/Database Deployment/Scripts/000_UP/1.0.0/0008_CreateAppViews.sql | UTF-8 | 866 | 3.0625 | 3 | [] | no_license | CREATE TABLE pam_1_0_0.gridViews
(
id integer GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY,
type integer REFERENCES pam_1_0_0.model (id),
layout jsonb DEFAULT '{}'
)
WITH (
OIDS = FALSE
);
CREATE TABLE pam_1_0_0.detailViews
(
id integer GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY,
type integer... | true |
095e18d0d93b3ac05f8568e37d84bfe28568e723 | SQL | jiabaoer/myj | /src/main/resources/sql/user.sql | UTF-8 | 1,666 | 3.234375 | 3 | [] | no_license | /*
Navicat Premium Data Transfer
Source Server : hwg
Source Server Type : MySQL
Source Server Version : 80013
Source Host : localhost:3306
Source Schema : myj_stock
Target Server Type : MySQL
Target Server Version : 80013
File Encoding : 65001
Date: 10/02/2019 16:10:... | true |
c1ae76f9c6bbaaa363b9dc45a27b16f1bfb24c16 | SQL | sergeev-ms/cuba-component-user-inbox | /modules/core/db/init/hsql/10.create-db.sql | UTF-8 | 534 | 2.5625 | 3 | [
"Apache-2.0"
] | permissive | -- begin DDCUI_MESSAGE
create table DDCUI_MESSAGE (
ID varchar(36) not null,
VERSION integer not null,
CREATE_TS timestamp,
CREATED_BY varchar(50),
UPDATE_TS timestamp,
UPDATED_BY varchar(50),
DELETE_TS timestamp,
DELETED_BY varchar(50),
--
SENDER_ID varchar(36),
RECEIVER_ID ... | true |
d7e42072dd52619b4329ae4c244cae4f9d6e7e15 | SQL | woori-hippy/hippy_back | /prisma/migrations/20210501135258_dev/migration.sql | UTF-8 | 1,847 | 3.71875 | 4 | [] | no_license | -- CreateTable
CREATE TABLE `action` (
`id` INTEGER NOT NULL AUTO_INCREMENT,
`product_id` INTEGER NOT NULL,
`user_id` INTEGER NOT NULL,
`price` INTEGER NOT NULL,
`created_at` DATETIME(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
INDEX `action_product_fk`(`product_id`),
INDEX `action_user_fk`(`user_id`)... | true |
4d4c91054c4fae37fd3022e587bcb406a5875175 | SQL | suyashchopra19/SQL | /sql-practise.sql | UTF-8 | 3,387 | 4.4375 | 4 | [] | no_license | CREATE TABLE movies (
id INTEGER PRIMARY KEY,
name TEXT DEFAULT NULL,
year INTEGER DEFAULT NULL,
rank REAL DEFAULT NULL
);
CREATE TABLE actors (
id INTEGER PRIMARY KEY,
first_name TEXT DEFAULT NULL,
last_name TEXT DEFAULT NULL,
gender TEXT DEFAULT NULL
);
CREATE TABLE roles (
actor_id INTEGER,
mov... | true |
035841e6fbb6ab098148d4c106e3edc1041540af | SQL | dlievre/cama01 | /out/camagruDbFkey.sql | UTF-8 | 5,430 | 3.140625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.6.0
-- http://www.phpmyadmin.net
--
-- Client : localhost
-- Généré le : Ven 17 Février 2017 à 11:54
-- Version du serveur : 5.7.11
-- Version de PHP : 7.0.0
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SE... | true |
c29bc5784e4c340592e9f8f9905d27f7dae14d97 | SQL | verysuper/wda_exam | /web04_1/wda_4_1.sql | UTF-8 | 8,520 | 2.90625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.0.1
-- https://www.phpmyadmin.net/
--
-- 主機: 127.0.0.1
-- 產生時間: 2018-08-07 04:20:29
-- 伺服器版本: 10.1.32-MariaDB
-- PHP 版本: 5.6.36
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARA... | true |
0eb569844937cc5150f47a40a1a97b44eda8a07e | SQL | 18918090402/MZJF_Work | /MZJF_Work/0002 Git.nonobank.com/archive_20180806/bi-etl.git/03_DW_HADOOP/03_DMT_BF/03_SCRIPT/WDZJ_DEBT_DETAIL_DAILY/WDZJ_DEBT_DETAIL_DAILY.sql | UTF-8 | 1,144 | 3.609375 | 4 | [] | no_license | -- WDZJ_DEBT_DETAIL_DAILY.sql
set mapreduce.job.name = DMT_BF_WDZJ_BORROWS_DETAIL_DAILY;
set mapreduce.job.queuename = etl-dw;
set hive.exec.dynamic.partition.mode=nonstrict;
insert overwrite table DMT_BF.WDZJ_DEBT_DETAIL_DAILY partition
(STAT_DATE)
SELECT
dbl.id dbl_id
,dbl.user_id
,dbl.price
,... | true |
6a530a540dfeb608306d217ff546ca63a12566bb | SQL | Telefonica/rural-planner | /sql/ec/clustering_settlements.sql | UTF-8 | 722 | 4.4375 | 4 | [] | no_license | SELECT
N1.node_id AS centroid,
N1.node_type as centroid_type,
N1.node_weight AS centroid_weight,
''''||string_agg(N2.node_id,''' ,''' ) || '''' AS nodes,
N1.node_weight + SUM(N2.node_weight) AS cluster_weight,
COUNT(N2.node_id) + 1 AS cluster_size
FROM {schema}.{table_nodes} N1
LEFT JOIN {schema}.{table_nodes} N2
ON S... | true |
0c9eb7a856fe477ef22e5b08449a6af60d6f7810 | SQL | micatw11/Formulario | /base_datos/Base_Datos.sql | UTF-8 | 9,264 | 3.8125 | 4 | [] | no_license | SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL,ALLOW_INVALID_DATES';
DROP SCHEMA IF EXISTS `Base_Datos` ;
CREATE SCHEMA IF NOT EXISTS `Base_Datos` DEFAULT CHARACTER SET latin1 ;
USE `Ba... | true |
b6c0641ddcef3d4ec84bace15d555c5c347f1e0b | SQL | nuridincs/BackendOffer | /db_sales .sql | UTF-8 | 27,776 | 3.078125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.0
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Apr 20, 2017 at 05:17 AM
-- Server version: 5.7.17-0ubuntu0.16.04.2-log
-- PHP Version: 7.0.18
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!4... | true |
0ae5d63f4bb54a9bb251ed9dcf17bec6710fd4e5 | SQL | wangfuli217/code | /misc/timetrack_rpt.sql | UTF-8 | 1,205 | 3.890625 | 4 | [] | no_license | -- For all time_transacts rows, find user's real name (via the
-- users/employee_data tbls) and sum the hours (from time_transacts tbl).
--
-- So the link is employee number in time_transacts, to employee_id in users
-- tbl to last_name, first_name in employee_data tbl.
select e.first_name||' '||e.last_name, SUM(t.hou... | true |
cc615ac99406f48be78bffaf78cf5031e110d8c9 | SQL | 62160188/MiniProject | /MiniProject/db.sql | UTF-8 | 269 | 2.828125 | 3 | [] | no_license | CREATE TABLE users (
id int(30) AUTO_INCREMENT PRIMARY KEY,
name varchar(80) not null,
email varchar(80) not null UNIQUE KEY
)ENGINE = INNODB DEFAULT charset=utf8;
INSERT INTO users (id,name,email)
VALUES ('1','ta','ta@gmail.com'),('2','ta1','ta1@gmail.com')
| true |
13b52a5da07dcf3e5a6b7c1491de6c474f03412c | SQL | MadhumithaVangal/SQL_PLSQL | /curs_var1.sql | UTF-8 | 534 | 3.0625 | 3 | [] | no_license | SET SERVEROUTPUT ON;
DECLARE
CURSOR c1 ( pri_key GLIF3.KEY_1%TYPE, branch GLIF3.BRCH%TYPE ) IS SELECT SUBSTR(KEY_1,5,5) AS DT from GLIF3 WHERE KEY_1 = pri_key AND BRCH = branch;
br1 GLIF3.BRCH%TYPE := '01581';
dt VARCHAR2(5);
BEGIN
FOR line in c1('000040993000040993011022317F00107909501','01581') LOO... | true |
6c865d9af6b926cc0f654e7f02c567d68b184ed0 | SQL | ssj-delta-cu/ssj-calsimetaw | /detaw/raster.sql | UTF-8 | 2,294 | 4.03125 | 4 | [
"MIT"
] | permissive | -- These scripts perform the rasterization of the DETAW data.
-- First, create a temporary table holding all the ETO data.
create temp table eto_poly as
with p as (
select b,(st_dumpAsPolygons(rast,b)).*
from cimis.eto,generate_series(1,365) as b
)
select b as dowy,
val as eto,
st_x(st_centroid(geom)) as east,
st_y(... | true |
edb91c5b2b6dc4274682efeae8410487a71f3d60 | SQL | lkaminski96/Projects | /C#/projekt Dziennik Szkolny/DziennikCszarp.ddl | UTF-8 | 7,740 | 3.25 | 3 | [] | no_license | -- Generated by Oracle SQL Developer Data Modeler 17.4.0.355.2121
-- at: 2018-08-23 15:30:21 CEST
-- site: Oracle Database 11g
-- type: Oracle Database 11g
CREATE TABLE godziny (
idgodz INTEGER NOT NULL,
rozpoczecie VARCHAR2(10) NOT NULL,
zakonczenie VARCHAR2(10) NOT NUL... | true |
1ed46e18813239543321127464878999e40366cf | SQL | borisbotev/SoftUni | /Databases Basics/11.ExamPreparation(24-06-2018)/17.GDPRViolation.sql | UTF-8 | 814 | 4.40625 | 4 | [
"MIT"
] | permissive | WITH Durations AS(
SELECT
t.Id,
a.Id AS AccountId,
c.Name AS Town,
(CASE
WHEN t.CancelDate IS NOT NULL THEN 'Canceled'
ELSE
CONCAT(
CAST(DATEDIFF(DAY, t.ArrivalDate, t.ReturnDate) AS VARCHAR(10)),
' days')
END) AS Duration
FROM Trips AS t
JOIN Rooms AS r ON r.Id = t.RoomId
JOIN Hotels AS ... | true |
c5e492fa744984a24b0ca357b09a2f0c39b6eece | SQL | PureAppCrystal/SQL | /practice03.sql | UTF-8 | 1,771 | 4.03125 | 4 | [] | no_license | -- practice03
select * from jobs;
select * from employees;
select * from job_history;
select * from jobs;
select * from departments;
select * from regions;
select * from countries;
select * from locations;
select * from countries;
--Q1
select e.employee_id, e.FIRST_NAME, d.DEPARTMENT_NAME, e2.FIRST_NAME
... | true |
bf1e1d9e7a3e6fed9b522392ecef7b3f642a16a0 | SQL | danielstreif/social-network | /setup.sql | UTF-8 | 2,367 | 4 | 4 | [] | no_license | -- DROP TABLE IF EXISTS users CASCADE;
-- DROP TABLE IF EXISTS reset_codes;
-- DROP TABLE IF EXISTS friendships;
-- DROP TABLE IF EXISTS chat_messages;
-- DROP TABLE IF EXISTS private_messages;
-- DROP TABLE IF EXISTS user_wall CASCADE;
-- DROP TABLE IF EXISTS wall_comments;
CREATE TABLE users(
id SERIAL PRIMARY K... | true |
ae12099f532604476d72a08de170c3bba4b3031a | SQL | devpatel2/UMASS-Lowell | /Graduate/Database I/insert-data.sql | UTF-8 | 18,190 | 2.84375 | 3 | [] | no_license | delete from takes;
delete from student;
delete from teaches;
delete from instructor;
delete from course;
insert into course values('11', 'International Finance', 'Comp. Sci.', 3);
insert into course values('12', 'Greek Tragedy', 'Statistics', 4);
insert into course values('13', 'Greek Tragedy', 'Comp. Sci.', 4);
inser... | true |
61826c2c7edaf3cc91dc4a25f09042b3e55371d2 | SQL | pivannikov/dashofer.loc | /dashofer.sql | UTF-8 | 3,338 | 3.484375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- Хост: localhost:3306
-- Время создания: Авг 09 2021 г., 21:49
-- Версия сервера: 8.0.26-0ubuntu0.20.04.2
-- Версия PHP: 8.0.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_S... | true |
ab28a565fca7fa18de31655b3c50bdad6f8fde2f | SQL | cnngimenez/hacedores | /migrations/financiamiento.sql | UTF-8 | 1,838 | 2.96875 | 3 | [] | permissive | -- phpMyAdmin SQL Dump
-- version 4.9.4
-- https://www.phpmyadmin.net/
--
-- Servidor: localhost
-- Tiempo de generación: 04-04-2020 a las 09:42:49
-- Versión del servidor: 5.5.60-0+deb8u1
-- Versión de PHP: 7.3.16-1+0~20200320.56+debian8~1.gbp370a75
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TR... | true |
d09d8741d40e35c4a3ff218bc43b6c288c14c7ac | SQL | meowhw/test | /server/dump/main_cross_server.sql | UTF-8 | 3,106 | 2.78125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 3.5.1
-- http://www.phpmyadmin.net
--
-- Хост: 127.0.0.1
-- Время создания: Мар 07 2015 г., 20:53
-- Версия сервера: 5.5.25
-- Версия PHP: 5.3.13
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!4010... | true |
ce8e667a4964ca449c83a71cbc4250adf70dd6f0 | SQL | rlawjddbs/query | /pl1101/test_if.sql | UHC | 550 | 3.03125 | 3 | [] | no_license | -- if : ǿ ´ 쿡 ڵ带 ؾ .
-- ̸ Է¹ ̸ '' ̶ ̸
-- 'õ ڶ' . ٸ ̸ ̸
set serveroutput on
set verify off
accept name prompt '̸Է : '
declare
-- name varchar2(30);
name table_primary.name%type := '&name';
begin
if name='' then
dbms_output.put_line('õ ڶ ');
end if;
dbms_output.put_line(name||' ȳϼ... | true |
92fefb5e47f71e3167dc0a833417519f42788737 | SQL | abrahamendez89/prospectos.backend | /sqlv/documento_20211008.sql | UTF-8 | 469 | 3.109375 | 3 | [] | no_license | CREATE TABLE `prospectos`.`documento` (
`documento_id` INT NOT NULL AUTO_INCREMENT,
`prospecto_id` INT NOT NULL,
`documento_nombre_documento` VARCHAR(200) NOT NULL,
`documento_data_base64` BLOB NOT NULL,
PRIMARY KEY (`documento_id`),
INDEX `fk_prospecto_idx` (`prospecto_id` ASC) VISIBLE,
CONSTRAINT `fk_pr... | true |
a4e4a20010c1f758b660a3c3adc29bb6993b3a07 | SQL | NikzZz10/Prelim-project-and-practical-exam | /WebAppDev/mysql/webapp.sql | UTF-8 | 1,980 | 3.09375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jan 06, 2018 at 10:04 PM
-- 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 |
d8f80873038521b9627c3976c32fcf120ba1a4a0 | SQL | Ani-Gil/Database | /Study/SQL 첫걸음 (서적)/7장-복수의 테이블 다루기/예제 7-15_외부결합으로 상품코드 0009인 상품도 결과에 포함하기.sql | UTF-8 | 185 | 3 | 3 | [] | no_license | SELECT 상품3.상품명, 재고수.재고수
FROM 상품3 LEFT JOIN 재고수
ON 상품3.상품코드 = 재고수.상품코드
WHERE 상품3.상품분류 = '식료품'; | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.