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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
2121ffa35edd011daeb989c805436e8b80e18d80 | SQL | ALiSHERBE/hospital | /data/hospital.sql | UTF-8 | 9,876 | 3.265625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.3.8
-- http://www.phpmyadmin.net
--
-- Хост: localhost
-- Время создания: Авг 29 2021 г., 01:01
-- Версия сервера: 5.5.65-MariaDB
-- Версия PHP: 5.4.16
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT *... | true |
62c6e20a35b5387d63dd16e7ce2408884f779d94 | SQL | jfontestad/cds-stack | /db/dw/create_dbschema.sql | UTF-8 | 34,283 | 3.53125 | 4 | [
"Apache-2.0"
] | permissive | /*
* create_dbschema.sql
* create relation database for the dashan instance
* NOTE: cdm_twf is not created here
*/
-------------------------------------------------
-- DW Version Information
-- dataset_id: this captures the schema version and etl (transform/fillin/derive)
-- version used to populate the DW.
-- Ver... | true |
48636496e614a8a1448a386a8129f5c954fcc3b8 | SQL | akshatj355/Extract-Transform-and-Load-Project | /ETL.sql | UTF-8 | 406 | 2.734375 | 3 | [
"MIT"
] | permissive | Create database etlproject;
use etlproject;
Create table counties (
State varchar(2) NOT NULL,
County varchar(100) NOT NULL,
Population int(15),
MedianHouseHoldIncome double,
UnemploymentRate float,
DiversityIndex float,
White double,
Black double,
Hispanic double,
Asian double,
AmericanIndian ... | true |
c31da04f8e3e2f26e0930eb0e72cee1d385c5b1b | SQL | Enfocado/Project-Information | /db/schema.sql | UTF-8 | 535 | 3.0625 | 3 | [] | no_license | CREATE DATABASE projectinformation;
\c projectinformation;
CREATE TABLE project (
projectname text,
projectid bigserial,
start_date timestamp,
end_date timestamp,
funding_goal integer,
current_goal integer,
backers integer,
creator_id integer,
location text,
is_followed boolean,
category text,
video_link ... | true |
3b9ae47d4151739b523fe8a1763dbcffc64d0969 | SQL | mhd-rawashdah/databases | /server/schema.sql | UTF-8 | 567 | 3.546875 | 4 | [] | no_license | CREATE DATABASE chat;
USE chat;
CREATE TABLE messages (
id INT PRIMARY KEY AUTO_INCREMENT ,
message TEXT NOT NULL,
romeName VARCHAR(50) NOT NULL ,
userId INTEGER NOT NULL,
createdAt DATE NOT NULL
);
/* Create other tables and define schemas for them here! */
CREATE TABLE users (
id INT PRIMARY KEY AUTO_I... | true |
7a8f1e981284aef20d6f1d02d48bdf434b9a9e85 | SQL | sebrown0/SUK | /database/salaroo_uk/sql/procGetAllEmpDeductionsForPayrollRunId.sql | UTF-8 | 608 | 3.140625 | 3 | [] | no_license | CREATE DEFINER=`root`@`localhost` PROCEDURE `get_all_emp_deductions_for_payroll_run_id`(
IN payrollRun INT,
IN returnRs BOOLEAN)
BEGIN
DROP TABLE IF EXISTS all_emp_deductions_for_payroll_run_id;
CREATE TABLE all_emp_deductions_for_payroll_run_id
SELECT
prd.payroll_run_id, prd.employee_payroll_details_payrol... | true |
004f12b749179e8b3a2bb2c9cb98cd53a7ab6bb5 | SQL | klitscher/holbertonschool-higher_level_programming | /0x0E-SQL_more_queries/101-not_a_comedy.sql | UTF-8 | 449 | 4.28125 | 4 | [] | no_license | -- List all movies that are not a comedy
-- See above
SELECT tv_shows.title FROM tv_shows
LEFT JOIN (
SELECT tv_shows.title AS negative FROM tv_shows
INNER JOIN tv_show_genres ON tv_shows.id = tv_show_genres.show_id
INNER JOIN tv_genres ON tv_genres.id = tv_show_genres.genre_id
WHERE tv_genres.name ... | true |
fff230d5672a4134f576696d4a6ec39d24f5f6de | SQL | alexr007/play-by-manual | /conf/evolutions/dish_db/0001.sql | UTF-8 | 238 | 2.765625 | 3 | [] | no_license | # --- !Ups
CREATE TABLE IF NOT EXISTS Dish (
DishName varchar(255) NOT NULL,
Description varchar(255) NOT NULL,
Price INT NOT NULL,
Id INT NOT NULL AUTO_INCREMENT,
PRIMARY KEY (Id)
) AUTO_INCREMENT=0;
# --- !Downs
DROP TABLE Dish;
| true |
f5de448656cb08e213b52c90cb9a00b87d2ef705 | SQL | gahvilan/delphi-gym | /Scripts Nuevos/Procedure Porcentajes.sql | UTF-8 | 538 | 3.1875 | 3 | [] | no_license | SET TERM !!;
CREATE PROCEDURE GET_PORCENTAJES (
MES INTEGER,
ANIO INTEGER)
RETURNS (
NOMBRE VARCHAR (101) CHARACTER SET NONE,
PORCENTAJE DECIMAL (8, 3))
AS
declare variable PROFE INTEGER;
BEGIN
FOR SELECT DISTINCT(ID_PROFESOR) FROM CAJA WHERE FECHA LIKE '%'||CAST(:MES AS VARCHAR(2))||'/'||CAST(:ANI... | true |
3d35564d5825adc6d1990d6412687665cfa22783 | SQL | Fliipzy/sd21w1-db | /docs/MySQL/Scripts/views_showBooks.sql | UTF-8 | 342 | 3.765625 | 4 | [] | no_license | CREATE VIEW showBooks AS SELECT m.id, m.title, m.description, m.release_date, b.isbn13, b.pages, b.edition, group_concat(c.`name` separator ', ') AS Author
FROM material AS m
INNER JOIN book AS b ON m.id = b.material_id
INNER JOIN material__creator AS mc ON m.id = mc.material_id
INNER JOIN creator AS c ON mc.creator_id... | true |
5135dd6c6c95c2b841cb65f8775fbc16be48ceb6 | SQL | Gsyrx/dbms-lab | /question-3/table.sql | UTF-8 | 1,947 | 4.1875 | 4 | [] | no_license | create table boat (
bid number(10) primary key,
bname varchar(20),
colour varchar(10)
);
create table sailor (
s_id number(10) primary key,
sname varchar(20),
age number(10)
);
create table reserves (
bid number(10) references boat(bid),
s_id number(10) references sailor(s_id),
day... | true |
c7ed34b5423ef0923896240355fcf4ddfbd89407 | SQL | UNDA-UNIVERSITY/Marketplace | /marketplace.sql | UTF-8 | 9,668 | 2.796875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.0.4
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Nov 28, 2017 at 05:30 AM
-- Server version: 5.6.12-log
-- PHP Version: 5.4.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT ... | true |
36ddd70a2375526beaa615759fb94910dd7745ae | SQL | ingridm93/RYDE-SocialNetwork | /database/users.sql | UTF-8 | 673 | 3.1875 | 3 | [] | no_license | DROP TABLE IF EXISTS users;
DROP TABLE IF EXISTS propic;
DROP TABLE IF EXISTS friendStatus;
CREATE TABLE users(
id SERIAL PRIMARY KEY,
first VARCHAR(200),
last VARCHAR(200),
email VARCHAR(300) NOT NULL UNIQUE,
password VARCHAR(200) NOT NULL,
bio VARCHAR(300)
);
CREATE TABLE propic (
i... | true |
4bfe39786b9510d6312f9b9811ca0969801ebfa0 | SQL | smilegzc/spring_account | /src/main/resources/SQL/employee.sql | UTF-8 | 1,232 | 2.953125 | 3 | [] | no_license | set foreign_key_checks = 0;
drop table if exists `employee`;
create table `employee`
(
`id` int(11) not null auto_increment,
`name` varchar(32) default null,
`phone` char(11) default null,
`username` varchar(255) default null,
`password` varchar(255) default null,
`type` int(2) default null,
... | true |
b9e95cd16fc1572c45a3b0817e89f347204285f1 | SQL | SMATHUR93/HeroAcademy | /HeroAcademyServer/src/main/resources/heroAcademy.sql | UTF-8 | 1,321 | 2.515625 | 3 | [] | no_license | create database heroAcademy;
drop database heroAcademy;
use heroAcademy;
show tables;
select * from course;
select * from course_instructor;
select * from course_user;
select * from element;
select * from element_mapping;
select * from equipment;
select * from equipment_mapping;
select * from location;
select * from m... | true |
ece8da47d1e10d916084dd51b59110cccd37c0b9 | SQL | ptrefall/propcomp | /examples/ClanLib/AtharonRL/Database/Sql/gameobjectcontainers_schema.sql | UTF-8 | 181 | 2.59375 | 3 | [
"MIT"
] | permissive | BEGIN TRANSACTION;
CREATE TABLE GameObjectContainers
(
GameObjectContainerId INT NOT NULL,
Description TEXT NOT NULL,
PRIMARY KEY(GameObjectContainerId)
);
COMMIT;
| true |
5f3a824995a91e69aa75ed6d9c3ee717d4159a45 | SQL | jaguilar992/ExpedienteMedico | /06 PL-SQL/01 PLSQL/01.CrearAmbulancia.sql | UTF-8 | 1,046 | 3.0625 | 3 | [] | no_license | CREATE OR REPLACE PROCEDURE PL_CrearAmbulancia(
placa IN VARCHAR
,idCentro IN INTEGER
,mensaje OUT VARCHAR
,resultado OUT SMALLINT
)
IS
--DECLARE
vnConteo INTEGER;
BEGIN
mensaje:='';
resultado:=0;
/*----------------VALIDACION DE CAMPOS----------------*/
IF placa = '' OR placa IS NULL THEN
mensaje:= me... | true |
3b7dc584046dd4fa5c7227cae356d979aa254c8b | SQL | 1-aquila-1/sql | /PL-SQL/group_by.sql | ISO-8859-1 | 1,466 | 4 | 4 | [
"MIT"
] | permissive | /*
Mas eu quero saber o seguinte, qual o total de limite de crdito que eu tenho para o Rio de Janeiro e qual o total de
limite de crdito que eu tenho para So Paulo.
*/
select estado, sum(limite_de_credito) as total_de_credito from tabela_de_clientes group by estado;
/*
Os preos de lista por embalagem. Qual o maio... | true |
de51efab2e5cd079644ebeba0120428682ecd8bb | SQL | angellicacardozo/YiiCommerce | /banco_de_dados.sql | UTF-8 | 7,915 | 2.734375 | 3 | [] | no_license | -- MySQL Administrator dump 1.4
--
-- ------------------------------------------------------
-- Server version 5.1.40-community-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@CO... | true |
9d5bac59a3b2582766497831a61e6b14d0021adb | SQL | silence-do-good/stress-test-Postgres-and-MySQL | /dump/high/day22/select0328.sql | UTF-8 | 191 | 2.640625 | 3 | [] | no_license |
SELECT timeStamp, temperature
FROM ThermometerObservation
WHERE timestamp>'2017-11-21T03:28:00Z' AND timestamp<'2017-11-22T03:28:00Z' AND SENSOR_ID='f8017ce2_b8ca_42c3_8c6b_fdabbfa79ceb'
| true |
012fc75dd68e788036f0223bc64b9cea300eed46 | SQL | lewis-huang/Instagram | /instagram_crawl_driven_by_seed.sql | UTF-8 | 1,785 | 3.734375 | 4 | [] | no_license | 1. 一张主表,用来记录需要爬取的专栏名称,专栏URL地址。
专栏名称将作为文件夹,保存在g:\cartoon\desktop 总目录下。
专栏URL,就会被爬虫爬取每一张图片的URL, 经由爬虫的多线程下载器,下载到本地的专栏名称文件夹下
2. 多张子表:
2.1 爬取历史记录:专栏爬取的时间,用时,爬取数目
2.2 爬取的异常:专栏爬取的每一张图片的url, 是否正常下载,异常原因
2.3 是否考虑将评论也爬取下来,调用翻译软件的api, 将评论翻译成中文
create table instagramColumnList(
ID int not null auto_increment primary key,
Co... | true |
7529b239de6cbba52c9650b57c8de9a221c551ef | SQL | misdud/laraemployes | /1_Config_db/test.sql | UTF-8 | 5,292 | 3.5 | 4 | [
"MIT"
] | permissive | -- MySQL Script generated by MySQL Workbench
-- Mon Jan 6 17:37:58 2020
-- Model: New Model Version: 1.0
-- MySQL Workbench Forward Engineering
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='ON... | true |
c775ed594a08bf11ab5abb0a39b1d6f1e737132e | SQL | rh3ach/haulage-company-sql-cw | /vehicle_allocation.sql | UTF-8 | 826 | 3.8125 | 4 | [] | no_license | SELECT v.vehicle_type_id,v.registration
FROM vehicle v
MINUS
SELECT pipa.vehicle_type_id,pipa.registration
FROM
(SELECT malakia.departure_date, malakia.return_date,malakia.registration,malakia.vehicle_type_id
FROM
(SELECT t.departure_date,t.return_date,t.registration,v.vehicle_type_id,
SUM ( CASE WHEN ((TO_DATE('&Dep... | true |
836dae86cfc04bdbec6c0abbec39ccc274bf21d8 | SQL | inunosinsi/soycms | /cms/soyshop/webapp/src/module/plugins/custom_search_field/sql/init_mysql.sql | UTF-8 | 527 | 2.875 | 3 | [] | no_license | CREATE TABLE soyshop_custom_search(
item_id INTEGER NOT NULL,
lang TINYINT NOT NULL DEFAULT 0,
UNIQUE(item_id, lang)
) ENGINE=InnoDB;
CREATE TABLE soyshop_category_custom_search(
category_id INTEGER NOT NULL,
lang TINYINT NOT NULL DEFAULT 0,
UNIQUE(category_id, lang)
) ENGINE=InnoDB;
CREATE TABLE soyshop_custom... | true |
7abc6b86139cb7d871503a7a0a68f9eb0111949b | SQL | rldutch1/php | /disneymovies/sql/disneymovies_database.sql | UTF-8 | 7,000 | 2.9375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.2.6
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Dec 26, 2014 at 05:57 PM
-- Server version: 5.5.36-cll-lve
-- PHP Version: 5.5.18
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLI... | true |
42ba9e7bbe5bf2403272d4304f475899bb4430e9 | SQL | meghanajs99/ProjectEA | /EA project/Dump20190611/marauto_State.sql | UTF-8 | 2,787 | 2.8125 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 5.7.17, for Win64 (x86_64)
--
-- Host: 68.178.217.52 Database: marauto
-- ------------------------------------------------------
-- Server version 5.5.43-37.2-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER... | true |
97bf0c3eaac14b0ce6ec2fd6e9f8eb1f71f02d9a | SQL | jciarka/TravelNow-backend | /DB/TRAVEL_NOW_INSERT.sql | UTF-8 | 8,274 | 2.609375 | 3 | [] | no_license | INSERT INTO users (username, password, active, roles, email)
VALUES ('dummy', '$2a$10$/gYgx7Tdzw9IV1zrotiWL.aqpClOPUDsPCjm/9O9V/Ub8P5gHC2/2', 'Y', 'ROLE_USER', 'dummy@o2.pl');
INSERT INTO users (username, password, active, roles, email)
VALUES ('admin', '$2a$10$2wCMEnzE7o0gc2.1dfqgduui0R7V4ZTQW4VPzrjbZ4mZ4CuAUCWJK', ... | true |
b2110a71ec8cada7d889d0c6fe75250677e4aa1e | SQL | DIM-JACK/ISAD251 | /SQL/isad251.sql | UTF-8 | 8,315 | 3.625 | 4 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.1
-- https://www.phpmyadmin.net/
--
-- 主機: 127.0.0.1
-- 產生時間: 2020-02-16 16:00:09
-- 伺服器版本: 10.4.11-MariaDB
-- PHP 版本: 7.3.14
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACT... | true |
2cf49f24acd2e9d88a13a6673ee997cc1b2d3e54 | SQL | FireNinjaProductions/be-elden-hub | /remakeDatabase.sql | UTF-8 | 611 | 2.609375 | 3 | [] | no_license | -- command to run the script in terminal
-- 🔻 use this command whit your terminal is pointing at the root directory of your project
-- psql -U postgres -f remakeDatabase.sql
-- env: DATABASE_URL=postgres://postgres:password@localhost:5432/artisans
-- env: TEST_DATABASE_URL=postgres://postgres:password@localhost:5432/... | true |
154b68bed0179081a18ce3388e75ecabc2834a71 | SQL | its-gio/simulation-3 | /db/posts/get_posts.sql | UTF-8 | 124 | 2.84375 | 3 | [] | no_license | SELECT p.title, p.img, p.content, u.username
FROM simulation_posts p
JOIN simulation_users u
ON u.user_id = p.author_id; | true |
d0c928b9becb2ec4c3d454aead13e2d5a4cc20da | SQL | bonnett93/holbertonschool-higher_level_programming | /0x0D-SQL_introduction/11-best_score.sql | UTF-8 | 162 | 2.9375 | 3 | [] | no_license | -- Select best records of the table ordered by score.
-- SQL keywords in uppercase.
SELECT score, name FROM second_table
WHERE score >= 10
ORDER BY score DESC;
| true |
3b1c03e4f02debade1d574347f0e5ffc649216f0 | SQL | bagasnk/IMPAL | /kasir.sql | UTF-8 | 1,270 | 2.828125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.2.11
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: 27 Jan 2019 pada 14.45
-- Versi Server: 5.6.21
-- PHP Version: 5.5.19
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!... | true |
588835e7c36c26d7216ffc9c535ae5f27b7f2194 | SQL | WoahDemi/EcoRent | /back-end/db/schema.sql | UTF-8 | 1,007 | 3.28125 | 3 | [] | no_license | DROP DATABASE IF EXISTS eco_rent_dev;
CREATE DATABASE eco_rent_dev;
\c eco_rent_dev;
DROP TABLE IF EXISTS users;
DROP TABLE IF EXISTS categories;
DROP TABLE IF EXISTS items;
DROP TABLE IF EXISTS transactions;
DROP TABLE IF EXISTS reviews;
CREATE TABLE users (
id VARCHAR PRIMARY KEY,
first_name TEXT NOT NULL,... | true |
59b679fab14120c58ef969a215330a3f7f83faa7 | SQL | ramya2507/BootcampX | /4_queries/13_teacher_and_total_assistances.sql | UTF-8 | 400 | 3.96875 | 4 | [] | no_license | SELECT DISTINCT teachers.name as teacher,
cohorts.name as cohort,
count(assistance_requests.*) as total_assistances
FROM assistance_requests
JOIN teachers ON teachers.id = teacher_id
JOIN students ON students.id = student_id
JOIN cohorts ON cohorts.id = cohort_id
WHERE assistance_requests.teacher_id = teachers.id
... | true |
f4bee53d0a98d43fe46a50a56b4a2114c3a1e6c6 | SQL | EslamGamalYounis/Examination-System-Db-Using-SQL | /Examination System Project/Examination system projects/reports/Report procedures/report 3 proc.sql | UTF-8 | 298 | 3.375 | 3 | [] | no_license | alter proc Report3 @instructorId int
as
select c.Cname AS [course name] ,count(sc.Sid) [No of student]
from Course c inner join course_instructor CI
on c.Cid = CI.C_id
inner join student_course sc
on sc.Cid=c.Cid
where CI.Ins_id= @instructorId
group by c.Cname
Report3 1
| true |
e5216248d3364c16a3e8804ff55931e03bd15f57 | SQL | darioOlah/bancoDados | /consultas_emarket_parte1.sql | UTF-8 | 1,045 | 3.4375 | 3 | [] | no_license | /* Categorias e Produtos */
SELECT * FROM categorias;
SELECT categorianombre, descripcion FROM categorias;
SELECT * FROM productos;
SELECT discontinuado FROM productos WHERE discontinuado > 0;
SELECT * FROM productos WHERE ProveedorID = 8;
SELECT * FROM productos WHERE preciounitario BETWEEN 10 AND 22;
SELECT *... | true |
e5def31c6ea0e249e70864e53849a0bd58565442 | SQL | AlexanderVishnevsky/DeathValley | /target/com.jdmcherry.deathvalley/WEB-INF/classes/DATABASE.sql | UTF-8 | 3,114 | 3.46875 | 3 | [] | no_license | CREATE DATABASE IF NOT EXISTS `dv` /*!40100 DEFAULT CHARACTER SET utf8mb4 */;
USE `dv`;
-- MySQL dump 10.13 Distrib 5.7.17, for Win64 (x86_64)
--
-- Host: 127.0.0.1 Database: dv
-- ------------------------------------------------------
-- Server version 5.7.21
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SE... | true |
e3b359d2767b837a59fdde8dda17909ab575bfb5 | SQL | kh-studybook/final_project | /studybook/src/main/webapp/resources/sql/member.sql | UTF-8 | 898 | 3.328125 | 3 | [] | no_license | create table member(
email VARCHAR2(40) NOT NULL UNIQUE,
password VARCHAR2(20) NOT NULL,
name VARCHAR2(40) NOT NULL ,
phone VARCHAR2(11) NOT NULL,
key number(10) NOT NULL constraint member_key_pk primary key,
profile varchar2(200)
);
alter table member add profile varchar2(200);
drop table member;
... | true |
35b54e696359daed2721edfc16c125d12fe75f06 | SQL | Blu911/hero-rest-api | /src/main/resources/data.sql | UTF-8 | 312 | 2.859375 | 3 | [] | no_license | DROP TABLE IF EXISTS heroes;
CREATE TABLE heroes (
id bigint(20) NOT NULL auto_increment,
name VARCHAR(250) NOT NULL,
PRIMARY KEY (id),
UNIQUE KEY name (name)
);
CREATE TABLE powers (
id BIGINT(20) NOT NULL AUTO_INCREMENT,
name VARCHAR(50) NOT NULL,
description VARCHAR(250),
PRIMARY KEY (id)
) | true |
8e6e1452a77ea508030dfcaff48481a42798641d | SQL | sceric/etsn05 | /documentation/STLDD/query.sql | UTF-8 | 3,713 | 3.359375 | 3 | [] | no_license |
CREATE TABLE IF NOT EXISTS `groups` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(20) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `name` (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
CREATE TABLE IF NOT EXISTS `log` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_id` int(11) NOT NUL... | true |
a64c0627a94f758f149c3be69f10fdb3c18da303 | SQL | taylorperkins/exploring-lahman-baseball-db | /sql-scripts/q_6.sql | UTF-8 | 1,339 | 4.34375 | 4 | [] | no_license | /*
QUESTION::
Find the player who had the most success stealing bases in 2016,
where success is measured as::
percentage of stolen base attempts which are successful
* (A stolen base attempt results either in a stolen base or being caught stealing.)
Consider only pla... | true |
37b0f42ae09ceb3605988dfefe29618bf96d5a8e | SQL | ryabko/datebook | /database/mysql.sql | UTF-8 | 441 | 3.453125 | 3 | [] | no_license | # change USERNAME and PASSWORD
create database if not exists datebook;
grant all privileges on datebook.* to USERNAME@localhost identified by "PASSWORD";
flush privileges;
use datebook;
drop table if exists tasks;
create table tasks (
id int not null auto_increment,
title varchar(200) not null,
creation_time ... | true |
feaaf0d7c0076cc7ea3f74812356800721dde275 | SQL | liuthomas725/JAVA-000 | /Week_06/sql/t_order_freight.sql | UTF-8 | 547 | 2.78125 | 3 | [] | no_license | CREATE TABLE `t_order_freight` (
`order_freight_id` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT '主键id',
`freight_price` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '运费',
`store_order_id` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT '主订单id',
`create_time` timestamp NULL DEFAULT NULL COMMENT '... | true |
1ea818d334e8ba1fd6631e718f205c814fa4153e | SQL | DaniAngelov/SQL- | /Data Definition Language/Solutions/Facebook/Facebook.sql | UTF-8 | 2,128 | 3.296875 | 3 | [] | no_license | -- github.com/DaniAngelov
2.
а)
create table Users
(
id int primary key identity,
email varchar(20),
_password varchar(25),
registrationDate date
)
create table Friends
(
id_user int not null
constraint user_friends_fk foreign key(id_user) references Users(id)
)
create table Friends
(
UserID int REFERENCE... | true |
11b5a26ad14e23af9bd966e9ab2cae7f7dbc8bef | SQL | midorixinxie/RhythmGame | /Scratch/Michelle/FixedFinalDB.sql | UTF-8 | 3,810 | 3.375 | 3 | [] | no_license | BEGIN TRANSACTION;
CREATE TABLE `specilistRepairCenter` (
`Name` TEXT,
`address` TEXT,
`phone` INTEGER PRIMARY KEY,
`emailAddress` TEXT,
`expectedDeliveryDate` TEXT,
`individualCostsForVehicleAndParts` NUMERIC,
`expectedReturnDate` TEXT,
`RegistrationNumber` TEXT,
`PartsID` INTEGER,
FOREIGN KEY(RegistrationNu... | true |
7690ec94764a2ff0c65bd1be27c469e63dbbfe2f | SQL | mpiligaddi/backend | /prisma/migrations/20210729171827_formats/migration.sql | UTF-8 | 392 | 3.734375 | 4 | [] | no_license | -- AlterTable
ALTER TABLE "Chain" ADD COLUMN "formatId" TEXT;
-- CreateTable
CREATE TABLE "Format" (
"id" TEXT NOT NULL,
"name" TEXT NOT NULL,
PRIMARY KEY ("id")
);
-- CreateIndex
CREATE UNIQUE INDEX "Format.name_unique" ON "Format"("name");
-- AddForeignKey
ALTER TABLE "Chain" ADD FOREIGN KEY ("for... | true |
d1caef152451a9dfc5a9f72d69a5fb2035c2a8d5 | SQL | himawanTIF/pwd-5 | /akademik.sql | UTF-8 | 2,229 | 3.3125 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Nov 05, 2020 at 03:16 PM
-- Server version: 10.4.14-MariaDB
-- PHP Version: 7.4.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... | true |
7f9c11c34676fc126bcb8d2d9758bee8c2512936 | SQL | derkche/bamazon | /bamazon.sql | UTF-8 | 1,230 | 3.140625 | 3 | [] | no_license | DROP DATABASE IF EXISTS bamazon;
CREATE DATABASE bamazon;
USE bamazon;
CREATE TABLE products(
item_id INT NOT NULL AUTO_INCREMENT,
product_name VARCHAR(50),
department_name VARCHAR(50),
price DECIMAL(30,2),
stock_quantity INT(50),
PRIMARY KEY(item_id)
);
INSERT INTO products (product_name, de... | true |
7f8d1f0fb32ef5ab233113ee0359281b1303e273 | SQL | LSSprog/Spring_p1_Security | /src/main/resources/db/migration/dao/V1__init.sql | UTF-8 | 787 | 3.375 | 3 | [] | no_license | CREATE TABLE score_tbl (
score_id INT NOT NULL,
score_fld INT NOT NULL,
PRIMARY KEY (score_id)
);
INSERT INTO score_tbl (score_id, score_fld)
VALUES
(1, 50),
(2, 100);
CREATE TABLE users_tbl (
user_id BIGSERIAL,
username_fld VARCHAR(255) NOT NULL,
passw... | true |
93c4a40bdd52abc819931328c9c89f40f35b229f | SQL | NickWilsonDev/PhantomClosetBackend | /db_util.sql | UTF-8 | 2,271 | 3.953125 | 4 | [] | no_license | -- db_util.sql
/*
psql -d postgres -f ./db_util.sql ====> creates db and tables
psql -d pc ==========> opens up db in terminal
psql -f [file.sql] -U ubuntu -d [dbname]
*/
DROP DATABASE IF EXISTS pc;
CREATE DATABASE pc;
-- single line comment
/* multi line comment */
\c pc;
CREATE TABLE users (
ID SERIAL PRIMARY... | true |
fb33da726cde2e4ca307f3e104c6427ceb044bd0 | SQL | ElliottGerm/WebPortal | /db/config_db.sql | UTF-8 | 4,918 | 3.078125 | 3 | [] | no_license | CREATE DATABASE IF NOT EXISTS `webportal_db_seed` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci */;
USE `webportal_db_seed`;
-- MySQL dump 10.13 Distrib 8.0.18, for Win64 (x86_64)
--
-- Host: localhost Database: webportal_db
-- ------------------------------------------------------
-- Server ve... | true |
e8be5f46ffaf3da4879a9c51b946b6fc2dd9904e | SQL | tri7/dbv | /data/schema/videos_BEFORE_INSERT.sql | UTF-8 | 995 | 3.390625 | 3 | [] | no_license | CREATE DEFINER=`root`@`localhost` TRIGGER `cpm`.`videos_BEFORE_INSERT`
BEFORE INSERT ON `cpm`.`videos`
FOR EACH ROW
begin
declare filme_flag tinyint(11) default 0;
declare proc_vf tinyint(1) default 0;
declare proc_fi tinyint(1) default 0;
declare proc_rt tinyint(1) default 0;
# video_format_id
set proc_v... | true |
ba823a68af4b3a1e2fac0c17824e0049f98f5e52 | SQL | mikestevenson86/SQL-Repository | /Mike S Queries/Archives/00 Archive 2014/06 June/Client Services.sql | UTF-8 | 1,711 | 3.171875 | 3 | [] | no_license | SELECT
SUM(case when c.Services_Taken_AI_Only_HS__c = 'true' then 1 else 0 end) [HS A&I Only],
SUM(case when c.Services_Taken_AI_Only__c = 'true' then 1 else 0 end) [A&I Only],
SUM(case when c.Services_Taken_Advice_Only_HS__c = 'true' then 1 else 0 end) [HS Advice Only],
SUM(case when c.Services_Taken_Advice_Only__c =... | true |
e97eff8096dbc4c9198adf44835dff9d4286df3c | SQL | heon24500/PS | /Programmers/Practice SQL/59047.sql | UTF-8 | 116 | 2.84375 | 3 | [] | no_license | SELECT ANIMAL_ID, NAME
FROM ANIMAL_INS
WHERE ANIMAL_TYPE = 'Dog' AND UPPER(NAME) LIKE ('%EL%')
ORDER BY UPPER(NAME); | true |
246490b6f57ef524422200a38d043fe803d8394b | SQL | lanaflonform/Developper-la-persistance-des-donnees | /2 - Mettre en place une base de données/1 - Créer la base de données/Phase 2/Exercice 1/exercice1.sql | UTF-8 | 716 | 3.609375 | 4 | [] | no_license | -- Drops the database Exercise1 only if it already exists
DROP DATABASE IF EXISTS `Exercise1`;
-- Creates the database
CREATE DATABASE `Exercise1`;
-- Makes Exercise1 the currently used database
USE `Exercise1`;
CREATE TABLE `Personne` (
`per_num` INT NOT NULL,
`per_nom` VARCHAR(50),
`per_prenom` VARCHAR(30),
... | true |
06ba78c43506fc0833ed8cfa542df69a99b32422 | SQL | tiffzhong/comp | /db/init.sql | UTF-8 | 1,202 | 3.984375 | 4 | [] | no_license | create table if not exists users (
user_id serial primary key,
city varchar(50)
);
create table if not exists user_bio(
bio_id serial primary key,
bio_interest text
);
select * from users;
select * from user_bio;
insert into users(user_id, city)
values(1, 'San Francisco');
insert into users(user_id, city)
select *... | true |
e0bdfa5d59a8bc8e6ec1a1c3c6365168ce044374 | SQL | koczanovitz/SQLite_TRAINING | /course/01_DQL/14_group_by.sql | UTF-8 | 2,097 | 4.03125 | 4 | [] | no_license | -- Utworzenie tabeli
CREATE TABLE website.sales_012021 (
id INTEGER PRIMARY KEY,
employee_id INTEGER NOT NULL,
amount REAL NOT NULL
);
-- Wstawianie kilku rekordów do tabeli
INSERT INTO website.sales_012021 (employee_id, amount)
VALUES (325, 109.0),
(335, 9.89),
(336, 40.0),
(325, 210.0),... | true |
6dc47e5113f4f7a7ea714c4a15ab1fef9dc4d8a9 | SQL | mattfenwick/WebPage | /src/tennis/byWeek.sql | UTF-8 | 350 | 3.21875 | 3 | [] | no_license |
use tennis;
drop view if exists v_week_rankings;
create view v_week_rankings as
select
monday,
avg(age) as `average age`,
max(age) as `max age`,
min(age) as `min age`
from
v_ages
group by
monday;
drop view if exists v_weeks_countries;
create view v_weeks_countries as
select distinct
monday,
cou... | true |
2aa16f7cd672a26ae3884981d65e57d623d11220 | SQL | aldi-dimara/PostgreSQL-Learning | /Complete SQL Bootcamp/Assessment Test 2/12.sql | UTF-8 | 218 | 3.84375 | 4 | [] | no_license | SELECT facilities.facid, SUM(bookings.slots) AS Slots
FROM cd.facilities
INNER JOIN cd.bookings ON cd.facilities.facid = bookings.facid
WHERE EXTRACT(MONTH FROM starttime) = 9
GROUP BY facilities.facid
ORDER BY Slots
| true |
79b5b8994d3b76f953037a53061965065e1e8bc1 | SQL | iglarracoechea/sql | /eliminardatos.sql | UTF-8 | 317 | 2.6875 | 3 | [] | no_license | /*truncate table empleados; -- borra los datos de la tabla
drop table empleados; -- borra por completo(Estructur)la tabla, incluyendo columnas.
drop database if exists empresa */ -- borra por completo la base de datos.
create table empleados(idempleados int primary key, nombres varchar(30), cargo varchar(20)); | true |
9b3152a1dd616847c9a93a2176674a8555b7fd2e | SQL | OrionJoshi/SQL | /sql-fromatting-output/problem7.sql | UTF-8 | 829 | 3.5625 | 4 | [] | no_license | -- 7. Write a SQL statement to make a report with salesman ID, order date and highest purchase amount
-- in such an arrangement that, the smallest salesman ID will come first along with their smallest order date.
-- Sample table: orders
-- ord_no purch_amt ord_date customer_id salesman_id
-- --------... | true |
026da9d45962dd6fdc938e2daa0a7465816b8938 | SQL | librar127/PythonDS | /Leetcode/SQL/Hard/1645.sql | UTF-8 | 1,475 | 4.65625 | 5 | [] | no_license | -- Write your MySQL query statement below
WITH Recursive months AS
(
SELECT
1 as month
UNION ALL
SELECT
month + 1
FROM
months
WHERE
month < 12
),
driver_joined AS
(
SELECT
month,
ifnull(count(distinct driver_id), 0) drivers_joined
FROM
... | true |
b4d87654c0b91be6031387728d369a0253713bf8 | SQL | mprokunin/MSSQL | /Performance/queries that are currently waiting.sql | UTF-8 | 442 | 3.15625 | 3 | [] | no_license | Select CP.query_plan,
SQLText = SUBSTRING(st.text, (R.statement_start_offset/2)+1,
((CASE R.statement_end_offset
WHEN -1 THEN DATALENGTH(st.text)
ELSE R.statement_end_offset
END - R.statement_start_offset)/2) + 1),
R.*
From sys.dm_exec_requests R
Cross Apply sys... | true |
cb9213e98745cb5c2a8ea8529fe114f0def3d527 | SQL | rkrx/eav-test | /src/eav.sql | UTF-8 | 13,794 | 3.71875 | 4 | [
"MIT"
] | permissive | DELIMITER //
DROP FUNCTION IF EXISTS rkr$eav$entity$attribute$get //
CREATE FUNCTION rkr$eav$entity$attribute$get(arg_entity_id CHAR(36) CHARSET latin1, arg_attribute VARCHAR(255) CHARSET latin1, arg_default LONGTEXT CHARSET utf8)
RETURNS LONGTEXT CHARSET utf8
SQL SECURITY INVOKER
DETERMINISTIC
BEGIN
DECLARE xId ... | true |
d125427c314ab7e52927fef594720ed2df1c1b8d | SQL | gl3n0n/TPJ_System | /Documents/StoredProcedures/SP_GET_SSS_CONTRIBUTION_ER_EE.sql | UTF-8 | 1,195 | 3.15625 | 3 | [] | no_license | create or replace procedure sp_get_sss_contribution_er_ee
( p_salary in number,
p_ee out number,
p_er out number,
p_ecer out number
)
is
nER Number(8,2);
nEC Number(8,2);
nECER Number(8,2);
begin
select sss_er, sss_ee, ec_er
into nER, nEC, nECER
from pys_sss_t... | true |
e56b56a93fba459a09d0856cf0cbf6f807144d27 | SQL | Meriem2713/DataBaseCinema | /scenarios/test_2_new_wins.sql | UTF-8 | 994 | 3.3125 | 3 | [] | no_license | /* * * * *
** -- test 2
** -- Inserting new wins testing..
** --
* * * * */
\! clear -- to clear the screen --
-- insert a new MOVIE
delete from MOVIE where title_movie = 'movieDiderot'; -- to avoid duplicating during tests
insert into MOVIE(title_movie, kind_movie ,release_date, company ,star_actor)
va... | true |
b6de37785eff68442372298efdde74cbbcdd068b | SQL | zuoxiaojun/sql | /交通费报销单增加费用承担人字段.~sql | GB18030 | 452 | 3.15625 | 3 | [] | no_license |
--ͨѱӷóеֶ
select distinct(zyx5) from er_bxzb;
select distinct(zyx6) from er_bxzb;
select distinct(zyx7) from er_bxzb
--ʷݷóеΪտ
update er_bxzb set zyx6 = receiver, zyx7 = fydeptid where zyx6 = '~'
--ʷݷóеְ
merge into er_bxzb a
using v_info_ryzj b
on (a.zyx6 = b.pk_psndoc)
when matched then
update set a.zyx5 = b.zj ... | true |
72170f2778c3b03ffaf151d851e86293e005b1d1 | SQL | airtimize/descriptions | /database/postgreSQL/schema.sql | UTF-8 | 1,399 | 3.609375 | 4 | [] | no_license | CREATE DATABASE descriptions WITH OWNER airtimize;
\c descriptions airtimize
CREATE TABLE IF NOT EXISTS hosts (
id SERIAL PRIMARY KEY,
name VARCHAR(30),
pic_url VARCHAR(40)
);
CREATE TABLE IF NOT EXISTS listings_types (
id SERIAL PRIMARY KEY,
type VARCHAR(20)
);
CREATE TABLE IF NOT EXISTS listings (
id ... | true |
354b6817ba467ef3c3a0463d7524e0f0b0b15159 | SQL | ConleyUtz/MyUniMarket | /EnvironmentSetup/my_uni_market_old.sql | UTF-8 | 2,618 | 3.28125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.4
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Mar 22, 2019 at 08:02 AM
-- Server version: 10.1.37-MariaDB
-- PHP Version: 7.3.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
097a3e36e501ce87204472e7ccf27b99a8b4580b | SQL | mcatala90/Facturas-KM-group | /islatec.sql | UTF-8 | 15,809 | 3.265625 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1:3306
-- Tiempo de generación: 17-08-2019 a las 17:31:34
-- Versión del servidor: 5.7.19
-- Versión de PHP: 7.0.23
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/... | true |
98d1897a6409872417e951bae448367eba6f90d9 | SQL | CrisisCleanup/crisiscleanup-2 | /actions_admin/Delete Contact by Email and Org ID.sql | UTF-8 | 253 | 2.59375 | 3 | [
"Apache-2.0"
] | permissive | SET old.contact_email = '';
SET the.org_id = '';
DELETE FROM legacy_contacts WHERE legacy_contacts.email = CAST(current_setting('old.contact_email') AS text) AND legacy_contacts.legacy_organization_id = CAST(current_setting('the.org_id') AS integer); | true |
d86590d451fcbe2288d062185e916dea466e0867 | SQL | Nyle66/TP_VIN | /BDD.sql | UTF-8 | 3,076 | 3.546875 | 4 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.6.5.2
-- https://www.phpmyadmin.net/
--
-- Client : localhost:3306
-- Généré le : Jeu 02 Novembre 2017 à 10:11
-- Version du serveur : 5.6.35
-- Version de PHP : 7.1.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
--
-- Base de données : `vins`
--
-- -----... | true |
8b494541ea59fd00533362fa9a0f04726c0bd39c | SQL | IdoShalev/opticnav | /DB/Triggers/check_username_trigger.sql | UTF-8 | 717 | 3.53125 | 4 | [
"MIT"
] | permissive | /* *********************************************************************
** Description: This trigger checks if the username is an empty
** string before inserting it into the WEB_ACCOUNT table
** Throws: error 45000 with an appropriate message
*************************************************... | true |
ec310ba517b3c3525b1a4a5c048cc90fe4872958 | SQL | jampaniuday/oracle_ETL_Monitoring | /dwmon_views_v3.sql | ISO-8859-7 | 20,002 | 3.65625 | 4 | [] | no_license | /**************************************
DWH usage monitoring views
2008-09-03
1. add views from BO auditor
2008-10-08
1. add a view for owb objects
2008-10-10 (version 2)
1. add more categories for users to KPI views
2008-10-15 (version 3)
1. produce also daily report for all days in sysdate - 7
last update... | true |
440a3a859baf71eafe5aeb32798acb4c37c7b1bd | SQL | thorwbm/lixiera_sql | /organizar/exams/sae/santoanjo_dombosco/CARGA_AGENDAMENTO_ULTIMA_SEMANA_db_sa.sql | ISO-8859-1 | 5,718 | 3.8125 | 4 | [] | no_license | select distinct serie from TMP_IMP_ESCOLA_AGENDAMENTO_ULTIMA_SEMANA where serie in ()
select reverse( ltrim(rtrim(left(reverse(exc.name),charindex( '-',reverse(exc.name))-1)))),*
from exam_collection exc where exc.name like 'Desafio SAE % 3BI%'
drop table #temp_carga
-------- CRIAR TABELA TEMPORARIA PARA CARGA -... | true |
991379629c7593559d018e7104c263ed8a78d2e9 | SQL | akkeris/controller-api | /sql/select_routes_by_app.sql | UTF-8 | 630 | 3.421875 | 3 | [
"Apache-2.0"
] | permissive | select
routes.route,
routes.app,
routes.site,
sites.tags,
sites.region,
sites.domain,
sites.preview,
apps.name as app_name,
spaces.name as space_name,
routes.source_path,
routes.target_path,
routes.pending,
routes.created,
routes.updated
from
routes
join apps on apps.app = routes.a... | true |
6e3ad70d6d105756452272985b196ea794aa5ca2 | SQL | otrofree/prueba | /problema3/server/prisma/migrations/20210310230714_init/migration.sql | UTF-8 | 3,026 | 3.671875 | 4 | [] | no_license | /*
Warnings:
- The migration will change the primary key for the `Libro` table. If it partially fails, the table could be left without primary key constraint.
- You are about to drop the column `id` on the `Libro` table. All the data in the column will be lost.
- You are about to drop the column `prestamoId` o... | true |
066ac454cd916c02f7b8d3f735d0184011a11925 | SQL | gopi158/Sample | /FinaoDb/Stored Procedures/videotilescount.sql | UTF-8 | 313 | 3.140625 | 3 | [] | no_license | DELIMITER //
CREATE PROCEDURE videotilescount (IN userid INT)
BEGIN
SELECT user_tileid FROM `fn_user_finao_tile` ft JOIN fn_user_finao fu ON fu.`user_finao_id` = ft.`finao_id` WHERE ft.userid =userid AND Iscompleted =0 AND finao_activestatus !=2 AND finao_status_Ispublic =1 GROUP BY tile_id;
END //
DELIMITER //
| true |
27cd0a7d8b62c4ae4a0de4930a2540ad491eb6c8 | SQL | alexeypustynnikov/MathPuzzle | /MathPuzzle.sql | UTF-8 | 893 | 3.625 | 4 | [] | no_license | with t as (
select exp,
MathPuzzle.get_infix_from_postfix(exp) formula--,
--MathPuzzle.substitute_letter_to_numbers(MathPuzzle.get_infix_from_postfix(exp),3,22,14,5)
from rpn_combinations t
where MathPuzzle.calculator(MathPuzzle.substitute_letter... | true |
376de293c7e0cfee08693e060baf77d73aa5be94 | SQL | DpadamsX/DpadamsX | /passthrough/master_views/musc_orscansinout.sql | UTF-8 | 746 | 2.765625 | 3 | [] | no_license | /*
This view UNIONs all versions of the passthrough format for this DataSet.
Comment out or remove any obsolete versions.
Update earlier versions, as needed, to produce the same column names as the latest version.
*/
-- View: passthrough.musc_orscansinout
DROP VIEW IF EXISTS passthrough.musc_orscansinout;
CREATE O... | true |
d61c5d8b0c584e4c992375ae0d6f072c5447717e | SQL | 970263611/fileShareDemo | /sql.sql | UTF-8 | 2,666 | 3.015625 | 3 | [] | no_license | /*
Navicat Premium Data Transfer
Source Server : 106.13.143.186
Source Server Type : MySQL
Source Server Version : 80018
Source Host : 106.13.143.186:3306
Source Schema : test
Target Server Type : MySQL
Target Server Version : 80018
File Encoding : 65001
Date: 07/12/... | true |
f962a466125a37d2d43e6ea1daae0d5feca8c094 | SQL | v3921358/Lidium | /sql/seperate/55-mtsCarts.sql | UTF-8 | 329 | 2.828125 | 3 | [
"Apache-2.0"
] | permissive | CREATE TABLE IF NOT EXISTS `mts_cart` (
`id` int(10) UNSIGNED NOT NULL,
`characterid` int(11) NOT NULL DEFAULT 0,
`itemid` int(11) NOT NULL DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC;
ALTER TABLE `mts_cart`
ADD PRIMARY KEY (`id`),
ADD KEY `characterid` (`characterid`),
ADD KEY `id`... | true |
2bbb5fd334a75430b775b5389ed23791444b5df4 | SQL | zhangxugi/Springboot-angular6 | /sql.sql | UTF-8 | 674 | 2.984375 | 3 | [] | no_license | CREATE TABLE `employee` (
`empid` bigint(20) NOT NULL AUTO_INCREMENT,
`firstname` varchar(255) DEFAULT NULL,
`lastname` varchar(255) DEFAULT NULL,
`gender` varchar(255) DEFAULT NULL,
`dob` varchar(255) DEFAULT NULL,
`department` varchar(255) DEFAULT NULL,
PRIMARY KEY (`empid`)
)
drop table employee
INSER... | true |
4a3c9983f87d0dd9a243ddbc70c899ed5e6fcd00 | SQL | lindacoco/native_jdbc_hikaricp | /Scripts/test.sql | UTF-8 | 568 | 3.375 | 3 | [] | no_license | select user(), database ();
select * from department d ;
select deptno, deptname, floor from department d ;
desc employee;
select e.empno, e.empname, e.title, m.empname as manager_name, e.manager as manager_no, e.salary, e.dno ,deptname
from employee e left join employee m on e.manager = m.empno left join de... | true |
0ddeb4d5490432bde9017db15ece404c89cdc5e5 | SQL | cowboybebophan/SneakerShop | /src/main/resources/db/migration/V1__create_all_tables.sql | UTF-8 | 1,408 | 3.875 | 4 | [] | no_license | DROP TABLE IF EXISTS customer CASCADE;
DROP TABLE IF EXISTS sneaker_order CASCADE;
DROP TABLE IF EXISTS product CASCADE;
CREATE TABLE customer (
/*id INTEGER NOT NULL default next val */
id SERIAL NOT NULL,
name VARCHAR(30) not null unique,
email VARCHAR... | true |
a4e62d5261031d6c18dc2fab4e770e785b752454 | SQL | tomasz-sroka/dbrx-repository | /show_gc.sql | UTF-8 | 1,546 | 3.703125 | 4 | [] | no_license | -- GLOBAL CACHE CR PERFORMANCE
-- This shows the average latency of a consistent block request.
-- AVG CR BLOCK RECEIVE TIME should typically be about 15 milliseconds depending
-- on your system configuration and volume, is the average latency of a
-- consistent-read request round-trip from the requesting instance ... | true |
fb4acdbe9416015a1a099704e1946306bedde336 | SQL | enriquecatala/SQLServerScalarUDFPerformance | /SQLServerScalarUDFPerformance/inmemory/Tables/Random_Strings_InMemoryHASH.sql | UTF-8 | 485 | 3.40625 | 3 | [] | no_license | /*
The database must have a MEMORY_OPTIMIZED_DATA filegroup
before the memory optimized object can be created.
The bucket count should be set to about two times the
maximum expected number of distinct values in the
index key, rounded up to the nearest power of two.
*/
CREATE TABLE inmemory.[Random_Strings_InMemory... | true |
a1fcc088c2d99fd13f4b8b3da2a20d1950f67934 | SQL | kienvt14/Assignment | /ASSignment_database_library.sql | UTF-8 | 1,170 | 3.453125 | 3 | [] | no_license | CREATE DATABASE LibraryAssiment
USE LibraryAssiment
CREATE TABLE Borrows
(
Id_Borrow int PRIMARY KEY IDENTITY,
Id_student int,
Id_Book int ,
takendate date,
broughtdate date,
CONSTRAINT FK_Borrows_Books
FOREIGN KEY (Id_Book)
REFERENCES Books(Id_Book),
CONSTRAINT FK_Borrows_student
FOREIGN KEY (Id_student)
... | true |
5e1b59ebe941c169e370b04083671043ad3fc899 | SQL | tgtn007/LeetCode-Solutions | /customer who never order.sql | UTF-8 | 705 | 4.09375 | 4 | [] | no_license | # Write your MySQL query statement below
-- SCHEMA
/**
Create table If Not Exists Customers (Id int, Name varchar(255));
Create table If Not Exists Orders (Id int, CustomerId int);
Truncate table Customers;
insert into Customers (Id, Name) values ('1', 'Joe');
insert into Customers (Id, Name) values ('2', 'H... | true |
360ec5b95c47b68b0388a1dd2373ef12b3f2482c | SQL | 513Kernal/pair-week-5 | /05_Review/review-student/postgres/step-4.sql | UTF-8 | 2,693 | 4.28125 | 4 | [] | no_license | -- select the park name, campground name, open_from_mm, open_to_mm & daily_fee ordered by park name and then campground name
SELECT park.name AS park_name, campground.name AS campground_name, open_from_mm, open_to_mm, daily_fee
FROM park
JOIN campground ON campground.park_id = park.park_id
ORDER BY park.name, campgrou... | true |
03c8026019528b4851739ae164182e5449981296 | SQL | Stubborn-Ant/tianchi_fish_2020_mse | /create_table.sql | UTF-8 | 446 | 2.515625 | 3 | [] | no_license | SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for train
-- ----------------------------
DROP TABLE IF EXISTS `train`;
CREATE TABLE `train` (
`id` int(11) NOT NULL COMMENT '渔船id',
`x` double DEFAULT NULL,
`y` double DEFAULT NULL,
`speed` float DEFAULT NULL,
`direction` varchar(2... | true |
fb675114ef65999a657111b1a787ec5a2c5838c1 | SQL | cristianhoyos66/asdesilla | /Asdesilla_db_tablas 06-12-15.sql | UTF-8 | 17,355 | 2.84375 | 3 | [] | no_license | DROP DATABASE IF EXISTS asdesilla_db;
CREATE DATABASE asdesilla_db;
USE asdesilla_db;
DROP TABLE IF EXISTS tbl_terapias_alternativas;
DROP TABLE IF EXISTS tbl_area_psicosocial;
DROP TABLE IF EXISTS tbl_fonoaudiologia;
DROP TABLE IF EXISTS tbl_fisioterapia;
DROP TABLE IF EXISTS tbl_evaluacion;
DROP TABLE IF EXIS... | true |
84de1ea82b9111c198ae025330748b30f01f23ff | SQL | devcavalcante/my-way | /gama_accenture/semana2/delete_grupo2.sql | UTF-8 | 1,415 | 3.9375 | 4 | [] | no_license | -- Realizar atualização dos nomes dos clientes colocando ao final do nome o status de "Ativo" ou Inativo, usando como filtro o campo IC_SITUACAO
-- Atualizar a data de saldo para amanha (sysdate + 1) todas as agencias cujo codigo seja menor que 30
-- Excluir clientes que possuem situação diferente de "Ativo", IC_SITU... | true |
e79a56c14be4c5065c0b9b6d915b19e558c43307 | SQL | sbeparey/databases | /src/Northwind/Mysql/Tables/08. EmployeeTerritories.sql | UTF-8 | 382 | 3.3125 | 3 | [] | no_license | DROP TABLE IF EXISTS employee_territories;
CREATE TABLE employee_territories (
employee_id SMALLINT NOT NULL,
territory_id VARCHAR(20) NOT NULL,
CONSTRAINT pk_employee_territories PRIMARY KEY (employee_id, territory_id)
);
CREATE INDEX ix_employee_territories__employee_id__territ... | true |
4d8b1801d6be9cacba40768d85747489117fa796 | SQL | Bhaskers-Blu-Org1/example-health-synthea | /sqlite/createAppointments.sql | UTF-8 | 1,699 | 3.328125 | 3 | [
"Apache-2.0",
"LicenseRef-scancode-dco-1.1",
"LicenseRef-scancode-public-domain"
] | permissive | ------------------------------------------------------------------------------
-- Copyright 2019 IBM Corp. 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
--
-- ... | true |
d576cb58fe16bb5d07b4c03d683788e454a9a971 | SQL | Preeti0118/SQL.PostalCodes | /answers/exercise6.sql | UTF-8 | 241 | 3.109375 | 3 | [] | no_license | Write a Query that returns the city, state and number of instances of all of the timezones that have pipes (`|`) in them.
SELECT city, state, COUNT(timezone)
FROM zipcodes
WHERE timezone like '%|%'
GROUP BY city, state
ORDER BY city, state; | true |
132d620f586da6686f22c3b62f1148e14d2e6820 | SQL | ewin66/old-school-projects | /flankerbase/flankerbase_blog/CreateDB/Create Scripts/.svn/text-base/CreateTables.sql.svn-base | UTF-8 | 734 | 3.828125 | 4 | [] | no_license | CREATE TABLE [Blogs]
(
[ID] [int] IDENTITY(1,1) NOT NULL,
[Code] [nvarchar](255) NOT NULL,
[Title] [nvarchar](255) NOT NULL,
[Content] [nvarchar](max) NOT NULL,
[Created_at] [datetime] NOT NULL,
[Updated_at] [datetime] NOT NULL,
CONSTRAINT [PK_Blogs_ID] PRIMARY KEY
(
[ID] ASC
)
)
CREATE TABL... | true |
8cb574dc88d8ec969cda350ff74d88461274d6fe | SQL | wannaphong/php-database-library-nkc | /database/dbnkc-8-12-2018-18-43.sql | UTF-8 | 8,384 | 3.328125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.6.6deb4
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Dec 08, 2018 at 06:43 PM
-- Server version: 10.1.23-MariaDB-9+deb9u1
-- PHP Version: 7.0.30-0+deb9u1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_... | true |
c070d9cf3be0fcfe3fe21af799cf888d91cde0b7 | SQL | soren121/rallyme | /database.sql | UTF-8 | 3,128 | 3.625 | 4 | [] | no_license | SET NAMES utf8;
USE `rallyme`;
# Create rallyme user
GRANT ALL ON `rallyme`.* TO 'rallyme'@'localhost' IDENTIFIED BY 'admin';
CREATE TABLE IF NOT EXISTS `users` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`username` varchar(50) NOT NULL,
`password` varchar(256) NOT NULL,
`email` varchar(120) NOT ... | true |
21f47ea0194668cd930477abe8ea83d6a50757e2 | SQL | htankhai/LinkPagesRepo | /J2EEApplicationCustomerProblemReport/database/reload.sql | UTF-8 | 17,310 | 2.5625 | 3 | [] | no_license | CREATE DATABASE IF NOT EXISTS support;
USE support;
DROP TABLE IF EXISTS customers;
DROP TABLE IF EXISTS custprod;
DROP TABLE IF EXISTS departments;
DROP TABLE IF EXISTS employees;
DROP TABLE IF EXISTS events;
DROP TABLE IF EXISTS nextproblemid;
DROP TABLE IF EXISTS problems;
DROP TABLE IF EXISTS problog;
DROP TABLE ... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.