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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
a8228cd3d27ea1dc015a90d77ec345d0844bdb11 | SQL | Evangelize/api-server | /docs/update-types.sql | UTF-8 | 3,157 | 3.21875 | 3 | [
"BSD-3-Clause",
"BSD-2-Clause"
] | permissive | ALTER TABLE `classes` CHANGE `id` `id` BINARY(16) NOT NULL;
ALTER TABLE `classMeetingDays` CHANGE `id` `id` BINARY(16) NOT NULL;
ALTER TABLE `divisionClassAttendance` CHANGE `id` `id` BINARY(16) NOT NULL;
ALTER TABLE `divisionClasses` CHANGE `id` `id` BINARY(16) NOT NULL;
ALTER TABLE `divisionClassTeachers` CHANGE `id`... | true |
e718f4b7dbd0345a1b016264a87a0a47453a5e5f | SQL | jessica403/atividades-mysql | /sql/Li2exe3.sql | UTF-8 | 4,055 | 3.875 | 4 | [] | no_license | /*Crie um banco de dados para um serviço de farmácia de uma empresa, o nome do banco
deverá ter o seguinte nome db_farmacia_do_bem, onde o sistema trabalhará com as
informações dos produtos desta empresa.
O sistema trabalhará com 2 tabelas tb_produto e tb_categoria.
siga exatamente esse passo a passo:
Crie uma tabel... | true |
798276db08d1f38629e8cb31662315287f953d8b | SQL | mrcoco/dephub | /database/feedback_pengajar.sql | UTF-8 | 1,660 | 2.703125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 3.4.5
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Waktu pembuatan: 07. Desember 2012 jam 09:56
-- Versi Server: 5.5.16
-- Versi 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_CL... | true |
f511b6c4a5c9daa8ff20f89e1ea5ea173aedbbf7 | SQL | sergiomt/hipergate | /classes/trunk/com/knowgate/hipergate/datamodel/procedures/mysql/addrbook.ddl | UTF-8 | 1,177 | 3.4375 | 3 | [] | no_license | CREATE PROCEDURE k_sp_del_meeting (MeetingId CHAR(32))
BEGIN
UPDATE k_activities SET gu_meeting=NULL WHERE gu_meeting=MeetingId;
DELETE FROM k_x_meeting_contact WHERE gu_meeting=MeetingId;
DELETE FROM k_x_meeting_fellow WHERE gu_meeting=MeetingId;
DELETE FROM k_x_meeting_room WHERE gu_meeting=MeetingId;
DELET... | true |
15a62c08e1ee464223b29e6c3723e24bcd7a107c | SQL | ArastoSahbaei/JWT-Template-SpringBoot | /src/main/resources/import.sql | UTF-8 | 1,840 | 2.875 | 3 | [] | no_license | /*-- Scans
insert into scan(id, date_created, latitude, longitude, qr_code) values (1, '2018-10-08 10:30:00', 57.4, 12.5, '87790472-785b-438b-aafe-fe6291b6f6ea');
-- Components
insert into component(id, date_created, latitude, longitude, qr_code) values (1, '2018-10-08 10:30:00',57.4, 12.5, '87790472-785b-438b-aafe-fe... | true |
df6270d34f7011334422789518ffab6314f60c27 | SQL | atrievel/Senior-Year | /0334 - Web Design/Final/source/tv.sql | UTF-8 | 205 | 2.625 | 3 | [] | no_license | CREATE TABLE TV (
id INT(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY,
show_name VARCHAR(255) NOT NULL,
episode VARCHAR(255) NOT NULL,
genre VARCHAR(255) NOT NULL,
price DECIMAL(15,2)
) | true |
1d2c759d77c0d56786b161fc271085e656c1cc42 | SQL | domantax/mysql_homework | /bonus.sql | UTF-8 | 2,740 | 3.484375 | 3 | [] | no_license | CREATE TABLE News(
newsId INT NOT NULL AUTO_INCREMENT,
`text` TEXT NOT NULL,
`date` TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY(newsId)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
CREATE TABLE Comments(
commentId INT NOT NULL AUTO_INCREMENT,
`text` VARCHAR(255) NOT ... | true |
80394f9ef918f7dab5121781acc34b2bf45a6a5c | SQL | mishajib/Login---Registration-System-with-PHP-OOP | /oop_lr.sql | UTF-8 | 1,860 | 3 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 11, 2019 at 10:42 PM
-- Server version: 10.1.38-MariaDB
-- PHP Version: 7.3.4
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
0e18e0e184ba36d473830a55604f1b77e518c43d | SQL | rin-nas/postgresql-patterns-library | /views/pg_bloat_info.sql | UTF-8 | 3,076 | 4.71875 | 5 | [
"MIT"
] | permissive | /**
* The view shows bloat in tables and indexes.
*/
CREATE OR REPLACE VIEW pg_bloat_info AS
WITH constants AS
(
SELECT current_setting('block_size')::numeric AS bs
, 23 AS hdr
, 4 AS ma
)
, bloat_info AS
(
SELECT ma
,bs
,schemaname
,tablename
, (datawidth + (hdr + ma - (case when hdr%ma = 0 ... | true |
b8533c81aff63f54973fa5b86c0898e9341b2ee4 | SQL | mudit-04/DBMS | /Assignments/Assignment1/Ques3.sql | UTF-8 | 415 | 3.625 | 4 | [] | no_license | Select distinct(customer_list.name) as Customer, customer_list.country as Country from customer_list
join rental
on customer_list.ID = rental.customer_id
join inventory
on inventory.inventory_id = rental.inventory_id
join film_category
on film_category.film_id = inventory.film_id
join category
on category.category_id =... | true |
5f2e9e64aa65bdd34b96c55167656d179dda5c48 | SQL | she-ryl/BONGCALOS-BSIT3B | /BONGCALOS -Sheryl/database/she.sql | UTF-8 | 3,905 | 2.75 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Oct 09, 2021 at 11:51 AM
-- 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 |
0696f3f3743232102d77c38f4de80cb621fc8425 | SQL | realcredit1/FREEDOM- | /triggers.sql | UTF-8 | 1,103 | 3.8125 | 4 | [] | no_license | /*
* File: triggers.sql
* All bids are on "open" auctions (after start time and before end time)
*/
create trigger time_insert
before insert on Time
begin
raise(abort, 'Error: Time may not contain more than one tuple');
end;
create trigger time_delete
before delete on Time
begin
raise(abort, 'Error: Cannot delet... | true |
f52d570a24077fe4dd2cfc6ba53d7ae6ff0e6b52 | SQL | dixie-chick/US_Insurance_Premiums_Analysis | /Insurance_Data.sql | UTF-8 | 1,693 | 4.3125 | 4 | [] | no_license | -- Create table of initial data
-- DROP TABLE insurance_raw;
CREATE TABLE insurance_raw (
age INT NOT NULL,
sex VARCHAR NOT NULL,
bmi FLOAT NOT NULL,
children VARCHAR NOT NULL,
smoker VARCHAR NOT NULL,
region VARCHAR NOT NULL,
charges FLOAT(2) NOT NULL
);
-- Create cleaned table of insurance data
-- DR... | true |
9778facdaa0190e6627c9602b1f2e1667e43190c | SQL | piikuman/ClinicaDental | /sql/2 - Inserción de Datos Pacientes.sql | ISO-8859-3 | 1,466 | 2.796875 | 3 | [] | no_license | DECLARE
OID_RAFAEL INTEGER;
OID_MANUEL INTEGER;
OID_DIEGO INTEGER;
OID_USER INTEGER;
OID_DOC INTEGER;
OID_ESP INTEGER;
OID_TRA INTEGER;
OID_CI INTEGER;
OID_CI2 INTEGER;
OID_ADMIN INTEGER;
BEGIN
INSERTAR_PACIENTE('RAFAEL', 'SALAS CASTIZO', '29530695Y',DATE '1999-04-14', 'rafasalas27@gmail.com','Sevilla','c/Trastama... | true |
a6f7b82df4a20fcc848c87a5d4b7b2c81bdb2f97 | SQL | ArturMarten/MS | /conf/evolutions/default/2.sql | UTF-8 | 911 | 3.40625 | 3 | [] | no_license | # --- !Ups
create or replace view main_most_commentated as
select article.id,
article.title,
article.intro,
count(*) AS count
from article,comment
where article.id = comment.article_id
group by article.id
order by count(*) desc
limit 10;
create or replace view main_most_viewed as
select ... | true |
9e00b12adf4d41911492204befae26f9a7c10b6e | SQL | silence-do-good/stress-test-Postgres-and-MySQL | /dump/high/day10/select1159.sql | UTF-8 | 178 | 2.625 | 3 | [] | no_license |
SELECT timeStamp, temperature FROM ThermometerOBSERVATION o
WHERE timestamp>'2017-11-09T11:59:00Z' AND timestamp<'2017-11-10T11:59:00Z' AND temperature>=10 AND temperature<=78
| true |
03ba585f496d706899e396b2703596c4a7556f24 | SQL | pbryzek/berkeley-bigdata | /module/crud.sql | UTF-8 | 892 | 3.96875 | 4 | [] | no_license | from pyspark.sql.functions import *
df.select(avg(df["salary"])
df.select(max(df[]"slarya"]))
CREATE TABLE doctors (
id INT PRIMARY KEY NOT NULL,
speciality TEXT,
taking_patients BOOLEAN
);
CREATE TABLE patients (
id INT NOT NULL,
doctor_id INT NOT NULL,
health_status TEXT,
PRIMARY KEY (id, doctor_id),
FOREIGN... | true |
52a70a317db326dc22da0bcb71324cf3c40080c5 | SQL | Sligowebworks/datacruncherdownload | /DataCruncherFeature/DevCode/ListColumnNamesInAView.sql | UTF-8 | 1,250 | 3.109375 | 3 | [] | no_license | -- shows which columns go with which views
SELECT --ob.Name,
--ob.ID,
col.Name, col.colorder
FROM sysobjects ob INNER Join syscolumns col on ob.id = col.id
WHERE ob.type = 'V' AND ob.uid = 1
AND ob.Name = 'v_Template_Keys'
/*
NOT IN ('sysalternates', 'sysconstraints', 'syssegments', 'Dropoutcube', 'v_AP_KEY... | true |
b54e9d709e4504038559d6080f35f539e498f686 | SQL | jordanmuller/MaFormationWF3 | /php/Doc MySQL/wf3_bibliotheque.sql | UTF-8 | 1,576 | 3.796875 | 4 | [] | no_license | -- Création de la database
CREATE DATABASE wf3_bibliotheque;
-- Utilisation de la db
USE wf3_bibliotheque;
-- Déclaration des tables
CREATE TABLE abonne (
id_abonne INT(3) NOT NULL AUTO_INCREMENT,
prenom VARCHAR(255) NOT NULL,
PRIMARY KEY (id_abonne)
) ENGINE=InnoDB;
INSERT INTO abonne (id_abonne, prenom) VALUES
(1... | true |
9911e4df2aa36703b1e48677e548fed3cd846e8c | SQL | Mihai551/Gestiunea-fluxului-de-documente-in-vederea-debirocratizarii | /SQL/gestiunea_documentelor-employee.SQL.sql | UTF-8 | 487 | 2.96875 | 3 | [] | no_license | CREATE TABLE `employee` (
`legalEntityEmailAddress` varchar(45) DEFAULT NULL,
`firstName` varchar(45) DEFAULT NULL,
`lastName` varchar(45) DEFAULT NULL,
`pin` varchar(45) DEFAULT NULL,
`emailAddress` varchar(45) DEFAULT NULL,
`type` varchar(45) DEFAULT 'employee',
KEY `emailAddress_idx` (`emailAddress`),
... | true |
1043862ea6cf987440c2caee9d0f6bf2e4bc4db2 | SQL | KMani1992/project_works | /MopedTrans/MySQL_QryFile/WA_Ut_Qry.sql | UTF-8 | 2,093 | 3.84375 | 4 | [] | no_license |
use drawmaindb;
show tables;
use drawtrandb;
delimiter $$
CREATE TABLE `film` (
`film_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
`title` varchar(255) NOT NULL,
`description` text,
`release_year` year(4) DEFAULT NULL,
`language_id` tinyint(3) unsigned NOT NULL,
`original_language_id` tinyint(3) un... | true |
d4d142d348ba25c2760848a24d243258b895630d | SQL | leandro-merlo/site-administravel-php | /dump copy.sql | UTF-8 | 1,958 | 3.484375 | 3 | [] | no_license | -- MySQL Workbench Forward Engineering
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTI... | true |
62c56a8750d1c5a224243e2a9054bd00df8eb4ca | SQL | silence-do-good/stress-test-Postgres-and-MySQL | /dump/high/day10/select0539.sql | UTF-8 | 178 | 2.609375 | 3 | [] | no_license |
SELECT timeStamp, temperature FROM ThermometerOBSERVATION o
WHERE timestamp>'2017-11-09T05:39:00Z' AND timestamp<'2017-11-10T05:39:00Z' AND temperature>=10 AND temperature<=48
| true |
7a1ddd5e0f94496f4ee7b67a635c1d4c99da7e41 | SQL | CherisMoor/SQLDatabaseHotels | /2.Join.sql | UTF-8 | 213 | 2.875 | 3 | [] | no_license | select Reservation.room_num, Reservation.guest_id, Reservation.rate
from Reservation
join Rooms
on Reservation.room_num = Rooms.room_num and Reservation.guest_id = Rooms.Guest_Id and Reservation.rate = Rooms.rate; | true |
deeae679bb90e519dcc44d9460da91e1e9d2251d | SQL | orlinwilliams/proyectoAvisosHN | /data/avisoshn.sql | UTF-8 | 82,869 | 3.578125 | 4 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.2
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1:3308
-- Tiempo de generación: 20-05-2020 a las 23:26:39
-- Versión del servidor: 8.0.18
-- Versión de PHP: 7.3.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/... | true |
b01722b8b5dc5e191a6051a2b7a293d335cd7909 | SQL | sky-bin/sephora2 | /Public/Backup/ri_admin_users_20150518122631_293.sql | UTF-8 | 924 | 2.640625 | 3 | [] | no_license | /* This file is created by MySQLReback 2015-05-18 12:26:31 */
/* 创建表结构 `ri_admin_users` */
DROP TABLE IF EXISTS `ri_admin_users`;/* MySQLReback Separation */ CREATE TABLE `ri_admin_users` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`role_id` int(10) unsigned NOT NULL DEFAULT '0',
`username` varchar(32) NO... | true |
71e52a2120477ab67592e14e1fd86792158aa727 | SQL | matahariku/www | /imprimante.sql | UTF-8 | 2,190 | 2.875 | 3 | [] | no_license | -- MySQL dump 10.15 Distrib 10.0.37-MariaDB, for debian-linux-gnu (x86_64)
--
-- Host: localhost Database: evolution
-- ------------------------------------------------------
-- Server version 10.0.37-MariaDB-0+deb8u1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET... | true |
1307d53f27dc5777daacb5375411976f4f579952 | SQL | RdeHevia/Launch-School | /LS180-Database-Foundations/Exercises/DML10.sql | UTF-8 | 147 | 2.609375 | 3 | [] | no_license | DELETE FROM parts
WHERE device_id = (
SELECT id FROM devices
WHERE name = 'Accelerometer'
);
DELETE FROM devices
WHERE name = 'Accelerometer'; | true |
b14d397b354298fa7a7ab5da5646a3f42612fd6c | SQL | mr-zero-03/sql-training | /company_database/procedures.sql | UTF-8 | 1,544 | 3.78125 | 4 | [] | no_license | \! echo "-------------------------------count_employees_in_branch procedure"
DELIMITER $$
DROP PROCEDURE IF EXISTS count_employees_in_branch$$
CREATE PROCEDURE count_employees_in_branch( IN search_branch_id INT, OUT employees INT )
BEGIN
SELECT search_branch_id AS 'I am going to search in the branch';
SELECT * FRO... | true |
5a77b0e41146998d01e701eb7484041d404748c0 | SQL | doytsujin/pixie | /src/cloud/plugin/schema/000001_create_plugin_releases_table.up.sql | UTF-8 | 638 | 3 | 3 | [
"Apache-2.0"
] | permissive | CREATE TABLE plugin_releases (
-- Human-readable name for the plugin.
name varchar(1024) NOT NULL,
-- A unique identifier for the plugin, specified by the plugin writer.
id varchar(1024) NOT NULL,
-- A description about the plugin.
description varchar(1024),
-- SVG for the logo to use for the plugin.
lo... | true |
e64449cf81a543f4bc94abc53ac89121b5ad9f3f | SQL | alifahfathonah/elearning-laboratorium-unsika | /db2.sql | UTF-8 | 4,709 | 3.078125 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | /*
SQLyog Community v13.1.5 (64 bit)
MySQL - 10.4.6-MariaDB : Database - elearninglab
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CH... | true |
4c4b81e90e3c7cda53209deecfab8b0e4b1fee03 | SQL | blumenthals/RapidWeb | /rw-includes/schema.sql | UTF-8 | 8,536 | 3.4375 | 3 | [] | no_license | SET NAMES 'utf8';
DELIMITER ;;
CREATE TABLE `archive` (
pagename VARCHAR(100) NOT NULL DEFAULT '',
version INT NOT NULL DEFAULT 1,
flags INT NOT NULL DEFAULT 0,
author VARCHAR(100),
lastmodified INT NOT NULL DEFAULT 0,
created INT NOT NULL DEFAULT 0,
content MEDIUMTEXT NOT NULL,
refs TE... | true |
404e1ba34a1ff7b3b58c734f17d74ac94a8c4eb8 | SQL | mayurpatil1211/jobfeed | /jobs.sql | UTF-8 | 2,530 | 2.90625 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.5.4.1deb2ubuntu2
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Mar 27, 2017 at 11:27 AM
-- Server version: 5.7.17-0ubuntu0.16.04.1
-- PHP Version: 7.0.15-0ubuntu0.16.04.4
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_C... | true |
44f4c328e911a7fe9f26367cb1be5abed3a2628c | SQL | jrocktorrens/JoinIn_social-app-by-shared-interests | /backend/migrations/002.do.sql | UTF-8 | 631 | 2.578125 | 3 | [
"Apache-2.0"
] | permissive |
CREATE TABLE IF NOT EXISTS pets (
pet_id int AUTO_INCREMENT,
type VARCHAR(200) NOT NULL,
name VARCHAR(200) NOT NULL,
adoptionStatus VARCHAR(200) NOT NULL,
breed VARCHAR(200) NOT NULL,
color VARCHAR(200) NOT NULL,
allergies V... | true |
210a461ba3a9b923ae6ea4d63b3beb808b558334 | SQL | lzhxxn/Oracle | /5_Modeling/2_ERD(부서_사원)/scott(forward).sql | UHC | 1,260 | 4.21875 | 4 | [] | no_license | -- μ
CREATE TABLE "DEPT" (
"DEPTNO" NUMBER(2) NOT NULL, -- μȣ
"DNAME" VARCHAR2(14) NULL, -- μ̸
"LOC" VARCHAR2(13) NULL --
);
-- μ ⺻Ű
CREATE UNIQUE INDEX "PK_DEPT"
ON "DEPT" ( -- μ
"DEPTNO" ASC -- μȣ
);
-- μ
ALTER TABLE "DEPT"
ADD
CONSTRAINT "PK_DEPT" -- μ ⺻Ű
PRIMARY KEY (
"DEPTNO" -- μ... | true |
3ed0c937238cd3b697ac4050914f2ce342e2c031 | SQL | lgcarrier/AFW | /5.2.3/Database/Constraints/AFW_36_TYPE_DON_UK1.sql | UTF-8 | 120 | 2.5625 | 3 | [
"MIT"
] | permissive | SET DEFINE OFF;
ALTER TABLE AFW_36_TYPE_DON ADD (
CONSTRAINT AFW_36_TYPE_DON_UK1
UNIQUE (CODE)
ENABLE VALIDATE)
/
| true |
7628d67ebb3d29564532723691a8ca55d2b2d6f9 | SQL | juanlvo/plsql-course | /S17L155.sql | UTF-8 | 484 | 2.90625 | 3 | [] | no_license | DELETE FROM departments;
CREATE OR REPLACE TRIGGER dept_check_time BEFORE INSERT OR UPDATE OR DELETE ON departments
BEGIN
IF to_number(to_char(SYSDATE, 'hh24')) NOT BETWEEN 8 AND 15 THEN
RAISE_APPLICATION_ERROR(-20010, 'DML operations not allowed now');
END IF;
END;
DELETE FROM departments;
DELETE FROM depar... | true |
f55c8c0820cad8c511958fc8145f28b65218c6d7 | SQL | delphi1977/NewDicomPACS | /Database/oracle/constraints/asu.t_sdf_element_synonym.sql | UTF-8 | 233 | 2.953125 | 3 | [] | no_license | ALTER TABLE ASU.T_SDF_ELEMENT
DROP CONSTRAINT T_SDF_ELEMENT_SYNONYM
/
--
-- Non Foreign Key Constraints for Table T_SDF_ELEMENT
--
ALTER TABLE ASU.T_SDF_ELEMENT ADD (
CONSTRAINT T_SDF_ELEMENT_SYNONYM
UNIQUE (FC_SYNONYM))
/
| true |
de88b21935b265a14fb84a78fa601208c073b003 | SQL | zma9216/SQLite_Indexing_Assignment | /table.sql | UTF-8 | 209 | 2.546875 | 3 | [] | no_license | CREATE TABLE Parts (
partNumber INTEGER, -- a UPC code
partPrice INTEGER, -- in the [1, 100] range
needsPart INTEGER, -- a UPC code
madeIn TEXT, -- a country (2 letters) code
PRIMARY KEY(partNumber)
); | true |
caeebb7440c2439ae45ab47b7b3732d037ca19a1 | SQL | caiocutrim/test-liz | /data/users.sql | UTF-8 | 1,267 | 3.015625 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.0.4
-- http://www.phpmyadmin.net
--
-- Máquina: localhost
-- Data de Criação: 05-Set-2014 às 20:17
-- Versão do servidor: 5.6.12-log
-- versão do PHP: 5.4.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CL... | true |
9b4d1d0e854d9b6d0ad7de660ff3dc6ab600d33a | SQL | Bass360/CandidatosAPP | /ScriptCandidatosAPPDB.sql | UTF-8 | 330 | 2.625 | 3 | [] | no_license | BEGIN TRANSACTION;
CREATE TABLE IF NOT EXISTS "Candidatos" (
"candidatoID" INTEGER,
"cedula" TEXT NOT NULL UNIQUE,
"nombre" TEXT NOT NULL,
"apellido" TEXT NOT NULL,
"fechaNacimiento" TEXT NOT NULL,
"trabajoActual" TEXT,
"expectativaSalarial" INT,
"observaciones" TEXT,
PRIMARY KEY("candidatoID" AUTOINCREMENT)
)... | true |
083f44620d65549fcf0fa5c62713ba84fa3e8698 | SQL | oppalu/Hotels | /hotel_qunar_hotel.sql | UTF-8 | 2,353 | 2.890625 | 3 | [] | no_license | CREATE DATABASE IF NOT EXISTS `hotel` /*!40100 DEFAULT CHARACTER SET utf8 */;
USE `hotel`;
-- MySQL dump 10.13 Distrib 5.7.12, for osx10.9 (x86_64)
--
-- Host: localhost Database: hotel
-- ------------------------------------------------------
-- Server version 5.7.16
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHAR... | true |
afeab7f65f6a62d7d8053bd9a6dac2ce90c82e6e | SQL | duckdb/duckdb | /benchmark/clickbench/queries/load.sql | UTF-8 | 3,534 | 2.71875 | 3 | [
"MIT"
] | permissive | CREATE TABLE hits
(
WatchID BIGINT NOT NULL,
JavaEnable SMALLINT NOT NULL,
Title TEXT,
GoodEvent SMALLINT NOT NULL,
EventTime TIMESTAMP NOT NULL,
EventDate Date NOT NULL,
CounterID INTEGER NOT NULL,
ClientIP INTEGER NOT NULL,
RegionID INTEGER NOT NULL,
UserID BIGINT NOT NULL,
... | true |
ad0e343d7aa1694f018ee34a8d1d22dd4c97a6cb | SQL | annmarie/sandbox | /graveyard/testbox/testboxdb.sql | UTF-8 | 310 | 2.984375 | 3 | [] | no_license |
DROP DATABASE testbox;
CREATE DATABASE testbox;
USE testbox;
CREATE TABLE notes (
id INT(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY,
rcp_notes MEDIUMTEXT,
created TIMESTAMP DEFAULT NOW(),
updated TIMESTAMP
);
CREATE TRIGGER notes_create BEFORE INSERT ON `notes`
FOR EACH ROW SET NEW.updated = NOW();
| true |
31bd223912cd0d32e2ea04d24927718ff01cde35 | SQL | atomblastt/rest_server | /sql/rest_server.sql | UTF-8 | 3,929 | 3.125 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 03 Des 2019 pada 10.48
-- Versi server: 10.1.38-MariaDB
-- Versi PHP: 7.3.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARA... | true |
67083df2cd4c8f6fd45dc3b7cf19cd570847388e | SQL | santunioni/FC-Challenges | /pfa-docker-1/sql/seed.sql | UTF-8 | 1,538 | 3.09375 | 3 | [] | no_license | SET NAMES 'utf8';
-- CREATE USER 'developer'@'localhost' IDENTIFIED WITH mysql_native_password BY 'lalalal12312424TESTE';
-- GRANT SELECT ON FullCycle.* TO 'developer'@'localhost' WITH GRANT OPTION;
CREATE USER 'developer'@'%' IDENTIFIED WITH mysql_native_password BY 'lalalal12312424TESTE';
GRANT SELECT ON FullCycle.* ... | true |
991df98321bb7f2c435a5c8dc42bd0300d8b6f1e | SQL | Ahmet-Ozkaya/PHP | /demo.sql | UTF-8 | 3,919 | 3.390625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 3.2.4
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Aug 02, 2020 at 09:29 AM
-- Server version: 5.1.41
-- PHP Version: 5.3.1
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_S... | true |
3b02af6de4664e5ee1d81f93b3c4cc35068127d1 | SQL | ncevallos/bamazon | /query.sql | UTF-8 | 996 | 3.1875 | 3 | [] | no_license |
create database bamazon;
drop database if exists bamazon;
use bamazon;
create table products(
item_ID integer(11) auto_increment not null,
product_name varchar(50) not null,
department_name varchar(30),
price float,
stock_quantity integer(10),
primary key(item_ID)
);
select * from product... | true |
0d6787dbbf7d1a607aba6f166597e92ad8bf3cea | SQL | oscar676/proyecto_peliculas | /script/BaseDatosPeliculasv1.0.sql | UTF-8 | 2,044 | 3.140625 | 3 | [] | no_license | -- --------------------------------------------------------
-- Host: 127.0.0.1
-- Versión del servidor: 5.6.17 - MySQL Community Server (GPL)
-- SO del servidor: Win64
-- HeidiSQL Versión: 9.3.0.5027
-- -------------------------------------------------------... | true |
4a4099408dd3c00783cff1ae0a87f409c674e313 | SQL | VoloviZzz/prokatmgn | /patches/1.1.0/_2018-07-06__1.1.0.sql | UTF-8 | 2,569 | 3.09375 | 3 | [] | no_license | ALTER TABLE `post_categories` ADD `target_id` INT(11) NOT NULL AFTER `id`;
INSERT INTO `components` (`id`, `title`, `ctrl`, `block_id`, `static`, `once`, `styles`, `scripts`, `default_config`, `created`) VALUES (NULL, 'Админка книги памяти', 'memory-book-admin', '2', '0', '0', NULL, NULL, NULL, CURRENT_TIMESTAMP);... | true |
8f5e2760742f053733c327aa7abe0e18d8053a00 | SQL | pmillart/WorkInProgress | /clickhouse/9-most-trending-dest.sql | UTF-8 | 250 | 3.3125 | 3 | [] | no_license | SELECT
DestCityName,
sum(Year = 2014) AS c2014,
sum(Year = 2015) AS c2015,
c2015 / c2014 AS diff
FROM ontime
WHERE Year IN (2014, 2015)
GROUP BY DestCityName
HAVING c2014 > 10000 AND c2015 > 1000 AND diff > 1
ORDER BY diff DESC
;
| true |
422aa1ba70e2e76797e5b5b8a620dbba2dffca67 | SQL | aidank1234/564P1 | /query5.sql | UTF-8 | 289 | 4.09375 | 4 | [] | no_license | -- Find the number of sellers whose rating is higher than 1000.
WITH sellerID AS (
SELECT DISTINCT Seller FROM Item
),
sellers AS (
SELECT UserID, Rating FROM User WHERE EXISTS (SELECT Seller FROM sellerID WHERE Seller = UserID)
)
SELECT COUNT(*) FROM sellers WHERE Rating > 1000; | true |
2b46db230393b188f1b8ba3e0192e902f5033daf | SQL | loocor/zdmin | /model/ums/gozero_ums_member_product_category_relation.sql | UTF-8 | 321 | 3.171875 | 3 | [] | no_license | create table ums_member_product_category_relation
(
id bigint auto_increment,
member_id bigint null,
product_category_id bigint null,
UNIQUE KEY `id` (`id`) USING BTREE,
PRIMARY KEY (`id`) USING BTREE
)
comment '会员与商品分类关系表 (用户喜欢的分类) ';
| true |
16fdfd32a5a8ed6db9f50b5e401bae48a830f46e | SQL | FundacionBlockchainChile/SQL_exercises | /my_store.sql | UTF-8 | 1,642 | 3.875 | 4 | [] | no_license | create database if not exists my_store;
use my_store;
create table if not exists stores(
store_id int not null auto_increment,
primary key(store_id)
) engine = InnoDB;
create table if not exists products(
product_id int not null auto_increment,
primary key(product_id),
store_code int not null,
constraint... | true |
d5464e15f22cf7dbc433a674a6ff388944d88469 | SQL | jaymazkm96/Xavo | /college-rep/tables/event.sql | UTF-8 | 564 | 2.96875 | 3 | [] | no_license |
CREATE TABLE IF NOT EXISTS `event` (
`event_id` int(11) NOT NULL AUTO_INCREMENT,
`event_name` varchar(250) NOT NULL,
`genre_id` int(11) NOT NULL,
PRIMARY KEY (`event_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=11 ;
INSERT INTO `event` (`event_id`, `event_name`, `genre_... | true |
949b8c8dbcaac5b43aee2a8c4a30839fd94962f1 | SQL | kakabisht/Bluedart | /Sejal-queries.sql | UTF-8 | 1,926 | 3.765625 | 4 | [] | no_license | SELECT * from Employee where name= “Shyam”;
SELECT * from employee WHERE branchid = (SELECT branchid FROM Branch WHERE address="Dholka");
SELECT * FROM Employee WHERE Address='Mahal' OR Address='Haryana';
SELECT * FROM Transfer WHERE parcelid = (SELECT parcelid FROM Parcel WHERE weight=45);
SELECT * FROM Transfer WHE... | true |
a343427d073424426db5cf440a3400d0abf69a6c | SQL | anjuls/Richards-Monitor | /Scripts/topSQLbyClusterWaitTimeAWR.sql | UTF-8 | 1,055 | 3.5 | 4 | [] | no_license | SELECT *
FROM (SELECT round(sqt.clwait / 1000000,1) "CWT (s)"
, round(DECODE(sqt.elap, 0, sqt.clwait, 100 * sqt.clwait / sqt.elap),1) "CWT % of Elapsd Time"
, round(sqt.elap / 1000000,1) "Elapsed Time (s)"
, round(sqt.cput / 1000000,1) "CPU Time (s)"
, sqt.exec "Executions"
... | true |
50cc2075324f0db723b262369122707aefac1c34 | SQL | abhinayshrestha/socialnetwork | /Database/notice.sql | UTF-8 | 1,157 | 3.0625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 3.3.9
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: May 18, 2018 at 02:49 PM
-- Server version: 5.5.8
-- PHP Version: 5.3.5
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SE... | true |
5c65c7959116e85088208461ca4f9b1e3fd42675 | SQL | wangyunwu5/mhics2019 | /src/main/resources/templates/sql/task.sql | UTF-8 | 1,819 | 3.015625 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : w_mysql
Source Server Version : 50725
Source Host : localhost:3306
Source Database : mhics
Target Server Type : MYSQL
Target Server Version : 50725
File Encoding : 65001
Date: 2019-06-22 18:30:06
*/
SET FOREIGN_KEY_CHEC... | true |
2df629c3b495f66af4c2fceb89ee740ed02b6edc | SQL | Marissa1999/Database-Assessments | /Assignment 2/Assign2/queryRiverTables.sql | UTF-8 | 2,275 | 3.78125 | 4 | [] | no_license | --queryRiverTables.sql (James River Database)
--Name: Marissa Gonçalves
--Due Date: November 16, 2018
CONNECT scott/tiger;
SET LINESIZE 180;
SET PAGESIZE 60;
SET ECHO ON;
SPOOL "D:\Semester III\Database I\Assignments\Assign2\Assign2_Spool.txt";
START "D:\Semester III\Database I\Assignments\Assign2\dropRiverTable... | true |
e138c6fa1f9b15cccc91c73b99ca8919c820a1a9 | SQL | ToborTheGreat/Repository01 | /geo.market_areas.sql | UTF-8 | 3,218 | 3.5625 | 4 | [] | no_license | --
-- PostgreSQL database dump
--
SET statement_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = off;
SET check_function_bodies = false;
SET client_min_messages = warning;
SET escape_string_warning = off;
SET search_path = geo, pg_catalog;
ALTER TABLE ONLY geo.market_areas DROP CONSTRAINT... | true |
683a233a2b970e61dd474b1d82edb1b8304675ac | SQL | qpyntik/romanchik | /GIT_project/my_code/rims.tsybridgeRestr.load.sql | UTF-8 | 1,672 | 2.8125 | 3 | [] | no_license | /*
CREATE TABLE Restr.tsybridgecreditrestr
(
CPNC char(6),
DLID numeric(15,0),
RefContract char(25),
EOS_DLR char(14),
EOB_DLP char(3),
BOS_ND char(21),
BalStart numeric(15,2),
BalAll numeric(15,2),
BalBody numeric(15,2),
BalPrc numeric... | true |
bdf9eb7a337a56876cfd6c086adbb6b8f8862674 | SQL | erick2014/formasIntimas | /crm_movil_copia.sql | UTF-8 | 25,347 | 3.15625 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 5.5.25a, for Linux (i686)
--
-- Host: localhost Database: crm_movil
-- ------------------------------------------------------
-- Server version 5.5.25a
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/... | true |
c0cb3c04c7e893d392c490f2f8eeb435ff740c3c | SQL | juzna/nette-example-fifa | /fifa.sql | UTF-8 | 2,590 | 3.359375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 3.3.8
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Dec 07, 2010 at 10:20 PM
-- Server version: 5.1.41
-- PHP Version: 5.3.2-1ubuntu4.5
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_... | true |
cc324735b833997c3eab39b9a6d5ceb3b5249318 | SQL | nskv/sna | /bigquery/repo-star.sql | UTF-8 | 3,642 | 4.1875 | 4 | [] | no_license | SELECT query1.repository_url as repo1, query2.repository_url as repo2, COUNT(query1.user) AS weight
FROM
-- identical query 1
(
SELECT user, repo_info.repository_url as repository_url
FROM
(
SELECT repo_last_events.repository_url as repository_url
FROM
... | true |
f187063a35ff90fe44855bd24fae4830c4453e91 | SQL | fleetmack/mines | /me/Planned Giving/susan/heritage_society_by_date_added.sql | UTF-8 | 1,708 | 3.296875 | 3 | [] | no_license | select e.id_number,
e.pref_mail_name,
e.pref_name_sort,
e.record_type_code,
e.pref_class_year,
ad.p_cityline,
pg.total_years_giving,
g.gift_club_start_date
from gift_clubs g,
a_dw_pg_prospecting pg,
a_dw_address_good ad,
entity ... | true |
f3dc9fed15dbf82a0067aaefbec1f9955d5c87ef | SQL | ShadarRim/GUDatabases | /6/5.sql | WINDOWS-1251 | 844 | 3.390625 | 3 | [] | no_license | USE vk;
SHOW TABLES;
-- - , ( )
--
SELECT user_id, SUM(num) as sumnum FROM (
SELECT id as user_id, 0 as num from users
UNION ALL
SELECT user_id, COUNT(*) as num FROM likes GROUP BY user_id
UNION ALL
SELECT from_user_id as user_id, COUNT(*) as num FROM messages GROUP BY from_user_id
U... | true |
eeb56f7cb6b4e6525d4c33c85f5e8ec8a501a83b | SQL | eileenbyrne/my-sql-scripts | /parameterized query-more than 1 param2.sql | UTF-8 | 165 | 2.640625 | 3 | [] | no_license | -- will get gpa scores that are 2.5 because based on the calculated set, @gpa is 2.5
set @gpa = 2.0;
set @gpa = @gpa + .5;
select *
from student
where gpa = @gpa; | true |
f70ffb1a4e0c3e13808bd953c91b1fec45d85ba3 | SQL | Marina-Chernyuk/Lesson_6_mysql | /Lesson_6.sql | UTF-8 | 1,987 | 4.21875 | 4 | [] | no_license | USE vk;
/* Задание 1: Пусть задан некоторый пользователь. Из всех пользователей соц. сети найдите человека, который больше всех общался с выбранным пользователем (написал ему сообщений).*/
SELECT count(*) mess, friend FROM
(SELECT body, to_user_id AS friend FROM messages WHERE from_user_id = 3
UNION
SELECT body... | true |
daee74e53c727367680fd766cd597bbd02e5c62c | SQL | rebeccarkeenan/sales_data_analytics | /panel2.sql | UTF-8 | 698 | 4.21875 | 4 | [
"MIT"
] | permissive | WITH t1 AS
(SELECT i.inventory_id, f.title, DATE_PART('day', r.return_date - r.rental_date) AS days_returned_after_rental, f.rental_duration
FROM rental r
JOIN inventory i
USING(inventory_id)
JOIN film f
USING(film_id)
GROUP BY 2,1,3,4
ORDER BY 2),
t2 AS
(SELECT t1.tit... | true |
9356e9815ad794b853f5679c61954a86a0142523 | SQL | kangqi0421/sql | /CREATE_DB/recyclebin_off.sql | UTF-8 | 509 | 2.796875 | 3 | [] | no_license | --
-- recycle bin OFF
--
WHENEVER SQLERROR EXIT SQL.SQLCODE
-- kontrola nastaveni
set lin 180
col name for a40
col value for a20
prompt kontrola nastaveni init parametru recyclebin
SELECT name, value
FROM
v$parameter
WHERE
name IN ('recyclebin')
;
-- recycle bin vysypu a vypnu
purge dba_recyclebin;
alter system... | true |
1ca5b83d97c9b8e24a28af9e403852a5775f32e7 | SQL | HaidarAliN/Intro-to-SQL | /SQL Queries/SQL_queries.sql | UTF-8 | 486 | 3.5625 | 4 | [] | no_license | #Select all the degrees of all the instructors in this university
SELECT type,major FROM `degrees`;
#Select the first name of the instructors who earned an MS degree in Computer Science
SELECT i.first_name
from instructors i, degrees d
where d.type = 'MS' AND d.major = 'Computer science'
AND i.id = d.instructor_id;
#... | true |
2fb0db7c5f37553b2ce83f1eded08aef19175907 | SQL | aishahrosli/Dental | /database/dental.sql | UTF-8 | 13,919 | 3.046875 | 3 | [] | permissive | -- phpMyAdmin SQL Dump
-- version 5.0.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jun 20, 2021 at 12:09 PM
-- Server version: 10.4.14-MariaDB
-- PHP Version: 7.4.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... | true |
261383828f3d46bc103d6304febfd4f7b2926159 | SQL | ngc2419/SQL | /getDynMonths.sql | UTF-8 | 1,325 | 2.546875 | 3 | [] | no_license | select January = convert(varchar(12),'1/15/') + convert(char(10), datepart(year,getdate()))
, February = convert(varchar(12),'2/15/') + convert(char(10), datepart(year,getdate()))
, March = convert(varchar(12),'3/15/') + convert(char(10), datepart(year,getdate()))
, April = convert(varchar(12),'4/15/') + convert(cha... | true |
981d6632f8981a8b6778ce8cd88bee2043b2130a | SQL | amypepper/garden-tracker-api | /migrations/002.do.create_categories_table.sql | UTF-8 | 262 | 3.1875 | 3 | [] | no_license | CREATE TABLE categories (
id INTEGER PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY,
title TEXT NOT NULL,
dateCreated TIMESTAMPTZ NOT NULL DEFAULT NOW()
);
ALTER TABLE categories
ADD COLUMN userid INTEGER NOT NULL REFERENCES users(id)
ON DELETE CASCADE; | true |
0274b0f1f8883764856b814874bb695aee198cfe | SQL | ProfDema/uam | /pam/examples/anon_data/student5/q5.sql | UTF-8 | 316 | 3.390625 | 3 | [] | no_license | truncate query5;
insert into query5
select product.pid, pname, introdate
from product join
(select pid from product
EXCEPT select orders.pid
from orders JOIN product
ON orders.pid = product.pid
group by orders.pid)
as prod on product.pid = prod.pid
order by pname ASC;
select * from query5;
| true |
61a0949475d39664f9210557dbac4ff2c34e35f6 | SQL | MmahdiM79/tutiter | /SQL queries/get_user_id_function.sql | UTF-8 | 164 | 2.921875 | 3 | [] | no_license |
DELIMITER $$
CREATE FUNCTION userID(user_name VARCHAR(20))
RETURNS INT
DETERMINISTIC
BEGIN
RETURN (SELECT id FROM users WHERE username = user_name);
END;
| true |
419d673e1efc454222c515f196fee95c61be536e | SQL | vinnikam/ejerciciosupb | /src/contactosapp/script.sql | UTF-8 | 1,253 | 3.515625 | 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: Vinni
* Created: 19/08/2021
*/
create database `libreta_bd`;
CREATE USER 'elusuario' IDENTIFIED BY 'laclave';
GRANT... | true |
b5e0dc8bb96ca9b82620babb2ab6f4b9e30af2b1 | SQL | nhs-digital-gp-it-futures/GPITBuyingCatalogue | /database/NHSD.GPITBuyingCatalogue.Database/Ordering/Tables/OrderItems.sql | UTF-8 | 1,440 | 3.65625 | 4 | [
"MIT"
] | permissive | CREATE TABLE ordering.OrderItems
(
OrderId INT NOT NULL,
CatalogueItemId NVARCHAR(14) NOT NULL,
PriceId INT NULL,
Price DECIMAL(18, 4) NULL CONSTRAINT OrderItem_PositivePrice CHECK (Price >= 0.00),
EstimationPeriodId INT NULL,
DefaultDeliveryDate DATE NULL,
Created DATETIME2 CONSTRAINT DF_O... | true |
c30d17e8a298f728b7bb5f65c8a7d05d4caf6000 | SQL | HotBrigtherExperience/internship02 | /AlexandraMarinescu/DDL/DDL.sql | UTF-8 | 2,172 | 3.453125 | 3 | [] | no_license | DROP TABLE ANGAJATI CASCADE CONSTRAINTS;
DROP TABLE OFICII CASCADE CONSTRAINTS;
DROP TABLE COMPANII CASCADE CONSTRAINTS;
DROP TABLE TRANZACTII CASCADE CONSTRAINTS;
DROP TABLE PRODUSE CASCADE CONSTRAINTS;
CREATE TABLE PRODUSE (
Cod_produs NUMBER PRIMARY KEY,
Descriere VARCHAR2(20), ... | true |
0f36d6902c2c307e636e1b24aaa4f3d86bd3b5f5 | SQL | silence-do-good/stress-test-Postgres-and-MySQL | /dump/low/day16/select0009.sql | UTF-8 | 178 | 2.625 | 3 | [] | no_license |
SELECT timeStamp, temperature FROM ThermometerOBSERVATION o
WHERE timestamp>'2017-11-15T00:09:00Z' AND timestamp<'2017-11-16T00:09:00Z' AND temperature>=32 AND temperature<=78
| true |
cba226ddbdee348b85dd00efb947e4dff314b9fe | SQL | pieceofnerd/nix-4 | /unit_13_jpa/study-sessions/src/main/resources/study_session.sql | UTF-8 | 2,396 | 3.9375 | 4 | [] | no_license | create table assessment
(
id int auto_increment
primary key,
assessment int not null,
comment varchar(500) null,
student_id int not null,
lesson_id int not null,
constraint lesson_id2
foreign key (lesson_id) references lesson (id)
... | true |
813b92cc3bb5a9f4dd7235a9a06457de603c79d7 | SQL | checksams/School_Management_System | /sereneSchool/update_user_role_privlg.sql | UTF-8 | 2,346 | 3.765625 | 4 | [] | no_license | DROP PROCEDURE IF EXISTS `serenehrdb`.`update_user_role_privlg`;
DELIMITER $$
CREATE PROCEDURE `update_user_role_privlg`(v_urp_code bigint,
v_up_code bigint,
v_ur_code bigint,
v_min_amt decimal(25,5),
v_max_amt decimal(25,5),
out v_urpcode bigint
)
BEGIN
DECLARE code CH... | true |
b4d63e2b960428b58567cc5d6742fe553c061df7 | SQL | lennyhasinternet/exercise.sql_simple-queries | /simpleQueriesExercise.sql | UTF-8 | 602 | 3.40625 | 3 | [] | no_license | SELECT productName, productLine, buyPrice
FROM products
ORDER BY buyPrice DESC
SELECT contactFirstName, contactLastName, city
FROM customers
WHERE country = 'Germany'
ORDER BY contactLastName
SELECT distinct status
FROM orders
ORDER BY STATUS
SELECT *
FROM payments
WHERE paymentDate >= '2005-01-01'
... | true |
325d0e0cafc64fc04eeb85fcfd8c7cd19907dc7a | SQL | gongzheying/python_automatic_test | /Balance_compare/balance_compare/resources/PCK_AUTOTEST_BALANCE_BODY.sql | UTF-8 | 14,934 | 2.671875 | 3 | [] | no_license | CREATE OR REPLACE package body PCK_AUTOTEST_BALANCE is
PROCEDURE p_create_balance(bsp_code in varchar2,
processdate in varchar2) is
vc_state varchar(2000);
vc_sysdate varchar(2000);
vc_tablename varchar(2000);
vc_exect varchar(2000);
vc_sql1 varchar(2000);... | true |
217d7d4bfe1140288a33f04b37a3a84e9951151e | SQL | silence-do-good/stress-test-Postgres-and-MySQL | /dump/high/day14/select2103.sql | UTF-8 | 178 | 2.671875 | 3 | [] | no_license |
SELECT timeStamp, temperature FROM ThermometerOBSERVATION o
WHERE timestamp>'2017-11-13T21:03:00Z' AND timestamp<'2017-11-14T21:03:00Z' AND temperature>=38 AND temperature<=99
| true |
3d947065d4f765e5b27bac296a2b8673dabbaa55 | SQL | kalex375/OVC | /test/get_prev_change_id.sql | UTF-8 | 596 | 3.3125 | 3 | [] | no_license | cursor c_get_prev_id(p_change_id ovc_change_object.id%type)
is
select
max(pco.id) keep (dense_rank last order by pco.modify_date) id
from
ovc_change_object pco,
(select
co.id,
co.modify_date,
co.obj_type,
co.obj_owner,
co.obj_name
from
... | true |
06897558d7bf5a9cb821833d5f4d0b3fa8eb4741 | SQL | Sundorius/Wines-Of-Crete | /SQL Files/debitcard.sql | UTF-8 | 1,486 | 3.140625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jan 22, 2018 at 08:06 PM
-- Server version: 10.1.28-MariaDB
-- PHP Version: 7.1.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... | true |
869a784c8e63093b4ac0919759b1ff759cda82bd | SQL | marioing18/ORACLEPL-SQL | /P8-11/lab_09_03.sql | UTF-8 | 165 | 2.53125 | 3 | [] | no_license | CREATE TABLE HR.EMP
(
ID NUMBER(7),
Last_name VARCHAR2(25),
First_name VARCHAR2(25),
Dept_id NUMBER(7) REFERENCES HR.DEPT(ID)
); | true |
894b72c000f291c0d7af73735cfe42af1115aa06 | SQL | GaneshChavan13999/Home-Tutor | /STUDENT/student.sql/student.sql | UTF-8 | 2,478 | 3 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 2.11.6
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Mar 28, 2020 at 07:05 AM
-- Server version: 5.0.51
-- PHP Version: 5.2.6
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_... | true |
6c4fcc40f3684b7aadada1ce90eed34a58fc3a60 | SQL | mwagner19446/wdi_work | /w04/d01/Julia/chopped_julia/chopped.sql | UTF-8 | 636 | 3.15625 | 3 | [] | no_license | CREATE TABLE judges(
id serial PRIMARY KEY,
judge_name VARCHAR(50)
);
CREATE TABLE dishes(
id serial PRIMARY KEY,
dish_name VARCHAR(50),
course_id INTEGER REFERENCES courses(id),
chef_id INTEGER REFERENCES chefs(id)
);
CREATE TABLE chefs(
id serial PRIMARY KEY,
chef_name VARCHAR(50)
);
CREATE TABLE d... | true |
dd655cccf670ab621d98065d72430f0534a3374a | SQL | miraDask/DB-Basics-MS-SQL-Server-Sept-2019 | /05.TABLE RELATIONS/P01.One-To-One Relationship.sql | UTF-8 | 656 | 3.484375 | 3 | [] | no_license | CREATE TABLE Persons(
PersonID INT PRIMARY KEY IDENTITY(1,1),
FirstName NVARCHAR(30) NOT NULL,
Salary DEC(7,2) NOT NULL,
PassportID INT
)
CREATE TABLE Passports(
PassportID INT PRIMARY KEY IDENTITY(101, 1),
PassportNumber CHAR(8)
)
ALTER TABLE Persons
ADD CONSTRAINT FK_Persons_PasportId
FO... | true |
bc68a01cf28e75cfd3539cee3b04d71640840e5f | SQL | LopsanAMO/SMDE | /bdbatiz 20140506 1209.sql | UTF-8 | 2,328 | 3.203125 | 3 | [] | no_license | -- MySQL Administrator dump 1.4
--
-- ------------------------------------------------------
-- Server version 5.5.21
/*!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 */;
... | true |
7ed161a7549656872234c5f1122adb26400261b8 | SQL | santsy03/RADIX | /Source_Code/madagascar/appussd/data_provisioning/src/sql/tables.sql | UTF-8 | 1,100 | 2.828125 | 3 | [] | no_license | CREATE TABLE REQUESTS
(ID NUMBER(11,0) NOT NULL ENABLE,
USER_ID VARCHAR2(20) NOT NULL ENABLE,
REQUEST_ID NUMBER,
MSISDN VARCHAR2(20) NOT NULL ENABLE,
PACKAGE_ID NUMBER(11,0),
STATUS NUMBER,
RESPONSE VARCHAR2(200),
CREATED_AT TIMESTAMP (6),
CALLBACK VARCHAR2(50),
B_MSISDN VARCHAR2(20)... | true |
c129cb670c0052c4a23e741b6ac362ad10803822 | SQL | RBarroco/SQL-Study | /JOIN-More-than-2tables.sql | UTF-8 | 527 | 3.640625 | 4 | [] | no_license | # JOIN MORE THAN TWO TABLES;
# Going from front to back
SELECT
e.first_name,
e.last_name,
e.hire_date,
m.from_date,
d.dept_name
FROM
employees e
JOIN
dept_manager m ON e.emp_no = m.emp_no
JOIN
departments d ON m.dept_no = d.dept_no;
# Going from back to front
# JOIN MORE THAN TWO TABLES;
SE... | true |
c00518b2dd294b939c1036ca8f8dfe639af688ea | SQL | Jaimedgp/Bases_de_Datos | /DataBase1.sql | UTF-8 | 773 | 3.1875 | 3 | [] | no_license | /**
* PRIMERA PRUEBA CON BASES DE DATOS
* EN MYSQL
* pos yo tambien
*yo estoy bien
* hola que tal
*/
create database if not exists JGP_PROJECTESES;
use JGP_PROJECTESES;
create table if not exists DATA(
cod_project char(10),
name char(10),
numbers float,
primary key(cod_project));
create ta... | true |
6f87fc6f45ebd8fdfc6897ccc644280394a938db | SQL | nfrancoiii/sql_samples | /Stuntz_MBTA_1.sql | UTF-8 | 15,022 | 4.3125 | 4 | [] | no_license | -- Andrew Stuntz
-- MIT Transit Lab
-- Updated 2-9-2016
-----------
-- NOTES --
-----------
-- FUNCTION
-- This program estimates the single-ride-equivalent fares for Link Pass usage on the AFC system
-- USER INPUTS
-- List of monthly LinkPass card IDs (Part I, stuntz.testcards)
-- Date range (Part I)
-- Mode to fa... | true |
6c04d88680459d420c95fb50baf0fd0cd3a58189 | SQL | motown-io/motown | /chargingstation-configuration/view-model/src/test/resources/hsqldb/schema.sql | UTF-8 | 1,610 | 3.421875 | 3 | [
"Apache-2.0"
] | permissive | CREATE TABLE MANUFACTURER(
ID BIGINT GENERATED BY DEFAULT AS IDENTITY NOT NULL PRIMARY KEY,
CODE VARCHAR(255),
CONSTRAINT UK_GAHS9944ONMEWEVXD5BJ06OQ3 UNIQUE(CODE)
);
CREATE TABLE CHARGINGSTATIONTYPE(
ID BIGINT GENERATED BY DEFAULT AS IDENTITY NOT NULL PRIMARY KEY,
CODE VARCHAR(255),
MANUFACTURERID BIGINT,... | true |
f639365eb0768e323727aec255b97686ea756b11 | SQL | dxccm666/reportcenter | /ReportCenter/ReportCenter/sql/01_core/07_reports/12_reportcrontaskemails.sql | UTF-8 | 868 | 3.5625 | 4 | [] | no_license | CREATE SEQUENCE REPORTCRONTASKEMAILSEQ;
CREATE TABLE REPORTCRONTASKEMAILS (
ID VARCHAR2(10) NOT NULL,
ROWSTAMP VARCHAR2(10) NOT NULL,
REPORTCRONTASKID VARCHAR2(10) NOT NULL,
EMAILADDRESS VARCHAR2(100) NOT NULL,
PRIMARY KEY (ID),
CONSTRAINT REPORTCRONTASKEMAILS_U UNIQUE (REPORTCRONTASKID, EMAILADDRESS),
CONSTRAI... | true |
39f8e6ad9679f2a02445f3e99ca5f27e3d0420b2 | SQL | gscpsnacet/srp_back | /Configure.sql | UTF-8 | 2,285 | 3.34375 | 3 | [] | no_license |
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
--
-- Creating a database
--
CREATE DATABASE `Srp_db`;
--
-- Table structure for table `host_user`
--
CREATE TABLE `Srp_db`.`user_table` (
`uid` int(11) NOT NULL PRIMARY KEY AUTO_INCREMENT,
`name` varchar(50) NOT NULL,
`email` varchar(50) NO... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.