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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
aa8aa7a45dba505a4582f322b4ed0031a92a2449 | SQL | dementiahackers/attentif | /database/migrate.sql | UTF-8 | 6,242 | 3.9375 | 4 | [
"MIT"
] | permissive | DROP DATABASE IF EXISTS attentif;
CREATE DATABASE attentif;
USE attentif;
CREATE TABLE users(
id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
facebook_id VARCHAR(30) NOT NULL UNIQUE,
token TEXT NOT NULL,
name VARCHAR(255) NOT NULL,
INDEX(facebook_id)
);
CREATE TABLE entries(
id INT UNSIGNED NOT NUL... | true |
8a03afb9d69078f75cd582c37737f593bdfd498a | SQL | Kniftosoft/mesopotamia | /Mesoptamia_DB_2014-03-24.sql | UTF-8 | 14,366 | 2.9375 | 3 | [] | no_license | CREATE DATABASE IF NOT EXISTS `euphratis` /*!40100 DEFAULT CHARACTER SET latin1 */;
USE `euphratis`;
-- MySQL dump 10.13 Distrib 5.6.13, for Win32 (x86)
--
-- Host: localhost Database: euphratis
-- ------------------------------------------------------
-- Server version 5.6.16
/*!40101 SET @OLD_CHARACTER_... | true |
3c794c0e32a4e6efb5ec22f1e8f77f5624066519 | SQL | laurajinks/helo | /db/get_posts.sql | UTF-8 | 88 | 2.625 | 3 | [] | no_license | SELECT * FROM posts
LEFT JOIN users ON users.id = posts.user_id
WHERE posts.user_id = $1 | true |
60cc188a15ef745290f21b435a2cca8d35b04bd4 | SQL | VijayMVC/JCC-Data-Warehouse | /SQLDB/dbo/Views/AA_SYS_LANGUAGE_TEXT_HEADER_VIEW.sql | UTF-8 | 675 | 3.078125 | 3 | [] | no_license | create view AA_SYS_LANGUAGE_TEXT_HEADER_VIEW
/*
** Returns a table to be used specifically with AA_SYS_LANGUAGE_TEXT_HEADER_LIST_S
** Written: 05/09/05 NC
** Last Amended: 10/10/05 SR
**
*/
as
select
max(T.LANGUAGE_LABEL_TEXT_PRIMARY) as [PRIMARY]
, max(LK.LANGUAGE_FK) as LANGUAGE_PRIMARY -- needed for s... | true |
259d41f98a30d54bcd0dd96a4dc8f1aca43994f3 | SQL | akleber/ldap-avatar | /cache-schema.sql | UTF-8 | 213 | 3.046875 | 3 | [
"MIT"
] | permissive | BEGIN TRANSACTION;
DROP TABLE IF EXISTS cache;
CREATE TABLE cache (
email_hash TEXT NOT NULL,
size INTEGER,
photo BLOB NOT NULL
);
CREATE INDEX email_hash_index ON cache (email_hash, size);
COMMIT;
| true |
93d85f8f3b5073bf95761547049b0c3b9e2168f6 | SQL | evrimulgen/Oracle-DBA-Life | /SCRIPTS/rdo_stat.sql | UTF-8 | 1,296 | 2.734375 | 3 | [
"MIT"
] | permissive | REM FILE NAME: rdo_stat.sql
REM LOCATION: Database Tuning\Redo Log Reports
REM FUNCTION: Show REDO latch statisitics
REM TESTED ON: 7.3.3.5, 8.0.4.1, 8.1.5, 8.1.7, 9.0.1
REM PLATFORM: non-specific
REM REQUIRES: v$latch, v$latchname, v$sysstat
REM
REM This is a part of the Knowledge Xpert for Oracle Administr... | true |
ffc505f807d8c730ff6c694e4490708974308a8b | SQL | google/fhir | /examples/bigquery/encounter-by-patient.sql | UTF-8 | 875 | 3.21875 | 3 | [
"Apache-2.0"
] | permissive | -- Copyright 2018 Google LLC
--
-- 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
--
-- https://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in ... | true |
3e6bbd4ad36d928b89a85c960f10e4c2545e6361 | SQL | kashenfelter/sql | /trawl/Lengths.sql | UTF-8 | 1,242 | 3.84375 | 4 | [] | no_license | -- 9/1/2014
-- 8/31/2014 Changed this to limit by applying the sat or unsat haul view
-- Base Data For Length Distribution Estimations : Satisfactory Only
-- Single species select statement for length distribution base data
-- !!!!!!!!!!! Note that original script filters out all hauls that have no lengths
-- 7/30/20... | true |
d61b553b0ff679d926ee907d95a3a59a6ae5eae0 | SQL | abhiga/UCMS | /populate.sql | UTF-8 | 1,995 | 2.875 | 3 | [] | no_license | INSERT INTO Departments VALUES (1, 'Computer Science', 'Nathan');
INSERT INTO Departments VALUES (2, 'Mathematics', 'Abhinav');
INSERT INTO Departments VALUES (3, 'Statistics', 'Abhishek');
INSERT INTO Departments VALUES (4, 'Physics', 'Megan');
INSERT INTO Students VALUES (1, 'Abhijeet Gaurav');
INSERT INTO Students... | true |
7f884690dbdaf641c5b78111e9baf7f09fb963b3 | SQL | Levet/gotrue | /migrations/20221208132122_backfill_email_last_sign_in_at.up.sql | UTF-8 | 338 | 2.828125 | 3 | [
"MIT"
] | permissive | -- previous backfill migration left last_sign_in_at to be null, which broke some projects
update {{ index .Options "Namespace" }}.identities
set last_sign_in_at = '2022-11-25'
where
last_sign_in_at is null and
created_at = '2022-11-25' and
updated_at = '2022-11-25' and
provider = 'email' and
id... | true |
9358e4881a35c812c040adda9bdedf9507b63bbe | SQL | rcallaby/codefights | /Database/Welcome to the table/monthlyScholarships/monthlyScholarships.mysql | UTF-8 | 172 | 2.875 | 3 | [] | no_license | /*Please add ; after each select statement*/
CREATE PROCEDURE monthlyScholarships()
BEGIN
SELECT id, (scholarship/12) as scholarship FROM scholarships order by id;
END | true |
891b4f7dd8ca06fe442841d9e075772f6e249e2f | SQL | tebbini97/tp1 | /user.sql | UTF-8 | 1,385 | 3.078125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Hôte : 127.0.0.1
-- Généré le : sam. 13 avr. 2019 à 23:33
-- Version du serveur : 10.1.38-MariaDB
-- Version de PHP : 7.1.27
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!4010... | true |
ea09c6f94e52f1e332aecfcab84bbd1418919ef1 | SQL | jualhosain/price_comparison_with_three_market_through_php | /DATABASE HERE/market.sql | UTF-8 | 2,818 | 3.21875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Apr 01, 2020 at 07:00 PM
-- Server version: 10.4.10-MariaDB
-- PHP Version: 7.3.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... | true |
225b503408550be93c5352442561492d4d1dc472 | SQL | echoasis/SampleCode | /SQL/Vday_Pending_IC.sql | UTF-8 | 2,945 | 4.3125 | 4 | [] | no_license | select x1.Appointment_request_id, x1.Date, x1.start_time, x1.city,x1.Client_Name,x1.MT1, x1.MT1_number,if(x2.MT2=x1.MT1, NULL, x2.MT2) as MT2, if(x2.MT2_number=x1.MT1_number,NULL,x2.MT2_number) as MT2_number,df2.comment_VDAY, df2.stamp_time
from
(select * from
(select ar.Appointment_request_id, concat(ar.customer_firs... | true |
99859fc69cc89657c5add84287c31640e38e2305 | SQL | raphaelauv/debezium-grammar-checker | /src/main/resources/example.sql | UTF-8 | 1,197 | 3.546875 | 4 | [] | no_license | CREATE DEFINER=`ci`@`%` PROCEDURE `toto`.`21`(IN p_platform_id CHAR(2), IN p_sleep INT)
BEGIN
declare cnt integer default 0;
DECLARE finished INTEGER DEFAULT 0;
DECLARE tataId int(11);
DECLARE curTransaction
CURSOR FOR
SELECT cto.id
FROM toto_tata_order cto
JOIN toto_t... | true |
21407cb0b6e3a1b543360b8340709401f23b0bdf | SQL | vgoel38/PQET | /inputs/really_final_outputs/original/without_mj/16b.sql | UTF-8 | 4,753 | 2.8125 | 3 | [] | no_license | QUERY PLAN
-------------------------------------------------------------------------------------------------------------------------... | true |
c8961c516adb23ff3d0237f0e6860b3b9ade8192 | SQL | ModernTimes/ModernTimes | /sql/elements_favor.mysql.sql | UTF-8 | 1,009 | 2.609375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 3.4.5
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Erstellungszeit: 08. Aug 2012 um 11:40
-- 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 */;
/*!401... | true |
d82602e31c8b6c308357d7021645aecad24a1e45 | SQL | minhminh230998/C0221G1-nguyenducminh1 | /module3/bai_3_thao_tac_voi_CSDL/thuchanh/nhap_lieu_quan_li_sinh_vien.sql | UTF-8 | 836 | 3.125 | 3 | [] | no_license |
INSERT INTO Student (student_name, add_ress, phone, status, class_id)
VALUES ('Hung', 'Ha Noi', 0912113, 1, 1);
INSERT INTO Student (student_name, add_ress, status, class_id)
VALUES ('Hoa', 'Hai phong', 1, 1);
INSERT INTO Student (student_name, add_ress, phone, status, class_id)
VALUES ('Manh', 'HCM', 012312, 0, 2);
I... | true |
06725586065912863169472477052a552f499d9c | SQL | d-vignesh/WikiBookSQLExcercise | /scientist.sql | UTF-8 | 2,363 | 4.375 | 4 | [] | no_license |
create table Scientists(
SSN Integer Primary Key NOT NULL,
Name Varchar(25) NOT NULL
);
create table Projects(
Code Varchar(10) Primary Key NOT NULL,
Name Varchar(50) NOT NULL,
Hours Integer
);
create table AssignedTo(
Scientist Integer,
Constraint fk_Scientists_SSN Foreign Key(Scientist) References Scientist... | true |
e16d1c14e677254f30b3d0c2a497b6a6bc4a7101 | SQL | BryanAnariba/UNAH-CLASES | /IS501-II2015-master/Scripts/Aerolinea/DDL.sql | UTF-8 | 9,343 | 2.90625 | 3 | [] | no_license | -- Generated by Oracle SQL Developer Data Modeler 4.1.0.866
-- at: 2015-08-04 14:49:18 CST
-- site: Oracle Database 11g
-- type: Oracle Database 11g
CREATE TABLE AEROLINEA.TBL_ASIENTOS
(
CODIGO_ASIENTO INTEGER NOT NULL ,
ALIAS_ASIENTO VARCHAR2 (10) NOT NULL ,
CODIGO_A... | true |
837f29f54e1f30e253d73774bb506e2b9e04549f | SQL | hrodriguezv/customer-api--MS-approach- | /ws/src/main/resources/data.sql | UTF-8 | 3,974 | 3.328125 | 3 | [] | no_license | drop table IF EXISTS authority;
create TABLE authority (
id INTEGER,
authority VARCHAR(255),
PRIMARY KEY (id)
);
drop table IF EXISTS credentials;
create TABLE credentials (
id INTEGER,
enabled BOOLEAN NOT NULL,
name VARCHAR(255) NOT NULL,
password VARCHAR(255) NOT NULL,
version INTEGER,
PRIMARY KEY (id)
);
drop tabl... | true |
a51b5236b635283b1cb270aed8f4d765df990efa | SQL | YASSINAIBI/php-mailer | /food.sql | UTF-8 | 3,592 | 3.171875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.1
-- https://www.phpmyadmin.net/
--
-- Hôte : 127.0.0.1
-- Généré le : mar. 24 nov. 2020 à 13:43
-- Version du serveur : 10.4.11-MariaDB
-- Version de PHP : 7.4.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 S... | true |
601da94a1542526263bc47f4c229c76d88f99847 | SQL | silence-do-good/stress-test-Postgres-and-MySQL | /dump/low/day22/select0128.sql | UTF-8 | 179 | 2.609375 | 3 | [] | no_license |
SELECT timeStamp, temperature FROM ThermometerOBSERVATION o
WHERE timestamp>'2017-11-21T01:28:00Z' AND timestamp<'2017-11-22T01:28:00Z' AND temperature>=32 AND temperature<=100
| true |
16c139190cf1a66c5842ae7cdd7108aa8768dcbd | SQL | 11aman/ecommerce | /ecommerce.sql | UTF-8 | 27,987 | 3.046875 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Generation Time: Jul 29, 2020 at 11:16 AM
-- Server version: 5.7.26
-- PHP Version: 7.2.18
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CH... | true |
ca6db1e8414a252190e54b1086f6ed367ddb2f2c | SQL | silence-do-good/stress-test-Postgres-and-MySQL | /dump/high/day26/select0045.sql | UTF-8 | 191 | 2.734375 | 3 | [] | no_license |
SELECT timeStamp, temperature
FROM ThermometerObservation
WHERE timestamp>'2017-11-25T00:45:00Z' AND timestamp<'2017-11-26T00:45:00Z' AND SENSOR_ID='0c14f3cf_2c83_41fa_8a36_45abffc11f9f'
| true |
19e214a2d626b34105067789ae0a27a55bc41ef3 | SQL | comicbox/comicbox | /comicboxd/migrations/1589053869_fix_book_updated_at.down.sql | UTF-8 | 1,032 | 4.3125 | 4 | [] | no_license |
DROP VIEW IF EXISTS book_user_book;
create view book_user_book as
select
book.*,
user.id as user_id,
book.id as book_id,
current_page,
last_page_read,
rating,
case when page_count <= current_page + 1 then 1 else 0 end read,
book.series || '-' || substr('0000000000'||case when book.v... | true |
53a9d3ff97f9c6166efaa81a11cd854d152e70e2 | SQL | evosys/SQLQuerySnDpro | /Secondary Sales by Outlet SKU.sql | UTF-8 | 1,667 | 3.84375 | 4 | [] | no_license | select co.comp2_desc,co.comp3_desc, p.DISTRIBUTOR,co.name,
p.town+p.locality+p.slocality+p.pop popcode,p.NAME, pcs.sku,s.ldesc,
[33],[34],[35],[36],[37],[38],[39],[40],[41],[42],[43],[44],[45]
from pop p
--- compcode
join (
select da.distributor,d.name, cl.comp2_desc, cl.comp3_desc from distributor_association da
join ... | true |
76071bdb05a147312524dd521660a1443876e4a5 | SQL | renyuanz/hypercable | /db/hyper_structure.sql | UTF-8 | 14,709 | 3.125 | 3 | [
"Apache-2.0"
] | permissive | SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SELECT pg_catalog.set_config('search_path', '', false);
SET check_function_bodies = false;
SET xmloption = content;
SET client_min_messages = warning;
SET row... | true |
64e4b134cd17b06d80c8d368c304d81212f86b6c | SQL | throttlerhtc-gmail/apsheron | /src/main/resources/db/initDB.sql | UTF-8 | 1,365 | 3.96875 | 4 | [] | no_license | DROP TABLE IF EXISTS manager_auth;
DROP TABLE IF EXISTS foods;
DROP TABLE IF EXISTS manager;
DROP SEQUENCE IF EXISTS global_sequence;
CREATE SEQUENCE global_sequence START WITH 100000;
CREATE TABLE managers
(
id INTEGER PRIMARY KEY DEFAULT nextval('global_sequence'),
name VARCHAR ... | true |
3a1e359b2c865e9ed79fe730f9ed843539e76a3f | SQL | MikeRider27/TiendaRepuestos | /bd/PROC/P_Insertar_Proveedor.sql | UTF-8 | 1,178 | 3.421875 | 3 | [] | no_license | DELIMITER $$
CREATE PROCEDURE P_Insertar_Proveedor
(
IN _numeroDocumento varchar(13),
IN _razonComercial varchar(150),
IN _direccion varchar(150),
IN _telefono varchar(10),
IN _email varchar(100),
IN _idTipoDocumento int,
OUT flag_exitoso int
)
BEGIN
DECLARE contadorPersona INT DEFAULT 0;
DECLARE contadorPr... | true |
6d3d27d30479f8dd46a0d193e17f536be012a8a2 | SQL | ma-tripleT/coursework_udacity | /queries.sql | UTF-8 | 1,668 | 4.5 | 4 | [] | no_license | /* Query 1 -How much stock is held hence how popular are different categories */
WITH film_and_cat AS (
SELECT film.film_id as film_id, category.name as Film_Category
fROM film
JOIN film_category
ON film.film_id = film_category.film_id
JOIN category
ON film_category.category_id = category.category_id
)
SELECT Fi... | true |
ec8864e87c2f3655e90bf31b04a29879b1e40341 | SQL | daoleen/InternetBanking | /InternetBankingEJB/src/main/resources/migrations/scripts/20150103145403_add_bank_table.sql | UTF-8 | 434 | 3.109375 | 3 | [] | no_license | -- // add bank table
-- Migration SQL that makes the change goes here.
CREATE TABLE bank (
bic INTEGER NOT NULL PRIMARY KEY,
name VARCHAR(32) NOT NULL,
bank_account_number BIGINT NOT NULL
);
CREATE UNIQUE INDEX bank_name_idx ON bank(name);
CREATE UNIQUE INDEX bank_account_idx ON bank(bank_account_number);
-- //... | true |
08df727fd4f8c4d79cd1eade107b320da1a3a387 | SQL | basimar/ub_aleph_exemplarmutationen | /ubbe_mutationen/bib-zu-adm-bern-mut.sql | UTF-8 | 1,701 | 3.265625 | 3 | [] | no_license | /******************************************************************************/
/* Script zur Selektion von BIB-Nummern zu Exemplaren, deren Nummern in */
/* itemkeys bzw. zu ADM-Nummern, die in admkeys geladen sind. */
/* Erstellt eine Liste von BIB-Nummern, die zur Reindexierung oder zum ... | true |
6272fbb2c2ea30ca43ffe10e65193f7560b1c15d | SQL | mharshachaitanya/tournament | /tournament.sql | UTF-8 | 782 | 4.28125 | 4 | [] | no_license | -- Table definitions for the tournament project.
-- connect to tournament
\c tournament;
-- Create Players Table
CREATE TABLE PLAYERS(
PLAYER_ID SERIAL PRIMARY KEY NOT NULL,
NAME TEXT NOT NULL
);
-- Create Matches
CREATE TABLE MATCH_RESULTS(
MATCH_ID SERIAL PRIMARY KEY NOT NULL,
WINNER_ID ... | true |
205dfa929bd03b8238685047cb5ffc9ad4c9bbec | SQL | kkumarv15/MySQLCRUDApp | /target/classes/specialties.sql | UTF-8 | 305 | 2.671875 | 3 | [] | no_license | use mysqlcrudapp;
create table if not exists specialties
(
id bigint primary key,
specialty varchar(100)
);
insert into specialties
values (1, 'cooker'),
(2, 'coder'),
(3, 'driver'),
(4, 'miner');
drop table Specialties;
truncate Specialties;
select *
from specialties; | true |
289f8c2c60679e75c15d6817ce5f3042bbcd9913 | SQL | SQLauto/PyroSQL | /dynamic/DSQLT-master/DSQLT/DSQLT2012/DSQLT/Stored Procedures/@addSyncRowStatus.sql | UTF-8 | 392 | 2.65625 | 3 | [
"MS-PL"
] | permissive |
CREATE PROCEDURE [DSQLT].[@addSyncRowStatus]
@p1 NVARCHAR (MAX)=null, @Database [sysname]=null, @Print BIT=0
AS
exec DSQLT.[Execute] 'DSQLT.@addSyncRowStatus' ,@p1,@Database=@Database,@Print=@Print
RETURN 0
BEGIN
alter TABLE [@1].[@1]
add
[DSQLT_SyncRowStatus] [tinyint] NULL
ALTER TABLE [@1].[@1] ADD CONSTRAINT [D... | true |
6886ffaca17b2b3ca44acf2bba6dd45e3f808ecc | SQL | BancoDatosNaturaleza/Listas_IEPNB | /Sentencias_SQL/Sentencias_LC/LC_IFN_Provincias.sql | UTF-8 | 4,700 | 2.53125 | 3 | [] | no_license | CREATE TABLE "LC_IFN_PROVINCIAS"
( "ID_PROV" NUMBER(2) NOT NULL,
"NB_PROV" VARCHAR2(50) NULL,
CONSTRAINT "PK_LC_IFN_PROVINCIAS" PRIMARY KEY ("ID_PROV")
)
;
/*Insert "LC_IFN_PROVINCIAS"*/
Insert into LC_IFN_PROVINCIAS
(ID_PROV,NB_PROV)
values
('1','Álava/Araba');
Insert into LC_IFN_PROVINCIAS ... | true |
95e70c9437592ce2190493635d8bb57bb76df803 | SQL | OaklandMuseum/webapps | /etl/template6.sql | UTF-8 | 577 | 3.71875 | 4 | [] | no_license | -- nb: this query assume it will take a variety of field content: refnames, messy free text, and output something "clean"
SELECT
cc.id,
regexp_replace(STRING_AGG(DISTINCT x.FIELD, '␥'), E'[\\t\\n\\r]+', ' ', 'g') AS FIELD_ss
FROM collectionobjects_common cc
JOIN hierarchy h1 ON (cc.id = h1.id)
JOIN relations_co... | true |
313b51dffb173dc1d83dc045e5a4c18c476c55ef | SQL | chokvn/SQL---Hackerrank | /Basic Select/Weather Observation Station 12.sql | UTF-8 | 220 | 3.078125 | 3 | [] | no_license | /*
Challenge reference:
https://www.hackerrank.com/challenges/weather-observation-station-12
*/
SELECT DISTINCT city FROM station
WHERE ((UPPER(city) NOT RLIKE '^[AEIOU].*$')
AND (UPPER(city) NOT RLIKE '^.*[AEIOU]$'));
| true |
7ef7347dca891aa5a09704a8a0c80be118aefe2c | SQL | flowcommerce/dependency-postgresql | /scripts/20151202-153045.sql | UTF-8 | 1,131 | 3.625 | 4 | [
"MIT"
] | permissive | drop table if exists recommendations;
create table recommendations (
id text primary key,
project_id text not null references projects,
type text not null check(util.lower_non_empty_trimmed_string(type)),
object_id text not null,
name ... | true |
05984e23cd986977a7b56b270cd205ba73e26c63 | SQL | KyleHeuchan/favouritethings | /database/db_videogames.sql | UTF-8 | 2,612 | 3.078125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: localhost:8889
-- Generation Time: Mar 26, 2019 at 05:22 PM
-- Server version: 5.7.23
-- PHP Version: 7.2.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
--
-- Database: `db_videogames`
--
-- ----------------------... | true |
6be236d3d65c8d2aa6350735362a4e1a7a8fe4d9 | SQL | bradybyrd/REPO | /postgres/rlm/INDEX/index_package_template_items_on_package_template_id.sql | UTF-8 | 244 | 2.53125 | 3 | [] | no_license | -- Name: index_package_template_items_on_package_template_id; Type: INDEX; Schema: public; Owner: deploy
--
CREATE INDEX index_package_template_items_on_package_template_id ON public.package_template_items USING btree (package_template_id);
--
| true |
be61fb685488b0802547195034c227dd62e06364 | SQL | dsharyi/JavaEE6 | /populateDB.sql | UTF-8 | 3,334 | 2.6875 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 5.7.17, for Win64 (x86_64)
--
-- Host: localhost Database: dev_db
-- ------------------------------------------------------
-- Server version 5.7.18-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESUL... | true |
a10abdec48bdde93f2dbffef11a7f668b6b02259 | SQL | mbarretogit/sql | /s_BOLETOS_ALUNO_IMPRIMIR.sql | ISO-8859-1 | 4,083 | 3.90625 | 4 | [] | no_license |
--## 6.2.1-HF14
ALTER PROCEDURE s_BOLETOS_ALUNO_IMPRIMIR(
@P_ALUNO [T_CODIGO],
@P_SUBSTITUI VARCHAR(1) output)
AS
BEGIN
-- [INCIO]
--campos necessrios no retorno: codBoleto, dataVencimento, valor,
--tipoCobranca (de acordo com num_cobranca 0 = Diversos, 1 = Mens... | true |
5a4a6b84592944c1550df8bf9090a562bc47cbb2 | SQL | FacundoSC/CursoDeBasesDeDatosDeAltoRendimiento_Resolucion_Facundo | /IngenieriaDatosDeAltoRendimientoFacundoCordoba/Empleados Auditorias.sql | UTF-8 | 4,908 | 3.296875 | 3 | [] | no_license | CREATE TABLE `aud_Empleados` (
`Id` BIGINT NOT NULL AUTO_INCREMENT,
`FechaAud` DATETIME NOT NULL,
`UsuarioAud` VARCHAR(30) NOT NULL,
`IP` VARCHAR(40) NOT NULL,
`UserAgent` VARCHAR(255) NULL,
`Aplicacion` VARCHAR(50) NOT NULL,
`Motivo` VARCHAR(100) NULL,
`TipoAud` CHAR(1) NOT NULL,
`IdEmpleado` int NOT NULL,
`IdRol` ti... | true |
cba6405875c8ab0c4bf9e7b6c091c65b014cc2ba | SQL | cdesmarais/WebDB-Test | /WebDB/StoredProcedures/Common/dbo.DNUserConvertAccountFromEmail.PRC | UTF-8 | 1,835 | 3.671875 | 4 | [] | no_license |
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[DNUserConvertAccountFromEmail]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[DNUserConvertAccountFromEmail]
GO
CREATE Procedure dbo.DNUserConvertAccountFromEmail
(
@UserEmail nvarchar(50)
)
As
SET NOCOUNT ON
BEGIN TRAN... | true |
ce62b5e4e91510345acb62ac28b86757dfda51a9 | SQL | ClickHouse/ClickHouse | /tests/queries/0_stateless/02012_sha512_fixedstring.sql | UTF-8 | 361 | 2.59375 | 3 | [
"Apache-2.0",
"BSL-1.0"
] | permissive | -- Tags: no-fasttest
-- Tag no-fasttest: Depends on OpenSSL
SELECT hex(SHA512(''));
SELECT hex(SHA512('abc'));
DROP TABLE IF EXISTS defaults;
CREATE TABLE defaults
(
s FixedString(20)
)ENGINE = Memory();
INSERT INTO defaults SELECT s FROM generateRandom('s FixedString(20)', 1, 1, 1) LIMIT 20;
SELECT hex(SHA512(... | true |
02311a82584ff02c3b924a010c652031cebddad1 | SQL | tumendelger/EasyChef | /DBSchemas/DBCreateSchema.sql | UTF-8 | 28,604 | 3.28125 | 3 | [] | no_license | SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+08:00";
--
-- Database: `easysystems`
--
CREATE DATABASE IF NOT EXISTS `easysystems` DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;
USE `easysystems`;
-- --------------------------------------------------------
--
-- Table structure for table `carddisco... | true |
c2cf20efc070e629332831c2df0edef8a1bc54d9 | SQL | IVSEZ/mysqlbis | /_DailyScript/DAILY-SCRIPT-USAGE.sql | UTF-8 | 7,672 | 3.375 | 3 | [] | no_license | use rcbill_my;
set @category='CAPPED';
-- set @periodstart='2016-10-01';
-- set @periodend='2017-09-30';
-- set @periodstart='2017-10-01';
-- set @periodend='2017-10-14';
-- set @periodstart='2018-09-20';
-- set @periodend='2018-09-20';
-- set @periodstart='2018-12-29';
-- set @periodend='2018-12-29';
-- set @perio... | true |
435ddcbeb23b76fe59d7031ef21b756280fa9ee4 | SQL | 2008PegaUSF/Amores-repo | /Projects/Amores_JDBCBank/Saffron City Bank -JDBC.sql | UTF-8 | 737 | 3.3125 | 3 | [] | no_license |
create table "CustomerInfo"
(
"CustomerID" serial primary key,
"UserID" int not null,
"Username" varchar(30) not null,
"PassWord" varchar(10) not null,
"Firstname" varchar(40) not null,
"LastName" varchar(20) not null,
"Acc1" numeric,
"Acc2" numeric
);
--Creates specific admi... | true |
f8c7a02e05a273bcdf680c5145b5e9915233971f | SQL | SAMaack/PflanzenbestimmungAPI | /db/creation_testdaten.sql | UTF-8 | 20,806 | 3.296875 | 3 | [] | no_license | drop database if exists pflanzenbestimmung;
-- MySQL Workbench Forward Engineering
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DAT... | true |
9bfa5035ca8956c69bb92f23097045e21a3d2b61 | SQL | brBronx/fullstack-nanodegree-vm | /vagrant/tournament/tournament.sql | UTF-8 | 685 | 3.09375 | 3 | [] | no_license | -- Table definitions for the tournament project.
--
-- Put your SQL 'create table' statements in this file; also 'create view'
-- statements if you choose to use it.
--
-- You can write comments in this file by starting them with two dashes, like
-- these lines here.
DROP DATABASE IF EXISTS tournament;
CREATE DATABASE... | true |
648cde9e2bbec691a2874bbc854d4fdc74b7d6c2 | SQL | ericandrewlewis/women-in-cs | /import.sql | UTF-8 | 2,694 | 3.09375 | 3 | [] | no_license | DROP DATABASE IF EXISTS ipeds;
CREATE DATABASE ipeds;
\connect ipeds;
CREATE TABLE completions (
UNITID INTEGER,
CIPCODE TEXT,
MAJORNUM INTEGER,
AWLEVEL INTEGER,
CTOTALT INTEGER,
CTOTALM INTEGER,
CTOTALW INTEGER,
CAIANT INTEGER,
CAIANM INTEGER,
CAIANW INTEGER,
CASIAT INTEGER,
CASIAM INTEGER,
... | true |
0704fd2c2b6dfdb2368e9613fe09f8eb3cfd34fb | SQL | pacificnm/pnm | /module/Subscription/sql/subscription.sql | UTF-8 | 2,582 | 3.265625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.2.12deb2+deb8u2
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Dec 06, 2016 at 04:09 PM
-- Server version: 10.0.28-MariaDB-0+deb8u1
-- PHP Version: 5.6.27-0+deb8u1
SET FOREIGN_KEY_CHECKS=0;
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
--... | true |
6ff5d6472632fd633d8b601db69f02e2201b1fa2 | SQL | khsieh95/goatemployee_tracker | /seed.sql | UTF-8 | 498 | 2.921875 | 3 | [
"MIT"
] | permissive | USE employee_tracker_db;
INSERT INTO departments (department)
VALUES ("HR"),("Finance"),("Tech");
INSERT INTO roles (title,salary,department_id)
VALUES ("Accountant", 80000,1),("Software Engineer", 100000, 2),("Technical Project Manager",120000,3),("Recruiter",50000,1);
INSERT INTO employees (first_name, last_name, ... | true |
f6a5c9b3f29740d60e86bc4a54c99f98b908ae09 | SQL | Maripia12/Employee-Tracker | /db/Database_schema.sql | UTF-8 | 904 | 4.125 | 4 | [] | no_license | drop database if exists employee_tracker_db;
Create Database employee_tracker_db;
use employee_tracker_db;
Create Table department (
id int auto_increment,
name varchar (30) unique not null,
primary key (id)
);
Create Table role (
id int not null auto_increment,
title varchar (30) unique not null,
salary decimal not... | true |
e17f1b629e505dcbbcae79b03f1de48bfef322b3 | SQL | nikhunter/Raven | /SQL/Create_DB.sql | UTF-8 | 1,509 | 3.5 | 4 | [] | no_license | USE raven;
DROP TABLE if exists raven.trips;
DROP TABLE if exists raven.logins;
CREATE TABLE IF NOT EXISTS `raven`.`logins` (
`id` INT NOT NULL AUTO_INCREMENT,
`reg` VARCHAR(10) NOT NULL,
`username` VARCHAR(32) NOT NULL,
`password` mediumtext NOT NULL,
PRIMARY KEY (`id`, `username`),
UNIQUE INDEX `usernam... | true |
167e2d29b2985977ed2f2c9dab54334f8a288bfc | SQL | jtymburski/compass-backend-api | /db/drop.sql | UTF-8 | 3,183 | 3.171875 | 3 | [] | no_license | -- CREATE DATABASE gncompass_core;
-- USE gncompass_core;
-- CREATE USER apiaccess WITH PASSWORD 'EntranceLesterFrenchPortal';
-- GRANT INSERT,SELECT,DELETE,UPDATE ON ALL TABLES IN SCHEMA public TO apiaccess;
-- GRANT SELECT,USAGE ON ALL SEQUENCES IN SCHEMA public TO apiaccess;
-- Privilege legend:
-- r -- SELECT ("r... | true |
521ed0103851846f6539f0b7fa0bb4cd6259d240 | SQL | MGeraud/Projet10 | /Scripts sql/updateDatabase/v1Tov2.sql | UTF-8 | 1,171 | 3.359375 | 3 | [] | no_license | CREATE TABLE public.booking (
id bigint NOT NULL,
booking_date date,
mail_send_date date,
title character varying(255),
member_id bigint
);
ALTER TABLE public... | true |
ca75762e0ab05c6c16c963cfcdd41fa30e718492 | SQL | ZS-Oliver/go | /etc/sql/backup/db.sql | UTF-8 | 9,988 | 3.359375 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 5.7.20, for Win64 (x86_64)
--
-- Host: 47.92.28.15 Database: go
-- ------------------------------------------------------
-- Server version 5.7.24
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!401... | true |
9ee45025b439e4dfc40ad1ee27e65467ae79fa05 | SQL | JeffZhu1122/Short-URL | /install/install.sql | UTF-8 | 1,343 | 2.609375 | 3 | [] | no_license | DROP TABLE IF EXISTS `frame_list`;</explode>
CREATE TABLE `frame_list` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`domain` varchar(255) DEFAULT NULL,
`date` datetime DEFAULT NULL,
`type` int(1) NOT NULL DEFAULT '1',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;</explode>
DROP TABLE IF EXISTS... | true |
6aee04d538e19ebfb6b4e845ea424cfcb338fcaa | SQL | 1kevinson/SQL-UDEMY-COURSE | /sections/section-19.sql | UTF-8 | 3,860 | 4.125 | 4 | [] | no_license | -- MySQL Data Definition Schema
CREATE DATABASE IF NOT EXISTS twitter_db;
USE twitter_db;
CREATE TABLE IF NOT EXISTS users (
id INT PRIMARY KEY AUTO_INCREMENT,
username VARCHAR(30) NOT NULL,
bio VARCHAR(400) NOT NULL DEFAULT '',
avatar VARCHAR(200),
phone VARCHAR(25),
... | true |
248836117a5f5ff96651c04a4d608820e0ed7a47 | SQL | bellmit/flexdb | /2.HOST/3.Procedure/se00220.sql | UTF-8 | 5,743 | 3.265625 | 3 | [] | no_license | CREATE OR REPLACE PROCEDURE se00220 (
PV_REFCURSOR IN OUT PKG_REPORT.REF_CURSOR,
OPT IN VARCHAR2,
BRID IN VARCHAR2,
PV_CUSTODYCD IN VARCHAR2,
PV_RECUSTODYCD in varchar2,
PV_RENAME IN varchar2,
PV_RECOMPANY IN varcha... | true |
59cba04cf0f9086c34e0b23b46bd928864035297 | SQL | luisroel/soccersoft | /dbobjects/MySQL/Stats/vwStats_Get_NormalProb.sql | UTF-8 | 401 | 3.390625 | 3 | [] | no_license | --
-- Average Goals Conceded By Home Teams In A Given Season
--
DROP VIEW IF EXISTS vwStats_Get_NormalProb;
CREATE VIEW vwStats_Get_NormalProb AS
SELECT
SD.*
, NP.Min
, NP.Max
, NP.Avg
, NP.Std
, fnStats_Get_NormalValue(SD.Diff, NP.Avg, NP.Std) AS `Prob`
FROM
`vwStats_Get_DiffFrecuencies` SD
... | true |
615d7ca09d56f334b168c33423b0c21339a78a43 | SQL | dbflute-test/dbflute-test-active-dockside | /dbflute_maihamadb/playsql/replace-schema-90-vendorcheck.sql | UTF-8 | 3,231 | 3.375 | 3 | [
"Apache-2.0"
] | permissive |
-- =======================================================================================
-- Vendor Check
-- ============
CREATE TABLE VENDOR_CHECK (
VENDOR_CHECK_ID N... | true |
f087b1577017c1d1abd5139f5c606964f397bebe | SQL | marek-svarc/sportal | /clubeek-ui/src/performance/java/com/clubeek/dao/impl/performance/test/indexes/create_indexed_table.sql | UTF-8 | 399 | 3.140625 | 3 | [] | no_license | drop table if exists indexed_table;
create table indexed_table (
id serial,
string_col character varying(100),
string_col_indexed character varying(100),
int_col int,
int_col_indexed int,
my_enum int,
my_enum_indexed int
);
create unique index idx_int_col_indexed on indexed_table using btree (int_col_indexed);... | true |
fa00dd0a2d9d825417345ab9f9f08702bfa31e2e | SQL | Badmoon-mySun/DB_ITIS_2020 | /semWork/migrations/V6__table_employee_has_position.sql | UTF-8 | 652 | 3.359375 | 3 | [] | no_license | CREATE TABLE `employee_has_position` (
`employee_id` int NOT NULL,
`position_id` int NOT NULL,
`date_from` date NOT NULL,
`salary` decimal(10,2) NOT NULL,
`is_active` tinyint(1) NOT NULL,
PRIMARY KEY (`employee_id`,`position_id`),
KEY `fk_employee_has_position_position1_idx` (`position_id`),
KEY `fk_emp... | true |
685ff73962cfddf92120b6f4763be544975a9178 | SQL | TaganTrader/DataCollector | /dbinit.sql | UTF-8 | 541 | 2.75 | 3 | [] | no_license | CREATE DATABASE <SHEMA_NAME> CHARACTER SET utf8 COLLATE utf8_general_ci;
use <SHEMA_NAME>;
CREATE TABLE `xbtusd_1` (
`timestamp` int(11) NOT NULL,
`open` double DEFAULT NULL,
`close` double DEFAULT NULL,
`low` double DEFAULT NULL,
`high` double DEFAULT NULL,
`volume` double DEFAULT NULL,
`trades` int(11)... | true |
7d0f6abb81ece262675cb700770a88fe034f438b | SQL | Gyle/INFO151 | /assignment3/Assignment3_Q4b.sql | UTF-8 | 431 | 3.46875 | 3 | [] | no_license | --Question 4b
/*(b) After creating the above table, the library manager wants to add a MediaID
attribute which is a foreign key from the Media table to the Category table.
Write the alter SQL to add MediaID in the table. Use the Integer data type
for the MediaID attribute.*/
ALTER TABLE Category
ADD COLUMN MediaID INT... | true |
d3ec3fc14f03902ecf6ee274635267bbee429556 | SQL | Ismile-Hossain/Solid-Waste-Recycling-Database | /Web Application/dbms_project/proj/Agent Transportation/Agnet Transportation.sql | UTF-8 | 882 | 3.015625 | 3 | [] | no_license | CREATE TABLE AGENT_TRANSPORTATION
(
agent_id VARCHAR2(15) NOT NULL,
VEHICLE_NUMBER VARCHAR2(20) NOT NULL,
HIRER_ID VARCHAR2(20),
CONSTRAINT ATP_agId_vehNum_pk
PRIMARY KEY (agent_id,VEHICLE_NUMBER,HIRER_ID),
CONSTRAINT ATP_agId_fk
FOREIGN KEY (agent_id)
REFERENCES Area_Agent (agent_id),
CO... | true |
ad2ad6027ab41332427ce94acf77198347d84bf5 | SQL | mine0117/quorum_hack | /referrences/DDL.sql | UTF-8 | 413 | 3.515625 | 4 | [] | no_license | -- 유저user
DROP TABLE USR;
DROP TABLE Authority;
-- 유저
CREATE TABLE USR (
UID INTEGER NOT NULL auto_increment primary key, -- 유저ID
email VARCHAR(255) NOT NULL, -- ID
password VARCHAR(255) NOT NULL -- 비밀번호
);
CREATE TABLE Authority(
ANum INTEGER NOT NULL auto_increment primary key,
Authority VARCHAR(2... | true |
04826fbd5ed550ca62ccaa30b38cdf2747a6cfbf | SQL | radtek/abs3 | /sql/mmfo/bars/Table/otcn_f71_cust.sql | UTF-8 | 3,289 | 2.921875 | 3 | [] | no_license |
PROMPT =====================================================================================
PROMPT *** Run *** ========== Scripts /Sql/BARS/Table/OTCN_F71_CUST.sql =========*** Run ***
PROMPT =====================================================================================
PROMPT *** ALTER_POLICY_INFO... | true |
4206443f9b7cb7fe113a8befdf206820b3e004d8 | SQL | blueprint1985/birdie-riggning-backend | /sql/create-database.sql | UTF-8 | 2,189 | 3.890625 | 4 | [] | no_license | CREATE DATABASE IF NOT EXISTS birdierigg;
ALTER DATABASE birdierigg CHARACTER SET utf8 COLLATE utf8_unicode_ci;
USE birdierigg;
CREATE TABLE IF NOT EXISTS dates (
id INT AUTO_INCREMENT PRIMARY KEY NOT NULL UNIQUE,
date DATE NOT NULL
);
CREATE TABLE IF NOT EXISTS categories (
id INT AUTO_INCREMENT PRIMARY ... | true |
ad7c9504c045e527782f951bbe27cb8deb4c4a31 | SQL | vdjalov/HIBERNATE | /03. Introduction to HIbernate Exercises/Introduction-To-Hibernate-Exercises-SQL.sql | UTF-8 | 982 | 4.46875 | 4 | [] | no_license |
-- 7. Addresses with Employee Count
select a.address_text, t.name,
(select count(employee_id)
from employees as ee
where ee.address_id = a.address_id
) as `number_of_employees`
from employees as e
join addresses as a
on e.address_id = a.address_id
join towns as t on a.town_id = t.town_id
group by a.address_text
ord... | true |
259cb4c9732140020003e6c7d00d710a23f72c65 | SQL | tanwanirahul/longtail | /data/db/create.sql | UTF-8 | 9,711 | 3.421875 | 3 | [] | no_license | drop database longtail;
create database longtail character set UTF8;
GRANT ALL ON *.* TO 'longtail'@'localhost' IDENTIFIED BY 'longtail';
UPDATE mysql.user SET Password=PASSWORD('gAe1$^795') WHERE User='longtail';
FLUSH PRIVILEGES;
-- Data Patch
update site_data_value set uuid = concat('text-',uuid) where uu... | true |
cd4d032e3087db7fc85ff2f06e10030a55bce6ba | SQL | NeotomaDB/Neotoma_SQL | /function/doi/agerange.sql | UTF-8 | 1,191 | 3.40625 | 3 | [
"MIT"
] | permissive | CREATE OR REPLACE FUNCTION doi.agerange(dsid integer[])
RETURNS TABLE(datasetid integer, ages json)
LANGUAGE sql
AS $function$
SELECT dts.datasetid, json_agg(jsonb_build_object('ageyoung', agerange.younger,
'ageold', agerange.older,
'units', agetypes.ag... | true |
34da55450f9aaf2bb812e756e2d8f343467daff1 | SQL | Aferuza/demo | /sql/MySql/MySql As-nt Folder/Untitled.sql | UTF-8 | 566 | 2.90625 | 3 | [] | no_license |
Create table Studentinfo
(course_id_num INT NOT NULL, Course_Short_Title char (20), Course_Long_Title char (20), Country char(20));
Insert
into Studentinfo (course_id_num, Course_Short_Title, Course_Long_Title, Country)
values
('1', 'HeroesAX', 'The Ancient Italian Hero', 'Germany');
Insert
into Studentinfo (... | true |
8e70d8ba2ff51fe39d3701a23b575c97a9720888 | SQL | duomu/sharde | /src/main/resources/schema/sharde.sql | UTF-8 | 24,787 | 2.84375 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : MySQL
Source Server Version : 50626
Source Host : localhost:3306
Source Database : sharde
Target Server Type : MYSQL
Target Server Version : 50626
File Encoding : 65001
Date: 2017-09-14 22:24:10
*/
SET FOREIGN_KEY_CHECKS=0;
-- ------... | true |
3bb027ea17ddcd7c206d167e8e6bdb5f9dbf6e2e | SQL | cromlehg/DS4 | /dev/sql/create_tables.sql | UTF-8 | 2,884 | 3.40625 | 3 | [
"Apache-2.0"
] | permissive | CREATE TABLE media (
id SERIAL PRIMARY KEY,
owner_id BIGINT UNSIGNED,
path VARCHAR(190) NOT NULL,
mime_type VARCHAR(100),
created BIGINT UNSIGNED NOT NULL
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
... | true |
1ff9f15e197ea42e3679fb312cf2e9ff7d7794ab | SQL | gicadmin/allo | /PHENIX/Tables/TEMP_EDI_STATEMENT_SUMMARIES.sql | UTF-8 | 810 | 3.265625 | 3 | [] | no_license | CREATE GLOBAL TEMPORARY TABLE phenix.temp_edi_statement_summaries (
tess_id NUMBER(15) NOT NULL,
tess_tesh_id NUMBER(15),
tess_segment_type VARCHAR2(3 BYTE) NOT NULL,
tess_statement_total NUMBER(8,2),
CONSTRAINT tess_pk PRIMARY KEY (tess_id)
)
ON COMMIT DELETE ROWS;
COMMENT ON TABLE phenix.temp_edi_statement_... | true |
741b3f97fddfc7f415433acd2325a0d5fae7799f | SQL | opengauss-mirror/openGauss-server | /src/test/regress/sql/fulljoin_rewrite_col_2.sql | UTF-8 | 6,392 | 3.28125 | 3 | [
"LicenseRef-scancode-mulanpsl-2.0-en",
"LicenseRef-scancode-unknown-license-reference",
"PostgreSQL",
"BSD-3-Clause",
"LGPL-2.0-or-later",
"LicenseRef-scancode-unicode",
"LicenseRef-scancode-warranty-disclaimer",
"curl",
"GPL-1.0-or-later",
"LGPL-2.1-or-later",
"LGPL-2.1-only",
"CC-BY-4.0",
... | permissive | create schema full_join_on_true_col_2;
set current_schema='full_join_on_true_col_2';
drop table if exists t1;
drop table if exists t2;
drop table if exists t3;
create table t1(acct_id float, d int) WITH (ORIENTATION = COLUMN);
create table t2(acct_id float, d int) WITH (ORIENTATION = COLUMN);
create table t3(acct_id... | true |
6b0840576fe322e963a7aa38866e058cc20c3eb7 | SQL | sergiomm116/DAMGit | /BASES DE DATOS/EXAMEN/CREACION/Ejercicio 3.sql | UTF-8 | 221 | 2.890625 | 3 | [] | no_license | create or replace view VISTARESERVA
as select i.dni, nombre, apellidos, count(r.dni)"NUMERO DE RESERVAS"
from investigadores i, reserva r
where r.dni = i.dni and i.dnijefe is null
group by i.dni, r.dni, nombre, apellidos; | true |
9926575dc283fac9cfe4ef8c72a00bb24db0fbdc | SQL | jlb984/TP_Integrador_BD1 | /entrega3.sql | UTF-8 | 3,051 | 3.921875 | 4 | [] | no_license | -- prociedimiento para listar pedido solicitado
DELIMITER $$
CREATE DEFINER=`root`@`localhost` PROCEDURE `mostrar_pedido`(IN _id_pedido int)
BEGIN
select id_pedido, fecha_pedido, concesionaria_id_concesionaria, modelo_id_modelo, cantidad from pedido p
inner join pedido_del_modelo pm on id_pedido=pedido_id_ped... | true |
f8e2a1fed970431ad7a32371bb8d02458ca18aac | SQL | FFW-Scripter/BOS-Map | /Datenbank.sql | UTF-8 | 1,578 | 3.46875 | 3 | [
"MIT"
] | permissive | SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
CREATE DATABASE IF NOT EXISTS `BOS-Map` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
USE `BOS-Map`;
CREATE TABLE `Funkbereiche` (
`ID` varchar(64) NOT NULL,
... | true |
3776694e8eebd0cb57f53e0391b6aa94a890fa75 | SQL | benallemand/ufolep13volley_python | /sql/updates/2019_and_older/033-populate divisions.sql | ISO-8859-1 | 2,496 | 3.03125 | 3 | [] | no_license | alter table classements modify column points tinyint(2) NOT NULL DEFAULT 0;
alter table classements modify column points tinyint(2) NOT NULL DEFAULT 0;
alter table classements modify column joues tinyint(2) NOT NULL DEFAULT 0;
alter table classements modify column gagnes tinyint(2) NOT NULL DEFAULT 0;
alter table class... | true |
d2ab17d0ea75b66434ec61ecffd667307e96dd8d | SQL | naoto67/mysql-bench | /init.sql | UTF-8 | 286 | 2.875 | 3 | [] | no_license | CREATE DATABASE bench;
CREATE TABLE IF NOT EXISTS m1 (
id SERIAL PRIMARY KEY
) ENGINE = InnoDB DEFAULT CHARACTER SET utf8mb4;
CREATE TABLE IF NOT EXISTS m2 (
id SERIAL PRIMARY KEY,
m1_id BIGINT NOT NULL,
INDEX m1_id_idx(m1_id)
) ENGINE = InnoDB DEFAULT CHARACTER SET utf8mb4;
| true |
6a02e10efe02481c23436048c12743427564e29c | SQL | trms-team/trmsFinal | /TablesInit.sql | UTF-8 | 1,295 | 3.15625 | 3 | [] | no_license | CREATE TABLE user_test(
username varchar(16) PRIMARY KEY,
password varchar(16),
firstName varchar(30),
lastName varchar(30),
roles varchar[],
reportsTo varchar(16)
);
CREATE TABLE grading_format_test(
format_id serial PRIMARY KEY,
format varchar(30),
lowest varchar(20),
passing varchar(20),
highest varchar(... | true |
267b862de12718aba8889a0dd6b2689a045c5365 | SQL | ChristopheHunt/MSDA---Coursework | /Data 607/data/Flights - Data/loadflights.sql | UTF-8 | 3,427 | 3.53125 | 4 | [] | no_license | -- loadflights.sql
DROP TABLE IF EXISTS airlines;
DROP TABLE IF EXISTS airports;
DROP TABLE IF EXISTS flights;
DROP TABLE IF EXISTS planes;
DROP TABLE IF EXISTS weather;
CREATE TABLE airlines (
carrier varchar(2) PRIMARY KEY,
name varchar(30) NOT NULL
);
LOAD DATA INFILE 'c:/data/flights/airlines.csv'
INTO ... | true |
3c38d39c127d69831b78aaa827cea37aa7ed4e4e | SQL | linxupenghao/redis-cluster | /redis-cluster-monitor/src/sql/MonitorCpu.sql | UTF-8 | 604 | 3.125 | 3 | [] | no_license | create table redis_monitor_cpu(
id bigint primary key auto_increment,
productId bigint not null,
clusterId bigint not null,
redisNodeId bigint not null,
addtime bigint not null,
used_cpu_sys float default 0.0,
used_cpu_user float default 0.0,
used_cpu_sys_children float default 0.0,
used_cpu_user_children fl... | true |
07b8945fb3b558589a9155c08ffe41d95afe0cb5 | SQL | Oliveira4driano/CEPRural | /Utilitarios/Estado.sql | UTF-8 | 2,583 | 3.5625 | 4 | [] | no_license | use cep_rural;
-- -----------------------------------------------------
-- Table `estado`.`inserir`
-- -----------------------------------------------------
drop procedure if exists sp_inserirEstado;
delimiter #
create procedure sp_inserirEstado( p_estnome varchar(45), p_estsigla varchar(2) )
begin
insert into es... | true |
a4e5bf3b9bdb02bd6113e1134e36a62ad1f09485 | SQL | roman1925/donapi | /contact.sql | UTF-8 | 1,750 | 2.9375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.2.11
-- http://www.phpmyadmin.net
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 24-11-2015 a las 15:14:44
-- Versión del servidor: 5.6.21
-- Versión de PHP: 5.6.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARAC... | true |
7f16ada14bea358b2f43bef7da301e1d9719c01d | SQL | edersonpereira/MySQL | /MySQL/procedures.sql | UTF-8 | 2,121 | 3.984375 | 4 | [] | no_license | #Base de dados
create database aula04;
use aula04;
create table cursos(
idCurso int auto_increment primary key,
nomeCurso varchar(20),
valorCurso double
);
#Remover procedure
drop procedure pesquisa;
#criar procedure de cadastro de cursos
#(oque tiver dentro do delimiter é o procedure)
#Parâmetros de entrada:... | true |
06bcc1e3f29d5513f481daaf2ba6c386089c7d67 | SQL | scarecrow80/HR-Portal | /DB/event_schedule.sql | UTF-8 | 975 | 3.171875 | 3 | [] | no_license | CREATE DEFINER=`db_hr_portal` EVENT `Schedule delete checklist`
ON SCHEDULE EVERY 1 MONTH STARTS '2018-05-05 16:20:00'
ON COMPLETION NOT PRESERVE ENABLE COMMENT 'Testing if delete'
DO DELETE FROM `newemployee_has_checklist` WHERE `Newemployee_idNewemployee`
IN (SELECT `idNewemployee` FROM `newemployee` WHERE `startdate... | true |
898ff1495c64316d6965e22567b0b5ff062280f0 | SQL | Jujutsukaisen/ProbabilityPredicting | /JujutsuKaisen-SQL-queries/4.sql | UTF-8 | 371 | 3.71875 | 4 | [] | no_license | SELECT position_name, training_hours FROM positions
INNER JOIN trainee ON positions.position_id = trainee.position_id
INNER JOIN experience ON trainee.enrolle_id = experience.enrolle_id
WHERE training_hours IN (SELECT * FROM (SELECT training_hours FROM experience GROUP BY training_hours ORDER BY training_hours DESC)... | true |
08c0aa2eb3275c30e5d880ddedd481f21988643f | SQL | rafa1944/membrillo-sample | /DBSchema/membrillo-demo.sql | UTF-8 | 16,505 | 3.15625 | 3 | [
"MIT"
] | permissive | -- --------------------------------------------------------
-- Host: localhost
-- Server version: 10.1.20-MariaDB - mariadb.org binary distribution
-- Server OS: Win64
-- HeidiSQL Version: 9.4.0.5125
-- ------------------------------------------------... | true |
fb747a900b63fe22e79c14a2e6a5815b796d4e2f | SQL | avb1003/MinesBattle | /sql/create_users.sql | UTF-8 | 361 | 2.765625 | 3 | [] | no_license | -- --------------------------------------------------------
--
-- Table structure for table `users`
--
CREATE TABLE IF NOT EXISTS `users` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`UserName` varchar(20) UNIQUE NOT NULL,
`FirstName` varchar(20),
`LastName` varchar(20),
`Password` char(41),
PRIMARY KEY (`id`... | true |
fa9d354fd4449e2f67472030ff61807ecebf3474 | SQL | Nasibulin/SQL | /sql-ex/battle_month.sql | UTF-8 | 231 | 2.71875 | 3 | [] | no_license | SELECT date,
DATEFROMPARTS (YEAR (b.date), MONTH (b.date), 1) idate,
DATEADD (DAY,
-1,DATEFROMPARTS (YEAR (dateadd(m,1,b.date)), MONTH (dateadd(m,1,b.date)), 1)
) edate
FROM Battles b | true |
25a40b74ca548398a7a6876d615ccd13dd33ff59 | SQL | sannagare99/nodejs-demo-app | /SQL/Create/SP_getAllDraftInvoiceDetails.sql | UTF-8 | 2,235 | 3.671875 | 4 | [] | no_license | DELIMITER $$
DROP PROCEDURE IF EXISTS `SP_getAllDraftInvoiceDetails` $$
CREATE PROCEDURE `SP_getAllDraftInvoiceDetails`(
in draftBillId int)
BEGIN
-- declare draftbillId int default 0;
/*
select d.Draft_Bill_ID into draftbillId
from draft_bills d inner join ba b
on d.ba_code=b.ba_id
where d.Billing_From_code=fromStat... | true |
b3a658d8c31ac0a458b8f7829eb682f05f467f3c | SQL | backtozero/xt_scripts | /awr/seg_stats.sql | UTF-8 | 2,721 | 3.546875 | 4 | [] | no_license | select
sn.snap_id
,to_char(sn.begin_interval_time,'YYYY-MM-DD hh24:mi') as beg_interval
,sn.instance_number as inst_id
,o.object_type as type
,o.object_name ... | true |
d4992fbc2a435d133f17520bd86be58a6a2eed91 | SQL | hualichenxi/DD-competition | /HiveQL/get_test_X_gap.sql | UTF-8 | 1,202 | 3.03125 | 3 | [] | no_license | -------------------------------test_x_gap1----------------------------
--gap1
create table test_x_gap1 as select A.id,A.district_id,sum(B.gap)
from test_t A left join test_order B
on A.district_id = B.start_district_id where (A.id - ((day(B.o_date)-1)*144+B.time_slice))=1
group by A.id,A.district_id;
--select co... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.