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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
a8edf2266fffb074e3a71638519c4e4c4a498fc8 | SQL | kennethbrooks3/Database_Management_Take2 | /Labs/lab4.sql | UTF-8 | 1,514 | 4.09375 | 4 | [] | no_license | --1--
select distinct city
from agents
where aid in
(select distinct aid
from orders
where cid in
(select cid
from customers
where name = 'Tiptop'
)
)
--2--
select distinct pid
from orders
where aid in
... | true |
c975ac10fac6c02597c4043e2d26fde845bc463d | SQL | silence-do-good/stress-test-Postgres-and-MySQL | /dump/low/day18/select0439.sql | UTF-8 | 178 | 2.640625 | 3 | [] | no_license |
SELECT timeStamp, temperature FROM ThermometerOBSERVATION o
WHERE timestamp>'2017-11-17T04:39:00Z' AND timestamp<'2017-11-18T04:39:00Z' AND temperature>=39 AND temperature<=57
| true |
298ea489b0d4b7d34e56df6cd475bb3cd25c8012 | SQL | LukeChaston/star-wars-database | /Luke-Collection_2019-09-26.sql | UTF-8 | 2,669 | 3 | 3 | [] | no_license | # ************************************************************
# Sequel Pro SQL dump
# Version 4541
#
# http://www.sequelpro.com/
# https://github.com/sequelpro/sequelpro
#
# Host: 127.0.0.1 (MySQL 5.7.27)
# Database: Luke-Collection
# Generation Time: 2019-09-26 15:22:06 +0000
# ***************************************... | true |
56e7d38efd35e9c234471fc6f67b4f802e1c00e9 | SQL | zhangbao1s/com | /sample-api/doc/sql/schema.sql | UTF-8 | 415 | 3.046875 | 3 | [] | no_license | CREATE DATABASE `sample`;
USE `sample`;
CREATE TABLE `advertiser` (
`id` char(32) NOT NULL,
`advertiser_name` varchar(64) NOT NULL COMMENT '名称',
`description` varchar(1024) DEFAULT '' COMMENT '描述',
`created_time` char(19) NOT NULL COMMENT '创建时间',
`last_modified` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '最... | true |
93f5201e3ae74e2a7da49bfaf221ef3c10899df6 | SQL | saptakbanerjee-hipl/IF-Final | /db_tata_metalics.sql | UTF-8 | 3,053 | 3.1875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jun 22, 2019 at 09:38 AM
-- Server version: 10.1.40-MariaDB
-- PHP Version: 7.2.18
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... | true |
a42c2323d6d910f6f674e6177365876d1d01acbb | SQL | groupmicrofin/group_micro_fin_client | /Society/CustomerApp/Docs/DDL/account_master.sql | UTF-8 | 673 | 3.03125 | 3 | [] | no_license | CREATE TABLE `societyclient`.`account_master` (
`ID` INT(11) NOT NULL AUTO_INCREMENT,
`society_master_id` INT(11) DEFAULT NULL,
`society_account_refNo` VARCHAR(45) DEFAULT NULL,
`member_name` VARCHAR(60) DEFAULT NULL,
`email` VARCHAR(45) DEFAULT NULL,
`phone_no` VARCHAR(45) DEFAULT NULL,
`photo_id` VARCHA... | true |
48db8c0564b88b6f7973bd405df090d78dec4255 | SQL | Kashfa/Project-Love-Music | /db/love_music.sql | UTF-8 | 450 | 3.203125 | 3 | [] | no_license | DROP TABLE IF EXISTS stock;
DROP TABLE IF EXISTS albums;
DROP TABLE IF EXISTS artists;
CREATE TABLE artists (
id SERIAL4 PRIMARY KEY,
name VARCHAR(255)
);
CREATE TABLE albums (
id SERIAL4 PRIMARY KEY,
title VARCHAR(255),
genre VARCHAR(255),
quantity INT4,
buy_price INT4,
sell_price INT4,
artist_id INT4... | true |
7a61fad5c552e935179b4667ec4f4e137937128d | SQL | SofianeAa/DWWM | /BDD/Début_exo/J2/Voiture.sql | UTF-8 | 530 | 3.421875 | 3 | [] | no_license | drop database if exists Voiture;
create database Voiture;
use Voiture;
create Table Marques(
idMarque int (11) NOT NULL auto_increment PRIMARY KEY ,
libelleMarque Varchar (50) NOT NULL
) ENGINE = InnoDB , charset = utf8;
create Table Modeles(
idModele int (11) NOT NULL auto_increment PRIMARY KEY ,
lib... | true |
39372f2f15b89708322331a8c7e9f90c01e584d0 | SQL | CUBRID/cubrid-testcases | /sql/_27_banana_qa/issue_16066_BINARY_charset/_00_String_Functions_and_Operators/cases/substring002.sql | UTF-8 | 2,181 | 3.3125 | 3 | [
"BSD-3-Clause"
] | permissive | --+ holdcas on;
set names utf8;
drop table if exists t1;
create table t1 (id int,col_binary varchar(30) collate binary, col_euckr varchar(30) collate euckr_bin, col_utf8 varchar(30) collate utf8_bin, col_iso varchar(30) collate iso88591_bin);
insert into t1 values(1,'문자열문자열문자열', '문자열문자열문자열', '문자열문자열문자열', 'ÀÏÀÏÀÏÀÏÀÏÀÏÀ... | true |
00cf5f4aa235ace6de8a5b76837f1f1aa573ba18 | SQL | Violet26/usaspending-api | /usaspending_api/etl/management/sql/c_file_linkage/check_assistance_file_c_linkages.sql | UTF-8 | 183 | 3.046875 | 3 | [
"CC0-1.0"
] | permissive | -- Get the count of all unlinked File C records
SELECT
COUNT(*)
FROM
financial_accounts_by_awards
WHERE
(fain IS NOT NULL OR uri IS NOT NULL)
AND
award_id IS NULL; | true |
9f8b12828591648cc5fef28ed17c30c8cbc4f39f | SQL | kellyt1/olingo | /src/main/sql/RemoveCovidIntake.sql | UTF-8 | 2,768 | 3.515625 | 4 | [] | no_license | CREATE OR REPLACE VIEW RemoveCovidIntake as
select distinct c.case_id, c.unid as case_key, party.first_name, party.middle_name, party.last_name, party.birth_date, cp.email,
c.modification_date,
mview_covid.street_1,
mview_covid.city,
mview_covid.state,
mview_covid.zip,
mview_covid.county,
... | true |
d67b704279cba4bf533b273bf109a49938c29294 | SQL | a06729/MyBlog | /myBlog/target/blog-1.0.0-BUILD-SNAPSHOT/WEB-INF/classes/original.sql | UTF-8 | 5,789 | 3.671875 | 4 | [] | no_license | create database blog
character set ='utf8'
collate ='utf8_general_ci';
create table board(
BOARDNUM int auto_increment primary key,
BOARDTITLE varchar(100),
SIDETITLE varchar(250),
BOARDCONTENT varchar(3000),
BOARDDATE datetime default now(),
USERID varchar(30),
CATEGORY varchar(30),
VIEW... | true |
21af599880a78e08de25514306f4eb14f367187c | SQL | heartshare/mysql-federated | /dumps/loja_2.sql | UTF-8 | 3,991 | 3.21875 | 3 | [] | no_license | -- MySQL Script generated by MySQL Workbench
-- sex 30 abr 2021 12:31:34 -03
-- Model: Federated Sample 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, S... | true |
e25cff7eba91737b62ad09d738752b71664f2284 | SQL | alandohf/poonzref | /dev/plsql/oerr.sql | UTF-8 | 610 | 2.5625 | 3 | [] | no_license | rem -----------------------------------------------------------------------
rem Filename: oerr.sql
rem Purpose: Lookup Oracle error messages. Similar to unix "oerr" command.
rem This script is handy on platforms like NT with no OERR support
rem Author: Frank Naude, Oracle FAQ
rem ------------------... | true |
01b6d935fe1782277fef38b297510ac25af1a29f | SQL | ruminiki/MilkMoney | /version/v1_4_0/ANIMAL.sql | UTF-8 | 483 | 2.84375 | 3 | [] | no_license | ALTER TABLE milkmoney.animal DROP FOREIGN KEY fk_animal_animal1;
ALTER TABLE milkmoney.animal DROP FOREIGN KEY fk_animal_animal2;
ALTER TABLE milkmoney.animal
ADD CONSTRAINT fk_animal_animal1
FOREIGN KEY (mae)
REFERENCES milkmoney.animal (id)
ON DELETE SET NULL
ON UPDATE NO ACTION;
ALTER TABLE milk... | true |
ae6bd8b1d83762006461d83d8779aed09019388e | SQL | JasonkayZK/DeviceListener | /win/keylistener/data.sql | UTF-8 | 1,012 | 3.328125 | 3 | [] | no_license | -- create table
CREATE TABLE logger (
id INT(15) NOT NULL PRIMARY KEY AUTO_INCREMENT,
uid VARCHAR(20) NOT NULL,
insert_time DATETIME NOT NULL DEFAULT NOW(),
modify_time DATETIME,
left_mouse INT(15) NOT NULL,
right_mouse INT(15) NOT NULL,
middle_mouse INT(15) NOT NULL,
mouse_speed FLOAT(12, ... | true |
6c0f9107967b1067263d9bfce186f5414819bce1 | SQL | rvdimarco/music | /db_corsi.sql | UTF-8 | 1,534 | 3.5625 | 4 | [] | no_license | CREATE SCHEMA `db_corsi` ;
CREATE TABLE `db_corsi`.`studenti` (
`matricola` VARCHAR(8) NOT NULL ,
`nome` VARCHAR(45) NULL ,
`cognome` VARCHAR(45) NULL ,
PRIMARY KEY (`matricola`) );
CREATE TABLE `db_corsi`.`corsi` (
`id` INT NOT NULL ,
`materia` VARCHAR(45) NULL ,
PRIMARY KEY (`id`) );
... | true |
d505921c516af841728e011055616956fe346f39 | SQL | akula-srinu/Customization_Test | /custom/NVWB_AP_Invoices.sql | UTF-8 | 6,858 | 2.5625 | 3 | [] | no_license | -- *******************************************************************************
-- FileName: NVWB_AP_Invoices.sql
--
-- Date Created: 2019/Aug/28 06:12:39
-- Created By: nemuser
--
-- Source:
-- - Package: Package_2018_P11_B1_DEV_NEW
-- - Environment: EBSPJD1
-- - Noet... | true |
9719b7b23854a770fd26d64436f6682c91fed7dc | SQL | L00zeritt0/altexsoft-lab-2020 | /SQL/schema/3_Recipe_Table.sql | UTF-8 | 223 | 3.15625 | 3 | [] | no_license | CREATE TABLE Recipe
(
Id INT CONSTRAINT PK_Recipe_Id PRIMARY KEY IDENTITY,
Name NVARCHAR(50) CONSTRAINT UQ_Recipe_Name UNIQUE NOT NULL,
CategoryId INT CONSTRAINT FK_Recipe_To_Category REFERENCES Category (Id) NOT NULL
); | true |
c7bf30a6eb7127788c858d79cb917c6d65005858 | SQL | miderph/manage_system | /db/04/1_add_superscript_id.sql | WINDOWS-1252 | 230 | 2.65625 | 3 | [] | no_license | -- Drop columns
alter table ZL_CONT_VIDEO drop column link_url;
alter table ZL_CONT_VIDEO add superscript_id number(20);
-- Add comments to the columns
comment on column ZL_CONT_VIDEO.superscript_id
is 'ϽDZid';
| true |
79081c6d72557c6985ebbf3b38a73247c627d854 | SQL | Paul-loh/MSc_Dissertation | /DWH_Database/4 - InfoMart - FinRep - Views/InfoMartFinRep.DimCustodianAccount.sql | UTF-8 | 919 | 3.5 | 4 | [] | no_license | CREATE VIEW [InfoMartFinRep].[DimCustodianAccount]
AS
-- Author: Paul Loh
-- Creation Date: 20191024
-- Description: Custodian Accounts Dimension Table in Finrep (Financial Reporting) Information Mart.
--
-- Grain: Account Code | Load DateTime
SELECT
HASHBYTES ( N'SHA1',
CONCA... | true |
3e210f70ce716589b3a8caa34d0897699296d97b | SQL | sams248/PostgreSQL | /162. Table level security.sql | UTF-8 | 393 | 2.625 | 3 | [] | no_license | GRANT SELECT ON ALL TABLES IN SCHEMA public TO accounting;
GRANT INSERT ON TABLE employees TO hr;
GRANT SELECT ON TABLE employees TO hr;
GRANT UPDATE ON TABLE employees TO hr;
GRANT SELECT ON TABLE customers TO sales;
GRANT SELECT ON TABLE orders TO sales;
GRANT SELECT ON TABLE order_details TO sales;
GRANT INSERT... | true |
040a582cfdefd730134f3c46414fcbb0f3a7829e | SQL | kawabata-neolis/KATO | /KATO/SQL/A0030_ShireInput/ShireInput_KakoShireTanka_KakoShuko_SELECT.sql | UTF-8 | 213 | 3.03125 | 3 | [] | no_license | SELECT SUM(b.単価*b.数量) FROM 出庫ヘッダ a,出庫明細 b
WHERE a.削除='N' AND b.削除='N'
AND a.伝票番号= b.伝票番号
AND b.受注番号='{0}'
AND (a.取引区分='41' OR a.取引区分='43') | true |
6cb0f45ba46c65318142b2800f4d2914d6194a32 | SQL | loveyz1806/Vocabulary-v5.0 | /BDPM/scr/concept_synonym_stage.sql | UTF-8 | 536 | 3.125 | 3 | [
"Unlicense"
] | permissive |
--Concept_synonym_stage
INSERT INTO Concept_synonym_stage
(SYNONYM_CONCEPT_ID,SYNONYM_NAME,SYNONYM_CONCEPT_CODE,SYNONYM_VOCABULARY_ID,LANGUAGE_CONCEPT_ID)
Select '', CONCEPT_NAME,CONCEPT_CODE, 'BDPM', '4180190' -- French language
from INGR_TRANSLATION_ALL
union
Select '',FORM_ROUTE, CONCEPT_CODE , 'BDPM', '4180... | true |
ba854b6d02e88a61869202ee18c7cb32f45b3e51 | SQL | dzstef/IT255-DZ09-DZ12-stefan-dzino-1617 | /registracija.sql | UTF-8 | 1,284 | 2.8125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.2.7.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Nov 01, 2016 at 02:02 PM
-- Server version: 5.6.20
-- PHP Version: 5.5.15
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */... | true |
9bb77057cb33065fd43184fd38dc6a683e84f4bd | SQL | Shepelzz/test_shop | /sql/CREATE_TABLES.sql | UTF-8 | 4,600 | 4.125 | 4 | [] | no_license | --ORACLE
-- Create table
create table ACCOUNTS
(
USER_NAME VARCHAR2(20 CHAR) not null,
ACTIVE NUMBER(1) not null,
PASSWORD VARCHAR2(20 CHAR) not null,
USER_ROLE VARCHAR2(20) not null
) ;
alter table ACCOUNTS
add primary key (USER_NAME) ;
---------------------------------------
create table PRODUCTS
(
... | true |
fe69644a18293876349b7c479539ca455cf6ede2 | SQL | thinkind/LeetCode-MySQL | /613.直线上的最近距离(min与abs).sql | UTF-8 | 217 | 3.546875 | 4 | [] | no_license | # Write your MySQL query statement below
-- 613.直线上的最近距离
SELECT min(abs(p1.x - p2.x)) AS shortest
FROM point as p1 INNER JOIN point p2 -- 优先使用INNER JOIN而非HAVING
ON p1.x != p2.x; | true |
a807e197a080acb5ff9d4cd41c8174f6b79f649b | SQL | Everglowtun/projet_Nanterrefilx | /table.sql | UTF-8 | 937 | 3.65625 | 4 | [] | no_license | # Creation de la base de données
CREATE DATABASE test;
USE test;
# Tables
CREATE TABLE membre(
Mail varchar (150),
primary key(Mail),
Mot_de_pass VARCHAR(80) NOT NULL,
Prenom VARCHAR(25) NOT NULL,
Nom VARCHAR(25) NOT NULL,
Telephone INT(10),
Annee_naissance int(4)
);
CREATE TABLE serie(
... | true |
0beca8c8e576ee1c03026292b9d5b0c602c347fe | SQL | mmiddleton3301/intersproc | /SomeCorp.SimpleExample/SomeCorp.SimpleExample.Database/dbo/Stored Procedures/usp_Update_Employee.sql | UTF-8 | 386 | 2.984375 | 3 | [
"MIT"
] | permissive | -- =============================================
-- Author: Matt Middleton
-- Create date: 05/06/2017
-- =============================================
CREATE PROCEDURE [usp_Update_Employee]
@Id INT,
@Email NVARCHAR(256),
@HomeBased BIT
AS
BEGIN
SET NOCOUNT ON;
UPDATE Employee
SET
Email = ISNULL(Email, @Ema... | true |
ebfd0a2c7cd7f7ef36a5fe818a84a3f91f339699 | SQL | RodrigoPasini/SQL-Server | /Sistema de Estacionamento/Consultas Estacionamento.sql | ISO-8859-1 | 2,532 | 4.3125 | 4 | [
"MIT"
] | permissive | --TEMA: SISTEMA DE ESTACIONAMENTO
--ALUNOS: RODRIGO FIAD PASINI e JOO ZUQUETTO COLARES CERQUEIRA
--Selecione os atributos "Cidade", "Uf" e "idCliente" da tabela "Endereco".
select E.Cidade,E.UF,E.idCliente
from Endereco E
--Selecione nome e sobrenome ordenado pelo "Ultimonome".
SELECT C.PrimeiroNome, C.UltimoNome... | true |
8f55887ea8db53b988e7171cde20c8a7fb7a194c | SQL | unf911/Unicorn | /metadata/inc_220115_12_naklp_sebest4_part_recount_pc.sql | WINDOWS-1251 | 8,581 | 3.21875 | 3 | [] | no_license | SET TERM ^ ;
CREATE OR ALTER PROCEDURE NAKLP_SEBEST4_PART_RECOUNT_PC (
dat_from_in timestamp,
id_tovar_in integer,
id_sklad_in integer,
id_partiya_in bigint)
as
declare variable id_nakld integer;
declare variable id_uchet_politics integer;
declare variable id_sklad_seb integer;
declare variable id_sche... | true |
06d25cc189634d1af5467964794ee98b097c4fc1 | SQL | LeeKwonWoo/01_sql_assign | /이권우11.sql | UHC | 4,660 | 3.875 | 4 | [] | no_license | --ǽ4)
DESC new_cust;
/*
̸ ?
--------- -------- ------------
USERID VARCHAR2(4)
NAME NOT NULL VARCHAR2(30)
BIRTHYEAR NUMBER(4)
REGDATE DATE
ADDRESS VARCHAR2(30)
*/
--ǽ5)
DROP TABLE saleman;
CREATE TABLE salseman
AS
SELECT e.*
F... | true |
6b985af8694ea6cae1d59ae04773a1e2808297cd | SQL | atinsingh/jdbcapp | /src/main/resources/data.sql | UTF-8 | 225 | 2.578125 | 3 | [] | no_license | CREATE TABLE USERS (
USER_ID INT,
USER_NAME CHAR(20),
CREATE_DATE DATE,
USER_PASS CHAR(30)
);
CREATE TABLE BLOGS (
USER_ID INT,
BLOG_NAME CHAR(255),
BLOG_CATEGORY INT,
BLOG_TEXT text(5000)
)
| true |
528aafda71a13c536d096f531ede6f77568efaa3 | SQL | XingXing2019/LeetCode | /Database/LeetCode 2738 - CountOccurrencesInText/CountOccurrencesInText_SQLServer.sql | UTF-8 | 172 | 3 | 3 | [] | no_license | SELECT 'bull' AS word, COUNT(*) AS count FROM Files
WHERE content LIKE '% bull %'
UNION
SELECT 'bear' AS word, COUNT(*) AS count FROM Files
WHERE content LIKE '% bear %' | true |
dbcd5f20a610e478e5c8fa826e139c5fba5f600c | SQL | zoomok/NicholasADFLab | /Labs/Lab_008_PL_COPY_ADLS_CSV_Metadata.sql | UTF-8 | 1,133 | 3.265625 | 3 | [] | no_license | --===========================================================================================================================
-- Lab 8 : Azure Data Factory Get Metadata and Save it to DB table
--===========================================================================================================================
1... | true |
5e5562ce389577dac96ebfa5cd61cab239ffa16e | SQL | kjmojado21/sample | /sns.sql | UTF-8 | 2,421 | 3.15625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jan 13, 2021 at 08:28 AM
-- Server version: 10.4.14-MariaDB
-- PHP Version: 7.4.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... | true |
d6d6c66e87a3508e3f4b0aedb30518ba8b6bcf68 | SQL | szhxjt1334/WoWCircle434 | /sql/updates/circle_updates/world/2079_misc.sql | UTF-8 | 2,444 | 2.90625 | 3 | [] | no_license | UPDATE `creature_template` SET `dmg_multiplier` = 20, `flags_extra` = `flags_extra`|1 WHERE `entry` IN (31612,31611,31610);
UPDATE `creature_template` SET `mechanic_immune_mask` = `mechanic_immune_mask`|1|2|4|8|16|32|64|128|256|512|1024|2048|4096|8192|65536|131072|524288|4194304|8388608|33554432|67108864|536870912 WHE... | true |
f53b744c3cf6ca866777caf9b34e6dbf08df8e39 | SQL | guoyang123/FY2019-- | /business.sql | UTF-8 | 8,321 | 3.734375 | 4 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : neuedu
Source Server Version : 50725
Source Host : 47.95.119.164:3306
Source Database : shopping
Target Server Type : MYSQL
Target Server Version : 50725
File Encoding : 65001
Date: 2019-05-08 11:06:50
*/
SET FOREIGN_KEY_CHECKS=0;
--... | true |
39939773e9efb883302f0d0598e8e2e96fa05acf | SQL | SuperArt3000/sql-geekbrains | /geekbrains/sql/interactivecourse/week8/03.sql | UTF-8 | 489 | 3.609375 | 4 | [
"MIT"
] | permissive | DROP FUNCTION IF EXISTS FIBONACCI;
DELIMITER //
CREATE FUNCTION FIBONACCI(num INT)
RETURNS INT NOT DETERMINISTIC
BEGIN
DECLARE i, fib1, fib2, res INT DEFAULT 0;
SET fib1 = 1;
SET fib2 = 1;
IF (num < 0) THEN
RETURN (-1);
END IF;
IF (num = 0) THEN
RETURN num;
END IF;
WHILE ... | true |
e5109afe93a803bfb9ac587c153f453a6b3184a0 | SQL | cartodeveloper/eCannab-server | /migrations/004.do.create_resources_table.sql | UTF-8 | 280 | 3 | 3 | [] | no_license | CREATE TABLE resources (
id INTEGER PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY,
name TEXT NOT NULL,
link TEXT NOT NULL,
r_image TEXT NOT NULL,
"site_id" INTEGER REFERENCES "sites"(id)
ON DELETE CASCADE NOT NULL,
date_created TIMESTAMPTZ NOT NULL DEFAULT NOW()
) | true |
f892f434d9d3c942d7d8d05e8c122fc8deddad82 | SQL | gillroro/FYPFirstChoice | /sqlStatements/fyp_project.sql | UTF-8 | 2,485 | 3.046875 | 3 | [
"Apache-2.0"
] | permissive | CREATE DATABASE IF NOT EXISTS `fyp` /*!40100 DEFAULT CHARACTER SET latin1 */;
USE `fyp`;
-- MySQL dump 10.13 Distrib 5.6.13, for Win32 (x86)
--
-- Host: localhost Database: fyp
-- ------------------------------------------------------
-- Server version 5.1.50-community
/*!40101 SET @OLD_CHARACTER_SET_CLIE... | true |
6b56430a09b05f3350d3751892334dc089b7508a | SQL | niranjanbisht/Hello-World---HDP | /Hive syntax.sql | UTF-8 | 2,861 | 3.375 | 3 | [] | no_license |
CREATE EXTERNAL TABLE stocks( stock_exchange STRING, stock_symbol STRING, quote_date STRING, stock_price_open STRING,
stock_price_high STRING , stock_price_low STRING, stock_price_close STRING, stock_volume STRING, stock_price_adj_close STRING)
ROW FORMAT DELIMITED FIELDS TERMINATED BY '\t'
STORED AS TEXTFI... | true |
e1ab76989b5a2d1190712f4811184f48879c2529 | SQL | EvgeniManolov/SoftUni-Databases | /5.Advanced SQL/Problem6.sql | UTF-8 | 142 | 3.53125 | 4 | [] | no_license | SELECT COUNT(*) AS [Sales Employees Count]
FROM Employees AS e
JOIN Departments AS d
ON e.DepartmentID = d.DepartmentID
WHERE d.Name = 'Sales' | true |
033f92b35850989dc47a4c23936bcf0694d2489d | SQL | ClickHouse/ClickHouse | /tests/queries/0_stateless/01906_lc_in_bug.sql | UTF-8 | 615 | 3.640625 | 4 | [
"Apache-2.0",
"BSL-1.0"
] | permissive | drop table if exists tab;
create table tab (x LowCardinality(String)) engine = MergeTree order by tuple();
insert into tab values ('a'), ('bb'), ('a'), ('cc');
select count() as c, x in ('a', 'bb') as g from tab group by g order by c;
drop table if exists tab;
-- https://github.com/ClickHouse/ClickHouse/issues/4450... | true |
46a4834ed1e3c2837a7f93192b2b475ff9ac82db | SQL | x-cpu/SQL | /VETandFILE_EOM_data.sql | UTF-8 | 2,513 | 3.328125 | 3 | [] | no_license | ---veteran and filenumber counts from CustomerData table
select distinct cs.dcsid, cd.filenumber, cd.lastname, cd.firstname, cd.middleinitial, sum(ks) Keystrokes
from cmpstats cs
left join CustomerDATA cd on cs.dcsid = cd.dcsID
where cs.dcsid in (select distinct dcsid from document where imagedatetime >= '12/1/20... | true |
73022d2492e622c335287d4befa8d01021b27a55 | SQL | Wylzz/foody | /query.sql | UTF-8 | 9,732 | 4.03125 | 4 | [] | no_license | SELECT *
FROM produit
ORDER BY PrixUnit
LIMIT 10;
SELECT *
FROM produit
ORDER BY PrixUnit DESC
LIMIT 3;
# ////////////////////////////////////////////////////////////////
SELECT *
FROM client
WHERE Ville = 'Paris'
AND Fax IS NULL;
SELECT *
FROM client
WHERE Pays IN ('France', 'Canada', 'Germany');
SELECT *
FROM ... | true |
f2525d0adfe4ff4252a0a4e1cbc2add5a8b10115 | SQL | DimasNurzullah/PAPCUAP | /papcuap_a.sql | UTF-8 | 3,628 | 3.140625 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 16 Apr 2020 pada 06.34
-- Versi server: 10.1.35-MariaDB
-- Versi PHP: 7.2.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARA... | true |
3e577029dc177dfa4c75bdbd4074a9eb90bd904c | SQL | ICEI-PUC-Minas-PMGCC-TI/tiaw-pmg-cc-t-20211-gerenciador-de-notas-fiscais | /organizei.sql | UTF-8 | 2,191 | 3.421875 | 3 | [
"CC-BY-4.0"
] | permissive | -- MySQL Script generated by MySQL Workbench
-- Sun Oct 3 19:16:15 2021
-- Model: New Model Version: 1.0
-- MySQL Workbench Forward Engineering
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='ON... | true |
9ddf0a071ac9fe400a6c5c36c85b4fe490289c64 | SQL | rikkyvish/wedding | /blog_db.sql | UTF-8 | 6,738 | 2.828125 | 3 | [
"MIT"
] | permissive | -- --------------------------------------------------------
-- Host: 127.0.0.1
-- Server version: 8.0.27 - Homebrew
-- Server OS: Linux
-- HeidiSQL Version: 11.3.0.6295
-- --------------------------------------------------------
/*!40101 SET @OLD_CHA... | true |
e04ab21d46a64f0b0f064ef6709497659b2f0a41 | SQL | Last-Mile-Health/LMD-Databases | /lastmile_cha/view/view_position_cha_registration.sql | UTF-8 | 1,444 | 3.28125 | 3 | [] | no_license | use lastmile_cha;
drop view if exists view_position_cha_registration;
create view view_position_cha_registration as
select
pc.position_id,
sum( g.total_household ) as total_household,
sum( g.total_household_member ) as total_household_member,
... | true |
00c3518806be33ee7bb3168092241f887f9b01f5 | SQL | xuzicn/old-driver | /db/sql/getRoomInfo.sql | UTF-8 | 187 | 3.390625 | 3 | [] | no_license | SELECT MR.roomName, MR.roomSize, MR.devices roomDevice, B.fromTime 'from', B.toTime 'end'
FROM MeetingRoom MR
LEFT JOIN Booking B
ON MR.id=B.meetingRoomId
WHERE MR.id=? | true |
7849621b90f6d6b395d65aed8e40d5d5f69f3aff | SQL | tinased95/Database | /zahra_Athari_9331027_Tina_Sedaghat_9331044/phase 2/dumps/Dump20180117/onlineshopping1_tracking.sql | UTF-8 | 2,737 | 3.0625 | 3 | [] | no_license | CREATE DATABASE IF NOT EXISTS `onlineshopping1` /*!40100 DEFAULT CHARACTER SET utf8 */;
USE `onlineshopping1`;
-- MySQL dump 10.13 Distrib 5.7.17, for Win64 (x86_64)
--
-- Host: localhost Database: onlineshopping1
-- ------------------------------------------------------
-- Server version 5.7.20-log
/*!40101 SET ... | true |
ce6387f6680b9c6a84e014d734016e6e8c371268 | SQL | sunnyrvd27/sql-challenge | /EmployeeSQL/DataAnalysisQuery4.sql | UTF-8 | 1,741 | 4.5 | 4 | [] | no_license | --------------------------------------------------------------------------------------------
-- List the department of each employee with the following information:
-- employee number, last name, first name, and department name.
------------------------------------------------------------------------------------------... | true |
984d43c4983c98946460c1ab7bf03e8b0da97640 | SQL | Shivanirudh/DBMS | /A5-PLSQL/pizza_plsql.sql | UTF-8 | 4,685 | 4.34375 | 4 | [] | no_license | REM ****** CUSTOMER (cust_id , cust_name, address, phone, cust_friend)
REM ****** PIZZA (pizza_id, pizza_type, unit_price)
REM ****** ORDERS (order_no, cust_id, order_date ,delv_date, total_amt)
REM ****** ORDER_LIST (order_no, pizza_id, qty)
REM ****** 1. Check whether the given pizza type is available. If not displa... | true |
fcccf375c8c18b988218336d46d6ef02161b1230 | SQL | Benboby/BOOKSHOP | /SQLQuery/proc/transaction_customer.sql | GB18030 | 246 | 2.671875 | 3 | [] | no_license | create proc transaction_customer --˿ͽ¼
@rorder_id varchar(20), @customer_id varchar(20) , @kind int
as
insert into transaction_of_customer(order_id , customer_id , kind )
values (@rorder_id , @customer_id , @kind ); | true |
3a3ae93697ed5f642d3d770c36f4a5eb6710a62b | SQL | x14119641/statements_api | /tests/data.sql | UTF-8 | 1,104 | 2.796875 | 3 | [
"MIT"
] | permissive | INSERT INTO users (username, password)
VALUES
('test', 'pbkdf2:sha256:50000$TCI4GzcX$0de171a4f4dac32e3364c7ddc7c14f3e2fa61f2d17574483f7ffbb431b4acb2f'),
('other', 'pbkdf2:sha256:50000$kJPKsz6N$d2d4784f1b030a9761f5ccaeeaca413f27f2ecb76d6168407af962ddce849f79');
INSERT INTO customers (customer_id, customer_name, pa... | true |
e4ef9118ceb10cdd14c505ae6483dc3358122b3a | SQL | f1lm/MS-2014-Boise-State-University | /Databases/cs410-material/mysql/company/company-schema.sql | UTF-8 | 1,548 | 3.875 | 4 | [] | no_license | drop schema if exists `company`;
create schema `company`;
use `company`;
CREATE TABLE employee (
fname CHAR(15) NOT NULL,
minit CHAR,
lname CHAR(15) NOT NULL,
ssn CHAR(9) NOT NULL,
bdate DATE,
address CHAR(30),
sex CHAR,
salary DECIMAL(10,2),
superssn CHAR(9),
dno INT NOT NULL,
PRIMARY KEY (ssn)... | true |
2ec95e894fb1560a4c7e250cb8cec52231aeec75 | SQL | zhouyunbin/JavaExercise | /Java.sql | UTF-8 | 5,660 | 3.359375 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : server
Source Server Version : 50532
Source Host : 192.168.1.200:3306
Source Database : Java
Target Server Type : MYSQL
Target Server Version : 50532
File Encoding : 65001
Date: 2013-11-18 20:24:08
*/
SET FOREIGN_KEY_CH... | true |
2d3ddd025b5a6a0624e5d4ab72628721c6e16339 | SQL | g00glen00b/spring-samples | /spring-boot-jpa-error-webapp/src/main/resources/setup/create.sql | UTF-8 | 431 | 2.796875 | 3 | [] | no_license | CREATE DATABASE demo;
USE demo;
CREATE TABLE IF NOT EXISTS `superhero` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`name` VARCHAR(32) NOT NULL,
`first_name` VARCHAR(32),
`last_name` VARCHAR(32),
`good` bit(1),
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
INSERT INTO `superhero` (`name`, `first... | true |
f4e838447dd6ecaf4436403154338ee8b4c1f455 | SQL | VergilCheng/cmz_cloudnote | /src/main/sql/test.sql | UTF-8 | 2,863 | 4.09375 | 4 | [] | no_license | SELECT cn_user_id from cn_user WHERE cn_user_name="demo";
SELECT cn_notebook_id from cn_notebook WHERE cn_user_id="48595f52-b22c-4485-9244-f4004255b972";
SELECT cn_note_title,cn_notebook_id FROM cn_note WHERE cn_notebook_id is NOT NULL ;
/*查找有笔记的笔记本*/
/*1.子查询*/
SELECT DISTINCT cn_notebook_name FROM cn_notebook AS n... | true |
eaeece38e4083e2574157066a5755a6aaeed6eb6 | SQL | kodat/company-sql-database-structure | /company.sql | UTF-8 | 2,951 | 3.296875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 3.5.2.2
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Dec 09, 2016 at 07:35 AM
-- Server version: 5.5.27
-- PHP Version: 5.4.7
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/... | true |
d31c193cd3cd4b333e8686ec77735cce1509d0d2 | SQL | kamikitabanzai/scripts | /mycse/eduSql/2_kuno.sql | UTF-8 | 144 | 2.96875 | 3 | [] | no_license | select
emp_name
,grp_name
from (
emp_grp a
left join mst_emp b on a.emp_id = b.emp_id
left join mst_group c on a.grp_id = c.grp_id
)
;
| true |
f50f2db7b956c3501d2bf1f8a4d407c8a8e5b7d5 | SQL | vjhameed/digitalworld | /ion.sql | UTF-8 | 6,145 | 3.234375 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.6.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Aug 18, 2017 at 03:24 PM
-- Server version: 5.7.14
-- PHP Version: 7.0.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */... | true |
99f02b6fb6d7ab33546b987e65a7ec397e826b86 | SQL | Juliocesarbs/sql-updatenoSecurity | /script.sql | UTF-8 | 364 | 2.921875 | 3 | [
"MIT"
] | permissive | --I'm change the variable sql_safe_update for execute the statement of UPDATE or DELETE without WHERE clauses and LIMITS;
--It means all rows will be changed by once;
SET SQL_SAFE_UPDATES=0;
-- now an example of UPDATE.:
UPDATE table_name set column = 'information'
-- you can use WHERE clauses to UPDATE limitless... | true |
8cafb0177ef9a3454a684bcfd0727b4de0d21d2f | SQL | harshilhshah/s4_SPNproject | /cs336_db_create (1).sql | UTF-8 | 2,890 | 4.0625 | 4 | [] | no_license | CREATE SCHEMA cs336_s3;
USE cs336_s3;
CREATE TABLE student (
netid INT,
`password` VARCHAR(50),
s_name VARCHAR(100),
credits INT,
gpa DEC(4,2),
major VARCHAR(50),
PRIMARY KEY (netid));
CREATE TABLE professor (
p_id INT,
`password` VARCHAR(50),
p_name VARCHAR(100),
PRIMARY KEY (p_id));
CREATE TABLE department (
dept_... | true |
f47f52e89f14f6924e6728695a03449808478163 | SQL | pepeysusmapas/allocalgis | /modulos/apps/localgis-datamodel-postmodelo/src/main/resources/install/pro/modelo/eiel/filtros/eiel_Modelo_Filtros_Capa_02_SN_04_PV.sql | UTF-8 | 5,382 | 2.859375 | 3 | [] | no_license | set client_encoding to 'utf8';
-- Campos por cada elemento del arbol.
-- VARCHAR_CODE=0;NUMERIC_CODE=1;DATE_CODE=2;DOUBLE_CODE=3;DOMINIO_CODE=4;BOOLEAN_CODE=5;COMPUESTO_CODE=6;DOMINIO_CODE_INTEGER=7;
-- La diferencia entre DOMINIO_CODE y DOMINIO_CODE_INTEGER es el tipo de elementos el primero puede almacenar s... | true |
ef5d27693ad30dc97ce023e2da05579e1648ad82 | SQL | subhamX/train-ticketing | /database/init.sql | UTF-8 | 5,181 | 3.984375 | 4 | [
"Apache-2.0"
] | permissive | CREATE TABLE "trains" (
"train_number" varchar(6) NOT NULL,
"train_name" varchar(100) NOT NULL,
"source" varchar(100) NOT NULL,
"destination" varchar(100) NOT NULL,
"source_departure_time" time NOT NULL,
"journey_duration" interval NOT NULL,
"sleeper_ticket_fare" decima... | true |
07ee5bc0e24c59cb3636471efd817a55b0eb4040 | SQL | MariMar99/ExpoChick3 | /bd/expo.sql | UTF-8 | 35,611 | 2.953125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.6.6
-- https://www.phpmyadmin.net/
--
-- Servidor: localhost
-- Tiempo de generación: 14-03-2017 a las 17:50:30
-- Versión del servidor: 10.0.29-MariaDB-0ubuntu0.16.10.1
-- Versión de PHP: 7.0.15-0ubuntu0.16.10.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*... | true |
ec40eb11df770e3d476c30684f93619bedd29925 | SQL | zepdrix/TableForce | /guitars.sql | UTF-8 | 961 | 3.46875 | 3 | [] | no_license | CREATE TABLE guitars (
id INTEGER PRIMARY KEY,
name VARCHAR(255) NOT NULL,
guitarist_id INTEGER,
FOREIGN KEY(guitarist_id) REFERENCES guitarist(id)
);
CREATE TABLE guitarists (
id INTEGER PRIMARY KEY,
fname VARCHAR(255) NOT NULL,
lname VARCHAR(255) NOT NULL,
band_id INTEGER,
FOREIGN KEY(band_id) RE... | true |
e8384e63ee8b954e75671f9db88460086fc57c48 | SQL | uoc1234/Railway05 | /1. SQL/TESTING/Tesing_Assignment_7.sql | UTF-8 | 1,033 | 3.625 | 4 | [] | no_license | -- Question 12: Lấy ra thông tin exam trong đó:
-- Duration <= 30 thì sẽ đổi thành giá trị "Short time"
-- 30 < Duration <= 60 thì sẽ đổi thành giá trị "Medium time"
-- Duration > 60 thì sẽ đổi thành giá trị "Long time"
USE testingsystem;
SELECT Duration, CreateDate, CASE
WHEN Duration <=30 THEN 'Short_time'
... | true |
090c3490b5753b3572ffb6b109a6cf7d57f0ec26 | SQL | linhlie/mail-system | /src/main/resources/db/migration/V32__account_id.sql | UTF-8 | 430 | 2.59375 | 3 | [] | no_license | ALTER TABLE `click_histories`
ADD COLUMN `account_id` INT DEFAULT NULL;
ALTER TABLE `click_histories`
ADD FOREIGN KEY fk_click_histories_account(account_id)
REFERENCES accounts(id) ON DELETE CASCADE;
ALTER TABLE `click_sent_histories`
ADD COLUMN `account_id` INT DEFAULT NULL;
ALTER TABLE `click_sent_histori... | true |
81d86cca3f7b97fac9dc417e3e4508e5c8d98578 | SQL | LZerm/simple_blog | /simpleBlog/config/sb.sql | UTF-8 | 2,068 | 3.734375 | 4 | [] | no_license | set default_storage_engine = InnoDB;
set character_set_client = utf8;
set character_set_connection = utf8;
set character_set_database = utf8;
set character_set_results = utf8;
set character_set_server = utf8;
create database simpleBlog;
use simpleBlog;
-- 管理员表
create table administrator (
admin_id int ... | true |
1b808aee92cce3768ebdd99e58c26dccd0e09403 | SQL | EDRICHTOFEN/sqlzoo.sql | /README.sql | UTF-8 | 2,091 | 4.09375 | 4 | [] | no_license | # ---- sqlzoo.sql -----
# --- Problemas de SUM and COUNT ---
# -- Problema 1 --
SELECT SUM(population)
FROM world
# -- Problema 2 --
SELECT DISTINCT(continent)
FROM world
# -- Problema 3 --
SELECT SUM(gdp)
FROM world
WHERE continent = 'Africa'
# -- Problema 4 --
SELECT COUNT(name)
FROM world
WHERE area >= 1000000
# -... | true |
8c7b3ae93a30a0fcc9e4099b0515217b9db14076 | SQL | jarehec/holbertonschool-higher_level_programming | /0x0E-SQL_more_queries/16-shows_by_genre.sql | UTF-8 | 313 | 3.671875 | 4 | [] | no_license | -- lists all shows, and all genres linked to that show in the database hbtn_0d_tvshows
SELECT tv_shows.title, tv_genres.name
FROM tv_genres
LEFT JOIN tv_show_genres ON tv_genres.id = tv_show_genres.genre_id
RIGHT JOIN tv_shows ON tv_show_genres.show_id = tv_shows.id
ORDER BY tv_shows.title, tv_genres.name ASC;
| true |
69a0929cb406fd1be503b5ec0254d303cbffe3fe | SQL | Vitali8/web-example | /docker/mariadb/docker-entrypoint-initdb.d/library-db.sql | UTF-8 | 3,384 | 3.46875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.1
-- https://www.phpmyadmin.net/
--
-- Хост: mariadb:3306
-- Час створення: Лис 13 2019 р., 17:36
-- Версія сервера: 10.4.8-MariaDB-1:10.4.8+maria~bionic
-- Версія PHP: 7.2.23
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
... | true |
be40c6e5a72dd4cc1efb94e63f786f00e9f21de7 | SQL | zhilien-tech/zhiliren-we | /we-web-parent/web-linyun-airline/src/main/resources/sql/airline.sql | UTF-8 | 488 | 3.234375 | 3 | [] | no_license | /*airline_company_info*/
SELECT t.*,di2.dictCode,
di2.dictName
FROM t_flight_info t
INNER JOIN dict_info di2
ON t.aircomid = di2.id
$condition
/*get_plan_make_info_withtime*/
select tf.*,tfi.leavetime bleavetime,tfi.backtime bbacktime
FROM
(
SELECT
t.*,f.leavetime lleavetime,f.backtime lbacktime
... | true |
cff9430818ae85b3bf846059d7b4eff5aef67f19 | SQL | Vizzuality/trase | /db/views/dashboards_flow_paths_mv_v02.sql | UTF-8 | 1,033 | 4.15625 | 4 | [
"MIT"
] | permissive | SELECT DISTINCT
flow_paths.context_id,
contexts.country_id,
contexts.commodity_id,
flow_paths.node_id,
nodes.name AS node,
nodes.node_type_id,
node_types.name AS node_type,
flow_paths.flow_id,
column_position,
column_group,
CASE
WHEN cnt_props.column_group = 0 THEN 'SOURCE'
WHEN cnt_props.... | true |
e83d962641692102e5b67fec14aa6a768929cd11 | SQL | ramakrishna-namburu/vhcbcloud | /VHCB.Database/dbo/Stored Procedures/GetApplicantNamesByLastName.sql | UTF-8 | 214 | 2.84375 | 3 | [] | no_license | CREATE procedure GetApplicantNamesByLastName
(
@applicantLastName varchar(150)
)
as
Begin
select distinct LastName from Contact where Lastname like @applicantLastName +'%'
order by LastName
end | true |
aa1965afb7bd0eae47459bba43af1d32d718db6b | SQL | kounelios13/advancedDb | /coronaVirus/coronaVirus_II-ENUM-MVALUED-COMPOSITE.sql | UTF-8 | 5,303 | 3.296875 | 3 | [] | no_license | Drop table IF EXISTS PERSON cascade;
Drop table IF EXISTS CONTACT cascade;
DROP TYPE IF EXISTS ADDRESS cascade;
DROP TYPE IF EXISTS FYLLO cascade;
CREATE TYPE FYLLO AS ENUM ('Άνδρας','Γυναίκα');
CREATE TYPE ADDRESS AS (
POLH VARCHAR(60),
XORA VARCHAR(60),
TELEPHONE TEXT []);
/* Δημιουργία Πίνακα {ΚΡΟΥΣΜΑ} */
CR... | true |
c6c3e72e00de0653ca08486822c6226a4f1ff1b1 | SQL | Supriyo-Dey/Great-Learning-Works | /SQL II Day 3 Take home.sql | UTF-8 | 1,714 | 4.21875 | 4 | [] | no_license | # Datasets used: employee.csv and membership.csv
-- ---------------------------------------------------------------------------------------------------------------------------------------------------
-- Schema EmpMemb
-- -----------------------------------------------------
CREATE SCHEMA IF NOT EXISTS EmpMemb;
USE Emp... | true |
62b93ae82190f65c5272803e90621d4e4a0b907d | SQL | tilluhlig/ostepu-core | /DB/DBExercise/Sql/AddPlatform.sql | UTF-8 | 3,330 | 3.40625 | 3 | [] | no_license | <?php
/**
* @file AddPlatform.sql
*
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL version 3
*
* @package OSTEPU (https://github.com/ostepu/system)
* @since 0.1.1
*
* @author Till Uhlig <till.uhlig@student.uni-halle.de>
* @date 2014-2015
*/
?>
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;... | true |
5363c9874d8021878a8ab3d8821fcb2793622c9c | SQL | halfer/awooga-app | /build/database/init.sql | UTF-8 | 266 | 2.78125 | 3 | [] | no_license | /* Run this file as MySQL root */
CREATE DATABASE awooga DEFAULT CHARACTER SET utf8;
USE awooga;
CREATE USER 'awooga_user'@'%' IDENTIFIED BY 'password';
GRANT
SELECT, INSERT, UPDATE, DELETE ON awooga.*
TO 'awooga_user'@'%' WITH GRANT OPTION;
FLUSH PRIVILEGES;
| true |
4d209b832a1414c0be731ccd9cb71311d67e7e55 | SQL | py2-10-2017/MatthewKim | /MySQL/Lead Gen Business/Question2.sql | UTF-8 | 145 | 3.46875 | 3 | [] | no_license | SELECT clients.client_id, SUM(amount) as total_revenue FROM clients
JOIN billing ON clients.client_id=billing.client_id
WHERE clients.client_id=2 | true |
474e3b282069c1c3eb2d58c941bc54a2c62c0158 | SQL | wzz1234wzz/job | /study/mycasbin/db/initdb.sql | UTF-8 | 854 | 2.84375 | 3 | [] | no_license | CREATE DATABASE IF NOT EXISTS wzz_db default charset utf8 COLLATE utf8_general_ci;
DROP TABLE IF EXISTS `user`;
CREATE TABLE IF NOT EXISTS `user` (
`ysid` bigint(20) NOT NULL AUTO_INCREMENT,
`name` varchar(128) NOT NULL UNIQUE,
`pwd_hash` varchar(128) ,
`group` VARCHAR(20) NOT NULL,
`rank` tinyint(1) DEFAULT... | true |
60e20380018e9e6dff54a0dfff14d669c3c13980 | SQL | monobinab/RTS_ETLPipelines | /storm_logs/adhoc/load_storm_staging_uncompressed.sql | UTF-8 | 945 | 2.78125 | 3 | [] | no_license | SET mapreduce.output.fileoutputformat.compress.codec=com.hadoop.compression.lzo.LzopCodec;
SET hive.exec.compress.output=true;
SET mapreduce.output.fileoutputformat.compress=true;
set avro.output.codec=snappy;
use real_time_scoring;
drop table rts_storm_log_staging;
create table if not exists rts_storm_log_staging (
... | true |
203ef7969cee076ac40d2a7ff3e701aabaa143dd | SQL | alexendrios/exemplesKarate | /src/resources/Sql/Merchants/queryGetMerchantIssuerTransaction.sql | UTF-8 | 2,905 | 4.28125 | 4 | [] | no_license | select
t3.*
from(
select
t2.MERCHANT_NUMBER,
t2.terminal_id,
t2.retrieval_reference,
t2.transaction_date,
t2.auth_code,
sum(to_number(t2.tran_amount_gr)) tran_amount_gr,
LISTAGG(has_Canceled, ':') WITHIN GROUP (ORDER BY ... | true |
9d1aa57f961f5215abac7055ce77c1d240406584 | SQL | bellomarini/Gaia2020 | /mappings_index_package.sql | UTF-8 | 2,908 | 3.265625 | 3 | [] | no_license | --------------------------------------------------------
-- File created - Saturday-July-23-2016
--------------------------------------------------------
--------------------------------------------------------
-- DDL for Package MAPPINGS_INDEX
--------------------------------------------------------
CREATE OR ... | true |
31549b1c6a8bb410787e20bef4296d394d9d8e80 | SQL | edvelezg/biomecanica | /Biomecanica/data.sql | UTF-8 | 19,402 | 3 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 2.11.0
-- http://www.phpmyadmin.net
--
-- Servidor: localhost
-- Tiempo de generación: 03-12-2007 a las 18:59:27
-- Versión del servidor: 5.0.45
-- Versión de PHP: 5.2.4
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
--
-- Base de datos: `biomecanica`
--
-- ----------------------------------... | true |
320030e3c443c35090c0b4135a978e9cc792cc6c | SQL | jasky-git/get-lucky | /sql/databasev4.sql | UTF-8 | 4,486 | 2.921875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Nov 06, 2019 at 01:35 PM
-- Server version: 5.7.26
-- PHP Version: 7.3.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLI... | true |
7b93eb0fa290d8de25ee8f1e5a3677e6b7a7c624 | SQL | rbogusze/oracleinfrastructure | /oi_oralms/db_watch/ccm_currently_running.sql | UTF-8 | 1,247 | 3.734375 | 4 | [] | no_license | set heading off
column DB_NAME format a10
column LOAD format a20
alter session set NLS_DATE_FORMAT = "YYYY/MM/DD HH24:MI:SS";
select sysdate, sys_context('USERENV','DB_NAME') DB_NAME, listagg(round(value,1), ' ' ) within group (order by inst_id) LOAD from gv$osstat where stat_name='LOAD';
set heading on
set linesize ... | true |
0d8322a1fcc6c0723473f2fa9133f918034f0620 | SQL | bravesoftdz/gestion-pacientes | /Servidor/Data/PACIENTES.sql | UTF-8 | 708 | 2.75 | 3 | [] | no_license | create database SGPDATA
DROP DATABASE PACIENTES
CREATE TABLE PACIENTES (
ID INT IDENTITY(1,1),
IDPACIENTE VARCHAR (13) NOT NULL,
CEDULA VARCHAR (13),
NOMBRE VARCHAR (20),
APELLIDOS VARCHAR (25),
FECHANACIMIENTO DATETIME,
EDAD INT,
DIRECCION VARCHAR (30),
TELNO VARCHAR (10),
PRIMARY KEY(CEDULA, IDPAC... | true |
fabfd01108c9f949cd4b76d9c9a8ca40740f52eb | SQL | jungla/OpenFishAdmin | /scripts_SQL/trawlers/cTable_trawlers_ft_poi.sql | UTF-8 | 2,688 | 2.546875 | 3 | [
"MIT"
] | permissive | DROP TABLE IF EXISTS trawlers.ft_poi;
CREATE TABLE trawlers.ft_poi(
id uuid DEFAULT uuid_generate_v4 (),
datetime timestamp DEFAULT now(),
username varchar(100),
id_route uuid,
maree varchar(100),
lance integer,
t_rejete integer,
id_species uuid,
t_measure integer,
poids float,
ft1_poi... | true |
9829f91593bed7455a048c3c8ecaa7e8502c0b86 | SQL | SIU-CS/Red_Dusk-Production | /Installation_Files/EasyRider_Database_Schema.sql | UTF-8 | 468 | 3.1875 | 3 | [] | no_license | CREATE TABLE IF NOT EXISTS Account_Info (
username VARCHAR(255) PRIMARY KEY,
password VARCHAR(255) NOT NULL,
firstname VARCHAR(255) NOT NULL,
lastname VARCHAR(255) NOT NULL
);
CREATE TABLE IF NOT EXISTS R_File (
file_owner VARCHAR(255),
file_name VARCHAR(255),
last_modified DATETIME,
data_file MEDIUMTEXT NOT ... | true |
008d95c5acab3b47b899391f1f706624c08d2ba1 | SQL | colegiul-tehnic-elie-radu-ploiesti/scoala2020 | /SQL/scoala2020.sql | UTF-8 | 11,560 | 3.03125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Mar 20, 2018 at 03:28 PM
-- Server version: 10.1.30-MariaDB
-- PHP Version: 5.6.33
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... | true |
0fd3c88b241fd4f7b9071cc40c7af8e97e0d79f2 | SQL | GrizzlyPenguin/FYP_AB | /FYP B(testing)/Create table sql/database(log).sql | UTF-8 | 392 | 2.90625 | 3 | [] | no_license | SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
CREATE TABLE IF NOT EXISTS `TimeLog` (
`LogID` int(3) NOT NULL,
`BudgetTime` time NOT NULL,
`Start` int(3) NOT NULL,
`Completed` int(3) NOT NULL,
`TotalTimeUsed` time NOT NULL,
`Status` char(15) NOT NULL,
`UAT` char(6)
) ENGINE=InnoDB DEFAULT CHARSET=latin... | true |
f105654fc14a5ef4af87586d40b4fc29a6e141fa | SQL | raogaru/raoctl | /sql/str/s_ruleset_eval_resources.sql | UTF-8 | 959 | 3.859375 | 4 | [] | no_license | -- TITLE1: Ruleset Evaluation Resources
-- TITLE2: Determining the Resources Used by Evaluation of Each Rule Set
-- DESC: You can query the V$RULE_SET dynamic performance view to determine the resources used by evaluation of a rule set since the database instance last started. If a rule set was evaluated more than one ... | true |
aeb7173f645a07ce7722bafc6e6e53f893447d44 | SQL | pltronics/ChangeManagement | /TransSQLCommands/CreateAndReadQueries.sql | UTF-8 | 727 | 3.765625 | 4 | [] | no_license | --Select c.Title, c.Description, c.CreatedOn, s.Description--, m.MtgDate, t.TargetDate, u.Description
--From Changes c Join Signatures g ON c.Id = g.ChangeId Join Stakes s on s.Id = g.StakeId
--exec CreateStake N'StakeDescription', N'CreatedBy';
--exec CreateQuestion N'1', N'TestQuestion?', N'Example1, Example2, Exam... | true |
78abe98a2140a43b939d593432be059faa36fbf1 | SQL | SQLSith/TestDataGenerator | /TestDataGenerator/Reference/Stored Procedures/usp_Populate_Product.sql | UTF-8 | 1,372 | 2.90625 | 3 | [
"MIT"
] | permissive |
CREATE proc Reference.[usp_Populate_Product]
as
Set Nocount on
;
Truncate Table Reference.Product
;
insert Reference.Product (Product) Values ('Bicycle')
insert Reference.Product (Product) Values ('Tablet')
insert Reference.Product (Product) Values ('Toy Car')
insert Reference.Product (Product) Values ('Ra... | true |
4c39c9da83dc9fc7d4d9829fa2d51d7f66874053 | SQL | l871993962/liminglei | /AMS_电子对账/code/server/.svn/pristine/e0/e09931155cf433d78df35bc0b6e97d0b5fb07c55.svn-base | UTF-8 | 5,537 | 3.015625 | 3 | [] | no_license | create or replace procedure Prc_Dz_JjHkzl(i_port in varchar2,
i_date in varchar2,
i_user in varchar2,
i_iden in varchar2,
i_hkdm... | true |
9dae9fe58e955472fd147c5697d513040f02d3da | SQL | jabautista/GeniisysSCA | /src/main/resources/sql/procedures/gipis031a_create_fire_item.prc | UTF-8 | 5,889 | 3.375 | 3 | [] | no_license | DROP PROCEDURE CPI.GIPIS031A_CREATE_FIRE_ITEM;
CREATE OR REPLACE PROCEDURE CPI.GIPIS031A_CREATE_FIRE_ITEM (
p_par_id IN GIPI_WITEM.par_id%TYPE,
p_item_no IN GIPI_WITEM.item_no%TYPE)
AS
/*
** Created by : Mark JM
** Date Created : 06.03.2010
** Reference By : (GIPIS031 - Endt Basic Information)
** Descrip... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.