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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
5c5cc42a454fb2d704f057e8a250d0f1b88937e8 | SQL | blendagaspar/My-SQL | /Aula 1/Exercicio 3.sql | UTF-8 | 1,358 | 3.421875 | 3 | [] | no_license | use atividade1;
create table escola(
id bigint auto_increment,
Nome_aluno varchar(60) not null,
Turma varchar(60)not null,
Nota varchar(60) not null,
Genero varchar(60) not null,
Disciplina varchar(60) not null,
primary key(id)
);
insert into escola(Nome_aluno, Turma, Nota, Genero, Disciplina) values (" Ana","1 ", "9... | true |
90e4371473b2958ad52d8f46366f97d153ffb117 | SQL | team-chim/ddl | /sql_sample_query/insert/112_create_procedure_insert_payment.sql | UTF-8 | 468 | 2.890625 | 3 | [] | no_license | USE rexchula;
DROP PROCEDURE IF EXISTS insert_payment;
DELIMITER $$
CREATE PROCEDURE insert_payment(IN StudentID CHAR(10), IN `Year` INT UNSIGNED, IN Semester INT UNSIGNED, IN PaymentID INT UNSIGNED, IN PaymentStatus ENUM('Pending', 'Success', 'Invalid'), IN PaymentDate DATE)
BEGIN
INSERT INTO payment(StudentID, `Y... | true |
80bb93dfb1c01e98c1b50fe11f99a8aa2bb826f9 | SQL | Nagisama4/Learn-python | /Phase2-MySQL/Day02/homework_day2-sol.sql | UTF-8 | 2,846 | 4.4375 | 4 | [] | no_license | -- homework_day2.sql
-- MySQL第二天作业
-- 1. 创建数据库bank, 并指定为utf8编码格式
-- 2. 创建账户表(acct, utf8编码格式), 包含如下字段
-- acct_no 账号,字符串类型,长度32字符
-- acct_name 户名,字符串类型,长度128字符
-- cust_no 客户编号,字符串类型,长度32字符
-- acct_type 账户类型, 整数型(1-存款账户 2-贷款账户)
-- reg_date 开户日期, 日期类型
-- status 账户状态(1-正常 2-注销 3-挂失 4-冻结)
-- bala... | true |
f47edaefd8de1d99d9580c681c5b82712172ef98 | SQL | karenAle/DAW2_2_2015_PEDIDOS | /scripts/IfBurguerBase.sql | UTF-8 | 2,118 | 3.0625 | 3 | [] | no_license | -- MySQL Workbench Forward Engineering
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL,ALLOW_INVALID_DATES';
-- -----------------------------------------------------
-- Schema my... | true |
0b0019bd76cbda54f9c9e59d2d1d6b3a7dafa114 | SQL | choptastic/sql_bridge | /test/test.postgres-2.sql | UTF-8 | 572 | 3.203125 | 3 | [
"MIT"
] | permissive | grant all on database sql_bridge_test to sql_bridge_user;
alter default privileges
in schema public
grant select, insert, update, delete on tables to sql_bridge_user;
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT, USAGE ON sequences TO sql_bridge_user;
drop table if exists fruit;
create table fruit (
frui... | true |
37155650607e3b1fbb1a15f5b6af1edbbe87492d | SQL | chiragatha/rto | /database/rtodb.sql | UTF-8 | 46,762 | 2.8125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Jun 19, 2017 at 02:29 PM
-- Server version: 10.1.19-MariaDB
-- PHP Version: 7.0.13
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CL... | true |
070ff96230517d3fc11ea9f72cb99f7057cd762c | SQL | mebelousov/antlr_psql | /src/test/resources/sql/select/6b557ebb.sql | UTF-8 | 197 | 2.953125 | 3 | [
"MIT"
] | permissive | -- file:oidjoins.sql ln:264 expect:true
SELECT ctid, inhparent
FROM pg_catalog.pg_inherits fk
WHERE inhparent != 0 AND
NOT EXISTS(SELECT 1 FROM pg_catalog.pg_class pk WHERE pk.oid = fk.inhparent)
| true |
a56b6e0551ebaa685fce66acd372c40a1f3da106 | SQL | asharp343/intexii-helper-code | /sql/intexii(archived).sql | UTF-8 | 3,557 | 2.8125 | 3 | [] | no_license | -- drop table MiscSample
-- drop table Images
-- drop table Quadrant_Cardinality
-- drop table CarbonDating
-- drop table HumanSample
-- drop table Area
-- drop table Artifact
CREATE TABLE [Area] (
[AreaID] int identity(0,1) primary key,
[Latitude_1] int not null,
[Latitude_2] int not null,
[NorS] varchar(5... | true |
98a8622a122c9e894e9640fedaef96feeb2e7c29 | SQL | OlafMd/MedCon1.0 | /mm-libs/dbaccess/Level 2/CL2_PriceRounding/Atomic/Retrieval/SQL/cls_Get_Rule_Set.sql | UTF-8 | 457 | 2.921875 | 3 | [] | no_license |
SELECT
cmn_sls_price_roundingruleset.CMN_SLS_Price_RoundingRuleSetID,
cmn_sls_price_roundingruleset.RuleSet_Name_DictID,
cmn_sls_price_roundingruleset.MaximumPriceIncreaseInPercent,
cmn_sls_price_roundingruleset.MaximumPriceDecreaseInPercent,
cmn_sls_price_roundingruleset.IsDeleted
FROM
cmn_sls_pri... | true |
ccc946c9b41ca10e40005f3c12823ec82d52b623 | SQL | eforte/coding-exercises | /val-for-input-id-and-date.sql | UTF-8 | 1,231 | 3.890625 | 4 | [
"Apache-2.0"
] | permissive | /*
* PostgreSQL v 13
* Run online: https://www.db-fiddle.com/f/pjMs26Nq8sJQuQWBKhzCe3/2
* Problem:
* Create the sql query to determine what is the value corresponding to a given input date for a give id:
* id
* 1
* 2
*
* id start_date end_date value
* 1 jun1 jul1 5.0
* 1 jul1 ... | true |
eac1f3577c51b3ac476eeb874c3b44d5f966f64e | SQL | prodigasistemas/gsan-migracoes | /comercial/scripts/20190805180402_coluna_observacao_na_tab_col_atlz_cadastral.sql | UTF-8 | 1,305 | 2.921875 | 3 | [] | no_license | -- // coluna_observacao_na_tab_col_atlz_cadastral
-- Migration SQL that makes the change goes here.
INSERT INTO seguranca.tabela_coluna (tbco_id,
tabe_id,
tbco_tmultimaalteracao,
tbco_nmcoluna,
... | true |
4ceed5052e3483fc9c0697b40187a63c1ed5da80 | SQL | pnapper/ToDoList-ManyToMany | /todo.sql | UTF-8 | 3,606 | 3.1875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.3
-- https://www.phpmyadmin.net/
--
-- Host: localhost:8889
-- Generation Time: Nov 02, 2017 at 10:51 PM
-- 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 |
99cef6786d9fabf0398e8feca5fe74525e3050e8 | SQL | 5pm-HDH/5pmGebetServer | /ddl.sql | UTF-8 | 337 | 2.75 | 3 | [] | no_license | create table prayer
(
id INTEGER
constraint prayer_pk
primary key autoincrement,
prayer_text TEXT,
approved INTEGER DEFAULT 0,
public INTEGER DEFAULT 0,
created DATE DEFAULT CURRENT_DATE,
state INTEGER DEFAULT 0,
original_test TEXT
);
create table authorization (
auth_key TEXT primary key,
type INT... | true |
e21a27f03cae905540fd098546e0266372a01a71 | SQL | fxcebx/TARDIS | /sql_tardis.sql | UTF-8 | 595 | 2.9375 | 3 | [
"Apache-2.0"
] | permissive | CREATE DATABASE TARDIS;
use TARDIS;
CREATE TABLE attackInventory(
attack_id INT NOT NULL AUTO_INCREMENT,
attacker_ip INT(11) UNSIGNED,
attacker_host VARCHAR(255),
attacker_user VARCHAR(255),
victim_ip INT(11) UNSIGNED,
victim_host VARCHAR(255),
attack_time VARCHAR(255) NOT NULL,
attack_log VAR... | true |
124feb01230515626493b7a0864227bde14bb49c | SQL | kutash/contactsD | /contactsDDataBase/src/main/resources/dump.sql | UTF-8 | 3,778 | 3.96875 | 4 | [] | no_license | SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL,ALLOW_INVALID_DATES';
CREATE SCHEMA IF NOT EXISTS `contacts` DEFAULT CHARACTER SET utf8mb4 ;
-- -----------------------------------------... | true |
35ab9781dd2dd5979abd28764aae84e747f98693 | SQL | xorb5693/KH | /DB/2020-03-20/jdbc.sql | UHC | 1,225 | 4 | 4 | [] | no_license |
CREATE TABLE EXAM_MEMBER(
MEMBER_NO NUMBER PRIMARY KEY,
MEMBER_ID VARCHAR2(20) UNIQUE,
MEMBER_PW VARCHAR2(30) NOT NULL,
MEMBER_NAME VARCHAR2(20) NOT NULL,
PHONE CHAR(11)
);
COMMENT ON COLUMN EXAM_MEMBER.MEMBER_NO IS 'ȸȣ';
COMMENT ON COLUMN EXAM_MEMBER.MEMBER_ID IS '̵';
COMMENT ON COLUMN EXAM_MEMBE... | true |
4ee1ea55e758d6dc895ea8a9559a16bb4b5c162d | SQL | NahomKibreab/Sundance-Mazda-Project | /backend/db/schema/create.sql | UTF-8 | 1,251 | 3.375 | 3 | [] | no_license | DROP TABLE IF EXISTS garage CASCADE;
DROP TABLE IF EXISTS orders CASCADE;
DROP TABLE IF EXISTS users CASCADE;
DROP TABLE IF EXISTS vehicles CASCADE;
CREATE TABLE vehicles (
id SERIAL PRIMARY KEY NOT NULL,
year INTEGER NOT NULL,
mileage INTEGER ,
make VARCHAR(255) NOT NULL,
model VARCHAR(255) NOT NULL,
stoc... | true |
09555f786d0ea8be0339a06349cac4291a7d8dda | SQL | Gustibimo/backend | /dao/src/test/resources/life/catalogue/es/index-sector-chromista.sql | UTF-8 | 1,646 | 3.640625 | 4 | [
"Apache-2.0"
] | permissive | -- Make all chromista belong to sector 13
UPDATE taxon set sector_key = 13 where id in(
WITH RECURSIVE tree AS(
SELECT t.id
FROM taxon_1000 t JOIN name_1000 n ON t.name_id=n.id LEFT JOIN verbatim_1000 vbt ON vbt.key=t.verbatim_key LEFT JOIN verbatim_1000 vbn ON vbn.key=n.verbatim_key LEFT JOIN vernacular_name_1000 vn O... | true |
41952441a254b42d3180bc8ee24ff97b81c96105 | SQL | leonardocroda/tcc | /carga/datawarehouse.DDL.sql | UTF-8 | 921 | 3.5 | 4 | [] | no_license | CREATE TABLE IF NOT EXISTS DimFeeling (
idDimFeeling INT NOT NULL,
feeling VARCHAR(45) NOT NULL,
PRIMARY KEY (idDimFeeling)
);
CREATE TABLE IF NOT EXISTS DimTime (
idDimTime BIGINT,
day INT,
month VARCHAR(4),
year INT,
dayweek VARCHAR(45),
hour VARCHAR (8),
shift VARCHAR(45),
PRIMARY KEY (idDimTi... | true |
f16916f0dec7805d31046c6fec0c5dbb19c873f9 | SQL | XingXing2019/LeetCode | /Database/LeetCode 2175 - TheChangeInGlobalRankings/TheChangeInGlobalRankings_SQLServer.sql | UTF-8 | 407 | 4.28125 | 4 | [] | no_license | WITH Old_Rank AS (
SELECT *, RANK() OVER(ORDER BY points DESC, name) AS old_rank
FROM TeamPoints
),
New_Rank AS (
SELECT t.*, RANK() OVER(ORDER BY t.points + ISNULL(p.points_change, 0) DESC, name) AS new_rank
FROM TeamPoints t LEFT JOIN PointsChange p
ON t.team_id = p.team_id
)
SELECT o.team_id, o.name, o.old_r... | true |
5b9ffad87e1145f5e4b45f2d1900e84ff30278bd | SQL | backupforks/tsql | /test/run-time/input/query/left-join-using-candidate-key.sql | UTF-8 | 234 | 3.109375 | 3 | [] | no_license | SELECT
"myTable"."ck0" AS "myTable--ck0"
FROM
"myTable"
LEFT JOIN
"myTable2"
ON
"myTable"."ck0" IS "myTable2"."ck0"
LEFT JOIN
"myTable3"
ON
("myTable"."ck1" IS "myTable3"."ck1") AND
("myTable"."ck2" IS "myTable3"."ck2")
| true |
436a32af74761d7971c6ffb36db520e471fe78a7 | SQL | shubhambhargav/scala-play-multi-modules | /modules/sports/conf/evolutions/default/1.sql | UTF-8 | 988 | 3.265625 | 3 | [
"Apache-2.0"
] | permissive | # First evolution
# --- !Ups
CREATE TABLE sports_sport (
id INT(11) AUTO_INCREMENT NOT NULL,
name VARCHAR(32) NOT NULL,
created_at timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
primary key (id)
);
CREATE TABLE sports_sportskill (
id INT(11) AUTO_INCREMENT NOT NULL,
name VARCHAR(32) NOT NULL,... | true |
35d192650fd74a97136b016bfcd52cb231e7380f | SQL | umazeez247/MySQL-Assignment | /Movie_data Creation.sql | UTF-8 | 2,340 | 3.703125 | 4 | [] | no_license | use movie;
CREATE TABLE actor(
act_id integer NOT NULL,
act_fname Char(20) NOT NULL,
act_lname Char(20) NOT NULL,
act_gender Char(1) NULL,
CONSTRAINT actor_PK PRIMARY KEY(act_id)
);
CREATE TABLE director(
dir_id integer NOT NULL,
dir_fname Char(20) NOT NULL,
dir_lname Char(20) NOT ... | true |
2f81ff47fcf0e06cd5f1fb73bc6cdd90a1b1a564 | SQL | LabKey/wnprc-modules | /WNPRC_EHR/resources/queries/study/distinctSNOMED.sql | UTF-8 | 884 | 2.6875 | 3 | [
"Apache-2.0"
] | permissive | /*
* Copyright (c) 2011 LabKey Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicab... | true |
7bc16b6bf8ff0c0a6803531d888c5d2837a8eee6 | SQL | BerkleyLim/interior_test | /src/main/resources/interia_DB_model_2018_07_10/project (1).sql | UTF-8 | 126,624 | 3.3125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.2
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- 생성 시간: 18-08-20 07:54
-- 서버 버전: 5.6.40
-- PHP 버전: 7.0.30
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIE... | true |
fecb5c890fe14c03da905c09961eba21374b94f8 | SQL | VenuxSoftware/iana | /examples/join.sql | UTF-8 | 158 | 3.5 | 4 | [] | no_license | select e1."Event_Name", v2."Venue"
from "events" e1
full outer join "venues" v2
on (e1."VenueNo" = v2."VenueNo")
order by e1."Event_Name" asc, v2."Venue" asc | true |
f913bf794068587fcefcad34299c93643141b70d | SQL | razashan/Learning-SQL | /7.Lecture.sql | UTF-8 | 1,136 | 3.546875 | 4 | [] | no_license | /* Data Generation, Manipulation, and Conversion */
/* String Generation */
create table string_tbl
(char_fld char(30),
vchar_fld varchar(30),
text_fld text);
insert into string_tbl(char_fld,vchar_fld,text_fld)
values('This is char data',
'This is varchar data',
'This is text data');
select vchar_fld
from string_tbl... | true |
8289cd2ca6b875ce7158a46f995734f4f587215f | SQL | Tydax/tweelings | /data/sql/create_table.sql | UTF-8 | 724 | 2.75 | 3 | [] | no_license | /*****************************************
* *
* SQL SCRIPT *
* *
*****************************************/
/*
* This the script .sql to execute to create the database.
*/
-- TWEELING
CREATE TABLE IF NOT E... | true |
23fda13cd56ceffad59c9f76d08510b68dc2a90d | SQL | matheusmelchiades/election | /out/production/resources/db/changelog/scripts/001.CREATE_TABLE_ELECTION.sql | UTF-8 | 223 | 2.734375 | 3 | [] | no_license | create table election (
id integer identity primary key,
year integer(4) not null ,
state_code varchar(5) not null,
description varchar(255) not null,
constraint check_year check(year >= 2000 and year <=2200)
);
| true |
268ab90725a6e4e1fc151a33563942b64426302f | SQL | dc0059/CS499 | /CS499_DataDump/cs_499_tcms_routines.sql | UTF-8 | 28,105 | 2.953125 | 3 | [] | no_license | CREATE DATABASE IF NOT EXISTS `cs_499_tcms` /*!40100 DEFAULT CHARACTER SET utf8 */;
USE `cs_499_tcms`;
-- MySQL dump 10.13 Distrib 5.7.17, for Win64 (x86_64)
--
-- Host: localhost Database: cs_499_tcms
-- ------------------------------------------------------
-- Server version 5.7.17-log
/*!40101 SET @OLD... | true |
381e0cb665578fac6815cb36ed852000d0483b68 | SQL | krismorte/SQL-Script-Utils | /PostgreSQL/drop-all-tables.sql | UTF-8 | 256 | 2.9375 | 3 | [] | no_license |
drop owned by user_name;
--OR
DO $$
DECLARE
brow record;
BEGIN
FOR brow IN (select 'drop table "' || tablename || '" cascade;' as table_name from pg_tables where schemaname = 'public') LOOP
EXECUTE brow.table_name;
END LOOP;
END; $$ | true |
538436907c1f48b0618a9abadc15608b9260a807 | SQL | JcGaara/SGA-PLSQL-OPE | /SGA-OPERACION/Procedures/SP_FECHA_VENCIDA_SOT_EJECUCION.sql | ISO-8859-1 | 4,876 | 3.1875 | 3 | [] | no_license | CREATE OR REPLACE PROCEDURE OPERACION.sp_fecha_vencida_sot_ejecucion IS
ls_destino varchar2(100);
ls_destino1 varchar2(100);
ls_cuerpo varchar2(4000);
ls_subject varchar2(100);
/******************************************************************************
Procedimiento para enviar notificaciones a Provisioning 15 dia... | true |
f837d9bd31565d44f8859df39e8d80d09d628f35 | SQL | yujinhao/shoes-shop | /Document/shop.sql | UTF-8 | 9,268 | 3.328125 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : 47.107.177.181
Source Server Version : 50726
Source Host : 47.107.177.181:3306
Source Database : shop
Target Server Type : MYSQL
Target Server Version : 50726
File Encoding : 65001
Date: 2020-02-27 15:20:06
*/
SET FOREIGN_KEY_CHECKS=0... | true |
318fc52b0f5cf6d79bfb865ded05410a1e42cab8 | SQL | CS4300-Web/Car4Rent-Group-Project-website | /car4rent (2).sql | UTF-8 | 3,466 | 3.40625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Dec 01, 2020 at 10:00 AM
-- Server version: 10.4.14-MariaDB
-- PHP Version: 7.4.11
-- This SQL is used for Locations Pages and User SignIn/SignUp
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
... | true |
f1f1f301b56de3f7a0382f08150434e9d12cfab0 | SQL | bitgittry/BaseCodeAnalysis | /trunk/dbv/stored_routines/SessionCloseExpiredSessions.sql | UTF-8 | 1,560 | 3.609375 | 4 | [] | no_license | DROP procedure IF EXISTS `SessionCloseExpiredSessions`;
DELIMITER $$
CREATE DEFINER=`bit8_admin`@`127.0.0.1` PROCEDURE `SessionCloseExpiredSessions`()
BEGIN
COMMIT; -- just in case
SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
UPDATE
(
SELECT session_id
FROM sessions_main FORCE INDEX (st... | true |
7bfb771ff36d7904db93e0d859722a2613f8a0e2 | SQL | mzahbach/billetterie | /bd_billetterie.sql | UTF-8 | 20,103 | 3.421875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Hôte : 127.0.0.1:3306
-- Généré le : ven. 10 mai 2019 à 12:21
-- Version du serveur : 5.7.23
-- Version de PHP : 7.2.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET... | true |
7983c6848b0700ea1defa42d578ef0bb605c3330 | SQL | yujinnnnnnnnnn/sql | /2021_03_25.sql | UTF-8 | 8,662 | 4.3125 | 4 | [] | no_license | --실습5
cycle, prodict 테이블을 이용하여 cid =1인 고객이 애음하지 않는 제품을 조회하는 쿼리작성
select pid, pnm
from product
where pid NOT IN (select pid
from cycle
where cid =1);
-------------
==특정직원을 알기위해 사용됨
sub6]
cycle 테이블을 이용하여 cid=1 인 고객이 애음하는 제품중 cid =2 인 고객도 애음하는 제품의 애음정보를 조회하는 쿼리
--답
select *
from c... | true |
aa633ab3c891bf5e4a9b91d74393120c4cde27d2 | SQL | 28ACB29/HackerRank-Solutions | /SQL/Basic Join/The Report.sql | UTF-8 | 400 | 3.671875 | 4 | [] | no_license | /*
Enter your query here.
Please append a semicolon ";" at the end of the query and enter your query in a single line to avoid error.
*/
SELECT (CASE WHEN Grades.Grade >= 8 THEN Students.name ELSE 'NULL' END) AS Name, Grades.Grade, Students.Marks
FROM Students, Grades
WHERE Students.Marks BETWEEN Grades.Min_Mark AND Gr... | true |
e2f3e605fca3bf32841da6b0e4fa203b4cefc47a | SQL | PaulaSchulzQ/Python2020 | /creacion.sql | UTF-8 | 1,182 | 3.21875 | 3 | [] | no_license | CREATE TABLE `paula`.`schulz` (
`id` INT NOT NULL ,
`nombre` VARCHAR(12) NOT NULL ,
`apellido` VARCHAR(12) NOT NULL ,
`covid` BOOLEAN NOT NULL DEFAULT FALSE ,
PRIMARY KEY (`id`)) ENGINE = InnoDB CHARSET=utf8 COLLATE utf8_spanish_ci;
-- insercion de registro
INSERT INTO `schulz` (`id`, `nombre`, `apel... | true |
e361f4502441d558913e52f6dd17dce576faf35e | SQL | ro-msg-spring-training/online-shop-AndreiBrehuescu | /shop/src/main/resources/db/migration/V9_0__create_table_stock.sql | UTF-8 | 284 | 3.4375 | 3 | [
"MIT"
] | permissive |
create table if not exists `stock`(
`idProduct` Integer,
`idLocation` Integer,
`quantity` Integer,
CONSTRAINT FK_STOCK_PRODUCT FOREIGN KEY (`idProduct`) references PRODUCT(ID),
CONSTRAINT FK_STOCK_LOCATION FOREIGN KEY (`idLocation`) references LOCATION(ID)
); | true |
5c0d4beb5863096878f6745977351d60d7a2929d | SQL | iangornall/DIYHub | /src/seeddata.sql | UTF-8 | 9,116 | 2.875 | 3 | [] | no_license | insert into diy_users (first_name, last_name, email, password, avatar_file) VALUES
('Jason', 'Voorhees','mistermachete@campcrystallake.com','boopboop123','bulb.png'),
('Freddie', 'Kruger','nightmare@elmstreet.com','slashy123','bulb.png'),
('Jack', 'Torrance','caretaker@overlook.com','advocat123','bulb.png'),
('Randal',... | true |
727da10cce66005bb3aa7de4d3de4e2001d57075 | SQL | seriesoftubes/Intro_DataScience_UniversityOfWashington | /assignment2/queries.sql | UTF-8 | 1,411 | 4.15625 | 4 | [] | no_license | -- select.txt
select count(*)
from frequency
where docid = '10398_txt_earn';
-- select_project.txt
select term
from frequency
where docid = '10398_txt_earn' and count = 1;
-- union.txt
select term
from frequency
where docid = '10398_txt_earn' and count = 1
union
select term
from frequency
where docid = '925_txt_... | true |
5f2af0024eb73eaa1a9abfcadf788b860c7c3ac9 | SQL | HanJeGyu/smingjob | /backend/web/src/main/resources/data.sql | UTF-8 | 6,594 | 3.5 | 4 | [] | no_license | /* 구직자 테이블 */
CREATE TABLE interviewer
(
itv_seq BIGINT NOT NULL AUTO_INCREMENT COMMENT '구직자_SEQ',
itv_id VARCHAR(50) NOT NULL COMMENT '구직자ID',
pwd VARCHAR(50) NOT NULL COMMENT '비밀번호',
name VARCHAR(50) NOT NULL COMMENT '구직자명',
birth VA... | true |
c22b83bf2fa00c5d872085fbad74041e1aa2593f | SQL | emeraldjava/bhaa-zend | /sql/teams.sql | UTF-8 | 632 | 3.5 | 4 | [] | no_license |
select * from sector;
describe sector;
describe runner;
select * from sct;
select count(company.id) from company where company.sector = 1
select count(runner.id) from runner as runner
join company as company on runner.company=company.id
join sector as sector on company.sector=sector.id
and sector.id=1;
... | true |
963297defded6f6ba329463e5a557c91b7e0cd61 | SQL | DERIQUEHEMMathieu/AuLecteurJoyeux | /database/AuLecteurJoyeux.sql | UTF-8 | 3,821 | 3.6875 | 4 | [
"MIT"
] | permissive | DROP DATABASE IF EXISTS librairie;
CREATE DATABASE librairie CHARACTER SET 'utf8';
USE librairie;
DROP USER IF EXISTS 'root'@'Localhost';
CREATE USER 'root'@'Localhost';
GRANT ALL PRIVILEGES ON librairie.* TO 'root'@'Localhost' IDENTIFIED BY '';
CREATE TABLE user(
id INT UNSIGNED NOT NULL AUTO_INCREMENT,
last... | true |
55baba86cc4fdf9bbc7474714096a44cbff50a35 | SQL | ARubiato/online-shop | /online-shop.sql | UTF-8 | 2,999 | 3.015625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Oct 15, 2018 at 11:02 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 |
e411a0a0eeceb991a77c1f3c1be445c906e796be | SQL | Chulf/baizhi-manager | /jeecg/src/main/java/com/jeecg/demo/sql/JeecgMinidaoDao_getLogChartData.sql | UTF-8 | 205 | 3.015625 | 3 | [] | no_license | SELECT
broswer as name,
count(1) as 'value',
CASE
WHEN broswer = 'Firefox' THEN
'#FF00FF'
WHEN broswer = 'IE' THEN
'#FFFF00'
ELSE
'#43CD80'
END as color
FROM
t_s_log
GROUP BY
broswer; | true |
b66e67d8f85c5f049c8f75249b244231d23f0698 | SQL | yuzelli/bookkeepmanagerService | /bookkeepinmanager.sql | UTF-8 | 1,264 | 2.875 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : localhost_3306
Source Server Version : 50027
Source Host : localhost:3306
Source Database : bookkeepinmanager
Target Server Type : MYSQL
Target Server Version : 50027
File Encoding : 65001
Date: 2017-09-14 09:34:17
*/
SET FOREIGN_KEY_... | true |
12a57f241491deca4ca06ef192b931b8d4315b82 | SQL | intake24/api-server | /FoodDataSQL/src/main/resources/sql/admin/get_portable_as_served_images.sql | UTF-8 | 398 | 3.4375 | 3 | [
"BSD-3-Clause",
"Apache-2.0",
"MIT",
"BSD-2-Clause",
"LicenseRef-scancode-proprietary-license",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | SELECT weight, src.path as source_path, src.thumbnail_path as source_thumbnail_path, src.keywords, p1.path as image_path, p2.path as thumbnail_image_path FROM as_served_images
JOIN processed_images as p1 ON image_id = p1.id
JOIN processed_images as p2 ON thumbnail_image_id = p2.id
JOIN source_images as src ON src... | true |
4cf4d4f29b557d9d76f3a9df1d56af5d75235ed9 | SQL | MykolaBova/myChef | /SQL/insert_data.sql | UTF-8 | 3,214 | 3.109375 | 3 | [] | no_license | # INSERT users
INSERT INTO users (user_id, user_name, email, pswrd_hash) VALUES(1, 'Ivan', 'Ivan@email', 111111);
INSERT INTO users (user_id, user_name, email, pswrd_hash) VALUES(2, 'Anna', 'Anna@email', 111111);
INSERT INTO users (user_id, user_name, email, pswrd_hash) VALUES(3, 'Oleg', 'Oleg@email', 111111);
INSERT I... | true |
899178445256873f52bed457213998adb168465e | SQL | metux/chromium-suckless | /third_party/chromite/cidb/migrations/00042_create_build_message_table.sql | UTF-8 | 434 | 2.734375 | 3 | [
"LGPL-2.0-or-later",
"GPL-1.0-or-later",
"MIT",
"Apache-2.0",
"BSD-3-Clause",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | CREATE TABLE buildMessageTable (
id INT NOT NULL AUTO_INCREMENT,
build_id INT NOT NULL,
message_type VARCHAR(240),
message_subtype VARCHAR(240),
message_value VARCHAR(480),
timestamp TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY(id),
FOREIGN KEY (build_id)
REFERENCES buildTable(id)
);
... | true |
efbf345c2383543dcb405351be09bafd7400d716 | SQL | scchess/LabKey | /server/customModules/WNPRC_EHR/tools/wnprc_mysql/tsv_export/scripts/dataset/clinremarks.sql | UTF-8 | 2,660 | 3.859375 | 4 | [] | no_license | /*
* Copyright (c) 2010 LabKey Corporation
*
* Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0
*/
SELECT
lower(id) as Id,
Date,
pno as project,
userid,
SUBSTR(remark,1,50) as remark,
ts, objectid,
parentid,
category
FROM
(
SELECT
id,
FixDateTime(date, time) AS Date,
(pn... | true |
100515d5a42e5bc59fc7fdfefa9a79b4db37c769 | SQL | Ahamasmi/Student-Autoregistration-Software | /Sql/sih.sql | UTF-8 | 3,052 | 3.046875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jan 31, 2020 at 06:31 PM
-- Server version: 10.4.10-MariaDB
-- PHP Version: 7.3.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... | true |
1a63671ed8eba7b31e6f51141c495f46617fe145 | SQL | hylandz/majiang | /src/main/resources/db/migration/V5__Create_account_table.sql | UTF-8 | 378 | 2.859375 | 3 | [
"Apache-2.0"
] | permissive | create table account
(
id bigint(11) auto_increment primary key,
user_name varchar(125) not null,
password varchar(55) not null,
email varchar(50),
gmt_create bigint(11),
gmt_modified bigint(11),
phone varchar(13),
gender int(1) default 1
);
comment on table account is '注册表';
comment o... | true |
a7df0327fa2877f8ad16ab99eea1d1bf49c38150 | SQL | wuliu001/fbc | /fbc-database/msg_queues/tables/service_parameters.sql | UTF-8 | 509 | 2.546875 | 3 | [] | no_license |
USE `msg_queues`;
DROP TABLE IF EXISTS `service_parameters`;
CREATE TABLE `service_parameters` (
`id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
`queue_type` VARCHAR(50) NOT NULL,
`queue_step` TINYINT(4) NOT NULL,
`body_val_pos` VARCHAR(50) DEFAULT NULL,
... | true |
90b1d9875e5e146207af55b97dd5861845d99444 | SQL | IsMiseLee/SecondYearProject | /conf/evolutions/default/2.sql | UTF-8 | 1,223 | 2.578125 | 3 | [] | no_license | # --- Sample dataset
# --- !Ups
insert into product (id,album_name,year,art_name,price,stock) values (1,'Government Plates','2013','Death grips',12.00,9);
insert into product (id,album_name,year,art_name,price,stock) values (2,'American Idiot','2004','Green day',8.00,2);
insert into product (id,album_name,year,art_na... | true |
e472cc676d77c1400d7f26eb950ca71b23558077 | SQL | bmeadows/acs-journal | /app/webroot/acs/2011/includes/db/view_submissions.sql | UTF-8 | 333 | 3.484375 | 3 | [] | no_license | -- view to show submissions
CREATE VIEW view_submission AS
SELECT
s.id AS id,
s.name AS name,
s.surname AS surname,
s.email AS email,
p.title AS title,
p.id AS paperID,
p.abstract AS abstract,
p.url AS url
FROM
submission s,
paper p
WHERE
s.paper = p.id
ORDER BY
... | true |
a0a75a6da545a7f59a0d41c97f5f3a09d0b93e6b | SQL | Zahidsqldba07/Databases-Basics-MS-SQL-Server | /Database Basics MS SQL Exam 24 Apr 2017/24Apr2017/06 .Job Status.sql | UTF-8 | 104 | 2.859375 | 3 | [] | no_license | SELECT Status,IssueDate FROM Jobs
WHERE Status <> 'Finished'
ORDER BY IssueDate ASC,
JobId ASC | true |
53020ef3a30e96d9f7d3b7d1fa96431df5b2789f | SQL | nirash123/bank_Management-Node-js-Angular-Mysql | /Databases/Dump20210217.sql | UTF-8 | 4,984 | 2.78125 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 5.7.17, for Win64 (x86_64)
--
-- Host: 127.0.0.1 Database: assignment
-- ------------------------------------------------------
-- Server version 5.7.18-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_R... | true |
ab21e7c456b203a4fd542a2dfd551a26cbb6ddcd | SQL | ValentinMinder/WordHunt | /database/mot import files/mot4.sql | UTF-8 | 952,466 | 2.875 | 3 | [] | no_license | SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
--
-- Base de données :... | true |
72881dc230917b3f23128065f5b2c8bffe5925ad | SQL | mattpodl/php_small_projects | /baza_danych/osoba.sql | UTF-8 | 1,281 | 2.765625 | 3 | [] | no_license | CREATE TABLE osoba
(
Id INTEGER PRIMARY KEY AUTO_INCREMENT,
Imie VARCHAR(25),
Nazwisko VARCHAR(35),
Rok_urodzenia YEAR,
Miejsce_urodzenia VARCHAR(35)
);
INSERT INTO osoba(Imie, Nazwisko,Rok_urodzenia, Miejsce_urodzenia)VALUES ('Jan', 'Kowalski', 1987, 'Warszawa');
INSERT INTO osoba(Imie, Nazwisko,Rok_urodzenia, Miejsc... | true |
a9521648e45e1d6a29a55bced9d1a4b7a64f2549 | SQL | CloudOpting/pilots | /EXP-16-Sentilo/mysql/2-agent_mysql-sentilo-version-1.5.1.sql | UTF-8 | 848 | 3.296875 | 3 | [] | no_license | -- Script de creacion del modelo de entidades para una BD MySQL: utiliza la funcion auto_increment para informar el id de cada registro
CREATE TABLE sentilo_observations (
id INT NOT NULL AUTO_INCREMENT,
provider VARCHAR(128) NOT NULL,
sensor VARCHAR(128),
value VARCHAR(512) NOT NULL,
timestamp varchar(20) NOT NUL... | true |
eed94fba17abc34578da1f4fc310017dad3cd023 | SQL | nromanen/Ch-031.AQC | /OMS_test/src/main/resources/import.sql | UTF-8 | 2,256 | 2.953125 | 3 | [] | no_license | use oms2;
insert into Roles(RoleName) values('Administrator');
insert into Roles(RoleName) values('Merchandiser');
insert into Roles(RoleName) values('Supervisor');
insert into Roles(RoleName) values('Customer');
insert into Regions(RegionName) values('North');
insert into Regions(RegionName) values('East');
insert ... | true |
515abff3fd4e031b729f361e14f9296170031667 | SQL | bdp612/IroquoisCiv | /Iroqouis_GameDefines.sql | UTF-8 | 12,290 | 2.59375 | 3 | [] | no_license | -- ==========================================================================================================
--
-- CIVILIZATIONS
--
-- ==========================================================================================================
--
-- Types
--
INSERT INTO Types
(Type, Kind)
VALUES ('CI... | true |
b07dec61acb43d4b2fed643cf2f5392ae260dda1 | SQL | kaloyero/countryDB | /tables/localidades.sql | UTF-8 | 363 | 3.109375 | 3 | [] | no_license | DROP TABLE IF EXISTS `localidades`;
CREATE TABLE Localidades
(
IdLocalidad INTEGER AUTO_INCREMENT,
Nombre VARCHAR(50) NOT NULL,
IdCiudad INTEGER NOT NULL,
CodigoPostal VARCHAR(10) NULL,
PRIMARY KEY (IdLocalidad),
FOREIGN KEY FK_Ciudades_Localidades (IdCiudad) REFERENCES... | true |
e24f6d37e5c2cb651a2f93ee015e5df9b2198809 | SQL | pablo09/microclothes | /order-service/src/main/resources/db/migration/V002_1__create_item_table.sql | UTF-8 | 303 | 3.25 | 3 | [] | no_license | CREATE TABLE ITEM (
ID bigint generated by default as identity,
NAME VARCHAR(100) not null,
COLOR VARCHAR(100) not null,
SIZE VARCHAR(100) not null,
AMOUNT DECIMAL not null,
CURRENCY VARCHAR(5) not null,
ORDER_ID BIGINT,
PRIMARY KEY(ID),
FOREIGN KEY (ORDER_ID) REFERENCES ORDERS(ID)
) | true |
ba7ef98e2bff69653cdfbc737dda8746c5e7f999 | SQL | StrangePan/Make-Everything | /includes/database/Users_create.sql | UTF-8 | 259 | 3.4375 | 3 | [] | no_license | CREATE TABLE IF NOT EXISTS `Users` (
ID BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY,
Username VARCHAR(32) NOT NULL,
Password VARCHAR(256) NOT NULL,
Email VARCHAR(128) DEFAULT NULL,
UNIQUE KEY ind_users_username (Username)
) Engine=InnoDB;
| true |
64c732467db143ded000b3c8dc0804271965d603 | SQL | shaq147/ocarina_technologies | /schema.sql | UTF-8 | 1,358 | 2.921875 | 3 | [] | no_license | # Dump of table story
# ------------------------------------------------------------
DROP TABLE IF EXISTS `story`;
CREATE TABLE `story` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`uri` varchar(40) NOT NULL DEFAULT '',
`title` varchar(255) NOT NULL,
`body` text NOT NULL,
`started_at` datetime NOT NULL,... | true |
5d4175d3c3357982cd363ca93c3028b95039ee6a | SQL | alvin2396/Senin_141111286_AlvinPangantar | /Latihan_POS/database_latihan_pos.sql | UTF-8 | 3,302 | 2.96875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.4.14
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Dec 26, 2016 at 09:46 AM
-- Server version: 5.6.26
-- PHP Version: 5.6.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;... | true |
632e9228e1bbb319f1993ef64422551e759e6414 | SQL | marchdan/yacs.n | /src/data/queries/full-classes.sql | UTF-8 | 633 | 4.0625 | 4 | [
"MIT"
] | permissive | -- -- list of classes offered (all)
select
c.department,
c.level,
max(c.title) as title,
json_agg(
row_to_json(section.*)
) sections
from
course c
left join
(
select
c1.crn,
c1.semester,
max(c1.department) as department,
max(c1.level) as level,
json_agg(
row_to_json(cs.*)
... | true |
9f736ce51ebf1164081fcf22f322c914b8281e2c | SQL | terencechow/rent-server | /setup.cql | UTF-8 | 3,437 | 4.03125 | 4 | [] | no_license | // Run the below commands to setup the cql tables.
// in production use NetworkToplogyStrategy and use a network aware snitch,
// and define data center names and replication factors for each data center
// ie CREATE KEYSPACE "Excalibur" WITH REPLICATION = {'class' : 'NetworkTopologyStrategy', 'dc1' : 3, 'dc2' : 2};
... | true |
89b643c17af32926950d381e083d5a6cd6850f79 | SQL | dmitriyermoshin19/job4j_car_accident | /db/schema.sql | UTF-8 | 1,331 | 3.703125 | 4 | [] | no_license | CREATE TABLE types (
id serial primary key,
name varchar(200)
);
insert into types (name) values ('Две машины');
insert into types (name) values ('Машина и человек');
insert into types (name) values ('Машина и велосипед');
CREATE TABLE rules (
id serial primary key,
name varchar(200)
);
insert into rules (name) valu... | true |
29f51f33f8a51d30f1c9bc0ccbe76e5106c8f2d2 | SQL | nguyentranchung/hocvps | /config/mysql/mariadb10_3tables.sql | UTF-8 | 3,531 | 3.140625 | 3 | [] | no_license |
-- MySQL dump 10.15 Distrib 10.0.13-MariaDB, for Linux (x86_64)
--
-- Host: localhost Database: mysql
-- ------------------------------------------------------
-- Server version 10.0.13-MariaDB
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARAC... | true |
538ae4509b28835a1f4a8d8fb492b93b980fb71c | SQL | JDix76/ISTA420 | /EXERCISES/TSQL-EXE1-BBAL.sql | UTF-8 | 764 | 3.546875 | 4 | [] | no_license | .echo on
.headers on
-- Name bball.sql
-- Author: James Dix
-- Date: August 7, 2018
-- Purpose: TSQL Exer 1
drop table if exists bball;
create table bball(
id integer
FirstName text,
LastName text,
CurrentTeam text,
YrsExp integer,
College text,
);
insert into bball values (1, 'Lebron','James... | true |
809f8c681fc99562efd0706e8d2a589f9c35d459 | SQL | Andresfyc/FilmSwap | /mysql/02-tablas.sql | UTF-8 | 18,792 | 3.375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 09-06-2021 a las 18:06:35
-- Versión del servidor: 10.4.17-MariaDB
-- Versión de PHP: 7.4.15
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
121bb486a0838c0fff195eb84d68a8eb517e2b86 | SQL | costsrl/cost-admin | /data/cost_admin_dump.sql | UTF-8 | 10,749 | 2.9375 | 3 | [
"BSD-3-Clause"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.2.12deb2+deb8u1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Apr 27, 2016 alle 14:20
-- Versione del server: 5.5.47-0+deb8u1
-- PHP Version: 5.6.19-0+deb8u1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_... | true |
94b886f813d7a836435eb65627c4d4c2725e6f46 | SQL | ogobrecht/sample-data-sets-for-oracle | /dvd_rental_store/data/drs_actor.sql | UTF-8 | 23,151 | 2.515625 | 3 | [
"BSD-3-Clause",
"MIT"
] | permissive | -- Script generated by PLEX version 2.4.0 - more infos here: https://github.com/ogobrecht/plex
-- Performance Hacks by Connor McDonald: https://connor-mcdonald.com/2019/05/17/hacking-together-faster-inserts/
-- For strange line end replacements a big thank to SQL*Plus: https://support.oracle.com/epmos/faces/DocumentDis... | true |
14eb9ae68e8e1da1bbb17abed286017c105631f0 | SQL | HusseinZayed/Docker-Compose | /db_scripts/CEM_ITEM_T.sql | UTF-8 | 983 | 2.96875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.9
-- https://www.phpmyadmin.net/
--
-- Server version: 5.7.24
-- PHP Version: 7.2.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARAC... | true |
47a6383cec25cb7d3ac25decd9cf255f4e68bc50 | SQL | Scotty-Henry/Park-Reservation-System | /select_reservation_.sql | UTF-8 | 917 | 3.796875 | 4 | [] | no_license | Select * From reservation Where campground_id = 1 AND from_date Between '2019/06/17' AND
Select * From site;
Select *
from reservation
join UserReservation ON reservation.reservation_id = UserReservation.reservation_id
where [user_id] = 1;
Select *
From site
Where campground_id = 1 AND site_id Not IN (Se... | true |
32bb7dc4c012c7fe83ff0baa6935c7e83ee8c9f9 | SQL | moutainhigh/p2p | /sz-yld/front/数据库/数据库增量脚本/O_V/1512_update/S70.SP_T7051.sql | GB18030 | 2,497 | 3.75 | 4 | [] | no_license | DROP PROCEDURE IF EXISTS `S70`.`SP_T7051`;
DELIMITER ;;
CREATE DEFINER=`root`@`%` PROCEDURE `S70`.`SP_T7051`(IN _date DATE)
COMMENT 'Ͷа£ͳƣÿһִһ'
BEGIN
-- ûͶ -
-- ˺ID
DECLARE _F01 INT UNSIGNED DEFAULT 0;
-- ˺
DECLARE _F02 VARCHAR(20);
-- Ͷܶ
DECLARE _F03 DECIMAL(20, 2) DEFAULT 0.00;
DECLAR... | true |
2f3dc0b8f4158278dd040bcce6296df467825e00 | SQL | Vixorem/Chat | /Chat/Database/ChatGetDialogsForUserId.sql | UTF-8 | 609 | 3.5 | 4 | [] | no_license | -- =============================================
-- Author: Шулепкин В.А.
-- Create date: 03.09.2020
-- Description: Получает список других пользователей, с которыми существует чат (диалог)
-- =============================================
CREATE PROCEDURE ChatGetDialogsForUserId @UserId UNIQUEIDENTIFIER
AS
BEGIN
... | true |
1a88d5b604a72cfd982495c7de8f8e77dedde775 | SQL | renan340/Loja-PHP | /phpcompleto/comercio.sql | UTF-8 | 5,457 | 3.265625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: 14-Mar-2019 às 15:48
-- Versão do servidor: 10.1.10-MariaDB
-- PHP Version: 5.5.33
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CL... | true |
88135908df52afd76ac7e2f9cdd3aa9ce7c74d73 | SQL | safiscet/SE-DBS-15-16 | /Import/view_partyingermany.sql | UTF-8 | 251 | 2.59375 | 3 | [] | no_license | DROP MATERIALIZED VIEW IF EXISTS partyingermany;
CREATE MATERIALIZED VIEW partyingermany AS (
select party, year, sum(erststimmen) as erststimmen, sum(zweitstimmen)as zweitstimmen
from partyinfederalland
group by party, year
order by party
); | true |
2a14852570643be53509d45790dcce0b77dab540 | SQL | dotslashbin/WSF-DB | /DB_RPOWine/DB_RPOErp/dbo/Views/vPubGTasting.sql | UTF-8 | 268 | 3.109375 | 3 | [] | no_license | -- database PubG tasting update utility view [=]
CREATE view vPubGTasting as
select a.pubGN, b.*
from
mapPubGToWine a
left join tasting b
on a.wineN = b.wineN
where b.pubN in (select pubN from pubGToPub where pubGN = a.pubGN)
| true |
d483c18466269dfe5f6fe96448256299f852ac8c | SQL | VooVooVoo/Evence | /src/main/database/create_tables.sql | UTF-8 | 402 | 3.09375 | 3 | [] | no_license | CREATE SEQUENCE public.events_id_seq
INCREMENT 1
MINVALUE 1
MAXVALUE 9223372036854775807
START 6
CACHE 1;
CREATE TABLE public.events
(
eventname character varying,
city character varying,
dance character varying NOT NULL,
id integer NOT NULL DEFAULT nextval('events_id_seq'::regclass),
price double ... | true |
deced11efc6e12761e37795eb27784950ac81796 | SQL | ImPanayotov/SoftUni | /MS SQL Server/Indices And Data Aggregation/03.LongestMagicWandPerDepositGroups.sql | UTF-8 | 102 | 2.75 | 3 | [] | no_license | SELECT wd.DepositGroup, MAX(wd.MagicWandSize)
FROM WizzardDeposits AS wd
GROUP BY wd.DepositGroup
| true |
d2d357a28f56f9dec0027d0c2bc9891367b0763f | SQL | autamata/database | /students.sql | UTF-8 | 4,655 | 3.109375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.1.14
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Jul 06, 2015 at 11: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 |
fd4cba4324b0d1b5c5f66cb2deb50d47f8e07df1 | SQL | hmotta/sql | /tabla_corte_linea.sql | UTF-8 | 1,072 | 3.03125 | 3 | [] | no_license | drop table corte_linea;
CREATE TABLE corte_linea
(
corteid serial NOT NULL,
lineaid integer NOT NULL,
fecha_corte date,
dias_desde_corte_ant integer,
saldo_inicial numeric,
--saldo_promedio numeric,
num_disposiciones integer,
monto_diposiciones numeric,
pagos numeric,
saldo_final numeric,
capital ... | true |
c783272516cddcf83ad170b0f773e559282fe5d1 | SQL | freeroman/social_network | /social_network_no_album.sql | UTF-8 | 7,076 | 3.6875 | 4 | [] | no_license | SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
CREATE DATABASE IF NOT E... | true |
c34dddcbc6b06b87e7e733334d82c0d16b750291 | SQL | tsubasa0404/mosaic | /DataBase/OLD/USERS.SQL | UTF-8 | 3,233 | 3.015625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 3.4.9
-- http://www.phpmyadmin.net
--
-- ホスト: mysql101.phy.lolipop.jp
-- 生成時間: 2015 年 8 月 14 日 08:35
-- サーバのバージョン: 5.6.23
-- PHP のバージョン: 5.2.17
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 ... | true |
a9c2ee15e6daf424f112bdfaac614a6b2b3bcbcd | SQL | mlisec/cst363-Final | /insert.sql | UTF-8 | 2,128 | 3.3125 | 3 | [] | no_license | -- Insert User
INSERT INTO `User`(`ID`, `email`, `password`) VALUES (1,'tanguyen@csumb.edu','123456');
INSERT INTO `User`(`ID`, `email`, `password`) VALUES (2,'mlisec@csumb.edu','mlisec');
-- Insert Application
INSERT INTO `LoanApplication`(`applicationID`, `loan_amount`, `street_address`, `city`, `state`, `zipcode`, ... | true |
c45cc62ad779a6ded42039ff2f5ec7a8c6af1100 | SQL | sesha3/BugBounty | /BugBounty/BugBounty/Configuration/sql_tables.sql | UTF-8 | 1,583 | 3.5625 | 4 | [] | no_license | CREATE TABLE [User](
Id uniqueidentifier primary key NOT NULL,
Email nvarchar(512) NOT NULL,
DisplayName nvarchar(512),
PlatformId int,
UserRole int,
IsActive bit NOT NULL,
IsDeleted bit NOT NULL)
;
CREATE TABLE [UserRole](
[Id] int IDENTITY(1,1) primary key NOT NULL,
[Role] nvarchar(100))
;
CREATE TABLE... | true |
a55aa61886c62c391d2f1934702119c0285bfe68 | SQL | LeticiaNb27/crud-java | /fs.sql | UTF-8 | 1,574 | 3.03125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.0.4.2
-- http://www.phpmyadmin.net
--
-- Máquina: localhost
-- Data de Criação: 26-Jun-2019 às 20:02
-- Versão do servidor: 5.6.13
-- versão do PHP: 5.4.17
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIE... | true |
b5c50676064a9b4ba62faa0fd10272757d6b319c | SQL | howe/omapp | /OperatingManagement/Scripts/DT_01_序列.sql | GB18030 | 3,372 | 2.765625 | 3 | [] | no_license | /*
* ʼϢ
*/
-- ŻϢ
INSERT INTO TB_SEQUENCENUMBER VALUES('0001',0,0,99999999999999999999,1,'','','ɫ','SEQUENCE_0001');
INSERT INTO TB_SEQUENCENUMBER VALUES('0002',0,0,99999999999999999999,1,'','','û','SEQUENCE_0002');
-- ŻϢ liutao add begin
INSERT INTO TB_SEQUENCENUMBER VALUES('4001',0,0,99999999999999999999,1,... | true |
22a8d72376a97c8d31734d44b37644b68d15ca11 | SQL | AlbertoMatuteB/DAW_A01704584 | /EP2.1/ep2.sql | UTF-8 | 4,053 | 3.609375 | 4 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Nov 18, 2020 at 11:15 PM
-- Server version: 10.4.14-MariaDB
-- PHP Version: 7.4.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... | true |
838068c51df28f25b32db1fead2e201d832e71ee | SQL | UcgajjarPDI/Nicepak-PIMS | /PDI_SALESTRACING_DEV/STAGE/Stored Procedures/spADDR_LAUNDRY_V2.sql | UTF-8 | 8,035 | 3.46875 | 3 | [] | no_license | CREATE PROCEDURE [STAGE].[spADDR_LAUNDRY_V2]
@ID INT = NULL
WITH EXEC AS CALLER
AS
BEGIN
--SELECT TOP 1000 * FROM STAGE.TEMP_ADDR_LAUNDRY
-- First load the ID, Name and addresses to temp laundry table for cleaning
-- Take comment out once we are done with developing the stored proc
-- If both Addr1 and Addr... | true |
7ad60a0b4e0c5ef62f9389170257b8b28fcce5df | SQL | cribus/ProgettoTSW | /PROGETTO/DB/societàcalcio.sql | UTF-8 | 10,856 | 3.203125 | 3 | [] | no_license | DROP DATABASE IF EXISTS societàcalcio;
CREATE DATABASE societàcalcio;
USE societàcalcio;
CREATE TABLE IF NOT EXISTS SOCIETA
(
NOME VARCHAR(20) NOT NULL,
sede VARCHAR(20) ,
coloresociale VARCHAR(15),
Posizione_Ranking_UEFA INT ,
PRIMARY KEY(NOME)
);
CREATE ... | true |
cefc395160f728a9583cd0e73fe43ed930b4b24d | SQL | trevorstenson/FarmersMarketManagement | /FarmProject/SQL/farmersdb.sql | UTF-8 | 4,292 | 3.359375 | 3 | [] | no_license | -- MySQL Script generated by MySQL Workbench
-- Thu Mar 14 20:34:27 2019
-- 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='TR... | true |
b76c369e13ce09b7eea28b3bfcba15516faf449f | SQL | evrimulgen/Oracle-DBA-Life | /INFO/Books Codes/Oracle PLSQL Tips and Techniques/OutputChapter06/6_8.sql | UTF-8 | 900 | 2.515625 | 3 | [
"MIT"
] | permissive | -- ***************************************************************************
-- File: 6_8.sql
--
-- Developed By TUSC
--
-- Disclaimer: Neither Osborne/McGraw-Hill, TUSC, nor the author warrant
-- that this source code is error-free. If any errors are
-- found in this source code, please repor... | true |
469b23a7692212305eab8da5aa63c415bf3f5012 | SQL | Lucie6CA/Projet_3A_Voiture | /Architecture2/HDFS/Commande_HDFS.sql | UTF-8 | 1,503 | 2.8125 | 3 | [] | no_license |
---------------------------------------------------------------------------------------------
-- Import des fichiers Marketing, Immatriculations, Catalogue, Clieents_5 et CO2 dans HDFS --
---------------------------------------------------------------------------------------------
-- Sur la machine virtuelle Oracle@B... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.