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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
4b646550aab52b4def14276a2e8730d5cb1f6de6 | SQL | riskihendrawan61/FRAMEWORK_B_1515015061_060397 | /laravel5/praktikumlaravel5.sql | UTF-8 | 12,033 | 3.015625 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: 06 Apr 2017 pada 08.18
-- Versi Server: 10.1.16-MariaDB
-- PHP Version: 7.0.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT ... | true |
15a2bc80c7ecda46a2d286e9e1428d83a39e6019 | SQL | CUBRID/cubrid-testcases | /sql/_23_apricot_qa/_01_sql_extension3/_04_mutitable_update_delete/_01_multi_table_update/_03_adhoc/cases/_03_adhoc_delete_update_1.sql | UTF-8 | 10,078 | 3.71875 | 4 | [
"BSD-3-Clause"
] | permissive | -- This testcase use modified Oracle samples. See below for the license:
-- Copyright (c) 2015 Oracle
-- Permission is hereby granted, free of charge, to any person obtaining a copy
-- of this software and associated documentation files (the "Software"), to deal
-- in the Software without restriction, including witho... | true |
c4a114fedb99f10001f96f44c5b48d9ed687ab03 | SQL | DrUzair/HarVis | /VisQueries/VideoLifeSpanQuery.sql | UTF-8 | 240 | 3.125 | 3 | [] | no_license | SELECT Date_format(min(CreatedOn), '%d-%m-%Y') AS Since,
DATEDIFF(max(CreatedOn),min(CreatedOn)) AS LifeTime,
count(*) CommentCount,
VideoID, VideoTitle, VideoAuthor
FROM utubevideocomments
GROUP By VideoID
ORDER BY CommentCount DESC | true |
847ac2fae573c21f38fe099afee7a952e1ca0f0c | SQL | jackob101/bugTracker | /src/test/resources/createData.sql | UTF-8 | 6,913 | 2.5625 | 3 | [] | no_license | INSERT INTO User(id, age, email, lastname, name, emailVerified, nickname, sub) VALUES(1,24,'email1@gmail.com', 'Last name 1', 'Name 1', 0, 'Nickname 1', 'auth0|1111');
INSERT INTO User(id, age, email, lastname, name, emailVerified, nickname, sub) VALUES(2,24,'email2@gmail.com', 'Last name 2', 'Name 2', 0, 'Nickname 2',... | true |
9542303a7b555d50f055354e746bc3867b013c08 | SQL | bellmit/webdemo | /dbscript/mysql/01basisscript/operator/tables/oper_social_account.sql | UTF-8 | 758 | 3.15625 | 3 | [] | no_license | /*****************************************************************************
-- OPER_SOCIAL_ACCOUNT :
*****************************************************************************/
drop table if exists OPER_SOCIAL_ACCOUNT;
create table OPER_SOCIAL_ACCOUNT(
id varchar(64) not null,
operatorId varchar(64) not ... | true |
338531405a2fb313cb1e2d6086b7e4684685b7f7 | SQL | JulieAnn2330/employee-tracker | /db/schemas.sql | UTF-8 | 1,498 | 4.25 | 4 | [
"MIT"
] | permissive | /*View Employees by Manager*/
select * from employee where manager_id = 1;
select * from employee where manager_id = 2;
/*View all Employees by Manager*/
SELECT
employee.first_name,
employee.last_name,
employee.manager_id,
employee.manager_name
from employee;
/*View Departments, Roles, Employees Individually*/
selec... | true |
fd922596f9f00999a5ee7c21ff68c889f3792d60 | SQL | wladko0/sql-scripts-macola-wisys-epicor | /ItemNoLengthScript.sql | UTF-8 | 364 | 3.203125 | 3 | [] | no_license | USE [001]
SELECT RTRIM(imitmidx_sql.item_no), iminvloc_sql.loc, iminvloc_sql.prod_cat, qty_on_hand, qty_allocated, qty_on_ord, usage_ytd, prior_year_usage, imitmidx_sql.item_desc_1, imitmidx_sql.item_desc_2
FROM iminvloc_sql INNER JOIN imitmidx_sql on iminvloc_sql.item_no = imitmidx_sql.item_no
WHERE len(rtrim(imitm... | true |
da2a2d1099b4e27d6032662c2e44c9e7efd4b4a0 | SQL | yalagin/todo | /mytodo.sql | UTF-8 | 3,612 | 3.09375 | 3 | [] | no_license | -- --------------------------------------------------------
-- Host: localhost
-- Server version: 10.2.6-MariaDB-log - mariadb.org binary distribution
-- Server OS: Win64
-- HeidiSQL Version: 9.4.0.5125
-- ----------------------------------------... | true |
cabbdeba2a19e1600709e54bfeb286534719d8ab | SQL | kimjaneclark/codeclan_working_2019 | /week_03/day_1/lightabers.sql | UTF-8 | 745 | 3.5 | 4 | [] | no_license | DROP TABLE lightsabers;
DROP TABLE characters;
CREATE TABLE characters (
id SERIAL8 PRIMARY KEY,
name VARCHAR(255),
darkside BOOLEAN,
age INT
);
CREATE TABLE lightsabers (
id SERIAL8 PRIMARY KEY,
hilt_metal VARCHAR(255) NOT NULL,
colour VARCHAR(255) NOT NULL,
character_id INT8 REFERENCES characters(i... | true |
2c82122fb45eb97883b867b405ccbc5f94245a2d | SQL | cankush625/Database | /SQL/aggregate_functions.sql | UTF-8 | 3,217 | 4.65625 | 5 | [
"MIT"
] | permissive | use books_db; /*Using the database which is already created*/
select database();
/*count*/
/*Using count to count number of records*/
select count(*) as 'Number of books' from books;
select count(author_fname) as 'Number of Authors' from books;
/*Using count with distinct*/
select count(distinct(author_fname)) as 'Nu... | true |
00f6672daa3108d55a0c233fa3764888a837943d | SQL | PierreLefeuvre/forum | /forum.sql | UTF-8 | 2,419 | 3.40625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.6.4
-- https://www.phpmyadmin.net/
--
-- Client : 127.0.0.1
-- Généré le : Mer 28 Mars 2018 à 11:07
-- Version du serveur : 5.7.14
-- Version de PHP : 5.6.25
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SE... | true |
817cb2342c37f6530f903abcd2b133c9b0a86628 | SQL | diunuge/TodoMore | /sql/hints.sql | UTF-8 | 899 | 3.125 | 3 | [
"BSD-2-Clause"
] | permissive | -- Install the hints. WARNING this deletes previous ones to avoid conflicts,
-- so if you've modified the hints, be sure to save your changes first!
delete from hint;
COPY hint(id, hint, author) FROM stdin;
1 If a task seems formidable, break it down into smaller ones.
2 Be honest with yourself; if you're really nev... | true |
15ac2ca4ceee6314f8c477f9b41375699450f627 | SQL | jobsonrp/ProjetoInfraRU | /banco/bancoru.sql | UTF-8 | 2,002 | 3.46875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.2.7.1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: 21-Ago-2017 às 02:12
-- Versão do servidor: 5.5.39
-- PHP Version: 5.4.31
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
--
-- Database: `dbru`
--
CREATE DATABASE IF NOT EXISTS `dbru` DE... | true |
c2aeda31007baeb6b753f7ee59233f1f72c11ef8 | SQL | zongzhiliu/trial_matching | /scripts/viecure/ct_LCA/match_stage.sql | UTF-8 | 784 | 3.640625 | 4 | [] | no_license | /*** match attribute for cancer stage
Requires: cohort, crit_attribute_used, trial_attribute_used
stage
Results: _p_a_t_stage
*/
drop table if exists _p_a_t_stage cascade;
create table _p_a_t_stage as;
with cau as (
select attribute_id, code_type, code
, attribute_value--, attribute_value_norm
from crit... | true |
a1936a9156769296982087eac3b68e325a40c6cb | SQL | Nakzz/Online-Portfolio-Ajmain-Naqib | /build/includes/database/setup.sql | UTF-8 | 2,796 | 3.546875 | 4 | [] | no_license | -- -----------------------------------------------------
-- MySQL Database setup.
-- Author: Ajmain Naqib
-- Data: 6/2/18
-- -----------------------------------------------------
-- -----------------------------------------------------
-- Creates Database called Resume
-- ---------------------------------------------... | true |
0819e3962d8d2f1b2e302ca995077fbf037a41e9 | SQL | qgadrian/elovendo | /src/sql/populate-database.sql | UTF-8 | 2,850 | 2.796875 | 3 | [] | no_license | ---------------------------------------------------
-- Sentencias de creación de tablas y secuencias --
---------------------------------------------------
-- ROLES
INSERT INTO role VALUES (1, 'ROLE_USER');
INSERT INTO role VALUES (2, 'ROLE_ADMIN');
-- USER
-- avatar uservalue, points, registerDate, roleid, you're w... | true |
511e5d19f4b21a5f49f0f16dab911d77982a8a2e | SQL | Acsilvei/DFNB_as | /views/dbo.v_balance_on_dec31.sql | UTF-8 | 902 | 3.140625 | 3 | [] | no_license | /*****************************************************************************************************************
NAME: dbo.v_balance_on_dec31
PURPOSE: Create the dbo.v_balance_on_dec31 view
MODIFICATION LOG:
Ver Date Author Description
----- ---------- ---------------- --------... | true |
a54ed54650985a12d8d3ef3025482d2cb087f4de | SQL | NASOKILA/04.Databases-Basics-MSSQL-Server | /08.Build In Functions/WildCards.sql | UTF-8 | 173 | 2.875 | 3 | [] | no_license |
SELECT
EmployeeID,
FirstName,
LastName
FROM Employees
WHERE FirstName LIKE('%to')
SELECT
EmployeeID,
FirstName,
LastName
FROM Employees
WHERE FirstName LIKE('Te[tn]%')
| true |
0a2abf65bbaa4c568240c9a1531fecb89a42ef17 | SQL | manwillaaron/client-keep | /db/init.sql | UTF-8 | 787 | 3.484375 | 3 | [] | no_license | drop table expenses;
drop table account_junc;
drop table expense_account;
drop table users;
create table users (
id serial PRIMARY key,
email text,
hash text
);
create table expense_account(
account_id serial primary key,
monthly_budget int,
monthly_income int
);
create table account_junc (
... | true |
b1d5458adb607f22022a631a4caac73073e1a2ed | SQL | opengauss-mirror/openGauss-server | /contrib/file_fdw/file_fdw--1.0.sql | UTF-8 | 509 | 2.578125 | 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 | /* contrib/file_fdw/file_fdw--1.0.sql */
-- complain if script is sourced in psql, rather than via CREATE EXTENSION
\echo Use "CREATE EXTENSION file_fdw" to load this file. \quit
CREATE FUNCTION pg_catalog.file_fdw_handler()
RETURNS fdw_handler
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT NOT FENCED;
CREATE FUNCTION file... | true |
a5fcbdb7da5127d33d135e2e981308f7784de880 | SQL | Wils-Kris5/database-exercises | /adlister.sql | UTF-8 | 746 | 3.5 | 4 | [] | no_license | CREATE DATABASE if not exists adlister_db;
CREATE TABLE IF NOT EXISTS users (
id INT UNSIGNED NOT NULL AUTO_INCREMENT,
email VARCHAR(60),
password VARCHAR(50),
PRIMARY KEY(id)
);
CREATE TABLE IF NOT EXISTS ads (
id INT UNSIGNED NOT NULL,
title VARCHAR(60),
description VARCHAR(1... | true |
19e1e014577ceac90100923662b6f73e8a59e370 | SQL | guopanboo/database | /mysql/view/view_powerstation_month_energy.sql | UTF-8 | 1,079 | 3.546875 | 4 | [] | no_license | CREATE or replace VIEW view_powerstation_month_energy(pid, year, m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, m11, m12, total) AS
select
POWERSTATION_ID as pid,
FLG_YEAR as year,
sum(if(FLG_MONTH='1', MONTH_ENERGY, 0)) as M1,
sum(if(FLG_MONTH='2', MONTH_ENERGY, 0)) as M2,
sum(if(FLG_MONTH='3', MONTH_ENERGY, ... | true |
a4b7a66a60fe0398a31ca26db7de9ab7ffccde79 | SQL | Setorator/TDDD37 | /lab4/c/Question10MakeBooking.sql | UTF-8 | 2,150 | 3.21875 | 3 | [] | no_license | /******************************************************************************************
Question 10, concurrency
This is the second of two scripts that tests that the BryanAir database can handle concurrency.
This script sets up a valid reservation and tries to pay for it in such a way that at most
one suc... | true |
5260b6cd806590d464e7e9ddf30a2cc01277a6e3 | SQL | Apostle8888/test_task_3 | /src/main/java/Service/TablesDocPatRec.sql | UTF-8 | 2,064 | 4.09375 | 4 | [] | no_license |
CREATE TABLE IF NOT EXISTS DOCTORS
(
ID BIGINT NOT NULL,
FIRSTNAME VARCHAR(255) NOT NULL,
SECONDNAME VARCHAR(255) NOT NULL,
LASTNAME VARCHAR(255) NOT NULL,
SPECIALIZATION VARCHAR(255) NOT NULL,
CONSTRAINT DOCTORS_PKEY PRIMARY KEY (ID)
)
CREATE TABLE IF NOT EXISTS PATIENTS
(
ID BIGINT NOT NULL,
FIRSTNAME VARCH... | true |
e2f60334bcf5f47b2b2c4e28afb08c7549ce10e3 | SQL | pedestrianlove/php | /guestbook/sql_command/guestbook2.sql | UTF-8 | 9,049 | 3.140625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 2.10.3
-- http://www.phpmyadmin.net
--
-- 主機: localhost
-- 建立日期: Jun 08, 2011, 01:31 PM
-- 伺服器版本: 6.0.4
-- PHP 版本: 6.0.0-dev
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
--
-- 資料庫: `guestbook2`
--
-- CREATE DATABASE `guestbook` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
-- USE `... | true |
d3599102fc1567e0e6413a2f849e0c59b2687827 | SQL | Somesh1997/PJP_JAVA_TRAINING | /Restricting and sorting data/restrict4.sql | UTF-8 | 117 | 2.6875 | 3 | [] | no_license | select last_name,job_id,hire_date
from employees
where last_name ='Matos' or last_name='Taylor'
order by hire_date; | true |
21b8a5f755865a7074856495413271cdbe30ca64 | SQL | FreddieAbad/Ingenieria_de_Sistemas_Materias | /Bases de Datos 1 - Relacionales/Proyecto Interciclo/EntregaBD/ProcedimientosAlmacenados.sql | WINDOWS-1250 | 9,711 | 3.46875 | 3 | [] | no_license | set serveroutput on size 30000;
CREATE OR REPLACE PROCEDURE conteoEncuesta(id IN number,nombre in varchar2, descripcion in varchar2, idtipoencuesta in number)
is
total NUMBER;
l_mensaje VARCHAR2(100) := 'Incorrecto!';
begin
total :=0;
select count(*) into total from encuesta where IDENCUESTA = id;
if total... | true |
e8ae6b59efa8b923bd327ca03bd476a716c6a988 | SQL | danton2000/Projeto_Celular_PHP | /Projeto_Celular/banco/bdcelular.sql | UTF-8 | 5,987 | 3.234375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Tempo de geração: 16-Abr-2020 às 16:57
-- Versão do servidor: 10.4.8-MariaDB
-- versão do PHP: 7.2.24
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @... | true |
d086f8f75878a8c4b4d57e1b732c86973ec39616 | SQL | Geeta-hub/SQL_Repo | /QueryProject.sql | MacCentralEurope | 23,467 | 3.375 | 3 | [] | no_license | USE Student
CREATE TABLE studies(
PNAME varchar(50),
INSTITUTE varchar(50),
COURSE varchar(10),
COURSEFEE money)
INSERT INTO studies VALUES
('ANAND','SABHARI','PGDCA',4500),
('ALTAF','COIT','DCA',7200),
('JULIANA','BDPS','MCA',22000),
('KAMALA','PRAGATHI','DCA',5000),
('MARY','SABHARI','PGDCA',4500),
('NELSON','PRAG... | true |
ebc91e6085dc4a79bca51720bd39cc7160dc9b48 | SQL | 1725114746/HellowWorldSystem | /drivercard/sql/ts_role.sql | UTF-8 | 338 | 2.578125 | 3 | [] | no_license | SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for zk_user
-- ----------------------------
DROP TABLE IF EXISTS `ts_role`;
CREATE TABLE `ts_role` (
`role_id` int(11) NOT NULL auto_increment,
`name` varchar(255) NOT NULL ,
PRIMARY KEY (`role_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ... | true |
5b26753d15683d273463d230a7f2af63c574ca60 | SQL | nakicam/70-761-Udemy | /Stored Procedure Example.sql | UTF-8 | 667 | 3.609375 | 4 | [] | no_license |
-- A simple stored procedure
-- This is a query that we run often
select p.LastName + ', ' + p.FirstName Name, pp.PhoneNumber
from person.person p
join
person.PersonPhone pp
on
p.BusinessEntityID=pp.BusinessEntityID
order by Lastname, Firstname
-- Let's create a stored procedure that will
-- return t... | true |
8828d1c1f5e6e4e1a10483ec67545964bd63f9e4 | SQL | FrankXuxe/SQL | /SQL - DDL - Assignment.sql | UTF-8 | 3,329 | 4.34375 | 4 | [] | no_license | -- 1) Create each of the four tables from this Data Dictionary. Download Data Dictionary.Build it according to the exact specifications listed in the spreadsheet. (10 points for each table, 40 pts total). Insert the following record in the Patient table to make sure it was set up correctly:
CREATE TABLE Patient
(pat... | true |
5c3f0e13af27a5231d97aedd6df2eb340dd8bb97 | SQL | Adrian-Guadalupe/node-db3-guided | /queries.sql | UTF-8 | 228 | 3.515625 | 4 | [
"LicenseRef-scancode-warranty-disclaimer"
] | no_license | select c.CategoryName as Category, p.ProductName, p.Price, s.SupplierName as SuppliedBy
from Products as p
inner join Categories as c
on p.CategoryID = c.CategoryID
inner join Suppliers as s
on p.SupplierID = s.SupplierID | true |
ad4930ff5d818c1830ec3ba4c701412981b7b14c | SQL | ReneNyffenegger/about-sqlite | /tables/constraints/primary-key/autoincrement/vs-rowid.sql | UTF-8 | 529 | 3.21875 | 3 | [] | no_license | create table T (p integer primary key , d);
create table U (p integer primary key autoincrement, d);
insert into T (d) values ('first');
insert into U (d) values ('first');
insert into T (d) values ('second');
insert into U (d) values ('second');
delete from T where d = 'second';
delete from U where d =... | true |
bd954b0d0893d87aa2efaf976b383bd37fea5d7d | SQL | hhwang4/RentIt | /sql/example-schema.sql | UTF-8 | 544 | 2.671875 | 3 | [] | no_license | CREATE TABLE Persons (
PersonID int,
LastName varchar(255),
FirstName varchar(255),
Address varchar(255),
City varchar(255)
);
INSERT INTO Persons(`PersonID`, `LastName`, `FirstName`, `Address`, `City`)
values (1, "Wayne", "Bruce", "Wayne Manor", "Gotham");
INSERT INTO Persons(`PersonID`, `LastNam... | true |
0fd82b96011e5c6317369212963a67f298c7de0f | SQL | nayaaltahan/DB_SEP4_PMI | /Incremental Load of the fact CO2.sql | UTF-8 | 2,971 | 4.03125 | 4 | [] | no_license | drop table if exists Temp_Fact_CO2;
--if not already created, create a Temporary fact table for co2
create table Temp_Fact_CO2
(
Su_Plant_ID int,
Su_Profile_ID int,
Su_User_ID int,
Su_Date_ID int,
Su_Time_ID int,
Plant_ID int,
Profile_ID int,
User_ID int,
Time Time,
Date DATE,
Sensor_Value decimal(6,3),
C... | true |
6d2a15874e7b244ffc85e5f4c180ef8f2d33da7f | SQL | emilg1101/buu-lansedeniao | /dump/lansedeniao_new_schema.sql | UTF-8 | 2,454 | 3.5 | 4 | [] | no_license | CREATE TABLE new_schema."like"
(
id integer DEFAULT nextval('new_schema.like_id_seq'::regclass) PRIMARY KEY NOT NULL,
post_id integer NOT NULL,
user_id integer NOT NULL,
CONSTRAINT like_post_id_fk FOREIGN KEY (post_id) REFERENCES new_schema.post (id),
CONSTRAINT like_user_id_fk FOREIGN KEY (user_id)... | true |
2e9a65e710ce65272786657000a2c8d1a95da1cb | SQL | djones01/CHub | /CFG_SALARY_BASIS_COMPONENT_CONSTRAINT.sql | UTF-8 | 700 | 2.53125 | 3 | [] | no_license | --------------------------------------------------------
-- Constraints for Table CFG_SALARY_BASIS_COMPONENT
--------------------------------------------------------
ALTER TABLE "HCM_ADMIN"."CFG_SALARY_BASIS_COMPONENT" ADD CONSTRAINT "CFG_SALARY_BASIS_COMPONENT_PK" PRIMARY KEY ("LOOKUP_USAGE_ID")
USING INDEX PCTF... | true |
71fbdceafb2f371a3c67393d7cbdf76bd28313ee | SQL | Alnino98/pakkem | /DB/pakkem_daftar (2).sql | UTF-8 | 9,576 | 3.0625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 27 Sep 2020 pada 21.17
-- Versi server: 10.1.37-MariaDB
-- Versi PHP: 7.3.0
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARA... | true |
5ba2a770dc8644b762168fbce6ab9d62c6ca5145 | SQL | XiangZhaoyang/SAMS | /studentAMS.sql | UTF-8 | 3,152 | 3.65625 | 4 | [
"Apache-2.0"
] | permissive | create database studentAMS;
use studentAMS;
create table user(
user_id bigint(12) UNSIGNED not null primary key,
user_pass varchar(256) not null default '$2y$10$vZ0Wm.W7NbcZr9Bf7dDqzeYi/TG4FwIPEgrzqtJ8GsSXu9vclyuve',
user_createTime timestamp default CURRENT_TIMESTAMP,
user_auth tinyint(1) not null default 1
)eng... | true |
99fd412f51cdf05420c0a1550a02ee9c02b6570f | SQL | orzocogorzo/mobility-analytics | /postgis/perpendicular_difference.sql | UTF-8 | 710 | 3.671875 | 4 | [] | no_license | ALTER TABLE width.rotate90
DROP COLUMN difference;
ALTER TABLE width.rotate90
ADD COLUMN difference geometry(MultiLineString, 25831);
UPDATE width.rotate90
SET difference = ST_Multi(ST_Difference(lines.geom, intersections.geom))
FROM
width.rotate90 as lines
LEFT JOIN (
SELECT
a.line_id,
ST_UNI... | true |
1cf6d9e0bc8dedbff5371739a3f624186a2a35da | SQL | luomo135/26- | /博客系统(struts+hibernate+spring)/博客/文档源码和数据库文件/doc/dlog4j_mysql_323.sql | WINDOWS-1252 | 13,005 | 2.796875 | 3 | [] | no_license | /*==============================================================*/
/* Database name: WebDlogݿṹ */
/* DBMS name: MySQL 3.23 */
/* Created on: 2004-10-8 15:38:53 */
/*=====================================================... | true |
e6ae58e898443d2118c0c2e1a10e151fccc8d443 | SQL | jesp209i/database | /week 36/PetHospitalData.sql | UTF-8 | 1,283 | 3.0625 | 3 | [] | no_license | use PetHospital;
INSERT INTO dbo.Treatment
VALUES ('Rabies Vaccination'),('Examine and Treat Wound'),('Heart worm test'),('Tetanus Vaccination'),('Annual Check up'),('Eye wash');
INSERT INTO dbo.PetType
VALUES ('Dog'),('Cat'),('Bird');
INSERT INTO dbo.Owner
VALUES
('Will','Jensen','Vestergade 90','5000', 'Odense C... | true |
523e16c8a0bbc0460c77b2b6b1087312f67e7e17 | SQL | lihuibin/vanillatest | /sql/department.sql | UTF-8 | 448 | 2.875 | 3 | [] | no_license | /*
*/
use tel;
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for department
-- ----------------------------
DROP TABLE IF EXISTS `department`;
CREATE TABLE `department` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`pid` int(10) NOT NULL,
`depname` varchar(70) NOT NULL,
PRIMARY KEY (`i... | true |
d3086f5ee2aafd4e3385bdaa1037c727a6e86047 | SQL | Gomader/Database_Final | /my temporal trigger.sql | UTF-8 | 1,864 | 3.640625 | 4 | [] | no_license | delimiter |
drop procedure if exists biggo |
create procedure biggo()
begin
set @date=(select curdate());
update DataBaseClass.items set status=1 where endtime <= @data and state = 0;
end
|
set global event_scheduler = 1;
create event if not exists events on schedule every 1 second on completion preserve do c... | true |
9444725b12a1ea1ca16f70b9a1c7873b59af864b | SQL | lijie27/SecurityGuardSystem | /SQL File/clientmsdb.sql | UTF-8 | 12,822 | 3.109375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Apr 18, 2021 at 06:45 PM
-- Server version: 10.4.18-MariaDB
-- PHP Version: 8.0.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... | true |
86a04b70b599726f494e041327f2553bf67fe668 | SQL | adiSuper94/growfin-desk-demo | /src/main/resources/db/migration/V1__initdb.sql | UTF-8 | 3,080 | 3.890625 | 4 | [] | no_license | CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
CREATE SCHEMA IF NOT EXISTS core;
CREATE TYPE ticket_status AS ENUM (
'open',
'waiting_on_customer',
'customer_responded',
'resolved',
'closed'
);
CREATE TYPE ticket_history_type AS ENUM (
'status',
'priority',
'assignee'
);
CREATE TYPE ticket_priority AS EN... | true |
c2709c36d31709f0c65ffe11da01d1e859ea17a4 | SQL | Mitchell-Stone/Team_Project | /eits.sql | UTF-8 | 12,725 | 3.328125 | 3 | [] | no_license | --
-- Database: `eits`
--
-- --------------------------------------------------------
--
-- Table structure for table `admin`
--
CREATE TABLE `admin` (
`adminID` int(11) NOT NULL,
`firstName` varchar(255) NOT NULL,
`lastName` varchar(255) NOT NULL,
`email` varchar(255) NOT NULL,
`password` varchar(255) NOT... | true |
c79fde51dff72cb5af4917db6066d4ff2540b43b | SQL | tkionshao/Cov_Push_Tool | /sp_history/SP_Generate_Global_Statistic_cell_agg_gsm.sql | UTF-8 | 13,888 | 2.6875 | 3 | [] | no_license | DELIMITER $$
USE `gt_global_statistic`$$
DROP PROCEDURE IF EXISTS `SP_CreateDB_LTE`$$
CREATE DEFINER=`covmo`@`%` PROCEDURE `SP_Generate_Global_Statistic_cell_agg_gsm`(IN DATA_DATE DATE,IN DATA_HOUR TINYINT(2),IN PU_ID MEDIUMINT(9),IN TECH_MASK TINYINT(2), IN GT_DB VARCHAR(100))
BEGIN
DECLARE SP_Process VARCHAR(100) D... | true |
c0138c36eb62ce1827daefde4886a0629720a453 | SQL | VictorFarfan98/MoneyManagerServiceapp | /src/sql/migration/1.0.3/002-update-main-user-sp.sql | UTF-8 | 4,482 | 4.1875 | 4 | [
"MIT"
] | permissive | use ${DB_MAIN};
DROP PROCEDURE IF EXISTS User_Save;
DELIMITER $$
CREATE PROCEDURE `User_Save`(
pFirstName nvarchar(32),
pLastName nvarchar(32),
pPicture nvarchar(256),
pNickname nvarchar(32),
pEmail nvarchar(32),
pExtId nvarchar(32),
pProvider nvarchar(16),
pRoleId INT)
BEGIN
DECLARE varUserId INT ... | true |
89c057484dae1676d86bbfd153938c4c200149ed | SQL | tysker/bacholar_database_assignments | /dbd_exam-main/dbd_system/application/server/docker/scripts/01_dbd_tables.sql | UTF-8 | 2,042 | 3.4375 | 3 | [] | no_license | --DROP DATABASE IF EXISTS postgres;
DROP TABLE IF EXISTS users_keyword_stocks;
DROP TABLE IF EXISTS users_keyword;
DROP TABLE IF EXISTS users_stocks;
DROP TABLE IF EXISTS keywords CASCADE;
DROP TABLE IF EXISTS stocks CASCADE;
DROP TABLE IF EXISTS users CASCADE;
DROP TABLE IF EXISTS log_keywords;
DROP TABLE IF... | true |
44230595cfe389dec63e1f7901a68de034e34703 | SQL | open-fred/db | /preprocessing/hydrolib/bfg_grdc_runoff/fred_pp_bfg_grdc_setup.sql | ISO-8859-1 | 2,759 | 3.515625 | 4 | [] | no_license | /*
BFG GRDC runoff measurement data
__copyright__ = "Reiner Lemoine Institut"
__license__ = "GNU Affero General Public License Version 3 (AGPL-3.0)"
__url__ = ""
__author__ = "Ludee"
*/
-- BFG GRDC timeseries
DROP TABLE IF EXISTS hydrolib.bfg_grdc_runoff;
CREATE TABLE hydrolib.bfg_gr... | true |
7c46d5d68855699854cd2385be29ac86c63f507e | SQL | nProdanov/TelerikAcademy | /Databases/SQL-Intro/homework.sql | UTF-8 | 2,204 | 4.375 | 4 | [] | no_license | USE TelerikAcademy
-- Task 04.
SELECT * FROM Departments
-- Task 05.
SELECT Name FROM Departments
-- Task 06.
SELECT FirstName, Salary FROM Employees
-- Task 07.
SELECT FirstName + ' ' + LastName as [Full Name] FROM Employees
-- Task 08.
SELECT FirstName + '.' + LastName + '@telerik.com' as [Email]
FROM Employees... | true |
5843711f7ecd22de9ba344493c54db28316d3a7d | SQL | Nhok95/MavenProjects | /carInsurance/bin/src/main/resources/data/h2/schema.sql | UTF-8 | 639 | 3.3125 | 3 | [] | no_license | /*Para eliminar una tabla ees DROP TABLE IF EXISTS*/
DROP TABLE IF EXISTS VEHICULOS;
DROP TABLE IF EXISTS COLORES;
DROP TABLE IF EXISTS TIPOS;
/*UN BIGINT ES UN LONG*/
CREATE TABLE VEHICULOS (
CODIGO BIGINT NOT NULL,
MARCA VARCHAR(100) NOT NULL,
MODELO VARCHAR(100) NOT NULL,
COEFF DOUBLE(10) NOT NULL,
... | true |
c2aea65a359911cc0b23296dcb8ecc3a7e0916b2 | SQL | DiegoCartagena/Syslogistic | /exportPhoenixLogistic.sql | ISO-8859-10 | 10,611 | 2.640625 | 3 | [] | no_license | --------------------------------------------------------
-- Archivo creado - martes-junio-23-2020
--------------------------------------------------------
--------------------------------------------------------
-- DDL for Table BL
--------------------------------------------------------
CREATE TABLE "HR"... | true |
2534052d76267b131d6d6915796b164250f41db6 | SQL | Temelakiev/SoftUni-Projects | /Databases/SQL Introduction/Problem13_Write a SQL query to find the salary of all employees whose salary is in the range [20000…30000]/EmployeesWithSalaries20000-30000.sql | UTF-8 | 104 | 2.5625 | 3 | [] | no_license | SELECT FirstName + ' ' + LastName AS [Name], Salary FROM Employees
WHERE Salary BETWEEN 20000 and 30000 | true |
b45a22b97fe1b2035cd9fc47f61e0bf7ff05502f | SQL | Usman233/Medical-Consultation | /mdc.sql | UTF-8 | 31,011 | 3.140625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.1.14
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: May 30, 2020 at 05:42 PM
-- Server version: 5.6.17
-- PHP Version: 5.5.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;... | true |
771b9750c8dbe59405d8336df0e35fb6002b9324 | SQL | anastasia-kucherova/geekbrains_DB | /homework/lesson9/sample.dump.sql | UTF-8 | 2,930 | 3.546875 | 4 | [] | no_license | -- --------------------------------------------------------
-- Хост: 127.0.0.1
-- Версия сервера: 5.7.25 - MySQL Community Server (GPL)
-- ОС Сервера: Win64
-- HeidiSQL Версия: 9.3.0.4984
-- --------------------------------------------------------
/*... | true |
159aab9ada3e456e7a90a60ea9fbf9b88b5d36f0 | SQL | crachel8521/Interaction-Design | /hhp.sql | UTF-8 | 6,201 | 3.765625 | 4 | [] | no_license | -- create the database
DROP DATABASE IF EXISTS hhp;
CREATE DATABASE hhp;
-- select the database
USE hhp;
DROP TABLE IF EXISTS Accounts;
CREATE TABLE Accounts
(
user_id int auto_increment,
user_name varchar(155)not null,
password varchar(35) not null,
last_name varchar(35) not null,
first_name varchar(35) ... | true |
7507cb8053a17b7c3db58fd8494cd7a2a9a574b4 | SQL | YYMo/csc343automarker | /all/group_0567/a2.sql | UTF-8 | 7,041 | 4.21875 | 4 | [] | no_license | -- Query 1 statements
CREATE VIEW first_countries AS
SELECT cid AS c1id, cname AS c1name, neighbor FROM country NATURAL JOIN neighbour WHERE cid=country;
CREATE VIEW first_and_neighbours AS
SELECT c1id, c1name, cid AS c2id, cname as c2name, height FROM first_countries NATURAL JOIN country WHERE neighbor=country.cid;... | true |
aeb04545c0db1e6d6dd051ed3258b3bd8ff9a307 | SQL | PetePhx/relational-databases | /sql_book/basic_exercises.sql | UTF-8 | 1,154 | 3.515625 | 4 | [] | no_license | 1. Write a query that returns all of the customer names from the orders table.
SELECT customer_name FROM orders;
customer_name
-----------------
Todd Perez
Florence Jordan
Robin Barnes
Joyce Silva
Joyce Silva
(5 rows)
2. Write a query that returns all of the orders that include a... | true |
ea43c7c317cbfcd8d431af3d941680864a279b67 | SQL | silence-do-good/stress-test-Postgres-and-MySQL | /dump/high/day15/select0345.sql | UTF-8 | 177 | 2.640625 | 3 | [] | no_license |
SELECT timeStamp, temperature FROM ThermometerOBSERVATION o
WHERE timestamp>'2017-11-14T03:45:00Z' AND timestamp<'2017-11-15T03:45:00Z' AND temperature>=0 AND temperature<=78
| true |
22996a3ea058aab162803d87077f17218807c726 | SQL | kimill1394/php_hw_shoppingmall | /model/viewinit.sql | UTF-8 | 998 | 3.09375 | 3 | [] | no_license | create view v_sheep
as
select sheep.sheepno, sheep.sheepname, sheep.sheepsalerate, sheep.sheepprice, sheep.sheepimg, sheep.sheepstar, sheep.buycount, its.itemstatusimg, kos.kindname, kos.kindno, kos.kindcomment
from sheep, itemstatus its, kindofsheep kos
where sheep.kindno=kos.kindno
and its.itemsta... | true |
5a82d4e6c19d0d03939d0d00db7a33dfcd5333cc | SQL | GreenBeee/demo-commerce-app | /src/main/resources/sql/schema.sql | UTF-8 | 1,298 | 3.59375 | 4 | [] | no_license | CREATE DATABASE 'demoappdb';
CREATE TABLE 'categories' (
'id' bigint NOT NULL,
'name' varchar(255) DEFAULT NULL,
'parent_id' bigint DEFAULT NULL,
PRIMARY KEY ('id'),
FOREIGN KEY ('parent_id') REFERENCES 'categories' ('id')
);
CREATE TABLE 'product_categories' (
'product_id' bigint NOT NULL,
'category_id'... | true |
6f6db82e4037d4500b6e640cb50333e55f996f18 | SQL | ZFGCCP/ZFGC3 | /src/main/database/tables/PM_BACKUP_CODE.sql | UTF-8 | 406 | 2.78125 | 3 | [
"MIT"
] | permissive | CREATE TABLE IF NOT EXISTS `PM_BACKUP_CODE` (
`PM_BACKUP_CODE_ID` int(11) NOT NULL AUTO_INCREMENT,
`USERS_ID` int(11) NOT NULL,
`ENCRYPTED_KEY_AES` varchar(32) NOT NULL,
PRIMARY KEY (`PM_BACKUP_CODE_ID`),
KEY `FK_PM_BACKUP_CODE_ID_USERS_ID` (`USERS_ID`),
CONSTRAINT `FK_PM_BACKUP_CODE_ID_USERS_ID` FOREIGN KE... | true |
0cf12c1922277e6738d7616bc661d4ec471a2a35 | SQL | yiyixiaozhi/SimpleSessionBasedConversation | /doc/yiyixiaozhi.sql | UTF-8 | 5,048 | 3.34375 | 3 | [
"Apache-2.0"
] | permissive | /*
SQLyog Community Edition- MySQL GUI v8.03
MySQL - 5.7.9 : Database - yiyixiaozhi
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!4010... | true |
ed2dc210b9d2d2dd765ff769c3b6ba821acac24f | SQL | UKHomeOffice/hocs-info-service | /src/main/resources/db/postgresql/V1_24__CREATE_TABLE_CASE_DETAIL_FIELD.sql | UTF-8 | 517 | 3.53125 | 4 | [
"MIT",
"OGL-UK-3.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | DROP TABLE IF EXISTS case_details_field;
CREATE TABLE IF NOT EXISTS case_details_field
(
id BIGSERIAL PRIMARY KEY,
case_type VARCHAR(25) NOT NULL,
name TEXT NOT NULL,
component TEXT NOT NULL,
props JSONB DEFAULT '{}',
CONSTRAINT case_details_field_name_case_type_idempotent UNIQUE (name, case_type... | true |
8069536fc09ee1cc1531d942bdff459c5ba3cf3c | SQL | x1987624/SNS | /Web/Applications/CMS/Setup/Install/MySql/01_Install_CMS_Schema.sql | UTF-8 | 5,660 | 2.859375 | 3 | [] | no_license | DROP TABLE IF EXISTS `spb_cms_Addon_Links`;
CREATE TABLE `spb_cms_Addon_Links` (
ContentItemId Int(11) NOT NULL,
Color Varchar(16) NOT NULL,
IsBold TinyInt NOT NULL,
LinkUrl Varchar(512) NOT NULL,
PRIMARY KEY (`ContentItemId`)
)ENGINE=innodb DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `spb_cms_Addon_News`;
CREATE TAB... | true |
94bd0425a63521adaf60e8be83bb0453685168de | SQL | Crimsonfoxy/Statistician-v2 | /src/main/resources/SQLPatches/stats_v3.sql | UTF-8 | 1,424 | 2.796875 | 3 | [] | no_license | /*
* Forgot to add default values for all new bigints
*/
-- ------------------------
-- Fixes for `blocks` table
-- ------------------------
ALTER TABLE `blocks` CHANGE `num_destroyed` `num_destroyed` BIGINT UNSIGNED DEFAULT '0' NOT NULL;
ALTER TABLE `blocks` CHANGE `num_placed` `num_placed` BIGINT UNSIGNED DEFAULT '... | true |
bfc6829082f71156e2f5dfc9fbd761136f92cfe5 | SQL | Nina-Hgh/HackerRank | /SQL/Basic/01-Revising the Select Query I.sql | UTF-8 | 145 | 2.59375 | 3 | [] | no_license |
/* "*" means all of the columns
WHERE is used for adding condition*/
SELECT * FROM CITY WHERE COUNTRYCODE ="USA" AND POPULATION > 100000;
| true |
0c1b0fc3ac57368b60ef042811d233c2ab8e34bd | SQL | lucaburatti7/A00-Training-plan | /Mainframe Training/HISOFT/Hisoft Training/cobol_serve/SQL文/D342CHS_TBL.Sql | SHIFT_JIS | 3,005 | 3.03125 | 3 | [] | no_license | DROP TABLE D342CHS_TBL ;
CREATE TABLE D342CHS_TBL (
_ԍ CHAR(10) NOT NULL,
ă[X NUMBER(2,0) NOT NULL,
Ǘ CHAR(1) NOT NULL,
\A NUMBER(2,0) NOT NULL,
ގ ... | true |
b8ef08625dc999a43f19e370bce9c074b466b6ef | SQL | wdpimenta/oracle | /Distribui_Regioes/Procedure/ATU_CAR_P_AREA_TOTAL.prc | ISO-8859-1 | 12,153 | 3.515625 | 4 | [] | no_license | CREATE OR REPLACE PROCEDURE TOTALPRD.ATU_CAR_P_AREA_TOTAL
(P_CODUSU NUMBER, -- Cdigo do usurio logado
P_IDSESSAO VARCHAR2, -- Identificador da execuo. Serve para buscar informaes dos parmetros/campos da execuo.
P_QTDLINHAS NUMBER, -- Informa a quantidade de registros selecionados no mo... | true |
a2b7ffd632a5a1528b6fa8a48e82b3fd5227c347 | SQL | Git-Good-Milo/Week-2-SQL-Homework | /SQLQuery2.sql | UTF-8 | 136 | 2.6875 | 3 | [] | no_license | USE Northwind
-- Q1 How many orders in NWDD?
SELECT COUNT(OrderID) AS 'Number Of Orders' FROM Orders;
-- A1 Number of Orders is = 830 | true |
d5685e23b510e33b01e4c7c9bb5fe68c3d1e060b | SQL | Sma110ran9e/MicroServiceExamSystem | /exam_system.sql | UTF-8 | 22,335 | 3.3125 | 3 | [] | no_license | /*
Navicat Premium Data Transfer
Source Server : user
Source Server Type : MySQL
Source Server Version : 50644
Source Host : localhost:3306
Source Schema : exam_system
Target Server Type : MySQL
Target Server Version : 50644
File Encoding : 65001
Date: 3... | true |
336aacca4fdc14ea1486a3d0f7defe1271117940 | SQL | FilipOlofsson/CoinEagle | /cryptoanalyzer.sql | UTF-8 | 1,586 | 3.234375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.0
-- https://www.phpmyadmin.net/
--
-- Värd: 127.0.0.1
-- Tid vid skapande: 05 jan 2018 kl 06:23
-- Serverversion: 10.1.26-MariaDB
-- PHP-version: 7.1.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHA... | true |
d580fc8e920217d9e015fc6ef1c2fc14a63a637c | SQL | Minkyoung-Kim121/SQL_basic | /kmk00_201113.sql | UHC | 1,193 | 3.75 | 4 | [] | no_license | show user;
-- kmk00 Դϴ.
-- kmk00 SESSION Ѹ ο
-- ̺ Ϸ Ѵ.
-- -> SYSTEM ο ,
-- ̺ ٽ ̺ ϸ
CREATE TABLE EMPTEST(
EMPNO NUMBER(4)
,ENAME VARCHAR2(20)
,JOB VARCHAR2(20)
,DEPTNO NUMBER(2)
);
-- ȴ.
SELECT * FROM EMPTEST;
SELECT * FROM TAB;
SELECT * FROM SCOTT.EMP;
SELECT * FROM... | true |
44c1a5547be749c6fa92f2576c86f820acf126cc | SQL | hunglb/Telco-churn | /scripts/CUSTOMER_HISTORY_VIEW.sql | UTF-8 | 22,524 | 3.046875 | 3 | [] | no_license | /*
Sample Materials, provided under license.
Licensed Materials - Property of IBM
© Copyright IBM Corp. 2019. All Rights Reserved.
US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
drop view CHURN.CUSTOMER_HISTORY_VIEW ;
*/
create view... | true |
d68ec6d89d704fa70a0e5cf0eaccc78e257cdb29 | SQL | Gaya3-SQL/SQL_Exercise | /Joins/SQL_INNER_LEFT_RIGHT.sql | UTF-8 | 1,815 | 4 | 4 | [] | no_license | --By this query we can join the the tables by using inner join syntax--
Select TOP 10 PP.Title,PP.FirstName,PP.MiddleName,PP.LastName,PA.AddressLine1,PA.AddressLine2,PA.City,SP.Name,SP.StateProvinceCode,PA.PostalCode
from Person.Person AS PP
INNER JOIN Person.BusinessEntityAddress AS BEA ON PP.BusinessEntityID = BEA.B... | true |
13ff91f522019e0a1c48044b90f907f2ac1e5898 | SQL | hdinsight/HivePerformanceAutomation | /workload/tpch/queries/tpch_query18.sql | UTF-8 | 764 | 3.890625 | 4 | [] | no_license | drop view q18_tmp_cached;
drop table q18_large_volume_customer_cached;
create view q18_tmp_cached as
select
l_orderkey,
sum(l_quantity) as t_sum_quantity
from
lineitem
where
l_orderkey is not null
group by
l_orderkey;
create table q18_large_volume_customer_cached as
select
c_name,
c_custkey,
... | true |
af18e21be66f40dfa232e66468822a342375d9f6 | SQL | saqib010/Store_Project_Development | /SQL Queries/tables.sql | UTF-8 | 1,975 | 3.703125 | 4 | [] | no_license | create database db_Store
/************************************ LOGIN
create table tb_login(username varchar(30) not null, password varchar(30) not null)
insert into tb_login (username, password) values ('test','test');
select * from tb_login
**************************************/
create table Supplier(Supplier_ID i... | true |
6ada6638dfbf615cb0628161774a9c345ae71253 | SQL | coleenhuang/Where-was-I | /migrations/010.do.create_verses_table.sql | UTF-8 | 148 | 2.796875 | 3 | [] | no_license | CREATE TABLE verses (
id SERIAL PRIMARY KEY,
verse_name INTEGER NOT NULL,
chapter_id INTEGER REFERENCES chapters(id) ON DELETE CASCADE
) | true |
3e545a99feceff87ea5ebe06df9af3f3e4422e86 | SQL | sidousidou/Gestion-CHU-v2 | /hopitale.sql | UTF-8 | 8,713 | 3.4375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Hôte : 127.0.0.1
-- Généré le : Dim 16 fév. 2020 à 11:23
-- Version du serveur : 10.1.28-MariaDB
-- Version de PHP : 7.1.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101... | true |
a3401ef8cf4e7e48abd1a9f5489682b39745ae34 | SQL | atakage/SQL- | /GRADE(2019-10-15)정규화.sql | UTF-8 | 4,524 | 3.75 | 4 | [] | no_license | -- GRADE 화면
-- DB이론상 정규화 과정
/*
1. 실무에ㅓㅅ 사용하던 엑셀 데이터
===========================
학생이름 학년 학과 취미
===================================================
홍길동 3 컴공과 낚시, 등산, 독서
2. 엑셀 데이터를 단순히 DBMS의 테이블로 구현
-- 만약 취미가 4개인 학생... | true |
bc160fbae87de40edf13da9dc42f635fc1b8230d | SQL | zoecahill1/dataRepresentation-project | /database.sql | UTF-8 | 1,789 | 3.578125 | 4 | [] | no_license | create database project;
use project;
create table movies(
id int NOT NULL AUTO_INCREMENT,
name varchar(250),
genre varchar(250),
description varchar(1000),
totalVotes int,
PRIMARY KEY(id)
);
INSERT INTO `movies` (`id`, `name`, `genre`, `description`, `totalVotes`) VALUES ('1', 'Avengers: Endgame', 'Action & Adventu... | true |
c4005f11a1cf555606cc0b72bc2cd75d2fe55b73 | SQL | Paul-loh/MSc_Dissertation | /DWH_Database/2 - Data Vault Layer - Tables/dv.Pacer_SatFXRates.sql | UTF-8 | 577 | 2.6875 | 3 | [] | no_license | CREATE TABLE [dv].[SatFXRates]
(
[HKeyFXRate] BINARY(20) NOT NULL,
[Meta_LoadDateTime] DATETIME2 NOT NULL,
[Meta_LoadEndDateTime] DATETIME2 NOT NULL DEFAULT N'9999-12-31',
[Meta_RecordSource] NVARCHAR (1000) NOT NULL,
[Meta_ETLProcessID] INT NOT NULL, -- FK to ID of import batch
[HDiffFXRat... | true |
c55aed8d0a4611ea728e17c899c7e92747aa522c | SQL | assi98/nettside | /server/database/procedures/event_edit_procedures.sql | UTF-8 | 2,845 | 3.53125 | 4 | [] | no_license | /**
Drop all procedures for recreation
*/
DROP PROCEDURE IF EXISTS update_event_title;
DROP PROCEDURE IF EXISTS update_event_location;
DROP PROCEDURE IF EXISTS update_event_description;
DROP PROCEDURE IF EXISTS update_event_start_time;
DROP PROCEDURE IF EXISTS update_event_end_time;
DROP PROCEDURE IF EXISTS update_e... | true |
2ec9d8ebbbba15d6600f32ca08da6e7488f5df2b | SQL | FreddieAbad/Ingenieria_de_Sistemas_Materias | /Mineria de Datos/Tarea 4 - Operaciones Multidimensionales/operacionesMultidimensionales.sql | UTF-8 | 4,800 | 3.609375 | 4 | [] | no_license | use practica_dw_operaciones;
select * from `estacion`;
select * from `medicion`;
select * from `responsable`;
select * from `tiempo`;
select * from `tipoestacion`;
-- DRILL ACROSS
-- general
CREATE OR REPLACE VIEW tabla_vista_medicion_gb
AS
SELECT est.pais, test.tipoEstacion,
sum(md.temperaturaCelsius) t_celsius, s... | true |
f9978629c5839e234e4759e18ddde94947648d30 | SQL | yaldapersian84/roihunter | /src/main/resources/db/migration/V1__init.sql | UTF-8 | 3,167 | 3.6875 | 4 | [] | no_license | -- ----------------------------------------------------------------------------
-- Schema db_fb_user_mng
-- ----------------------------------------------------------------------------
CREATE SCHEMA IF NOT EXISTS `db_fb_user_mng` ;
-- ----------------------------------------------------------------------------
-- Tabl... | true |
1b57036a572a74967288e7a3bb64eadfacb8f432 | SQL | bikyeo/bikyeo | /src/main/webapp/META-INF/doc/event.sql | UTF-8 | 430 | 2.84375 | 3 | [] | no_license |
CREATE EVENT bikyeo.cyclereset
ON SCHEDULE EVERY 24 HOUR
STARTS STR_TO_DATE('2019-01-22 12:00:00 AM', '%Y-%m-%d %r')
ON COMPLETION PRESERVE
ENABLE
DO
BEGIN
CALL bikyeo.cyclereset();
END
# MySql event_scheduler 사용 여부 확인
show variables like 'event%' ;
# Mysql event_sche... | true |
cc00c08f987a488c9c29f948c540466542656296 | SQL | mc-bane/Blockchain-Robotics | /cFS/apps/ds/test_and_ground/asist/prc/scx_cpu1_ds_tbl3.prc | UTF-8 | 12,215 | 2.859375 | 3 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | PROC scx_cpu1_ds_tbl3
;*******************************************************************************
; Test Name: ds_tbl3
; Test Level: Build Verification
; Test Type: Functional
;
; Test Description
; This procedure creates the initial CFS Data Storage (DS) Destination
; File and Packet Filter Table lo... | true |
a5f9152c05d67267008d96448dec5a3fef4852fc | SQL | DonnyZhao/pgml | /projects/titanic/models/staging/train/stg_train_fe_sex.sql | UTF-8 | 289 | 3.25 | 3 | [
"MIT"
] | permissive | WITH base_0 AS (
SELECT
*
FROM
{{ ref('stg_train_fe_baseline') }}
),
dim_sex AS (
SELECT
*
FROM
{{ ref('sex') }}
) select
base.*, ds.sex_fe_1
FROM
base_0 AS base
INNER JOIN dim_sex AS ds
ON base.passengerid = ds.passengerid
| true |
73e37723c882777ec3c37b2cbb06c8cb41937b61 | SQL | endeavourhealth-discovery/DiscoveryQueryLibrary | /Projects/Waltham Forest Child Imms/Queries/wf_cohort.sql | UTF-8 | 827 | 3.6875 | 4 | [
"Apache-2.0"
] | permissive | use data_extracts;
drop procedure if exists createCohortWFChildImms;
DELIMITER //
CREATE PROCEDURE createCohortWFChildImms ()
BEGIN
drop table if exists cohort;
create table cohort as
SELECT p.id as 'patient_id', p.id as 'group_by', age_years
FROM ceg_compass_data.patient p
JOIN ceg_compass_data.organizatio... | true |
c80b61d5190f32bfdd102da8a3f4e136d1759dfa | SQL | inselberge/Coworks.In | /database/custom_sprocs/User_Profile.sql | UTF-8 | 1,592 | 3.359375 | 3 | [] | no_license | -- Find the user information quickly
SELECT id, fullName, create_date FROM geekdom_members.viewUser WHERE id=587;
CALL getUserBioByUserID('587');
-- User Bio
SELECT id,description FROM geekdom_members.viewUser_Bio WHERE user_id=587;
-- User Circle
SELECT vuc.id, c.title, vuc.member_type
FROM geekdom_members.viewUser_... | true |
2733d2af8f05afaf94a88f632c1d8feee5f8aa70 | SQL | nvipperl/Data-Analysis | /DillardsSalesSQL.sql | UTF-8 | 6,154 | 4.40625 | 4 | [] | no_license | /*Customer behavior */
select count(transact.TRANSACTION_ID) as items,transact.cust_id, TRAN_DATE,store.STORE,TRAN_TYPE, DEPT_DESC, DEPTDEC_DESC, DEPTCENT_DESC,COLOR, sum(ORIG_PRICE) as orig_price , sum(TRAN_AMT) as sale_price , sum(TRAN_AMT)-sum(ORIG_PRICE) as discount,TENDER_TYPE
from TRANSACT inner join sku on tra... | true |
dfa5b0c4bdfee5533eae242fb8f9dce8f2d89073 | SQL | jenli810006995/SQL | /LeetCode/601. Human Traffic of Stadium/Human_Traffic_Stadium.sql | UTF-8 | 943 | 4.15625 | 4 | [] | no_license | -- Write an SQL query to display the records with three or more rows with consecutive id's, and the number of people is greater than or equal to 100 for each.
-- Return the result table ordered by visit_date in ascending order.
select id, visit_date, people
from Stadium
where people >= 100
and
(
id in (select id ... | true |
8d8af331c5ecfc90e7996040eee749fb8d3cdf90 | SQL | sunpigyu/yu | /汽车频道pc,手凤端new(有标题且pv>100).sql | UTF-8 | 937 | 3.4375 | 3 | [] | no_license | --汽车频道pc端(有标题且pv>100)
select distinct doc,title,pv,dt from web.auto_doc_20180521 where ci like '%auto%' and title !='None' order by dt,pv desc
--汽车频道手凤端(有标题且pv>100)
select distinct url,
nvl(title, ' ') title,
pv,
to_char(day, 'yyyy-mm-dd') day
from (select f.source,
url,
... | true |
e3f1e8219652d6592d90947f4181d0b523870bea | SQL | Talos10/SOEN390-team-9 | /scripts/createDB.sql | UTF-8 | 15,991 | 4.0625 | 4 | [] | no_license | -- Create a local db user in order for the backend to be able to access the data.
drop user if exists 'admin'@'localhost';
create user 'admin'@'localhost' identified by 'admin';
grant all privileges on * . * to 'admin'@'localhost';
ALTER USER 'admin'@'localhost' IDENTIFIED WITH mysql_native_password BY 'admin';
flush P... | true |
df25582cbfde63ed45bfc0ee700e91cad610ea57 | SQL | hskEvelin/Parcel-Config-Address | /scripts/dump-ms_parcel_address-201802141140.sql | UTF-8 | 4,896 | 3.28125 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 5.7.21, for Linux (x86_64)
--
-- Host: localhost Database: ms_parcel_address
-- ------------------------------------------------------
-- Server version 5.7.21-0ubuntu0.16.04.1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CH... | true |
6d5f3553fec5dffa100aa77ac8b8606103a96656 | SQL | lisandrascruz/ufrpe_search | /bd/coordenacoes.sql | UTF-8 | 2,690 | 3.21875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.3.11
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: 11-Maio-2015 às 21:14
-- Versão do servidor: 5.6.24
-- PHP Version: 5.6.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;... | true |
031a6e1200f8ec140d5a8fdd61ca60f6c09b2356 | SQL | janatumpa/My-Project | /db/promanagement.sql | UTF-8 | 13,852 | 2.9375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.5.4.1deb2ubuntu2
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: May 09, 2017 at 11:37 AM
-- Server version: 5.7.18-0ubuntu0.16.04.1
-- PHP Version: 5.6.30-7+deb.sury.org~xenial+1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.