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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
35b95fa9accf007a3cf1741912699a8da14d329e | SQL | ddtian38/bamazon | /bamazon.sql | UTF-8 | 802 | 3.078125 | 3 | [] | no_license | DROP TABLE IF EXISTS bamazonDB;
CREATE DATABASE bamazonDB;
USE bamazonDB;
CREATE TABLE products(
item_id INT AUTO_INCREMENT,
product_name VARCHAR(100) NOT NULL,
department_name VARCHAR(100) NOT NULL,
price DOUBLE(10,2) NOT NULL,
stock_quantity INT NOT NULL
);
INSERT INTO products
(product_name, department_name... | true |
56cb099bc66c9961ed90067f39c3c9cba0543084 | SQL | ManWithShotgun/l2i-JesusXD-3 | /static/gs/sql/server/class_list.sql | UTF-8 | 8,634 | 2.78125 | 3 | [] | no_license | /*
SQLyog Enterprise - MySQL GUI v7.15
MySQL - 5.0.27-community-nt : Database - l2it
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*Table stru... | true |
0d84200ec1a128ec1313280a68c1a7243d776c34 | SQL | KiroKirilov/SoftUni | /ProfessionalModules/C#DBFundamentals/DatabasesBasics/Exam(TripService)/Exam(24.06.2018)/Bonus.sql | UTF-8 | 208 | 3.609375 | 4 | [] | no_license | --Problem 20 - Cancel Trip
CREATE TRIGGER tr_CancelDeleted
ON Trips
INSTEAD OF DELETE
AS
BEGIN
UPDATE Trips
SET CancelDate='2018-06-24'
WHERE CancelDate IS NULL
AND Id IN (SELECT Id
FROM deleted)
END | true |
195dc0ed8e2f1d57b5cff3992988355fcbb5c47a | SQL | VincentWei2021/hadoopsubmarine | /docs/database/submarine.sql | UTF-8 | 3,955 | 3.515625 | 4 | [
"Apache-2.0"
] | permissive | -- Licensed to the Apache Software Foundation (ASF) under one or more
-- contributor license agreements. See the NOTICE file distributed with
-- this work for additional information regarding copyright ownership.
-- The ASF licenses this file to You under the Apache License, Version 2.0
-- (the "License"); you may not... | true |
3da13bdf51f7332ba070d7e722138a0b6b79c5fe | SQL | mf4lsb/Telkom-Kujang | /database/telkom_indonesia.sql | UTF-8 | 39,419 | 3.046875 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.8.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Nov 30, 2019 at 02:01 AM
-- Server version: 10.1.33-MariaDB
-- PHP Version: 7.1.18
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... | true |
fd6a75208e36970b84b4b6d90b067831ec6eb467 | SQL | XiaolinQian/node | /sql/migrations/1552266000000_up_example.sql | UTF-8 | 291 | 3.078125 | 3 | [] | no_license | CREATE TABLE IF NOT EXISTS `example` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
`name` varchar(255) NOT NULL COMMENT '名字',
PRIMARY KEY (`id`),
UNIQUE KEY `id_UNIQUE` (`id`),
UNIQUE KEY `no_UNIQUE` (`no`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='例子'; | true |
b012c4a15274cab52df2bf6f6c2f4d39e9659c7a | SQL | sebassilva/proyectoBases | /s-04-tablas-externas.sql | UTF-8 | 935 | 3.078125 | 3 | [] | no_license | -- @Autores: López Santibáñez Jiménez, Luis Gerardo
-- Silva García, Carlos Sebastián
-- Fecha de creación: 09/06/2018
-- Descripción: Crea ua tabla externa partiendo de un archivo csv, podrían ser empleados de una base anterior
CREATE DIRECTORY ext_tab_dir AS '/home/oracle/app';
CONNECT system/system;
GRANT ... | true |
6098b5b35b8547e6ddc61d99d2a5e049c5751256 | SQL | mariaathena/kaggle_projects | /expedia_ctr/create_sql_database/load_data.sql | UTF-8 | 1,433 | 2.5625 | 3 | [] | no_license | -- Load data into SQL database
CREATE TABLE train
(
date_time VARCHAR,
site_name VARCHAR,
posa_continent VARCHAR,
user_location_country VARCHAR,
user_location_region VARCHAR,
user_location_city VARCHAR,
orig_destination_distance VARCHAR,
user_id VARCHAR,
is_mobile VARCHAR,
is_package VARCHAR,
channel VARCHAR,
srch_ci... | true |
6d82b2add779db282f1699c1976846a13f8770f1 | SQL | shan/codelabs | /R/PlatinumGenomes-QC/sql/check-sex.sql | UTF-8 | 1,387 | 4.09375 | 4 | [
"Apache-2.0"
] | permissive | #standardSQL
--
-- Compute the homozygous and heterozygous variant counts for each individual
-- within chromosome X to help determine whether the sex phenotype value is
-- correct for each individual.
--
WITH filtered_snp_calls AS (
SELECT
call.call_set_name,
CAST((SELECT LOGICAL_AND(gt > 0) FROM UNNEST(call... | true |
2b97a459cd288ffbf5385d9128b78ee89884e169 | SQL | mmathias01/dbt-snowplow-web | /models/page_views/scratch/redshift/snowplow_web_pv_yauaa.sql | UTF-8 | 1,055 | 3 | 3 | [
"LicenseRef-scancode-warranty-disclaimer",
"Apache-2.0"
] | permissive | {{
config(
sort='page_view_id',
dist='page_view_id',
enabled=(var('snowplow__enable_yauaa') and target.type == 'redshift' | as_bool())
)
}}
select
pv.page_view_id,
ya.device_class,
ya.agent_class,
ya.agent_name,
ya.agent_name_version,
ya.agent_name_version_major,
ya.agent_version,
y... | true |
053252fda33436c4cfed641e794f64abf0650264 | SQL | HenriqueMDC/Exercicios-BancoDeDados | /DELETE alunos.sql | UTF-8 | 659 | 2.75 | 3 | [] | no_license | -- DELETE alunos WHERE nome LIKE '%Francisco%';
-- DELETE alunos WHERE YEAR(data_nascimento) = 1994;
-- DELETE alunos WHERE signo = 'Gêmios';
-- DELETE alunos WHERE nome LIKE 'Reinaldo%';
-- DELETE alunos WHERE nome LIKE '%Carvalho';
-- DELETE alunos WHERE MONTH(data_nascimento) = 07;
-- DELETE alunos WHERE nota_1 > n... | true |
aae991a5dcd9f9a8053b31c4a1bf8b1a0947d230 | SQL | CastilloJuliusDave/PHP-JS-AJax-jQuery | /Capstone2/attendance.sql | UTF-8 | 7,029 | 3.328125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.6.6deb5
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Jan 30, 2019 at 01:19 AM
-- Server version: 10.1.34-MariaDB-0ubuntu0.18.04.1
-- PHP Version: 7.2.10-0ubuntu0.18.04.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET... | true |
c55b48678ce9f9e985bd550411ea2a12e8e40f39 | SQL | Ravath/MightyGM | /Pathfinder/SQL/SqlGeneration.sql | UTF-8 | 56,836 | 2.984375 | 3 | [] | no_license | CREATE SCHEMA pathfinder;
create table pathfinder.dataobject(
id serial NOT NULL,
primary key(id));
create table pathfinder.requismodel(
name character varying(40) NOT NULL,
tag character varying(7) NOT NULL,
unique(name),
unique(tag))INHERITS(pathfinder.dataobject);
create table pathfinder.requisdescriptio... | true |
0cf85046277f6a37508112ca507acd015d766988 | SQL | typilus/typilus | /src/data_preparation/metadata/bigquery4TypedPyRepos.sql | UTF-8 | 586 | 3.40625 | 3 | [
"MIT"
] | permissive | CREATE TEMP FUNCTION check4Typing(arr ARRAY<STRING>)
RETURNS BOOL
LANGUAGE js AS """
return arr && arr.some(function(ele) {
return ele.startsWith("import typing") || ele.startsWith("from typing import") || ele.includes("# type: ") ;
});
""";
WITH typedRepos AS (
SELECT sample_repo_name AS repo
FROM `fh-b... | true |
5aaac1b62fab3283a5250ebbaa9be6676c62320c | SQL | chembl/unichem2index | /alter/spool2M.sql | UTF-8 | 986 | 3.203125 | 3 | [
"MIT"
] | permissive | set colsep "|"
set echo off
set termout off
set underline off
set heading off
set feedback off
set linesize 32767
set trimspool on
set trimout on
set verify off
set newpage 0
set pagesize 0
spool /opt/unichem/csv_file2M.csv
SELECT UCI || '|' || STANDARDINCHI || '|' || STANDARDINCHIKEY || '|' || PARENT_SMILES || '|' || ... | true |
63907573b8b377beb8237b315cdbdb14402a9610 | SQL | The-Ark-Informatics/ark | /ark-database/db-scripts/patch/20110711_v0.1.3/mysql/20110720_study_2_unit_type_schemaPatch.sql | UTF-8 | 929 | 4 | 4 | [] | no_license | use study;
CREATE TABLE `study`.`unit_type` (
`ID` INT NOT NULL AUTO_INCREMENT ,
`NAME` VARCHAR(45) NOT NULL ,
`DESCRIPTION` VARCHAR(255) NULL ,
PRIMARY KEY (`ID`) ,
UNIQUE INDEX `NAME_UNIQUE` (`NAME` ASC) )
ENGINE = InnoDB;
-- Make add an additional column FK to ArkModule (in case units will need to be sep... | true |
75937c7c7970b8dbbdb419cf42affaf6b73c2763 | SQL | dextra/pganalytics_community | /node_pga_2_0/pga/sql/sostats_cpuusage.sql | UTF-8 | 511 | 3.609375 | 4 | [
"PostgreSQL"
] | permissive | SELECT
timestamp AS "datetime",
_user AS "cpu_user_perc",
_system AS "cpu_system_perc",
_nice AS "cpu_nice_perc",
_iowait AS "cpu_iowait_perc",
_steal AS "cpu_steal_perc",
_idle AS "cpu_idle_perc"
FROM sn_sysstat_cpu d
INNER JOIN sn_stat_snapshot sss ON (sss.snap_id = d.snap_id)
WHERE 1=1
AND sss.customer_id = ${custom... | true |
63f298619ce9003a1e5c98fa5978671870065b1a | SQL | wendyar/turing | /datos/datos_servidor.sql | UTF-8 | 14,831 | 3.1875 | 3 | [] | no_license | /**
* @Author: Wendy Guadalupe Magaña Argente <wendylu>
* @Date: 2017-09-06T03:21:57-05:00
* @Email: wendyargente@nube.unadmexico.mx
* @Project: Turing
* @Filename: localhost.sql
* @Last modified by: wendylu
* @Last modified time: 2017-09-06T03:24:27-05:00
* @License: MIT
*/
-- phpMyAdmin SQL Dump
-- v... | true |
63791614edefbd9d0ec0f93dcf1da33230001539 | SQL | Aren-Stark/Java-FSE | /Java Basics Learning Path - Stage 1/SQL Programming/Databse Management/Car rental system - Create Table/query.sql | UTF-8 | 994 | 3.453125 | 3 | [] | no_license | CREATE TABLE Owners (
owner_id VARCHAR(10) NOT NULL,
owner_name VARCHAR(20) NULL,
address VARCHAR(20)NULL,
phone_no BIGINT NULL,
email_id VARCHAR(20) NULL,
PRIMARY KEY (owner_id)
);
CREATE TABLE Cars (
car_id VARCHAR(10) NOT NULL PRIMARY KEY,
car_name VARCHAR(20) NULL,
car_type VARC... | true |
2b5b26f25f91b6aa25c79cf4c9594fca5a3a47dc | SQL | MandyArthur/LearnPhpSqlProjects | /seatbooking/seatbookingdatabase.sql | UTF-8 | 1,794 | 2.75 | 3 | [] | no_license | SELECT * FROM movie;
/*
===========================Buy Domain Table=======================
CREATE TABLE `buy_domain` (
`domain_id` int(64) NOT NULL auto_increment,
`domain_theatre_id` varchar(64) NOT NULL, //Here it is buyer
`domain_name` varchar(128) NOT NULL,
`domain_extension` varchar(128) NOT NULL,
`d... | true |
c91267a4d673086f58b0e6a17d6d0a3fcb890417 | SQL | shubhamkj5/Databases | /Stored_Procedure_LAB1.sql | UTF-8 | 1,330 | 3.703125 | 4 | [] | no_license | ####1
Drop View if exists names_department;
CREATE VIEW names_department AS
SELECT concat(firstName, ' ',LastName) as Name, department
FROM details;
select * from names_department;
#####2
Drop procedure if exists update_department;
DELIMITER //
CREATE PROCEDURE update_department
(
id_param INT,
department... | true |
196b20a30123e583264c451b41b9d8a095532e3e | SQL | Celsocw/bd | /sql m3.sql | UTF-8 | 7,047 | 3.359375 | 3 | [] | no_license | /* colocar 14 dígitos no CNPJ e 11 dígitos no CPF*/
CREATE DATABASE SolNascente;
USE solnascente;
CREATE TABLE condominio(
idCondominio TINYINT(2) PRIMARY KEY AUTO_INCREMENT,
nome VARCHAR(50),
cnpj INT(13),
bairro VARCHAR(100),
rua VARCHAR(100),
cep INT(8),
numero INT(8)
);
CREATE TABLE condominos(
idCondominos TI... | true |
d60f6d7e676842f0085fa9d5e342c572068b9dc7 | SQL | HarrshaVardhan/SQL-Project | /Programming with Mosh/06.Writing Complex Query.sql | UTF-8 | 4,594 | 4.625 | 5 | [] | no_license | /*************************************/
/* Subqueries */
/**************************************/
/* products that are more expensive than lettuce */
USE mosh_sql_store;
SELECT *
FROM products
WHERE unit_price > (
SELECT unit_price FROM products
WHERE name REGEXP('lettuce')
);
/* find emp... | true |
ff65a35a050b4247713020757d0f7ad28701945f | SQL | mahmoudshawky123/database-tables | /SQLQuery4.sql | UTF-8 | 886 | 3.015625 | 3 | [] | no_license | create database ibms
use ibms
create table account
(
ID int primary key,username char(20),loginpassword char(25),category varchar(25),picture varchar(100)
)
create table customer
(
ID int primary key,firstname char(20),nextname char(25),books_issued varchar(25),location varchar(100),registeration_date time,pict... | true |
00dfe621c484ab55f50b29c25ef4bd8da30f8b66 | SQL | Niloy1010/SQL-FINAL-PROJECT-Music-Store- | /Final Project/Scripts/TRIGGERS/trigger_new_client_order_items.sql | UTF-8 | 869 | 3.65625 | 4 | [] | no_license | DROP TRIGGER IF EXISTS new_cliient;
DELIMITER //
CREATE TRIGGER new_cliient
BEFORE INSERT ON order_items
FOR EACH ROW
BEGIN
DECLARE client_id_new_var INT;
DECLARE client_id_client_var INT;
DECLARE row_not_found tinyint DEFAULT FALSE;
DECLARE client_id_cursor CURSOR FOR
SELECT client_id
... | true |
5b99a6ded46e528d81714f9f4ed8013ab59583e4 | SQL | SeekMentore/SeekMentore | /src/database/mysql/changes/2018-05-08-03-41.sql | UTF-8 | 635 | 2.640625 | 3 | [] | no_license | USE SEEK_MENTORE;
CREATE TABLE LOGON_TRACKER(
LOGON_ID INT NOT NULL AUTO_INCREMENT,
USER_ID VARCHAR(100) NOT NULL,
USER_TYPE VARCHAR(100) NOT NULL,
LOGIN_TIME TIMESTAMP NOT NULL,
LOGIN_FROM VARCHAR(1000),
MACHINE_IP VARCHAR(1000),
PRIMARY KEY (LOGON_ID));
CREATE TABLE PASSWORD_CHANGE_TRACKER(
PASSWORD_CHANGE_ID INT N... | true |
f209fae322f58e944b6a0f91a8a5c78962e56eed | SQL | replydev/Notes-Server | /queries/create_notes_table.sql | UTF-8 | 206 | 2.609375 | 3 | [] | no_license | CREATE TABLE IF NOT EXISTS `notes` (
`id` INT(11) NOT NULL,
`data` LONGTEXT NOT NULL DEFAULT '' COLLATE 'utf8mb4_general_ci',
PRIMARY KEY (`id`) USING BTREE
)
COLLATE='utf8mb4_general_ci'
ENGINE=InnoDB
; | true |
42117c6a7f479441fc07e816fd163668c0f3fb0c | SQL | chaitalizn/employee-tracker | /db/seeds.sql | UTF-8 | 1,009 | 3.03125 | 3 | [] | no_license | INSERT INTO department (name)
VALUES
('General Management'),
('Marketing'),
('Operations'),
('Finance'),
('Sales'),
('IT'),
('HR');
INSERT INTO roles (title, salary, department_id)
VALUES
('Manager', 85000, 1),
('Project manager', 85000, 1),
('Marketing specialist', 70000, 2),
('Business analyst', 75000, 5),
('... | true |
ad5308332fab538c20f134c04898bdf35b164b5b | SQL | miths1108/PiGen | /codd-data-gen/resources/cdgclient/postgres/projection queries_old/q240.sql | UTF-8 | 136 | 2.53125 | 3 | [] | no_license | SELECT distinct d_year, d_qoy, i_category
FROM web_sales, item, date_dim
WHERE ws_sold_date_sk = d_date_sk
AND ws_item_sk = i_item_sk
;
| true |
17b44bf0376e174820bc43b1c05b5095bf383958 | SQL | tgeary90/PLSQLProject | /new_staff_app.sql | UTF-8 | 890 | 2.890625 | 3 | [] | no_license | REM ************************************
REM EBSY702
REM MINI_PROJECT
REM Created By: Tom Geary
REM Date: 07/01/2012
REM File: new_staff_app.sql
REM ************************************
-- Q9.
-- PL/SQL App to test new_staff procedure
-----------------------------------------
/*
TASOS: PLEASE RUN SCRIPTS... | true |
5fa18dd0b82c1be203791fb5466a5fe90298bc19 | SQL | fmrone/RestWithAspNetUdemy | /Aula 07 - Repository/RestWithAspNetUdemy/db/migrations/V1_0_7__Recreate_Table_Books.sql | UTF-8 | 258 | 2.53125 | 3 | [] | no_license | use rest_with_asp_net_udemy;
CREATE TABLE IF NOT EXISTS books
(
Id int(10) auto_increment primary key,
Title longtext not null,
Author longtext not null,
LaunchDate datetime(6) not null,
Price decimal(65, 2) not null
)
ENGINE=InnoDB DEFAULT CHARSET=latin1;
| true |
3f02e5b48c1e02464022c37ae426ba75468bcaeb | SQL | github-googleforwork/bvi | /schemas/bigquery/bigquery_custom_schemas/custom/custom_collab_profiles_latest.sql | UTF-8 | 770 | 3.515625 | 4 | [
"Apache-2.0"
] | permissive | -- CUSTOM custom_collab_profiles_latest (view)
-- Review: 25/01/2018
SELECT
ou,
custom_1,
custom_2,
custom_3,
SUM(readers) AS readers,
SUM(creators) AS creators,
SUM(collaborators) AS collaborators,
SUM(sharers) AS sharers,
SUM(anyprofile) AS anyprofile,
SUM(active) AS active,
SUM(idles) AS idles... | true |
c4f8be8b90e7f2908c4f071a1de5c31a16fcfbec | SQL | cadl272/civ6mods | /1577362869/ModSupport/CoryModSupport.sql | UTF-8 | 469 | 2.59375 | 3 | [] | no_license | --- YNAEMP
CREATE TABLE IF NOT EXISTS StartPosition (MapName TEXT, Civilization TEXT, Leader TEXT, X INT default 0, Y INT default 0);
INSERT INTO StartPosition
(Civilization, Leader, MapName, X, Y)
VALUES ('CIVILIZATION_CVS_PHILIPPINES', 'LEADER_CIVITAS_CORY', 'GiantEarth', 88, 40),
('CIVILIZATION_CVS_PHI... | true |
96e97e731f82359255921d09b8ac39f9fb60ab25 | SQL | aitalvivem/AitalDisem | /sec/database_creation_tools/sql/script_aitaldisem.sql | UTF-8 | 4,917 | 3.484375 | 3 | [
"MIT"
] | permissive | -- ------------------------------------------------------------
-- Script MySQL.
-- ------------------------------------------------------------
-- ---------------------------------------------------------
-- CREATE DataBase: aitaldisem
-- ---------------------------------------------------------
DROP... | true |
b5fc7d01bc4084d4b14f7b6929edffbd7fae66ac | SQL | francisco0522/holbertonschool-higher_level_programming | /0x0E-SQL_more_queries/5-unique_id.sql | UTF-8 | 164 | 2.625 | 3 | [] | no_license | -- script that creates the table unique_id on your MySQL server.
CREATE TABLE IF NOT EXISTS unique_id (id INT DEFAULT 1 NOT NULL, name VARCHAR(256), UNIQUE (id));
| true |
b3693470358e3d0884657b55696240a2714b4c00 | SQL | matthewcotton/CS50-ProblemSets | /pset7/9.sql | UTF-8 | 156 | 3.578125 | 4 | [] | no_license | SELECT name FROM people
WHERE id IN
(SELECT DISTINCT person_id FROM stars
INNER JOIN movies ON movies.id = stars.movie_id
WHERE year = 2004)
ORDER BY birth; | true |
70db51ff3aba1ca634c35059db7990d6f5c01172 | SQL | rzu59210/blog_lprsc | /blog_wk.sql | UTF-8 | 4,737 | 3.21875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.0.10deb1
-- http://www.phpmyadmin.net
--
-- Client: localhost
-- Généré le: Lun 16 Février 2015 à 13:10
-- Version du serveur: 5.5.40-0ubuntu0.14.04.1
-- Version de PHP: 5.5.9-1ubuntu4.5
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_... | true |
9b2cd4e60f9784a6d7b56fbdf282ec1bf5dc3eed | SQL | bitgittry/BaseCodeAnalysis | /trunk/dbv/stored_routines/LottoSportsBookCreditCustomer.sql | UTF-8 | 8,230 | 3.46875 | 3 | [] | no_license | DROP procedure IF EXISTS `LottoSportsBookCreditCustomer`;
DELIMITER $$
CREATE DEFINER=`bit8_admin`@`127.0.0.1` PROCEDURE `LottoSportsBookCreditCustomer`(
sportsBookParticipationID BIGINT, transactionRef VARCHAR(100), extBetRef VARCHAR(40), minimalData TINYINT(1), OUT statusCode INT)
root: BEGIN
-- extBetRef is alw... | true |
4ac32465de96e1c32d58ca6581e6a260cff58ed5 | SQL | josmyJJ/finalProject | /sampleData/sampleData.sql | UTF-8 | 3,971 | 3.390625 | 3 | [] | no_license | -- Department
INSERT INTO `harrison_college1`.`department` (`department_id`, `name`) VALUES ('1', 'English');
INSERT INTO `harrison_college1`.`department` (`department_id`, `name`) VALUES ('2', 'CS');
INSERT INTO `harrison_college1`.`department` (`department_id`, `name`) VALUES ('3', 'History');
-- MAJOR
INSERT INTO `... | true |
4a4fb3f8cc68e6f971130b21309810ca79ed04e1 | SQL | stvhwang/nba2016-17 | /POIRPlayers/POIRPlayers.sql | UTF-8 | 4,884 | 4.46875 | 4 | [
"MIT"
] | permissive | --POIRPlayers.sql
--Sums up point per player from the POIR table
--Computes minutes from when POIR is satisfied to end of game, including overtimes.
select min_added.player, min_added.POIR_points, min_added.team,
-- a period of 5 or more indicates overtime, each of 5 min
case
when max_period >4 then (max_minute + (... | true |
5d25c679d0cf9da158abd6d32c592e143759a093 | SQL | cuba-labs/aggregation-distribute | /modules/core/db/init/hsql/10.create-db.sql | UTF-8 | 874 | 3.046875 | 3 | [] | no_license | -- begin APP_TASK
create table APP_TASK (
ID varchar(36) not null,
VERSION integer not null,
CREATE_TS timestamp,
CREATED_BY varchar(50),
UPDATE_TS timestamp,
UPDATED_BY varchar(50),
DELETE_TS timestamp,
DELETED_BY varchar(50),
--
NAME varchar(255),
PROJECT_ID varchar(36),
... | true |
63428273df25950ac895af235b39698006476698 | SQL | geowarin/brg | /modules/data-model/src/main/resources/db/migration/2019.11/V2019_11_0__Posts.sql | UTF-8 | 2,015 | 3.859375 | 4 | [] | no_license | create extension if not exists "pgcrypto";
-- create schema forum_example;
-- create schema forum_example_private;
create table forum_example.person
(
-- id serial primary key,
-- id uuid primary key default uuid_generate_v1mc(),
id uuid primary key default gen_random_uuid(),
first_nam... | true |
1606c460fc3066198eb438faab11288ccff68330 | SQL | pegaso2021/rimeva | /tutoriales_ftp.sql | UTF-8 | 2,145 | 3.03125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 26-03-2019 a las 07:31:24
-- Versión del servidor: 10.1.35-MariaDB
-- Versión de PHP: 7.2.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
... | true |
aa474f4bfa4bac7da2b55d3c8167cdbb7e8cc607 | SQL | YupION/PPL-UwU | /sewapaja.sql | UTF-8 | 3,812 | 2.671875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Apr 16, 2020 at 04:40 AM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.4.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
dae954eda81616c12b688bbf03dc3f73a55c6ea0 | SQL | kkurzhal/room-reservation-backend | /room_schedule.sql | UTF-8 | 1,063 | 3.71875 | 4 | [] | no_license | DROP DATABASE IF EXISTS room_schedule;
CREATE DATABASE room_schedule;
USE room_schedule;
CREATE TABLE requests
(
id INT(11) AUTO_INCREMENT PRIMARY KEY,
first_name VARCHAR(255) NOT NULL,
last_name VARCHAR(255) NOT NULL,
email VARCHAR(255) NOT NULL,
`date` DATE NOT NULL,
from_time TIME NOT NULL,
to_time TIME NOT ... | true |
67df6bb8e42c7f8786021b8c27d5990233994190 | SQL | uss-hopper/snap-challenges-Ianwfoster | /snap-10-16/snap.ddl | UTF-8 | 556 | 3.25 | 3 | [
"Apache-2.0"
] | permissive |
create table if not exists task(
taskId binary(20) not null,
taskDueDate datetime,
taskDescription varchar(256),
taskPriority varchar(64) not null,
taskStartDate datetime,
taskStatus varchar(64) not null,
taskTitle varchar(225) not null,
unique(taskId),
INDEX(taskTitle),
primary key(taskId)
)
SELECT tw... | true |
fa4c0721f7fb7ae21baba27dd6beb69b06c5d24f | SQL | twglhk/TSQL-Tutorial | /SQLQuery13.sql | UTF-8 | 394 | 3.203125 | 3 | [] | no_license |
USE BaseballData
CREATE TABLE GameTable(
testId INTEGER NOT NULL,
gold INTEGER NULL,
createDate DATETIME NOT NULL,
PRIMARY KEY(createDate)
)
ALTER TABLE GameTable
ADD Jem INTEGER
ALTER TABLE GameTable
ADD CONSTRAINT PK_testId PRIMARY KEY(testId)
ALTER TABLE GameTable
DROP COLUMN Jem
ALTER TABLE GameTable
DRO... | true |
767d35a6eed5103b080e0204309d143720d19688 | SQL | JudieT215/BamazonJT | /bamazonSQL.sql | UTF-8 | 880 | 3.40625 | 3 | [] | no_license | DROP DATABASE IF EXISTS bamazonJT_DB;
CREATE DATABASE bamazonJT_DB;
USE bamazonJT_DB;
CREATE TABLE bamazon_products(
item_id INT NOT NULL AUTO_INCREMENT,
product_name VARCHAR(100) NULL,
department_name VARCHAR(100) NULL,
price DECIMAL(10,2),
stock_quantity INT default 0,
PRIMARY KEY (item_id)
);
INSERT... | true |
f44900bff51a016ec94d7dff4fde056577aedffb | SQL | hussainulhassan/EventManagementApplication | /Database/rest_api_data.sql | UTF-8 | 2,420 | 3.046875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jun 17, 2021 at 08:32 PM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.2.26
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... | true |
5744973460e768ae2ed875a165333d834fe4f42b | SQL | jomedinas7/luciddb | /farrago/examples/miniplan/unitsql/miniplan.sql | UTF-8 | 2,347 | 3.515625 | 4 | [
"GPL-1.0-or-later",
"Apache-2.0",
"GPL-2.0-only"
] | permissive | -- $Id$
-- Test the miniplan tutorial
-- If you get difs in this test, please update
-- http://pub.eigenbase.org/wiki/HowToWriteAnOptimizer
-- as part of updating the .ref file. Thanks!
create schema miniplan;
set schema 'miniplan';
set path 'miniplan';
-- register UDX we'll use to populate test data
create function... | true |
2d58755537f4acd2d3ec8c8ae56933f4e159644c | SQL | google/nomulus | /core/src/test/resources/google/registry/reporting/icann/whois_counts_test_cloud_sql.sql | UTF-8 | 1,250 | 3.171875 | 3 | [
"Apache-2.0",
"LicenseRef-scancode-free-unknown"
] | permissive | #standardSQL
-- Copyright 2017 The Nomulus Authors. All Rights Reserved.
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0... | true |
b10d1e0e01d083fddc3ce9e7e6fd4bc9ceb6796d | SQL | rweald/docgraph-data-analysis | /state-level-graph-analysis/referrals-by-state.hive.sql | UTF-8 | 401 | 3.59375 | 4 | [
"MIT"
] | permissive | SELECT
doc1_state,
doc2_state,
SUM(number_patients) as patients
FROM (
SELECT
doc1,
doc2,
number_patients,
doc1_state.state as doc1_state,
doc2_state.state as doc2_state
FROM referrers
JOIN npi_to_state doc1_state ON doc1_state.npi_number = referrers.doc1
JOIN npi_to_state doc2_state O... | true |
5641121eb979acad7d48afb6672e64bd21951b99 | SQL | inuro/PokemonGO | /export_weakness_table.sql | UTF-8 | 1,181 | 3.078125 | 3 | [] | no_license | \a
\pset fieldsep '\t'
\pset tuples_only t
\o ~/weakness.tsv
select
A.pokemon_id, B.jp, A.uid, A.type_1, A.type_2,
calc_weakness('NORMAL',A.type_1,A.type_2) as Normal,
calc_weakness('FIGHTING',A.type_1,A.type_2) as Fighting,
calc_weakness('FLYING',A.type_1,A.type_2) as Flying,
calc_weakness('POISON',A.type_1,... | true |
f2756fc688ebc3d764baa9f0609a3f9f0dbb7d61 | SQL | zhangm-aj/DAMDEMO | /bim.sql | UTF-8 | 5,512 | 3.328125 | 3 | [] | no_license | /*
SQLyog Ultimate v12.08 (64 bit)
MySQL - 5.5.49 : Database - damdemo
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS... | true |
ff981a9662bfc99d34b077830095ee9ec157eb8b | SQL | thangcong1998/graduation_web | /database/seeds/script/mysql_m_functions.sql | UTF-8 | 8,340 | 2.640625 | 3 | [] | no_license | INSERT INTO m_functions(card_template_id,organization_id,sub_code,name,code,english_name, is_staff, is_volunteer) VALUES
("1","1","OCA","Chủ tịch","A01","President", 1, 1),
("1","1","OCA","Phó Chủ tịch","A02","Vice President", 1, 1),
("1","1","OCA","Tổng Thư ký","A03","Secretary-General", 1, 1),
("1","1","OCA","Chủ tịc... | true |
0dc19d4bac88d630f99f4a7e06fc2703013a1623 | SQL | RajivMuneshwer/SHOPIFY_PRO_PIC | /Pictures/SQL/UPDATETriggerProducts.sql | UTF-8 | 1,083 | 2.984375 | 3 | [] | no_license | CREATE TRIGGER up_shopify
AFTER UPDATE
ON
Products
FOR EACH ROW
UPDATE Shopify
SET
Variant_Barcode = NEW.CodeNumber,
Type = NEW.GroupName,
Tags = NEW.Tags,
Handle = (LOWER(REPLACE((SELECT DescriptiveText
FROM PLUS
WHERE CodeText = NEW.CodeNumber)," ","-"))),
Title = (SELECT DescriptiveText FROM PLUS WHERE CodeTex... | true |
8bbb4c56213115b784f577fb51c40b1d3dcdab64 | SQL | arudenko2002/sst_speed_layer_data | /bigquery/speedlayer_staging/metadata/project.sql | UTF-8 | 1,292 | 3.8125 | 4 | [] | no_license | #standardSQL
with project as (select
ANY_VALUE([cast(master_artist_id as string), master_artist]) as master_artist_array,
project_id,
project_title,
min(project_release_date) as project_release_date,
min(first_project_activity_week) as first_project_activity_week,
min(earliest_project_release_date) as earliest_project... | true |
03b044b25f536adf1841f82cf0950fb3ccb680ff | SQL | AnaVuc/psi-All-pain-No-gain | /baza.ddl | UTF-8 | 3,491 | 3.453125 | 3 | [
"MIT"
] | permissive |
CREATE TABLE Admin
(
Korisnicko_ime CHAR(18) NOT NULL,
Password CHAR(18) NULL
);
ALTER TABLE Admin
ADD CONSTRAINT XPKAdmin PRIMARY KEY (Korisnicko_ime);
CREATE TABLE Moderator
(
Korisnicko_ime_mod CHAR(18) NOT NULL,
Password CHAR(18) NULL
);
ALTER TABLE Moderator
ADD CONSTRAINT X... | true |
a8cb39443a7970af8ad7a12fb15e83daae0b1f6a | SQL | VB6Hobbyst7/VB-2 | /평택굿모닝병원_아미스/APEX96/Log/20201006.sql | UHC | 29,233 | 2.578125 | 3 | [] | no_license | [12:32:42 ]
[2010053230] SELECT R.RESULTDATE, R.RESULTNO, R.ACPTDATE, R.ACPTSEQ, R.REFVALFLAG, R.RESULTITEMCODE as resultitemcode, R.PATID, L.CHANNELNO FROM REGISTINFOS F, ResultofNum R, LabRsltItemBases L WHERE R.SpcmNo = '2010053230' AND R.SpcmNo = F.SpcmNo AND R.OrderCode = 'LG0042' AND L.ResultItemCode = R... | true |
302f0fee90dee827d811f47445718d4eb9548fec | SQL | AlexWoo176/QuanLyThuVien | /QuanLyThuVien.sql | UTF-8 | 9,384 | 3.046875 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 8.0.20, for Win64 (x86_64)
--
-- Host: 127.0.0.1 Database: qltv
-- ------------------------------------------------------
-- Server version 8.0.20
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!401... | true |
257797a9c96b4d4db1e74930f31918e4e39f182d | SQL | irshadkhan248/JavaPythonAndroidMysqlCode | /irshad dir/kamal/demo_mysql/L9/prac6.sql | UTF-8 | 478 | 3.046875 | 3 | [] | no_license | delimiter $$
use L9_db
drop procedure if exists p13 $$
create procedure p13()
begin
declare a int default 0;
declare b int default 0;
declare c int default 0;
declare c1 cursor for select marks from student;
open c1;
declare exit handler for 1329 begin end;
if m >=85 then set a=a+1
else if (m<85 and... | true |
ecb3c897616d934fe408e05e90171aaf8904d108 | SQL | jkwagneriii/employeeTracker | /db/seeds.sql | UTF-8 | 1,021 | 2.859375 | 3 | [] | no_license | USE employee_db;
-- DEPARTMENT
INSERT INTO department (departmentName) VALUES ("Production");
INSERT INTO department (departmentName) VALUES ("Research and Development");
INSERT INTO department (departmentName) VALUES ("Marketing");
INSERT INTO department (departmentName) VALUES ("Film and Technology");
-- ROLE
INSER... | true |
6b3cdd4fa1b30335e063408132270056ec76070c | SQL | Roy-05/itc-528 | /Saket Roy Assignment-7/Saket Roy ex_7_17_airline_coverage.sql | UTF-8 | 1,158 | 3.359375 | 3 | [] | no_license | create or replace procedure ex7_17_airline_coverage as
cursor flight_dest_cur is
select distinct dest_region
from flight;
cursor flight_details(dest in varchar2) is
select flight_no, name, dest_city
from flight
where dest_region = dest;
flight_dest varchar2(15);
begin
open flight_dest_cur... | true |
57367aee6267c76ab49063cdb4717a33dd41c8de | SQL | CDONhom14/BaoCaoNhom14 | /export_BH_1.sql | WINDOWS-1258 | 81,780 | 2.640625 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | --------------------------------------------------------
-- File created - Friday-May-04-2018
--------------------------------------------------------
--------------------------------------------------------
-- DDL for Type REPCAT$_OBJECT_NULL_VECTOR
--------------------------------------------------------
CREA... | true |
9f061c2e4b5e75eb70aad180742a3475785c2a0c | SQL | hakula139/IDBS-Spring20-Fudan | /assignments/ass1/submission/18307130252/8.sql | UTF-8 | 225 | 3.5 | 4 | [
"MIT"
] | permissive | select employee.id, name, X.num
from employee left outer join ((select employee_id as id, count(*) as num
from record
group by employee_id) as X )
on employee.id = X.id
where X.num > 1
order by X.num desc;
| true |
a03f7e5b8b8ea0f351ac2220ee9a3da58ea660aa | SQL | silence-do-good/stress-test-Postgres-and-MySQL | /dump/low/day24/select0733.sql | UTF-8 | 178 | 2.65625 | 3 | [] | no_license |
SELECT timeStamp, temperature FROM ThermometerOBSERVATION o
WHERE timestamp>'2017-11-23T07:33:00Z' AND timestamp<'2017-11-24T07:33:00Z' AND temperature>=43 AND temperature<=79
| true |
f45dac104f9b45215c7c4f12d5cd358f2504b205 | SQL | gnsaddy/RVCE | /SecondSemester/DBMS/companyDB1.sql | UTF-8 | 1,947 | 3.796875 | 4 | [] | no_license | # Tables creation
create database companyDB;
use companyDB;
create table Employee (ssn int primary key not null,
ename varchar(20) not null,
sex varchar(5) not null,
dob date not null,
salary int not null,
hire date not null,
superSSn int,
did int);
desc Employee;
create table Department (did int primary key not nul... | true |
fd7b30ed6fd3c54ec928806c0999e2585cdea340 | SQL | matus-cuper/fiit-dbs | /doc/queries/view.sql | UTF-8 | 935 | 4.28125 | 4 | [] | no_license | CREATE MATERIALIZED VIEW main_table_1 AS
SELECT s.student_id, s.name, s.surname, s.birth_at,
COALESCE(gss.avg, 5.00) AS gss_avg,
COALESCE(a.count, 0) AS a_count,
COALESCE(r.count, 0) AS r_count,
COALESCE(g.count, 0) AS g_count_all,
COALESCE(g.count_success, 0) AS g_count_success
FROM students s
LEFT JOIN
... | true |
ad00e1e9afb0ed86539cbfd3ed83adde11343232 | SQL | Theadre/Covoiturage | /covoiturage.sql | UTF-8 | 7,011 | 3.359375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Hôte : 127.0.0.1
-- Généré le : sam. 19 oct. 2019 à 19:45
-- Version du serveur : 5.7.18-log
-- Version de PHP : 7.3.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SE... | true |
791baa43f3d5adfcba9775ef712c023844aa3245 | SQL | v-syrytsia/SPD | /spd-java-boot-camp/hw-5/build/resources/main/db/migration/V4__Create_trips_passengers_table.sql | UTF-8 | 239 | 3.140625 | 3 | [] | no_license | create table trips_passengers
(
trip integer not null,
passenger varchar(50) not null,
primary key (trip, passenger),
foreign key (trip) references trips(id),
foreign key (passenger) references passengers (name)
); | true |
59029a7f31441f5eccc903952d5a43b962fce7a4 | SQL | spure02/HotelDatabaseManagement | /sql/create_indexes.sql | UTF-8 | 773 | 2.875 | 3 | [] | no_license | DROP INDEX IF EXISTS hotel_index;
DROP INDEX IF EXISTS staff_index;
DROP INDEX IF EXISTS room_index;
DROP INDEX IF EXISTS customer_index;
DROP INDEX IF EXISTS company_index;
DROP INDEX IF EXISTS booking_index;
DROP INDEX IF EXISTS repair_index;
DROP INDEX IF EXISTS request_index;
DROP INDEX IF EXISTS assigned_index;
C... | true |
1857c3fff400d159040691de3f18dbd8fcb02e01 | SQL | silence-do-good/stress-test-Postgres-and-MySQL | /dump/high/day08/select1216.sql | UTF-8 | 266 | 2.96875 | 3 | [] | no_license |
SELECT sen.name
FROM SENSOR sen, SENSOR_TYPE st, COVERAGE_INFRASTRUCTURE ci
WHERE sen.SENSOR_TYPE_ID=st.id AND st.name='WiFiAP' AND sen.id=ci.SENSOR_ID AND ci.INFRASTRUCTURE_ID=ANY(array['2221','2039','6024','4032','4231','5051','3074','2100_9','3232','2100_6'])
| true |
aba1307547eb83bba634d9ad78a926a45aea244a | SQL | AbertoRey/ProyectoFinal | /db/project.sql | UTF-8 | 6,377 | 3.046875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 04-11-2020 a las 12:45:22
-- Versión del servidor: 10.4.14-MariaDB
-- Versión de PHP: 7.4.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
e597aa472a19639112ba6be95bf14f9972d0a5b1 | SQL | wangchongjie/olap-access | /src/test/resources/database/xxx_olap_create.sql | UTF-8 | 1,771 | 3.34375 | 3 | [
"Apache-2.0"
] | permissive | SET names utf8;
create database olap;
USE olap;
DROP TABLE IF EXISTS DailyGroupStats;
CREATE TABLE `DailyGroupStats` (
`Date` date NOT NULL COMMENT '日期',
`UserId` int(10) NOT NULL COMMENT '用户id',
`PlanId` int(10) NOT NULL COMMENT '计划id',
`GroupId` int(10) NOT NULL COMMENT '推广组id',
`Search` bigint(20) NOT NU... | true |
471429a9714ccfd005763a432733a0d32ea53809 | SQL | JSouza27/trybe-projects | /Back-end development/project-22-mysql-vocabulary-booster/desafio4.sql | UTF-8 | 455 | 3.765625 | 4 | [] | no_license | SELECT j.JOB_TITLE Cargo, ROUND(AVG(e.SALARY), 2) `Média salarial`,
CASE
WHEN ROUND(AVG(e.SALARY), 2) BETWEEN 2000 AND 5800 THEN "Júnior"
WHEN ROUND(AVG(e.SALARY), 2) BETWEEN 5801 AND 7500 THEN "Pleno"
WHEN ROUND(AVG(e.SALARY), 2) BETWEEN 7501 AND 10500 THEN "Sênior"
WHEN ROUND(AVG(e.SALARY), 2) > 1050 THEN 'CEO'
END ... | true |
0154d2648a2d3a391bd89d0c043a4fa1b92cb3d8 | SQL | fraanek/spilo | /postgres-appliance/tests/schema.sql | UTF-8 | 508 | 3.078125 | 3 | [
"Apache-2.0"
] | permissive | CREATE DATABASE test_db;
\c test_db
CREATE EXTENSION timescaledb;
CREATE TABLE "fOo" (id bigint NOT NULL PRIMARY KEY);
SELECT create_hypertable('"fOo"', 'id', chunk_time_interval => 100000);
INSERT INTO "fOo" SELECT * FROM generate_series(1, 3000000);
ALTER TABLE "fOo" ALTER COLUMN id SET STATISTICS 500;
CREATE UNLO... | true |
2d6c954361d3b71f0b22f8fc3ff981dc9c7f6119 | SQL | mrizkifadil26/sppkp | /archive/harga.sql | UTF-8 | 3,840 | 3.328125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.6.6
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Oct 02, 2018 at 06:43 AM
-- Server version: 5.7.17-log
-- PHP Version: 5.6.30
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIEN... | true |
1772e9a9e0a810d46f8f143d78bf0dc25ef48253 | SQL | anamariadem/UBB-Assignments | /Semester3/Data Bases/Lab1/Atp-DB-Lab1.sql | UTF-8 | 1,488 | 3.640625 | 4 | [] | no_license | --DROP TABLE Player
CREATE TABLE Player
(PlayerId INT PRIMARY KEY,
FirstName VARCHAR(50),
LastName VARCHAR(50),
DateOfBirth DATE,
RankId INT REFERENCES Ranking(RankId)
)
CREATE TABLE Tournament
(TournamentId INT PRIMARY KEY,
TournamentName VARCHAR(50),
StartDate DATE)
CREATE TABLE Coach
( CoachId I... | true |
07899930cfde8b8bdbc327a193a1b8eb5914d465 | SQL | Tanyc/syscoin | /sql/invite/invite.sql | UTF-8 | 2,129 | 2.9375 | 3 | [] | no_license | DROP TABLE IF EXISTS `bi_invite`;
CREATE TABLE `bi_invite` (
`id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
`UID` int(8) NOT NULL UNIQUE,
`BUIDS` varchar(160),
`b_num` int(2) NOT NULL DEFAULT 0,
`score` int(5) NOT NULL DEFAULT 0,
`p_score` int(5) NOT NULL DEFAULT 0,
`p_money` int(3) NOT NULL DEFAULT 0,
`last_score`... | true |
130317bc9b01b13ab352e041ceb4b8aa14555262 | SQL | ichirin2501/i5q | /sql/alter-log.sql | UTF-8 | 656 | 3.53125 | 4 | [] | no_license | ALTER TABLE footprints ADD UNIQUE `uniq_user_id_owner_id` (`user_id`, `owner_id`);
ALTER TABLE relations ADD INDEX `idx_one_created_at` (`one`, `created_at`);
ALTER TABLE entries ADD INDEX `idx_user_id_private_created_at` (`user_id`, `private`, `created_at`);
ALTER TABLE comments ADD COLUMN `owner_id` int(11) NOT NU... | true |
82e76ef5e01a4f314c147d64eb447e8b928ef81b | SQL | Nurjaman/tes | /uts_interoperability/b_ummi_zakiyah/database.sql | UTF-8 | 3,667 | 2.703125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 3.5.2.2
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Dec 08, 2017 at 07:00 PM
-- 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 |
7a641941c4b9bafb4a02fb926be08d718e74ccf1 | SQL | keesdoornenbal/ArtPlace | /artplace/schema.sql | UTF-8 | 1,772 | 3.875 | 4 | [] | no_license | DROP TABLE IF EXISTS user;
DROP TABLE IF EXISTS post;
DROP TABLE IF EXISTS artpiece;
DROP TABLE IF EXISTS wallet;
DROP TABLE IF EXISTS contract;
CREATE TABLE user (
id INTEGER PRIMARY KEY AUTOINCREMENT,
username TEXT UNIQUE NOT NULL,
password TEXT NOT NULL
);
CREATE TABLE wallet (
id INTEGER PRIMARY KEY AUTOI... | true |
6cfbc2d42907aef1644c767a7dca998a8f51e0a8 | SQL | radtek/abs3 | /sql/mmfo/barstrans/Table/out_dest_adr.sql | WINDOWS-1251 | 2,455 | 3.375 | 3 | [] | no_license |
PROMPT =====================================================================================
PROMPT *** Run *** ========== Scripts /Sql/BARSTRANS/Table/OUT_DEST_ADR.sql =========*** Run
PROMPT =====================================================================================
PROMPT *** Create table OUT... | true |
a4eb3bfffc10b80ba1d9b0d02338a24353ca6cbe | SQL | varusblack/recomendador-peliculas-joomla | /com_peliculas/admin/install.sql | UTF-8 | 1,985 | 3.15625 | 3 | [] | no_license | CREATE TABLE IF NOT EXISTS `#__actorespelicula` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`idFamoso` int(11) NOT NULL,
`idPelicula` int(11) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `famosoPelicula` (`idFamoso`,`idPelicula`),
KEY `idFamoso` (`idFamoso`),
KEY `idPelicula` (`idPelicula`)
) ENGINE=InnoD... | true |
35945c902719e167e2deb925cdc134bd270ccf67 | SQL | opengauss-mirror/openGauss-server | /src/test/regress/sql/hw_partition_interval_parallel_prepare.sql | UTF-8 | 465 | 3.421875 | 3 | [
"LicenseRef-scancode-mulanpsl-2.0-en",
"LicenseRef-scancode-unknown-license-reference",
"PostgreSQL",
"BSD-3-Clause",
"LGPL-2.0-or-later",
"LicenseRef-scancode-unicode",
"LicenseRef-scancode-warranty-disclaimer",
"curl",
"GPL-1.0-or-later",
"LGPL-2.1-or-later",
"LGPL-2.1-only",
"CC-BY-4.0",
... | permissive | -- prepare the parrallel modifed table;
DROP TABLE IF EXISTS partition_interval_parallel;
create table partition_interval_parallel
(
c1 int,
c2 int,
c3 date not null
)
partition by range (c3)
INTERVAL ('1 month')
(
PARTITION partition_interval_parallel_p1 VALUES LESS THAN ('2020-05-01'),
PARTITION partition_inter... | true |
beba35c69da6e67833f45b96ae9beefc0b3c2f79 | SQL | kgjoni/CreateDBApp | /CreateDBApp/CreateDBApp/bin/Debug/BikeHike.sql | UTF-8 | 930 | 3.390625 | 3 | [] | no_license | CREATE TABLE Customer (
CID INT IDENTITY(1, 1) PRIMARY KEY,
FirstName NVARCHAR(64) NOT NULL,
LastName NVARCHAR(64) NOT NULL,
Email NVARCHAR(128) NOT NULL
);
CREATE TABLE Byke_Type (
BTID INT IDENTITY(1, 1) PRIMARY KEY,
Description NVARCHAR(128) NOT NULL,
PricePerHour FLOAT NOT NULL
);
CREATE TABLE Bike ... | true |
d70669e4ca4430de7f07a9fe910681654c61f879 | SQL | ssythe/RobloxLabsTemp | /SQL/RobloxAnalytics/Tables/Foreign/ServiceContext.sql | UTF-8 | 308 | 2.609375 | 3 | [
"Apache-2.0"
] | permissive | CREATE DATABASE IF NOT EXISTS `RobloxAnalytics`;
CREATE TABLE IF NOT EXISTS `RobloxAnalytics`.`ServiceContexts` (
`ID` INT NOT NULL AUTO_INCREMENT,
`Created` DATETIME NOT NULL,
`Updated` DATETIME NOT NULL,
`Name` TEXT NOT NULL,
PRIMARY KEY (`ID`),
UNIQUE KEY `ID_UNIQUE` (`ID`)
) ENGINE=InnoDB;
| true |
48696a3c5327a1b418b882b3095c01a0050c5040 | SQL | silence-do-good/stress-test-Postgres-and-MySQL | /dump/high/day16/select0015.sql | UTF-8 | 178 | 2.65625 | 3 | [] | no_license |
SELECT timeStamp, temperature FROM ThermometerOBSERVATION o
WHERE timestamp>'2017-11-15T00:15:00Z' AND timestamp<'2017-11-16T00:15:00Z' AND temperature>=46 AND temperature<=60
| true |
da43198c3c68a8a77153af46f614a6cf5198aa33 | SQL | drylandmicrobes/meta_BSC_FICUS | /lib/schema.sql | UTF-8 | 872 | 2.9375 | 3 | [] | no_license | CREATE TABLE gene_phylo (
source_sample VARCHAR(32) NOT NULL,
gene_id VARCHAR(32) PRIMARY KEY NOT NULL,
percent_id varchar(8) NULL,
tax_kingdom VARCHAR(32) NOT NULL,
tax_phylum VARCHAR(32) NOT NULL,
tax_class VARCHAR(32) NOT NULL,
tax_order VARCHAR(64) NOT NULL,
tax_family VARCHAR(64) NOT NULL,
tax_genu... | true |
2f072326338ff0936a0208c38ea4516eeaeea253 | SQL | ashaban/rakisis | /pembejeo.sql | UTF-8 | 10,707 | 3.03125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.0.10deb1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Mar 24, 2018 at 09:30 AM
-- Server version: 5.5.59-0ubuntu0.14.04.1
-- PHP Version: 5.5.9-1ubuntu4.22
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_C... | true |
69d5fed10815e97fe9aab9d8e43d87485d00aec6 | SQL | leyufore/graduateDesign_electronic_cash | /电子现金系统实现/数据库/Dump20160626.sql | UTF-8 | 3,605 | 2.859375 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 5.7.9, for osx10.9 (x86_64)
--
-- Host: localhost Database: ecash
-- ------------------------------------------------------
-- Server version 5.7.12
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!4... | true |
032b5f3c60061e43b2a4d78a13ddefc9a0fe2b05 | SQL | i3652/PHP_exercise | /mywebsite.sql | UTF-8 | 2,368 | 3.25 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Hôte : 127.0.0.1
-- Généré le : mar. 19 mai 2020 à 15:10
-- Version du serveur : 10.4.11-MariaDB
-- Version de PHP : 7.4.4
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET... | true |
cec1895bab64d40563ad07cace6c4e223de7de50 | SQL | edrinb/db_scripts | /spm2.sql | UTF-8 | 1,410 | 2.984375 | 3 | [] | no_license | DECLARE
l_sql_tune_task_id VARCHAR2(100);
BEGIN
l_sql_tune_task_id := DBMS_SQLTUNE.create_tuning_task (
begin_snap => 24767,
end_snap => 24976,
sql_id => '2q94zb7djr2xn',
scope => DBMS_SQLTUNE.sco... | true |
4d43a83d929dbc2db510b0322be65c2a5356e93a | SQL | 1Basile/DevOps_online_Kiev_2021_Q2 | /m1/task3.1/data_base_backup.sql | UTF-8 | 5,151 | 3.125 | 3 | [] | no_license | -- MySQL dump 10.18 Distrib 10.3.27-MariaDB, for debian-linux-gnu (i686)
--
-- Host: localhost Database: book_list
-- ------------------------------------------------------
-- Server version 10.3.27-MariaDB-0+deb10u1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_... | true |
78b14ee0ea5457e579cf676b940b69a9e4b92d70 | SQL | MzxVegle/Struts2HomeWork | /database/mydatabase.sql | UTF-8 | 8,696 | 3.0625 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : MyConnection
Source Server Version : 50720
Source Host : 127.0.0.1:3306
Source Database : mydatabase
Target Server Type : MYSQL
Target Server Version : 50720
File Encoding : 65001
Date: 2018-06-07 20:00:05
*/
SET FOREIGN_KEY_CHECKS=0;... | true |
d18c6582d6643fc1ca70e34fe16e318a2432e9e3 | SQL | yboren/virtlab | /guestbook/createTable.sql | UTF-8 | 597 | 2.921875 | 3 | [] | no_license | create database guestbook;
CREATE TABLE `messages` (
`id` int(11) NOT NULL auto_increment,
`parent` int(11) default '0',
`thread` int(11) default '0',
`name` tinytext,
`email` tinytext,
`subject` tinytext,
`time` int(11) NOT NULL default '0',
`ip` varchar(15) default NULL,
`topic_emoticon` int(11) NO... | true |
3a035a2fdf97c88d1143b0244d1582867c8b51e9 | SQL | Baneeishaque/QR_Smart_Shopping_Solution_Server | /android/smartappqrcode.sql | UTF-8 | 9,094 | 3.046875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Mar 29, 2017 at 08:11 AM
-- Server version: 10.1.19-MariaDB
-- PHP Version: 7.0.13
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CL... | true |
a1484da934591aa30eb22d34cfe25959e49efaf1 | SQL | astralm/astralbotBack | /src/mysql/functions/updateIntent.sql | UTF-8 | 5,496 | 3.625 | 4 | [] | no_license | BEGIN
DECLARE validOperation TINYINT(1) DEFAULT validStandartOperation(userHash, socketHash);
DECLARE userID, organizationID, socketID, conditionsLength, conditionsIterator, entitiesIterator, entitiesLength, lastGroupID, conditionsCount, botID, oldGroupID INT(11);
DECLARE connectionID VARCHAR(128);
DECLARE... | true |
fc1c13d1869ae0b88857f667eb2b609ad1c0bfc0 | SQL | rahulyhg/OpenDCIM_GSPE | /create.sql | UTF-8 | 36,566 | 3.484375 | 3 | [] | no_license | --
-- Table structure for table fac_Cabinet
--
DROP TABLE IF EXISTS fac_Cabinet;
CREATE TABLE fac_Cabinet (
CabinetID int(11) NOT NULL AUTO_INCREMENT,
DataCenterID int(11) NOT NULL,
Location varchar(20) NOT NULL,
LocationSortable varchar(20) NOT NULL,
AssignedTo int(11) NOT NULL,
ZoneID int(11) NOT NULL,
... | true |
34a33d19b6596e5eb0efab526ac0b1b88e55b3b1 | SQL | MarcinCzekaj00/Spring-Social-REST-API | /src/main/resources/schema.sql | UTF-8 | 824 | 3.6875 | 4 | [] | no_license | DROP TABLE IF EXISTS authorities;
DROP TABLE IF EXISTS users;
CREATE TABLE users (
username VARCHAR(45) NOT NULL,
password VARCHAR(70) NOT NULL,
enabled TINYINT NOT NULL DEFAULT 1,
PRIMARY KEY (username));
CREATE TABLE authoriti... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.