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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
27e8ab77e6a6c167de0b18be3049fad79db9acc4 | SQL | joxar/MOIKII.momo | /src/main/java/com/devtwt/app/dao/impl/out.sql | UTF-8 | 4,870 | 3.203125 | 3 | [] | no_license | PRAGMA foreign_keys = ON;
-- MySQL Script generated by MySQL Workbench
-- Tue Apr 7 07:36:51 2015
-- Model: New Model Version: 1.0
-- MySQL Workbench Forward Engineering
-- -----------------------------------------------------
-- Schema MOIKII
-- -----------------------------------------------------
-- ------... | true |
4542215ec41a3eda14ce66070d966fc542798f94 | SQL | LeHack/martialdb | /Schema/create.sql | UTF-8 | 1,818 | 4.125 | 4 | [] | no_license | PRAGMA foreign_keys = ON;
CREATE TABLE "cities" (
"id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL UNIQUE,
"name" VARCHAR NOT NULL UNIQUE
);
CREATE TABLE "training_group" (
"id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL UNIQUE ,
"city_id" INTEGER NOT NULL REFERENCES cities,
"name" VARCHAR NOT NULL... | true |
b485bb28d28b38f45578e11226e3999d7eec9cf4 | SQL | SailsCommunity/sails-callback-to-promises | /sailsit.sql | UTF-8 | 2,992 | 3.109375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.5.4.1deb2ubuntu2
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Oct 26, 2017 at 08:52 PM
-- Server version: 5.7.19-0ubuntu0.16.04.1
-- PHP Version: 7.0.22-0ubuntu0.16.04.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_C... | true |
e3657c49e2b5404efe3d0d04a415613d1cf4ac65 | SQL | Mikey797/spring-security-6-7 | /src/main/resources/sql/user.sql | UTF-8 | 593 | 2.640625 | 3 | [] | no_license | CREATE TABLE `demo`.`user` (
`id` INT NOT NULL,
`username` VARCHAR(45) NULL,
`password` VARCHAR(45) NULL,
PRIMARY KEY (`id`));
ALTER TABLE `demo`.`user`
CHANGE COLUMN `id` `id` INT NOT NULL AU... | true |
7872bf5a6935e6a2f2e596524819b78a80d1c2d0 | SQL | bharathmighty248/Payroll_service | /payroll_service.sql | UTF-8 | 7,759 | 3.765625 | 4 | [] | no_license | create database payroll_service
use payroll_service
Create Table employee_payroll (
Id int identity (1,1) primary key,
Name varchar(20),
Salary varchar(20),
Startdate varchar(20)
)
insert into employee_payroll (Name, Salary, Startdate) values ('Bharath', '50000', '26-5-2021')
insert into employee_payroll (Name, Sala... | true |
fbea3849048251d8df4f20aac81b6fdc5ef31a74 | SQL | alyssadicarlo/swingspot-backend | /sql/schema.sql | UTF-8 | 1,194 | 3.828125 | 4 | [] | no_license | CREATE TABLE users (
id serial PRIMARY KEY,
first_name text,
last_name text,
username text UNIQUE,
email text UNIQUE,
password text,
posts integer DEFAULT 0,
picture text,
registered_date timestamp DEFAULT NOW()
);
CREATE TABLE topics (
id serial PRIMARY KEY,
slug text,
... | true |
4e15d6d203d499fe1f7b026ad9e966fd8bee7cbb | SQL | Veysel13/Spor | /fizyotakip.sql | UTF-8 | 61,991 | 3.125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.6.6
-- https://www.phpmyadmin.net/
--
-- Anamakine: localhost
-- Üretim Zamanı: 27 Eki 2018, 07:24:50
-- Sunucu sürümü: 5.7.17-log
-- PHP Sürümü: 5.6.30
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT ... | true |
a53449abacbebb9c03def2456b6acb412c02df85 | SQL | xwj157/jkStore | /jk.sql | UTF-8 | 4,623 | 2.96875 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : HelloMySQL
Source Server Version : 50527
Source Host : localhost:3306
Source Database : jk
Target Server Type : MYSQL
Target Server Version : 50527
File Encoding : 65001
Date: 2020-10-10 15:06:19
*/
SET FOREIGN_KEY_CHECKS=0;
-- -----... | true |
db398a16a6f3e34c9b392a724240d2544b6be937 | SQL | rjaltman/dogu | /migrations/20190319112227_improve_account_table.sql | UTF-8 | 253 | 2.828125 | 3 | [
"MIT"
] | permissive | ALTER TABLE account ADD UNIQUE (username);
ALTER TABLE account DROP COLUMN contact;
CREATE TYPE positionEnum AS ENUM ('Instructor', 'Student', 'Organizer');
ALTER TABLE account DROP COLUMN position;
ALTER TABLE account ADD COLUMN position positionEnum;
| true |
868c60a9214f0b452092907a5fa3d88369c74b8f | SQL | TatyanaYarush/employee-tracker | /seed.sql | UTF-8 | 954 | 3.359375 | 3 | [
"MIT"
] | permissive | -- Department --
INSERT INTO department(department_name)
VALUES
('Management'),
('Engineering'),
('Human Resources'),
('Finance'),
('Sales'),
-- Role --
INSERT INTO roles(title, salary, department_id)
VALUES
('Engineering Manager', 138000, 1),
("Software Engineer", 110000, 1),
("Web Developer", 90000, 1),
('QA Manage... | true |
5d34ca48a1e2166dfd34e71e085733ac86dfd083 | SQL | DDuartecode/campeonato_sinuca | /db_for_import/db_test_sinuca.sql | UTF-8 | 7,897 | 3.140625 | 3 | [] | no_license | CREATE DATABASE IF NOT EXISTS `db_test_sinuca` /*!40100 DEFAULT CHARACTER SET utf8 */;
USE `db_test_sinuca`;
-- MySQL dump 10.13 Distrib 5.7.17, for Win64 (x86_64)
--
-- Host: 127.0.0.1 Database: db_test_sinuca
-- ------------------------------------------------------
-- Server version 5.5.5-10.4.14-MariaDB
/*!40... | true |
77f8ef6b58320b35c69a5849753438cf4c48cba0 | SQL | umbaga/supreme-doodle | /db/buildSql/functions/get_mechanics.sql | UTF-8 | 1,326 | 3.859375 | 4 | [] | no_license | -- FUNCTION: public.get_mechanics(bigint)
-- DROP FUNCTION public.get_mechanics(bigint);
CREATE OR REPLACE FUNCTION public.get_mechanics(
"itemId" bigint)
RETURNS json
LANGUAGE 'sql'
COST 100
VOLATILE
AS $BODY$
SELECT json_agg(json_build_object(
'id', mech.id,
'conditionalText', C... | true |
4175904145d5352bb45c356d1c051810f7cf03e3 | SQL | klozn/track-shared | /40-databases-sql/50-integration-exercise/oracle/codelab01-oracle/large-exercise-solution.sql | UTF-8 | 12,675 | 3.515625 | 4 | [] | no_license | -- solution
----------------------------------
-- ZIPCODES
CREATE TABLE ZIPCODES
(
ZIPCODE NUMBER(6, 0) NOT NULL,
CITY VARCHAR(50) NOT NULL,
COUNTY VARCHAR(50) NOT NULL,
STATE VARCHAR(50) NOT NULL,
CONSTRAINT ZIPCODES_PK PRIMARY KEY (ZIPCODE)
);
-- FREELANCERS
-- Note: ID's are generated upfront, c... | true |
22781109407ddfbdeaa812bc8de16f3c5369a6b5 | SQL | eploentham/Restaurant | /database/restaurant(7).sql | UTF-8 | 55,785 | 3.140625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Jan 06, 2017 at 11:12 AM
-- Server version: 10.1.13-MariaDB
-- PHP Version: 5.6.23
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CL... | true |
a3f1145d7901f7694f3c190ae65359e1d128398b | SQL | bobs24/ProgateSQL | /sql_dojo_1/page2/exercise3.sql | UTF-8 | 158 | 2.65625 | 3 | [] | no_license | /*
dapatkan jumlah total usia unik pengguna dan
kelompokan pengguna tersebut berdasarkan usia
*/
select users.age, count(users.name)
from users
group by age; | true |
159fe4fcf68da3a68a272be39184b10aad24f119 | SQL | EonViljoen28807995/ITRW321-Semester_Project | /Final_Database_Project/04-init_star_schemes.sql | UTF-8 | 5,634 | 3.71875 | 4 | [] | no_license | --RESET FOR update
DELETE FROM
FACT_SUBTYPES;
DELETE FROM
FACT_SALARYPAID;
DELETE FROM
FACT_READING;
DELETE FROM
DIM_SUBSCRIPTION;
DELETE FROM
DIM_CUSTOMER;
DELETE FROM
DIM_SALARY;
DELETE FROM
DIM_EMPLOYEE;
DELETE FROM
DIM_TIME;
DELETE FROM
DIM_LOCATION;
DELETE FROM
DIM_STATION;
DELETE FRO... | true |
aa70b647284d2e81d21afa87a28ace1b2a040e80 | SQL | toitolucho/CarsKeep10 | /database/t_after_ingresosarticulos_edited.sql | UTF-8 | 521 | 3.546875 | 4 | [] | no_license | DELIMITER $$
CREATE TRIGGER t_after_ingresosarticulos_edited
AFTER UPDATE
ON ingresosarticulos FOR EACH ROW
BEGIN
IF NEW.CodigoEstadoIngreso = 'F' THEN
UPDATE Articulos
INNER JOIN ingresosarticulosdetalle
ON Articulos.IdArticulo = ingresosarticulosdetallE.IdArticulo
set Articul... | true |
f1d8958cc8ce5b571db2b39bbf983dbca6fb86fa | SQL | gpherguson/comparisons | /blog_seeker/sql/schema.sql | UTF-8 | 2,132 | 3.703125 | 4 | [] | no_license | -- More info on Postgres' tsearch is at:
--
-- http://www.postgresql.org/docs/8.3/static/textsearch-controls.html
-- start by creating the database itself...
--
-- create database blogsearch;
drop table blogfeeds cascade;
create table blogfeeds(
id serial primary key,
blog_url text not null unique, ... | true |
63e822114f28d18f93bdbd45c823edf0734dfe6b | SQL | Jackie-Linzz/autodiet2 | /schema.sql | UTF-8 | 1,892 | 3.203125 | 3 | [] | no_license |
create table if not exists category (
cid int unsigned not null primary key,
name char(50) not null,
ord int unsigned not null,
description varchar(1000)
);
create table if not exists diet(
did int not null primary key,
name char(50) not null,
price float(8,2) not null,
ord ... | true |
9767408ed6a4391076e8c40005f1510752506a13 | SQL | chorpitman/webnote | /src/main/resources/dml.sql | UTF-8 | 1,233 | 2.78125 | 3 | [] | no_license | use notes1;
INSERT INTO Role (role) VALUES ('admin');
INSERT INTO Role (role) VALUES ('user');
INSERT INTO Role (role) VALUES ('superuser');
INSERT INTO User (login, password, role_id) VALUES ('admin', 'a', 1);
INSERT INTO User (login, password, role_id) VALUES ('user', 'u', 2);
INSERT INTO User (login, password, rol... | true |
6036e3bfc8f5323be7af3b33322ab5d815cbf27d | SQL | MerrilCode/Ruby | /sinatra-practice-viewEngine/seed.sql | UTF-8 | 565 | 2.84375 | 3 | [] | no_license | DROP TABLE IF EXISTS cars;
CREATE TABLE cars (
id SERIAL PRIMARY KEY,
name VARCHAR(255),
year VARCHAR(255),
url VARCHAR(255)
);
INSERT INTO cars (name , year, url) VALUES ('Aston Martin', '2014', 'https://www.driving.co.uk/s3/st-driving-prod/uploads/2016/12/db11-08.jpg');
INSERT INTO cars (name , year, url)... | true |
0015704fa494563bd869620eaeafac07af98e891 | SQL | vijaydairyf/TimelyFish | /SolomonApp/dbo/Stored Procedures/dbo.ADG_ProcessMgr_ShKitObsolete.sql | UTF-8 | 368 | 2.6875 | 3 | [] | no_license | create proc ADG_ProcessMgr_ShKitObsolete
@CpnyID varchar(10),
@SOShipperID varchar(15)
as
select p.InvtID,
p.SiteID
from SOPlan p
join SOShipHeader h
on h.CpnyID = p.CpnyID
and h.ShipperID = p.SOShipperID
where p.CpnyID = @CpnyID
and p.SOShipperID = @SOShipperID
and p.PlanType = '26'
and ((p.InvtID <... | true |
d9fa10e81c262aa5dfeaf453230ac56963c95856 | SQL | bellmit/origin | /family_order/sql/TF_F_USER_GRP_MERCHP/SEL_SINGLE_ONE.sql | UTF-8 | 291 | 2.90625 | 3 | [] | no_license | select t.product_order_id,t.product_offer_id
FROM tf_f_user_grp_merchp t
WHERE 1=1
AND t.GROUP_ID = :GROUP_ID
AND t.MERCH_SPEC_CODE=:MERCH_SPEC_CODE
AND t.PRODUCT_SPEC_CODE=:PRODUCT_SPEC_CODE
AND t.USER_ID=:USER_ID
AND SYSDATE > t.START_DATE AND SYSDATE<t.END_DATE
| true |
9e2e626a4538c18e677f4d13b0877e590d4cf288 | SQL | voeux-blamer/stitfatahillah | /siakad (2).sql | UTF-8 | 16,919 | 3.171875 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 5.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Feb 13, 2020 at 01:56 PM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.2.27
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... | true |
5e42da29ce60a6e10128b5cdf2f1a4b5fa6996c0 | SQL | ehabarman/Hackerrank-Solutions | /src/Sql/AdvancedJoin/Medium/SQLProjectPlanning.sql | UTF-8 | 508 | 3.796875 | 4 | [] | no_license | SET sql_mode = '';
SELECT Start_Date, End_Date
FROM
(
SELECT Start_Date
FROM Projects
WHERE Start_Date
NOT IN (
SELECT End_Date
FROM Projects
)
) a,
(
SELECT End_Date
FROM Projects
WHERE End_Date
NOT IN (
... | true |
8a241e2677a9abf204b70fd04125dc7f2f30b89d | SQL | cortizqgithub/csoftz-ceiba-java-learning | /docs/db/mysql/scripts/db.sql | UTF-8 | 4,285 | 3.03125 | 3 | [
"Apache-2.0"
] | permissive | -- Created using MySQL Workbench Server Data Export.
CREATE DATABASE IF NOT EXISTS `parking_lot` /*!40100 DEFAULT CHARACTER SET latin1 */;
USE `parking_lot`;
-- MySQL dump 10.13 Distrib 5.7.17, for Win64 (x86_64)
--
-- Host: localhost Database: parking_lot
-- ------------------------------------------------------... | true |
25752802e296b8d47eca4e55b9159323188e280e | SQL | silence-do-good/stress-test-Postgres-and-MySQL | /dump/high/day09/select0423.sql | UTF-8 | 178 | 2.609375 | 3 | [] | no_license |
SELECT timeStamp, temperature FROM ThermometerOBSERVATION o
WHERE timestamp>'2017-11-08T04:23:00Z' AND timestamp<'2017-11-09T04:23:00Z' AND temperature>=40 AND temperature<=73
| true |
a003ca857c6d1ad88aa710078b47a775d462b2d9 | SQL | ken00535/golang-medium-example | /postgres/scripts/postgres/initialize.sql | UTF-8 | 306 | 2.96875 | 3 | [] | no_license | DROP TABLE IF EXISTS players;
DROP TABLE IF EXISTS games;
CREATE TABLE players (
id SERIAL PRIMARY KEY,
age SMALLINT NOT NULL,
username VARCHAR(50) NOT NULL,
budget INTEGER
);
CREATE TABLE games (
id SERIAL PRIMARY KEY,
winner_id SMALLINT NOT NULL,
location VARCHAR(50) NOT NULL,
prize INTEGER
); | true |
d893603a85b3defc75323ac7b58ca59b9ad605b7 | SQL | utcn-sd-serban/assignment-1-alecostantea | /assignment1/src/main/resources/db/migration/V1__Initial_schema.sql | UTF-8 | 726 | 3.03125 | 3 | [] | no_license | CREATE TABLE `stackoverflow`.`question` (
`id` INT NOT NULL AUTO_INCREMENT,
`title` VARCHAR(45) NOT NULL,
`text` VARCHAR(45) NOT NULL,
`author` VARCHAR(45) NOT NULL,
PRIMARY KEY (`id`));
CREATE TABLE `stackoverflow`.`user` (
`id` INT NOT NULL AUTO_INCREMENT,
`username` VARCHAR(45) NOT NULL,
`pas... | true |
ce8945bbaefcb9c49e921e1035b5939d1570375b | SQL | radtek/abs3 | /sql/mmfo/bars/Table/cig_d02.sql | WINDOWS-1251 | 3,763 | 3.171875 | 3 | [] | no_license |
PROMPT =====================================================================================
PROMPT *** Run *** ========== Scripts /Sql/BARS/Table/CIG_D02.sql =========*** Run *** =====
PROMPT =====================================================================================
PROMPT *** ALTER_POLICY_INFO... | true |
c1b08a3831c4d10b5da984fccadac193c79faccd | SQL | karobest3/NguyenThanhKienSQL | /B10_ThaoTacVoiCoSoDuLieu/BT_B1ThietKeVaTaoCSDLchoUngDungQuanLyThuVien.sql | UTF-8 | 2,351 | 3.3125 | 3 | [] | no_license | drop database if exists thuvien;
create database thuvien;
use thuvien;
create table loaisach (
IDloaisach int auto_increment not null primary key,
tenloaisach nvarchar(50) not null);
create table thesinhvien(
IDthesinhvien int auto_increment not null primary key,
tensinhvien nvarchar(50) not null,
NgaySinh date not nul... | true |
940e94eda1329ac8bfd2c34706e3322052c39fab | SQL | mavridiSS/Programming101-3 | /week8/1-The-Last-HR/database.sql | UTF-8 | 597 | 3.484375 | 3 | [] | no_license | DROP TABLE IF EXISTS students;
CREATE TABLE students(student_id INTEGER PRIMARY KEY,
student_name TEXT UNIQUE,
github_name TEXT);
DROP TABLE IF EXISTS courses;
CREATE TABLE courses(course_id INTEGER PRIMARY KEY,
course_name TEXT UNIQUE);
DROP TABLE IF EXISTS student... | true |
7b7bd77ebcfcbc3473c33e805f8f7d84b0f65365 | SQL | vasbka/courses | /course project/project/src/main/resources/db/procedure.sql | UTF-8 | 5,935 | 3.859375 | 4 | [] | no_license | CREATE FUNCTION multiply(coef FLOAT, point FLOAT) RETURNS FLOAT
DETERMINISTIC
BEGIN
RETURN coef * point;
END//
CREATE FUNCTION get_faculty_subject_id_by_index(facultyId INT, indx INT) RETURNS INT
DETERMINISTIC
BEGIN
DECLARE subjectIdForReturn INT DEFAULT 0;
SELECT subjectId INTO subjectIdForReturn FROM facultySubject... | true |
880249563b7e6e935d4ab8e47b65bac176cc9506 | SQL | Omar-Khaium/SMS | /coaching.sql | UTF-8 | 21,655 | 3.21875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.0
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Apr 30, 2018 at 10:11 AM
-- Server version: 10.1.25-MariaDB
-- PHP Version: 7.1.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
c5ddb7a13409ddf24edb8b55e4a1c57ac08b6904 | SQL | AdeelGalileo/GTM-App | /dbChanges/getAdminConsultantTaskList.sql | UTF-8 | 9,293 | 3.796875 | 4 | [] | no_license | DELIMITER //
DROP PROCEDURE IF EXISTS `getAdminConsultantTaskList`//
CREATE PROCEDURE `getAdminConsultantTaskList`(
_userId INT(11),
_filterBy TINYINT(1),
_userRole INT(11),
_FromDate DATE,
_ToDate DATE,
_Start INT,
_Limit INT,
_SortOrder VARCHAR(100),
_writerId INT(11),
_clientId INT(11),
_isComplete TINYINT(1),
_di... | true |
1fd606a489b243579ac4514bd23a8bb29ced275e | SQL | Lbansal1804/HotelManagementSystem | /HotelManagementSystem/hotelmanagementsystem_queries.sql | UTF-8 | 1,682 | 4 | 4 | [] | no_license | -- How many DISTINCT guest have made bookings for a particular mONth?
SELECT DISTINCT CustomerID FROM Booking
GROUP BY BookingDate;
-- How many available rooms are in a particular hotel for a given date?
SELECT COUNT(*) numbersofrooms FROM Booking bk JOIN RoomType rt
ON rt.RoomTypeID = bk.RoomTypeID
JOIN Hotel hl
... | true |
14146fe4b7b37d55b2bd80c379332240e81b3026 | SQL | jmarca/CalVAD-WIM-StoreStatusSpreadsheeets | /sql/alter_wim_status.sql | UTF-8 | 1,011 | 3.125 | 3 | [] | no_license | -- run these if you are updating an older db table definition
alter table wim_status add column internal_class_notes character varying;
alter table wim_status add column internal_weight_notes character varying;
alter table wim_status add column parser_decisions_notes character varying;
-- update as of the 08 2013 sp... | true |
ae8a12fc5de7d25142837e447acafe7b32474768 | SQL | dcardonat/prueba_lib | /Desarrollo/Libellus.SqlAzure/Entrega 1/Tablas/Paises.sql | ISO-8859-1 | 389 | 3.15625 | 3 | [] | no_license | /*
<Summary>Almacena la informacin de los pases habilitados en Libellus.<Summary>
*/
CREATE TABLE Paises (
Id smallint identity(1,1) NOT NULL, -- Identificador interno.
Nombre varchar(70) NOT NULL -- Nombre del pas.
)
;
ALTER TABLE Paises
ADD CONSTRAINT UQ_Paises_Nombre UNIQUE (Nombre)
;
ALTER TABLE P... | true |
b57ae016bab72e54d9364aa1e555174ea5789064 | SQL | davidchilds6/data21-final-project-DC-fork | /SQLViews/Talent_Recruiter_View.sql | UTF-8 | 148 | 3.015625 | 3 | [] | no_license | CREATE VIEW [Talent Recruiters] AS
SELECT
c.candidate_id,
s.staff_name
FROM candidate c
INNER JOIN staff s
ON s.staff_id = c.staff_id;
| true |
43ae2002db1cccd2965abda576aeacc8d5744cfc | SQL | JaroneR/Portfolio-Capstone | /Database Project/BIGDATAGROUP.sql | UTF-8 | 5,483 | 3.65625 | 4 | [] | no_license |
/* Set up session settings */
SET LINESIZE 120
SET PAGESIZE 80
/* Drop all tables before creating tables */
DROP TABLE Shipment_T CASCADE CONSTRAINTS;
DROP TABLE Equipment_T CASCADE CONSTRAINTS;
DROP TABLE Vendor_T CASCADE CONSTRAINTS;
DROP TABLE ClientProject_T CASCADE CONSTRA... | true |
13acca15c85a0d069d9930690a00e19730e03bf3 | SQL | pavelmiskevich/sql-ex | /SQL/84 (2) Аэрофлот.sql | UTF-8 | 5,513 | 3.90625 | 4 | [] | no_license | --Для каждой компании подсчитать количество перевезенных пассажиров (если они были в этом месяце) по декадам апреля 2003. При этом учитывать только дату вылета.
--Вывод: название компании, количество пассажиров за каждую декаду
-- Предложение GROUP BY
-- Оператор CASE
-- Процесс ----------------------------------... | true |
b59344a13ddcc4fea8728f6d9bc50a053b094b92 | SQL | indahagustien57/kamus_sederhanaSQL | /flutter-server/db_berita.sql | UTF-8 | 12,919 | 3.21875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 21 Agu 2020 pada 14.13
-- Versi server: 10.4.13-MariaDB
-- Versi PHP: 7.4.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CH... | true |
3b93d1dbc2d0932742c8f4ee100628150dc9deb6 | SQL | imsolost/wander | /src/database/seed.sql | UTF-8 | 489 | 2.640625 | 3 | [
"MIT"
] | permissive | INSERT INTO
cities (cityname, country)
VALUES
('Malibu', 'USA'),
('Oakland', 'USA'),
('Berkeley', 'USA'),
('London', 'England')
;
INSERT INTO
users (username, email, password)
VALUES
('a', 'a@a.com', 'a'),
('b', 'b@b.com', 'b')
;
INSERT INTO
posts (user_id, city_id, content)
VALUES
(1, 1, 'A revie... | true |
ce74f1387fff2250e35cdc4a4ff6737ea883f420 | SQL | danilodesouzapereira/plataformasinap_exportaopendss | /Fontes/BD/Rede/BaseAccess/Consultas/SPSNP_dlEstudoCorte_p05.sql | UTF-8 | 149 | 2.515625 | 3 | [] | no_license | DELETE
RRCarga.*
FROM
RRCarga INNER JOIN TmpEquip ON
RRCarga.intMRedeId = TmpEquip.intEquipId
WHERE
RRCarga.intEstudoId = [p_EstudoId];
| true |
8e5b754e758b1c85bf405e1ad06383c9fe5eebfd | SQL | TrevorZiller/4050-Bookstore-Project | /src/main/users.sql | UTF-8 | 381 | 2.84375 | 3 | [] | no_license | CREATE DATABASE `userInfo` DEFAULT CHARACTER SET utf8mb4;
USE `userInfo`;
DROP TABLE IF EXISTS `users`;
CREATE TABLE `users` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`email` varchar(45) NOT NULL,
`password` varchar(45) NOT NULL,
`firstname` varchar(45) NOT NULL,
`lastname` varchar(45) NOT NULL,
... | true |
66648d84d3bd763372de98a3af70326f54d2e42f | SQL | Alex-AZ/tp_m2i_spring-angular_voyage | /src/main/resources/bdd/voyage.sql | UTF-8 | 4,047 | 3.234375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.7
-- https://www.phpmyadmin.net/
--
-- Host: localhost:8889
-- Generation Time: Oct 12, 2021 at 02:56 PM
-- Server version: 5.7.32
-- PHP Version: 7.4.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
--
-- Database: `voyage`
--
-- ----------------------------... | true |
687f06c05dae7b4d580bacacc4ab7b20d15be4e1 | SQL | fuhua2788841445/MvnSSM1522 | /wancai.sql | UTF-8 | 32,221 | 3.25 | 3 | [] | no_license | /*
SQLyog Ultimate v12.3.1 (64 bit)
MySQL - 5.5.53 : Database - mybatis
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECK... | true |
6bbc07632d4e566b9bb9bac3ced2eb2a1dae2163 | SQL | kosquiz/lernquiz | /Misc/questions/bwp.sql | UTF-8 | 3,197 | 2.8125 | 3 | [] | no_license | #fängt an mit 31
INSERT INTO Question(Category, Question, Difficulty) VALUES('BWP', 'Wo setzt die Marktanalyse an', 1);
INSERT INTO answer (Answer, Correct, Question_idQuestion) VALUES ("Zukunft", 0, 31);
INSERT INTO answer (Answer, Correct, Question_idQuestion) VALUES ("Vergangenheit", 0, 31);
INSERT INTO answer (Answ... | true |
fadbf975b431211307a97ce0c430fa0da91f495c | SQL | sbksba/BDD-LI341 | /TME3/PROCmoyprime2.sql | UTF-8 | 577 | 3.40625 | 3 | [
"MIT"
] | permissive | --Affiche la moyenne des primes pour un tournoi et une annee donnee.
CREATE or REPLACE PROCEDURE PROCmoyprime2
( P_lieutournoi GAIN.lieutournoi%TYPE, P_annee GAIN.annee%TYPE )
IS
V_moyenne GAIN.prime%TYPE;
FIN exception;
BEGIN
select AVG(prime)
into V_moyenne
from GAIN
where lieutournoi=P_lieutournoi and annee=P_annee... | true |
5547fbb7f698de56b6a21e08253e91aa45ba65c1 | SQL | JSQLParser/JSqlParser | /src/test/resources/net/sf/jsqlparser/statement/select/oracle-tests/merge02.sql | UTF-8 | 530 | 2.90625 | 3 | [
"Apache-2.0",
"LGPL-2.1-only"
] | permissive | ---
-- #%L
-- JSQLParser library
-- %%
-- Copyright (C) 2004 - 2019 JSQLParser
-- %%
-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0
-- #L%
---
merge into bonuses d
using (select employee_id.* from employees) s
on (employee_id = a)
when not matched then insert (d.employee_id, d.bonus)
values... | true |
5bc159dbcac4f24f5dc638620da90fb83acddfda | SQL | eloisasmorais/projeto-lp | /db_archive.sql | UTF-8 | 750 | 3.015625 | 3 | [] | no_license | --
-- Base de Dados: `db_archive`
--
CREATE DATABASE IF NOT EXISTS `db_archive` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
USE `db_archive`;
-- --------------------------------------------------------
--
-- Estrutura da tabela `tb_albums`
--
CREATE TABLE IF NOT EXISTS `tb_albums` (
`ID` int NOT NULL AUTO_INC... | true |
75fc2d50daee461e33425c1e19041cd9094a921b | SQL | s-goto1/test | /test_0613f/WebContent/sql/vacation.sql | UTF-8 | 363 | 2.921875 | 3 | [] | no_license | /*
休暇届のテーブル
*/
CREATE TABLE vacation(
vacation_id SERIAL PRIMARY KEY,
id VARCHAR(100) REFERENCES userinfo(id),
year INTEGER NOT NULL,
from_month INTEGER NOT NULL,
from_day INTEGER NOT NULL,
to_month INTEGER NOT NULL,
to_day INTEGER NOT NULL,
total_day INTEGER NOT NULL,
division VARCHAR(100) NOT NULL,
reaso... | true |
79210981b056c72a488c239fa419f5fca6521bed | SQL | MrD0079/portal | /sql/dzc_reestr_creators_list.sql | UTF-8 | 298 | 2.578125 | 3 | [] | no_license | /* Formatted on 19.06.2014 11:00:58 (QP5 v5.227.12220.39724) */
SELECT DISTINCT u.tn,
u.fio,
u.pos_name,
u.dpt_name,
d.sort
FROM user_list u, departments d
WHERE d.dpt_id = u.dpt_id AND u.tn > 0
ORDER BY d.sort, u.fio | true |
db274b1158e57bb00fea023c43816410490fa2d0 | SQL | HaehunLee/cgv-benchmark | /jf/.svn/pristine/db/db274b1158e57bb00fea023c43816410490fa2d0.svn-base | UTF-8 | 7,677 | 3.140625 | 3 | [] | no_license |
/* Drop Tables */
DROP TABLE JF_DIARYS CASCADE CONSTRAINTS;
DROP TABLE JF_EVENTS CASCADE CONSTRAINTS;
DROP TABLE JF_MYTHEATERS CASCADE CONSTRAINTS;
DROP TABLE JF_QUESTIONS CASCADE CONSTRAINTS;
DROP TABLE JF_RESERVATIONS CASCADE CONSTRAINTS;
DROP TABLE JF_REVIEWS CASCADE CONSTRAINTS;
DROP TABLE JF_WISHLISTS C... | true |
c33bc76029a60a80917a597cad9958f2569d43a8 | SQL | tungbinhthaison/laravel-8.x-ecommerce | /database/laravel_8x_ecommerce.sql | UTF-8 | 3,596 | 3.296875 | 3 | [
"MIT"
] | permissive | /*
Navicat Premium Data Transfer
Source Server : Localhost
Source Server Type : MySQL
Source Server Version : 100411
Source Host : localhost:3306
Source Schema : laravel_8x_ecommerce
Target Server Type : MySQL
Target Server Version : 100411
File Encoding : 65001
Date... | true |
3a20dcf843e231b55f26f66b76de8d7ba87a1805 | SQL | litianlongcrt/hospital | /hospital/hospital.sql | UTF-8 | 24,007 | 3.546875 | 4 | [] | no_license | /*
MySQL Data Transfer
Source Host: localhost
Source Database: hospital
Target Host: localhost
Target Database: hospital
Date: 2017/3/20 21:20:49
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for bed
-- ----------------------------
CREATE TABLE `bed` (
`bno` int(11) NOT NULL,
`pno... | true |
d734fc522513335b4d8a5276f2c2e640b7541933 | SQL | scepanenka/oracle | /Tasks/Task-01.sql | UTF-8 | 1,327 | 3.625 | 4 | [] | no_license | -- Триггер для строки поставки, автоматически вычисляющий сумму и НДС строки.
-- Следующий шаг — вычисление в триггере суммы и НДС заголовка поставки по изменению в строках.
CREATE OR REPLACE TRIGGER t_supply_str_biur_trg
BEFORE UPDATE OF QTY, PRICE OR INSERT OR DELETE
ON T_SUPPLY_STR
FOR EACH ROW
WHEN... | true |
f2318de5c8514f4e3359baaf439f0bdb72256152 | SQL | smarcus4/MongoSraper | /db/marketplaceSchema.sql | UTF-8 | 572 | 3.421875 | 3 | [] | no_license |
CREATE DATABASE marketplace_db;
USE marketplace_db;
CREATE TABLE posts (
id int AUTO_INCREMENT NOT NULL,
post_title varchar(50) NOT NULL,
post_body varchar(500) NOT NULL,
post_email varchar(255) NOT NULL,
post_image_url varchar(1000) NULL,
community_id int(10),
PRIMARY KEY(id)
);
CREATE TABLE communit... | true |
3bc214b71483a065e7637159b78814c1750ec59d | SQL | ncoden/42_PHP_pool | /d05/ex19/ex19.sql | UTF-8 | 111 | 2.515625 | 3 | [
"Apache-2.0"
] | permissive | SELECT DATEDIFF(MAX(`date`), MIN(`date`)) AS 'uptime'
FROM `db_ncoden`.`historique_membre`
GROUP BY `id_film` | true |
141dafd560480557d65b5f48503de6a68206390f | SQL | radtek/Scripts | /textoplanhashvalue.sql | UTF-8 | 273 | 2.921875 | 3 | [] | no_license | col sql_id for a13
break on sql_id skip 1
select sql_id, sql_text
from
(select distinct s.sql_id, st.sql_text, st.piece
from v$sqltext st
inner join v$sql s
on s.sql_id = st.sql_id
where s.plan_hash_value = &plan_hash_value) tbl
order by sql_id, piece
/
clear breaks | true |
4ec75aec8e56d2992c889171f2016e6a4c1635ee | SQL | AlineDominique/BD_API_Felizometro | /ScriptBDFelicimetro.sql | UTF-8 | 1,792 | 3.453125 | 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='TRADITIONAL,ALLOW_INVALID_DATES';
-- -----------------------------------------------------
-- Schema mydb
-- -... | true |
569444cd0ca239ca7ef2362ac7b030ef18ec9661 | SQL | ChristianGracia/marketfeels.com-Python-API | /test-db/start.sql | UTF-8 | 599 | 2.875 | 3 | [] | no_license | CREATE TABLE posts (
id serial PRIMARY KEY,
title VARCHAR ( 150 ) NOT NULL,
subreddit VARCHAR ( 30 ) NOT NULL,
post_description VARCHAR ( 1000 ) NOT NULL,
reddit_id VARCHAR ( 60 ) UNIQUE NOT NULL,
created_utc TIMESTAMP NOT NULL,
author VARCHAR ( 60 ) NOT NULL,
post_url varchar (130),
insert_timestamp TIMESTAMP... | true |
b6be39865ce6de5dd289a1b0ba0de7b978ff53ff | SQL | ZaRqax/CRUD-php-mysql | /employees.sql | UTF-8 | 2,762 | 3.375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 3.5.1
-- http://www.phpmyadmin.net
--
-- Хост: 127.0.0.1
-- Время создания: Окт 18 2020 г., 11:10
-- Версия сервера: 5.5.25
-- Версия PHP: 5.3.13
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!4010... | true |
e883b9f63a015d7883b8968bafe47fa02947e231 | SQL | Ramsteven/holbertonschool-higher_level_programming | /0x0E-SQL_more_queries/10-genre_id_by_show.sql | UTF-8 | 608 | 3.296875 | 3 | [] | no_license | -- Import the database dump from hbtn_0d_tvshows to your MySQL server
-- https://s3.amazonaws.com/intranet-projects-files/holbertonschool-higher-level_programming+/274/hbtn_0d_tvshows.sql
-- script that lists all shows contained in hbtn_0d_tvshows that have at least one genre linked.
-- Each record displays: tv_shows.t... | true |
2948edd24d80ae56c066a360174fb882666f67dd | SQL | CUBRID/cubrid-testcases | /sql/_17_sql_extension2/_02_full_test/_09_implicit_type_conversion/_01_assignment/_01_type_conversion_by_insert/cases/bigint_conversion_insert.sql | UTF-8 | 2,995 | 3.09375 | 3 | [
"BSD-3-Clause"
] | permissive | --test implicit type conversion of bigint type
create table bigint_conversion(
col1 datetime,
col2 date,
col3 time,
col4 timestamp,
col5 double,
col6 float,
col7 numeric,
col8 bigint,
col9 int,
col10 short,
col11 monetary,
col12 bit,
col13 bit varying,
col14 char(20),
col15 varchar(20),
col16 nchar(2... | true |
f5d06b911bfbfd520fb8abcd14587060366e407d | SQL | kmdemirtas/ceng356Project | /2.insert_employee_queries.sql | UTF-8 | 1,020 | 2.6875 | 3 | [] | no_license | -- employee 1
INSERT INTO position
VALUES (1, 'Manager');
INSERT INTO address
VALUES (1, 25, 70, '888 Oak Street', 'East Syracuse', 'New York');
INSERT INTO employee
VALUES (1, 'Jason', 'Jones', '315-335-7456', 'Jason.Jones@electronicsstore.com', 1, 1, '2020-12-20');
-- employee 2
INSERT INTO position
... | true |
e27e46778e102dd2fbe48b0abd0f1e26e7305964 | SQL | suevip/aiwan | /doc/cdb_cfa3516b1d.sql | UTF-8 | 2,176 | 3.15625 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : us-cdbr-azure-east-c.cloudapp.net
Source Server Version : 50521
Source Host : us-cdbr-azure-east-c.cloudapp.net:3306
Source Database : cdb_cfa3516b1d
Target Server Type : MYSQL
Target Server Version : 50521
File Encoding : 650... | true |
0e996c2bf513f6a637ed475240e1ad875d935e1b | SQL | Liksu/Tricycle | /install.sql | UTF-8 | 9,711 | 3.953125 | 4 | [] | no_license | SET NAMES UTF8;
DELIMITER $$
--
-- Процедуры
--
DROP PROCEDURE IF EXISTS `tricycle_rearrange_children`$$
CREATE PROCEDURE `tricycle_rearrange_children`(pid int)
DETERMINISTIC
BEGIN
declare _cid int unsigned;
declare p_xpath varchar(128);
declare p_level, _count smallint unsigned;
declare done ... | true |
d5efef95ed6e09443993ee7928311a43f7cfa92d | SQL | pmtempone/sistemas_recomendacion | /joins_01.sql | UTF-8 | 199 | 3.0625 | 3 | [] | no_license | --primeros joins de aumento de datos, aumentado con tabla usuarios
select a.*,b.edad,substr(b.fecha_alta,1,4) as anio_alta,b.tipo
from ratings_train a,usuarios b
where a.id_usuario=b.id_usuario;
-- | true |
dab1411327d81e24eac0c661b90e7328f8237d80 | SQL | Weiss4321/TestDevelopment | /SQL queries/SQL upiti/Sirius/Upiti od SIDEV 24 5 2013 .sql | ISO-8859-3 | 2,807 | 3.171875 | 3 | [] | no_license | SET CURRENT_SCHEMA = SIDEV
SELECT * FROM batch_log WHERE exec_status = 'P';
SELECT USE_ID FROM app_user WHERE user_name = 'Vinko elepirovi';
SELECT * FROM app_user WHERE user_name = 'Vinko elepirovi';
SELECT EXEC_STATUS FROM batch_log WHERE USE_ID = 46003; -- dobijam samo user_name tu radim
SELECT * FRO... | true |
c7a3f9e5d37028a3c8fda5d9593094565725190e | SQL | openit/Oracle_SQL_Scripts | /sess_stats.sql | UTF-8 | 302 | 3.34375 | 3 | [] | no_license | prompt "provide SID and stat name like physical read, logical read, CPU etc or hit enter for all ..."
accept sid prompt "Enter the sid: "
select sn.name, st.value
from v$sesstat st, v$statname sn
where
st.statistic# = sn.statistic#
and st.sid= '&SID'
and sn.name like '%&stat_name%'
order by 2; | true |
bb5a53340d161590666a45bfcafcb80b9e25273b | SQL | george887/database-exercises | /where_exercises.sql | UTF-8 | 2,028 | 4.625 | 5 | [] | no_license | USE employees;
-- Question 2 Find all employees with first names 'Irena', 'Vidya', or 'Maya' — 709 rows (Hint: Use IN).
Select first_name
from employees
where first_name in ('Irena','Vidya','Maya');
-- Question 3 Find all employees whose last name starts with 'E' — 7,330 rows.
Select last_name
from employees
where la... | true |
0cc7ba97463d071f91b211507d917f304019159e | SQL | Codyschenk/homeworkweek12-ems | /db/seed.sql | UTF-8 | 725 | 3.09375 | 3 | [] | no_license | USE employeeDB;
INSERT INTO department (name)
VALUES ("Field"), ("Office"), ("Finance"), ("Legal");
INSERT INTO role (title, salary, department_id)
VALUES
("Managers", 100000, 2),
("Chemist", 120000, 2),
("Investigator", 90000, 1),
("Janitor", 50000, 2),
("Accountant", 95000, 3),
("Security", ... | true |
cde87fe1624298c6615b757755a367ba75714e1a | SQL | santiagovazquez/gcba-opendata-1 | /db/migrate/sanetizar.sql | UTF-8 | 1,541 | 3.375 | 3 | [] | no_license |
--BORRO TUPLAS CON SECCIONES MAL FORMADAS (parcelas_data, 5 tuplas)
delete from parcelas_data where char_length(seccion) != 2;
--BORRO TUPLAS CON PROBLEMAS DE ENCODING (parcelas_geometry, 56 tuplas)
delete from parcelas_geometries where char_length(substring(parcela from '[^\w]+')) > 0 or char_length(substring(manzan... | true |
8f40cde933a68507a4d85c718940474b988e3937 | SQL | nile546/investorJournalBack | /migrations/20210614051532_deposit_deals.up.sql | UTF-8 | 360 | 2.703125 | 3 | [] | no_license | CREATE TABLE deposit_deals(
id BIGSERIAL NOT NULL PRIMARY KEY,
bank_instrument_id BIGINT REFERENCES banks_instruments (id),
currency SMALLINT,
enter_datetime TIMESTAMP NOT NULL,
percent FLOAT,
exit_datetime TIMESTAMP,
start_deposit BIGINT,
end_deposit BIGINT,
result BIGINT,
... | true |
9df4c1386d2667895ba5fcbe9ce09179502431da | SQL | jamiemcohen/HKeInvestmentApp | /Select.sql | UTF-8 | 206 | 2.921875 | 3 | [] | no_license | select distinct firstName, lastName, email, HKIDPassportNumber
from Client,SecurityHolding
where code ='22' and Client.accountNumber = SecurityHolding.accountNumber and type='stock'
order by lastNames | true |
4148f9d31d70be88e88585ddcbdf00fe7d7abcba | SQL | godefroi/family-photo-share | /photo-share-db/Functions/UserPhotos.function.sql | UTF-8 | 878 | 3.53125 | 4 | [] | no_license | create function UserPhotos(@uid int) returns table as return
(
select
iq.photoid,
iq.title,
iq.filename,
iq.description,
iq.uploadedby,
iq.contenttype,
iq.filedate,
iq.uploaddate
from
(
-- get photos directly owned by the user
select
p.photoid,
p.title,
p.filename... | true |
9af3180ea98819f8b3bc90d04caaf391c70adc91 | SQL | PacktPublishing/Learning-PostgreSQL-10-Second-Edition | /Chapter09/old/full_search.sql | UTF-8 | 1,112 | 3.046875 | 3 | [
"MIT"
] | permissive | SELECT 'A wise man always has something to say, whereas a fool always needs to say something'::tsvector;
SELECT to_tsvector('english', 'A wise man always has something to say, whereas a fool always needs to say something');
SELECT 'A wise man always has something to say, whereas a fool always needs to say something'::t... | true |
8fc851b8f9e4c7a826537c2cf4ae3cc9810185dc | SQL | OlgaRa/sscm | /sql/db.mysql.sql | UTF-8 | 3,364 | 3.625 | 4 | [] | 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='TRADITIONAL,ALLOW_INVALID_DATES';
-- -----------------------------------------------------
-- Schema sscm
-- -... | true |
50845828ea501e4e1935ab94d9207c22d44ae674 | SQL | KarachentsevDanil/RobotLeaseService | /RLS.WebApi/Sql/Views/Indexes/RentalShortViewIndex.sql | UTF-8 | 315 | 3.125 | 3 | [] | no_license | CREATE UNIQUE CLUSTERED INDEX [ClusteredIndex] ON [rental].[RentalShortView]
(
[Id] ASC,
[RobotId] ASC,
[ModelId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
| true |
7be219d60a281fd477fc18147e308e200e412292 | SQL | amyelmer92/GWS-SQL | /admisorc.sql | UTF-8 | 3,013 | 3.75 | 4 | [] | no_license | --first, check if tablename exists - if so, drop it
IF OBJECT_ID('dbo.DimAdmisorc') IS NOT NULL
BEGIN
DROP TABLE dbo.DimAdmisorc
END
--then select the IDs from the relevant column, create table, adding description (use case statement, and values from data dictionary)
SELECT DISTINCT
Admisor... | true |
7e81ea5ec928ceb01cf15bf17bafa0116482b8cf | SQL | j19791/PL-SQL | /aula7_cursor_otimizado.sql | WINDOWS-1252 | 475 | 2.578125 | 3 | [] | no_license | DECLARE
v_segmercado_id cliente.segmercado_id%type := 2;
CURSOR cur_cliente is SELECT id FROM cliente;
BEGIN
--nao precisa OPEN
FOR cli_rec IN cur_cliente LOOP --cli_rec um registro exatamente ugual ao resultset
--nao precisa do fetch
--nao precisa de teste p/ saida
... | true |
71b503f8a4cb5675f83bfebc5b3a857df6efd7af | SQL | ilhamzaenudin/LatihanDanPraktek | /Latihan/Backend/database.sql | UTF-8 | 2,693 | 2.953125 | 3 | [] | no_license | --
-- PostgreSQL database dump
--
-- Dumped from database version 13.0
-- Dumped by pg_dump version 13.0
-- Started on 2021-04-22 11:38:04
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SELECT pg_catalo... | true |
fdf419352de509962ad10da785c9f7080c979752 | SQL | biolrycom/biolrycom.github.io | /базы данных/register-bg.sql | UTF-8 | 2,158 | 2.796875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.5
-- https://www.phpmyadmin.net/
--
-- Хост: localhost:3306
-- Время создания: Май 19 2020 г., 16:55
-- Версия сервера: 5.7.24
-- Версия PHP: 7.4.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTE... | true |
3bdcc46019fac8fd292464e775f898574a1ddca1 | SQL | aruci16/rhino | /rhino-web/docs/rhino.sql | UTF-8 | 4,697 | 3.65625 | 4 | [] | no_license | create schema rhino collate utf8mb4_0900_ai_ci;
create table business
(
ID int unsigned auto_increment
primary key,
Name varchar(45) not null,
Address varchar(45) not null,
Latitude varchar(45) not null,
Longitude varchar(45) not null
);
create table business_category
(
ID int unsigned auto_increment,... | true |
0e4d7f496feab1c616f2b36ea97b59a37ea65a6c | SQL | CoZZmOnAvT/Piscine_PhP | /day05/ex16/ex16.sql | UTF-8 | 179 | 2.9375 | 3 | [] | no_license | SELECT
COUNT(*) AS `movies`
FROM
`db_pgritsen`.`member_history`
WHERE
(
`date` >= '2006-10-30' AND `date` <= '2007-07-27'
) OR(
MONTH(`date`) = 12 AND DAY(`date`) = 24
); | true |
9275976ca1a67c5e55e18a11f556ef270177348c | SQL | jalondono/holbertonschool-machine_learning | /pipeline/0x02-databases/11-rating_shows.sql | UTF-8 | 319 | 3.890625 | 4 | [] | no_license | -- script that lists all shows from hbtn_0d_tvshows_rate by their rating.
-- Each record should display: tv_shows.title - rating sum
SELECT tv_shows.title, SUM(tv_show_ratings.rate) AS rating FROM tv_shows
JOIN tv_show_ratings
ON tv_shows.id = tv_show_ratings.show_id
GROUP BY tv_shows.title
ORDER BY rating DESC;
| true |
468d10f39defc740940bfd7247261ada5853f4f4 | SQL | Good725/ideabubble-lamp | /plugins/bookings/model/model-20190503110000.sql | UTF-8 | 577 | 3.234375 | 3 | [] | no_license | /*
ts:2019-05-03 11:00:00
*/
/* Don't show these reports on the dashboard, unless the bookings plugin has been enabled. */
UPDATE
`plugin_reports_reports`
SET
`dashboard` = 0
WHERE
`name` IN ('Attendance by Month', 'Bookings by Month')
AND (SELECT count(*)
FROM `engine_plugins_per_role` `ppr`
JOIN `engine_... | true |
8e8427065f21ee77b4baf38fabfdc1bf62b2242a | SQL | zer0Drool/release-dirks-album | /signatures.sql | UTF-8 | 695 | 3.203125 | 3 | [] | no_license | DROP TABLE IF EXISTS signatures;
DROP TABLE IF EXISTS users;
DROP TABLE IF EXISTS user_profiles;
CREATE TABLE users(
id SERIAL PRIMARY KEY,
first VARCHAR(200) NOT NULL,
last VARCHAR(200) NOT NULL,
email VARCHAR(200) UNIQUE NOT NULL,
password VARCHAR(200) NOT NULL,
created_at TIMESTAMP DEFAULT C... | true |
7dc9f0adf3c29bd7c91e1a56a17ec73c69173e9c | SQL | Matt1208Dev/VillageGreen | /requetes_village_green.sql | UTF-8 | 4,475 | 4.21875 | 4 | [] | no_license | -- 3.1.3 - chiffre d'affaires hors taxes généré pour l'ensemble et par fournisseur --
-- TOTAL CA HT sans critère (fournisseur, produit, période)
SELECT SUM(`ode_tot_exc_tax`) AS `totalCA`
FROM `order_details`
WHERE `ode_ost_id` != 8;
-- TOTAL VENTES CA HT par fournisseur sans critère de temps trié par ordr... | true |
3adc6b81cba43c51b551646f7c989fcee57b16ce | SQL | uk-gov-mirror/dvsa.mot-automated-testsuite | /src/server/resources/queries/authorised-examiner/AE_WITH_AEDM.sql | UTF-8 | 624 | 3.859375 | 4 | [
"MIT"
] | permissive | select afe.ae_ref as ae_ref, o.name as ae_name, aedm_user.username as aedm_username,
concat_ws(' ', aedm_user.first_name,
aedm_user.middle_name, aedm_user.family_name) as aedm_name
from organisation o, auth_for_ae afe, person aedm_user, organisation_business_role_map obrm
where o.name is not null
and afe.organis... | true |
87072c0ecd9b248983f4173333a52e934f8b6c12 | SQL | cursed07/database | /tracking.sql | UTF-8 | 2,334 | 3.4375 | 3 | [] | no_license | drop database tracking;
create database tracking;
use tracking;
create table `users` (
`userid` int AUTO_INCREMENT,
`username` varchar(25),
`phonenumber` varchar(16),
`dateregister` timestamp default CURRENT_TIMESTAMP,
PRIMA... | true |
d56306bc3b414385e3c05c52440736cbb7cdc122 | SQL | molokovskikh/af_priceprocessor | /migrations/81_00_add_column_CodeFirmCr_in_DocumentBodies.sql | UTF-8 | 359 | 3.125 | 3 | [] | no_license | ALTER TABLE documents.DocumentBodies ADD COLUMN ProducerId INT(10) UNSIGNED NULL;
ALTER TABLE documents.DocumentBodies ADD INDEX IDX_DocumentBodies_ProducerId (ProducerId);
ALTER TABLE documents.DocumentBodies ADD CONSTRAINT FK_DocumentBodies_ProducerId
FOREIGN KEY (ProducerId) REFERENCES catalogs.Producers (Id)... | true |
1c25563ae64e340d7d20b9d9807282fc112f700a | SQL | gowthemag/test_code | /users.sql | UTF-8 | 1,847 | 3.25 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jul 26, 2020 at 06:50 PM
-- Server version: 10.4.6-MariaDB
-- PHP Version: 7.1.31
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @O... | true |
c6bd2423ce8ecd1782a87d48fa8cb8685fe40ace | SQL | bigdong32/user-cas | /sql/base_user.sql | UTF-8 | 4,307 | 3.59375 | 4 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : 127.0.0.1
Source Server Version : 50540
Source Host : 127.0.0.1:3306
Source Database : base_user
Target Server Type : MYSQL
Target Server Version : 50540
File Encoding : 65001
Date: 2017-09-07 09:15:29
*/
SET FOREIGN_KEY_CHECKS=0;
--... | true |
896dc1eddae6afa4edf17c6317d203b0db25df30 | SQL | Shuvouits/PHP-Search | /users.sql | UTF-8 | 1,831 | 3.234375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jul 19, 2020 at 03:44 PM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.4.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... | true |
9abcb1e6a1e5c301436400a416b5c9b55a2c78ae | SQL | radtek/Telecommunication | /BusinessComm/DataBase/View/V_INV_OBJ.sql | WINDOWS-1251 | 325 | 2.578125 | 3 | [] | no_license | CREATE OR REPLACE VIEW V_INV_OBJ AS
SELECT
--#Version=1
--
--v.1 01.09.2015
*
FROM
dba_objects tab1
WHERE
tab1.STATUS <> 'VALID'
AND tab1.OWNER IN ('BUSINESS_COMM')
AND tab1.OBJECT_TYPE <> 'MATERIALIZED VIEW'
| true |
054652730ebeca7f19439a0d08ea65ed2fb60bcc | SQL | basisteam-io/BasisTeam-Content | /blog/WINDOWS/MSWINDOWS2016SERVER_WITH_MSSQLSERVER2017/sql2017_postinstallationsteps.sql | UTF-8 | 549 | 3.25 | 3 | [] | no_license | -- ***** POST INSTALLATION STEPS FOR MICROSOFT SQL SERVER 2017 *****
-- EnableAutoGrowAllFiles
DBCC TRACEON (1117, -1)
-- EnableAutoUpdateStatistics
DBCC TRACEON (2371, -1)
-- EnableFullExtentsOnly
DBCC TRACEON (1118, -1)
-- If Number of cores not equivalent Number of files
-- Check. MS SQL Studio -> connect to DB -> t... | true |
7292c2baa05d9c7e531cb7d424c9eafb9b2c8288 | SQL | stolick/WP-Project | /src/main/resources/test.sql | UTF-8 | 689 | 3.5625 | 4 | [] | no_license | select
AIRPORTS.NAME as AIRPORTNAME,
AIRLINES.NAME as AIRLINENAME,
SOURCEAIRPORTID, DESTAIRPORTID,
AIRLINES.AIRLINEID as AIRLINEID,
ACTIVE,
STOPS
from AIRPORTS, ROUTES, AIRLINES
where AIRPORTID = DESTAIRPORTID
and DESTAIRPORTID = '666'
and AIRLINES.ACTIVE = 'Y'
ORDER BY STOPS ASC;
-----------------------------------
... | true |
8a58b3ab04177d019db23eb23c0e28420e2628f4 | SQL | rrebase/vorgurakendused | /public_html/prax4/devtable.sql | UTF-8 | 2,707 | 3.75 | 4 | [] | no_license | mysql --user=st2014 --password=progress -A st2014
CREATE TABLE t164036v1_news_score(
id INTEGER AUTO_INCREMENT,
username VARCHAR(50),
news_id INTEGER ,
score INTEGER DEFAULT 1,
PRIMARY KEY (id),
UNIQUE (username, news_id));
INSERT INTO t164036v1_news_score (username, news_id, score) VALUES ('rareba', 44, 5);
SELECT *... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.