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
0c55f7e160b7f3bc81f0d952b348c1368486e749
SQL
youstinus/volunteer
/utilities/Volunteer database model/Untitled (2).sql
UTF-8
1,407
3.46875
3
[ "MIT", "Intel" ]
permissive
CREATE TABLE `orders` ( `id` int, `user_id` int, `status` varchar(255), `created_at` varchar(255) ); CREATE TABLE `order_items` ( `order_id` int, `product_id` int, `quantity` int ); CREATE TABLE `orderMore` ( `id` int ); CREATE TABLE `products` ( `id` int, `name` varchar(255), `merchant_id` int, `pri...
true
db31912244721114dee345360c91774b89ecc50f
SQL
BahaStriker/EPIcommerce
/BD.sql
UTF-8
3,011
3.25
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : EPI Source Server Version : 50554 Source Host : 173.212.208.17:3306 Source Database : market Target Server Type : MYSQL Target Server Version : 50554 File Encoding : 65001 Date: 2017-03-12 07:01:18 */ SET FOREIGN_KEY_CHECKS=0; -- ---...
true
40b6045a3ae5fb277cb130b5c21242b0647b253e
SQL
wyycode/coupon
/src/main/resources/sql/createTable.sql
UTF-8
1,754
2.765625
3
[]
no_license
CREATE TABLE `coupon` ( `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id', `itemId` varchar(255) DEFAULT NULL COMMENT '商品id', `itemName` varchar(255) DEFAULT NULL COMMENT '商品名称', `pic` varchar(512) DEFAULT NULL COMMENT '商品主图', `detail` varchar(512) DEFAULT NULL COMMENT '商品详情页链接地址', `topClass` varchar(255) D...
true
70acd697e3dd2db9aa51edc5540cba01fa4eafd0
SQL
ahueteg/Datamart-MKT
/Lab SQL/INKA/inka.sql
ISO-8859-10
3,186
3.453125
3
[]
no_license
insert into [mkt].[sellout_inka] SELECT * FROM [mkt].[sellout_inka_2014] SELECT * into [mkt].[stock_inkax] FROM [mkt].[stock_inka] insert into [mkt].[stock_inka] SELECT * FROM [mkt].[stock_inka_2014] DROP TABLE [mkt].[sellout_inka_2014] DROP TABLE [mkt].[stock_inka_2014] SELECT * FROM [mkt].[sellout_inka] DR...
true
d790115bc83b9fcb00444e6c41b707d55d842940
SQL
FDI-IT/fd
/one_off/342-rename_ingredient_constraints.sql
UTF-8
957
3.171875
3
[]
no_license
ALTER TABLE "Raw Materials" RENAME TO "access_ingredient"; ALTER TABLE access_ingredient ADD CONSTRAINT "access_ingredient_ProductID_check" CHECK ("ProductID" >= 0); ALTER TABLE access_ingredient DROP CONSTRAINT "Raw Materials_ProductID_check"; ALTER TABLE access_ingredient ADD CONSTRAINT "access_ingredient_RawMateri...
true
6920b54378d02eb85c1938e993f322459ff1698f
SQL
manuelcasas12/ipm2122-server
/db/create_tables.sql
UTF-8
991
3.4375
3
[]
no_license
SET client_encoding = 'UTF8'; CREATE EXTENSION "uuid-ossp"; CREATE TABLE users ( uuid TEXT PRIMARY KEY DEFAULT uuid_generate_v4(), username text NOT NULL, password text NOT NULL, name text NOT NULL, surname text NOT NULL, email text NOT NULL, is_vaccinated boolean NOT NULL, phone text...
true
42f6d204667b42c8fa51dc4d6c7104aebc3c22b5
SQL
clemiblac/sql-challenge
/EmployeeSQL/Create_Tables_Scripts.sql
UTF-8
1,533
3.703125
4
[]
no_license
DROP TABLE IF EXISTS titles CASCADE; CREATE TABLE titles ( title_id varchar(10) NOT NULL PRIMARY KEY, title varchar(50) NOT NULL ); ------------------------------------------------------------------ DROP TABLE IF EXISTS employees CASCADE; CREATE TABLE employees ( emp_no int NOT NULL PRIMARY KEY, e...
true
c6bfbd96a848050c52e41f8e3a5ee586bd57770e
SQL
qwat/qwat-data-model
/value_lists/vl_pressurecontrol_type.sql
UTF-8
1,769
3.109375
3
[]
no_license
/* qWat - QGIS Water Module SQL file :: installation pressure control auxiliary tables */ /* CREATE */ CREATE TABLE qwat_vl.pressurecontrol_type () INHERITS ( qwat_vl.value_list_base); ALTER TABLE qwat_vl.pressurecontrol_type ADD CONSTRAINT vl_pressurecontrol_type_pk PRIMARY KEY (id); /* VALUES */ INSERT INTO qwat...
true
9692ba657c505b266b6c6f421c74001634b2db82
SQL
temistocle1998/samane-oauth2
/oauth_samane.sql
UTF-8
9,693
2.671875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.6.6deb5ubuntu0.5 -- https://www.phpmyadmin.net/ -- -- Client : localhost:3306 -- Généré le : Dim 06 Juin 2021 à 15:50 -- Version du serveur : 5.7.34-0ubuntu0.18.04.1 -- Version de PHP : 7.2.24-0ubuntu0.18.04.7 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /...
true
6817aea19895be871f66e9fe02bf4643e3b7f6ba
SQL
vubui237/intermediate-sql-queries-afternoon
/Practice Updating Rows.sql
UTF-8
600
2.640625
3
[]
no_license
--1. -- UPDATE Customer SET Fax = null WHERE Fax IS NOT null; --2. -- UPDATE Customer SET Company = "Self" WHERE Company IS null; --3. -- SELECT CustomerId FROM Customer WHERE FirstName ="Julia" AND LastName ="Barnett" --Find her ID and update by ID. -- UPDATE Customer SET LastName = "Thompson" WHERE CustomerId = 28;...
true
09b76bca975b2c0aa12c6f411436df629101b4b2
SQL
sakshamr278/Cars
/Lamborghini.sql
UTF-8
2,632
2.578125
3
[]
no_license
create database Lamborghini; use lamborghini create table cars(S_No int,Name_Of_Car varchar (35), Top_Speed varchar (20),0_100kph Varchar (12),Power varchar (30), bhp_weight varchar (32),Displacement varchar (25),Weight varchar (25)); alter table cars add Price varchar (20); insert into cars values (1,'Murcielago LP...
true
44a362a0f5f1b8868b358befaa4aa4f7768ddf92
SQL
John-Atha/Store-Database
/queriesCode/query14.sql
UTF-8
202
2.625
3
[]
no_license
-- epilegoume ta proionta me barcode = 15168, 22753 SELECT `P_Barcode`, `Start_date`, `O_Price`, `End_date` FROM `Older_Prices` WHERE `P_Barcode` = '15168' or `P_Barcode` = '22753' order by `P_Barcode`
true
ed77c983a9ab433ffb4a9e73d6fbe17f0705aac1
SQL
XanaNite/reagent-server
/migrations/010.do.create_recommendations.sql
UTF-8
212
2.75
3
[]
no_license
CREATE TABLE IF NOT EXISTS recommendations( id INTEGER PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY, name TEXT, comments TEXT NOT NULL, agent_id INTEGER REFERENCES agents(id) ON DELETE SET NULL );
true
a66f98cbad21e7c8fa46bde29eee720fe730e106
SQL
surikanda/exercise.sql_simple-queries
/part2/part2.sql
UTF-8
118
2.703125
3
[]
no_license
SELECT contactFirstname, contactLastName, city FROM customers WHERE country= "Germany" ORDER BY contactLastName ASC;
true
e64ec581ba360ba361e98da42e47fcd3ac680423
SQL
IvonneSoriano/ProyectoUDB
/ProyectWeb/src/java/sv/edu/udb/database/scheduled_events.sql
UTF-8
1,555
3.640625
4
[]
no_license
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ /** * Author: Rick * Created: Mar 26, 2020 */ SET SQL_SAFE_UPDATES = 0; # se necesita correr solo una vez, antes de ejecutar even...
true
1fff77282a5cab9066a97f1018a54fa8df66e462
SQL
Jilanfk/PWL
/laravel8_jilanfinian/perpustakaan.sql
UTF-8
5,623
3.046875
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 5.1.0 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Waktu pembuatan: 13 Jun 2021 pada 05.30 -- Versi server: 10.4.19-MariaDB -- Versi PHP: 8.0.6 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CH...
true
70a188f75db9ee6f4ff33f48ea12c6b4666e9a0a
SQL
PetraAbosi/Final_Exam
/mof.sql
UTF-8
3,007
3.28125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: Nov 18, 2020 at 10:35 AM -- Server version: 10.4.13-MariaDB -- PHP Version: 7.4.7 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIEN...
true
a7f0d63730561e3d9f4d5aae6eeccdac2c3181f8
SQL
AgentX-egy/four-cour-model
/Final DB/ag_project_transactionlog.sql
UTF-8
2,265
2.875
3
[]
no_license
-- MySQL dump 10.13 Distrib 8.0.26, for Win64 (x86_64) -- -- Host: localhost Database: ag_project -- ------------------------------------------------------ -- Server version 8.0.26 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESUL...
true
c4ed8f6079113f12bd6015a5f89f5ec9724af233
SQL
Nafanjia/Database_for_analytics
/RFM.sql
UTF-8
1,193
3.578125
4
[]
no_license
SELECT b.user_id, b.money, b.orders, b.last_order, b.R, b.F, b.M, CONCAT(b.R,b.F,b.M) RFM, CASE WHEN CONCAT(b.R,b.F,b.M) IN ('111','112','113') THEN 'Lost_New' WHEN CONCAT(b.R,b.F,b.M) IN ('121','122','123','131','132') THEN 'Lost_Regular' WHEN CONCAT(b.R,b.F,b.M) IN ('133') T...
true
e3f820603c3364f4df4635f2ebd7f2b7ea5385fd
SQL
Pengshuo510/Reseller-sales-analysis-based-on-AdventureWork2017
/AdventureWorksDB_Insert.sql
UTF-8
4,157
3.34375
3
[]
no_license
USE AdventureWorks2021 SET IDENTITY_INSERT dbo.ProductSubcategory OFF INSERT INTO dbo.ProductSubcategory( ProductSubcategoryID, Name ) SELECT ProductSubcategoryID , Name FROM AdventureWorks2017.Production.ProductSubcategory SET IDENTITY_INSERT dbo.ProductModel OFF INSERT INTO dbo.ProductModel( ProductModelID, ...
true
b21cd49d24e9f14248d4111771dc217501f41d23
SQL
kimumusan/nice-vote
/src/main/resources/com/nablarch/example/dto/OpinionAndAgreements.sql
UTF-8
385
3.84375
4
[]
no_license
FIND_OPINIONS= select TH.THEME_ID, TH.TITLE, OP.OPINION_ID, OP.DESCRIPTION, count(AG.AGREEMENT_ID) AGREEMENT_COUNT from THEME TH inner join OPINION OP on OP.THEME_ID = TH.THEME_ID left join AGREEMENT AG on AG.OPINION_ID = OP.OPINION_ID where TH.THEME_ID = :themeId group b...
true
f77f2c718cd7fbe942ea169b1c519e82223888fd
SQL
daviddominguez/springboot-cassandra-example
/src/main/resources/audit_with_tables.cql
UTF-8
5,966
3.5
4
[]
no_license
CREATE KEYSPACE IF NOT EXISTS audit WITH replication = { 'class':'SimpleStrategy', 'replication_factor':1 }; /** * NORTH API MESSAGES TABLES */ // Q1. Consulta de eventos por el interfaz norte en un rango de tiempo. CREATE TABLE IF NOT EXISTS audit.north_messages_by_interval ( interval bigint, id uuid, comp...
true
fdb7e1c358b4cea82d486809755db4111b870c9c
SQL
itechUnlimited/score-board
/resources/triggers.sql
UTF-8
1,341
3.5625
4
[]
no_license
// update score goals delimiter /// CREATE TRIGGER total_sum BEFORE INSERT ON score FOR EACH ROW BEGIN UPDATE team SET total = total + NEW.score_value WHERE id=NEW.team_id; END; /// alter table team add total_goals INT NOT NULL; /// // update championship goals delimiter /// CREATE TRIGGER total_goals BEFORE INSER...
true
a31ea028381092348b6c127475be8f1cc0f4d92b
SQL
btoztas/SIBD
/P2/function.sql
UTF-8
1,701
3.96875
4
[]
no_license
DELIMITER $$ DROP FUNCTION IF EXISTS checkRegion; CREATE FUNCTION checkRegion(Ax1 FLOAT(4,3), Ay1 FLOAT(4,3), Ax2 FLOAT(4,3), Ay2 FLOAT(4,3), Bx1 FLOAT(4,3), By1 FLOAT(4,3), Bx2 FLOAT(4,3), By2 FLOAT(4,3)) RETURNS BOOL BEGIN -- this block is just to guarantee that x2>x1 and y2>y1. that is necessarie for ...
true
375f2dc4340460281ca9dad22d385ce2848a9669
SQL
hankmander/nextjs-pwa-graphql-sql-boilerplate
/docs/database.ddl
UTF-8
465
2.734375
3
[ "ISC" ]
permissive
-- DDL generated by Postico 1.5.7 -- Not all database features are supported. Do not use for backup. -- Table Definition ---------------------------------------------- CREATE TABLE article ( id SERIAL PRIMARY KEY, title character varying(200), content text ); -- Indices ----------------------------------...
true
027c329d6f2e2f8a6cbd0279f0315e955431f004
SQL
l3acon/localquestapi
/sql/dbInitialization.sql
UTF-8
1,830
4.3125
4
[]
no_license
-- -- drop tables if they exist in the database -- these are dropped in FK > PK order -- DROP TABLE IF EXISTS userDistance; DROP TABLE IF EXISTS location; DROP TABLE IF EXISTS userGame; DROP TABLE IF EXISTS game; DROP TABLE IF EXISTS user; -- -- create tables -- these are created in PK > FK order -- CREATE TABLE use...
true
a20c9243406ebcadeec8409e916105a1976fcd81
SQL
handan2/spring-boot-sample
/spring-boot-demo/spring-boot-admin/src/main/resources/db/admin.sql
UTF-8
3,913
3.296875
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : 10.10.20.100 Source Server Version : 50721 Source Host : 125.69.73.254:33600 Source Database : admin Target Server Type : MYSQL Target Server Version : 50721 File Encoding : 65001 Date: 2019-01-17 18:01:00 */ SET FOREIGN_KEY_CHECKS=0;...
true
07f5feaec5abcf0a8d74191a062be278f0eeff19
SQL
almostcarol/MySQL
/22.10/Exemplo.sql
UTF-8
556
3.3125
3
[]
no_license
use db_acervo35; create table tb_usuario( id_usuario bigint auto_increment, nome varchar (255) not null, email varchar (255) not null, nascimento_data date, senha varchar (255) not null, primary key (id_usuario) ); select * from db_acervo35.tb_usuario; insert into tb_usuario (nome, usuario, nascimento_data...
true
2e7733dc81e42b3cb048bb9615f9ef424990d68a
SQL
talitagaldino/Banco-de-Dados-2019.2
/roteiro3-nathan-118110342.sql
UTF-8
4,138
3.75
4
[]
no_license
-- Banco de Dados 2019.2 - ROTEIRO 3 -- Professor: Cláudio Campelo -- Aluno: Nathan Fernandes CREATE TYPE estadoPB as ENUM('paraiba', 'bahia', 'alagoas', 'pernambuco', 'sergipe', 'ceara', 'rio grande do norte', 'piaui', 'maranhao'); CREATE TABLE farmacia ( id BIGINT UNIQUE PRIMARY KEY, nome TE...
true
b3da5fe7a8f7ba6c1c882e18c13d7c14b0c42ba7
SQL
derco19/blog-site
/harshblogs.sql
UTF-8
3,499
3.28125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.1.0 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jun 24, 2021 at 12:02 PM -- Server version: 10.4.19-MariaDB -- PHP Version: 8.0.6 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIEN...
true
cac4b5ad9930a3edbdf7eb2aa879955f7871ce7d
SQL
AdvancedDatabases/ZSBD-studies-course
/benchmark/test-sets/set1-geo/4.sql
UTF-8
527
4.09375
4
[]
no_license
-- number and count of different products in each country inventories SELECT COUNTR.COUNTRY_ID, PC.CATEGORY_NAME, SUM(I.QUANTITY) quantity, COUNT(P.PRODUCT_ID) diff_products FROM WAREHOUSES W JOIN LOCATIONS L on W.LOCATION_ID = L.LOCATION_ID JOIN COUNTRIES COUNTR on L.COUNTRY_ID = COUNTR.COUNTRY_ID JOIN INV...
true
37b33bc7273afc0419a5849c6e40ed5fa0ae8241
SQL
johnathancurtis/DoD-AutoRoute
/DoDARDB/User.sql
UTF-8
379
3.140625
3
[]
no_license
CREATE TABLE [User] ( DODID INT , [UIC] VARCHAR(10) , [Command Name] VARCHAR(80) , [AO] BIT , [EMAIL] VARCHAR (80) , [PHONE] VARCHAR(12) , [Rank] VARCHAR (10) , [First Name] VARCHAR (80) , [Middle Name] VARCHAR(3) , [Last Name] VARCHAR (80), PRIMARY KEY CLUSTERED (DODID ASC), CONSTRAINT [FK_USER_REQUEST_UIC] FOREIG...
true
3073e9d4433583832d1515ae0d2a3565a0c9cf0a
SQL
hongtao12310/mlcloud
/deploy/db/mlcloud.sql
UTF-8
1,596
3.65625
4
[]
no_license
drop database if exists mlcloud; create database mlcloud charset = utf8; use mlcloud; create table user ( id int NOT NULL AUTO_INCREMENT, username varchar(32), password varchar(40) NOT NULL, salt varchar(40) DEFAULT NULL, sys_admin tinyint(1) DEFAULT 0 NOT NULL, creation_time datetime NOT NULL, update_time dat...
true
eddc42e85752f6320ddd5762d6476c28fdf556c5
SQL
sircanist/clipper
/clipper-cli/src/test/scripts/v_takesCourse.sql
UTF-8
346
2.78125
3
[ "Apache-2.0" ]
permissive
DROP VIEW v_takesCourse CASCADE; CREATE OR REPLACE VIEW v_takesCourse AS SELECT innerRel.x2 AS att1, innerRel.x1 AS att2 FROM ( SELECT ora_0.b AS x1, ora_0.a AS x2 FROM object_role_assertion ora_0 WHERE ora_0.object_role=155 UNION SELECT ora_0.b AS x1, ora_0.a AS x2 FROM object_role_assertion ora_0 WHERE ora_0.obje...
true
6dbb09350ab62599444730c0d4fdcfa865d25540
SQL
giovanirguz/SistemaInventarios
/db/DbSchema.sql
UTF-8
489
2.765625
3
[]
no_license
if exists (select * from dbo.sysobjects where id = object_id(N'Clientes') and OBJECTPROPERTY(id, N'IsUserTable') = 1) drop table Clientes create table Clientes ( Id INT IDENTITY NOT NULL, NoControl INT null, Nombre NVARCHAR(255) null, ApellidoPaterno NVARCHAR(255) null, Ap...
true
fcc2e227e21b663397f547c64c27b7de188beac8
SQL
mahimavyas001/Basic-banking-system
/spark_bank.sql
UTF-8
1,240
3.484375
3
[]
no_license
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; CREATE TABLE `transaction` ( `sno` int(3) NOT NULL, `sender` text NOT NULL, `receiver` text NOT NULL, `balance` int(8) NOT NULL, `datetime` datetime NOT NULL DEFAULT current_timestamp() ) ENGINE=InnoDB DEFAULT ...
true
2aff7ba9de00a8b94519ab3a482e23a39a79bf01
SQL
simonaditia/SQL-Projects
/create-table.sql
UTF-8
250
2.9375
3
[]
no_license
CREATE DATABASE School; USE School; CREATE TABLE Student { student_id int PRIMARY KEY, full_name TEXT, birthday DATE, parent_name varchar(255), }; INSERT INTO Student('Github', '2017-12-31 23:59:59', 'Git'); SELECT * FROM Student;
true
7b8a81be4f2e1e9dcf5b932a798052b1b02577b6
SQL
leo-from-spb/demo-db
/Postgres/schema/create-Geo.sql
UTF-8
2,715
4
4
[]
no_license
set search_path to Geo, public; create table Country_ISO ( Iso_2 char(2) not null primary key, Iso_3 char(3) not null unique, Iso_Num smallint not null unique, Name varchar(48) not null, Name_Prefix varchar(26), Name_Suffix varchar(26), Name_Alias varchar(26), Global_Region_Code smalli...
true
31216da7ba2bcd16a3be7dcafca5726f042ba74c
SQL
Soliloquiess/SF_Record
/SF_PDF/0407/starwars_ex2.sql
UTF-8
2,005
3.265625
3
[]
no_license
-- 1. 전 스타워즈 시리즈의 상영년도, 에피소드이름, 배역, 출연배우 이름 -- 2. 에피소드 4에 출연한 배우는 모두 몇 명인지 구하는 쿼리 -- 3. 각 배우 별 출연횟수를 조회하는 쿼리 -- 4. 에피소드별 이름과 출연자 수 -- 5. 출연자수가 10명 이상인 에피소드의 이름과 출연자수 -- 6.제국의 역습에 등장하는 배우 이름 -- 7. '아미달라 여왕'이 등장했던 에피소드 id, 에피소드 이름과 상영연도 -- 8. 해리슨 포드가 등장했던 에피소드의 id와 에피소드 이름 -- 9. 각 에피소드의 id와 출연한 인...
true
e5498a9934682977590574373894376da7ff42c6
SQL
woodroof/babcom
/db/data/actions.sql
UTF-8
978
3.59375
4
[]
no_license
-- drop table data.actions; create table data.actions( id integer not null generated always as identity, code text not null, function text not null, default_params jsonb, constraint actions_pk primary key(id), constraint actions_unique_code unique(code) ); comment on column data.actions.function is 'Имя ф...
true
fa26f14bd99e34d23a64606ad04e800e3453b425
SQL
TrembitaUA/examples
/Oracle/5-USER_test-1_select.sql
UTF-8
941
2.984375
3
[]
no_license
set echo on set pagesize 0 embedded on set linesize 5000 ALTER SESSION SET NLS_NUMERIC_CHARACTERS=', '; ALTER SESSION SET NLS_DATE_FORMAT = 'DD.MM.YYYY'; COLUMN tab NEW_VALUE tab NOPRINT SELECT CHR(9) tab FROM DUAL; SET COLSEP ';' WITH xml AS ( SELECT uxp_client.UXP_CALL('getPersonInfoPy', CURSOR (SELECT 'personId' it...
true
7167b5f3ddfa6eae26a133b063c59b75632d2c9e
SQL
JPHebert32/sql-challenge
/EmployeeSQL/individual_queries/employee_info.sql
UTF-8
365
4.09375
4
[]
no_license
--List the following details of each employee: employee number, last name, first name, sex, and salary. DROP VIEW employee_info; CREATE VIEW employee_info AS SELECT e.emp_no, e.last_name, e.first_name, e.sex, Max(s.salary)AS "Salary" FROM employees e JOIN salaries s ON e.emp_no = s.emp_no GROUP BY e.emp_no ORDER B...
true
3d053865bee2be33377ce5d2df5b583791d799cb
SQL
vietplayfuri/dnt-backend
/dnt.database/migration/schema/V1.9/V1.9.8__Create_South_Africa_SMO.sql
UTF-8
512
2.703125
3
[]
no_license
INSERT INTO smo(id, region_id, "key", "value") VALUES (uuid_generate_v4(), (SELECT id FROM region WHERE "name" = 'IMEA'), 'SOUTHERN AFRICA CLUSTER', 'SOUTHERN AFRICA CLUSTER'); UPDATE smo SET "key" = 'EAST WEST WHITESPACE AFRICA', "value" = 'EAST WEST WHITESPACE AFRICA' WHERE "key" = 'SOUTH AFRICA & ...
true
07554a3fdc91f7cf6a67be53426302e255663309
SQL
mineiro25/bd
/tp/relacional/FUNCTIONS_GELATUM.sql
UTF-8
7,655
3.671875
4
[]
no_license
SET SQL_SAFE_UPDATES =0; SET GLOBAL log_bin_trust_function_creators = 1; -- vai buscar o extra pretendido (caso o deseje) DELIMITER $$ CREATE FUNCTION Gelatum.escolheExtra(nomeE VARCHAR(30)) RETURNS VARCHAR(50) NOT DETERMINISTIC BEGIN DECLARE resultado VARCHAR(50); SELECT nome_extra INTO resultado ...
true
f850b5261fe6c9601b1659bd5c6501ab70128554
SQL
solangemarcillo/discurso-del-universo
/basededatoscompleta.sql
UTF-8
19,097
3.59375
4
[]
no_license
/*==============================================================*/ /* DBMS name: PostgreSQL 8 */ /* Created on: 28/06/2021 23:44:38 */ /*==============================================================*/ /*=================================================...
true
065b4962675c5b91e204a744cd0eee26d7ba7ff6
SQL
vsolv/BigFin
/Bigflow/DB/SPS/ATMA/sp_Atma_Pending_To_Approval_Set.sql
UTF-8
41,693
2.859375
3
[]
no_license
CREATE PROCEDURE `sp_Atma_Pending_To_Approval_Set`(in li_Action varchar(30), in lj_filter json,in lj_classification json,out Message varchar(1000)) sp_Atma_Pending_To_Approval_Set:BEGIN#####MOVE TO MST TABLE SP declare Query_Insert varchar(10000); Declare countRow varchar(6000); declare Query_Update varchar(10000); d...
true
60eba113e1a8de7553668903c213f9f16d123002
SQL
argentinaluiz/HeimdallOAuth2DoctrineAcl
/Dump20190121/Heimdall_OAuth2_3_Email_User.sql
UTF-8
2,692
2.859375
3
[]
no_license
CREATE DATABASE IF NOT EXISTS `Heimdall_OAuth2_3` /*!40100 DEFAULT CHARACTER SET utf8mb4 */; USE `Heimdall_OAuth2_3`; -- MySQL dump 10.13 Distrib 8.0.13, for Win64 (x86_64) -- -- Host: 127.0.0.1 Database: Heimdall_OAuth2_3 -- ------------------------------------------------------ -- Server version 5.5.5-10.1...
true
33ad13f2c64e8d2946eac319730628e3462203b4
SQL
ProgRB/SalProject
/AddRetention/Queries/SelectSalaryPayNote.sql
UTF-8
941
3.671875
4
[]
no_license
select a1 from ( select code_subdiv||per_num||sum_sal||p1||p2||p3||fio||p4||sign_comb a1 from (select lpad(code_subdiv,4,'0') code_subdiv, lpad(per_num, 6, '0') per_num, to_char(NVL(sum(sum_sal),0)*100, 'FM000000000000') sum_sal, '000000000000' p1, '000000000000' p2, '000000000000' p3, ...
true
c0fe56651e1b848f8544066a7530cd3446f827cc
SQL
parthisri744/SKP_Hospital
/vendor/SQL/Hospital.sql
UTF-8
10,115
3
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: Oct 06, 2021 at 02:26 PM -- Server version: 10.4.13-MariaDB -- PHP Version: 7.4.8 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIEN...
true
22a40e161b885f9f203b7f294f368a5186cd1d02
SQL
cutting-dsa/mumsched
/src/main/resources/db/migration/V1__init.sql
UTF-8
8,516
3.28125
3
[]
no_license
CREATE TABLE IF NOT EXISTS app_user ( id BIGINT AUTO_INCREMENT PRIMARY KEY, active INT NOT NULL, email VARCHAR(255) NOT NULL, first_name VARCHAR(255) NOT NULL, last_name VARCHAR(255) NOT NULL, ...
true
d0d8e79c7a25c94cf80fdcb1e287747008091aac
SQL
misterx/time-management-app
/docker/db/src/security/privileges.sql
UTF-8
1,959
3.53125
4
[]
no_license
-- Разрешаем использование схемы grant usage on schema api,auth to time_anon; -- Разрешаем логинится для анонимуса grant execute on function api.login(text,text) to time_anon; -- Отладочная инфа grant select on table api.debug to time_anon; -- Разрешаем выборку проджектов для юзера grant select on table api.projects ...
true
0d676a75bc1e7d04b3d7d70a8368ca50d1855442
SQL
Jin-wei/chumuu
/db/upgrades/21.up.sql
UTF-8
617
2.53125
3
[]
no_license
/** * Created by ibm on 14-8-11. */ CREATE TABLE `feedback` ( `id` bigint(11) NOT NULL AUTO_INCREMENT, `cust_id` bigint(11) DEFAULT NULL, `contact_email` varchar(200) DEFAULT NULL, `contact_phone` varchar(20) DEFAULT NULL, `content` varchar(1000) NOT NULL, `level` int(1) NOT NULL DEFAULT '0', `active` t...
true
46d18416e9aa06baeb0e40ef57594d7ebe962f38
SQL
xitrii/test
/2/db.sql
UTF-8
2,325
3.46875
3
[]
no_license
-- MySQL Script generated by MySQL Workbench -- 10/01/15 02:34:30 -- Model: New Model Version: 1.0 -- MySQL Workbench Forward Engineering SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0; SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0; SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITION...
true
b0a5805e60638a9d41adbe1274d052acb6425f81
SQL
HimalPerera/Store-Transactions-Management-System
/SQL Dump/store_transactions_database.sql
UTF-8
2,619
3.734375
4
[]
no_license
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8 */; CREATE DATABASE IF NOT E...
true
9d7585d73cd53719d8cbaa0268063066efa46914
SQL
saschenbeck/database-exercises
/delete_exercises.sql
UTF-8
843
2.875
3
[]
no_license
USE codeup_test_db; -- SELECT 'Albums released after 1991' AS 'INFO'; -- SELECT name, release_date -- FROM albums -- WHERE release_date > 1991; -- -- DELETE FROM albums -- WHERE release_date > 1991; -- SELECT 'Albums released after 1991' AS 'INFO'; -- SELECT name, release_date -- FROM albums -- WHERE release_date > 1...
true
9f8cf500f915b1e9c9a10fe2ee4309a399dde261
SQL
masa0422/shikiriya_linebot
/_sql/createtable.sql
UTF-8
2,339
3.125
3
[]
no_license
CREATE TABLE IF NOT EXISTS `lba_users` ( `id` bigint(20) unsigned NOT NULL, `timestamp` text DEFAULT NULL, `userid` varchar(255) DEFAULT NULL, `keyword` varchar(200) DEFAULT NULL, `displayName` varchar(200) DEFAULT NULL, `pictureUrl` text DEFAULT NULL, `statusMessage` text DEFAULT NULL, `created_at` dat...
true
33d51fb9f300d66c1546da1fbdc25d8477c53a97
SQL
YaroslavTir/msh122
/metro-core/target/classes/db/migration/V00035__create_plan_settings.sql
UTF-8
387
3.203125
3
[]
no_license
create sequence station_plan_settings_seq start 1 increment by 1; CREATE TABLE if not exists station_plan_settings ( id bigint NOT NULL DEFAULT nextval('station_plan_settings_seq') primary key, rus_url text, eng_url text, owner_type text NOT NULL, owner_id bigint NOT NULL ); create unique index i_station_p...
true
77354ec02dca964e1a085b6fdb3912985de0459b
SQL
ahbaid/learn
/oracle/recycle_pool_candidates.sql
UTF-8
323
2.96875
3
[]
no_license
Col object_name format a30 Col object_type format a20 SELECT o.owner, object_name, object_type, COUNT(*) buffers FROM SYS.x$bh, dba_objects o WHERE (tch = 1 OR (tch = 0 AND lru_flag < 8)) AND obj = o. object_id AND o.owner not in ('SYSTEM','SYS') GROUP BY o.owner, object_name, object_type ORDER BY buffer...
true
64a7838c48e97ce3cf05d54d8f032c8bc6391395
SQL
averaart/INFPRG03-Herkansing
/src/data/infprg03.sql
UTF-8
9,464
3.015625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 3.4.5 -- http://www.phpmyadmin.net -- -- Machine: localhost -- Genereertijd: 16 jan 2012 om 21:54 -- Serverversie: 5.5.16 -- PHP-Versie: 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 */; /*!40101 S...
true
509e4b703eba56330deab2edafe4eedf1941b28d
SQL
jeisux92/store-api
/Store.SqlScripts/i1/CreateSaleTable.sql
UTF-8
388
3.609375
4
[]
no_license
USE Store IF NOT EXISTS ( SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'dbo.Sale') ) BEGIN CREATE TABLE dbo.Sale( Id INT IDENTITY(1,1) NOT NULL PRIMARY KEY, CustomerId BIGINT NOT NULL, Total BIGINT NOT NULL, CreatedOn DATETIME DEFAULT GETDATE(), CONSTRAINT FK_SalesCustomer FOREI...
true
db26f1cbaa9200573a239ef3e7be74abc6ff3f17
SQL
cristidrincu/gamersmarket
/src/main/resources/db/migrations/V4.1__AddHardwareItemIdFKToMouse.sql
UTF-8
214
3
3
[]
no_license
ALTER TABLE gamers_market.hw_item_mouse ADD COLUMN hw_item_id INTEGER; ALTER TABLE gamers_market.hw_item_mouse ADD CONSTRAINT fk_hardware_item_id FOREIGN KEY(hw_item_id) REFERENCES gamers_market.hardware_item(id);
true
7d5c716ffcc0980c5aea913b8f5e06e2ec376705
SQL
dhoer/flyway
/flyway-core/src/test/resources/org/flywaydb/core/internal/dbsupport/saphana/procedures/procedure.sql
UTF-8
1,781
2.859375
3
[ "Apache-2.0" ]
permissive
-- -- Copyright 2010-2017 Boxfuse GmbH -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or ...
true
e3f74249b6a597fdac78fa276e619ed1a2e5e133
SQL
duke326/SWE-241
/SWE-243/ex_solutions/ch12/ex12-01.sql
UTF-8
304
3.296875
3
[]
no_license
CREATE OR REPLACE VIEW open_items AS SELECT vendor_name, invoice_number, invoice_total, invoice_total - payment_total - credit_total AS balance_due FROM vendors JOIN invoices ON vendors.vendor_id = invoices.vendor_id WHERE invoice_total - payment_total - credit_total > 0 ORDER BY vendor_name
true
c43b1a4063bef4925ad497e160f44334d6528af8
SQL
radtek/abs3
/sql/mmfo/bars/Trigger/tiu_zp_upd.sql
UTF-8
2,182
3.09375
3
[]
no_license
create or replace trigger tiu_zp_upd after insert or update on bars.zp_deals for each row declare l_idupd zp_deals_update.idupd%type; l_doneby zp_deals_update.upd_user_fio%type; l_doneby_id zp_deals_update.upd_user_id%type; begin l_idupd := bars_sqnc.get_nextval ('s_zp_deals_u...
true
e8e03c0d395c50094056ad0217d43d560840d87f
SQL
VenelinBakalov/javaAdvanced
/Databases Basics/Exam-Preparation-I/18_update_trigger_WORKING.sql
UTF-8
638
3.90625
4
[]
no_license
DELIMITER $$ CREATE TRIGGER tr_update_flight_status BEFORE UPDATE ON `flights` FOR EACH ROW BEGIN IF old.`status` NOT IN ('Cancelled', 'Arrived') AND new.`status` = 'Arrived' THEN INSERT INTO `arrived_flights` (`flight_id`, `arrival_time`, `origin`, `destination`, `passengers`) VALUES (old.flight_id, new.a...
true
deaf71030a481d1cc282c7a834f5dc6c43544eab
SQL
musicq/Koala
/_sql/secret.sql
UTF-8
1,249
3.265625
3
[]
no_license
DROP DATABASE IF EXISTS secret; CREATE DATABASE IF NOT EXISTS secret; use secret; create table register ( user_id INT UNSIGNED AUTO_INCREMENT NOT NULL, email CHAR(100) NOT NULL, password CHAR(40) NOT NULL, join_date DATETIME NOT NULL, PRIMARY KEY (user_id, email) ) DEFAULT CHARSET=utf8; create table user_i...
true
90f22cd62544fbf588c36768861650c0aa2bc77f
SQL
Doomy7/phpprj
/prj/school.sql
UTF-8
10,859
2.734375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.9.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Feb 23, 2020 at 07:35 PM -- Server version: 10.4.11-MariaDB -- PHP Version: 7.4.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
true
9db76678d0abff463c8be4cae960c630898e4b9b
SQL
BenjaminS01/test1
/WineProject/src/database/implementation_skript.sql
UTF-8
7,106
3.546875
4
[]
no_license
DROP DATABASE IF EXISTS SKWD; CREATE DATABASE IF NOT EXISTS SKWD; USE SKWD; -- DROP TABLE IF EXISTS Address; CREATE TABLE IF NOT EXISTS Address( id int NOT NULL AUTO_INCREMENT, country varchar(50) NOT NULL, city varchar(50) NOT NULL, zip varchar(15) NOT NULL, street varchar(50) NOT N...
true
03d47cf5fdd05729dd16e297bdb8e7f3780e1836
SQL
AlanoudBinSalamah/lab-w05d03-express-dictionary
/db/seed.sql
UTF-8
2,269
3.609375
4
[]
no_license
DROP DATABASE IF EXISTS express_terms; CREATE DATABASE express_terms; \c express_terms CREATE TABLE terms( id serial primary key, name varchar, definition text ); INSERT INTO terms(name, definition) VALUES ('server','a server is a computer that serves websites or data to a "client"'), ('module','a module...
true
f6eb3c348d781501d4eb04e21ce5a2a36329f55d
SQL
silverdiva/cs313-new-node
/SQL/db-v2.sql
UTF-8
3,450
4.125
4
[ "MIT" ]
permissive
/* heroku postgress db name = postgresql-metric-65706 heroku cloud app name = shielded-reef-62106 use this command to login to heroku db in shielded-reef-62106 cloud app: heroku pg:psql postgresql-metric-65706 after logging in you can run sql at cmd prompt to create , selecte, update db tables shielded-reef-62106::DA...
true
81e749c4b11826e357c678b1a863df893246016d
SQL
rgiordano66/InfoButtons
/DeploymentPackage/dbScripts/valueset_and_log.sql
UTF-8
1,748
2.890625
3
[ "Apache-2.0" ]
permissive
CREATE DATABASE IF NOT EXISTS `valueset_and_log` /*!40100 DEFAULT CHARACTER SET latin1 */; USE `valueset_and_log`; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!4...
true
b2e10f7b2d38849c7921722d22d9ffa53a25782d
SQL
malianggithub/works
/works/ruihua/file/全量脚本/全量sql脚本/个人客户信息表1.sql
UTF-8
3,282
3.046875
3
[]
no_license
select DISTINCT '${data_date}' DIS_DATA_DATE, insuredno AS KHBH, -- 客户编号 name AS XM, -- 姓名 (case when sex='1' then '女性' when sex='0' then '男性' else '未说明的性别' end ) AS XB, -- 性别 birthday AS CSRQ, -- 出生日期 (select code from ldcode where codetype='idtype' and code=a.idtype) AS ZJLX, -- 证件类型 idno AS ZJHM, ...
true
bec98c23047f818d933952d226d85ff60e8a7245
SQL
AndreiBV86/temp_converter
/SQLite3/sql_basics.sql
UTF-8
1,475
3.609375
4
[]
no_license
--CREATE TABLE students ( -- -- first_name TEXT, -- last_name TEXT, -- age INTEGER -- --); -- --CREATE TABLE employees ( -- -- first_name TEXT, -- last_name TEXT, -- age INTEGER -- --); -- --SELECT * FROM students; INSERT INTO employees (first_name, last_name, age) VALUES ("Ivan", "Ivanov", 25); INSE...
true
f6bddad6798608b410cb07750602fc5ca4877bc4
SQL
randy-chen/uocis322
/sql/create_tables.sql
UTF-8
2,169
4.21875
4
[]
no_license
/* Since there aren't that many roles, they can be easilty kept track of as part of the users table. also makes role selection when creating a new user easier to implement. */ /* Added a numeric primary key as usernames can have a mix of letters and numbers, so having them as primary keys would make keeping trac...
true
5039d3bf12b5485b9d81f9ad7c5219078a0bece1
SQL
Orathai18/project_1
/guestbook.sql
UTF-8
799
3.078125
3
[ "MIT" ]
permissive
-- -- โครงสร้างตาราง `guestbook` -- CREATE TABLE `guestbook` ( `g_id` int(6) NOT NULL auto_increment, `g_name` varchar(50) NOT NULL, `g_email` varchar(50) NOT NULL, `g_message` text NOT NULL, `g_date` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, PRIMARY KEY (`g_id`) ) ENGINE...
true
2cfee3733c4689bd2962e1f14f7075955b782425
SQL
lissette2019/inventarioRepo
/bd_crud.sql
UTF-8
1,691
2.890625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 3.5.1 -- http://www.phpmyadmin.net -- -- Servidor: localhost -- Tiempo de generación: 22-02-2021 a las 02:11:40 -- Versión del servidor: 5.5.24-log -- Versión de PHP: 5.4.3 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARA...
true
71cd554e60d8d2914c9b481288fc2329e9e04498
SQL
KongouFer/6_semestre
/basesDatos/laboratorio/practicas/7/previo/s-00-asignaturas-elimina-usuario.sql
UTF-8
480
3.21875
3
[ "MIT" ]
permissive
--@Autor: Alfonso Murrieta Villegas --@Fecha creación: 19/04/2020 --@Descripción: Elimina al usuario sga_p07_previo en caso de existir. set serveroutput on declare v_count number(1,0); begin select count(*) into v_count from dba_users where username ='AMV_P07_PREVIO'; if v_count > 0 then execute immediate 'dr...
true
10f7f31d95607c00d6f1a46f6be769e71b7d6132
SQL
xy63237777/ttms-master
/movies-manage-system/TTMSSQL/movies_Seat.sql
UTF-8
623
2.796875
3
[]
no_license
create table movies_Seat( ID int not null comment '分片算法规则', movieSeat_Id bigint not null primary key auto_increment comment '座位的自增主键', movieSeat_HallId bigint not null comment '座位关联的影厅', movieSeat_IsBuy int not null comment '座位是否购买使用位运算 每一位代表一场演出计划的购买状态', movieSeat_IsOk int not null comment '电影是否为好的...
true
023cb66a614444df5275e633f22ebf73bd29a620
SQL
santhoshmathavan/Payoda_Learning
/Day-1/Assignment2.sql
UTF-8
659
4.25
4
[]
no_license
SELECT customer_id,order_status FROM orders WHERE order_id=1; CREATE INDEX idx ON orders(order_id,store_id); drop index idx on orders; Explain SELECT * FROM orders where order_id=1 and store_id=1; select P.product_name,B.brand_name from brands B inner join products P on P.brand_id = B.brand_id and B.brand_name='Nik...
true
979b596ad432f13050862542af7c9655b4f003e1
SQL
appnewtechs/indicadores_10_03_2017
/sql/Script teste de chamadas e evento.sql
UTF-8
954
2.75
3
[]
no_license
/* call somarTop5Dia(); call somarTop5Mes(); call somarTop5Ano(); call somarIndicadores(); */ select * from top5GruposMes; select * from top5ProdutosMes; select * from top5VendedorMes; select * from top5GruposAno; select * from top5ProdutosAno; select * from top5VendedorAno; select * from top5GruposDia; select * fro...
true
700496f79bc81d108e4bc8d82fa2e511a2c693e2
SQL
Kenna-D/Personal-Project
/db/orders/delete_order.sql
UTF-8
213
2.90625
3
[]
no_license
DELETE FROM love_your_shelf_ordered_products WHERE ordered_products_id = $1; SELECT * FROM love_your_shelf_ordered_products op JOIN love_your_shelf_products p on p.product_id = op.product_id WHERE op.user_id = $2;
true
33b27afcd9688611910bf19b8f88bcc60476da78
SQL
cevian/timescaledb
/test/sql/c_unit_tests.sql
UTF-8
596
2.59375
3
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference", "PostgreSQL", "LicenseRef-scancode-free-unknown" ]
permissive
-- This file and its contents are licensed under the Apache License 2.0. -- Please see the included NOTICE for copyright information and -- LICENSE-APACHE for a copy of the license. \c :TEST_DBNAME :ROLE_SUPERUSER CREATE OR REPLACE FUNCTION ts_test_time_to_internal_conversion() RETURNS VOID AS :MODULE_PATHNAME LANGUAG...
true
11b04bb162dd8763ef0f071a7fdde4f4625e4a8e
SQL
jongvin/werp
/werp/erpw/general/t_web/개발자공유풀/khs_query_test.sql
UHC
111,881
3.15625
3
[]
no_license
select max(t1.LAST_DDL_TIME) From t1 ,t3 where t1.owner = t3.owner and t1.object_name = t3.table_name / select max(t1.LAST_DDL_TIME) From t1 where exists ( select Null from t3 where t1.owner = t3.owner and t1.object_name = t3.table_name and rownum < 2 ) / select max(t1.LAST_DDL_TIME) From t1 where exists...
true
8774afff703b2189eab3b6569ffab6b650e6db42
SQL
FritzAxel/java-bootcamp-2018
/Topic4/Exercise-2.sql
UTF-8
1,213
2.703125
3
[ "Apache-2.0" ]
permissive
INSERT INTO `teacher` (first_name, last_name, date_of_birth) values ('Gonzalo', 'Rocha', 20/08/1985), ('Axel' , 'Fritz', 26/08/1995), ('Matias' , 'Massaccesi', 20/04/1996); INSERT INTO course (name, teacher_id, hours_by_week) values ('Maths', 4, 4), ('Chemistry', 5, 4), ('Physics', 6, 8); INSERT INTO student (fir...
true
e1e15c0263e650c28385d5f65932fce551fc79fc
SQL
tomOsuch/kodilla-sql
/Index.sql
UTF-8
215
3.15625
3
[]
no_license
EXPLAIN SELECT * FROM READERS WHERE FIRSTNAME = 'John'; CREATE INDEX READERSNAME ON READERS (FIRSTNAME, LASTNAME); CREATE INDEX BOOKSTITLE ON BOOKS (TITLE); EXPLAIN SELECT * FROM READERS WHERE FIRSTNAME = 'John';
true
0e59ea8bf5fa37c74d4bbbf2df74a9bdafe76817
SQL
fandashtic/arc_chennai
/Sivabalan-SQL/SQL_STORED_PROCEDURE/sp_list_ForeCast_DocLU.sql
UTF-8
475
3.203125
3
[]
no_license
CREATE Procedure sp_list_ForeCast_DocLU(@FromDoc int, @ToDoc int) As Select Forecast_Abstract.DocSerial, Forecast_Abstract.DocPrefix + Cast(Forecast_Abstract.DocumentID as nvarchar), Vendors.Vendor_Name, Forecast_Abstract.VendorID, Forecast_Abstract.DocumentDate From Forecast_Abstract, Vendors Where Forecast_Abst...
true
61d702d5747814771e9d0d114cfce44815618124
SQL
mohamedTidda/PFEdocs
/source code folder/pfe_db.sql
UTF-8
11,724
3.15625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.8.3 -- https://www.phpmyadmin.net/ -- -- Hôte : 127.0.0.1 -- Généré le : mar. 26 mars 2019 à 12:07 -- Version du serveur : 10.1.37-MariaDB -- Version de PHP : 7.1.24 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!4010...
true
ea7baf7eb0d78bc603be563cf06561c77e2a8add
SQL
nadineRoldao/amigo-secreto-app
/scripts_banco/script_amigoSecreto_DDL.sql
UTF-8
1,831
3.765625
4
[]
no_license
-- drop database amigo_secreto_app; -- create database amigo_secreto_app; use amigo_secreto_app; drop table if exists grupo_amigo; drop table if exists grupo_postagem; drop table if exists grupo; drop table if exists amigo; create table amigo ( id int not null auto_increment primary key, nome ...
true
96b6506e56ac62137ef624de12153bace8ae7db4
SQL
everthis/leetcode-js
/619-biggest-single-number.sql
UTF-8
155
2.953125
3
[ "MIT" ]
permissive
# Write your MySQL query statement below select( select num from my_numbers group by num having count(*) = 1 order by num desc limit 1 ) as num;
true
afdaffb45093631141da77995c4d72b849b4c25e
SQL
IlyassBoussataha/PYKA_V2
/src/main/resources/PYKA.sql
UTF-8
3,902
3.390625
3
[]
no_license
CREATE TABLE profil( id INTEGER NOT NULL AUTO_INCREMENT, civilite VARCHAR(5) COLLATE utf8_unicode_ci NOT NULL, nom VARCHAR(30) COLLATE utf8_unicode_ci NOT NULL, prenom VARCHAR(30) COLLATE utf8_unicode_ci NOT NULL, datedenaissance DATE NULL, adresse VARCHAR(100) COLLATE utf8_unicode_ci NOT NULL, codepostal...
true
3557f5fd886cbc422936aeaf4efa8bedd2f29b3f
SQL
JazzHandsCMDB/jazzhands
/database/pkg/oracle/port_support_body.sql
UTF-8
5,109
2.859375
3
[]
no_license
-- Copyright (c) 2005-2010, Vonage Holdings Corp. -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without -- modification, are permitted provided that the following conditions are met: -- * Redistributions of source code must retain the above copyright -- notice, this ...
true
47ed9029c48202b9f3caa7f65d8bf19fec02da9b
SQL
Antonio1491/salta
/sql/tipo_credenciales.sql
UTF-8
1,295
2.9375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.0.4 -- http://www.phpmyadmin.net -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 18-04-2019 a las 20:41:41 -- Versión del servidor: 5.5.32 -- Versión de PHP: 7.0.32 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARAC...
true
018799bf6c28abec7e8126fd8d3c9e55ea0adf7d
SQL
ludoaubert/linkedboxdraw
/SelectMetaData_SQLServer.sql
UTF-8
3,922
4.34375
4
[ "Apache-2.0" ]
permissive
WITH cte_fk AS ( -- stay away from INFORMATION_SCHEMA on SQL Server (Aaron Bertrand) SELECT obj.name AS FK_NAME, sch.name AS [schema_name], tab1.name AS [table], col1.name AS [column], tab2.name AS [referenced_table], col2.name AS [referenced_column] FROM sys.foreign_key_columns fkc INNER JOIN ...
true
4cc7613f9cb18d34faf7e947648087f01e59ceff
SQL
Joaquim09Castro/modulo2_queries-resilia
/Scripts/Montadoras/Vitorias-Construtoras.sql
UTF-8
265
3.75
4
[]
no_license
SELECT c.name 'Constructor', SUM(cs.wins) 'Win Count' FROM `constructors` c INNER JOIN `constructorStandings` cs ON c.constructorId = cs.constructorId GROUP BY 1 HAVING `Win Count` > 0 UNION SELECT 'Others', 0 ORDER BY 2 DESC;
true
f03155ded8d6c2b6beb63df1e5b18706685934e2
SQL
kunoffeduard/Food-Bank
/datasets/sample.sql
UTF-8
1,315
2.5625
3
[]
no_license
BEGIN TRANSACTION; CREATE TABLE "Account" ( id INTEGER NOT NULL, "Name" VARCHAR(255), "Description" VARCHAR(255), "BillingStreet" VARCHAR(255), "BillingCity" VARCHAR(255), "BillingState" VARCHAR(255), "BillingPostalCode" VARCHAR(255), "BillingCountry" VARCHAR(255), "ShippingStreet" VARCHAR(255), "Shi...
true
98e0d31f5f009bfb170203d54324d7c33dc5dd20
SQL
jericopingul/SQL
/Stanford-SQL/Movie_Rating_Modification/3.sql
UTF-8
244
3.390625
3
[]
no_license
/* For all movies that have an average rating of 4 stars or higher, add 25 to the release year. (Update the existing tuples; don't insert new tuples.) */ update Movie set year = year + 25 where mID in (select mID from Rating where stars > 4)
true
cb324c44c872fe742495f91a2fb4da169187a468
SQL
coa205/postZip_finder
/Scripts/Script.sql
UTF-8
7,737
3.0625
3
[]
no_license
create table if not exists post ( zipcode char(5) null, sido varchar(20) null, sigungu varchar(20) null, doro varchar(80) null, building1 int(5) null, building2 int(5) null ); delete from post; LOAD data LOCAL INFILE 'D:/workspace_mybatis/PostZip_finder/DataFiles/강원도.txt' INTO table post c...
true
62644975d175c8d2fa9ee7aa95df6031f59381c3
SQL
ddfs/odoo
/scripts/unbalanced-journal-entriy.sql
UTF-8
430
3.6875
4
[]
no_license
/* filters unbalanced journal entries in account_move and account_move_line */ SELECT t.*, abs(t.total_debit - t.total_credit) as total_diff FROM ( SELECT am.id, (SELECT sum(aml.debit) as total_debit FROM account_move_line AS aml WHERE aml.move_id = am.id), (SELECT sum(aml.credit) as total_credit FROM account_move_l...
true
ea57242d3c60ec780a0a84279f54216f84fbde8a
SQL
HomarDavila/Enrollment2
/EnrollmentDB/ExportAses/Tables/ProcessHeader.sql
UTF-8
669
2.671875
3
[]
no_license
CREATE TABLE [ExportAses].[ProcessHeader] ( [ID] INT IDENTITY (1, 1) NOT NULL, [FileName] NVARCHAR (256) NULL, [ProcessType] NVARCHAR (100) NOT NULL, [StartTime] DATETIME NULL, [EndTime] DATETIME NULL, [CreatedBy] VARCHAR (50) NOT NULL, [CreatedO...
true
77c3704bbd5d58744100db77ac37c0287c8cd3e4
SQL
TBoris/gorynych
/sql/transport.sql
UTF-8
1,783
4.46875
4
[]
no_license
-- Aggregate Transport ----------------------------------------- CREATE TABLE TRANSPORT_TYPE( ID SERIAL PRIMARY KEY , TRANSPORT_TYPE TEXT UNIQUE NOT NULL ); INSERT INTO TRANSPORT_TYPE(TRANSPORT_TYPE) VALUES ('bus'), ('car'), ('motorcycle'), ('helicopter'); CREATE TABLE TRANSPORT( ID BIGSERIAL PRIMARY KEY , TR...
true