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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
0eb46e9f53bd2279587acf6da09458c94773e01b | SQL | ljcampos/Stamina | /API/src/config/stamina.sql | UTF-8 | 18,332 | 3.015625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.2.12deb2+deb8u1build0.15.04.1
-- http://www.phpmyadmin.net
--
-- Servidor: localhost
-- Tiempo de generación: 14-09-2016 a las 00:17:00
-- Versión del servidor: 5.6.28-0ubuntu0.15.04.1
-- Versión de PHP: 5.6.4-4ubuntu6.4
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:0... | true |
565025cc60f25f588171c12f9eff81b989e34e4c | SQL | dhamotharang/SvnGit | /Custom/NDNW/Admission/Database/Scripts/InsertUpdateScript_GlobalCodes_Insurance.sql | UTF-8 | 1,572 | 3.171875 | 3 | [] | no_license | /********************************************************************************************
Author : Malathi Shiva
CreatedDate : 08 Sept 2014
Purpose : GlobalCodes insert/update for Categories : XRESIDENCETYPE
******************************************************************************************... | true |
98437eb0c4e3307b934a37bb2de374eded8a0b53 | SQL | jozefDu/Zadanie2 | /DBS-prikazy.sql | UTF-8 | 3,488 | 3.578125 | 4 | [] | no_license | <<<<<<< HEAD
och och
=======
ahoj
och joj
>>>>>>> podradeny
-- vkladanie rezervacie
insert into rezervacie (id_rezervacia, id_spoj, miesto_na_sedenie, id) values (
null
,(select id_spoj from spoje where datum = to_date('04-dec-14')
and id_linka = (select id_linka from linky wher... | true |
ac6a865e6943781f22dec2b4b0b05fe33bb00f43 | SQL | mylich119/starlord | /application/sql/table.sql | UTF-8 | 636 | 2.609375 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | CREATE TABLE `example` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增主键',
`canonical_country_code` char(8) NOT NULL DEFAULT '' COMMENT '订单的国家码',
`utc_offset` int(11) NOT NULL DEFAULT '0' COMMENT '订单城市的时区偏移',
`is_del` tinyint(4) NOT NULL DEFAULT '0' COMMENT '作弊状态',
`_create_time` timestamp NOT ... | true |
835f83d55e434a71108ce90ebbcb25a5ae1516c1 | SQL | radtek/Telecommunication | /K7/DataBase/PROCEDURES/P_NEW_TARIF_OPTS.SQL | WINDOWS-1251 | 434 | 2.53125 | 3 | [] | no_license | CREATE OR REPLACE procedure p_new_tarif_opts(
pOPTION_CODE in varchar2
) is --
--
begin
INSERT INTO QUEUE_CURRENT_BALANCES(PHONE_NUMBER, QUEUE_TYPE)
select distinct(OPT.PHONE_NUMBER) phone_NUMBER, 52 QUEUE_TYPE
from DB_LOADER_ACCOUNT_PHONE_OPTS opt
where OPT.OPTION_CODE = pOPTION_CODE
... | true |
1bd576a42495f4ea34313ac93572fe00a4211b58 | SQL | modrinth/minos-old | /migrations/20210523105455_tokens.sql | UTF-8 | 369 | 3.03125 | 3 | [
"Apache-2.0"
] | permissive | -- Add migration script here
-- Tokens are a long-lived character string that is kept in the cookies for session conservation.
CREATE TABLE minos.tokens
(
token text PRIMARY KEY,
expires timestamp DEFAULT CURRENT_TIMESTAMP + INTERVAL '3 months',
user_id uuid,
CONSTRAINT userid
FOREIGN KEY (us... | true |
f01da3efe883ddc017519086c27fe0d205fbdab8 | SQL | Reborsolli/Turma30Java | /MySQL/Lista Exercicios/Ex5.sql | UTF-8 | 1,296 | 3.8125 | 4 | [] | no_license | CREATE DATABASE db_construindo_a_nossa_vida;
use db_construindo_a_nossa_vida;
create table tb_categoria (
id_categoria bigint(10),
Tipo varchar(20),
PRIMARY KEY (id_categoria)
);
create table tb_produto (
id_material bigint (10),
material varchar(20),
preco decimal (5,2),
id_categoria bigint (20),
foreign key (i... | true |
aa6fb5582689331308196c20fb95ff896ccf57eb | SQL | laomd-2/MySQL | /1/1.2.sql | UTF-8 | 1,024 | 3.953125 | 4 | [] | no_license | -- SELECT name, address, phone FROM Supplier;
SELECT * FROM Sales.Orders WHERE DATE("1997-12-25") - orderdate >= 0 AND DATE("1997-12-25") - orderdate < 7 AND totalprice > 1000;
/*SELECT C.custkey, SUM(O.totalprice) FROM customer C, orders O
WHERE C.custkey = O.custkey GROUP BY C.custkey;
SELECT C.custkey, MAX(C.nam... | true |
0d71c93163b8bb86cd38cae4c0d6334c00e67a27 | SQL | dalton-x/panterest | /pins.sql | UTF-8 | 61,408 | 2.609375 | 3 | [
"MIT"
] | permissive | insert into pins (title, description, user_id) values ('Donec odio justo, sollicitudin ut, suscipit a, feugiat et, eros.', 'Nullam porttitor lacus at turpis. Donec posuere metus vitae ipsum. Aliquam non mauris.
Morbi non lectus. Aliquam sit amet diam in magna bibendum imperdiet. Nullam orci pede, venenatis non, sodale... | true |
62d68a14f41d161e56feece3812920f6b0ee2aef | SQL | FranciscoAT/movie_db | /webapp/public/scripts/SQL_Queries/queries.sql | UTF-8 | 228 | 3.6875 | 4 | [
"MIT"
] | permissive | -- a. Info about user-specified movie
SELECT * FROM movie WHERE movie.name = input;
--b. Full list of actors
SELECT A.firstane, A.lastname FROM actor A, movie M, actorPlays P WHERE (M.name = input AND M.movieID = P.movieID);
| true |
f4112707393ad74140ef8d63f7a392c7f42f3744 | SQL | Aditya-Gupta26/Aditya_200100011_iccassign | /job (1).sql | UTF-8 | 1,538 | 2.921875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jun 06, 2021 at 01:07 PM
-- Server version: 10.4.19-MariaDB
-- PHP Version: 7.3.28
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... | true |
ec9618e1a2e4f67c90972d17bc170a1b6656730c | SQL | kalinalazarova1/TelerikAcademy | /Programming/6. Databases/06.ADO.NET/ADO.NET/library_books.sql | UTF-8 | 2,505 | 3.0625 | 3 | [
"MIT"
] | permissive | CREATE DATABASE IF NOT EXISTS `library` /*!40100 DEFAULT CHARACTER SET utf8 */;
USE `library`;
-- MySQL dump 10.13 Distrib 5.6.19, for Win32 (x86)
--
-- Host: localhost Database: library
-- ------------------------------------------------------
-- Server version 5.6.20-enterprise-commercial-advanced
/*!40101 SET ... | true |
169d55a6aacf193b2b93b53193cc29d37573d72e | SQL | AnaswaraNV/Java_Sourcecodes | /A1_HRManagement/Support/CreateTableSecurity.sql | UTF-8 | 459 | 2.640625 | 3 | [] | no_license | CREATE TABLE SECURITY (
EMPLOYEE_ID NUMBER(6,0) NOT NULL
CONSTRAINT SECURITY_EMPID_FK
REFERENCES cjv805_181a09.EMPLOYEES
(EMPLOYEE_ID),
sec_id VARCHAR2(20),
sec_password VARCHAR2(10),
sec_status CHAR(1),
CONSTRA... | true |
92df1ec9db104054cd59341a992f8676a034f80a | SQL | GuilhermeRodriguesSantos/Generetion-Bloco2 | /ExerciciosMysql/ExerciciosBasicos/01-CreateTable_Rh.sql | UTF-8 | 479 | 3.109375 | 3 | [] | no_license | create database db_rh;
/*Crie uma tabela de funcionaries e utilizando a habilidade de abstração e determine 5
atributos relevantes dos funcionaries para se trabalhar com o serviço deste RH.
*/
use db_rh;
create table tb_funcionarios(
id_Funcionario bigint auto_increment,
nome_Funcionario varchar(100) not null,... | true |
a3e7aac562c4772222c60d78762989ace7661177 | SQL | hcendales/sdf | /Financiera/Financiera/sql/loop.sql | UTF-8 | 815 | 2.546875 | 3 | [] | no_license | declare
fechaini date;
fechafin date;
p_error varchar2(250);
ano number;
mes number;
dia number;
begin
fechaini := to_date('2010-12-01','yyyy-mm-dd');
fechafin := to_date('2010-12-31','yyyy-mm-dd');
while fechaini <= fechafin loop
p_error := null;
ano := to_number( to_char(fechaini,'yyyy') );
... | true |
d850857323668adb659b03134125ef8a5b87925f | SQL | chanthavong/fullstack-ci-backend | /db/sql.sql | UTF-8 | 1,578 | 2.90625 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive |
create table books(
id int auto_increment,
code varchar(40),
name varchar(20) no null,
description varchar(255),
tag varchar(60),
created_at datetime DEFAULT CURRENT_TIMESTAMP,
updated_at datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
primary key(id)
);
create table users(
id int auto_incr... | true |
4b93ec4f0ea4f16e80af210e8bb0bb8b1116c1ab | SQL | amojohn/ETL | /07_BI_DEPLOY/TEMP/TABLES/DMR.DMR_TP_ORDERRELEASE.sql | GB18030 | 5,764 | 2.828125 | 3 | [] | no_license | DROP TABLE IF EXISTS DMR.DMR_TP_ORDERRELEASE;
CREATE TABLE IF NOT EXISTS DMR.DMR_TP_ORDERRELEASE(
year bigint COMMENT 'ƻ',
year_month bigint COMMENT 'ƻ·',
date bigint ... | true |
21c11299189e23ff40259d363627d52291520757 | SQL | speianudana/EndavaProject_Team4 | /queries.sql | UTF-8 | 1,067 | 3.671875 | 4 | [] | no_license |
DROP DATABASE "TestDB";
CREATE DATABASE TestDB;
-- delete all tables
DROP TABLE PUBLIC."event",
PUBLIC."news",
PUBLIC."user_activity",
PUBLIC."user_personal_data",
PUBLIC."user_role",
PUBLIC."user_system",
PUBLIC."user_system_validation_hash";
--insert news
insert into public."news" ("context", "da... | true |
6558d2111a1de951958d266a7c2f1746be0c865b | SQL | JairAviles/HackerRank | /SQL/Aggregation/04_Weather_Observation_Station_2.sql | UTF-8 | 610 | 2.546875 | 3 | [
"MIT"
] | permissive | /***************************************************************************
* º Weather Observation Station 2 º *
* *
* Author: Jair Israel Avilés Eusebio *
* Date: 07/27/2015 *
* Language: Oracle *
* Twi... | true |
f684b71af63434ba58acca79188f607dbdaa2fe6 | SQL | frankdaza/jwt-security-spring-api | /src/main/resources/db/migrations/V0_0_1__create_account_rol.sql | UTF-8 | 394 | 3.375 | 3 | [
"CC0-1.0"
] | permissive | CREATE TABLE role (
id BIGSERIAL PRIMARY KEY,
name CHARACTER VARYING UNIQUE NOT NULL
);
CREATE TABLE account (
id BIGSERIAL PRIMARY KEY,
username CHARACTER VARYING UNIQUE NOT NULL,
password VARCHAR(100) NOT NULL,
enabled BOOLEAN NOT NULL,
name CHARACTER VARYING NOT NULL
);
CRE... | true |
09c5595b45eb2f4e8daf9f9e67c427697f4dd180 | SQL | BackupTheBerlios/rheinaufcms-svn | /trunk/RheinaufCMS/tables.sql | ISO-8859-1 | 5,930 | 2.921875 | 3 | [] | no_license | -- Erstellungszeit: 02. November 2007 um 19:30
--
-- --------------------------------------------------------
--
-- Tabellenstruktur fr Tabelle `RheinaufCMS>Groups`
--
CREATE TABLE `RheinaufCMS>Groups` (
`id` int(11) NOT NULL auto_increment,
`Name` text NOT NULL,
`Rechte` text NOT NULL,
PRIMA... | true |
ffcfa59d0f830b5f3dc0404334c6f1c297420fb3 | SQL | NogalesKarla/Sistema-financiero | /sisBanco/banco5.sql | UTF-8 | 23,767 | 3.453125 | 3 | [
"MIT"
] | permissive | -- --------------------------------------------------------
-- Host: localhost
-- Versión del servidor: 5.7.19 - MySQL Community Server (GPL)
-- SO del servidor: Win64
-- HeidiSQL Versión: 9.4.0.5125
-- --------------------------------------------------------
/*... | true |
bcc9ffec15987a6acd634198670f59a1eee5f3df | SQL | ElienVissers/my-life-socks | /sql/bios.sql | UTF-8 | 204 | 2.703125 | 3 | [] | no_license | DROP TABLE IF EXISTS bios;
CREATE TABLE bios(
id SERIAL PRIMARY KEY,
bio VARCHAR(500) NOT NULL,
user_id INTEGER NOT NULL UNIQUE,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
| true |
54fc004165761364c8804977e9ce7459c1448f20 | SQL | jgarzonext/packages | /function/F_BUSCACTRREA.sql | ISO-8859-1 | 66,998 | 2.71875 | 3 | [] | no_license | --------------------------------------------------------
-- DDL for Function F_BUSCACTRREA
--------------------------------------------------------
CREATE OR REPLACE EDITIONABLE FUNCTION "AXIS"."F_BUSCACTRREA" (
psseguro IN NUMBER,
pnmovimi IN NUMBER,
psproces IN NUMBER,
pmotiu IN NUMBER,
... | true |
48db8d3a67c39e43d21ae15d6057e467449b64e1 | SQL | yandongliu/d3p_crawler | /schema.sql | UTF-8 | 432 | 2.9375 | 3 | [] | no_license | CREATE TABLE items(
id integer primary key,
title varchar(255) not null,
description varchar(500),
link varchar(250),
likes int,
feedback varchar(255),
source text,
createtime datetime not null default current_timestamp,
updatetime datetime not null default current_timestamp
);
CR... | true |
3570b55e0214a925f2422fdd48b999dee287bb82 | SQL | jernejbanevec/e-kartoteka | /tabele.sql | UTF-8 | 3,586 | 3.328125 | 3 | [
"MIT"
] | permissive | DROP TABLE IF EXISTS zdravnik CASCADE;
DROP TABLE IF EXISTS oseba CASCADE;
DROP TABLE IF EXISTS pregled CASCADE;
DROP TABLE IF EXISTS test CASCADE;
DROP TABLE IF EXISTS specializacija CASCADE;
DROP TABLE IF EXISTS diagnoza CASCADE;
DROP TABLE IF EXISTS bolezen CASCADE;
DROP TABLE IF EXISTS zdravilo CASCADE;
DROP TABLE... | true |
2284ad1b4e003e18f152e7753b16904d42ee434e | SQL | hectoky/royalties | /src/main/resources/InitDB/createSchema-changes.sql | UTF-8 | 780 | 3.875 | 4 | [] | no_license |
CREATE TABLE studio(
id BIGINT(20) NOT NULL GENERATED ALWAYS AS IDENTITY,
reference VARCHAR(40) NOT NULL,
name VARCHAR(30) NOT NULL,
payment DECIMAL(10,2) NOT NULL,
views BIGINT(20) DEFAULT 0,
PRIMARY KEY(id),
UNIQUE (reference)
);
CREATE UNIQUE INDEX studio_reference_index ON studio ( reference )... | true |
9ca3f5a4f7d647a1580b13e702c216ac6c13c5bc | SQL | jdrew1303/ocrservice | /sql/basic.sql | UTF-8 | 2,135 | 4.1875 | 4 | [] | no_license |
drop table ocrhash;
create table ocrhash (ids varchar(255) primary key,adr text ) engine myisam;
create fulltext index id_ft_hash on ocrhash(adr);
insert into ocrhash (ids,adr)
select
group_concat(strid separator ',') ids,
concat(strasse,' ',plz,' ',ort) adr
from fast_access_tour
where regiogruppe='Zustellung'
... | true |
974cc9ab954aaaac96a041687350aa093b927ae5 | SQL | a-deeb/eCommercePHP | /database/testdb.sql | UTF-8 | 8,181 | 2.890625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.0.10.20
-- https://www.phpmyadmin.net
--
-- Host: localhost
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_COLL... | true |
5932c6058c6e5f69f07f221dedcac4b5297100d9 | SQL | janobono/r3n-api | /r3n-example/r3n-example-ora/src/main/resources/db/changelog/db.changelog-master.sql | UTF-8 | 416 | 2.984375 | 3 | [
"Apache-2.0"
] | permissive | --liquibase formatted sql
--changeset janobono:1
ALTER SESSION SET NLS_LENGTH_SEMANTICS=CHAR;
create sequence sq_hotel minvalue 1 increment by 1 start with 1 nocache noorder nocycle;
create table hotel
(
id number(19, 0) not null,
name varchar2(255) not null,
note clob
);
alter table hotel
add constr... | true |
9a732874a7ad0f47a8023e848d41405943f994fd | SQL | RebecaLiima/ProjetoNaf | /reserva.sql | UTF-8 | 2,682 | 3.265625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: 18-Mar-2019 às 20:55
-- Versão do servidor: 5.6.41
-- versão do PHP: 7.2.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_C... | true |
5182e7b2c013a108e685c3170a02c2b1e720fce4 | SQL | JadenQ/Manage-big-data-using-SQL_note-code | /MySQL_Exercise_Dogniton/SQL_Practice_57P/solution.sql | UTF-8 | 5,040 | 4.125 | 4 | [] | no_license | -- 0
use Northwind_SPP
-- Introductory
--1
SELECT * FROM Shippers
--2
SELECT CategoryName, Descriptipon FROM Categories
--3
SELECT FirstName, LastName, HireDate
FROM Employees
WHERE Title = 'Sales representative'
--4
SELECT FirstName, LastName, HireDate
FROM Employees
WHERE Title = 'Sales representative'
AND Coun... | true |
7b090d123247c52886b249b463bf3db2afed9f11 | SQL | mhtpky/SQL | /day07_orderby.sql | ISO-8859-3 | 2,598 | 4.0625 | 4 | [] | no_license | /*================================ ORDER BY ===================================
ORDER BY cmleci?i bir SORGU deyimi ierisinde belli bir SUTUNa gre
SIRALAMA yapmak iin kullan?l?r.
Syntax
-------
ORDER BY sutun_adi ASC -- ARTAN
ORDER BY sutun_adi DESC -- AZALAN
============================... | true |
0cfafa650e4352aded872159a4dd09ddd92c5a50 | SQL | superxiaoqiang/blcu_py_nlp | /examples/kekenet.sql | UTF-8 | 2,834 | 3.546875 | 4 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: 2019-11-19 15:06:57
-- 服务器版本: 10.1.34-MariaDB
-- PHP Version: 5.6.37
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SE... | true |
573d06b0960e16b5cb9fe1d10409c2dc1a8318f3 | SQL | hasib135/Restaurant-Management-System-Using-PL-SQL-in-Oracal10g | /CODES/query_on_customer_and_order/insert_order.sql | UTF-8 | 1,300 | 3.34375 | 3 | [] | no_license |
create or replace procedure insert_order(
branch_id in number,
customer_id in number,
food_id1 in number,
quantity1 in number,
food_id2 in number,
quantity2 in number ) is
order_id number;
order_date date:=to_date('20180421','YYYYMMDD');
amount number;
o_id orderdetail.order_id@site_link%type;
f_id order... | true |
c9feafc22b0572e02b105ecd16b892b76ee8a145 | SQL | ajmerasaloni10/SQL | /LeetCode/Easy/8.salesperson.sql | UTF-8 | 1,311 | 3.859375 | 4 | [] | no_license | /*CREATE TABLE salesperson
(sales_id int, name varchar(4), salary int, commission_rate int, hire_date datetime)
;
INSERT INTO salesperson
VALUES
(1, 'John', 100000, 6, '2006-04-01 00:00:00'),
(2, 'Amy', 120000, 5, '2010-05-01 00:00:00'),
(3, 'Mark', 65000, 12, '2008-12-25 00:00:00'),
(4, '... | true |
7732b3378f090e1668711bc0c7393ae85ac0039d | SQL | jlangston/sourcegraph | /migrations/1525961108_user_unique_among_non-deleted.up.sql | UTF-8 | 398 | 3.453125 | 3 | [
"LicenseRef-scancode-warranty-disclaimer",
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] | permissive | -- Soft-deleted users (deleted_at IS NOT NULL) should not be accounted for in unique indexes.
ALTER TABLE users DROP CONSTRAINT users_username_key;
CREATE UNIQUE INDEX users_username ON users(username) WHERE deleted_at IS NULL;
DROP INDEX users_external_id;
CREATE UNIQUE INDEX users_external_id ON users(external_id, ... | true |
753d5cf50d721d24c9135d7e111a8c5848c3a180 | SQL | FTurleque/abc_2105-perso | /database/merise/src/exercice1_library/database/library_structure.sql | UTF-8 | 992 | 3.453125 | 3 | [] | no_license | DROP DATABASE IF EXISTS db_library;
CREATE DATABASE IF NOT EXISTS db_library;
USE db_library;
CREATE TABLE IF NOT EXISTS customers
(
customer_id INT PRIMARY KEY,
customer_firstname VARCHAR(64) NOT NULL,
customer_lastname VARCHAR(64) NOT NULL,
customer_street_nb INT NOT NULL,
customer_street VARCHAR(... | true |
dec6944d9d3a29edc24dc80da4b6d7256788ee6b | SQL | webonerds/mads | /public_html/ads_engine_db (1).sql | UTF-8 | 42,806 | 3.03125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.0.9
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Feb 20, 2014 at 07:41 AM
-- Server version: 5.6.14
-- PHP Version: 5.5.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/... | true |
52fd829a9ebd7cbcfbf5b8dc055107d6f7bdc652 | SQL | ignacioPastor/Multi-platform_Application_Development | /Second_year/Java_Data_access/Exercise_to_practice/EjerciciosPropuestos_4_8_1.sql | UTF-8 | 848 | 3.234375 | 3 | [] | no_license |
create table actores (
id varchar(10),
nombre varchar(30),
apellidos varchar(60),
constraint pk_actores primary key (id)
);
create table actuar (
id varchar(10),
codigo integer,
constraint pk_actuar primary key (id, codigo),
constraint fk_actuar_actores foreign key (id)
references actores (id)... | true |
7731f6d56def23d2aa356accf4dc68c453abbde0 | SQL | cohenjo/dbautils | /vertica/active_idle_sessions.sql | UTF-8 | 460 | 3.40625 | 3 | [] | no_license | select count(*) as total_connections, count(case when statement_id is not null then 1 else null end ) as active_connections, count(case when statement_id is null then 1 else null end ) as idle_connections,
client_pid, substring(client_hostname,1,instr(client_hostname,':',-1,1)-1) as host_ip, user_name as user_schema
... | true |
ab62c42898ba2c00c629c9373f1712747a0e0f3f | SQL | uva-linklab/powerblade | /sql/ligeiro.sql | UTF-8 | 1,513 | 3.703125 | 4 | [] | no_license |
select * from dat_powerblade where gatewayMAC='c098e5c00027' order by timestamp desc;# or gatewayMAC='c098e5c00025' or gatewayMAC='c098e5c0002e' order by timestamp asc;
select t1.*, t2.room as troom, t3.deviceName, t3.room, t3.location from
(select gatewayMAC, deviceMAC, count(*) as count from dat_ligeiro
where gate... | true |
9431c29072102409fe8f05f25252a7dcb02f5296 | SQL | danielthorr/2019haust_gagn | /verkefni4/sqllibrary/courses.sql | UTF-8 | 1,263 | 3.96875 | 4 | [] | no_license | /* CRUD
Create
Read
Update
Delete
*/
delimiter $$
/* Create */
drop procedure if exists NewCourse$$
create procedure NewCourse(in couNumber char(10), in couName varchar(75), in couCredits tinyint(4))
begin
insert into Courses (courseNumber, courseName, courseCredits)
values (c... | true |
5813a1bb035d933b37adc909fd189bc6f8295731 | SQL | kamikitabanzai/scripts | /mycse/sql/countZipByPrefLow.sql | UTF-8 | 187 | 3 | 3 | [] | no_license | select count(a.pref),a.pref
from
(select new_zip_id
,pref
from mst_zip
group by new_zip_id
,pref
order by new_zip_id
) a
group by a.pref
order by count(a.pref)
;
| true |
c8c2a55ca755d93978bd631389ef4ba87531ad7c | SQL | tingkl/java | /imooc/spring-boot/seckill/src/main/resources/init.sql | UTF-8 | 2,724 | 3.671875 | 4 | [] | no_license | # 商品表
CREATE TABLE goods(
id bigint(20) NOT NULL AUTO_INCREMENT COMMENT '商品ID',
goods_name varchar(16) DEFAULT NULL COMMENT '商品名称',
goods_title varchar(64) DEFAULT NULL COMMENT '商品的标题',
goods_img varchar(64) DEFAULT NULL COMMENT '商品的图片',
goods_detail LONGTEXT COMMENT '商品的详细介绍',
goods_price decimal(10, 2) DE... | true |
f527ecd93c92313ff3b639fa3fe14ea5a1eef31c | SQL | balazstth/consense | /conSense/server/sql/create.sql | UTF-8 | 2,212 | 3.171875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 2.10.0.2
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Apr 05, 2007 at 02:15 AM
-- Server version: 5.0.27
-- PHP Version: 5.2.1
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
--
-- Database: `rsdb`
--
-- --------------------------------------------------------
--
--... | true |
ec22efe602408952ce463fbd4ef07417303a5e68 | SQL | bradybyrd/REPO | /postgres/rlm/INDEX/index_uploads_on_owner_type.sql | UTF-8 | 172 | 2.5625 | 3 | [] | no_license | -- Name: index_uploads_on_owner_type; Type: INDEX; Schema: public; Owner: deploy
--
CREATE INDEX index_uploads_on_owner_type ON public.uploads USING btree (owner_type);
--
| true |
b03c0f0fdcc515079b8b3967f8f103af59ba20c7 | SQL | WorldwideAntimalarialResistanceNetwork/linshare | /src/main/resources/sql/mysql/Template_Migration_Mysql.sql | UTF-8 | 9,492 | 3.734375 | 4 | [] | no_license | -- MySQL migration script template
SET storage_engine=INNODB;
SET NAMES UTF8 COLLATE utf8_general_ci;
SET CHARACTER SET UTF8;
SET AUTOCOMMIT=0;
START TRANSACTION;
DROP PROCEDURE IF EXISTS ls_prechecks;
DROP PROCEDURE IF EXISTS ls_version;
DROP PROCEDURE IF EXISTS ls_check_user_connected;
-- TODO: CHANGE THE VERSIONS... | true |
126fd6b6b28d0958151c46eea32998b1a64c277c | SQL | vlady4780/Plantilla | /prueban1_1.sql | UTF-8 | 2,509 | 2.90625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 08-11-2020 a las 01:52:45
-- Versión del servidor: 10.4.13-MariaDB
-- Versión de PHP: 7.4.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_... | true |
b69688afe98bbaa82c08602009a608227a5ac5cd | SQL | basoares/leetcode | /database/p0184.sql | UTF-8 | 309 | 4.1875 | 4 | [
"MIT"
] | permissive | ;WITH CTE AS
(
SELECT e.Name AS Employee, e.Salary, d.Name AS Department,
DENSE_RANK() OVER (PARTITION BY e.DepartmentId ORDER BY Salary DESC) DS
FROM Employee e
INNER JOIN Department d
ON D.Id = e.DepartmentId
)
SELECT Department, Employee, Salary
FROM CTE
WHERE DS = 1
| true |
1cb761984215ec1d380c869f66ce402d2ae35149 | SQL | phalpin/Winter2014OOPProject | /sql/procedures/Orders.sql | UTF-8 | 2,020 | 4.1875 | 4 | [] | no_license | -- DELIMITER $$
-- Order Create
DROP PROCEDURE IF EXISTS PizzaShop.Order_Create $$
CREATE PROCEDURE PizzaShop.Order_Create(
IN p_userId INT
)
BEGIN
INSERT INTO Orders
(userId)
VALUES
(p_userId);
SELECT LAST_INSERT_ID() as 'orderId';
END $$
-- Order Read
DROP PROCEDURE IF EXISTS PizzaSho... | true |
c60758b97f207629d413edbd0268d0ec5985b7f2 | SQL | AbbeyDan/Root | /WEB-INF/classes/sql/unit.sql | UTF-8 | 688 | 3.6875 | 4 | [] | no_license | /* unittree */
select d.id, d.pid, d.ancestors, d.name, d.order_num, d.leader, d.phone, d.email, d.status, d.del_flag, d.create_by, d.create_time
from sys_unit d
where d.del_flag = '0'
#if(pid != null&&pid != 0)
AND pid = #(pid)
#end
#if(deptName != null && deptName != '')
AND name l... | true |
e5cbff8cb9c62fd4b34bdfa2a75c4d3f75b1a0e1 | SQL | allenfu2013/sharding-sphere-demo | /sharding-jdbc-demo/sharding-masterslave-03/src/main/resources/data/schema.sql | UTF-8 | 6,488 | 3.234375 | 3 | [] | no_license | DROP TABLE IF EXISTS demo_ds_0.sys_merchant;
CREATE TABLE demo_ds_0.sys_merchant (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`org_id` bigint(20) DEFAULT NULL COMMENT '组织id(创建商户号)',
`mid` varchar(64) DEFAULT NULL COMMENT '商户号',
`keyt` varchar(64) DEFAULT NULL COMMENT '密钥',
`ip_restricted` bit(1) DEFAULT b'1' CO... | true |
ed0c742f27a2daaef48917d967b7ae873c4ec177 | SQL | PercyPham/demo-saga-orchestration | /services/order/db/init/init.sql | UTF-8 | 537 | 2.671875 | 3 | [] | no_license | -- POSTGRES DB
CREATE DATABASE order_service;
CREATE TABLE orders(
id SERIAL PRIMARY KEY,
status VARCHAR(255) NOT NULL,
vendor varchar(255) NOT NULL,
location varchar(255) NOT NULL,
line_items JSON NOT NULL
);
CREATE TABLE sagas(
id VARCHAR(2555) PRIMARY KEY,
type VARCHAR(255) NOT NULL,
... | true |
357f432a6d8ada623237109bc945a8c2ab35e901 | SQL | JacobKearney97/Board_Games | /analytics of games.sql | UTF-8 | 790 | 3.65625 | 4 | [] | no_license | create database board_game
use board_game
select * from games;
select * from players;
select * from plays;
select *, case
when winrate*avg_players > 1
then 'strong'
when winrate*avg_players < 1
then 'pussy'
else 'average'
end performance from
(
select pr.first_name as name, cast((sum(win)/count(p... | true |
b310687f32f5bf62d806492c54dc364a7c557ce8 | SQL | AlexGruPerm/barcl | /src/main/resources/mts_bars/Scripts.sql | UTF-8 | 1,314 | 2.859375 | 3 | [] | no_license |
--drop old CF
drop table mts_bars.bars;
drop table mts_bars.last_bars;
drop table mts_bars.bars_future;
drop table mts_bars.bars_test;
drop table mts_bars.pattern_search_results;
drop table mts_bars.td_bars_3600;
drop table mts_bars.trade_advisers_results_bars;
CREATE TABLE mts_bars.bars(
ticker_id int,
ddate date... | true |
d0ae01e303a0c5e6997369dbbc689e14832496af | SQL | aashutos/JavaExamples | /YotiRobot/src/main/resources/db/flyway/V1__SCHEMA.sql | UTF-8 | 496 | 2.8125 | 3 | [] | no_license | CREATE SCHEMA IF NOT EXISTS YOTI;
CREATE TABLE HOOVER_REQUESTS (
REQUEST_TIMESTAMP BIGINT PRIMARY KEY,
DIMENSION_ROOM VARCHAR NOT NULL,
POSITION_HOOVER VARCHAR NOT NULL,
DIRT_PATCHES VARCHAR NOT NULL,
INSTRUCTIONS VARCHAR NOT NULL
);
CREATE TABLE HOOVER_RESPONSE (
REQUEST_TIMESTAMP BIGINT PRIMARY KEY,
P... | true |
8519c6d6ec867e517f82356dae1823f830901132 | SQL | cbcballestas/GestionEventos | /BD/gestion_eventos.sql | UTF-8 | 10,978 | 2.9375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.5.3.1
-- http://www.phpmyadmin.net
--
-- Servidor: localhost
-- Tiempo de generación: 03-02-2016 a las 23:07:27
-- Versión del servidor: 5.7.10-log
-- Versión de PHP: 5.6.17
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@... | true |
78a3a0075a32974abfc7e4764f53fcda04d916d1 | SQL | nss-day-cohort-44/Chinook-TravisMilner | /playlists_track_count.sql | UTF-8 | 146 | 3.609375 | 4 | [] | no_license | Select p.Name as PlaylistName,
Count(pt.trackId)
FROM Playlist p
Join PlaylistTrack pt On pt.PlaylistId = p.PlaylistId
Group by p.name | true |
0cb0e7a32fc0abf9c7a0b1360c7a02924dc78f0a | SQL | Soliloquiess/SF_Record | /SF_PDF/0406/SQL 숙제2.sql | UTF-8 | 1,044 | 3.796875 | 4 | [] | no_license | use ssafydb;
select * from testdb.dept;
select * from testdb.emp;
select * from testdb.job;
select * from testdb.loc;
-- 1. 부서위치가 CHICAGO인 모든 사원에 대해 이름,업무,급여 출력하는 SQL을 작성하세요.
select *
from dept
where locid = (select locid from loc where locid = 1700);
-- 2. 부하직원이 없는 사원의 사원번호,이름,업무,부서번호 출력하는 SQL을 작성하세요.
select *
fro... | true |
3e2b3de3d141d5764a16bcef9918af1dbf44983e | SQL | FI13/afbb-bibo | /setup.sql | UTF-8 | 7,268 | 2.703125 | 3 | [
"ISC",
"BSD-3-Clause"
] | permissive | -- MySQL dump 10.16 Distrib 10.1.10-MariaDB, for Linux (i686)
--
-- Host: localhost Database: afbbbibo
-- ------------------------------------------------------
-- Server version 10.1.10-MariaDB-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTE... | true |
9f7ddedd19eb4fa0148118ff2c48412aa1980ef9 | SQL | hasan2015/haixun | /haixun/hxxk/sql/insert_test_data.sql | UTF-8 | 1,884 | 2.765625 | 3 | [] | no_license | SET FOREIGN_KEY_CHECKS=0;
truncate table ymygrade;
truncate table yuser;
truncate table yschedule;
truncate table ygrade;
truncate table yspecialty;
insert into yspecialty(specialtyid,name) values(1,'拉丁舞');
/**/
insert into ygrade(gradeid,specialtyid,code,area,year,term,degree,startdate,enddate,times,type,pho... | true |
f1ef3794ed156abf19f75b2df330f871bc8574f6 | SQL | bbrumm/citpsql | /function examples/SUBSTR.sql | UTF-8 | 1,641 | 3.46875 | 3 | [] | no_license | /* SUBSTR Examples */
/* 1 - Example with Both Parameters */
SELECT 'Complete IT Professional',
SUBSTR('Complete IT Professional', 1, 10) AS SUB
FROM DUAL;
/* 2 - Example with Only Start Position */
SELECT 'Complete IT Professional',
SUBSTR('Complete IT Professional', 5) AS SUB
FROM DUAL;
/* 3 - ... | true |
41d81dcc46ce1b6546deb9ae7456b6da39a3d9ab | SQL | wellsofthewest/sql | /processing/SQL/PL_SQL/Maintain_And_Post/verCnt.sql | UTF-8 | 1,525 | 3.828125 | 4 | [] | no_license | SET serveroutput ON
SET linesize 200
spool DeltaCount.txt append
SELECT to_char(SYSDATE, 'DD-MON-YY HH24:MI:SS') AS "Delta Count Check Time" FROM dual;
DECLARE
CURSOR VERLIST
IS
SELECT V.NAME,
V.OWNER,
V.STATE_ID,
V.CREATION_TIME,
S.CLOSING_TIME
FROM VERSIONS V
JOIN STATES S
... | true |
c8041645bbfb50c42bd6dc66aae4fc7b35cdaf78 | SQL | Utkarsh-RDev/python-flask-blog | /flaskweb.sql | UTF-8 | 3,257 | 3.171875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Apr 23, 2021 at 09:19 PM
-- Server version: 10.4.18-MariaDB
-- PHP Version: 8.0.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... | true |
14d05229f3b6643e992d825d3209644c297ea578 | SQL | andmartins/teste | /serasa-api/database.sql | UTF-8 | 1,131 | 3 | 3 | [] | no_license | CREATE TABLE `winners` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`userId` int(10) NOT NULL,
`winnerName` varchar(255) NOT NULL,
`winnerEmail` varchar(100) NOT NULL,
`winnerCpf` varchar(11) NOT NULL,
`winnerCity` varchar(50) NOT NULL,
`winnerState` varchar(50) NOT NULL,
`created_at` timestamp NOT NULL DEFA... | true |
cc3b168314eea8675c794f55a45aeb860faca24b | SQL | VCCRI/PBrowse | /pbrowsedb.sql | UTF-8 | 2,897 | 3.734375 | 4 | [
"BSD-2-Clause",
"BSD-3-Clause"
] | permissive | CREATE DATABASE pbrowsedb;
USE pbrowsedb;
CREATE USER 'pbrowse'@'localhost' IDENTIFIED BY 'pbrowse';
CREATE TABLE users (
username VARCHAR(20),
password VARCHAR(128) NOT NULL,
email VARCHAR(64) NOT NULL,
nick VARCHAR(20) NOT NULL,
sessionkey VARCHAR(128) NULL,
saved_config TEXT NULL,
activated BOOLEAN DEFAULT false,
... | true |
14d6bcb445bda3c0eec609067a5215a9a1f7a2c3 | SQL | paraamigos/paraAmigos | /portal/sql/ddl.sql | UTF-8 | 630 | 3.390625 | 3 | [] | no_license | CREATE TABLE usuario (
email VARCHAR(150) NOT NULL,
nome VARCHAR(150) NOT NULL,
senha VARCHAR(50) NOT NULL,
PRIMARY KEY(email)
);
/*
alter table usuario
modify nome varchar(150)
*/
CREATE TABLE endereco_usuario (
id BIGINT NOT NULL AUTO_INCREMENT primary key,
usuario_email VARCHAR(150) NOT... | true |
f32a0aa0aa0c047aa583bd4ccaf00bae1ea7fff0 | SQL | alexveremis/e-hotels | /hotelares .sql | UTF-8 | 28,213 | 2.703125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.0
-- https://www.phpmyadmin.net/
--
-- Φιλοξενητής: 127.0.0.1
-- Χρόνος δημιουργίας: 29 Μάη 2018 στις 18:02:19
-- Έκδοση διακομιστή: 10.1.31-MariaDB
-- Έκδοση PHP: 7.2.4
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!4... | true |
36253df20f841e8be7d8b45dff1480f3c25d7aa8 | SQL | hubmaker/Arrive-Alive-SWIFT | /sql_query/대구.sql | UTF-8 | 4,821 | 2.796875 | 3 | [] | no_license | use ios_project;
#cid : cid cname
insert into city values(0, "대구");
#line : lid cid
insert into line values(0, 1);
insert into line values(0, 2);
insert into line values(0, 3);
#station : cid lid sname time
insert into station values(0, 1, '설화명곡',-26);
insert into station values(0, 1, '화원',-24);
insert into station... | true |
26da0e4ca063911b8b5a394628af3c040618386d | SQL | RobinZhuSan/xiaozhi | /vendor_management/info.sql | UTF-8 | 2,368 | 3.328125 | 3 | [
"Apache-2.0"
] | permissive | -- phpMyAdmin SQL Dump
-- version 3.5.2.2
-- http://www.phpmyadmin.net
--
-- 主机: 127.0.0.1
-- 生成日期: 2016 年 10 月 15 日 05:24
-- 服务器版本: 5.5.27-log
-- PHP 版本: 5.4.6
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_CHARACTE... | true |
4e5f6bcfe46d516e0ff3e79e59e69368a4177463 | SQL | FelipeSaldanhaS/SMPP_IFSP | /pizzaria_bd.sql | UTF-8 | 6,567 | 3.21875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Tempo de geração: 03-Ago-2021 às 23:59
-- Versão do servidor: 10.4.18-MariaDB
-- versão do PHP: 8.0.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CL... | true |
9b40d01832530b2b8948984b1cf77a02d6bf7dbe | SQL | silence-do-good/stress-test-Postgres-and-MySQL | /dump/high/day12/select2342.sql | UTF-8 | 269 | 3.078125 | 3 | [] | no_license |
SELECT sen.name
FROM SENSOR sen, SENSOR_TYPE st, COVERAGE_INFRASTRUCTURE ci
WHERE sen.SENSOR_TYPE_ID=st.id AND st.name='Thermometer' AND sen.id=ci.SENSOR_ID AND ci.INFRASTRUCTURE_ID=ANY(array['5100_1','2065','5099','5216','4066','6019','5013','5212','2081','2099'])
| true |
510c485cdd85e5a1a841777e12214a06b285a8d8 | SQL | sudeshnadas912/MyRepository | /TravelCompanionBackEndService-master/src/main/resources/static/sql-init-data/mysqldb_Module.sql | UTF-8 | 2,122 | 2.875 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 5.7.17, for Win64 (x86_64)
--
-- Host: mysqldb.ck5yc6wy2nq7.eu-central-1.rds.amazonaws.com Database: mysqldb
-- ------------------------------------------------------
-- Server version 5.6.27-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACT... | true |
050725b27c31dd93aef05751bde535b173e21061 | SQL | SoWaky/SqlScripts | /MSP_Dashboard/Project_Hours.sql | UTF-8 | 1,164 | 4.25 | 4 | [] | no_license |
SELECT COALESCE(Parent.Account_Name, a.Account_Name) AS Company_Name, datepart(mm, p.start_date) as Start_Month
, sum(p.estimated_hours) as estimated_hours
, sum(p.actual_worked_hours) as actual_hours
, (SELECT Num_Seats
FROM MSP_Dashboard.dbo.CompanyStatsByMonth seats
WHERE seats.Company_Name = COALESCE... | true |
6c4fc784f2ea86c4527d97e0bc5959cf90b0bb2b | SQL | Jason0307/spring-boot-study | /src/main/resources/schema.sql | UTF-8 | 2,472 | 2.9375 | 3 | [] | no_license | DELETE FROM `platform`.`user_tag`;
DELETE FROM `platform`.`user_message`;
DELETE FROM `platform`.`tag`;
DELETE FROM `platform`.`article`;
DELETE FROM `platform`.`user`;
--init the tag
INSERT INTO `platform`.`tag` (`id`, `title`) VALUES (1, '萝莉');
INSERT INTO `platform`.`tag` (`id`, `title`) VALUES (2, '正太');
INSERT I... | true |
b7eba7d88c0cef1241894b380d9ccbdb18eca7ad | SQL | Vikrammandge/vikram_mandge_Edac_2020 | /DBT assi6.sql | UTF-8 | 1,635 | 3.34375 | 3 | [] | no_license | -- question1
use vikram;
delimiter $$
create function ques4_1(val int)returns int(10)
begin
declare val1 int(10) default 1;
tes:repeat
set val1=val1*val;
set val=val-1;
until val=1
end repeat;
return val1;
end$$
select ques4_1(5);
drop function ques6_2;
-- question 2
delimiter $$
create function ques6_2(n int(5)) re... | true |
b5fb599e9dde3bd931d5b5410bd61088fad40fcc | SQL | CaioZanqueta/tcc | /public/emarket.sql | UTF-8 | 7,214 | 3.9375 | 4 | [
"MIT"
] | permissive | drop database if exists emarket;
create database emarket;
use emarket;
create table cliente(
id_cliente int not null auto_increment primary key,
cliente varchar(100),
cpf_cliente varchar(14) unique,
tel_cliente varchar(100),
email_cliente varchar(100) unique,
senha_cliente varchar(45)
);
create table mercado(
id_merc... | true |
7b792a7ab2e0079d042ce8e49f318227dc1e61f6 | SQL | abhashniroula77/Database-olap-system- | /ADS_ABHASH_DATAMAINTAINENCE_17.01.2020_ASSIGNMENT2/sql/tables and sequence script/dimtable.sql | UTF-8 | 5,959 | 3.75 | 4 | [] | no_license | --------------------------------------------------------------
-- Database creation Script
-- Drop tables --
DROP TABLE FACT_FLIGHT_OUTCOME;
DROP TABLE DIM_CUSTOMER;
DROP TABLE DIM_TIME;
DROP TABLE DIM_AIRLINE;
DROP TABLE DIM_FLIGHTS;
DROP TABLE DIM_COMPLAINT;
-- Auto-Generated by QSEE-SuperLite (c) 2001-2004 Q... | true |
564317b4a07ef19659bb5d3a1fd5a71596cf473d | SQL | mutedalien/conspect | /PHP_2/less_8/ДЗ new/framework/data/geekbrains.sql | UTF-8 | 26,528 | 2.9375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Хост: localhost
-- Время создания: Апр 09 2020 г., 07:09
-- Версия сервера: 5.7.24-log
-- Версия PHP: 7.2.21
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARAC... | true |
d76a2b5e1b2a6980547c44f0da533ee2649ddbdf | SQL | schakravarti930/AddressBookDB | /UC13-AggregateFunctionOnMultipleTables.sql | UTF-8 | 295 | 3.71875 | 4 | [] | no_license | SELECT * FROM contact INNER JOIN Contact_Type type
on contact.First_name = type.First_name;
--Count Contact By Type
select type.contact_type,COUNT(contact.First_name) as Total_Count
FROM contact INNER JOIN contact_type type
ON contact.First_name = type.First_name
GROUP BY type.contact_type;
| true |
8bd2d360db82286b79c474ae53c22e639d74e49c | SQL | 16rw/pas_php | /pas_php.sql | UTF-8 | 4,715 | 2.875 | 3 | [] | no_license | -- MySQL dump 10.11
--
-- Host: localhost Database: pas_php
-- ------------------------------------------------------
-- Server version 5.5.53
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=... | true |
e916d9af4af6cbf00211ca6c13105e0ad6cc9947 | SQL | kongyew/gpdb | /src/test/tinc/tincrepo/mpp/gpdb/tests/storage/filerep_end_to_end/sync2/sql/sync2_alter_table_inherit_noinherit.sql | UTF-8 | 10,295 | 2.890625 | 3 | [
"Apache-2.0",
"LicenseRef-scancode-generic-cla",
"PostgreSQL",
"LicenseRef-scancode-other-copyleft",
"metamail",
"BSD-3-Clause",
"LicenseRef-scancode-openssl",
"LicenseRef-scancode-other-permissive",
"ISC",
"Python-2.0",
"bzip2-1.0.6",
"LicenseRef-scancode-ssleay-windows",
"LicenseRef-scanco... | permissive | -- start_ignore
SET gp_create_table_random_default_distribution=off;
-- end_ignore
--
-- SYNC2 ALTER TABLE INHERIT & NOINHERIT
--
--
--
-- HEAP TABLE
--
--
CREATE TABLE sync2_heap_parent_table1 (
text_col text,
bigint_col bigint,
char_vary_col character varying(30),
numeric_col numeric
) DISTRIBUTED RANDOMLY;
i... | true |
a56426410f200a7a454fa62c00237de13e8f4fec | SQL | morigo2015/pmon | /sql/import polygon.sql | UTF-8 | 435 | 2.59375 | 3 | [] | no_license | use mysql;
-- create table twostr (str1 varchar(80), str2 varchar(80) );
-- create table poly (fname varchar(80), x1 int, y1 int, x2 int, y2 int, x3 int, y3 int, x4 int, y4 int);
show global variables like 'local_infile';
set global local_infile='ON';
delete from poly;
load data local infile '/home/im/mypy/vint/src/... | true |
8eb8a7af13f2db6d4a4d56773f0f04c73d816cb9 | SQL | adityaltts/HackerRank | /SQL/Aggregation/Weather Observation Station 16.sql | UTF-8 | 63 | 2.8125 | 3 | [] | no_license | SELECT Round(min(LAT_N),4) FROM STATION
WHERE LAT_N > 38.7780; | true |
0bc2a71f8a0fa115756d8af50e4f0572a9fb66bc | SQL | Vitra-Veri-Bilimi-Bootcamp/YoncaYeprem | /Week1-PatikaSql/Hw-1.sql | UTF-8 | 1,039 | 3.921875 | 4 | [] | no_license | -- 1. Film tablosunda bulunan title ve description sütunlarındaki verileri sıralayınız.
SELECT title,description FROM film;
-- 2. Film tablosunda bulunan tüm sütunlardaki verileri film uzunluğu (length) 60 dan büyük VE 75 ten küçük olma koşullarıyla sıralayınız.
SELECT * FROM film
WHERE length > 60 AND length... | true |
d0880aa6ff554adcba171c4a9d8652b3d90e69c0 | SQL | hartmutmeyer/LK15 | /38_JavaSQL_Wiederholung/werkstatt.sql | UTF-8 | 2,019 | 3.40625 | 3 | [] | no_license | DROP SCHEMA IF EXISTS werkstatt;
CREATE SCHEMA werkstatt DEFAULT CHARACTER SET utf8;
USE werkstatt;
CREATE TABLE kunde (
kundennr INT,
vorname VARCHAR(20) NOT NULL,
nachname VARCHAR(20) NOT NULL,
telefonnr VARCHAR(20) NOT NULL,
adresse VARCHAR(30) NOT NULL,
PRIMARY KEY (kundennr)
);
INSERT IN... | true |
ad2929d2989c1b2b7e1a41428752ef08b7f68fc9 | SQL | ozzy80/bookstore | /bookstore/etc/db/baza.sql | UTF-8 | 13,289 | 3.46875 | 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 kn... | true |
7c2fa5ebc73f9acd823a72d3f0d4e687a7eebaac | SQL | danang44/AlanCreative | /Nomor 6a.sql | UTF-8 | 2,557 | 3.25 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Sep 08, 2020 at 07:10 PM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.2.27
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... | true |
72e4e3d6d99817323a3db4492de73f34c2f9a56f | SQL | Ktobias/DatabaseManagementFall2014 | /lab5.sql | UTF-8 | 2,017 | 4.5 | 4 | [] | no_license | -- Kimberly Tobias
-- Lab 5
-- Due October 10
-- 1. Get the cities of agents booking an order for customer "Tiptop". This time use joins; no sub-queries.
select distinct agents.city
from customers, agents, orders
where customers.cid = orders.cid
AND agents.aid = orders.aid
AND customers.name = 'Tiptop'
order by ... | true |
60b8a7ac0f190bed089229ce77dced474c00410c | SQL | JayDub21/SQL | /views/creatingViews.sql | UTF-8 | 656 | 3.96875 | 4 | [] | no_license | -- SELECT * FROM sql_invoicing;
-- Create a view to see the balance for each client
-- Join that view to a table including client_id,
-- name and balance owed
-- USE sql_invoicing;
CREATE OR REPLACE VIEW clients_balance AS
SELECT
c.client_id,
c.name,
SUM(invoice_total - payment_total) AS balacne
FROM clien... | true |
25500bef6e5cda72040e97b8619ec9782b9219dc | SQL | rcfigueiras/abp_25_entregaFinal | /pinchoges_v9/current_project/pinchoges.sql | UTF-8 | 14,390 | 3.3125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.0.6deb1
-- http://www.phpmyadmin.net
--
-- Servidor: localhost
-- Tiempo de generación: 02-01-2015 a las 12:38:16
-- Versión del servidor: 5.5.37-0ubuntu0.13.10.1
-- Versión de PHP: 5.5.3-1ubuntu2.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
-- Initialize the... | true |
f4c3c593d0e263262fdd6f5720aede3e39e83a16 | SQL | kerrykato/SQL-Scripts | /Default Draws - Flattened (cte).sql | UTF-8 | 1,921 | 4.03125 | 4 | [] | no_license |
;with cte
as (
select 1 as dw
, a.AcctCode, p.PubShortName
, CASE DrawWeekday when 1 then dd.DrawAmount
else null end as [SUN]
, CASE DrawWeekday when 2 then dd.DrawAmount
else null end as [MON]
, CASE DrawWeekday when 3 then dd.DrawAmount
else null end as [TUE]
, CASE DrawWeekday when 4 then ... | true |
dc778978c4779465fcaf965b174b3c3c1587e1ff | SQL | dlawogus/BINBANG | /php/binbang.sql | UTF-8 | 3,065 | 3.46875 | 3 | [] | no_license |
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
CREATE TABLE IF NOT EXISTS `binbang` (
`_id` int(11) unsigned NOT NULL AUTO_INCREMENT, #1. 시퀀스
`building_id` int(11) unsigned NULL, #건
`building_hosu` varchar(100) NULL, #3. 호수
`sangse_juso` varchar(50) NULL, #7. 상세주소
`deposit` varchar(50) NU... | true |
af67c829ea5b6addb9f38eb29aa033ed433732a3 | SQL | bitgittry/BaseCodeAnalysis | /trunk/dbv/stored_routines/ReserveFundsTypeTwoLotto.sql | UTF-8 | 44,281 | 3.453125 | 3 | [] | no_license | DROP procedure IF EXISTS `ReserveFundsTypeTwoLotto`;
DELIMITER $$
CREATE DEFINER=`bit8_admin`@`127.0.0.1` PROCEDURE `ReserveFundsTypeTwoLotto`(
couponID BIGINT, sessionID BIGINT, ignoreSessionExpiry TINYINT(1), realMoneyOnly TINYINT(1), OUT statusCode INT)
root:BEGIN
-- Not securing bonus
-- Added gaming_game_p... | true |
b9ad996ecfca15beb4efea2f57a697f8a09ead93 | SQL | checksams/serenepayroll | /get_payroll_employees.sql | UTF-8 | 480 | 2.984375 | 3 | [] | no_license | DROP PROCEDURE IF EXISTS `get_payroll_employees`;
DELIMITER $$
CREATE DEFINER=`root`@`localhost` PROCEDURE `get_payroll_employees`(v_pr_code int)
begin
SELECT `emp_code`, `emp_sht_desc`, `emp_surname`, `emp_other_names`,
`emp_contract_date`, `emp_join_date`, `emp_id_no`,
`emp_nssf_no`, `emp_pin_no`, `emp_nhif_no... | true |
a1dbac9774d7cacd88f9ab8672e73cd3abc69a56 | SQL | silence-do-good/stress-test-Postgres-and-MySQL | /dump/high/day23/select0935.sql | UTF-8 | 177 | 2.609375 | 3 | [] | no_license |
SELECT timeStamp, temperature FROM ThermometerOBSERVATION o
WHERE timestamp>'2017-11-22T09:35:00Z' AND timestamp<'2017-11-23T09:35:00Z' AND temperature>=0 AND temperature<=12
| true |
0d63588c9ae58b35acac8b7639344fbf5bb7ce40 | SQL | igciez/ProgramacionIII | /Modelo-SP/tablas.sql | UTF-8 | 4,321 | 3.046875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.1
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 18-11-2019 a las 23:39:58
-- Versión del servidor: 10.4.8-MariaDB
-- Versión de PHP: 7.3.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
... | true |
be8ea9c5a4ff665fd5315b918bb978f5239e653b | SQL | batego/db_fintra | /selectrik/opav/Tables/opav.accion_programacion.sql | UTF-8 | 1,585 | 3.828125 | 4 | [] | no_license | -- Table: opav.accion_programacion
-- DROP TABLE opav.accion_programacion;
CREATE TABLE opav.accion_programacion
(
id_accion character varying(12) NOT NULL,
id_actividad integer NOT NULL,
responsable character varying(20), -- responsable de la actividad
peso integer, -- peso de la actividad dentro de... | true |
38335269db7287a244e5f9c1f2fbc50ca6f61908 | SQL | RolandRFuchs92/dewey-decimal-app | /src/db/sql/deweySystemScripts/summary3/dewey_summary_3_900.sql | UTF-8 | 3,309 | 2.578125 | 3 | [] | no_license | INSERT INTO dewey_summary_3 (summary_3_id, summary_2_id, name)
VALUES (901,900,'Philosophy and theory of history'),
(902,900,'Miscellany of history'),
(903,900,'Dictionaries & encyclopedias'),
(904,900,'Collected accounts of events'),
(905,900,'Serial publications of history'),
(906,900,'Organizations & management'),
(... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.