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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
bbf36ee47593dc8223e343f016809faf8db4408c | SQL | emiliano-sangoi/capacitacion-plsql | /clase5/tp5_ej3.sql | WINDOWS-1252 | 1,299 | 3.921875 | 4 | [] | no_license | /*
Cree un procedimiento para realizar la copia mensual de las ventas
realizadas por los vendedores.
a) Cree un cursor con los vendedores que no son ni GERENTE DE SEGMENTO
ni SUPERVISOR.
b) Escriba un loop FOR de cursor para leer los datos requeridos por la
tabla HISTORIA_VTAS.
... | true |
12858b0dd10de3c1c2c2b866d76511b0987ebb64 | SQL | codewnw/JM3190810 | /src/com/jm3190810/hibernate/association/onetoone/uni/one-to-one-uni.sql | UTF-8 | 330 | 2.9375 | 3 | [] | no_license | CREATE TABLE JM3190810_OTO_UNI_ENGINE(
ID BIGINT AUTO_INCREMENT,
NAME VARCHAR(50),
SPEED NUMBER,
PRIMARY KEY(ID)
)
CREATE TABLE JM3190810_OTO_UNI_CAR(
ID BIGINT AUTO_INCREMENT,
NAME VARCHAR(50),
COLOR VARCHAR(20),
ENGINE_ID BIGINT,
PRIMARY KEY(ID),
FOREIGN KEY(ENGINE_ID) REFERENCES JM3190810_OTO_UNI_ENG... | true |
2c18e4260b5aad96ff492107e687de9fd510de24 | SQL | ManuBedoya/holbertonschool-higher_level_programming | /0x0E-SQL_more_queries/12-no_genre.sql | UTF-8 | 255 | 3.609375 | 4 | [] | no_license | -- PRINT SHOWS THAT DON'T HAVE GENRE LINKED
SELECT tv_shows.title, tv_show_genres.genre_id
FROM tv_shows
LEFT JOIN tv_show_genres
ON tv_shows.id = tv_show_genres.show_id
WHERE tv_shows.id IS NULL
OR tv_show_genres.show_id IS NULL
ORDER BY tv_shows.title;
| true |
07e8459b643bc71cfc4f4547dcaba280e4e80b2e | SQL | SamOrozco/infintory | /conf/evolutions/default/1.sql | UTF-8 | 2,977 | 3.234375 | 3 | [] | no_license | # --- Created by Ebean DDL
# To stop Ebean DDL generation, remove this comment and start using Evolutions
# --- !Ups
create table environment (
environment_id integer,
environment_key varchar(255),
create_date timestamptz
);
create table inventory (
invento... | true |
9ee211f27237e5681b3b27fd9e265eeb4bb1d035 | SQL | Fahmi36/wkowkowko | /database/pelayanan (8).sql | UTF-8 | 53,752 | 3.0625 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Sep 11, 2019 at 02:33 AM
-- Server version: 10.1.36-MariaDB
-- PHP Version: 7.2.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... | true |
555355755c67d9b0a1cfb62d14d9426332bf96d4 | SQL | sha1y/student-service | /src/main/resources/schema.sql | UTF-8 | 214 | 2.640625 | 3 | [] | no_license | DROP TABLE IF EXISTS STUDENT;
CREATE TABLE STUDENT (
studentId INT AUTO_INCREMENT PRIMARY KEY,
forename VARCHAR(50) NOT NULL,
surname VARCHAR(50) NOT NULL,
dob VARCHAR(50) NOT NULL,
postcode INT NOT NULL
); | true |
d51a617dad41e00ec03a9e8af6b7689f25f7a02d | SQL | reklawnos/werblerg | /setup.sql | UTF-8 | 577 | 3.46875 | 3 | [
"MIT"
] | permissive | CREATE TABLE IF NOT EXISTS posts (
source TEXT NOT NULL,
html TEXT NOT NULL,
synopsis TEXT NOT NULL,
title TEXT NOT NULL,
date TIMESTAMP WITH TIME ZONE NOT NULL,
id SERIAL UNIQUE NOT NULL PRIMARY KE... | true |
9f8e461fe7bf86c8c5b4d701fa02767cc3273cf2 | SQL | filip-plata/CS_Masters | /year_I/ZBD/cassandra/query.sql | UTF-8 | 1,726 | 4.28125 | 4 | [] | no_license | EXPLAIN ANALYZE WITH
player_team_battles AS (
SELECT
sum(CASE WHEN t1.crownsEarned > t2.crownsEarned THEN 1 ELSE 0 END) AS wins,
sum(CASE WHEN t1.crownsEarned = t2.crownsEarned THEN 1 ELSE 0 END) AS ties,
sum(CASE WHEN t1.crownsEarned < t2.crownsEarned THEN 1 EL... | true |
b57ee83dd48c029216c8509a179fd1dd97d56936 | SQL | NorthNern/superchargers | /db/migrations/20161101001135_AddIndexesToLocations.sql | UTF-8 | 496 | 3.03125 | 3 | [
"MIT"
] | permissive |
-- +goose Up
-- SQL in section 'Up' is executed when this migration is applied
CREATE INDEX index_locations_on_region ON locations(region);
CREATE INDEX index_locations_on_country ON locations(country);
CREATE INDEX index_locations_on_location_type ON locations USING GIN(location_type);
-- +goose Down
-- SQL section ... | true |
abaa83327852a043c4f1e7877434f5ae00dabaa5 | SQL | sprokushev/Delphi | /MASTER/_DATABASE/Views/V_SNP_DISP_AZS_OPER_WEEK_PSV.sql | WINDOWS-1251 | 1,467 | 3.5625 | 4 | [] | no_license | --
-- V_SNP_DISP_AZS_OPER_WEEK_PSV (View)
--
CREATE OR REPLACE FORCE VIEW MASTER.V_SNP_DISP_AZS_OPER_WEEK_PSV
(STORE_RN, NOMEN_RN, OUT_O_1_VOL, OUT_O_1_MAS, OUT_O_2_VOL,
OUT_O_2_MAS, OUT_O_3_VOL, OUT_O_3_MAS, OUT_O_4_VOL, OUT_O_4_MAS,
OUT_O_5_VOL, OUT_O_5_MAS, OUT_O_6_VOL, OUT_O_6_MAS, OUT_O_7_VOL,
OUT_O_7_MAS)... | true |
38a3acd11a895a4002d36fabc1086471ecf135a8 | SQL | ice24for/spring-boot-project | /sql/flowsystem.sql | UTF-8 | 2,379 | 2.90625 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : localhost_3306
Source Server Version : 50723
Source Host : localhost:3306
Source Database : flowsystem
Target Server Type : MYSQL
Target Server Version : 50723
File Encoding : 65001
Date: 2019-07-06 08:57:28
*/
SET FOREIGN_KEY_CHECKS=... | true |
ff0996314c198df009df530189845dbd1f712ef6 | SQL | gitcegamesssssss/EMENU-documentation | /Resource/Database/e-menu-database.sql | UTF-8 | 1,788 | 3.375 | 3 | [] | no_license | CREATE TABLE `user` (
`id` int PRIMARY KEY AUTO_INCREMENT,
`type` int NOT NULL,
`username` varchar(20) NOT NULL,
`h_password` varchar(20) NOT NULL,
`token` varchar(255)
);
CREATE TABLE `vender` (
`id` int PRIMARY KEY AUTO_INCREMENT,
`u_id` int NOT NULL,
`v_name` varchar(20) NOT NULL,
`o_name` varchar... | true |
657ac71c85945737f9f09a48f9d74bbb31414562 | SQL | monabuttu/SqlChallenge | /Q6.sql | UTF-8 | 391 | 3.90625 | 4 | [] | no_license | --List all employees in the Sales department,
--including their employee number, last name, first name,
--and department name.
SELECT "Employee".emp_no,first_name,last_name,dept_name FROM "Employee"
LEFT JOIN "Department_Employess"
ON "Employee".emp_no = "Department_Employess".emp_no
LEFT JOIN "Department"
ON "Departm... | true |
7a6329fce52d806fe16a6f68ffb92c287c239516 | SQL | Stalli/FarmManagement | /dll/Farm.sql | UTF-8 | 18,970 | 3.171875 | 3 | [] | no_license | Create table Role
(
Id int IDENTITY(1,1) CONSTRAINT PK_Role PRIMARY KEY
,RoleName varchar(200) not null
,InsertDate datetime not null
,UpdateDate datetime
)
Create table [User]
(
Id int IDENTITY(1,1) CONSTRAINT PK_User PRIMARY KEY
,UserName varchar(200)
,Password varchar(Max)
,RoleId INT NOT NULL CONSTRA... | true |
35794ccd522d13aa2009933b67f8823b5de662c5 | SQL | marhuysm/budgetsquirrel | /basicdata.sql | UTF-8 | 9,243 | 2.984375 | 3 | [] | no_license | /*SCRIPT D'AJOUT DE DONNÉES DANS LA DB BUDGETSQUIRREL
À EXECUTER APRÈS initdb.sql */
USE budgetsquirrel;
/*Ajout de quelques utilisateurs de base */
INSERT INTO utilisateur (nom, prenom, niss, date_naissance, photo) VALUES ('Mustermann', 'Erika', '19940307121', '1994-03-07', 'politecat.jpg');
INSERT INTO utilisate... | true |
b7cab1dda1accf3addac6dfebc32b1d33134a9f6 | SQL | chaozhao/DistanceCalculator_PHP | /sql/data_install.sql | UTF-8 | 207 | 2.578125 | 3 | [] | no_license | CREATE TABLE IF NOT EXISTS Coords
(
longitude decimal NOT NULL,
latitude decimal NOT NULL,
distance decimal NOT NULL,
time_stamp timestamp NOT NULL,
CONSTRAINT PRIMARY KEY (time_stamp)
); | true |
b2d762453972c6315d7ae46fcb6eb45e7f14bc45 | SQL | jauyeung91/TheGatorBay | /db/db_schema_patch3.sql | UTF-8 | 5,850 | 3.890625 | 4 | [] | no_license | DROP TABLE images;
DROP TABLE purchased_lists;
DROP TABLE wish_lists;
DROP TABLE watching_lists;
DROP TABLE selling_lists;
DROP TABLE sold_lists;
DROP TABLE private_messages;
DROP TABLE conversations;
DROP TABLE tags;
DROP TABLE listings;
DROP TABLE courses;
DROP TABLE conditions;
DROP TABLE registered_users;
DROP TABL... | true |
ca2c4f40f3c7af0f38a7df6faab0d4b22cd89117 | SQL | PhilippeHeer/Music | /queries/r.sql | UTF-8 | 106 | 2.84375 | 3 | [] | no_license | SELECT name, COUNT(Recording_id) as records
FROM Recording
GROUP BY name
ORDER by records DESC LIMIT 5 | true |
d20a8ddb1e9a4747f5a105ed9d368976ee637bbc | SQL | chkdchkd1/digital-java | /SQL/day2/복습 예제.sql | UTF-8 | 875 | 3.9375 | 4 | [] | no_license | -- 등록된 학생들의 학번과 이름이 출력(검색)되도록 SQL문을 작성하세요.
SELECT st_num, st_name
FROM university.student;
-- 등록된 학생들 중에서 학번이 2020110011인 학생의 모든 정보를 출력하는 sql문을 작성하세요.
select * FROM university.student
where st_num = 2020110011;
-- 등록된 학생들 중에서 학번이 2020110011이 아닌 학생의 모든 정보를 출력하는 sql문을 작성하세요.
select * From student
where st_... | true |
109acb9da43e19065c8058f73628bbcc17de8c0b | SQL | stefism/Projects | /04 C# DataBaseBasic-MS SQL Server-May2020/Exam Preparation 1/08.sql | UTF-8 | 159 | 3.484375 | 3 | [] | no_license | SELECT FirstName, LastName, Age
FROM Tickets AS t
RIGHT JOIN Passengers AS p ON t.PassengerId = p.Id
WHERE t.Id IS NULL
ORDER BY Age DESC, FirstName, LastName | true |
4eb69afecb57ab4c34878a17a328ca8ee0d5173c | SQL | tute/Base-de-datos-Nodo-Comunitario | /nodo_2010-11-30.sql | UTF-8 | 1,059 | 2.84375 | 3 | [] | no_license | DROP TABLE IF EXISTS `computadoras`;
CREATE TABLE `computadoras` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`nombre` varchar(255) NOT NULL DEFAULT '1',
`procesador_id` int(11) NOT NULL DEFAULT '1',
`disco_rigido` varchar(255) NOT NULL DEFAULT '1',
`memoria` varchar(255) NOT NULL DEFAULT '1',
`descartada` tinyi... | true |
a2f4a23b87244b78643e094b429f399ca342e79f | SQL | mdawwas/Regitration | /Registration.sql | UTF-8 | 4,439 | 3.265625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.5.4.1deb2ubuntu2
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: May 30, 2017 at 05:12 PM
-- Server version: 5.7.18-0ubuntu0.16.04.1
-- PHP Version: 7.0.15-0ubuntu0.16.04.4
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_C... | true |
92127122e41e93d43e249cba15e486e68772f479 | SQL | jasarsoft/fit-src | /bp2/predavanja/pred15_q05_cast_convert_parse.sql | UTF-8 | 279 | 2.765625 | 3 | [
"MIT"
] | permissive | --katovanje, konvertiranje i parsiranje
SELECT CAST(SYSDATETIME() AS nvarchar(30));
SELECT CONVERT(varchar(8), SYSDATETIME(), 112);
SELECT CONVERT(char(8), 0x4E616d65, 0) AS 'Stil 0, binarni u tekstualni';
SELECT PARSE('Monday, 13 December 2010' AS datetime2 USING 'en-US');
| true |
524158866f2cdfb40ef84ca01a8ba93d69147b3b | SQL | Dantara/DMD_Assignment | /database/schema.sql | UTF-8 | 6,393 | 3.625 | 4 | [] | no_license | -- Database: DMD Phase 3
-- DROP DATABASE "DMD Phase 3";
CREATE TABLE PATIENT(
pid SERIAL NOT NULL,
name Varchar(50) NOT NULL,
phone_number Char(20),
date_of_birth Date,
medical_history Varchar(50),
room_number INT,
email varchar(50),
password Varchar(20),
PRIMARY KEY(pid),
UNIQUE(medical_history)
... | true |
cec539afa13e49107918bd46e61ce8de864fd5c1 | SQL | pascualmg/Snippets | /ATT/RATIOS_SINIESTROS_AGENCIA.sql | UTF-8 | 927 | 3.640625 | 4 | [] | no_license |
set @fecha_desde='2016-05-31';
set @fecha_hasta='2016-06-16';
set @agencia='%seur%';
/*Siniestrados*/
select count(*)
from
pccom_returns pr
left join
web.compras_datos cd on cd.pedido=pr.firstReference
where
created between @fecha_desde and @fecha_hasta
and pr.typeId=3 and pr.subtypeId=3
and... | true |
0570c6c2b8d8e5bf876d5f4be0d69dc16ccc32f9 | SQL | babu12f/LMS | /library.sql | UTF-8 | 9,447 | 3.203125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.1.14
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Jan 18, 2016 at 08:32 AM
-- 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 |
461d331a5d06d3c9ed99d42ddbc029576f6f7a42 | SQL | samlet/dataset | /create-uk-price-paid.sql | UTF-8 | 618 | 2.734375 | 3 | [] | no_license | CREATE TABLE uk_price_paid
(
price UInt32,
date Date,
postcode1 LowCardinality(String),
postcode2 LowCardinality(String),
type Enum8('terraced' = 1, 'semi-detached' = 2, 'detached' = 3, 'flat' = 4, 'other' = 0),
is_new UInt8,
duration Enum8('freehold' = 1, 'leasehold' = 2, 'unknown' = 0),
... | true |
3f456dc51770e6183c1b3acecfd0294c7c224d21 | SQL | mansi-k/College-Events-Portal | /final.sql | UTF-8 | 32,820 | 3.4375 | 3 | [] | no_license | --
-- Database: `eventsprojectco`
--
-- --------------------------------------------------------
--
-- Table structure for table `carrom`
--
CREATE TABLE IF NOT EXISTS `carrom` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`stud_id` varchar(50) NOT NULL,
`full_name` varchar(30) NOT NULL,
`branch` varchar(4) NOT NU... | true |
7549579b4618cf3bf9a2c85d1f18eab0de643e8a | SQL | SassCompSci/Database-Systems | /csc355Assignment2Script.sql | UTF-8 | 1,889 | 3.875 | 4 | [] | no_license | /*
Kevin Sass
CSC 355 Section 401
Assignment 2
09/30/2019
*/
-- drop any existing table
DROP TABLE BOOKING;
DROP TABLE CUSTOMER;
DROP TABLE TOUR;
-- create tables
CREATE TABLE CUSTOMER
(
CID CHAR(4),
CName VARCHAR2(20),
CPhone CHAR(10),
CONSTRAINT PK_CUSTOMER PR... | true |
b1f1c38025bcf9c49ffebd711c889d457d05eb01 | SQL | jrothrock/sql_examples | /Select/Select Group By.sql | UTF-8 | 3,110 | 4.21875 | 4 | [] | no_license | /*
Author: Jack Rothrock
*/
use salesshort;
# How many customers does the company have?
select count(distinct customerName) as "Number of customers" from customers;
# How many German customers does the company have?
select count(distinct customername) as "Germany customers" from customers where country = "Germany... | true |
563f382ab74baeffe9ace272787d1edf9f6b1211 | SQL | martinatanasov0204/Databases-Advanced-Entity-Framework-February-2017 | /01-exercises-fetching-resultsets-with-ADO.NET/04-add-minion/04-add-minion.sql | UTF-8 | 294 | 3.421875 | 3 | [] | no_license | SELECT vm.VillianId AS [vId],
vm.MinionId AS [mId],
v.VillianName AS [vName] ,
m.MinionName AS [mName],
t.TownName AS [tName]
FROM VilliansMinions as vm
JOIN Villians AS v ON v.Id = vm.VillianId
JOIN Minions AS m ON m.Id = vm.MinionId
JOIN Towns AS t ON t.Id = m.TownId | true |
3f460bb604964f9e601d492b4f31c201e544d68a | SQL | vcavallo/flatiron-assignments | /sql_quiz/grading.sql | UTF-8 | 1,249 | 3.5625 | 4 | [] | no_license |
-- IF choices-correct = 1 MATCH choices-1 WITH answers-choice_id.
-- grade quiz 1 for user 1
SELECT COUNT(*) FROM answers JOIN choices
ON answers.choice_id = choices.id
WHERE correct = 1
AND user_id = 1
AND choices.question_id < 6
GROUP BY user_id
;
-- grade quiz 2 for user 1
SELECT COUNT(*) FROM answer... | true |
9c14dfbe63b6e062746bfa740283abe1868ea42d | SQL | tecnocat/Scripts | /sql/turboquerys.sql | UTF-8 | 3,638 | 3.828125 | 4 | [] | no_license | SELECT COUNT(*), TYPE FROM company_vieja.node GROUP BY TYPE ORDER BY COUNT(*) DESC;
SELECT n.nid, n.vid, n.type, n.title, v.nid, v.vid, v.type, v.title
FROM company_nueva.node n, company_vieja.node v
WHERE n.type = 'album' AND v.type ='acidfree';
SELECT CONCAT('WHEN `term_data`.`tid` = ', vieja.`tid`, ' THEN ', nueva... | true |
5315966b7a27405247a9e6f58866ae1c53d15030 | SQL | DaniellKondoff/Databases----MS-SQL-Server | /08.ExamPreparation 16-OCT-2016/Section 3 Querying - 09. Last 5 Departing Flights.sql | UTF-8 | 856 | 3.984375 | 4 | [] | no_license | Select * from
(Select TOP 5
org.FlightID,
org.DepartureTime,
org.ArrivalTime,
org.AirportName as Origin,
dest.AirportName as Destination
from
(Select * from Flights as f
JOIN Airports as a
ON f.OriginAirportID=a.AirportID AND f.Status='Departing') as org
JOIN
(Select * from Flights as f
JOIN Airports as a
ON f.Destina... | true |
0b9573f8e189e6f92a6da3cd8b7503988943cbfd | SQL | dcurran89/sql | /select_exercise.sql | UTF-8 | 611 | 3.453125 | 3 | [] | no_license | USE codeup_test_db;
SELECT * FROM albums;
SELECT Name AS 'All Albums by Pink Floyd' FROM albums WHERE Artist = 'Pink FLoyd';
SELECT Release_Date AS 'The year Michael Jackson\'s Thriller was released' FROM albums WHERE Name = 'Thriller';
SELECT Genre AS 'Genre for Dark Side of the Moon' FROM albums WHERE Name = 'Dark ... | true |
eb0b603f8142587264dd9d430a636e9eb9868b81 | SQL | levent8421/agile-erp | /database/t_part_cluster.sql | UTF-8 | 828 | 3.625 | 4 | [] | no_license | drop table if exists t_part_cluster;
create table t_part_cluster
(
id int(10) auto_increment
primary key,
name varchar(32) not null,
description varchar(128) null
);
alter table t_part_cluster
add column create_time datetime null comment '创建时间' after description;
alter table ... | true |
83a09020524ee0bf14b5a30fdea27087b8f5f61d | SQL | unee-t/skeema-experiment | /bugzilla/ut_log_count_closed_cases.sql | UTF-8 | 556 | 3 | 3 | [] | no_license | CREATE TABLE `ut_log_count_closed_cases` (
`id_log_closed_case` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Unique id in this table',
`timestamp` datetime DEFAULT NULL COMMENT 'The timestamp when this record was created',
`count_closed_cases` int(11) unsigned NOT NULL COMMENT 'The number of closed case at t... | true |
1a38c8485a9ab5ba6e71960f3d6ff78bdc1ffa02 | SQL | jinkmatthew3/pembelajaranphpdanhtml | /Tugas 2_1/Tugas2/pemweb.sql | UTF-8 | 1,606 | 2.984375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.4
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Feb 19, 2019 at 01:38 PM
-- 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 |
5934950dbda5c6887e2414f465277ba407ea5a50 | SQL | ivan-kopylove/sandbox-sql | /query_transform_OR_EXPANSION.sql | UTF-8 | 601 | 3.578125 | 4 | [] | no_license |
DROP TABLE T1;
CREATE TABLE T1
(
IDX INTEGER,
NAME VARCHAR2(100 CHAR)
);
ALTER TABLE T1 ADD CONSTRAINT T1_PK PRIMARY KEY (IDX);
CREATE INDEX T1_IDX ON T1(NAME);
INSERT INTO T1 VALUES (0, 'Maria');
INSERT INTO T1 VALUES (1, 'John');
INSERT INTO T1 VALUES (2, 'Tatiana');
INSERT INTO T1 VALUES (3, 'Elena');... | true |
eeeef9e0191264d047021e5ed03f98c0f6653ef4 | SQL | hamzayousuf121/online-book-store | /Project/onlinestore.sql | UTF-8 | 1,903 | 3.09375 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : bookstore
Source Server Version : 50505
Source Host : localhost:3306
Source Database : onlinestore
Target Server Type : MYSQL
Target Server Version : 50505
File Encoding : 65001
Date: 2019-08-23 14:35:50
*/
SET FOREIGN_... | true |
dc90a4e350b74afbdc478e9b1986e93a24fdae73 | SQL | jabawack81/shout-api | /db_migrations/002_create_user.sql | UTF-8 | 368 | 2.71875 | 3 | [] | no_license | DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` (
`id` INT NOT NULL AUTO_INCREMENT COMMENT '',
`username` VARCHAR(45) NOT NULL COMMENT '',
`encrypted_password` VARCHAR(45) NOT NULL COMMENT '',
`token` VARCHAR(45) COMMENT '',
`token_expire` DATETIME COMMENT '',
PRIMARY KEY (`id`) COMMENT '',
UNIQUE INDEX ... | true |
1ce6a734b2bbabf7cfbd266e6ec12d5fa6fa2fad | SQL | eerofeeva/sql-challenge | /EmployeeSQL/schema.sql | UTF-8 | 2,257 | 4 | 4 | [] | no_license | --DROP TABLE Departments;
--DROP TABLE Titles;
--DROP TABLE Employees;
--DROP TABLE Dep_MGT;
--DROP TABLE Dep_EMP;
--DROP TABLE Salaries;
CREATE TABLE Departments
(
dept_no VARCHAR(4) NOT NULL PRIMARY KEY,
dept_name VARCHAR(100) NOT NULL
);
COPY Departments(dept_no, dept_name)
FROM 'C:\ClassRepo\sql-challen... | true |
44d0fcb90fe2960e1a1f8a9a3e24d4c18c76cebe | SQL | ruben3452/base-de-datos | /taller/usuario_Prueba.sql | UTF-8 | 899 | 3.421875 | 3 | [] | no_license | /*4) crear tabla*/
create table Secuenciador (
numERIC number,
DATO varchar2(30)
);
/*5*/
INSERT INTO Secuenciador (NUMERIC, DATO)
VALUES (3500, 'marcador1');
INSERT INTO Secuenciador (NUMERIC, DATO)
VALUES (600, 'lapiz');
INSERT INTO Secuenciador (NUMERIC, DATO)
VALUES (500, 'borrador1');
SELECT NUMERI... | true |
7e4c37a5ee6436214664744536a1e76d0a54e60f | SQL | dkrieger-pvtl/gpupgrade | /migration_scripts/pre-upgrade/gen_drop_constraint_step_2.sql | UTF-8 | 732 | 3.765625 | 4 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | -- Copyright (c) 2017-2020 VMware, Inc. or its affiliates
-- SPDX-License-Identifier: Apache-2.0
-- Step 2 of 3
-- Generate a script to to DROP unique/primary key constraints
SELECT 'ALTER TABLE '||n.nspname||'.'||cc.relname||' DROP CONSTRAINT '||conname||' CASCADE;'
FROM pg_constraint con
JOIN pg_depend dep ON (r... | true |
ef88e39f1857eed66a308dde657cbba8148abb19 | SQL | batoulyehia/COMP353-SUMMER2020 | /Queries.sql | UTF-8 | 5,628 | 3.75 | 4 | [] | no_license | i.
/*create an employer*/ /*to create an employer or an employee, we have to create a user_account first*/
INSERT INTO user_account (user_ID,sa_ID,password,first_name,last_name,balance,email) values(9999,NULL,'testing','Ramy','Elhoufy',0,'r.elhoufy@gmail.com');
INSERT INTO employer(user_ID, employer_membership_typ... | true |
4cb88980d6ca0c5c84c905bb75cae2afa99b2657 | SQL | M0nikaSharma/product-ss | /modules/samples/rss/CLI/rss-simple-sql-sample/src/main/resources/sample-db.sql | UTF-8 | 299 | 3.28125 | 3 | [
"Apache-2.0"
] | permissive | CREATE TABLE Persons
( P_Id int NOT NULL,
LastName varchar(255) NOT NULL,
FirstName varchar(255),
Address varchar(255),
City varchar(255),
PRIMARY KEY (P_Id));
CREATE TABLE Orders
( O_Id int NOT NULL,
OrderNo int NOT NULL,
P_Id int,
PRIMARY KEY (O_Id),
FOREIGN KEY (P_Id) REFERENCES Persons(P_Id)); | true |
60f6aa61b5e8bc933312b211e98808bf1cf467b8 | SQL | sowaarrior/chill | /chill.sql | UTF-8 | 31,781 | 2.890625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Hôte : 127.0.0.1
-- Généré le : lun. 13 mai 2019 à 09:58
-- Version du serveur : 10.1.38-MariaDB
-- Version de PHP : 7.1.28
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101... | true |
5d16445ac29b53cc1f3f522ce49b1692d511ca76 | SQL | OHDSI/WebAPI | /src/main/resources/resources/cohortanalysis/heraclesanalyses/sql/4007_numberOfSubjectsWithVistitsPerPeriodId.sql | UTF-8 | 5,979 | 3.8125 | 4 | [
"Apache-2.0"
] | permissive | -- 4007 Number of subjects with visits by period_id, by visit_concept_id, by visit_type_concept_id during the cohort period
{@rollupUtilizationVisit} ? {
with visit_records (cohort_definition_id, subject_id, visit_concept_id, visit_type_concept_id, visit_start_date, ancestor) as
(
select distinct c1.cohort_definiti... | true |
2e0a505ca99023e4d54a05642e45a3709a327e7e | SQL | chrispab/product-app | /db/create_products_db.sql | UTF-8 | 2,615 | 3.15625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.5.4.1deb2ubuntu2
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Nov 26, 2016 at 03:44 PM
-- Server version: 5.7.16-0ubuntu0.16.04.1
-- PHP Version: 7.0.8-0ubuntu0.16.04.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CH... | true |
58a34fa9f0291284be7e270f72c9728cb2378d04 | SQL | IvanTyo/Programs | /artistdb.sql | UTF-8 | 570 | 3.375 | 3 | [] | no_license | create table artist (
artist_id serial primary key,
first_name varchar(50),
last_name varchar(50),
dateof_birth date,
cityof_birth varchar(100) not null,
genre varchar(20)
);
create table albums (
album_id serial primary key,
album_title varchar(100) not null,
release_date date,
artist_id integer n... | true |
873aefdaf12692f795389475ef0129adb1e81519 | SQL | Nando1223/proyecto_reto | /bd_nuevoecu.sql | UTF-8 | 4,560 | 3.046875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 22-02-2021 a las 17:56:55
-- Versión del servidor: 10.4.17-MariaDB
-- Versión de PHP: 8.0.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_... | true |
e5a4e409c2464b4318012dff273cbb7503d894f8 | SQL | holon-platform/holon-datastore-jdbc | /core/src/test/resources/mysql/schema.sql | UTF-8 | 770 | 2.640625 | 3 | [
"Apache-2.0"
] | permissive | create table test1 (
keycode bigint primary key
,strv varchar(100)
,decv double
,datv date
,datv2 date
,enmv int
,nbv int not null
,nst1 varchar(10) default 'nst1'
,nst2 numeric(14,4)
,nss1 varchar(10)
,tms timestamp NULL ON UPDATE CURRENT_TIMESTAMP
,tms2 timestamp NULL ON UPDATE CURREN... | true |
a69edae0c56dff6f6b92a8ce1c107f4b666c5702 | SQL | aurelle-awountsa/Seconde-session | /backend/script-serveur-web/webservice-procedure-base.sql | UTF-8 | 1,786 | 2.984375 | 3 | [] | no_license | CREATE FUNCTION "DBA"."getpath"()
returns LONG VARCHAR
deterministic
BEGIN
declare dbPath long varchar;
declare dbname LONG VARCHAR ;
set dbPath = (select db_property ('file'));
set dbName = (select db_property('name')) + '.db'; -- nom de la db
set dbPath = left(dbPath, length(dbPath)-length(d... | true |
9d5c1d10e014c69b13765cd61c4e8a122340c9c0 | SQL | skguru/Module7_Challenge_Senthil_G | /Queries/challenge.sql | UTF-8 | 2,214 | 4.375 | 4 | [] | no_license | --challenge.sql
--list of employees eligible for retirement
--create retirement eligible table
SELECT e.emp_no, e.first_name, e.last_name
into retirement_eligible
FROM employees as e
WHERE (e.birth_date BETWEEN '1952-01-01' AND '1955-12-31')
AND (hire_date BETWEEN '1985-01-01' AND '1988-12-31');
--current employee... | true |
bf4a365de2fec4f6c52679b78a7beab266b81c3f | SQL | Y-Doge/sql50 | /src/question19to45/q45_answer.sql | UTF-8 | 222 | 3 | 3 | [
"Apache-2.0"
] | permissive | # Q45
# 查询下月过生日的学生
select *
from Student
where MONTH(Sage) = MONTH(CURDATE()) + 1;
# +---+-----+-------------------+----+
# |SId|Sname|Sage |Ssex|
# +---+-----+-------------------+----+
| true |
7d19bdfc1f9bc0704e6c9c343ba6209dd3033767 | SQL | showduhtung/slick-clinics | /sql/sessions.sql | UTF-8 | 351 | 3.15625 | 3 | [
"MIT"
] | permissive | CREATE TABLE "public"."Session"
(
"id" int NOT NULL,
"token" varchar(255) NOT NULL,
"expiration" date NOT NULL,
"userId" int NOT NULL,
CONSTRAINT "PK_session" PRIMARY KEY ( "id" ),
CONSTRAINT "FK_33" FOREIGN KEY ( "userId" ) REFERENCES "public"."User" ( "id" )
);
CREATE INDEX "fkIdx_33" ON "publ... | true |
9d2c0ebe5267899288fe3450f908d70b117e8921 | SQL | iyersv/TestRepo | /xw1/wip/create_tables_sample.sql | UTF-8 | 243 | 2.734375 | 3 | [] | no_license | CREATE TABLE xweather.raw_temperature (
geohash_id text,
cal_bucket text,
event_time timestamp,
bar double,
temp double,
PRIMARY KEY ((geohash_id, cal_bucket), event_time)
) WITH CLUSTERING ORDER BY (event_time DESC)
;
| true |
0d2b29a8b6695a0a9fcc2f060ae2db42f6b92f0e | SQL | tautvydascoding/2017-10-09-kurso-medziaga | /uzduotys_visos/MAMP/Projektai/valdas/projektas.sql | UTF-8 | 18,058 | 2.84375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.3
-- https://www.phpmyadmin.net/
--
-- Host: localhost:8889
-- Generation Time: Nov 06, 2017 at 09:05 AM
-- Server version: 5.6.35
-- PHP Version: 7.1.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIEN... | true |
899dc8ea8ef818cbd98f13f20b41e07d27fa393f | SQL | mingqianyu/testSystem | /public/user/jingyingba.sql | UTF-8 | 1,465 | 3.046875 | 3 | [
"PHP-3.0",
"Apache-2.0"
] | permissive | /*
Navicat MySQL Data Transfer
Source Server : 本地名字
Source Server Version : 50553
Source Host : localhost:3306
Source Database : jingyingba
Target Server Type : MYSQL
Target Server Version : 50553
File Encoding : 65001
Date: 2018-10-22 21:16:50
*/
SET FOREIGN_KEY_CH... | true |
8edaaa5c0ff1ee5e119ea49c7c0b86f169b1c645 | SQL | Jungeol/algorithm | /leetcode/easy/177_nth_highest_salary/dongho.sql | UTF-8 | 599 | 3.890625 | 4 | [] | no_license | --https://leetcode.com/problems/nth-highest-salary/
--Runtime: 761 ms, faster than 54.32% of MS SQL Server online submissions for Nth Highest Salary.
--Memory Usage: 0B, less than 100.00% of MS SQL Server online submissions for Nth Highest Salary.
CREATE FUNCTION getNthHighestSalary(@N INT) RETURNS INT AS
BEGIN
... | true |
ca64fc4f73d555fedfa112ec04253c2d62b900f7 | SQL | hai-v/ISDP | /utils/storedProcedures.sql | UTF-8 | 25,849 | 4.0625 | 4 | [] | no_license | USE bullseye;
DELIMITER $$
--
-- Procedures
--
CREATE PROCEDURE IF NOT EXISTS `createCourier` (IN `inCourierName` VARCHAR(50), IN `inAddress` VARCHAR(50), IN `inCity` VARCHAR(50), IN `inProvinceID` VARCHAR(2), IN `inPostalCode` VARCHAR(10), IN `inCountry` VARCHAR(50), IN `inCourierEmail` VARCHAR(50), IN `inCourierPhon... | true |
03d813403dff0cf6f21d89e01c594690b9b12ca2 | SQL | opda777/QtProject | /learningplatform.sql | UTF-8 | 20,273 | 3.5625 | 4 | [] | no_license | /*
Navicat Premium Data Transfer
Source Server : studyplatform
Source Server Type : MySQL
Source Server Version : 80022
Source Host : localhost:3306
Source Schema : learningplatform
Target Server Type : MySQL
Target Server Version : 80022
File Encoding : 65001
Date: ... | true |
ff12a5e57454a9b3638165f152795ec092559394 | SQL | ArnoldFrb/Plan_de_Accion_UPC | /CREATE TABLA.sql | UTF-8 | 3,384 | 3.40625 | 3 | [] | no_license | CREATE TABLE programa (
idprograma NUMBER(11) NOT NULL,
programa varchar(250) NOT NULL,
condicion NUMBER(1) NOT NULL,
constraint PK_PROGRAMA primary key (idprograma) using index tablespace PLANACCION
);
CREATE TABLE recursos (
idrecurso NUMBER(11) NOT NULL,
recurso_humano varchar(100) NOT NULL,
recurso_f... | true |
c8bd8c99c0f705e3b5cb86c7a5b25a77c0a4cebf | SQL | akathecradhe/reflectionToolkit | /securitydemo.sql | UTF-8 | 1,924 | 3.453125 | 3 | [] | no_license | -- The checks work now - but if more dummy data is added - this may cause the ID's to change.
USE mysql;
-- Run data.sql first
-- Notice how administrator has database privileges but has certain grants across loggingsystemdb tables.
SELECT * FROM user;
SHOW GRANTS FOR 'administrator'@'localhost';
USE LoggingSystemD... | true |
e2c4f9222e3628d13ff49260668350ba29dd50ae | SQL | Cevantime/sellajoke | /dbchanges/5_add_jokes.sql | UTF-8 | 389 | 3.640625 | 4 | [
"MIT"
] | permissive |
CREATE TABLE `jokes` (
`id` INT NOT NULL AUTO_INCREMENT ,
`title` VARCHAR(50) NOT NULL,
`text` TEXT NOT NULL ,
`image` VARCHAR(255) NOT NULL ,
`category_id` INT NOT NULL ,
PRIMARY KEY (`id`)) ENGINE = InnoDB;
ALTER TABLE `jokes` ADD INDEX (`category_id`);
ALTER TABLE `jokes` ADD FOREIGN KEY (`category_id`)... | true |
b08486772d1e86b44f94e1bc3b824871727e0d0f | SQL | kingofreverb/CIDashboard | /src/main/resources/db/version_mst.sql | UTF-8 | 185 | 2.578125 | 3 | [] | no_license | CREATE TABLE `version_mst` (
`VERSION_NO` VARCHAR(15) NOT NULL,
`RELEASE_DATE` DATE NULL DEFAULT NULL,
PRIMARY KEY (`VERSION_NO`)
)
COLLATE='utf8_general_ci'
ENGINE=InnoDB
;
| true |
4e40e3518571932304d6a0a58c4e00614507c43e | SQL | mariocrugar/ProyectoFinal-PDC | /realsuk/sql/create_schemas.sql | UTF-8 | 435 | 2.953125 | 3 | [] | no_license | CREATE EXTENSION IF NOT EXISTS dblink;
DO $$
BEGIN
PERFORM dblink_exec('', 'CREATE DATABASE realsuk WITH OWNER "postgres" ENCODING "UTF8"');
EXCEPTION WHEN duplicate_database THEN RAISE NOTICE '%, skipping', SQLERRM USING ERRCODE = SQLSTATE;
END
$$;
drop schema if exists raw cascade;
create schema raw;
drop schema i... | true |
87e0b5352b80dc1c0a756cb9874622010f06c790 | SQL | matias9486/111Mil_Proyecto_Final | /DDL_Facturacion_bd111mil.sql | UTF-8 | 2,592 | 3.453125 | 3 | [] | no_license | -- DDL ---
DROP DATABASE IF EXISTS bd111mil;
CREATE DATABASE bd111mil;
USE bd111mil;
-- Habilita las modificaciones, Opc.Menu: Edit, Preference , SQLEditor, destildar ultima opc.
SET SQL_SAFE_UPDATES = 0;
-- Permite la conexion a la BD desde java. La version del driver exije que la pwd sea creada de este modo
ALTER... | true |
fe3ce057abdb13e46873fa7bca5292d3fa3980bc | SQL | nglthuan/ds_bigdata_hadoop_system_1 | /exercise_1/loading_and_modeling/sql_script_create_table_numericDates.sql | UTF-8 | 271 | 2.828125 | 3 | [] | no_license | DROP TABLE numericDates;
CREATE TABLE numericDates AS
SELECT
CAST(
CONCAT(substr(measure_start_date, 7, 4),
'-',
substr(measure_start_date, 1, 2),
'-',
substr(measure_start_date, 4, 2)
)
AS date) AS numeric_date,
measure_start_date
FROM measures
;
| true |
10ef0cccda43f0f8f156b38354278e969ce2cc87 | SQL | jyoung128/nuts-and-bolts-orange | /nuts_and_bolts/nutsandboltsdb.sql | UTF-8 | 1,832 | 3.59375 | 4 | [] | no_license | use nutsandboltsdb;
CREATE TABLE if not exists `inventory` (
`product_id` int unsigned not null auto_increment primary key,
`product_name` varchar(255) not null,
`sku` varchar(255) not null,
`description` varchar(255) not null,
`price` decimal(5, 2) not null,
`quantity` int not null,
`category... | true |
39c8f6961bce3778b3437739827eb2c566538636 | SQL | gregbunce/sql | /non_spatial/Get_RoadStats.sql | UTF-8 | 1,203 | 4.03125 | 4 | [] | no_license | -- a few sql queries to run stats on the push (mainly for the website post)
-- the records returned will be from the default version of the database (not the edit version)
-- you may want to compress the database before you run these queries - to see the current state
--STATEWIDESTREETS
-- get the counties that we her... | true |
4c7a7bfa11db2146ee31145ae5928b5456aa88fc | SQL | ptq204/leetcode-practice | /626-exchange-seats.sql | UTF-8 | 250 | 3.625 | 4 | [] | no_license | -- Link: https://leetcode.com/problems/exchange-seats/
select
case
when s.id % 2 <> 0 and s.id = (select max(id) from seat) then s.id
when s.id % 2 = 0 then s.id - 1
else s.id + 1
end as id, s.student
from seat s
order by id ASC | true |
bcdfba8ee3f0e59bed6ee1f27800f6f965f3ffd1 | SQL | Apatight/nearby | /pg_docker/start.sql | UTF-8 | 336 | 2.703125 | 3 | [] | no_license | CREATE DATABASE apateez IF NOT EXISTS;
\connect apateez;
DROP TABLE IF EXISTS nearby;
CREATE TABLE nearby (
"place_id" int,
"name" text,
"google_rating" int,
"zagat_rating" int,
"photos" text[],
"neighborhood" text,
"price_level" int,
"types" text,
"nearby" int[],
PRIMARY KEY ... | true |
9224f4e1184804da6e4724ec2cfe438caba53214 | SQL | Sittichai-nu/Employee-Tracker | /seeds.sql | UTF-8 | 518 | 3.046875 | 3 | [] | no_license | USE employee_db;
INSERT INTO department (name)
VALUE
('Sales')
, ('Engineering')
, ('Finace')
, ('Legal');
INSERT INTO role (title,salary, department_id)
VALUE
('Sales lead', '50000','1')
, ('Salesperson', '80000', '1')
, ('Lead Engineering', '12000', '2')
, ('lawyer', '20000', '4')
,('Accountant', '123000', '3');... | true |
6c5e3a6dc5397980ca113fc30a7aee149b92d4a4 | SQL | nicholsont/log_tool | /sql/access_info.sql | UTF-8 | 539 | 3.734375 | 4 | [
"Unlicense"
] | permissive | SELECT OK.date, OK.num, ERROR.num
FROM
(
SELECT date(time) as date, count(*) as num
FROM public.log
WHERE status = '200 OK'
GROUP BY status, date
ORDER BY date ASC
) AS OK,
(
SELECT date(time) as date, count(*) as num
FROM public.... | true |
ef8c6381fae969bed176c8eeb5f58a86e4ea4974 | SQL | GeorgiBarbutov/SoftUni | /C#ProfessionalModules/C#DBFundamentals/C#DatabaseBasics/Exam/Exam-24-June-2018/08.CityStatistics.sql | UTF-8 | 153 | 4.1875 | 4 | [] | no_license | SELECT c.Name, COUNT(h.Id) AS HotelCount
FROM Cities AS c
LEFT JOIN Hotels AS h
ON h.CityId = c.Id
GROUP BY c.Name
ORDER BY HotelCount DESC, c.Name | true |
3d4b16c94297c4fadb060c28f99887522d3e2664 | SQL | Kayusme/student-forum | /sql-scripts/create-tables.sql | UTF-8 | 1,501 | 3.375 | 3 | [
"MIT"
] | permissive | CREATE TABLE `forum_appointments` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`sender` int(11) NOT NULL,
`recipient` int(11) NOT NULL,
`date_time` datetime NOT NULL,
`location` varchar(45) DEFAULT NULL,
`status` varchar(45) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=23 DEFAULT CHARSET=utf... | true |
b03b47cb946e24f05fd1371b170aabee318523da | SQL | ljyf5593/admin | /data/admin-mysql.sql | UTF-8 | 4,828 | 3.609375 | 4 | [] | no_license | -- Adminer 4.1.0 MySQL dump
SET NAMES utf8;
SET time_zone = '+00:00';
SET foreign_key_checks = 0;
SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';
DROP TABLE IF EXISTS `comasa_config`;
CREATE TABLE `comasa_config` (
`group_name` varchar(50) DEFAULT NULL,
`config_key` varchar(80) DEFAULT NULL,
`config_value` text NOT NUL... | true |
bcf950e2c9e6f1bc20445febf57674ecc81e07a3 | SQL | amanraj/laravel-playground | /src/sql_data/migrations.sql | UTF-8 | 2,206 | 2.734375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.1.14
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Jun 02, 2015 at 03:28 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 |
84d226db7a91a1a342345c5c21bfaa0ceec3ed54 | SQL | yikhsn/jualy | /jualy(1).sql | UTF-8 | 13,033 | 2.984375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.0
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: May 21, 2018 at 01:12 AM
-- Server version: 10.1.31-MariaDB
-- PHP Version: 7.2.4
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
d9038b8ac3ef4ddee99e522176afce3a1b2a2beb | SQL | JunguangJiang/TinyDB | /system_test/join/join_primary_with_non_primary/test.sql | UTF-8 | 3,028 | 2.953125 | 3 | [
"MIT"
] | permissive | create database test;
use database test;
create table T1 (
id long not null,
i1 int,
f1 float,
d1 double,
s1 string(100) not null,
primary key(id)
);
create table T2 (
id long,
i2 int,
f2 float,
d2 double,
s2 string(50) not null
);
create table T3 (
id long,
i3 int,
f3 float,
d3 double,
s3 string(50),
primary key (i... | true |
f2d20b8b5b28f03271265a1ffb9d709d3f5c6f96 | SQL | florenciaalarcon/psicologiafreud | /sql/sql_0002.sql | UTF-8 | 600 | 2.953125 | 3 | [] | no_license | CREATE TABLE `slider` (
`id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
`imagen` VARCHAR(255) NULL DEFAULT NULL,
`informacion` TEXT NULL DEFAULT NULL,
`titulo` VARCHAR(100) NULL DEFAULT NULL,
`subtitulo` VARCHAR(100) NULL DEFAULT NULL,
`link` VARCHAR(255) NULL DEFAULT NULL,
PRIMARY KEY (`id`)
)
COLLATE='latin1_swedis... | true |
1a3a83026e8d1eb920644ca5760fbd5b9e47c2eb | SQL | Birdjyy/cs5200_A2 | /views.sql | UTF-8 | 1,477 | 3.5 | 4 | [] | no_license | CREATE
ALGORITHM = UNDEFINED
DEFINER = `jinyaoyu`@`%`
SQL SECURITY DEFINER
VIEW `deleveloper_roles_and_privileges` AS
SELECT
`p`.`first_name` AS `first_name`,
`p`.`last_name` AS `last_name`,
`p`.`user_name` AS `user_name`,
`p`.`email` AS `email`,
`w`.`website_... | true |
6188bc5a21d8b178398a104a342f6fe8f9b716ad | SQL | wwweasel/modelatge-BBDD | /Exercici Modelatge BBDD/amazon/ejercicio_amazon.sql | UTF-8 | 4,700 | 3.34375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.1
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Feb 17, 2020 at 12:31 PM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.4.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
2405e6a90837d8c4aeff0671c44fc8bd09dd681b | SQL | deoooo/airbyte-dbt-custom | /models/generated/airbyte_ctes/public/poke_pokemon_abilities_ability_ab2.sql | UTF-8 | 482 | 2.515625 | 3 | [] | no_license | {{ config(schema="_airbyte_public", tags=["nested-intermediate"]) }}
-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type
select
_airbyte_abilities_hashid,
cast(url as {{ dbt_utils.type_string() }}) as url,
cast({{ adapter.quote('name') }} as {{ dbt_utils.type_string... | true |
79ba59c7f0c6f5a1cddc62300c5110d94aabfb6f | SQL | VijayMVC/Synergy | /User/Gary Corbaley/Student K3Plus and SmartStart Demographics.sql | UTF-8 | 2,047 | 3.5625 | 4 | [] | no_license |
SELECT
[STUDENT].[SIS_NUMBER]
,[STUDENT].[STATE_STUDENT_NUMBER]
,[STUDENT].[LAST_NAME] AS [STUDENT FIRST NAME]
,[STUDENT].[FIRST_NAME] AS [STUDENT LAST NAME]
,[STUDENT].[GENDER] AS [STUDENT GENDER]
,[STUDENT].[RESOLVED_RACE]
,[STUDENT].[LUNCH_STATUS]
,[STUDENT].[ELL_STATUS]
,[STUDENT].[SPED_... | true |
2d514ab89b3389c6a7518678fd02183b464e4be9 | SQL | deepakbhavsar43/Python-to-ML | /16,17_01_2020_Database/Pyodbc/MS_SQL_Server_Queries/Joins.sql | UTF-8 | 1,401 | 4.125 | 4 | [] | no_license | Select * from Customer
select * from Orders;
select * from Products;
select *from Orders as o
INNER JOIN Products as p on o.ProductID=p.Id INNER JOIN Customer as c on o.CustomerID=c.Id;
-- Dispalys specific columns of table by joining them
select OrderID, OrderDate, FirstName, LastName, ProductName, Price
from Orders... | true |
b3d4865c200e819aa7018f0a8b878fad68cef7d4 | SQL | yardfarmer/expressMgmt | /as/proj/DataBase/doc/Oracle+PLSQl/Chp01/VCINV_DEMO_01.sql | GB18030 | 516 | 2.546875 | 3 | [] | no_license | CREATE OR REPLACE PROCEDURE VTTPC.VCINV_DEMO_01(pEmpNo IN NUMBER) IS
tmpVar VARCHAR2(100);
BEGIN
tmpVar := 0;
DBMS_OUTPUT.PUT_LINE('ʼѯݿ:');
SELECT EName INTO tmpVar FROM Scott.Emp WHERE EmpNo=pEmpNo;
DBMS_OUTPUT.PUT_LINE('ԱΪ'||tmpVar);
EXCEPTION
WHEN NO_DATA_FOUND THEN
DBMS_OUTPUT.P... | true |
ea8a64737aeb76d7d7556fb29dd976966e136bcf | SQL | deepakkt/aasaan | /sql/item_counts_by_zone_center.sql | UTF-8 | 1,199 | 3.890625 | 4 | [
"MIT"
] | permissive | -- Complex query. Let's break it down
-- root declarative select after everything is built
select mcm.zone_name, mcm.center_name, mcm.name as item_name,
-- make any non entered values zero
coalesce(m.quantity, 0) as quantity from
(
-- build a cartesian product of all zones, centers and materials
select zone_name, ce... | true |
9438813a9aa4e0c7da51359673bb3b0fb9381202 | SQL | Dushyantha-Chandrasekra/srs_2018.lk | /sql/symposiumdb.sql | UTF-8 | 10,266 | 3.234375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Aug 28, 2018 at 05:00 AM
-- Server version: 10.1.32-MariaDB
-- PHP Version: 7.2.5
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @O... | true |
8ec3da4e92cc8b5939cd0ad5c6fa26b173141c9d | SQL | joannejia17/dataeng-project5 | /models/pos_ranked.sql | UTF-8 | 144 | 2.890625 | 3 | [] | no_license | SELECT borough_name, pos_pct, RANK() OVER (ORDER BY pos_pct DESC) AS pos_rank
FROM {{ref('ada_compliance_pct_by_borough')}}
ORDER BY pos_rank
| true |
1a05e5b98d346d8fd873a2357fe578026ecceb4a | SQL | johnvincentio/repo-sts-old | /sts/course-spring-mvc/Notes/mysql/mysql_data.sql | UTF-8 | 3,925 | 3.1875 | 3 | [] | no_license |
set FOREIGN_KEY_CHECKS = 0;
delete from category;
delete from product;
delete from customer;
delete from purchase;
delete from purchaseitem;
insert into category (id, name, description)
values (default, 'Truffles', 'Truffles');
insert into category (id, name, description)
values (default, 'Belgian Chocolates', 'Be... | true |
c7da416827f1cea306ed80472caa5ee0da613f6c | SQL | Danny43/Biblioteca-Inacap | /ScriptDB.sql | UTF-8 | 33,156 | 2.828125 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 5.7.17, for Win64 (x86_64)
--
-- Host: 127.0.0.1 Database: biblioteca
-- ------------------------------------------------------
-- Server version 5.5.5-10.1.31-MariaDB
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHAR... | true |
e92564aabfd97db25c80fb27883019da947c44a5 | SQL | bellmit/SVNrepo | /Invessence-20170616/DBScripts/Release_20170429-UOB/Pricing/15.sp_create_proc_rbsa.p_genMonthTable.sql | UTF-8 | 881 | 3.796875 | 4 | [] | no_license | ## Create Procedure rbsa.p_genMonthTable
USE rbsa;
DROP procedure IF EXISTS p_genMonthTable;
DELIMITER $$
USE rbsa$$
CREATE PROCEDURE p_genMonthTable()
begin
declare p_prev_fst_bdate varchar(10);
declare p_prev_lst_bdate varchar(10);
DECLARE done INT DEFAULT FALSE;
DECLARE curcnt INT;
Declare cur1 CURSOR FOR Select f... | true |
0dbfb67bd82a2938a1b36cc51e5ae906ac365219 | SQL | irfan339/CarSharing | /sqlscripts/tables.sql | UTF-8 | 1,511 | 3.140625 | 3 | [] | no_license | GRANT ALL PRIVILEGES on carshare_database.*
TO 'root'@'%' IDENTIFIED BY 'root'
WITH GRANT OPTION;
CREATE TABLE `users` (
`user_id` int(11) NOT NULL AUTO_INCREMENT,
`first_name` char(30) NOT NULL,
`last_name` char(30) NOT NULL,
`username` varchar(30) DEFAULT NULL,
`email` varchar(50) DEFAULT NULL,... | true |
787fd85c217a927ec6b19f6feb28ace31784e7dc | SQL | if18b136/DBS_Projekt_3D03 | /functions/logins.sql | UTF-8 | 5,182 | 3.484375 | 3 | [] | no_license | /*********************************************************************
/**
/** Procedure: sp_login_student
/** In: f_uid, f_pw - Username and password of a student
/** Out: login_success - 0/1, depending on input
/** Description: Validates the given credentials, returns 1 on success
/**
/******************************... | true |
06223336ef6b6284b7d9fc08b5ae73fc1ff45ef1 | SQL | RaquelSantosG/Sql | /curso sql.sql | UTF-8 | 1,719 | 3.984375 | 4 | [] | no_license | create table tb_cursoDaMinhaVida;
use tb_cursoDaMinhaVida;
create table tb_curso(
id bigint auto_increment,
nome varchar (100) not null,
tipo varchar (100) not null,
tempo varchar (100) not null,
primary key(id)
);
insert into tb_categoria(nome,tipo,tempo) values ("curso A","presencial","1 mes");
insert into tb_cate... | true |
3825108a1f644f0fa05a5a9bbb132b48d82cff63 | SQL | silence-do-good/stress-test-Postgres-and-MySQL | /dump/low/day19/select2122.sql | UTF-8 | 178 | 2.65625 | 3 | [] | no_license |
SELECT timeStamp, temperature FROM ThermometerOBSERVATION o
WHERE timestamp>'2017-11-18T21:22:00Z' AND timestamp<'2017-11-19T21:22:00Z' AND temperature>=11 AND temperature<=40
| true |
e6e8063078feeba52bd1251fcb2c39315e80bef5 | SQL | ActualSailorCat/CIVITAS-Sassanid-Release | /Archives/CIVITAS Sassanid v2.00 040518 1353233980 All Leaders/Core/Civilization/CVS_Sassanid_UU.sql | UTF-8 | 4,854 | 2.921875 | 3 | [] | no_license | --==========================================================================================================================
-- Sassanid / Aswar (Unit)
--==========================================================================================================================
-------------------------------------------... | true |
69a9a7a2451c8fa8a61f47f2e5464da3d6b67b28 | SQL | ziwanpeng/SQL_projects | /website_performance_analysis.sql | UTF-8 | 8,213 | 4.46875 | 4 | [] | no_license | ## this is a website performance analysis
## 1.website content analysis: understanding which webpages are seen the most by users
## 2.landing page analysis: understanding the performance of key landing pages, evaluated by bounce rate and its weekly trend
## 3.conversion funnel analysis: optimizing each step of user's e... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.