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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
c003dbc1c189f1ed8a82714c1e142a3fba69d02c | SQL | uoit-cs/mycampus-crawler | /analysis/cs-growth/run.sql | UTF-8 | 2,561 | 4.375 | 4 | [] | no_license | .header on
.mode column
create temp table S as
with S0 as (
select
substr(semester, 1, 4) as year,
semester,
code,
title,
crn,
max(actual) as actual
from schedule
where code like 'CSCI%U'
and schtype = 'Le... | true |
58269cf4217f88d9e66a3f25abe6b6588762910d | SQL | TareqJudehGithub/SQL_ZTM | /Query_Practice.sql | UTF-8 | 3,328 | 4.625 | 5 | [] | no_license | -- Check SQL version:
SELECT VERSION();
SELECT id,
occurred_at,
total_amt_usd
FROM orders
ORDER BY occurred_at DESC
LIMIT 10;
SELECT id,
account_id,
total_amt_usd
FROM orders
ORDER BY total_amt_usd DESC
LIMIT 5;
SELECT id,
account_id,
total_amt_usd
FROM orders
ORDER BY total_amt_usd DESC, account_id
L... | true |
3e51ebff55e8959675d626f23fedb9a169c413ee | SQL | andrelokal/SkeletonGenerator | /engineer/dbteste.sql | UTF-8 | 9,514 | 3.609375 | 4 | [] | no_license | -- MySQL Script generated by MySQL Workbench
-- 03/05/17 19:31:20
-- Model: New Model Version: 1.0
-- MySQL Workbench Forward Engineering
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITION... | true |
999d676caad51ccd7aeeb5b7776cf472555ba7d6 | SQL | Kalesberg/wmach-api | /API/SQL/m2.Currencies.sql | UTF-8 | 456 | 3.03125 | 3 | [] | no_license | DROP TABLE m2.RateRegionCurrencies
CREATE TABLE m2.RateRegionCurrencies (
ID INT IDENTITY(1,1),
Prefix VARCHAR(20) NOT NULL,
Region VARCHAR(100) NOT NULL,
Multiplier DECIMAL(3,2) NOT NULL
)
INSERT INTO m2.RateRegionCurrencies VALUES ('CAN', 'Canada', 1.1), ('EUR', 'Europe', 1.1), ('AUS', 'Australia', 0.85), ('LA', 'L... | true |
3ad1e7614b3a946465747700616e86395bc67f42 | SQL | GokoshiJr/curso-sql | /insert_books.sql | UTF-8 | 341 | 3.28125 | 3 | [] | no_license | /* El Arte de la guerra, Enrique Rincon, 2020 */
/* Estructuras defensivas, Enrique Rincon, 2018 */
INSERT INTO books (title, author_id)
VALUES ('El Arte de la guerra', 4);
INSERT INTO books (title, author_id, `year`)
VALUES ('Estructuras defensivas',
(SELECT author_id FROM authors WHERE `name` = 'Enrique... | true |
818da3a7672f6135e9fbba7d269243d1637403ff | SQL | ojkalam/loan-management | /admin/brac_loan.sql | UTF-8 | 5,765 | 2.96875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Apr 06, 2018 at 10:06 PM
-- Server version: 10.1.30-MariaDB
-- PHP Version: 7.2.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
174a43d25ddeece3a44b6c3f5253c79ada6973ef | SQL | JinhiA/Burger | /db/schema.sql | UTF-8 | 432 | 3.265625 | 3 | [] | no_license | -- Drops the programming_db if it already exists --
DROP DATABASE IF EXISTS burgers_db;
-- Created the DB "burgers_db" (only works on local connections)
CREATE DATABASE burgers_db;
-- Use the burgers_db for all the rest of the script
USE burgers_db;
-- Created the table "burgers"
CREATE TABLE burgers (
id INT AUTO... | true |
435aa3b026a092613982d5d9b9a01fd4b4d3fcd7 | SQL | DuchelWemo/CSI2532Playground | /db/Migration/20210405110514-create-competition-table.sql | UTF-8 | 250 | 2.796875 | 3 | [] | no_license | CREATE TABLE competition(
competitionid int NOT NULL,
name varchar(50),
venue varchar(50),
start_date_time DATETIME,
end_date_time DATETIME,
duration VARCHAR(50),
PRIMARY KEY (competitionid)
);
| true |
1ee8770f5cef90c64c62e7e2fd04aad269389cfd | SQL | svintenok/timetable_agent | /src/main/resources/db/changelog/sql/0003-insert-test-data.sql | UTF-8 | 20,046 | 3.171875 | 3 | [] | no_license | --liquibase formatted sql
--changeset svintenok:1
INSERT INTO study_course(course_num) VALUES (1); --1
INSERT INTO study_course(course_num) VALUES (2); --2
INSERT INTO study_course(course_num) VALUES (3); --3
INSERT INTO study_course(course_num) VALUES (4); --4
INSERT INTO study_group(group_num, course_id, student_co... | true |
af201e8be839a4ff9512fdd27f0024f2b9036b66 | SQL | Qchien99/Website-CNPM | /weblaptop (2).sql | UTF-8 | 11,475 | 2.9375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Máy chủ: 127.0.0.1
-- Thời gian đã tạo: Th5 19, 2021 lúc 08:08 PM
-- Phiên bản máy phục vụ: 10.3.16-MariaDB
-- Phiên bản PHP: 7.3.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/... | true |
ccee2a3731028d579d4cf29e3a669bf7e63c09d4 | SQL | JoinMarketing/laravel-database-encryption | /tests/Database/password_resets.sql | UTF-8 | 354 | 2.625 | 3 | [
"MIT"
] | permissive | CREATE TABLE `password_resets` (
`email` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`token` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`created_at` timestamp NULL DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
ALTER TABLE `password_resets`
ADD KEY `password_reset... | true |
661dbb596174154d8793fd1938ef62a849083af9 | SQL | fabiodamas/erp_desktop | /SQLs/opeerp2.sql | UTF-8 | 1,045 | 2.9375 | 3 | [] | no_license | select Concat(
-- hr.category_employee,category_ids/id
"__export__.hr_employee_",
Convert(Codigo+6,char) ,
"," ,
-- True,active
"True",
",",
-- 089.191.748-90,x_CPF
COALESCE(CPF,""),
",",
-- (14) 9746-3155,mobile_phone
COALESCE(Telefone1,""),
",",
-- 1968-09-02,birthday
DATE_FORMAT(COALESCE(DataNascto,CONVERT... | true |
e0e6f9e3a7c550462d261f98e2be439e29fe921a | SQL | yilin6867/pinkyNailOrder | /src/sql/ORDER.sql | UTF-8 | 722 | 3.4375 | 3 | [] | no_license | DROP TABLE IF EXISTS ORDERS;
CREATE TABLE ORDERS
(
ORDER_ID INT,
SERVICE_ID VARCHAR(4),
CUST_ID INT,
EMP_ID VARCHAR(4),
APPO_ID INT,
TRANS_ID INT,
PRICE DECIMAL(5,2)
);
ALTER TABLE ORDERS ADD CONSTRAINT PK_ORDER PRIMARY KEY(ORDER_ID);
ALTER TABLE ORDERS ADD CONSTRAINT FK_CONSUMER FOREIGN KEY(CUST_ID) REFERENCES CUSTOME... | true |
0a351ca58e426edf4f8a95fc0090bf09c297b692 | SQL | solonvavasis/drivehub | /database.sql | UTF-8 | 16,753 | 2.828125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.6.6
-- https://www.phpmyadmin.net/
--
-- Host: db21.papaki.gr:3306
-- Generation Time: Feb 28, 2017 at 12:16 AM
-- Server version: 10.1.18-MariaDB
-- PHP Version: 5.6.27
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHAR... | true |
a43fb21d87cb428de8cbaa2b4895699bf0af2d01 | SQL | cgesgin/fast_food_restoran_veritabani_projesi | /sql-kodlar/06_view.sql | UTF-8 | 3,427 | 4.4375 | 4 | [] | no_license | --View işlemleri
-----------------------------------------------------------------------------------------------
--1.View
--personellerin ad ,soyad ve maas bilgileri ile birlikte hangi subede calıstıklarını düşük maastan yüksek maas göre ve subelerin hangi adreste bulundukları listeleyen view
create view vw_personel_s... | true |
dcc2a7c35cee686b4eec31bca4e25dec22c04117 | SQL | HSuzu/Undrgrad-Databases | /Q5.sql | UTF-8 | 503 | 3.640625 | 4 | [] | no_license | with brs(Forename, Surname, driverId) as (
select Forename, Surname, driverId from Driver where Nationality = 'Brazilian'
), lastLapForRace(rId, lap) as (
select distinct raceId as rId, max(lap) from lapTimes group by raceId
), winnerForRace(raceId, driverId) as (
select raceId, driverId from lapTimes, lastLapforRac... | true |
5c0dbd10eab3d28b7eb95c8e13e548f5a75b95d3 | SQL | dlinde7/Gameing-Events-Database | /DDL/getParicipantsFunc.sql | UTF-8 | 242 | 3.671875 | 4 | [] | no_license | CREATE FUNCTION getParticipants (@EventId bigint)
RETURNS TABLE
AS
RETURN
SELECT b.Name Event, c.Name TeamName
From EventRegistrations a, Events b, Teams c
WHERE b.EventId=a.EventId
AND c.TeamId=a.TeamId
AND a.EventId = @EventId | true |
5831eb57f34500ee9ee33bb632940cb7220549ce | SQL | yifeng2019uwb/DataCampAndCodePractice | /Data-Analyst-with-SQL-Server/04-Time-Series-Analysis-in-SQL-Server/04-Time-Series-Questions/15-Complete-the-fraud-analysis.sql | UTF-8 | 1,126 | 3.734375 | 4 | [] | no_license | /*
Complete the fraud analysis
So far, we have broken out day spa data into a stream of entrances and exits and ordered this stream chronologically. This stream contains two critical fields, StartOrdinal and StartOrEndOrdinal. StartOrdinal is the chronological ordering of all entrances. StartOrEndOrdinal contains all e... | true |
2332962ca0e75ba9e49c15866c1b184b36db8589 | SQL | nicolasreymond/kata-manga-1 | /import/data/init/constraints.sql | UTF-8 | 946 | 2.9375 | 3 | [] | no_license | --
-- Add the relevants constraints
--
ALTER TABLE `classify`
ADD CONSTRAINT `fk_classify_genre` FOREIGN KEY (`idgenre`) REFERENCES `genre` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
ADD CONSTRAINT `fk_classify_manga` FOREIGN KEY (`idmanga`) REFERENCES `manga` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION;
... | true |
f80406d61e80c0f8ebd76fc06a983a3c5b9205dc | SQL | swarup16/eLaundry-System | /src/main/sql/create.sql | UTF-8 | 5,090 | 3.234375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.2.7.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Dec 18, 2014 at 11:42 AM
-- Server version: 5.6.20
-- PHP Version: 5.5.15
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */... | true |
7da80de9c20465e753bc24f0f1e2d7f2822bee02 | SQL | ojmakhura/redcapddp | /ddp_patient_project_mapping.sql | UTF-8 | 1,997 | 3.234375 | 3 | [] | no_license | -- Change the project_id value on the next line to match the one for your DDP project.
set @project_id = XX;
-- Do NOT change anything below this line.
delete from redcap_ddp_mapping where project_id = @project_id;
delete from redcap_ddp_preview_fields where project_id = @project_id;
set @event_id = (select even... | true |
d80c35d0ecba66725fb88014fd651d60c2305f28 | SQL | iron-people-fec/similar-items | /SCHEMA.sql | UTF-8 | 415 | 2.734375 | 3 | [] | no_license | CREATE DATABASE IF NOT EXISTS fec;
USE fec;
CREATE TABLE IF NOT EXISTS products (
id INT AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(64),
description VARCHAR(120),
imageUrl VARCHAR(120),
category INT,
isFavorite INT,
price VARCHAR(12),
cutPrice VARCHAR(12),
rating VARCHAR(12),
reviewCount INT
);
CRE... | true |
44e6b76c5245ea0804d0bdb04dac54305e4941e4 | SQL | jdlrobson/mediawiki-extensions-Gather | /schema/gather_list_flag.sql | UTF-8 | 751 | 2.90625 | 3 | [] | no_license | -- Licence: CC0
-- Run with maintenance/sql.php for automatic replacement of /*_*/ etc
CREATE TABLE /*_*/gather_list_flag (
-- ID of the collection which has been flagged
glf_gl_id INT UNSIGNED NOT NULL,
-- Foreign key to user.user_id, 0 for anonymous
glf_user_id INT UNSIGNED NOT NULL DEFAULT 0,
-- IP addr... | true |
34d89208aae7b60cd64524b4282b8a04079ede0c | SQL | shadow81627/3612ICT | /Assignment/Insert.sql | UTF-8 | 2,258 | 2.765625 | 3 | [] | no_license | -- Insert Suppliers
INSERT INTO supplier
VALUES(1, "coles", null, 1234);
INSERT INTO supplier
VALUES(2, "woolies", null, 12345);
INSERT INTO supplier
VALUES(3, "aldi", null, 51824753556);
-- Insert Items
INSERT INTO item
VALUES(1, "pasta", "great original italian pasta", null, 'grain');
INSERT INTO item
VALUES... | true |
45b73c299de8d1f925f372d0fa0f6739ca4059f0 | SQL | RTAndrew/nachysan | /nachysan.sql | UTF-8 | 67,529 | 3.25 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Generation Time: 17-Mar-2018 às 05:38
-- Versão do servidor: 5.7.19
-- PHP Version: 5.6.31
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CH... | true |
0bf727d2e1a9ef6ba1647aa7b7bfc329a48b2601 | SQL | dongnhat97/C0421G1_Module3_DongVanNhat | /Furuma_Resort/insert_table.sql | UTF-8 | 854 | 2.8125 | 3 | [] | no_license | use furuma_resort;
-- Thêm vị trí
insert into position (position_name)
value ('lễ tân'),('phục vụ'),('chuyên viên'),('giám sát'),('quản lý'),('giám đốc');
-- Thêm trình độ
insert into education_degree (education_degree_name)
value ('Trung cấp'),('Cao đẳng'),('Đại học'),('sau Đại học');
-- Thêm bộ phận
inse... | true |
0a87092db18a338a831fa76bb7a754042f9ffe97 | SQL | daimaniu/fence-demo | /fence-dao/127.0.0.1--16-7-9.19-25-fence.sql | UTF-8 | 2,034 | 2.984375 | 3 | [] | no_license | # ************************************************************
# Sequel Pro SQL dump
# Version 4541
#
# http://www.sequelpro.com/
# https://github.com/sequelpro/sequelpro
#
# Host: 127.0.0.1 (MySQL 5.6.20)
# Database: fence
# Generation Time: 2016-07-09 11:25:47 +0000
# *************************************************... | true |
fa1c38d362fc8fe12ad90aedd2c24e6603faf00e | SQL | DarthWolf1479/CodeProyectoTeam3 | /Base_de_Datos/mibase.sql | UTF-8 | 4,427 | 2.828125 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 5.7.17, for Win64 (x86_64)
--
-- Host: localhost Database: logindb
-- ------------------------------------------------------
-- Server version 5.7.17-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;... | true |
3f0f0037ebe6fdc94da8a13cf0d3571be509d4ee | SQL | Jason-Cooke/bigquery-etl | /sql/telemetry_derived/smoot_usage_nondesktop_v2/query.sql | UTF-8 | 4,773 | 3.609375 | 4 | [] | no_license | CREATE TEMP FUNCTION
udf_bitmask_lowest_7() AS (0x7F);
CREATE TEMP FUNCTION
udf_active_n_weeks_ago(x INT64, n INT64)
RETURNS BOOLEAN
AS (
BIT_COUNT(x >> (7 * n) & udf_bitmask_lowest_7()) > 0
);
CREATE TEMP FUNCTION
udf_bitcount_lowest_7(x INT64) AS (
BIT_COUNT(x & udf_bitmask_lowest_7())
);
CREATE ... | true |
11790bd0006874b67032bf864b2c68e2eff30d52 | SQL | ruandev/beauty | /scripts sql/01_db_initial.sql | UTF-8 | 7,087 | 3.234375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.7
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Jul 23, 2018 at 08:56 PM
-- Server version: 5.6.38
-- PHP Version: 7.2.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "-03:00";
--
-- Database: `BEAUTY`
--
use beauty;
-- -------... | true |
ee6d5942279796996f2dc4324c99e69a820f08af | SQL | ErikMcClure/bequeath.me | /bequeathme.sql | UTF-8 | 45,908 | 3.9375 | 4 | [
"Apache-2.0"
] | permissive | -- --------------------------------------------------------
-- Host: 127.0.0.1
-- Server version: 10.2.11-MariaDB - mariadb.org binary distribution
-- Server OS: Win64
-- HeidiSQL Version: 9.4.0.5192
-- ------------------------------------------------... | true |
9b844c096b122f94562586519dd5090e9abfd13b | SQL | woodjj1/IN705_S2DB3 | /Answers/Week2Lab1-Answers-UNION.sql | UTF-8 | 6,563 | 4.5 | 4 | [] | no_license | /*
Using Transact-SQL : Exercises
------------------------------------------------------------
Exercises for section 6
e6.1 List the paper with the lowest average enrolment per instance. Ignore all papers with no enrolments.
Display the paper ID, paper name and average enrolment count.
select top 1 p.PaperID, p.Pa... | true |
ee36a0d0e70767c3703b557583ec4f7c2b99dfbb | SQL | tekbasse/affiliates | /sql/postgresql/affiliates-create.sql | UTF-8 | 685 | 2.984375 | 3 | [] | no_license | -- affiliates-create.sql
--
-- @license GNU GENERAL PUBLIC LICENSE, Version 3
--
-- aka company_credits
CREATE TABLE aff_rewards (
contact_id integer,
--tx_time
--reward_amt
--conversion
net_balance numeric
);
-- part of company_details
CREATE TABLE aff_referrals (
contact_id integer,
referr... | true |
909ab609d8383075837abc8913d4977974057b05 | SQL | moutainhigh/lotwork | /baokai-game/src/main/webapp/WEB-INF/classes/sql/oracle/SL_GAMEORDER_Leaderboard.sql | UTF-8 | 326 | 2.59375 | 3 | [] | no_license | CREATE TABLE SL_GAMEORDER_Leaderboard(
ID NUMBER PRIMARY KEY,
ROWNO NUMBER,
USER_ID NUMBER,
USER_ACCOUNT VARCHAR(30),
TOTAL_AMOUNT NUMBER,
CREATE_TIME TIMESTAMP(6) ,
LV NUMBER
)
CREATE SEQUENCE SEQ_SL_Leaderboard_ID
MINVALUE 1
MAXVALUE 999999999999999999999999999
START WITH 1
INCREMENT BY 1
NOC... | true |
5b9290156bc9f0ce4478255dcaed324eb1417c6a | SQL | indra400/TA | /skripsi_indra.sql | UTF-8 | 6,718 | 2.984375 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | -- phpMyAdmin SQL Dump
-- version 3.2.0.1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Aug 26, 2016 at 10:12 PM
-- Server version: 5.1.37
-- PHP Version: 5.3.0
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER... | true |
568b91bdf55bff30b0425630853a4bbfa46b2619 | SQL | silence-do-good/stress-test-Postgres-and-MySQL | /dump/high/day24/select1928.sql | UTF-8 | 178 | 2.65625 | 3 | [] | no_license |
SELECT timeStamp, temperature FROM ThermometerOBSERVATION o
WHERE timestamp>'2017-11-23T19:28:00Z' AND timestamp<'2017-11-24T19:28:00Z' AND temperature>=14 AND temperature<=50
| true |
00b14be6e39ee79aeac30d6327528e74c9db8a08 | SQL | ntogka/DataBases-Project-1 | /V.3/host_table.sql | UTF-8 | 1,536 | 3.46875 | 3 | [] | no_license | CREATE TABLE "Host"
AS (SELECT DISTINCT host_id as id, host_url as url, host_name as name, host_since as since, host_location as location,
host_about as about, host_response_time as response_time, host_response_rate as response_rate,
host_acceptance_rate as acceptance_rate, host_is_superhost as is_superhost,... | true |
f28cab347b2ccea10db7dbf77bed078b7b470f5d | SQL | VinayHaryan/SQL_projects | /ProjectAnsSQLQueries.sql | UTF-8 | 3,534 | 4.15625 | 4 | [] | no_license | --Quest 1
select Profiles.profile_id, CONCAT(Profiles.first_name,' ',Profiles.last_name) as FullName,
Profiles.phone from Profiles
inner join Tenancy_histories
on Profiles.profile_id=Tenancy_histories.profile_id
where Profiles.profile_id in
(select profile_id from
(select top(1) datediff(dd, move_in_date,move_ou... | true |
7f6f03da76a2a535723265edf9e0f9a85c1e8dbe | SQL | jesgac/Nomisoft | /protected/backups/db_nomisoft_29.03.2016_16.45.12.sql | UTF-8 | 138,099 | 3.578125 | 4 | [] | no_license | -- -------------------------------------------
SET AUTOCOMMIT=0;
START TRANSACTION;
SET SQL_QUOTE_SHOW_CREATE = 1;
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
-- -------------------------------------------
-- --------------------------... | true |
95262154e2e7aa997a2dbf8160dc44c093bf8cc3 | SQL | Rthorpesr/bamazon | /bamazon.sql | UTF-8 | 499 | 2.9375 | 3 | [] | no_license |
drop database if exists Bamazon;
CREATE DATABASE Bamazon;
USE Bamazon;
CREATE TABLE products (
item_id INT NOT NULL AUTO_INCREMENT,
product_name VARCHAR(100) NOT NULL,
department_name VARCHAR(50) NULL,
price DECIMAL(7,2) NOT NULL,
stock_quantity INT NOT NULL DEFAULT '1',
PRIMARY KEY (item_id... | true |
2a585fd5483f6c4134bc6195a1faefc5ef323764 | SQL | valuko/impala_tpcds | /queries/query22.sql | UTF-8 | 1,433 | 3.28125 | 3 | [
"Apache-2.0"
] | permissive | -- start query 5 in stream 0 using template query22a.tpl using seed 1380568660
with results as
(select i_product_name
,i_brand
,i_class
,i_category
,inv_quantity_on_hand qoh
from inventory
,date_dim
,item
,warehouse
whe... | true |
e106c5b559e118ee81740fcdbef4ad4cb318b15f | SQL | ihor-bondarenko/node_training | /1.sql | UTF-8 | 2,016 | 3.921875 | 4 | [] | no_license | CREATE TABLE birds (
bird_id INT AUTO_INCREMENT PRIMARY KEY,
scientific_name VARCHAR(255) UNIQUE,
common_name VARCHAR(50),
family_id INT,
description TEXT);
CREATE DATABASE birdwatchers;
CREATE TABLE birdwatchers.humans
(human_id INT AUTO_INCREMENT PRIMARY KEY,
formal_title VARCHAR(25),
name_first VARCHAR(25),
name_l... | true |
66ef70e5b535a53af879ab8c9bcc9669494a806a | SQL | andriimielkov/TestTask | /script.sql | UTF-8 | 1,084 | 3.734375 | 4 | [] | no_license | CREATE DATABASE 'Shop';
USE 'Shop';
CREATE TABLE IF NOT EXISTS Product (
prod_id INT AUTO_INCREMENT,
prod_name VARCHAR(20) NOT NULL ,
price DOUBLE,
PRIMARY KEY(prod_id));
CREATE TABLE IF NOT EXISTS Purchase (
pur_id INT AUTO_INCREMENT NOT NULL,
prod_id INT,
quantity INT ,
purchase_date DATE,
PRIMAR... | true |
4fc04589b46d0efe9bdb02efb75ecb7351009d70 | SQL | BogdanFi/cmiN | /FII/L2/SGBD/3/Poieana_Cosmin_X_3/Poieana_Cosmin_X_3_1.sql | UTF-8 | 12,185 | 3.703125 | 4 | [] | no_license | CREATE OR REPLACE FUNCTION rand(start_int NUMBER, end_int NUMBER)
RETURN NUMBER AS
ret NUMBER;
BEGIN
ret := TRUNC(DBMS_RANDOM.VALUE(start_int, end_int + 1));
RETURN ret;
END;
/
CREATE OR REPLACE PACKAGE FII AS
date_format CONSTANT VARCHAR(16) := 'DD-MON-YYYY';
stud_id Studenti.id%TYPE;
PROCE... | true |
6feb97949153bd419a03285a02d8e928db2b9fcb | SQL | Marioalf2002/FormLogin | /usuarios.sql | UTF-8 | 1,822 | 3.09375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 11-10-2019 a las 20:23:35
-- Versión del servidor: 10.4.6-MariaDB
-- Versión de PHP: 7.3.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";... | true |
96a908049e4c45b4e364ecd1287fac2f8ecf126f | SQL | laura-lancie/UniworkTeam-Project-Section | /SQL/users.sql | UTF-8 | 3,019 | 2.984375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.2.10
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Apr 20, 2019 at 03:29 PM
-- Server version: 5.5.58-0+deb7u1-log
-- PHP Version: 5.6.31-1~dotdeb+7.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=... | true |
6e78a4a3aa5aa3aecfaae5db563d86a05b906b32 | SQL | cuba-platform/workflow-thesis | /modules/core/db/update/postgres/02/02-130-migrateAssignmentAttachmentToCardAttachment.sql | UTF-8 | 168 | 2.53125 | 3 | [] | no_license | -- Description:
update WF_ATTACHMENT set CARD_ID = (select a.card_id from WF_ASSIGNMENT a where a.id = assignment_id), type = 'C' where CARD_ID is NULL and type = 'A'; | true |
0b7af3b5dd3e161ec63cca0d3f02a9f818dd3bc8 | SQL | sgmsgood/query | /1101_PL_bind,func/test_elseif.sql | UHC | 696 | 3.5 | 4 | [] | no_license | -- if (else ~ if)
-- Է¹ 0 '0 ۾Ƽ '
-- 100 ū '100 Ŀ ' / ''
set serveroutput on
set verify off
accept score prompt ': '
declare
score number := &score;
begin
dbms_output.put(score); --> ¿ score ֱ ؼ. Ʒ Ŀ ¿ .
if score < 0 then
dbms_output.put_line(' 0 ۾Ƽ ');
elsif score > 100 then
... | true |
5f2adc3364e37c4ae37136a9f57252b0c105b026 | SQL | silence-do-good/stress-test-Postgres-and-MySQL | /dump/low/day22/select1012.sql | UTF-8 | 412 | 3.578125 | 4 | [] | no_license |
SELECT obs.sensor_id, avg(counts)
FROM (SELECT sensor_id, date_trunc('day', timestamp), count(*) as counts
FROM WiFiAPObservation WHERE timestamp>'2017-11-21T10:12:00Z' AND timestamp<'2017-11-22T10:12:00Z' AND SENSOR_ID = ANY(array['3143_clwa_3059','3141_clwe_1100','3143_clwa_3231','3146_clwa_6049','3146_clwa_... | true |
c56f301f8c8af4d8db2cd41548c31f3d2ac5d4c3 | SQL | emefix/Kobiety-do-kodu | /Celebrity/sqlQueries.sql | UTF-8 | 474 | 2.9375 | 3 | [
"Apache-2.0"
] | permissive | CREATE SCHEMA `celebrityapp` DEFAULT CHARACTER SET utf8 COLLATE utf8_polish_ci ;
CREATE TABLE `celebrityapp`.`celebrities` (
`id` INT PRIMARY KEY AUTO_INCREMENT,
`name` VARCHAR(255),
`canSing` TINYINT,
`canAct` TINYINT,
`canDance` TINYINT
)
DEFAULT CHARACTER SET = utf8
COLLATE = utf8_polish_ci;
S... | true |
1b640b9d7c0b50398294d5801fc8701a1e627f38 | SQL | Telefonica/rural-planner | /sql/ec/v_acceso_transporte_clusters.sql | UTF-8 | 8,759 | 2.875 | 3 | [] | no_license | CREATE OR REPLACE VIEW
{schema}.v_acceso_transporte_clusters
(
cluster_id,
codigo_divipola,
torre_acceso,
km_dist_torre_acceso,
owner_torre_acceso,
altura_torre_acceso,
tipo_torre_acceso,
vendor_torre_acceso,
tecnologia_torre_acceso,
... | true |
fd2f332a54c621d4475d3b3ddb5346bbfc070f70 | SQL | mhnvelu/dairy-factory-order-service | /src/main/resources/scripts/mysql-init.sql | UTF-8 | 587 | 2.578125 | 3 | [
"Apache-2.0"
] | permissive | DROP DATABASE if exists dairyfactoryorderservice;
drop user if exists `dairy_factory_order_service`@`%`;
create database if not exists dairyfactoryorderservice character set utf8mb4 collate
utf8mb4_unicode_ci;
create user if not exists `dairy_factory_order_service`@`%` IDENTIFIED with mysql_native_password
by 'pass... | true |
733ee76ec46daea26d85bca29d8292eb1abbf124 | SQL | sharunya-sr/nf | /webNF_integrate/nishritha_foundation.sql | UTF-8 | 3,678 | 3.09375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jul 14, 2020 at 10:09 AM
-- Server version: 10.4.10-MariaDB
-- PHP Version: 7.1.33
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... | true |
017a443394c6c1a6d83e03289fe0e98099b34d19 | SQL | meta-udit-saxena/Assignments | /DBMS1/library.sql | UTF-8 | 14,570 | 4.40625 | 4 | [] | no_license | -- Drop Database if already present
DROP DATABASE IF EXISTS `library`;
-- Create database.
CREATE DATABASE `library`;
-- Select database.
USE `library`;
-- Create table members.
CREATE TABLE `members`(
member_id VARCHAR(10) PRIMARY KEY,
member_name VARCHAR(45) NOT NULL,
address_line1 VARCHAR(30) NOT NULL... | true |
ea1ba3ffc05c8dbe1e2149be3cb56a9f959eb13a | SQL | tjacobs2/UbSRD | /6A_UBQ_Respair.sql | UTF-8 | 2,456 | 3.5625 | 4 | [] | no_license | .header on
SELECT
it.pdb_code AS pdb, uc.chain_id AS ubq_chain,
rpi1.pdb_residue_number AS tar_res, rpi1.chain_id AS tar_chain, r1.name3 AS tar_name3,
un.real AS ubq_res,
rpi2.chain_id AS ubq_chain, r2.name3 AS ubq_name3,
rp.actcoord_dist AS distance,
sss.dssp AS partner_dssp,
it.ubl_type AS ubl_type,
uc.inter_type... | true |
2da398087248d6ca8df551a3c48ed8c43595b4fe | SQL | lebedev-nikita/SQL_homework | /Homework/02.3-db-manipulating/4.sql | UTF-8 | 715 | 3.703125 | 4 | [] | no_license | -- Каких лекарств не хватает, где их заказать и куда везти
SELECT prov.email AS prov_email,
ds.name AS ds_name,
ds.city AS ds_city,
ds.address AS ds_address,
dc.name AS dc_name,
sc.recommended_amount - sc.current_amount AS amount_to_send
FROM stock_control sc INNER JOIN drug_clas... | true |
8df9d310b1ebc4df15564b243ead5ae18bf4c4fd | SQL | wangboliang/short-url | /database/init_ddl.sql | UTF-8 | 616 | 2.984375 | 3 | [] | no_license | drop table if exists short_url;
/*==============================================================*/
/* Table: short_url */
/*==============================================================*/
create table short_url
(
id varchar(32) not null comment 'ID',
... | true |
c08ce747bd4f2ffa230e1895da2ae9c4033737a2 | SQL | najiboulhouch/publication | /Pub.sql | UTF-8 | 14,100 | 3.140625 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 3.5.1
-- http://www.phpmyadmin.net
--
-- Client: localhost
-- Généré le: Lun 08 Juillet 2013 à 21:29
-- Version du serveur: 5.5.24-log
-- Version de PHP: 5.4.3
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIE... | true |
fa10598af05df4e682cea8787741bab34569bbbc | SQL | prjromy/ChannakyaBase | /ChaBase/fin/Functions/FGetReportChequeBookBlocked.sql | UTF-8 | 587 | 3.140625 | 3 | [] | no_license | CREATE function [fin].[FGetReportChequeBookBlocked](@fromdate smalldatetime,@toDate smalldatetime,@branchId int=null,@iaccno int=null)
returns table as return
(
select
ad.Accno as AccountNumber,
ad.Aname as AccountName,
ah.ChkNo as ChequeNo,
ahh.Tdate,
'ChequeBlocked' as ShowWith
from fin.AChq ac
join fin.ADetail... | true |
b15c8be010ca7822dc4fd23b5be8d0e49d862e54 | SQL | djmgeneseo/misc | /SQL/LEARNING.sql | UTF-8 | 8,967 | 3.796875 | 4 | [] | no_license | -----------------------------------------
-- setup first db
-----------------------------------------
create database mytestdb
use mytestdb
create table mytesttable (
rollno int,
firstname varchar(50),
lastname varchar(50)
)
select rollno, firstname, lastname from mytesttable
insert into mytesttable(rollno, first... | true |
70cbbba04683c1d614df2c5db21c316117c0d363 | SQL | chen358805035/python | /webapp/awesome-python3-webapp/www/schema.sql | UTF-8 | 1,206 | 3.78125 | 4 | [] | no_license |
drop database if exists awesome;
create database awesome;
use awesome;
grant select, insert, update, delete on awesome.* to 'www-data'@'localhost' identified by 'www-data';
create table users(
id varchar(50) not null,
email varchar(50) not null,
passwd varchar(50) not null,
admin varchar(50) not null,
name v... | true |
c6a90a614dd64cd8992cbd4964d9d934a6d5d462 | SQL | gmartinezramirez-old/Distributed-DB-Hash-Table | /db1_hotelmascota.sql | UTF-8 | 675 | 2.65625 | 3 | [
"MIT"
] | permissive |
CREATE DATABASE db1_hotelmascota;
USE db1_hotelmascota;
CREATE TABLE mascota_db1 (
mascota_id INT NOT NULL AUTO_INCREMENT,
mascota_nombre VARCHAR(100) NOT NULL,
mascota_nombrePropietario VARCHAR(40) NOT NULL,
mascota_rutPropietario VARCHAR(40) NOT NULL,
mascota_fechaIngreso DATE,
mascota_fechaRetir... | true |
3812f1592ba9925440c7f566b62d8199b10b7d22 | SQL | silence-do-good/stress-test-Postgres-and-MySQL | /dump/high/day09/select1410.sql | UTF-8 | 178 | 2.625 | 3 | [] | no_license |
SELECT timeStamp, temperature FROM ThermometerOBSERVATION o
WHERE timestamp>'2017-11-08T14:10:00Z' AND timestamp<'2017-11-09T14:10:00Z' AND temperature>=46 AND temperature<=83
| true |
d5b55eb7859d940c0bc38ebabf8006f868ae1da1 | SQL | Caucorico/ESIPE | /BDD/TP-06/Exercice-02/requetes.sql | UTF-8 | 1,321 | 4.0625 | 4 | [
"MIT"
] | permissive | -- La liste des identifiants et noms de magasins qui ne vendent pas de bureaux.
SELECT *
FROM magasin
WHERE idmag NOT IN (
SELECT idmag
FROM magasin
INNER JOIN stocke
USING(idmag)
INNER JOIN produit
USING(idpro)
WHERE produit.libelle = 'bureau'
);
-- La liste des magasins dont tous les produits sont à moins de... | true |
8386736b5c39b8d5333c0d307f4b71b879623aef | SQL | gdg-work/SkillFactory__SDA6__Case_A10 | /SQL_Snippets/rus_buyers.sql | UTF-8 | 848 | 3.921875 | 4 | [] | no_license | create view c10_total_conversion_by_cohort as
with
transactions_by_cohort as (
select
date_trunc('month', u.created_at)::date as cohort,
count(distinct c.user_id) as buyers,
count(purchased_at) as transactions
from
case10.carts as c
join case10.users as u on c.user_id... | true |
23e7fa68c02458b33e37763751f3cc177c938bcb | SQL | nishantmunjal/onlantest | /onlanfet_db.sql | UTF-8 | 29,938 | 3.015625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.0.4
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Apr 15, 2014 at 08:44 PM
-- Server version: 5.6.12-log
-- PHP Version: 5.4.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT ... | true |
b21d6cc9f0e8d057a74f93f8d4228dddd829f4b3 | SQL | Aleksandar210/HackerRank-Softuni-challenges | /SoftuniLabPractice/T-SQL Practice/SqlJoinsAndSubQPractice.sql | UTF-8 | 7,010 | 4.5 | 4 | [] | no_license | --1 task
SELECT top 5 EmployeeID, JobTitle,Employees.AddressID,AddressText
FROM Employees
JOIN Addresses ON Employees.AddressId=Addresses.AddressId
ORDER BY Employees.AddressID ASC
--first name last name town and adress text
SELECT top 50 FirstName,LastName,Towns.[Name],AddressText
FROM Employees
JOIN Addresses ON Emp... | true |
f4883b231b8e032162e26fb6b5e5f7cc8a171e7d | SQL | atakage/SQL- | /GRADE(2019-10-15).sql | UTF-8 | 3,299 | 4.59375 | 5 | [] | no_license | -- grade 화면
CREATE TABLE tbl_score(
s_id NUMBER,
s_std nVARCHAR2(50) NOT NULL,
s_subject nVARCHAR2(50) NOT NULL,
s_score NUMBER(3) NOT NULL,
s_remark nVARCHAR2(50),
CONSTRAINT pk_score PRIMARY KEY(s_id) -- PK를 컬럼에 지정하지 않고 별도의 CONSTRAINT 추가 방식으로 지정
... | true |
7dbadeb1fb680b081f8cc8598481eb7fd58f6a3b | SQL | BGCX067/f1project-svn-to-git | /trunk/install.sql | UTF-8 | 33,329 | 3.171875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 3.1.1
-- http://www.phpmyadmin.net
--
-- 主机: localhost
-- 生成日期: 2009 年 03 月 10 日 01:35
-- 服务器版本: 5.1.30
-- PHP 版本: 5.2.8
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RE... | true |
ed2a38947964d2fea11f60aee54a955fbe990c68 | SQL | tuandongoc/CMX | /CMX.api/docs/Script/Workplan detail - Approver list.sql | UTF-8 | 393 | 3.625 | 4 | [] | no_license | SELECT TAP.TicketApprovalID, APP.EmployeeName AS Approver, TAP.ApproverLevel, TAP.ApprovalStatus, TAP.ActionedDate, ActionedBy
FROM CWX_AccountTicket AT
INNER JOIN CWX_TicketApproval TAP ON AT.TicketID = TAP.TicketApprovalRefID AND TAP.Location = 'TICKET'
LEFT JOIN Employee APP ON TAP.ApproverID = APP.EmployeeID
LEFT J... | true |
889d21bd8b04e392e0550f26a8b9bf886f15e6c6 | SQL | jakecraige/pwmdashboard | /install/amcs_db_setup.sql | UTF-8 | 11,469 | 3.1875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 3.4.11.1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Apr 03, 2013 at 08:28 AM
-- Server version: 5.5.23
-- PHP Version: 5.2.17
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;... | true |
6d3e8b9ad613885ca7c8ff1e12aaea64492263d6 | SQL | Alexiis94/HospitalComunal | /DB_EXAMEN/examen_dai.sql | UTF-8 | 8,289 | 3.203125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.6.5.2
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 07-07-2017 a las 03:26:10
-- Versión del servidor: 10.1.21-MariaDB
-- Versión de PHP: 7.1.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLI... | true |
229af544c3aa4f1ecfdf35e1095d9c488b812d37 | SQL | bhujyo/Data_science | /SQL/sql4.sql | UTF-8 | 141 | 3.203125 | 3 | [] | no_license | select count(*) FROM(
SELECT docid
FROM (frequency)
WHERE term = 'law'
UNION
SELECT docid
FROM (frequency)
WHERE term = 'legal');
| true |
457d51d6099251be557235b25ee4d68695cac591 | SQL | andersilva1/petline | /bd/petline.sql | UTF-8 | 18,131 | 2.796875 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : local
Source Server Version : 50505
Source Host : localhost:3306
Source Database : petline
Target Server Type : MYSQL
Target Server Version : 50505
File Encoding : 65001
Date: 2018-11-08 16:36:19
*/
SET FOREIGN_KEY_CHECKS=0;
-- -----... | true |
7e205f8716f0299df9f121215ac1f29023b46fe6 | SQL | danthomas/DTS.GymManager | /DTS.GymManager.Database/Tables/Workout.sql | UTF-8 | 448 | 3.015625 | 3 | [] | no_license | CREATE TABLE Workout
(
WorkoutId INT IDENTITY(1, 1) NOT NULL
, WorkoutTypeId TINYINT NOT NULL
, MemberId INT NULL
, Duration TIME NULL
, IncreasedReps TINYINT NULL
, Description VARCHAR(200) NOT NULL
, CONSTRAINT PK_Workout PRIMARY KEY (WorkoutId)
, CONSTRAINT FK_Workout_WorkoutType FOREIGN KEY (WorkoutTypeId)... | true |
766aae85fe010e22922c4576127bdaa043bdca1e | SQL | hasib135/Restaurant-Management-System-Using-PL-SQL-in-Oracal10g | /CODES/query_link_on_employee/delete_employee_type_checks_fk.sql | UTF-8 | 907 | 3.21875 | 3 | [] | no_license | set serveroutput on;
--create or replace procedure insert_employee() is
accept type_id number prompt 'enter type_id to delete : '
declare
a number;
temp number;
b number;
begin
a:=0;
temp:=0;
b:=0;
b:='&type_id';
select count(*) into temp from employee1@site_link where type_id=b;
select... | true |
325a3a2ece01c62aa6f85dc15e589f1781fc30fc | SQL | dyps/Capacitacao_PayStore_02 | /src/main/resources/db/migration/schema/V20210304210000__create_table_livro_categorias_livro.sql | UTF-8 | 299 | 2.78125 | 3 | [] | no_license | create table tb_book_book_categories (
books_id int8 not null,
book_categories_id int8 not null,
constraint book_categories_idFK foreign key (book_categories_id) references tb_book_category,
constraint books_idFK foreign key (books_id) references tb_book
);
| true |
f73ced2c3c7589a9fb01a17b679caa291d2bc62b | SQL | ghas-results/b-con | /sql/dash_invoice_report.sql | UTF-8 | 7,662 | 2.890625 | 3 | [
"Apache-2.0"
] | permissive | -- Copyright 2020 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
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in ... | true |
40e6f99241c56ae2d56986ab7460142024e38adf | SQL | mvaldetaro/JAVA | /d2_orientacao_a_objetos_com_uml_e_modelagem_de_dados/Assessment/projeto-fisico-dados.sql | UTF-8 | 7,184 | 3.3125 | 3 | [] | no_license | -- MySQL Script generated by MySQL Workbench
-- 10/22/16 15:45:35
-- Model: New Model Version: 1.0
-- MySQL Workbench Forward Engineering
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITION... | true |
cf68b2b6bc8b61552a8e56364d2094fe14283fa4 | SQL | semonke/geometrylib-mindbox | /sql_products_categories.sql | UTF-8 | 247 | 3.59375 | 4 | [] | no_license | USE store;
SELECT Products.Name AS ProductName, Categories.Name AS CategoryName
FROM Products
LEFT JOIN ProductsToCategories ON ProductsToCategories.Product_Id = Products.Id
LEFT JOIN Categories ON Categories.Id = ProductsToCategories.Category_Id | true |
8c39106c4659328f27ecdd175e05679d0605306a | SQL | ajbd2106/Benchmarking-Big-SQL-Systems | /spark_sql/spark_tpch_orc/final_tpch_queries/tpch_query21.sql | UTF-8 | 927 | 4.3125 | 4 | [] | no_license | -- explain
create temporary table l3 stored as orc as
select orderkey, count(distinct suppkey) as cntSupp
from lineitem
where receiptdate > commitdate and orderkey is not null
group by orderkey
having cntSupp = 1
;
with location as (
select supplier.* from supplier, nation where
supplier.nationkey = nation.nationkey... | true |
07989a5f9ea9c8e3722e6832008c410abb0addb7 | SQL | rfgonzalez13/cv | /res/datos_curriculares .sql | UTF-8 | 18,985 | 3.21875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Servidor: localhost
-- Tiempo de generación: 09-09-2021 a las 11:57:36
-- Versión del servidor: 10.3.23-MariaDB-0+deb10u1
-- Versión de PHP: 7.3.19-1~deb10u1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";... | true |
d8f3aee33c8cf2dca0e8424eb463f3017afe0a1a | SQL | EwertonWeb/UriOnlineJudgeSQL | /2621_urionlineSQL.sql | UTF-8 | 141 | 3.3125 | 3 | [] | no_license | SELECT p.name
FROM products as p
inner JOIN providers as pr on p.id_providers=pr.id
WHERE(p.amount between 10 and 20)
and
pr.name like 'P%'; | true |
d334430263c99cfc99ce3094642f708f61829bff | SQL | Keikishim2/Courses_CodeIgniter | /mysql_data.sql | UTF-8 | 2,921 | 3 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | CREATE DATABASE IF NOT EXISTS `ci_courses` /*!40100 DEFAULT CHARACTER SET utf8 */;
USE `ci_courses`;
-- MySQL dump 10.13 Distrib 5.6.17, for Win64 (x86_64)
--
-- Host: 127.0.0.1 Database: ci_courses
-- ------------------------------------------------------
-- Server version 5.6.17
/*!40101 SET @OLD_CHARACTER_SET_... | true |
bd7a6b664ac3648bfb313d3b6c7ebbac78370fb8 | SQL | SoulMan87/Database | /Databeses/nomina(1).sql | UTF-8 | 6,298 | 3.328125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.2
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 05-09-2018 a las 17:42:42
-- Versión del servidor: 10.1.34-MariaDB
-- Versión de PHP: 7.2.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
... | true |
19005f36a29f98714ffeddd550f052c7a8223c4d | SQL | RRFreitas/GeekWay | /geekway-api/database/postgres.sql | UTF-8 | 3,474 | 2.796875 | 3 | [
"MIT"
] | permissive | CREATE TABLE tb_usuario(
id SERIAL PRIMARY KEY,
nome varchar(100) NOT NULL,
email varchar(50) NOT NULL UNIQUE,
senha varchar(20) NOT NULL,
data_nasc date,
profissao varchar(30),
genero varchar(15),
... | true |
00e2a1e372504af762d75b903d86b9971abc2936 | SQL | Hallip/UNAL | /Data Bases/Final/Oracle.sql | UTF-8 | 18,297 | 3.25 | 3 | [] | no_license | /*==============================================================*/
/* DBMS name: ORACLE Version 11g */
/* Created on: 11/7/2019 12:52:27 */
/*==============================================================*/
/*===============================================... | true |
281eef12547134f9832c5cc9109cefb68fbc7d1d | SQL | isuru89/oasis | /services/stats-api/src/main/resources/io/github/oasis/db/scripts/game/readGameStatus.sql | UTF-8 | 158 | 2.9375 | 3 | [
"Apache-2.0"
] | permissive | SELECT
OGS.game_id AS gameId,
OGS.status,
OGS.updated_at AS updatedAt
FROM
OA_GAME_STATUS OGS
WHERE
game_id = :id
ORDER BY
updated_at DESC
LIMIT 1 | true |
ecaeb3d0b64d9671641aaa220a6c4a6a110b930d | SQL | CommunityConnect/CoCo | /demo_invitation/cocoinv_clean.sql | UTF-8 | 13,485 | 2.828125 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 5.5.52, for debian-linux-gnu (x86_64)
--
-- Host: 127.0.0.1 Database: CoCoINV
-- ------------------------------------------------------
-- Server version 5.5.52-0ubuntu0.14.04.1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@C... | true |
1b3644c69b8e1a3cef1efb66d837f9ed6c5007c5 | SQL | koninklijke-collective/koning_api_queue | /ext_tables.sql | UTF-8 | 1,837 | 2.75 | 3 | [] | no_license | #
# Table structure for table 'tx_koningapiqueue_domain_model_api'
#
CREATE TABLE tx_koningapiqueue_domain_model_api (
uid int(11) NOT NULL auto_increment,
pid int(11) DEFAULT '0',
tstamp int(11) DEFAULT '0' NOT NULL,
crdate int(11) DEFAULT '0' NOT NULL,
cruser_id int(11) DEFAULT '0' NOT NULL,
e... | true |
bd8890f3596cb2e27562d7cf2d19bb98b5fabfdd | SQL | motogoozy/houser | /db/seed.sql | UTF-8 | 746 | 3.46875 | 3 | [] | no_license | -- Create Table
create table houses(
id serial PRIMARY KEY,
property_name varchar(30),
address varchar(100),
city varchar(100),
state varchar(2),
zip integer
);
-- Adding dummy data
insert into houses(property_name, address, city, state, zip)
values('Kyles House', '123 Main St', 'Spanish Fork',... | true |
6bcdde205edb0d49dcce968894748323c18899f3 | SQL | patricknaka/Nova | /Views Nike/VW_NK_FLASH_CAIXA_PEDIDO.sql | UTF-8 | 4,815 | 3.265625 | 3 | [] | no_license | SELECT
-- O campo CD_CIA foi incluido para diferenciar NIKE(13) E BUNZL(15)
--**********************************************************************************************************************************************************
Q_ENTREGA.t$UNEG$C CD_UNIDADE_NEGOCIO,
Q_ENTREGA.t$PECL$C NR_PEDIDO,
... | true |
cbb8e7fc758fb9721f10326ef87ec45f968a0759 | SQL | mskf3000/codework | /sql-fmt/sample/eam010/q1.1.sql | ISO-8859-1 | 18,410 | 3.0625 | 3 | [] | no_license | --SELECT COUNT(1) FROM (
SELECT /***** RULE */
DISTINCT
ewo.wip_entity_name ordem_servico
, ewo.wip_entity_name ordem_servico2
, DECODE( NVL(ewo.parent_wip_entity_nam... | true |
72f774d03e2dba9816b22c31bf6ba65f3f00033a | SQL | am502/DB | /src/main/resources/task2/k5.sql | UTF-8 | 449 | 3.40625 | 3 | [] | no_license | WITH g1_k5 AS (
SELECT word
FROM genome_1_k5 UNION
SELECT word
FROM genome_1_k5),
g2_k5 AS (
SELECT word
FROM genome_2_k5 UNION
SELECT word
FROM genome_2_k5),
one AS (
SELECT word
FROM g1_k5 INTERSECT
SELECT word
FROM g2_k5),
two AS (
SELECT word
FROM g1_k5 UNION
SELECT word
... | true |
cd101af4f75c4a370162c1de3728d146ca853ba0 | SQL | qiudaoke/flowable-userguide | /sql/sql/upgrade/common/flowable.db2.upgradestep.6.4.0.to.6.4.1.common.sql | UTF-8 | 2,231 | 2.984375 | 3 | [
"MIT"
] | permissive | create table ACT_HI_TSK_LOG (
ID_ bigint not null GENERATED ALWAYS AS IDENTITY (START WITH 1, INCREMENT BY 1),
TYPE_ varchar(64),
TASK_ID_ varchar(64) not null,
TIME_STAMP_ timestamp not null,
USER_ID_ varchar(255),
DATA_ varchar(4000),
EXECUTION_ID_ varchar(64),
PROC_INST_ID_ varchar(64),
PROC_DEF_ID... | true |
5808c56a662d1cf0aabe7f695decd60cdfa30fdf | SQL | bintangsaktya/chatrtp | /kuisioner/quizzer.sql | UTF-8 | 2,009 | 2.921875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 3.5.2
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Jun 14, 2017 at 02:51 PM
-- Server version: 5.5.25a
-- PHP Version: 5.4.4
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*... | true |
14851f7b384ab92e424f57274bb0fe596cf307db | SQL | tiikerikissa/TrinityCore_4.3.4_DB_Alpha | /updates/079_2013_08_12_01_world_sai.sql | UTF-8 | 30,369 | 2.921875 | 3 | [] | no_license |
-- Baron Ashbury
SET @ENTRY := 37735;
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY;
INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`e... | true |
ed91b3de76e61a15e985800993617a0bd1a297e4 | SQL | JAYTAS/Omilos | /System/Scripts/Database/Mysql/Campaign Database/Stored Procedures/Campaign.uspGetMonthlyCampaignInstanceDates.sql | UTF-8 | 2,951 | 4.0625 | 4 | [] | no_license | DELIMITER $$
DROP PROCEDURE IF EXISTS `Campaign`.`uspGetMonthlyCampaignInstanceDates` $$
CREATE PROCEDURE `Campaign`.`uspGetMonthlyCampaignInstanceDates`
/*
Description : This is to get Campaign Instance dates for a campaign schedule.
Paramenters :
1. startDate : Start date of the campaign
2. endDate : ... | true |
2641bb92ab90b265347b03c920bcbbd2cb27931e | SQL | andreisham/databases | /Homeworks/lesson_9/lesson_9_function.sql | WINDOWS-1251 | 855 | 3.578125 | 4 | [] | no_license | --
--
drop function if exists friendship_direction;
delimiter //
create function friendship_direction(check_user_id int)
returns float reads sql data
begin
declare requests_to_user int;
declare requests_from_user int;
-- ( 1)
set requests_to_user = (select count(*) from friend_requests where targe... | true |
4ac6aeeee4eaa109ec2516dc535348bface29b5f | SQL | dlrbgh9303/oraclesource | /hr.sql | UTF-8 | 8,208 | 4.8125 | 5 | [] | no_license | -- employees 테이블 전체 내용 조회
SELECT
*
FROM
employees;
-- employees 테이블의 first_name,last_name,job_id 만 조회
SELECT
first_name,
last_name,
job_id
FROM
employees;
-- employee_id가 176인 사람의 LAST_NAME과 DEPARTMENT_ID 조회
SELECT
last_name,
department_id
FROM
employees
WHERE
employee_id = 176... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.