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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
ed613605384928c3cd1ab6356a224ad55e0904f2 | SQL | henocdz/EasyFood | /basedatos.sql | UTF-8 | 7,209 | 3.265625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 3.5.2.2
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: May 05, 2013 at 08:45 AM
-- Server version: 5.5.27
-- PHP Version: 5.4.7
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/... | true |
7f313d623e49019c241a4ba42fd89f4ab941e6f9 | SQL | depaul-csc394-pandas/pandas-sports | /migrations/2019-10-10-200000_create_players/up.sql | UTF-8 | 313 | 2.796875 | 3 | [] | no_license | -- Your SQL goes here
CREATE TABLE players (
id SERIAL PRIMARY KEY,
name_family VARCHAR(32) NOT NULL,
name_given VARCHAR(32) NOT NULL,
date_of_birth DATE NOT NULL,
height_cm REAL NOT NULL,
weight_kg REAL NOT NULL);
| true |
3e7b9f44ec6e7b62b5b716c9def4d83422c50193 | SQL | edwincervantes/CShomework | /CSCI330/Homework/Saklia2.sql | UTF-8 | 161 | 2.734375 | 3 | [] | no_license | SELECT title
FROM film AS f
WHERE original_language_id = 6;
#Note language ID for German is 6
#SELECT language_id
#FROM language AS l
#WHERE name = "German"
| true |
449fb4a61c6af4c40601f5ad1f71f19dab9d1d0a | SQL | frederickding/display-ui | /server/application/configs/sql/upgrade.mysql.041-050.sql | UTF-8 | 1,362 | 3.421875 | 3 | [] | no_license | -- upgrade script to bring pre-0.4.1 to 0.5.0 database structure
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';
-- add alternating flags to headlines & media
ALTER TABLE `dui_... | true |
ba2a965b614c813bad1ba7020f3f52f6e6b325af | SQL | hzlisongyang/front-end | /asp/dxq.sql | UTF-8 | 4,357 | 3.1875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 3.5.2
-- http://www.phpmyadmin.net
--
-- 主机: localhost
-- 生成日期: 2012 年 08 月 15 日 09:48
-- 服务器版本: 5.00.15
-- PHP 版本: 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 */;
/*!40101 SET @OLD_CHARACTER_SET... | true |
9b614224a61d7fedc0d0174c90dda4e05a4771ee | SQL | AndrewHrabovskyi/Data-base2 | /lab2/lab2.sql | UTF-8 | 10,390 | 2.75 | 3 | [] | no_license | create table "clients" (
id INT,
full_name VARCHAR(50),
email VARCHAR(50),
phone VARCHAR(50)
);
insert into clients (id, full_name, email, phone) values (1, 'Glad Arons', 'garons0@msu.edu', '244-974-0435');
insert into clients (id, full_name, email, phone) values (2, 'Arnoldo Braund', 'abraund1@bluehost.com', '261-... | true |
27610280d9ea4abb790b4ce21c991dc20a534bc4 | SQL | mehdimu/d43a3 | /postgresql-7.4.13/src/backend/catalog/information_schema.sql | UTF-8 | 65,826 | 3.984375 | 4 | [
"MIT",
"PostgreSQL"
] | permissive | /*
* SQL Information Schema
* as defined in ISO 9075-2:1999 chapter 20
*
* Copyright 2003, PostgreSQL Global Development Group
*
* $Id: information_schema.sql,v 1.15.2.5 2003/12/17 22:11:42 tgl Exp $
*/
/*
* Note: Generally, the definitions in this file should be ordered
* according to the clause numbers in t... | true |
8189ee646f665f143e3480aeb9d8785e458f94a5 | SQL | ahmedabood395/SQl | /instructor_data_stored.sql | UTF-8 | 613 | 3.46875 | 3 | [] | no_license | create proc instructor_data (@ins_id int)
as
begin
select c.crs_name , count(Distinct sc.st_id) 'No_Of_Students'
from ins_course ic, Course c, stud_course sc
where ic.ins_id=@ins_id and ic.crs_id=c.crs_id and c.crs_id=sc.crs_id
group by c.crs_name
end
----------------
exec instructor_data 10
alter proc instructor_dat... | true |
71a4deb0a969a8d544e5deffe0c148ded12cbd11 | SQL | julialamenza/Log-analyse | /views.sql | UTF-8 | 1,111 | 4.125 | 4 | [] | no_license | create view artigos_mais_populares as
select articles.title, count(log.path) as views
from log, articles
where log.status = '200 OK' and log.path like concat('%', articles.slug)
group by log.path, articles.title
order by views desc limit 3;
create view autores_mais_populares as
select authors.name, count(articles.aut... | true |
d0534f09d49ad47dbb5628fff92cf04b9bb9f37d | SQL | daofuzhang/WantPy | /CODE/WantData/01-MariaDB/05-AP1/APWANT/02-SPDY.sql | WINDOWS-1252 | 2,189 | 3.046875 | 3 | [] | no_license | /* ---------------------------------------------------- */
/* Generated by Enterprise Architect Version 12.0 */
/* Created On : 19-E-2017 U 06:30:37 */
/* DBMS : MySql */
/* ---------------------------------------------------- */
SET FOREIGN_KEY_CHECKS=0 ;
/* Create Tables */
CREATE TABLE `SPDY_... | true |
20af3ef41bde51620d8ca6ed8e1bd265a2f86051 | SQL | radtek/Telecommunication | /K7/DataBase/SCRIPTS_FROM_DB/CORP_MOBILE/PROCEDURE/RECALC_BANS_AND_PHONE_STATUS.SQL | UTF-8 | 677 | 2.71875 | 3 | [] | no_license |
CREATE OR REPLACE PROCEDURE "CORP_MOBILE"."RECALC_BANS_AND_PHONE_STATUS" IS
--
--VERSION=2
--
--v.2 Афросин 17.05.2015 Откорректировал процедуру согласно измененным пакетам
--Загружаем ПОДБАНЫ дял коллекуторских счетов
ERR VARCHAR2(1000);
BEGIN
FOR rec IN (SELECT ACCOUNT_ID
FROM ACCOUNTS
... | true |
87624e2140623edb9591a23775b4c483a40dddd8 | SQL | rpaulic/EIS | /backup/MySQL/Dumps/Dump20120121/eis_audit_audit_medical_condition.sql | UTF-8 | 2,894 | 3.328125 | 3 | [] | no_license | CREATE DATABASE IF NOT EXISTS `eis_audit` /*!40100 DEFAULT CHARACTER SET utf8 */;
USE `eis_audit`;
-- MySQL dump 10.13 Distrib 5.5.16, for Win32 (x86)
--
-- Host: localhost Database: eis_audit
-- ------------------------------------------------------
-- Server version 5.5.16
/*!40101 SET @OLD_CHARACTER_SET_CLIENT... | true |
bd6737d76e6a14292ff8832610880f571218db76 | SQL | boomini/bbasya-study | /0907/minzzan/ws3-3.sql | UTF-8 | 6,367 | 4.71875 | 5 | [] | no_license | use world;
select *
from city;
select *
from country
order by name;
select *
from countrylanguage;
-- 1. 도시명 kabul이 속한 국가의 이름은?
select city.CountryCode, country.name
from city, country
where city.countrycode = country.code
and city.Name = 'kabul';
-- 2. 국가의 공식 언어 사용율이 100%인 국가의 정보를 출력하시오. 국가 이름으로 오름차순 정렬한다.(8건)
se... | true |
7102693f8a16417e586239a17b98fb15efedda42 | SQL | JPranav23/MySQL-Workbench- | /Board_Infinity_Assessment2.sql | UTF-8 | 6,263 | 4.34375 | 4 | [] | no_license | # Problem 2:
# Task 1:
CREATE DATABASE Superstores;
USE Superstores;
# Question 1 and 2:
# Describe the data in hand in your own words.
# List the Primary Keys and Foreign Keys
# The database/schema 'Superstore' consists of 5 tables namely:
# (1) cust_dimen (2) market_fact (3) orders_dimen (4) prod_dimen (5) ship... | true |
639f1f982f339859a6903c5f398882b0030c2f6c | SQL | Aryan-Poonacha/nchealthmap | /facilities.sql | UTF-8 | 19,018 | 3.4375 | 3 | [] | no_license | CREATE TABLE facility_type(
short VARCHAR(10) PRIMARY KEY NOT NULL,
name VARCHAR(50) NOT NULL UNIQUE
);
INSERT INTO facility_type VALUES('HL', 'hospital');
INSERT INTO facility_type VALUES('HC', 'health center');
INSERT INTO facility_type VALUES('OP', 'outpatient office');
INSERT INTO facility_type VALUES('PSY', 'psyc... | true |
e37b0b8cc84a37dddf7ba069dabb68b54b9aa1f6 | SQL | bodoque-it/hidroponicaApi | /init_db/script_mysql_hidroponica_test.sql | UTF-8 | 3,448 | 3.4375 | 3 | [] | no_license | DROP DATABASE IF EXISTS hidroponica;
create database hidroponica;
use hidroponica;
create table users ( id_user int NOT NULL AUTO_INCREMENT,
username varchar(255) NOT NULL,
first_name varchar(255),
last_name varchar(255),
pass_word varchar(255),
email varchar(255),
PRIMARY KEY (id_user) );
create table rails( id_rail... | true |
c3430a0ddf42ee98e953059c15b188bc8e910655 | SQL | sundropgold/burger | /db/schema.sql | UTF-8 | 235 | 2.5625 | 3 | [] | no_license | CREATE DATABASE burgers_db;
USE burgers_db;
CREATE TABLE burgers (
id INTEGER(11) AUTO_INCREMENT NOT NULL PRIMARY KEY,
burger_name VARCHAR(200) NOT NULL,
devoured BOOLEAN DEFAULT false NOT NULL,
date TIMESTAMP NOT NULL
); | true |
04b638cb8d4da64bb2bc98f4158fd0bffbfa7e2c | SQL | Zemfeka/raf-electron | /sql-scripts/new tables.sql | UTF-8 | 1,507 | 3.453125 | 3 | [
"Apache-2.0"
] | permissive | USE test;
CREATE TABLE `bookings` (
`Id` int(11) NOT NULL AUTO_INCREMENT,
`ClientName` varchar(45) DEFAULT NULL,
`ClaimentFirstName` varchar(45) DEFAULT NULL,
`ClaimentLastName` varchar(45) DEFAULT NULL,
`BookingDate` date DEFAULT NULL,
`Time` time DEFAULT NULL,
`TrialDate` datetime DEFAULT NULL,
`Requ... | true |
a828c3b2bfe77412c1debd5d85fd5de48c4510db | SQL | j-m/AnvomYWz1K | /src/database/sql/create/comments.sql | UTF-8 | 439 | 3.09375 | 3 | [] | no_license | CREATE TABLE IF NOT EXISTS comments (
review_game TEXT NOT NULL,
review_author TEXT NOT NULL,
review_type TEXT NOT NULL,
author TEXT NOT NULL,
body TEXT NOT NULL,
posted DATETIME DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY(review_game) REFERENCES reviews(game)
FOREIGN KEY(review_author) REFERENCES rev... | true |
9b03df78d5b8f13c14649f669634b9cb5d9d739f | SQL | snainwal/healthcare_data_SQL | /healthcare_queries.sql | UTF-8 | 3,650 | 4.65625 | 5 | [
"MIT"
] | permissive |
/*
List all providers who are nurses showing the provider's name.
Tables needed: providers
Your result set should have two rows.
*/
select p.provider_nm
from edw_emr_ods.providers p
where p.title = 'RN'
/*
List all departments in the system sorted alphabetically by the department's name.
Table nee... | true |
59e28781376af870b7fc202f3ac282d635502c15 | SQL | brownabs/chinook-brownabs | /abbeysql/top_3_artists.sql | UTF-8 | 371 | 3.9375 | 4 | [] | no_license | -- Provide a query that shows the top 3 best selling artists.
SELECT TOP 3 a.Name ArtistName, COUNT(il.Quantity) SalesPerArtist
FROM InvoiceLine il
JOIN Invoice i ON il.InvoiceId = i.InvoiceId
JOIN Track t ON il.TrackId = t.TrackId
JOIN Album al ON al.AlbumId = t.AlbumId
JOIN Artist a ON a.ArtistId = al.ArtistI... | true |
b935d9584f126153e97c64237fe7b9cbe2a00aaa | SQL | RoyArka/Image_Board_App | /DB.sql | UTF-8 | 4,479 | 3.078125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.5
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Apr 10, 2021 at 11:38 PM
-- Server version: 5.7.33
-- PHP Version: 7.3.27
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CH... | true |
fa8e38f81c2bf98290e6c92f6095ca0809e2ad6a | SQL | wjddyd66/DB | /Procedure/Procedure.sql | UTF-8 | 3,461 | 3.859375 | 4 | [] | no_license | -- 프로시저 (stored procedure): SQL을 프로그래밍 하는 것
create table aaa (bun number, munja varchar2(20), su number); -- 결과 확인용 테이블
-- 변수 선언
set serveroutput on;
declare
no number:=0;
begin
no:=100+200;
insert into aaa(bun) values(no);
dbms_output.put_line(no);
end;
/
select * from aaa;
-- 배열 처리
declare
type resul... | true |
b62b0ca71c2961ee6f8fc17ca7237b780dfa4a0e | SQL | duong1007/C1020G1-LeQuangDuong | /module_3/case_study_database/yeu_cau_18.sql | UTF-8 | 634 | 3.3125 | 3 | [] | no_license |
use furama;
create temporary table temp as
select hop_dong.ID_Khach_Hang, hop_dong.ID_Hop_Dong
from hop_dong
where (hop_dong.Ngay_Lam_Dich_Vu between "2016-01-01" and "2016-12-31")
and hop_dong.ID_Khach_Hang not in (select hop_dong.ID_Khach_Hang
from hop_dong
where hop_dong.Ngay_Lam_Dich_Vu between "2017-01-01" and... | true |
aee19a7d3bcc63a03055788a43158d3c59c890cd | SQL | olddeer/version1 | /version1/src/main/resources/db/migration/V5_0__create_class.sql | UTF-8 | 1,450 | 2.96875 | 3 | [] | no_license | SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SELECT pg_catalog.set_config('search_path', '', false);
SET check_function_bodies = false;
SET client_min_messages = warning;
SET row_security = off;
SET def... | true |
f2d9e7c44200d277a34b16b3e65ac0a9b844fba9 | SQL | InnovateUKGitHub/innovation-funding-service | /ifs-data-layer/ifs-data-service/src/main/resources/db/migration/V195_2__Multiple_assessment_periods.sql | UTF-8 | 814 | 3.265625 | 3 | [
"MIT"
] | permissive | -- IFS-8846, multiple assessment periods changes
CREATE TABLE `assessment_period` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`rank` int(4) NOT NULL,
`competition_id` bigint(20) NOT NULL,
PRIMARY KEY (`id`),
CONSTRAINT fk_assessment_period_competition_id FOREIGN KEY (`competition_id`) REFERENCES `competition`... | true |
971f5abfb5e571ff16f53edbcaf63146f0897ffa | SQL | laureduchemin/AppliWeb | /appliWeb.sql | UTF-8 | 9,281 | 3.21875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.4.13.1deb1
-- http://www.phpmyadmin.net
--
-- Client : localhost
-- Généré le : Dim 03 Avril 2016 à 18:52
-- Version du serveur : 5.6.28-0ubuntu0.15.10.1
-- Version de PHP : 5.6.11-1ubuntu3.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_C... | true |
cccd4688050641959b284fb0179460639b7c3823 | SQL | subhadipdutta21/PERN_Stack | /pern-todo-backend/database.sql | UTF-8 | 1,085 | 3.640625 | 4 | [] | no_license | CREATE DATABASE todo;
CREATE TABLE todo
(
todo_id SERIAL PRIMARY KEY,
description VARCHAR(255)
);
CREATE TABLE restaurants
(
id uuid DEFAULT uuid_generate_v4() NOT NULL PRIMARY KEY,
name VARCHAR(50) NOT NULL,
location VARCHAR(50) NOT NULL,
price_range INT NOT NULL CHECK(price_range > 1 and pri... | true |
0c72bad7272f06dcc30e81ba660b8fbcf072efc5 | SQL | EquipoDDSI/DDSIProyecto | /backend/src/trigger/horariotutorias.sql | UTF-8 | 223 | 2.921875 | 3 | [] | no_license | DELIMITER $$
CREATE TRIGGER creartutoria
BEFORE INSERT ON horariotutorias
FOR EACH ROW
BEGIN
IF NEW.hora_fin = "00:00:00"
THEN
SET NEW.hora_fin = ADDTIME(NEW.hora_ini, "02:00:00");
END IF ;
END$$
DELIMITER ;
| true |
545842ef617eeb1c31b5ba1ed36182fc0b8053f2 | SQL | verykiner/mvc-vue-element | /database/mvc1.sql | UTF-8 | 4,828 | 2.71875 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : local
Source Server Version : 50726
Source Host : localhost:3306
Source Database : mvc1
Target Server Type : MYSQL
Target Server Version : 50726
File Encoding : 65001
Date: 2020-11-03 20:45:58
*/
SET FOREIGN_KEY_CHECKS=0;
-- --------... | true |
2d95a5785adfee4af40c01f38f5516fb97e66398 | SQL | Amstressedout/servlet_homework_hillel | /src/main/resources/sql/Database.sql | UTF-8 | 1,654 | 3.921875 | 4 | [] | no_license | CREATE TABLE IF NOT EXISTS clients (
id SERIAL CONSTRAINT clients_pk PRIMARY KEY,
name VARCHAR(20),
email VARCHAR(255) UNIQUE NOT NULL,
phone BIGINT UNIQUE NOT NUL... | true |
98f49747b6deeaf5f947f903589a2732a0562b81 | SQL | ddllttmmddwwnn/Algorithm_Java | /src/etc/Programmers_2020_devmatching_4.sql | UTF-8 | 136 | 3.265625 | 3 | [] | no_license | SELECT distinct c.user_id
from carts c right join cart_products p
on c.id = p.cart_id
where p.name = "밀가루"
order by c.user_id asc; | true |
2e20fa4f47df83a855e867af00911ff10e94e8b1 | SQL | MarcosRigal/Bdd | /P3/P3.1/E4/E4.sql | UTF-8 | 325 | 2.59375 | 3 | [] | no_license | SELECT
dni
FROM
votantes
WHERE
fechanacimiento = (
SELECT
MIN(fechanacimiento)
FROM
votantes
WHERE
fechanacimiento > (
SELECT
MIN(fechanacimiento)
FROM
votantes
)
... | true |
319f176b45ae1a16e25f3e48b2d1c7f43d30afb3 | SQL | kssenii/ClickHouse | /dbms/tests/queries/0_stateless/01015_database_bad_tables.sql | UTF-8 | 1,170 | 2.75 | 3 | [
"Apache-2.0"
] | permissive | DROP DATABASE IF EXISTS testlazy;
CREATE TABLE `таблица_со_странным_названием` (a UInt64, b UInt64) ENGINE = Log;
INSERT INTO `таблица_со_странным_названием` VALUES (1, 1);
SELECT * FROM `таблица_со_странным_названием`;
DROP TABLE `таблица_со_странным_названием`;
CREATE DATABASE testlazy ENGINE = Lazy(1);
CREATE TABL... | true |
9b30c6533e7c1d4eaa6ee0d7b26357177791fd46 | SQL | xLiad/Project-2---Hospital-Database-Analysis | /Hospital Analysis.sql | UTF-8 | 5,447 | 4.46875 | 4 | [] | no_license | -- Project Hospital Analysis
USE Hospital;
-- 1) Obtain the names of all physicians that have performed a medical
-- procedure the have never been certified to perform.
SELECT P.EmployeeID AS "Employee ID",
P.Name AS "Physician Name",
U.or_procedure AS "Procedure ID",
OP.Name AS "Pro... | true |
131486678de1388bfdc9e85390b9d265b543521c | SQL | jithinvijayan007/erp_orig | /POS_V0.1.sql | UTF-8 | 21,611 | 3.078125 | 3 | [] | no_license | CREATE TABLE tax_master(
pk_bint_id BIGSERIAL PRIMARY KEY,
vchr_name VARCHAR(100),
bln_active BOOLEAN
);
CREATE TABLE brands(
pk_bint_id BIGSERIAL PRIMARY KEY,
vchr_code VARCHAR(50),
vchr_name VARCHAR(150),
int_status INTEGER DEFAULT 1
);
CREATE TABLE company(
pk_bint_id BIGSERIAL PRIMARY KEY,
v... | true |
bf95dd992e2b6d728437d5a8dd5278414ab6640c | SQL | aliaksei-yasko/Ppvis_5sem_2lab | /tables.sql | WINDOWS-1251 | 8,768 | 3.125 | 3 | [] | no_license | CREATE TABLE RECIPE(
id_recipe INTEGER PRIMARY KEY GENERATED ALWAYS AS IDENTITY (START WITH 1, INCREMENT BY 1),
recipe VARCHAR(100),
text VARCHAR(10000)
);
insert into RECIPE(recipe, text)
values(' ', ' . 4 .
2 - . , .
. - .
. - 1/4~1/3 .
. . .
... | true |
9b2ec4dfdc69cedfc86a946bbf6603ad4bf219bf | SQL | vishalkuvar/CMSys | /sql/base.sql | UTF-8 | 1,493 | 3.171875 | 3 | [] | no_license | --
-- Table structure for table `sql_version`
--
CREATE TABLE IF NOT EXISTS `sql_version` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` VARCHAR(255) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `name` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=latin1;
INSERT INTO `sql_version` VALUES (1, 'base.sql'... | true |
a59ae23d383323459ce7f1fbfe91d802c805eafb | SQL | KodiCMS-Kohana/plugin-rating | /install/schema.sql | UTF-8 | 1,109 | 2.84375 | 3 | [] | no_license | CREATE TABLE `__TABLE_PREFIX__dsrating` (
`id` int(11) unsigned NOT NULL auto_increment,
`ds_id` int(11) unsigned NOT NULL default '0',
`doc_id` int(11) unsigned NOT NULL default '0',
`raters` int(6) unsigned NOT NULL default '0',
`rating` int(3) unsigned NOT NULL default '0',
`created_on` datetime NOT NULL... | true |
cba5f4666f51589198e835319a19a625472a3ce6 | SQL | liviuics/conference-site | /db_conferinta.sql | UTF-8 | 3,311 | 3.203125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 21, 2019 at 09:13 PM
-- Server version: 10.1.39-MariaDB
-- PHP Version: 7.3.5
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
81376f297ccc2d58be7dd654e30f1b2181083e7a | SQL | kikeAKAdelta/MvcCrudPhpMysql | /datospersonales.sql | UTF-8 | 1,544 | 2.84375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.1
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 08-03-2020 a las 17:40:44
-- Versión del servidor: 10.4.8-MariaDB
-- Versión de PHP: 7.3.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
... | true |
ff183a56874c1e4f937c2cd897c15933f98c9864 | SQL | suci061199/pembantunew | /db/update/update-284.sql | UTF-8 | 2,844 | 2.8125 | 3 | [] | no_license | -- Comment
-- Previous Version = 2.8.3
-- Working Version = 2.8.4
-- --------------------------------------------------------
-- --------------------------------------------------------
--
-- Module Name: Settings
--
-- --------------------------------------------------------
--
-- Table structure fo... | true |
b86f56fa3bff538e7e2fb0a0ee7d47338ff5278c | SQL | TSSKDevAcademy1/JGREGA_GStudio | /MySQLDatabase/test.sql | UTF-8 | 11,308 | 2.8125 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 5.6.23, for Win64 (x86_64)
--
-- Host: localhost Database: test
-- ------------------------------------------------------
-- Server version 5.6.25-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*... | true |
8505e5e098d70b535c5a37bb04fe8b31b5ebf107 | SQL | aridasz/AnalyticsBigData | /src/main/resources/DataModel.cql | UTF-8 | 1,583 | 3.15625 | 3 | [] | no_license | CREATE KEYSPACE AnalyticsPoC
WITH REPLICATION = {
'class' : 'SimpleStrategy',
'replication_factor' : 3
};
use analyticspoc;
CREATE TABLE security_factors_long (
security_id text,
factor_name text,
business_date date,
factor_value double,
PRIMARY KEY ((security_id, factor_name), busi... | true |
898a2571d60a157f8eae2345c172fb8187a17089 | SQL | CityofToronto/anchorTO_DB | /Restore-backup-steps.sql | UTF-8 | 3,412 | 3.625 | 4 | [] | no_license | -- Run Under Admin user
-- 1. Stop user connections:
alter user network connection limit 0;
alter user anchorto_run connection limit 0;
-- 2. Get stats before restoring
select replace('select ''[TBL]'' as tblname, count(*) from network.' || table_name || ' union all ', '[TBL]', table_name) from information_schema.tabl... | true |
f838f693ea1b9df90d91ccbce9f511061e76d6e1 | SQL | YunTang1997/my_projects | /Mysql/Process control structure.sql | UTF-8 | 5,639 | 4.4375 | 4 | [] | no_license | -- 流程控制结构
/*
顺序结构:程序从上往下依次执行
分支结构:程序从两条或多条路径中选择一条去执行
循环结构:程序在满足一定条件的基础上,重复执行一段代码
*/
-- 一、分支结构
-- 1、if结构
/*
功能:
实现简单的双支结构
语法:
IF (表达式1, 表达式2, 表达式3)
执行顺序:
如果表达式1成立,则IF函数返回表达式2的值,否则返回表达式3的值
应用场景:
任何地方
*/
/*
功能:
实现多重分支
语法:
IF 条件1 THEN 语句1;
ELSEIF 条件2 THEN 语句2;
...
[ELSE 语句n;]
END IF;
应用场景:
begin end中
*/
-- ... | true |
0bf979fec426906c7e444bef6479e98d8baf08d3 | SQL | AbigalChulchill/discoverify | /SQL/create_tables.sql | UTF-8 | 1,689 | 2.53125 | 3 | [] | no_license | CREATE TABLE IF NOT EXISTS metadata (
track_id VARCHAR(22) PRIMARY KEY,
track_name TEXT NOT NULL,
artist TEXT NOT NULL,
artist_id VARCHAR(22) NOT NULL,
genre_1 TEXT NOT NULL,
genre_2 TEXT,
genre_3 TEXT
);
CREATE TABLE IF NOT EXISTS spotify_features (
... | true |
e771e8bc29d3277eeaa92e7f551436e2a7eb2ebc | SQL | aiwo3336/1504C | /loanInfo.sql | UTF-8 | 961 | 2.90625 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : nb
Source Server Version : 50547
Source Host : localhost:3306
Source Database : test
Target Server Type : MYSQL
Target Server Version : 50547
File Encoding : 65001
Date: 2017-05-25 14:01:23
*/
SET FOREIGN_KEY_CHECKS=0;
... | true |
0de957fdae13993c138889895d17d34c7eb63a94 | SQL | QuentinVecchio/DUT-ProjetSynthese | /web/bourse_livre.sql | UTF-8 | 1,158,088 | 3.171875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.0.6
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Jan 22, 2014 at 03:57 PM
-- Server version: 5.5.33
-- PHP Version: 5.5.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/... | true |
034e7c69c6d0a630d413cede0e55960fdf462df0 | SQL | taguz91/PF-Instituto-M3A-F1 | /BaseDatos/Modificacion/AvanceSilaboSolucion.sql | UTF-8 | 1,807 | 3.3125 | 3 | [] | no_license | SELECT * FROM public."Unidad_Seguimiento"
WHERE id_unidad IN (
SELECT id_unidad FROM public."UnidadSilabo"
);
SELECT * FROM public."Unidad_Seguimiento"
WHERE id_seguimientosilabo IN (
SELECT id_seguimientosilabo FROM public."UnidadSilabo"
);
SELECT * FROM public."SeguimientoSilabo"
WHERE id_curso IN (
SELECT i... | true |
7f3bb49620340f54116e0139ddb9d90d8f1c4e3f | SQL | Osipyan/SkillBox | /src/main/resources/db/migration/V1__create_tables.sql | UTF-8 | 1,985 | 3.3125 | 3 | [] | no_license | drop table if exists captcha_codes;
create table captcha_codes (
id integer not null auto_increment,
code TINYTEXT not null,
secret_code TINYTEXT not null,
time datetime(6) not null, primary key (id)
);
drop table if exists global_settings;
create table global_settings (
id integer not null auto_in... | true |
5a3579772167cafa467a0c3b95adb22ee2dc4648 | SQL | memanuel/kepler-sieve | /sql/02-check-asteroid-ref-elements.sql | UTF-8 | 1,292 | 4.1875 | 4 | [] | no_license | -- Count number of asteroids that have references pushed forward
SELECT
COUNT(elt_ks.AsteroidID) AS ast_count
FROM
JPL.AsteroidElement AS elt_jpl
INNER JOIN KS.Asteroid AS ast ON ast.AsteroidNumber = elt_jpl.asteroidNumber
INNER JOIN KS.DailyTime AS dt ON dt.mjd = 59000
INNER JOIN KS.AsteroidElement_Ref AS... | true |
8e66c425a542d8bb75fea4d32157c36198a8dee3 | SQL | alberto-dellera/xplan | /xplan_defines.sql | UTF-8 | 20,533 | 2.9375 | 3 | [] | no_license | --------------------------------------------------------------------------------
-- Author: Alberto Dell'Era
-- Copyright: (c) 2008-2021 Alberto Dell'Era http://www.adellera.it
--------------------------------------------------------------------------------
variable ERROR_BEFORE_MAIN_BLOCK varchar2(50 char)
va... | true |
c656cd8844713a438dbc196e7cf8d23582a52956 | SQL | kongwf5813/store | /src/test/resources/schema.sql | UTF-8 | 3,619 | 3.453125 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : mysql
Source Server Version : 50555
Source Host : localhost:3306
Source Database : store
Target Server Type : MYSQL
Target Server Version : 50555
File Encoding : 65001
Date: 2017-12-26 15:35:55
*/
SET FOREIGN_KEY_CHECKS=0;
CREATE DATA... | true |
74e480c43e79bc7820b35277782c4902dd7e5dfd | SQL | xshima2/salesnavi | /SalesNavi-Scala/db/ddl/master.ddl | SHIFT_JIS | 1,097 | 3.484375 | 3 | [] | no_license | DROP TABLE IF EXISTS USER_MST;
DROP TABLE IF EXISTS COMPANY_MST;
/**********************************/
/* e[u: Ѓ}X^ */
/**********************************/
CREATE TABLE COMPANY_MST(
CO_ID SERIAL DEFAULT 0,
NAME VARCHAR(20) NOT NULL,
SHORT_NAME VARCHAR(10) NOT NULL,
ADDRESS1 VARCHAR(30) NOT NULL,
AD... | true |
43c247c3a52e0f328ce42d015322a651c8eef742 | SQL | wxb263stu/ngs-bits | /src/cppNGSD/resources/NGSD_schema.sql | UTF-8 | 33,312 | 3.71875 | 4 | [
"MIT"
] | permissive | 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';
-- ----------------------------------------------------------------------------------------------------------
-- ... | true |
f2c20599cd250bfa3ae654ead2112b727aff7ed8 | SQL | zimirrr/postgres-showcase | /75_parallel_query_execution.sql | UTF-8 | 1,110 | 3.234375 | 3 | [
"BSD-3-Clause"
] | permissive | \c pg_features_demo
SET ROLE TO demorole;
/*
As of v9.6 Postgres has constantly been building up the parallel query execution - meaning if you have a powerful
multi-core server and are running queries over huge multi-gigabyte datasets then the server can be configured so that
the query is transparently parallelized w... | true |
436f18c884b0be805a6e20115a89cb4ec8e25a4b | SQL | varnbu/DDBookStore | /数据库脚本/ddbook.sql | UTF-8 | 15,479 | 3.25 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : my
Source Server Version : 50711
Source Host : localhost:3306
Source Database : ddbook
Target Server Type : MYSQL
Target Server Version : 50711
File Encoding : 65001
Date: 2016-07-02 20:10:43
*/
SET FOREIGN_KEY_CHECKS=0;
-- ---------... | true |
39f007d0d610207614c2a2b8bd529a255cfaba4f | SQL | joshaug/dating | /dating17_04.sql | UTF-8 | 68,818 | 2.796875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.5.2
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Apr 17, 2016 at 01:30 PM
-- Server version: 5.7.9
-- PHP Version: 5.6.16
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/... | true |
5ae88c2cdc68e81ed8c6f8525e8ed50fd565d0f9 | SQL | FenwickNic/pwyp-australia | /database/create_tabes.sql | UTF-8 | 379 | 2.6875 | 3 | [] | no_license | CREATE DATABASE IF NOT EXISTS db1_pwypaustralia;
DROP TABLE IF EXISTS db1_pwypaustralia.letters;
CREATE TABLE db1_pwypaustralia.letters
(
id int unsigned not null auto_increment,
firstname varchar(70) not null,
lastname varchar(70) not null,
postcode varchar(10) not null,
email varchar(200) not null,
message tex... | true |
2b377246e13df378e37a1a58ee65568a9c80a558 | SQL | rorua/gocbs | /config/mysql.sql | UTF-8 | 6,659 | 3.890625 | 4 | [
"MIT"
] | permissive | /* *****************************************************************************
// Setup the preferences
// ****************************************************************************/
SET NAMES utf8 COLLATE 'utf8_unicode_ci';
SET foreign_key_checks = 1;
SET time_zone = '+00:00';
SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO... | true |
a6de1f1d0bbec447b62316213a9d71b3451dce22 | SQL | udeepharsha/zend-test-module-with-login-system-with-table-gateway-design-patern | /data/zendme.sql | UTF-8 | 3,343 | 2.859375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.5.2
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Oct 05, 2016 at 11:24 PM
-- Server version: 5.7.9
-- PHP Version: 5.6.16
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/... | true |
06177018ba4fd1c24f06edcbd32f927aee752e61 | SQL | Akinolae/movie-db | /insert_movie.sql | UTF-8 | 2,354 | 3.078125 | 3 | [] | no_license | use movie_database;
insert into movie values (120, 'Avengers', 2019-06-12, 11-10, 'USA', '2019-12-10', 'USA');
insert into movie values (131, 'X-men', 2017-02-08, 11-10, 'USA', '2016-12-10', 'USA');
insert into movie values (112, 'Lion heart', 2017-02-08, 11-10, 'Nig', '2016-12-10', 'Nig');
insert into movie values (11... | true |
b93a61093169c0e5739168edb7c43cf9ea249bb4 | SQL | gsimmons2882/cs4350groupone | /dannyworking/trunk/Create Tables for Blog.sql | UTF-8 | 1,510 | 3.4375 | 3 | [
"BSD-3-Clause"
] | permissive | SET SQL_MODE = 'ANSI_QUOTES';
CREATE TABLE tbl_post
(
id INT AUTO_INCREMENT PRIMARY KEY,
title VARCHAR(128),
content VARCHAR(255),
tags VARCHAR(128),
status ... | true |
8abb3eb4df30da29721c1d73a886359f01648fc9 | SQL | jsilvamoises/-CursosOnlineFiles | /CursoMC/src/main/resources/db/migration/V0001__criacao_das_primeiras_classes_e_inserts.sql | UTF-8 | 5,025 | 3.640625 | 4 | [] | no_license | CREATE TABLE IF NOT EXISTS `categoria` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`nome` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `estado` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`nome` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`)... | true |
89b7df7dc19e604a94b7e75a9872b4c97ecfa674 | SQL | blidodi/HPTeam | /kajhie/db/kwitansi.sql | UTF-8 | 4,033 | 2.984375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.2.11
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: 30 Jan 2017 pada 02.52
-- Versi Server: 5.6.21
-- PHP Version: 5.6.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!4... | true |
3248364589864c75de928b5da88d24d5e650cca4 | SQL | soitgoes/Identity.Dapper | /IdentityTablesMySql.sql | UTF-8 | 2,551 | 3.8125 | 4 | [
"MIT"
] | permissive | CREATE TABLE `identitylogin` (
`LoginProvider` VARCHAR(128) NOT NULL,
`ProviderKey` VARCHAR(128) NOT NULL,
`UserId` INT NOT NULL,
`Name` VARCHAR(256) NOT NULL,
PRIMARY KEY (`ProviderKey`, `UserId`, `LoginProvider`));
CREATE TABLE `identityrole` (
`Id` INT NOT NULL AUTO_INCREMENT,
`Name` VARCHAR(50) NOT N... | true |
e3c79545bf8090f5e1c880d160d0031e6bc77fdf | SQL | cb-adithyaks/Adithya | /week3/Day2and3/reservationQueries.sql | UTF-8 | 6,058 | 4.1875 | 4 | [] | no_license | /*
Queries for reservation system
*/
/* 1) To get a list of all trains*/
select TrainName from Trains;
/* 2)To get the list of all train routes in the database */
select derived.RouteId,derived.OriginStationName,StationCode as DestinationStationName,derived.DistanceInKms from (select RouteId,StationCode as OriginS... | true |
15ffa50d482dd40506ce49201488c206436b7139 | SQL | Ale1991/Summertime | /Documents/summertime_31_12_2018.sql | UTF-8 | 7,726 | 3.15625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.7
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Creato il: Dic 31, 2018 alle 17:21
-- Versione del server: 10.1.30-MariaDB
-- Versione PHP: 7.2.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_... | true |
641d355ed8bcf17958d6164f268a5eb6c0261c53 | SQL | nszoni/ceu-dataeng1 | /term1/models/intermediate/int_devops_roles.sql | UTF-8 | 2,298 | 3.859375 | 4 | [] | no_license | USE imdb;
-- on this table we have no numerical-like values to validate with testing
-- CDC table for updates and inserts on the roles table
DROP TABLE IF EXISTS roles_audit_log;
CREATE TABLE roles_audit_log (
actorid BIGINT NOT NULL,
movieid BIGINT NOT NULL,
old_row_data VARCHAR(100),
new_row_data ... | true |
e77b45be7c94c140d8203ac49d9416225a73411f | SQL | gitahead/gitahead | /dep/scintilla/scintilla-3.21.0/cocoa/ScintillaTest/TestData.sql | UTF-8 | 8,324 | 2.953125 | 3 | [
"LicenseRef-scancode-scintilla",
"MIT"
] | permissive | -- MySQL Administrator dump 1.4
--
-- ------------------------------------------------------
-- Server version 5.0.45
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
... | true |
555bf91e9700ecf176dd68a6dc20a23cb637562c | SQL | alandsamuel/PI | /db/toko.sql | UTF-8 | 12,557 | 2.90625 | 3 | [] | no_license |
-- phpMyAdmin SQL Dump
-- version 3.5.2.2
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Aug 31, 2017 at 02:03 AM
-- Server version: 10.1.24-MariaDB
-- 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_C... | true |
0e4f5adf438d2bef510fb296619be17a2d9ec54c | SQL | LatcomSA/AppWeb | /backend/estructura.sql | UTF-8 | 2,195 | 3.671875 | 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='ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTI... | true |
633eb6225184f6c700c141f36359af7074a3ae5c | SQL | m-lab/prometheus-support | /config/federation/bigquery/bq_mlabns_ratelimit.sql | UTF-8 | 504 | 3.0625 | 3 | [
"Apache-2.0"
] | permissive | SELECT COUNT(*) as value
FROM `mlab-ns.exports.appengine_googleapis_com_request_log_*` as t,
t.protoPayload.line AS x
WHERE
(_table_suffix = FORMAT_DATE("%Y%m%d", CURRENT_DATE())
OR _table_suffix = FORMAT_DATE("%Y%m%d", DATE_SUB(CURRENT_DATE(), INTERVAL 1 DAY)))
AND t.protoPayload.starttime > TIMESTAMP_S... | true |
23f1ad3e54e64bb2a8317ef0b2eea63f2dcca632 | SQL | jgarzonext/plsql-testing | /script_plsql/bd_iaxis/script/indices/TRAMO_SINIESTRALIDAD_BONO_PK.sql | UTF-8 | 347 | 2.703125 | 3 | [] | no_license | --------------------------------------------------------
-- DDL for Index TRAMO_SINIESTRALIDAD_BONO_PK
--------------------------------------------------------
CREATE UNIQUE INDEX "AXIS"."TRAMO_SINIESTRALIDAD_BONO_PK" ON "AXIS"."TRAMO_SINIESTRALIDAD_BONO" ("ID")
PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATIST... | true |
26bf351878e16082055ed01d2183fe397b75c213 | SQL | HMFouad/cdp2017 | /GGHB/BD/bd.sql | UTF-8 | 2,358 | 3.609375 | 4 | [] | no_license | CREATE DATABASE IF NOT EXISTS `cdp` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
USE cdp;
CREATE TABLE `acl` (
`id` int(11) NOT NULL,
`user_id` int(11) DEFAULT NULL,
`project_id` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `projects` (
`id` int(11) NOT NULL,
`project` varc... | true |
c1e889e7740749ce80bc11db8b672870d9e351a7 | SQL | MinjuCo/groenity | /phpmyadmin/groenity.sql | UTF-8 | 7,018 | 3.15625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 05, 2020 at 07:50 PM
-- Server version: 10.1.38-MariaDB
-- PHP Version: 7.3.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
0d895355ffa8db69b0ca26d89e3a8886cfc02649 | SQL | aigilcre/TechspireProject | /TechspireSite/TechspireSite/SQL/Rebecca H/UpdateCustomerCustomerCategory.sql | UTF-8 | 389 | 3.25 | 3 | [] | no_license | -- created a new column that states the date at which the employee is assigned a category
UPDATE CustomerCustomerCategory
SET CustomerCustomerCategory.created_date = Customer.begin_date
FROM Customer
INNER JOIN CustomerCustomerCategory ON CustomerCustomerCategory.customer_id = Customer.id
INNER JOIN CustomerCategory ON... | true |
72ae5d24dfa95e740cdd72edfa1f7fcb40f2470c | SQL | paulina-biszta/CFLMS-CodeReview10-Paulina | /cr10_paulina_biglibrary.sql | UTF-8 | 6,688 | 3.140625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jul 18, 2020 at 01:58 PM
-- Server version: 10.4.13-MariaDB
-- PHP Version: 7.4.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... | true |
5c8f87b2d1e1b00c11b6efcae03726c04ce96afe | SQL | unknow16/ecps-parent | /ecps-core/src/main/resources/db/ecps.sql | UTF-8 | 3,202 | 3.203125 | 3 | [] | no_license | -- 创建数据表空间
create tablespace gx1110
logging
datafile 'C:\oraclexe\app\oracle\oradata\XE\gx1020.dbf'
size 32m
autoextend on
next 32m maxsize 2048m
extend management local;
-- 创建用户表空间
--1.创建临时表空间
-- drop tablespace bhz_temp including contents and datafiles;
--2.创建表空间
create tablespace bhz
datafile '/opt/oracle/ora... | true |
ce3372c6416834cbfad30e661be7193681056dd2 | SQL | tayduivn/training | /rdbms/update/sacwis_629.sql | UTF-8 | 477 | 2.703125 | 3 | [] | no_license | --STGAP00015628 - Release(3.4) Adding New column to capture the dissolution date
--Adding new column to the ADO_INFO Table to capture the Date when needed.
ALTER TABLE CAPS.ADO_INFO
ADD (DT_DISRUPT TIMESTAMP);
COMMENT ON COLUMN CAPS.ADO_INFO.DT_DISRUPT IS 'Date the The Adoption was Disrupted.' ;
insert... | true |
448dc8997d13ec856b68a2edf4286ac49210a71d | SQL | mikependon/DotNet-ORM-Cookbook | /ORM Cookbook/OrmCookbookDB/HR/Views/EmployeeDetail.sql | UTF-8 | 444 | 3.46875 | 3 | [
"Unlicense"
] | permissive | CREATE VIEW HR.EmployeeDetail
WITH SCHEMABINDING
AS
SELECT e.EmployeeKey,
e.FirstName,
e.MiddleName,
e.LastName,
e.Title,
e.OfficePhone,
e.CellPhone,
e.EmployeeClassificationKey,
ec.EmployeeClassificationName,
ec.IsExempt,
ec.IsEmployee
FROM HR.Empl... | true |
b6578e870c225fcb64213eb9cb5235c2b17bf0b7 | SQL | muhammadZihad/todo-php-oop-vuejs | /todos.sql | UTF-8 | 1,522 | 3.09375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.9
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Sep 12, 2020 at 09:25 AM
-- Server version: 10.1.31-MariaDB
-- PHP Version: 7.2.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
48e1ba9aa83d485418d9eba27ce2e784385c392e | SQL | tom-fitz/chinook | /sales_agent_customer_count.sql | UTF-8 | 235 | 3.78125 | 4 | [] | no_license | select e.FirstName || e.LastName as EmployeeName,
count(c.SupportRepId)
from Employee e, Customer c
where c.SupportRepId = e.EmployeeId
group by 'Sales Support Agent'
select CustomerId, SupportRepId
from Customer
group by SupportRepId | true |
4c7754f571e671845c63272a42953b977a00a709 | SQL | MRGhidini/SAP_Queries | /Pega atribuição de quantidade no lote descontado as saidas do estoque.sql | UTF-8 | 1,466 | 3.859375 | 4 | [] | no_license | Select CASE WHEN (ISNULL(SUM(AA.Quantidade),0)) < 0 THEN 0 ELSE ISNULL(SUM(AA.Quantidade),0) END as 'Empenho MI', AA.DocEntry AS 'N° Pedido', AA.ItemCode as 'Cod. Item', AA.BatchNum as 'N° Lote' FROM
(SELECT
-SUM(IBT1.Quantity) as 'Quantidade', IBT1.ItemCode, IBT1.BatchNum, IBT1.BsDocEntry AS 'DocEntry'
FROM IBT1 IN... | true |
4b01b2fb7f60fba57f34f412d0405375b26b257a | SQL | nourhamdan/ETL_Project | /ETL_Project/ETL_Project.sql | UTF-8 | 503 | 2.984375 | 3 | [] | no_license | DROP TABLE if exists all_season;
DROP TABLE if exists shot_logs;
CREATE TABLE all_season(
id INT PRIMARY KEY,
Player TEXT,
Age int,
Team TEXT,
Height INT,
Weight INT,
points INT,
Rebounds INT,
Assist INT,
Season INT
);
CREATE TABLE shot_logs (
id INT PRIMARY KEY,
LOCATION TEXT,
shot_number INT... | true |
3c0a599cc0b6f083518be5d6949189f568e7737e | SQL | Zachary-Lei/Ticket-ordering-system | /项目源码/sql/proc.sql | UTF-8 | 504 | 3.15625 | 3 | [] | no_license | drop procedure if exists Proc_new_order;
delimiter //
create procedure Proc_new_order(in cur_user_name varchar(20), out cur_ord_id int)
begin
start transaction;
set cur_ord_id = (select max(order_id)
from orders);
if cur_ord_id is null
then set cur_ord_id = 1;
end if;
select cur_ord_id;
se... | true |
37907fb2ec1c70333252a56b193243efc6208583 | SQL | oscarlaureano/OnePrize | /database/database.sql | UTF-8 | 3,138 | 3.625 | 4 | [] | no_license | /* Creacion de la base de datos */
CREATE DATABASE IF NOT EXISTS producto;
/* Creacion de las tablas */
CREATE TABLE IF NOT EXISTS Productos (
ProductID int NOT NULL,
Nombre varchar(255),
Cantidad int,
PRIMARY KEY (ProductID)
);
CREATE TABLE IF NOT EXISTS users (
id INT NOT NULL PR... | true |
8ae85f20a6254f61ab038ed86968c3996f8dda5f | SQL | romenl/mybatis-async | /src/test/java/com/gameart/async/sql/sql.sql | UTF-8 | 840 | 3.03125 | 3 | [] | no_license |
--
-- Table structure for table `info`
--
DROP TABLE IF EXISTS `info`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `info` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`title` varchar(50) DEFAULT NULL,
`content` text,
PRIMARY KEY (`id`)
)... | true |
81c3a417781bcd7ec011cefaf30aa0af6a1bcbfd | SQL | sumelio/MiIngreso | /MiIngreso-backend/src/main/resources/data.sql | UTF-8 | 1,415 | 3.421875 | 3 | [] | no_license | DROP TABLE IF EXISTS checkout_product;
DROP TABLE IF EXISTS checkout;
DROP TABLE IF EXISTS product;
DROP TABLE IF EXISTS customer;
CREATE TABLE IF NOT EXISTS product (
id INT AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(250) NOT NULL,
description VARCHAR(250) NOT NULL,
price DOUBLE DEFAULT NULL,
image... | true |
5b34520ceba046a8ef6c0a3534546cd207bc0b61 | SQL | phamvanlinh20111993/CodeSignalSolutions | /Hackerrank/sql/15 Days of Learning SQL.sql | UTF-8 | 1,564 | 4.5 | 4 | [] | no_license | WITH temp(submission_date, hacker_id, amount) AS
(SELECT submission_date,
hacker_id,
count(hacker_id) AS amount
FROM Submissions
GROUP BY submission_date,
hacker_id)
SELECT t.submission_date,
t1.c,
t.hacker_id,
t.name
FROM
(SELECT t.*,
h.name
F... | true |
e815000cf5c63f53f894327e7044a06623bfdb6c | SQL | Antoine-Hawwa/Expiry_Date_Monitor | /EDM/DB_Structure/create_db.sql | UTF-8 | 1,256 | 3.34375 | 3 | [] | no_license | DROP SCHEMA "EDM" CASCADE;
DROP DATABASE "EDM";
DROP TABLESPACE "EDM_TS";
DROP USER "EDM";
CREATE ROLE "EDM" WITH
LOGIN
SUPERUSER
CREATEDB
CREATEROLE
INHERIT
REPLICATION
CONNECTION LIMIT -1
PASSWORD 'EDM';
GRANT pg_execute_server_program, pg_monitor, pg_read_all_settings, pg_read_all_stats, pg_read_server_f... | true |
fbcdb24313ab642d7919805753b6e6f0e47520b5 | SQL | jonathanh137/HousingDatabase | /project_transactions.sql | UTF-8 | 5,585 | 4.25 | 4 | [] | no_license | /*List of rental properties available for a specific branch(where the name of the branch is entered as input), along with the manager’s name*/
CREATE OR REPLACE PROCEDURE BranchProps(BranchNum IN Employee.BranchNo%type)
AS
Manager VARCHAR(20);
CURSOR large_cur IS
SELECT RentNo,RentalProp.Street ||', '|| RentalProp.... | true |
fdc09850d885d3d33a2ccfcff09affa51e3d04f7 | SQL | VijayMVC/Synergy | /User/Debbie Ann Chavez/ENGLISH PROFICIENCY FOR 40DAY.sql | UTF-8 | 902 | 3.6875 | 4 | [] | no_license |
SELECT
SIS_NUMBER
,STATE_STUDENT_NUMBER
,CASE WHEN T2.STUDENT_GU IS NULL THEN 'NO ELL RECORD FOUND' ELSE '' END AS ELL_STUDENT
, EXIT_DATE
, EXIT_REASON
,CASE
WHEN T2.EXIT_REASON = 'EY3' THEN '4'
WHEN T2.EXIT_REASON = 'EY2' THEN '3'
WHEN T2.EXIT_REASON = 'EY1' THEN '2'
WHEN T2.STUDEN... | true |
af51b2b17009fb9600a3da91cb978257f45a2035 | SQL | Gustavo-F/Kindle-FXML | /kindle_fxml/db_script.sql | UTF-8 | 2,809 | 4.5 | 4 | [] | no_license | CREATE TABLE writer(
writer_id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
name VARCHAR(30) NOT NULL,
surname VARCHAR(30) NOT NULL,
email VARCHAR(100) NOT NULL UNIQUE
);
CREATE TABLE genre(
genre VARCHAR(50) NOT NULL PRIMARY KEY
);
CREATE TABLE person(
person_id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
emai... | true |
b4fbb370948fb7644879a5f7fec79b2780c976f8 | SQL | reeseyuan/Oracle | /存储过程示例.sql | GB18030 | 1,702 | 3.609375 | 4 | [] | no_license | -- ̵ Dzű(102030)һֵ
--ԲнˮСֵԱ н 10%¼Զ˽˼нһ˶Ǯ
--1. ڹ 2. ӵǮΪout
CREATE OR REPLACE PROCEDURE emp_addsal(dept in number,addmoney in number,summoney out number)
as
add_count number :=0 ;
begin
summoney:=0;
select sum(sal*0.1) into summoney from emp where deptno=dept and sal< addmoney;
update emp set sal=sal*1.1 where dept... | true |
972aee1428d8500f99180a0eaac58e9b646b383b | SQL | EsMACGIA/deportes-cp-api | /db/postgres/queries/trainer/getAllTrainers.sql | UTF-8 | 149 | 2.96875 | 3 | [] | no_license | -- Get all trainer in the database
SELECT U.id, name, lastname, email, ci
FROM ("deportes-cp".trainer JOIN "deportes-cp".users AS U ON user_id=id)
| true |
20dacb7770374d4c9feebff8ebc45ba1ea371952 | SQL | jgoralcz/lab3-422 | /mysql_lab3.sql | UTF-8 | 1,050 | 3.359375 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 5.7.21, for macOS (x86_64)
--
-- Host: localhost Database: jgoralcz_phonebook
-- ------------------------------------------------------
--
-- Table structure for table `phone_entry`
--
CREATE DATABASE IF NOT EXISTS `jgoralcz_phonebook`;
USE `jgoralcz_phonebook`;
CREATE TABLE... | true |
f676092bea1c2882541ffb562beed801f850e792 | SQL | neostreet/poker_session_data | /mttr_nlhe_utl_asterisk_detail.sql | UTF-8 | 338 | 2.828125 | 3 | [] | no_license | use poker
select delta,buy_in,entry_fee,num_hands,num_entries,places_paid,place,winnings,
concat(poker_session_date,tournament_letter) date
from poker_sessions
where poker_style = 6 and poker_flavor = 3 and
places_paid < num_players and
place is not null and place != 0 and
place < num_players and place > places_paid
o... | true |
f5690029204b2be4d26aac6cf1e9f74a1bdca535 | SQL | CUBRID/cubrid-testcases | /sql/_32_damson/cbrd_23679/_03_insert/_04_type_varbit_allow/cases/_009_varbit_cte.sql | UTF-8 | 1,740 | 3.71875 | 4 | [
"BSD-3-Clause"
] | permissive | set system parameters 'allow_truncated_string=yes';
---------- INSERT INTO ...
---------- WITH cte AS (SELECT ...)
---------- SELECT * FROM cte ORDERBY 1;
drop table if exists t2;
drop table if exists t1;
create table t2 (parent_id int, code bit varying(16));
insert into t2 values (1, b'11');
insert into t2 values (1... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.