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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
3f7bf026040474fafe23e95c0a82b90410ed305a | SQL | progmax/PHPAuth-2.0 | /database/MySQL.sql | UTF-8 | 3,097 | 3.453125 | 3 | [] | no_license | SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
--
-- Database: `phpauth2.0`
--
-- --------------------------------------------------------
--
-- Table structure for table `activations`
--
CREATE TABLE IF NOT EXISTS `activations` (
`uid` int(11) NOT NULL,
`activekey` varchar(20) COLLATE utf8_bin NOT NULL,
`expiredate` datetime NOT NULL,
KEY `activekey` (`activekey`),
KEY `uid` (`uid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
-- --------------------------------------------------------
--
-- Table structure for table `attempts`
--
CREATE TABLE IF NOT EXISTS `attempts` (
`ip` varchar(39) COLLATE utf8_bin NOT NULL,
`count` int(11) NOT NULL,
`expiredate` datetime NOT NULL,
KEY `ip` (`ip`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
-- --------------------------------------------------------
--
-- Table structure for table `log`
--
CREATE TABLE IF NOT EXISTS `log` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`username` varchar(30) COLLATE utf8_bin NOT NULL DEFAULT 'UNKNOWN' COMMENT 'Username or UID',
`action` varchar(100) COLLATE utf8_bin NOT NULL,
`info` varchar(1000) COLLATE utf8_bin NOT NULL DEFAULT 'None provided',
`ip` varchar(39) COLLATE utf8_bin NOT NULL DEFAULT '0.0.0.0',
`date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- Table structure for table `resets`
--
CREATE TABLE IF NOT EXISTS `resets` (
`uid` int(11) NOT NULL,
`resetkey` varchar(20) COLLATE utf8_bin NOT NULL,
`expiredate` datetime NOT NULL,
KEY `uid` (`uid`),
KEY `resetkey` (`resetkey`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
-- --------------------------------------------------------
--
-- Table structure for table `sessions`
--
CREATE TABLE IF NOT EXISTS `sessions` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uid` int(11) NOT NULL,
`hash` varchar(40) COLLATE utf8_bin NOT NULL,
`expiredate` datetime NOT NULL,
`ip` varchar(39) COLLATE utf8_bin NOT NULL,
`agent` varchar(200) COLLATE utf8_bin NOT NULL,
`cookie_crc` varchar(40) COLLATE utf8_bin NOT NULL,
`lang` char(2) COLLATE utf8_bin NOT NULL,
PRIMARY KEY (`id`),
KEY `hash` (`hash`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- Table structure for table `users`
--
CREATE TABLE IF NOT EXISTS `users` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`username` varchar(30) COLLATE utf8_bin NOT NULL,
`password` varchar(128) COLLATE utf8_bin NOT NULL,
`email` varchar(100) COLLATE utf8_bin NOT NULL,
`salt` varchar(20) COLLATE utf8_bin NOT NULL,
`lang` char(2) COLLATE utf8_bin NOT NULL DEFAULT 'en',
`isactive` tinyint(1) NOT NULL DEFAULT '0',
`level` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `email` (`email`),
KEY `username` (`username`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin AUTO_INCREMENT=1 ;
| true |
5a83c8cee45ed1817d0f31a15c0db8794f0134e9 | SQL | fandashtic/arc_chennai | /Sivabalan-SQL/SQL_STORED_PROCEDURE/sp_Get_ReconcileTax.sql | UTF-8 | 191 | 2.84375 | 3 | [] | no_license | Create Procedure sp_Get_ReconcileTax (@TaxRate Decimal(18,6))
As
Begin
Select Max(Tax_Code) Tax_Code From Tax Where isnull(Percentage,0) = @TaxRate and isnull(GSTFlag,0) = 0
End
| true |
5995bfb48522e12afec637d2d4dd1fb72fe5bc04 | SQL | Diegoferreiradev/Oracle_PL-SQL | /Capítulo 13/Secao_21.sql | UTF-8 | 3,904 | 4.21875 | 4 | [] | no_license | --
CREATE OR REPLACE FUNCTION CONSULTA_PRECO
(pCod_Curso NUMBER) RETURN NUMBER
AS
vValor NUMBER;
BEGIN
SELECT valor INTO vValor FROM TCurso
WHERE cod_curso = pCod_Curso;
RETURN(vValor);
END;
/
--Teste | Usando function
DECLARE
vCod NUMBER := &codigo;
vValor NUMBER;
BEGIN
vValor := consulta_preco(vCod);
Dbms_Output.Put_Line('Preco do curso: '||vValor);
END;
--Conectado como System
GRANT CREATE ANY TYPE TO MARCIO;
--Registro - Array
DROP TYPE TABLE_REG_ALUNO;
CREATE OR REPLACE TYPE REG_ALUNO AS OBJECT
( CODIGO INTEGER,
NOME VARCHAR2(30),
CIDADE VARCHAR(30) );
--Matriz
CREATE OR REPLACE TYPE TABLE_REG_ALUNO AS TABLE OF REG_ALUNO;
-- Array
[0][1][2][3][4]
-- Matriz
[0][1][2][3][4]
[1][1][2][3][4]
[2][][][][]
--Function que retorna registros
CREATE OR REPLACE FUNCTION GET_ALUNO(pCODIGO NUMBER)
RETURN TABLE_REG_ALUNO PIPELINED
IS
outLista REG_ALUNO;
CURSOR CSQL IS
SELECT ALU.COD_ALUNO, ALU.NOME, ALU.CIDADE
FROM TALUNO ALU
WHERE ALU.COD_ALUNO = pCODIGO;
REG CSQL%ROWTYPE;
BEGIN
OPEN CSQL;
FETCH CSQL INTO REG;
outLista := REG_ALUNO(REG.COD_ALUNO, REG.NOME, REG.CIDADE);
PIPE ROW(outLista); --Escreve a linha
CLOSE CSQL;
RETURN;
END;
--usando
SELECT * FROM TABLE(GET_ALUNO(1));
--Usando
SELECT ALU.*, CON.total
FROM TABLE(GET_ALUNO(1)) ALU, TCONTRATO CON
WHERE CON.COD_ALUNO = ALU.CODIGO
CREATE OR REPLACE FUNCTION GET_ALUNOS
RETURN TABLE_REG_ALUNO PIPELINED
IS
outLista REG_ALUNO;
CURSOR CSQL IS
SELECT COD_ALUNO, NOME, CIDADE FROM TALUNO;
REG CSQL%ROWTYPE;
BEGIN
FOR REG IN CSQL
LOOP ----------.......
outLista := REG_ALUNO(REG.COD_ALUNO,REG.NOME,REG.CIDADE);
PIPE ROW(outLista);
END LOOP; ------........
RETURN;
END;
--Usando
SELECT * FROM TABLE(GET_ALUNOS);
1) Criar uma FUNCTION que retorne o valor total de contrato
por aluno (receber como parametro o codigo do aluno)
Cod_Aluno, NomeAluno, TotalContrato
(Retorna somente 1 linha)
usando cursor
SELECT ALU.COD_ALUNO, ALU.NOME, Sum(CON.TOTAL) TOTAL
FROM TCONTRATO CON, TALUNO ALU
WHERE CON.COD_ALUNO = ALU.COD_ALUNO
AND ALU.COD_ALUNO = pCodigo
GROUP BY ALU.COD_ALUNO, ALU.NOME;
2) Criar uma FUNCTION que retorne
NomeAluno, DataContrato, TotalContrato
( Usar FOR LOOP )
CREATE OR REPLACE TYPE REG_TOTALALUNO AS OBJECT
( COD_ALUNO INTEGER,
NOME VARCHAR2(30),
TOTAL NUMERIC(8,2) );
--Matriz
CREATE OR REPLACE TYPE TABLE_REG_TOTALALUNO AS
TABLE OF REG_TOTALALUNO;
--Function que retorna registros
CREATE OR REPLACE FUNCTION GET_TOTALALUNO(PCODIGO NUMBER)
RETURN TABLE_REG_TOTALALUNO PIPELINED
IS
outLista REG_TOTALALUNO;
CURSOR CSQL IS
SELECT ALU.COD_ALUNO, ALU.NOME, Sum(CON.TOTAL) TOTAL
FROM TCONTRATO CON, TALUNO ALU
WHERE CON.COD_ALUNO = ALU.COD_ALUNO AND ALU.COD_ALUNO=PCODIGO
GROUP BY ALU.COD_ALUNO, ALU.NOME;
REG CSQL%ROWTYPE;
BEGIN
OPEN CSQL;
FETCH CSQL INTO REG;
outLista:=REG_TOTALALUNO(REG.COD_ALUNO, REG.NOME, REG.TOTAL);
PIPE ROW(outLista);
CLOSE CSQL;
RETURN;
END;
SELECT * FROM TABLE(GET_TOTALALUNO(1));
2) Criar uma FUNCTION que retorne
Cod_Contrato, Data, NomeAluno, Total
( Usar FOR LOOP )
DROP TYPE TABLE_REG_LISTAALUNO;
CREATE OR REPLACE TYPE REG_LISTAALUNO AS OBJECT
( DATA DATE, NOME VARCHAR(20), TOTAL NUMERIC(8,2) );
--Matriz
CREATE OR REPLACE TYPE TABLE_REG_LISTAALUNO AS
TABLE OF REG_LISTAALUNO;
CREATE OR REPLACE FUNCTION GET_LISTAALUNO
RETURN TABLE_REG_LISTAALUNO PIPELINED
IS
outLista REG_LISTAALUNO;
CURSOR CSQL IS
SELECT Trunc(CON.DATA) DATA, ALU.NOME, Sum(CON.TOTAL) TOTAL
FROM TALUNO ALU, TCONTRATO CON
WHERE CON.COD_ALUNO = ALU.COD_ALUNO
GROUP BY Trunc(CON.DATA), ALU.NOME;
REG CSQL%ROWTYPE;
BEGIN
FOR REG IN CSQL
LOOP ----------.......
outLista := REG_LISTAALUNO(REG.DATA,REG.NOME, REG.TOTAL);
PIPE ROW(outLista);
END LOOP; ------........
RETURN;
END;
SELECT * FROM TABLE(GET_LISTAALUNO);
| true |
89eb078b309f0ddb36319e1b92089c210e0372a2 | SQL | zdergatchev/Database-Basic | /08 Data Agregation Exercises/05. Deposits Sum.sql | UTF-8 | 162 | 2.78125 | 3 | [
"MIT"
] | permissive | USE `gringotts`;
SELECT `deposit_group`, SUM(w.`deposit_amount`) AS 'total_sum'
FROM `wizzard_deposits` AS w
GROUP BY w.`deposit_group`
ORDER BY `total_sum` ASC; | true |
5683fa63a50ca1c21a65f8fe58750ce680c7255d | SQL | ua-eas/ksd-kc5.2.1-foundation | /src/main/config/sql/log/Release_2_0_logs/KCIRB-408.sql | UTF-8 | 542 | 3.0625 | 3 | [] | no_license | ALTER TABLE QUESTION RENAME COLUMN ANSWER_DATA_TYPE TO QUESTION_TYPE_ID;
ALTER TABLE QUESTION MODIFY QUESTION_TYPE_ID NUMBER(12,0);
CREATE OR REPLACE VIEW OSP$QUESTION AS SELECT
A.QUESTION_ID,
A.QUESTION,
A.MAX_ANSWERS,
A.VALID_ANSWER,
A.LOOKUP_NAME,
B.QUESTION_TYPE_NAME AS ANSWER_DATA_TYPE,
A.ANSWER_MAX_LENGTH,
A.LOOKUP_GUI,
A.UPDATE_TIMESTAMP,
A.UPDATE_USER,
A.GROUP_TYPE_CODE
FROM QUESTION A,
QUESTION_TYPES B
WHERE A.QUESTION_TYPE_ID = B.QUESTION_TYPE_ID;
| true |
9c53555ef1a0d32ea5c08154ae3dacbfb56c9f11 | SQL | MarianoFrancisco/prac1progra2 | /Manuales/Manual Técnico/practica1progra2.sql | UTF-8 | 3,806 | 3.65625 | 4 | [] | no_license | CREATE DATABASE practica1Progra2;
CREATE USER 'muebleria'@'localhost' IDENTIFIED BY 'Mueble12345';
GRANT USAGE,INSERT,DELETE,UPDATE,SELECT ON practica1progra2.* TO 'muebleria'@'localhost';
USE practica1Progra2;
CREATE TABLE usuario(
nombre_usuario VARCHAR(45) NOT NULL,
contraseña VARCHAR(12) NOT NULL,
tipo INT NOT NULL,
CONSTRAINT PK_USUARIO PRIMARY KEY(nombre_usuario)
);
CREATE TABLE mueble(
nombre_mueble VARCHAR(35) NOT NULL,
precio DOUBLE NOT NULL,
CONSTRAINT PK_MUEBLE PRIMARY KEY(nombre_mueble)
);
CREATE TABLE pieza(
tipo_pieza VARCHAR(35) NOT NULL,
costo DOUBLE NOT NULL,
cantidad INT,
CONSTRAINT PK_PIEZA PRIMARY KEY(tipo_pieza)
);
CREATE TABLE ensamblar(
numero_ensamble INT NOT NULL AUTO_INCREMENT,
nombre_mueble VARCHAR(35) NOT NULL,
nombre_usuario VARCHAR(45) NOT NULL,
precio DOUBLE,
fecha DATE NOT NULL,
CONSTRAINT PK_ENSAMBLAR PRIMARY KEY(numero_ensamble),
CONSTRAINT FK_TO_USUARIO FOREIGN KEY(nombre_usuario) REFERENCES usuario(nombre_usuario),
CONSTRAINT FK_TO_MUEBLE FOREIGN KEY(nombre_mueble) REFERENCES mueble(nombre_mueble)
);
CREATE TABLE ensamble(
numero_asignacion INT NOT NULL AUTO_INCREMENT,
nombre_mueble VARCHAR(35) NOT NULL,
tipo_pieza VARCHAR(35) NOT NULL,
cantidad INT,
CONSTRAINT PK_ENSAMBLE PRIMARY KEY(numero_asignacion),
CONSTRAINT FK_TO_MUEBLE2 FOREIGN KEY(nombre_mueble) REFERENCES mueble(nombre_mueble),
CONSTRAINT FK_TO_PIEZA1 FOREIGN KEY(tipo_pieza) REFERENCES pieza(tipo_pieza)
);
CREATE TABLE cliente(
nit VARCHAR(12) NOT NULL,
nombre_cliente VARCHAR(45),
direccion_cliente VARCHAR(35),
municipio VARCHAR(35),
departamento VARCHAR(35),
CONSTRAINT PK_CLIENTE PRIMARY KEY(nit)
);
CREATE TABLE mueble_venta(
numero_mueble INT NOT NULL AUTO_INCREMENT,
nombre_mueble_venta VARCHAR(35) ,
precio_venta DOUBLE,
CONSTRAINT PK_MUEBLE PRIMARY KEY(numero_mueble)
);
CREATE TABLE factura(
numero_factura INT NOT NULL AUTO_INCREMENT,
nombre_usuario VARCHAR(45) NOT NULL,
nombre_mueble VARCHAR(35) NOT NULL,
nit VARCHAR(12) NOT NULL,
cantidad INT NOT NULL,
total_pago DOUBLE NOT NULL,
fecha DATE,
CONSTRAINT PK_FACTURA PRIMARY KEY(numero_factura),
CONSTRAINT FK_TO_USUARIO2 FOREIGN KEY(nombre_usuario) REFERENCES usuario(nombre_usuario),
CONSTRAINT FK_TO_MUEBLE3 FOREIGN KEY(nombre_mueble) REFERENCES mueble(nombre_mueble),
CONSTRAINT FK_TO_CLIENTE FOREIGN KEY(nit) REFERENCES cliente(nit)
);
CREATE TABLE devolucion(
numero_devolucion INT NOT NULL AUTO_INCREMENT,
numero_factura INT NOT NULL,
nombre_mueble VARCHAR(35) NOT NULL,
nit VARCHAR(12) NOT NULL,
fecha_devolucion DATE NOT NULL,
CONSTRAINT PK_DEVOLUCION PRIMARY KEY(numero_devolucion),
CONSTRAINT FK_TO_FACTURA FOREIGN KEY(numero_factura) REFERENCES factura(numero_factura),
CONSTRAINT FK_TO_MUEBLE4 FOREIGN KEY(nombre_mueble) REFERENCES mueble(nombre_mueble),
CONSTRAINT FK_TO_CLIENTE2 FOREIGN KEY(nit) REFERENCES cliente(nit)
);
CREATE TABLE ganancia(
numero_accion INT NOT NULL AUTO_INCREMENT,
nombre_usuario VARCHAR(45) NOT NULL,
numero_factura INT NOT NULL,
numero_devolucion INT NOT NULL,
nombre_mueble VARCHAR(35) NOT NULL,
nit VARCHAR(12) NOT NULL,
dinero DOUBLE,
CONSTRAINT PK_GANANCIA PRIMARY KEY(numero_accion),
CONSTRAINT FK_TO_USUARIO3 FOREIGN KEY(nombre_usuario) REFERENCES usuario(nombre_usuario),
CONSTRAINT FK_TO_FACTURA2 FOREIGN KEY(numero_factura) REFERENCES factura(numero_factura),
CONSTRAINT FK_TO_DEVOLUCION FOREIGN KEY(numero_devolucion) REFERENCES devolucion(numero_devolucion),
CONSTRAINT FK_TO_MUEBLE5 FOREIGN KEY(nombre_mueble) REFERENCES mueble(nombre_mueble),
CONSTRAINT FK_TO_CLIENTE3 FOREIGN KEY(nit) REFERENCES cliente(nit)
); | true |
180da46d75e06694397bf759386314950354918a | SQL | Kaushal-99/Student-Registration-portal | /database/student_registration (1).sql | UTF-8 | 7,989 | 2.9375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Sep 22, 2019 at 04:02 PM
-- Server version: 10.3.16-MariaDB
-- PHP Version: 7.1.30
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Database: `student_registration`
--
-- --------------------------------------------------------
--
-- Table structure for table `admission_type`
--
CREATE TABLE `admission_type` (
`roll` varchar(40) NOT NULL,
`receipt_type` varchar(30) NOT NULL,
`applysch` varchar(3) DEFAULT '',
`appid` varchar(30) DEFAULT NULL,
`appstatus` varchar(10) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `admission_type`
--
INSERT INTO `admission_type` (`roll`, `receipt_type`, `applysch`, `appid`, `appstatus`) VALUES
('17IT1012', 'Regular', 'No', '', ''),
('17IT1020', 'Regular', 'Yes', '21554564', 'Aproved'),
('sdfsd', 'sdsds', 'No', 'sdsds', 'sdsd');
-- --------------------------------------------------------
--
-- Table structure for table `approval`
--
CREATE TABLE `approval` (
`roll` varchar(40) NOT NULL,
`hod` text DEFAULT NULL,
`CC` text DEFAULT NULL,
`stud_section` text DEFAULT NULL,
`final_status` text DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `approval`
--
INSERT INTO `approval` (`roll`, `hod`, `CC`, `stud_section`, `final_status`) VALUES
('17IT1012', 'Ashish', 'Varsha', 'ss', 'approved'),
('17IT1020', 'Ashish', 'Varsha', 'ss', 'approved');
-- --------------------------------------------------------
--
-- Table structure for table `cc`
--
CREATE TABLE `cc` (
`id` int(11) NOT NULL,
`name` varchar(30) NOT NULL,
`department` varchar(30) NOT NULL,
`division` varchar(30) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `cc`
--
INSERT INTO `cc` (`id`, `name`, `department`, `division`) VALUES
(1, 'Varsha', 'IT', 'A'),
(2, 'Sunita', 'CS', 'A');
-- --------------------------------------------------------
--
-- Table structure for table `documents`
--
CREATE TABLE `documents` (
`id` int(11) NOT NULL,
`name` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table `documents_submitted`
--
CREATE TABLE `documents_submitted` (
`roll` varchar(40) NOT NULL,
`name` text NOT NULL,
`doc_url` varchar(140) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `documents_submitted`
--
INSERT INTO `documents_submitted` (`roll`, `name`, `doc_url`) VALUES
('17IT1012', 'Marksheet-Sem 2', '../uploadedfiles/17IT1012+254110_mrok_drzewa_tory_kolejowe_mgla.jpg'),
('17IT1012', 'Marksheet-Sem 1', '../uploadedfiles/17IT1012+7.jpg'),
('17IT1020', 'Marksheet-Sem 2', '../uploadedfiles/17IT1020+254110_mrok_drzewa_tory_kolejowe_mgla.jpg'),
('17IT1020', 'Marksheet-Sem 1', '../uploadedfiles/17IT1020+7.jpg'),
('17IT1020', 'Hall Ticket', '../uploadedfiles/17IT1020+bd75aeb10ee4c1d1767758aabd76853f.jpg'),
('17IT1020', 'Caste Validity Certificate', '../uploadedfiles/17IT1020+belle-gold-dress-emma-watson-beauty-and-the-beast-1.jpg');
-- --------------------------------------------------------
--
-- Table structure for table `form`
--
CREATE TABLE `form` (
`id` varchar(50) NOT NULL,
`roll` varchar(10) NOT NULL,
`sem` varchar(10) NOT NULL,
`seat_no` varchar(30) NOT NULL,
`month_year` varchar(30) NOT NULL,
`pointer` decimal(10,0) NOT NULL,
`kt` int(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `form`
--
INSERT INTO `form` (`id`, `roll`, `sem`, `seat_no`, `month_year`, `pointer`, `kt`) VALUES
('17IT1012+1001', '17IT1012', '1', '1001', '2018-01', '9', 0),
('17IT1012+1002', '17IT1012', '2', '1002', '2018-05', '8', 0),
('17IT1012+1003', '17IT1012', '3', '1003', '2019-01', '8', 0),
('17IT1012+1004', '17IT1012', '4', '1004', '2019-05', '8', 0),
('17IT1020+2001', '17IT1020', '1', '2001', '2018-01', '9', 0),
('17IT1020+2002', '17IT1020', '2', '2002', '2018-11', '8', 0),
('17IT1020+2003', '17IT1020', '3', '2003', '2019-09', '8', 0),
('17IT1020+2004', '17IT1020', '4', '2004', '2019-12', '7', 0);
-- --------------------------------------------------------
--
-- Table structure for table `hod`
--
CREATE TABLE `hod` (
`username` varchar(30) NOT NULL,
`department` varchar(30) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `hod`
--
INSERT INTO `hod` (`username`, `department`) VALUES
('Leena', 'CS'),
('Ashish', 'IT');
-- --------------------------------------------------------
--
-- Table structure for table `login`
--
CREATE TABLE `login` (
`username` varchar(256) NOT NULL,
`password` varchar(256) NOT NULL,
`type` varchar(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `login`
--
INSERT INTO `login` (`username`, `password`, `type`) VALUES
('17IT1012', '123', 'STUDENT'),
('17IT1020', '123', 'STUDENT'),
('Ashish', '123', 'HOD'),
('Leena', '123', 'HOD'),
('ss', '123', 'SS'),
('Sunita', '123', 'CC'),
('Varsha', '123', 'CC');
-- --------------------------------------------------------
--
-- Table structure for table `student`
--
CREATE TABLE `student` (
`roll` varchar(40) NOT NULL,
`name` varchar(30) NOT NULL,
`sem` int(10) NOT NULL,
`year` varchar(2) NOT NULL,
`email` varchar(30) NOT NULL,
`division` varchar(1) NOT NULL,
`batch` varchar(2) NOT NULL,
`department` varchar(30) NOT NULL,
`caste` varchar(30) NOT NULL,
`admission_type` varchar(30) NOT NULL,
`photo` varchar(30) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `student`
--
INSERT INTO `student` (`roll`, `name`, `sem`, `year`, `email`, `division`, `batch`, `department`, `caste`, `admission_type`, `photo`) VALUES
('17IT1012', 'Kaushal Chande', 5, 'TE', 'chandekaushal@gmail.com', 'A', 'A2', 'IT', 'OPEN', 'Regular', 'kaushal.jpg'),
('17IT1020', 'Makarand Madhavi', 5, 'TE', 'makarandmadhavi99@gmail.com', 'A', 'A2', 'IT', 'OBC', 'Regular', 'makarand.png');
-- --------------------------------------------------------
--
-- Table structure for table `student_section`
--
CREATE TABLE `student_section` (
`id` varchar(40) NOT NULL,
`name` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Indexes for dumped tables
--
--
-- Indexes for table `admission_type`
--
ALTER TABLE `admission_type`
ADD PRIMARY KEY (`roll`);
--
-- Indexes for table `approval`
--
ALTER TABLE `approval`
ADD PRIMARY KEY (`roll`);
--
-- Indexes for table `cc`
--
ALTER TABLE `cc`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `documents`
--
ALTER TABLE `documents`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `documents_submitted`
--
ALTER TABLE `documents_submitted`
ADD UNIQUE KEY `doc_url` (`doc_url`);
--
-- Indexes for table `form`
--
ALTER TABLE `form`
ADD UNIQUE KEY `id` (`id`);
--
-- Indexes for table `hod`
--
ALTER TABLE `hod`
ADD PRIMARY KEY (`department`);
--
-- Indexes for table `login`
--
ALTER TABLE `login`
ADD PRIMARY KEY (`username`);
--
-- Indexes for table `student`
--
ALTER TABLE `student`
ADD PRIMARY KEY (`roll`);
--
-- Indexes for table `student_section`
--
ALTER TABLE `student_section`
ADD PRIMARY KEY (`id`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `cc`
--
ALTER TABLE `cc`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
--
-- AUTO_INCREMENT for table `documents`
--
ALTER TABLE `documents`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
COMMIT;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
| true |
9135bae921148734f53b94e7d6fa582aafd2fbcd | SQL | JustAnotherUserLoL/LBD | /Práctica 6/QueryPract6.sql | UTF-8 | 2,138 | 3.65625 | 4 | [] | no_license | use Practica6;
select * from Arenas order by idArena;
select * from Artistas order by idArtista;
select Arenas.idArena, Arenas.Arena, Artistas.idArtista, Artistas.ArtistaBanda
from Arenas
inner join Artistas on Arenas.idArena = Artistas.idArtista
order by idArena;
select Precios.idPrecio, Precios.idArtista, Artistas.idArtista
from Precios
inner join Artistas on Precios.idArtista = Artistas.idArtista;
select Precios.idPrecio, Precios.idArtista, Artistas.idArtista
from Precios
left join Artistas on Precios.idArtista = Artistas.idArtista;
select Precios.idPrecio, Precios.idArtista, Artistas.idArtista
from Precios
right join Artistas on Precios.idArtista = Artistas.idArtista;
select Precios.idPrecio, Precios.idArtista, Artistas.idArtista
from Precios
full join Artistas on Precios.idArtista = Artistas.idArtista;
select Boletos.idArtista, Artistas.idArtista, Artistas.ArtistaBanda
from Artistas
inner join Boletos on Artistas.idArtista = Boletos.idArtista;
select Boletos.idArtista, Artistas.idArtista, Artistas.ArtistaBanda
from Artistas
left join Boletos on Artistas.idArtista = Boletos.idArtista;
select Boletos.idArtista, Artistas.idArtista, Artistas.ArtistaBanda
from Artistas
right join Boletos on Artistas.idArtista = Boletos.idArtista;
select Boletos.idArtista, Artistas.idArtista, Artistas.ArtistaBanda
from Artistas
full join Boletos on Artistas.idArtista = Boletos.idArtista;
select Boletos.idCliente, Clientes.idCliente, Clientes.NombreCliente
from Clientes
inner join Boletos on Clientes.idCliente = Boletos.idCliente;
select * from Boletos, Artistas
where (Boletos.idArtista = Artistas.idArtista)
order by idArena;
select ArtistaBanda
from Artistas
where idArtista = any (select idArtista from Boletos where idArtista > 3);
select * from Clientes;
select * from Arenas;
select * from Boletos;
select * from Artistas;
with boletin as (select * from Boletos)
select * from boletin where ventas > 4;
select Boletos.ventas, Artistas.ArtistaBanda, Boletos.idArtista
into VentasPerArt
from Boletos
right join Artistas on Boletos.idArtista = Artistas.idArtista
where ventas > '7';
select * from VentasPerArt; | true |
1022a10178b3af882ac7aa5b996ee9b3421fd4b6 | SQL | ProgRB/SalProject | /AddRetention/Queries/Distribution/SelectOrderForReplace.sql | UTF-8 | 480 | 3.171875 | 3 | [] | no_license | declare
begin
open :c1 for select distinct order_id, order_name from salary.salary_addition join {0}.orders using (order_id) where calc_date=trunc(:p_date,'month')
order by order_name;
open :c2 for select order_id, order_name||case when order_book_id is not null then '(книга заказов)' end order_name from apstaff.orders
left join {0}.orders_book using (order_id)
where order_name not like '000%'
order by order_name;
end;
| true |
b23428acc795422a048337ec8c2b72dae386c9bd | SQL | marate/myjavarepo | /norris_data.sql | UTF-8 | 1,285 | 3.234375 | 3 | [] | no_license | DROP TABLE IF EXISTS Quotes,Authors;
CREATE TABLE IF NOT EXISTS Authors(Id INT PRIMARY KEY AUTO_INCREMENT,
Name VARCHAR(25)) ENGINE=InnoDB;
CREATE TABLE IF NOT EXISTS Quotes(Id INT PRIMARY KEY AUTO_INCREMENT,
AUTHORId INT, Quote VARCHAR(100),
FOREIGN KEY(AuthorId) REFERENCES Authors(Id) ON DELETE CASCADE)
ENGINE=InnoDB;
INSERT INTO Authors(Id, Name) VALUES(1, 'Bruce Lee');
INSERT INTO Authors(Id, Name) VALUES(2, 'Mr Miyagi');
INSERT INTO Authors(Id, Name) VALUES(3, 'Rocky Balboa');
INSERT INTO Authors(Id, Name) VALUES(4, 'Christie Brinkley');
INSERT INTO Authors(Id, Name) VALUES(5, 'Peter Griffen');
INSERT INTO Quotes(Id, AuthorId, Quote) VALUES(1, 1, 'I am Babs');
INSERT INTO Quotes(Id, AuthorId, Quote) VALUES(2, 1, 'I am Lingoji');
INSERT INTO Quotes(Id, AuthorId, Quote) VALUES(3, 2, 'I am DBA');
INSERT INTO Quotes(Id, AuthorId, Quote) VALUES(4, 2, 'I am Engineer');
INSERT INTO Quotes(Id, AuthorId, Quote) VALUES(5, 3, 'I am Doctor');
INSERT INTO Quotes(Id, AuthorId, Quote) VALUES(6, 4, 'I am Nurse');
INSERT INTO Quotes(Id, AuthorId, Quote) VALUES(7, 4, 'I am Teacher');
INSERT INTO Quotes(Id, AuthorId, Quote) VALUES(8, 5, 'I am Banker');
INSERT INTO Quotes(Id, AuthorId, Quote) VALUES(9, 5, 'I am Actor');
| true |
8065c03c525c5509519ebe31c00aa5e2875e323b | SQL | iclavijos/msdb | /src/main/resources/db/migration/V0_20__Series_champions.sql | UTF-8 | 921 | 3.421875 | 3 | [] | no_license | CREATE TABLE `msdb`.`series_drivers_champions` (
`driver_id` BIGINT(20) NULL,
`series_edition_id` BIGINT(20) NULL,
INDEX `fk_driver_champion_idx` (`driver_id` ASC),
INDEX `fk_series_edition_champions_idx` (`series_edition_id` ASC),
CONSTRAINT `fk_driver_champion`
FOREIGN KEY (`driver_id`)
REFERENCES `msdb`.`driver` (`id`)
ON DELETE NO ACTION
ON UPDATE NO ACTION,
CONSTRAINT `fk_series_edition_champions`
FOREIGN KEY (`series_edition_id`)
REFERENCES `msdb`.`series_edition` (`id`)
ON DELETE NO ACTION
ON UPDATE NO ACTION);
ALTER TABLE `msdb`.`series_edition`
ADD COLUMN `team_champion_id` BIGINT(20) NULL AFTER `multidriver`,
ADD INDEX `fk_team_champion_idx` (`team_champion_id` ASC);
ALTER TABLE `msdb`.`series_edition`
ADD CONSTRAINT `fk_team_champion`
FOREIGN KEY (`team_champion_id`)
REFERENCES `msdb`.`team` (`id`)
ON DELETE NO ACTION
ON UPDATE NO ACTION;
| true |
4d3eaa5dd6cee35f0f86a37ac3e4777659828385 | SQL | lasanamilton/familyreunion | /src/sql/dump-familyreunion-202003240711.sql | UTF-8 | 6,912 | 2.96875 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 5.5.62, for Win64 (AMD64)
--
-- Host: 127.0.0.1 Database: familyreunion
-- ------------------------------------------------------
-- Server version 5.7.29-0ubuntu0.18.04.1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT = @@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS = @@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION = @@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE = @@TIME_ZONE */;
/*!40103 SET TIME_ZONE = '+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS = @@UNIQUE_CHECKS, UNIQUE_CHECKS = 0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS = @@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS = 0 */;
/*!40101 SET @OLD_SQL_MODE = @@SQL_MODE, SQL_MODE = 'NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES = @@SQL_NOTES, SQL_NOTES = 0 */;
--
-- Table structure for table `addressbook`
--
DROP TABLE IF EXISTS `addressbook`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `addressbook`
(
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`lastname` varchar(50) DEFAULT NULL,
`firstname` varchar(50) DEFAULT NULL,
`streetaddress` varchar(255) DEFAULT NULL,
`city` varchar(255) DEFAULT NULL,
`state` varchar(255) DEFAULT NULL,
`country` varchar(255) DEFAULT NULL,
`zipcode` varchar(10) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE = InnoDB
AUTO_INCREMENT = 9
DEFAULT CHARSET = latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `addressbook`
--
LOCK TABLES `addressbook` WRITE;
/*!40000 ALTER TABLE `addressbook`
DISABLE KEYS */;
INSERT INTO `addressbook`
VALUES (2, 'milton', 'chappox', '100 fake street', 'columbus', 'oh', 'USA', '43081'),
(3, 'Milton', 'Lasana', '5744 Buenos Aires Blvd', 'Westerville', 'OH', 'USA', '43081'),
(4, 'Parker', 'Milton', '5744 Buenos Aires Blvd', 'Westerville', 'OH', 'USA', '43081'),
(5, 'Ramadhani', 'Aseri', '100 fake st', 'Westerville', 'Ohio', 'United States', '43081'),
(6, 'Takenawa', 'Trisha', '400 Burche Road', 'Wester', 'OH', 'USA', '42091'),
(7, 'Falcon', 'Captain', '100 Falcon Ln', 'Falcon', 'PU', 'NCH', '12345'),
(8, 'Character', 'Lucas', '980 Some Game', 'Cant', 'Remember', 'ATAL', '09434');
/*!40000 ALTER TABLE `addressbook`
ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `login`
--
DROP TABLE IF EXISTS `login`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `login`
(
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`username` varchar(50) DEFAULT '',
`password` varchar(255) DEFAULT NULL,
`email` varchar(255) DEFAULT NULL,
`lastlogin` varchar(50) DEFAULT NULL,
`lastip` varchar(13) DEFAULT NULL,
`level` int(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE = InnoDB
AUTO_INCREMENT = 19
DEFAULT CHARSET = latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `login`
--
LOCK TABLES `login` WRITE;
/*!40000 ALTER TABLE `login`
DISABLE KEYS */;
INSERT INTO `login`
VALUES (1, 'chappo', 'milton', 'chappo@teamhierro.com', '12/6/19', '192.168.0.31', 1),
(14, 'lasana', '218b9828acd159d713484c4e37eaf3b4', 'lasana@milton.com', 'December 9, 2019, 12:04 pm',
'192.168.0.4', 1),
(15, 'Hamachi', 'milton', 'hamachi@milton.com', '2020-03-20 14:29:10.783', '127.0.0.1', 0),
(16, 'test', 'test123', 'test@test.com', '2020-03-20 14:54:02.476', '127.0.0.1', 0),
(17, 'test1', 'test123', 'test1@test.com', '2020-03-20 14:55:29.043', '127.0.0.1', 0),
(18, 'test2', 'milton', 'test2@test.com', '2020-03-20 14:58:45.59', '127.0.0.1', 0);
/*!40000 ALTER TABLE `login`
ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `logindetails`
--
DROP TABLE IF EXISTS `logindetails`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `logindetails`
(
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`loginid` int(11) DEFAULT NULL,
`addressbookid` int(11) DEFAULT NULL,
`birthday` varchar(50) DEFAULT '',
`phonenumber` varchar(20) DEFAULT NULL,
`email` varchar(255) DEFAULT NULL,
`funfact` longtext,
PRIMARY KEY (`id`)
) ENGINE = InnoDB
DEFAULT CHARSET = latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `logindetails`
--
LOCK TABLES `logindetails` WRITE;
/*!40000 ALTER TABLE `logindetails`
DISABLE KEYS */;
/*!40000 ALTER TABLE `logindetails`
ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `polls`
--
DROP TABLE IF EXISTS `polls`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `polls`
(
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`pollheader` text,
`polltext` longtext,
`numberofvotes` int(11) DEFAULT NULL,
`datestart` date DEFAULT NULL,
`dateend` date DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE = InnoDB
DEFAULT CHARSET = latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `polls`
--
LOCK TABLES `polls` WRITE;
/*!40000 ALTER TABLE `polls`
DISABLE KEYS */;
/*!40000 ALTER TABLE `polls`
ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `pollsresults`
--
DROP TABLE IF EXISTS `pollsresults`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `pollsresults`
(
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`pollsid` int(11) DEFAULT NULL,
`loginid` int(11) DEFAULT NULL,
`voteoption` varchar(255) DEFAULT NULL,
`votedate` date DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE = InnoDB
DEFAULT CHARSET = latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `pollsresults`
--
LOCK TABLES `pollsresults` WRITE;
/*!40000 ALTER TABLE `pollsresults`
DISABLE KEYS */;
/*!40000 ALTER TABLE `pollsresults`
ENABLE KEYS */;
UNLOCK TABLES;
--
-- Dumping routines for database 'familyreunion'
--
/*!40103 SET TIME_ZONE = @OLD_TIME_ZONE */;
/*!40101 SET SQL_MODE = @OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS = @OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS = @OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT = @OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS = @OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION = @OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES = @OLD_SQL_NOTES */;
-- Dump completed on 2020-03-24 7:11:24
| true |
148498ecc51bd8b9b7051e3f6b77184183c56699 | SQL | RafaelAPB/firefly | /db/migrations/ql/000011_create_events_table.up.sql | UTF-8 | 260 | 2.78125 | 3 | [
"Apache-2.0"
] | permissive | CREATE TABLE events (
id string NOT NULL,
etype string NOT NULL,
namespace string NOT NULL,
ref string,
created int64 NOT NULL
);
CREATE UNIQUE INDEX events_primary ON events(id);
| true |
930be32f02d196ef2aed70b734930354addb56e4 | SQL | jxrlee/Swap | /SwapDB/swap_db_script.sql | UTF-8 | 917 | 3.5625 | 4 | [] | no_license | CREATE TABLE users (
phone VARCHAR( 10 ) NOT NULL ,
premium BIT NOT NULL ,
startdate DATETIME ,
CONSTRAINT pk_users PRIMARY KEY ( phone )
) engine=InnoDB;
CREATE TABLE items (
id INT NOT NULL AUTO_INCREMENT,
title VARCHAR( 50 ) NOT NULL ,
price FLOAT NOT NULL ,
description VARCHAR( 255 ) NOT NULL ,
date DATETIME DEFAULT CURRENT_TIMESTAMP ,
featured BIT ,
rating TINYINT ,
location VARCHAR( 50 ) ,
available BIT ,
sellerid VARCHAR( 10 ) NOT NULL ,
CONSTRAINT pk_items PRIMARY KEY ( id )
) engine=InnoDB;
CREATE INDEX idx_items ON items ( sellerid );
ALTER TABLE items ADD CONSTRAINT fk_items_users FOREIGN KEY ( sellerid ) REFERENCES users( phone ) ON DELETE CASCADE ON UPDATE NO ACTION;
| true |
2aaca8df543d2bbc0817fbd0bfa517435ff4af65 | SQL | Didikabdul1997/uksmkmh2019 | /smkmh08/uksmkmh_08.sql | UTF-8 | 5,302 | 3.21875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Apr 10, 2019 at 02:55 AM
-- Server version: 10.1.32-MariaDB
-- PHP Version: 7.2.5
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Database: `uksmkmh`
--
CREATE DATABASE IF NOT EXISTS `uksmkmh_08` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;
USE `uksmkmh_08`;
-- --------------------------------------------------------
--
-- Table structure for table `barang`
--
CREATE TABLE `barang` (
`id_barang` int(5) NOT NULL,
`nama` varchar(20) NOT NULL,
`harga` varchar(15) NOT NULL,
`tgl_pembelian` varchar(15) NOT NULL,
`jumlah_stok` int(20) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `barang`
--
INSERT INTO `barang` (`id_barang`, `nama`, `harga`, `tgl_pembelian`, `jumlah_stok`) VALUES
(1, 'baju', '40.000', '2015-08-13', 4),
(2, 'hijab', '30.000', '2018-06-20', 4),
(3, 'mukna', '150.000', '2018-04-02', 5),
(14, 'sarung', '100.000', '2019-12-09', 4),
(15, 'baju anak', '75.000', '2017-07-17', 5),
(18, 'baju koko', '90.000', '2019-12-15', 3),
(19, 'baju ', '60.000', '2018-03-16', 5),
(20, 'kopyah', '40.000', '2019-10-22', 5),
(25, 'mukna', '150.000', '2018-04-02', 5);
-- --------------------------------------------------------
--
-- Table structure for table `karyawan`
--
CREATE TABLE `karyawan` (
`id` int(15) NOT NULL,
`nama` varchar(20) NOT NULL,
`alamat` varchar(20) NOT NULL,
`kelamin` varchar(15) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `karyawan`
--
INSERT INTO `karyawan` (`id`, `nama`, `alamat`, `kelamin`) VALUES
(1, 'Iska Nura', 'Jakarta', 'Perempuan'),
(2, 'Hikari Aiza', 'Parengan Tuban', 'Perempuan'),
(3, 'Jovin Jenaro', 'Surabaya', 'Laki-laki'),
(4, 'Rafiz ramadhan', 'Bojonegoro', 'laki-laki'),
(5, 'Izha putri', 'bandung', 'perempuan');
-- --------------------------------------------------------
--
-- Table structure for table `pembeli`
--
CREATE TABLE `pembeli` (
`id` int(10) NOT NULL,
`nama_pembeli` varchar(20) NOT NULL,
`alamat` varchar(20) NOT NULL,
`barang` varchar(10) NOT NULL,
`jumlah_barang` int(15) NOT NULL,
`harga` int(15) NOT NULL,
`total` int(15) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `pembeli`
--
INSERT INTO `pembeli` (`id`, `nama_pembeli`, `alamat`, `barang`, `jumlah_barang`, `harga`, `total`) VALUES
(1, 'Sika Rahma', 'jakarta', 'baju koko', 1, 100000, 100000),
(2, 'Rafiz Muhammad', 'Bandung', 'sarung', 1, 110000, 110000),
(3, 'Elisa', 'Bojonegoro', 'hijab', 1, 35000, 35000),
(4, 'riko', 'bojonegoro', 'baju koko', 1, 100000, 100000),
(5, 'iska', 'karang', 'baju', 1, 45000, 45000);
-- --------------------------------------------------------
--
-- Table structure for table `siswa`
--
CREATE TABLE `siswa` (
`nisn` varchar(99) NOT NULL,
`nama` varchar(99) NOT NULL,
`ttl` varchar(99) NOT NULL,
`alamat` varchar(99) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `siswa`
--
INSERT INTO `siswa` (`nisn`, `nama`, `ttl`, `alamat`) VALUES
('001', 'Didik Abdul Mukmin', 'Tuban, 30 Juli 1997', 'Kumpulrejo - Parengan - Tuban'),
('002', 'Abdul Mukmin', 'Bojonegoro, 22 April 1998', 'Sukorejo - Bojonegoro'),
('003', 'Mukmin Abdul', 'Tuban, 12 Agustus 1998', 'Sugihwaras - Parengan - Tuban');
-- --------------------------------------------------------
--
-- Table structure for table `user`
--
CREATE TABLE `user` (
`id_user` int(11) NOT NULL,
`username` varchar(33) NOT NULL,
`password` varchar(33) NOT NULL,
`nama` varchar(99) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `user`
--
INSERT INTO `user` (`id_user`, `username`, `password`, `nama`) VALUES
(1, 'smkmh08', 'smkmh08', 'Izka Nuraeni');
--
-- Indexes for dumped tables
--
--
-- Indexes for table `barang`
--
ALTER TABLE `barang`
ADD PRIMARY KEY (`id_barang`);
--
-- Indexes for table `karyawan`
--
ALTER TABLE `karyawan`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `pembeli`
--
ALTER TABLE `pembeli`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `siswa`
--
ALTER TABLE `siswa`
ADD PRIMARY KEY (`nisn`);
--
-- Indexes for table `user`
--
ALTER TABLE `user`
ADD PRIMARY KEY (`id_user`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `barang`
--
ALTER TABLE `barang`
MODIFY `id_barang` int(5) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=26;
--
-- AUTO_INCREMENT for table `karyawan`
--
ALTER TABLE `karyawan`
MODIFY `id` int(15) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;
--
-- AUTO_INCREMENT for table `pembeli`
--
ALTER TABLE `pembeli`
MODIFY `id` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;
--
-- AUTO_INCREMENT for table `user`
--
ALTER TABLE `user`
MODIFY `id_user` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
COMMIT;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
| true |
0f625762354c8b21a2e14180eacb1ff76e672ec2 | SQL | RAJALAKSHMIRAJKUMAR/EI | /ALL DOMAIN SP/EXPENSE/BIZ DAILY/SP_BIZDLY_HOUSEKEEPING_PAYMENT_UPDATE_VER_0.5_28022014.sql | UTF-8 | 1,944 | 3.59375 | 4 | [] | no_license | -->version 0.5 -->start date:28/02/2014 end date:28/02/2014 -->issueno:754 --commentno:#36 --> DESC:CHANGING THE DATATYPE AND THE VALUE OF USERSTAMP DONE BY: BHAVANI.R
-->version 0.4 -->start date:27/02/2014 end date:27/02/2014 -->issueno:754 --> repalce userstamp varchar to integer-->by: BALAJI.R
-->version 0.3 -->start date:26/02/2014 end date:26/02/2014 -->issueno:750 -->description:UPDATING USERSTAMP TO ULD_ID -->created by:SAFI.M
-->version 0.2 -->start date:18/02/2014 end date:18/02/2014 -->issueno:749 commentno:#33 -->description:implement flag for success message -->created by:ABDUL KADER.M
--version 0.1 --startdate:09/11/2013 --endate:11/11/2013 --desc:SP FOR EXPENSE_HOUSEKEEPING_PAYMENT_UPDATE --doneby:dinesh
DROP PROCEDURE IF EXISTS SP_BIZDLY_HOUSEKEEPING_PAYMENT_UPDATE;
CREATE PROCEDURE SP_BIZDLY_HOUSEKEEPING_PAYMENT_UPDATE
(IN ID INTEGER(10),
IN UNIT_NUMBER SMALLINT(4),
IN FOR_PERIOD DATE ,
IN PAID_DATE DATE ,
IN AMOUNT DECIMAL(7,2) ,
IN COMMENTS TEXT ,
IN USERSTAMP VARCHAR(50),
OUT BHP_FLAG INTEGER(10))
BEGIN
DECLARE USERSTAMP_ID INTEGER(2);
DECLARE EXIT HANDLER FOR SQLEXCEPTION
BEGIN
ROLLBACK;
END;
-- set null for non mandatory fields
START TRANSACTION;
SET BHP_FLAG=0;
CALL SP_CHANGE_USERSTAMP_AS_ULDID(USERSTAMP,@ULDID);
SET USERSTAMP_ID = (SELECT @ULDID);
IF COMMENTS = '' THEN
SET COMMENTS=NULL;
END IF;
-- UPDATE query for EXPENSE_HOUSEKEEPING_PAYMENT if passing UNIT_NUMBER is exists in EXPENSE_HOUSEKEEPING_UNIT table and UNIT table
IF (FOR_PERIOD IS NOT NULL AND PAID_DATE IS NOT NULL AND AMOUNT IS NOT NULL AND USERSTAMP IS NOT NULL) THEN
update EXPENSE_HOUSEKEEPING_PAYMENT set UNIT_ID =(SELECT UNIT_ID FROM UNIT WHERE UNIT_NO=UNIT_NUMBER),
EHKU_ID=(SELECT EHKU_ID FROM EXPENSE_HOUSEKEEPING_UNIT WHERE EHKU_UNIT_NO=UNIT_NUMBER),
EHKP_FOR_PERIOD= FOR_PERIOD,EHKP_PAID_DATE=PAID_DATE,EHKP_AMOUNT=AMOUNT,EHKP_COMMENTS=COMMENTS,ULD_ID=USERSTAMP_ID WHERE EHKP_ID=ID;
SET BHP_FLAG=1;
END IF;
COMMIT;
END ;
| true |
9590e273c8138428da8bbf21d38613271eecdce7 | SQL | silence-do-good/stress-test-Postgres-and-MySQL | /dump/high/day13/select0225.sql | UTF-8 | 178 | 2.6875 | 3 | [] | no_license |
SELECT timeStamp, temperature FROM ThermometerOBSERVATION o
WHERE timestamp>'2017-11-12T02:25:00Z' AND timestamp<'2017-11-13T02:25:00Z' AND temperature>=18 AND temperature<=97
| true |
48aca009501cacf38ff10edab2b7ac7306231a91 | SQL | gaku4138/minaji_19_04_kadai | /coffee_log/gs_db.sql | UTF-8 | 2,686 | 3.265625 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.2.11
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: 2018 年 3 月 09 日 14:48
-- サーバのバージョン: 5.6.21
-- PHP Version: 5.6.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
--
-- Database: `gs_db`
--
-- --------------------------------------------------------
--
-- テーブルの構造 `gs_an_table`
--
CREATE TABLE IF NOT EXISTS `gs_an_table` (
`id` int(12) NOT NULL,
`name` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
`email` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
`naiyou` text COLLATE utf8_unicode_ci,
`indate` datetime NOT NULL
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
--
-- テーブルのデータのダンプ `gs_an_table`
--
INSERT INTO `gs_an_table` (`id`, `name`, `email`, `naiyou`, `indate`) VALUES
(1, 'ジーズ次郎', 'test@test.test', 'test1', '2018-03-04 12:57:23');
-- --------------------------------------------------------
--
-- テーブルの構造 `gs_ec_table`
--
CREATE TABLE IF NOT EXISTS `gs_ec_table` (
`id` int(12) NOT NULL,
`name` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
`price` int(6) NOT NULL,
`text` text COLLATE utf8_unicode_ci,
`imagename` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
`datetime` datetime NOT NULL
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
--
-- テーブルのデータのダンプ `gs_ec_table`
--
INSERT INTO `gs_ec_table` (`id`, `name`, `price`, `text`, `imagename`, `datetime`) VALUES
(1, 'PHP本', 2200, '基盤を網羅した本', 'php,jpg', '2018-03-04 13:02:11'),
(2, 'JS本', 2000, '中級者以上が読む本', 'js.jpg', '2018-03-04 13:04:34');
--
-- Indexes for dumped tables
--
--
-- Indexes for table `gs_an_table`
--
ALTER TABLE `gs_an_table`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `gs_ec_table`
--
ALTER TABLE `gs_ec_table`
ADD PRIMARY KEY (`id`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `gs_an_table`
--
ALTER TABLE `gs_an_table`
MODIFY `id` int(12) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT for table `gs_ec_table`
--
ALTER TABLE `gs_ec_table`
MODIFY `id` int(12) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=3;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
| true |
2d86d848a86e7c93b5fb5f4034f34e6b026432f5 | SQL | githubwds/javaLearning | /javadatabase/deploy/sql/holiday_info.sql | UTF-8 | 1,047 | 2.71875 | 3 | [] | no_license | -- ----------------------------
-- Table structure for holiday_info
-- ----------------------------
DROP TABLE IF EXISTS `holiday_info`;
CREATE TABLE `holiday_info` (
`ID` varchar(32) NOT NULL,
`delflag` char(1) DEFAULT '0',
`create_date` datetime DEFAULT NULL,
`modify_date` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
`username` varchar(32) DEFAULT NULL,
`inputer` varchar(32) DEFAULT NULL,
`checker` varchar(32) DEFAULT NULL,
`sts` char(1) DEFAULT '0',
`country` varchar(3) DEFAULT NULL,
`market_type` varchar(16) DEFAULT NULL,
`holiday_date` date DEFAULT NULL,
`holiday_reason` varchar(32) DEFAULT NULL,
PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT;
INSERT INTO `holiday_info` VALUES ('1bj7i4demiegm', '0', '2015-12-25 16:09:01', '2015-12-25 16:09:16', 'alice', NULL, NULL, '0', 'CNY', 'CIB', '2018-4-1', '双休日');
INSERT INTO `holiday_info` VALUES ('1bj7i4fgeq6gn', '0', '2015-12-25 16:09:01', '2015-12-25 16:09:16', 'alice', NULL, NULL, '0', 'CNY', 'CIB', '2018-4-5', '清明节'); | true |
dd606591e6c5d63d615a815e2ebda2a478bfcae1 | SQL | hit-lacus/kylin | /src/kylin-it/src/test/resources/query/sql_join/sql_inner_join/query_00.sql | UTF-8 | 1,731 | 3.078125 | 3 | [
"Apache-2.0"
] | permissive | --
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you may not use this file except in compliance
-- with the License. You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
--
select sum(ITEM_COUNT) as ITEM_CNT
FROM TEST_KYLIN_FACT, TEST_ORDER, TEST_ACCOUNT as BUYER_ACCOUNT,
TEST_ACCOUNT as SELLER_ACCOUNT, EDW.TEST_CAL_DT as TEST_CAL_DT, TEST_CATEGORY_GROUPINGS,
EDW.TEST_SITES as TEST_SITES, EDW.TEST_SELLER_TYPE_DIM as TEST_SELLER_TYPE_DIM,
TEST_COUNTRY as BUYER_COUNTRY, TEST_COUNTRY as SELLER_COUNTRY
where TEST_KYLIN_FACT.ORDER_ID = TEST_ORDER.ORDER_ID
AND TEST_ORDER.BUYER_ID = BUYER_ACCOUNT.ACCOUNT_ID
AND TEST_KYLIN_FACT.SELLER_ID = SELLER_ACCOUNT.ACCOUNT_ID
AND TEST_KYLIN_FACT.CAL_DT = TEST_CAL_DT.CAL_DT
AND TEST_KYLIN_FACT.LEAF_CATEG_ID = TEST_CATEGORY_GROUPINGS.LEAF_CATEG_ID AND TEST_KYLIN_FACT.LSTG_SITE_ID = TEST_CATEGORY_GROUPINGS.SITE_ID
AND TEST_KYLIN_FACT.LSTG_SITE_ID = TEST_SITES.SITE_ID
AND TEST_KYLIN_FACT.SLR_SEGMENT_CD = TEST_SELLER_TYPE_DIM.SELLER_TYPE_CD
AND BUYER_ACCOUNT.ACCOUNT_COUNTRY = BUYER_COUNTRY.COUNTRY
AND SELLER_ACCOUNT.ACCOUNT_COUNTRY = SELLER_COUNTRY.COUNTRY | true |
42d8edc37dcfa397821fe1373765bd0c6a1adfef | SQL | NickCorcoran/platform-services-registry | /db/sql/V1.12__set_name_unique_profile_alter.sql | UTF-8 | 108 | 2.546875 | 3 | [
"Apache-2.0"
] | permissive | BEGIN TRANSACTION;
ALTER TABLE profile
ADD CONSTRAINT profile_name_unique UNIQUE (name);
END TRANSACTION;
| true |
f32790001d07c40182838e3a541266fd3bb74fe1 | SQL | s-darling/TestForLink | /EBXworkspace/Libraries/EBX Core/ebx_CD_5.4.0.0907-0001/ebx.software/files/ddl/SQL_Server/ddl15_HVM.4_newIn_5.2.7.sql | UTF-8 | 220 | 2.609375 | 3 | [] | no_license | CREATE TABLE EBX_HV_MERGE (
tx_id INTEGER NOT NULL ,
merged_home_id INTEGER NOT NULL ,
begin_time BIGINT NOT NULL ,
end_time BIGINT NOT NULL ,
CONSTRAINT EBX_HV_MERGE_PK PRIMARY KEY (tx_id, merged_home_id));
| true |
04f9a04be30e98ce861267afcff459d53bc20377 | SQL | 15TIA-PemrogramanFramework/Kuis2_Westy | /kuis_1086/kuis2_86.sql | UTF-8 | 2,868 | 3.046875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.6.4
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Dec 13, 2017 at 04:32 PM
-- Server version: 5.7.15-log
-- PHP Version: 5.6.26
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Database: `kuis2_86`
--
-- --------------------------------------------------------
--
-- Table structure for table `tbl_identitas_1086`
--
CREATE TABLE `tbl_identitas_1086` (
`id` bigint(20) NOT NULL,
`alamat` varchar(255) DEFAULT NULL,
`nama` varchar(100) NOT NULL,
`prodi` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `tbl_identitas_1086`
--
INSERT INTO `tbl_identitas_1086` (`id`, `alamat`, `nama`, `prodi`) VALUES
(7, 'Jl. Delima', 'Ade Sukma', 'Akuntansi'),
(8, 'Jl. Umban Saru', 'Dimcuu', 'TI');
-- --------------------------------------------------------
--
-- Table structure for table `tbl_ipk_1086`
--
CREATE TABLE `tbl_ipk_1086` (
`id` bigint(20) NOT NULL,
`batas_akhir` varchar(255) DEFAULT NULL,
`batas_awal` varchar(255) DEFAULT NULL,
`nilai` varchar(100) NOT NULL,
`identitas_1086_id` bigint(20) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `tbl_ipk_1086`
--
INSERT INTO `tbl_ipk_1086` (`id`, `batas_akhir`, `batas_awal`, `nilai`, `identitas_1086_id`) VALUES
(7, '3.25', '3.10', '3.10', 7),
(8, '3.30', '3.10', '3.20', 7),
(9, '3.10', '3.20', '3.30', 8);
--
-- Indexes for dumped tables
--
--
-- Indexes for table `tbl_identitas_1086`
--
ALTER TABLE `tbl_identitas_1086`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `UK_n6l612uusfwf6lt1cfhy0bqeq` (`nama`);
--
-- Indexes for table `tbl_ipk_1086`
--
ALTER TABLE `tbl_ipk_1086`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `UK_gdk7wlmrjlsyn5svgthk05243` (`nilai`),
ADD KEY `FKl9kbwfxc061g5kf6yg9v6jm0l` (`identitas_1086_id`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `tbl_identitas_1086`
--
ALTER TABLE `tbl_identitas_1086`
MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=12;
--
-- AUTO_INCREMENT for table `tbl_ipk_1086`
--
ALTER TABLE `tbl_ipk_1086`
MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10;
--
-- Constraints for dumped tables
--
--
-- Constraints for table `tbl_ipk_1086`
--
ALTER TABLE `tbl_ipk_1086`
ADD CONSTRAINT `FKl9kbwfxc061g5kf6yg9v6jm0l` FOREIGN KEY (`identitas_1086_id`) REFERENCES `tbl_identitas_1086` (`id`);
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
| true |
38878dad0f1217be099fbc6223cae01e405e04b3 | SQL | RafaelSdm/curso-de-banco-de-dados | /mysql/aula10.sql | UTF-8 | 282 | 3.125 | 3 | [
"MIT"
] | permissive | use cadastro;
describe gafanhotos;
alter table gafanhotos
add column cursopreferido int;
alter table gafanhotos
add foreign key(cursopreferido)
references cursos(idcurso);
select * from gafanhotos;
select * from cursos;
update gafanhotos
set cursopreferido = '6'
where id = '1'; | true |
3929840e1b9af1fd78dae8a6608ccdafe7d69773 | SQL | tristiyofamuji/mahasiswa | /mahasiswa.sql | UTF-8 | 3,272 | 3.421875 | 3 | [] | no_license | /*
Navicat Premium Data Transfer
Source Server : localhost
Source Server Type : MySQL
Source Server Version : 100137
Source Host : localhost:3306
Source Schema : mahasiswa
Target Server Type : MySQL
Target Server Version : 100137
File Encoding : 65001
Date: 10/01/2019 13:51:49
*/
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for admin
-- ----------------------------
DROP TABLE IF EXISTS `admin`;
CREATE TABLE `admin` (
`id_admin` int(11) NOT NULL AUTO_INCREMENT,
`nama_admin` varchar(200) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL,
`username` varchar(100) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL,
`password` varchar(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL,
PRIMARY KEY (`id_admin`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = latin1 COLLATE = latin1_swedish_ci ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for mahasiswa
-- ----------------------------
DROP TABLE IF EXISTS `mahasiswa`;
CREATE TABLE `mahasiswa` (
`id_mahasiswa` int(10) NOT NULL AUTO_INCREMENT,
`nama_mahasiswa` varchar(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL,
`nim` varchar(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL,
`jenis_kelamin` varchar(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL,
`alamat` varchar(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL,
PRIMARY KEY (`id_mahasiswa`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = latin1 COLLATE = latin1_swedish_ci ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for ortu
-- ----------------------------
DROP TABLE IF EXISTS `ortu`;
CREATE TABLE `ortu` (
`id_ortu` int(10) NOT NULL AUTO_INCREMENT,
`nama_ortu` varchar(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL,
`id_mahasiswa` int(10) NULL DEFAULT NULL,
PRIMARY KEY (`id_ortu`) USING BTREE,
INDEX `id_mahasiswa`(`id_mahasiswa`) USING BTREE,
CONSTRAINT `ortu_ibfk_1` FOREIGN KEY (`id_mahasiswa`) REFERENCES `mahasiswa` (`id_mahasiswa`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = latin1 COLLATE = latin1_swedish_ci ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for riwayat
-- ----------------------------
DROP TABLE IF EXISTS `riwayat`;
CREATE TABLE `riwayat` (
`id_riwayat` int(10) NOT NULL AUTO_INCREMENT,
`id_admin` int(10) NULL DEFAULT NULL,
`nama_tabel` varchar(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL,
`nama_variabel` varchar(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL,
`tgl_hapus` varchar(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL,
PRIMARY KEY (`id_riwayat`) USING BTREE,
INDEX `id_admin`(`id_admin`) USING BTREE,
CONSTRAINT `riwayat_ibfk_1` FOREIGN KEY (`id_admin`) REFERENCES `admin` (`id_admin`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = latin1 COLLATE = latin1_swedish_ci ROW_FORMAT = Compact;
SET FOREIGN_KEY_CHECKS = 1;
| true |
34e44299264c99a5406e11b7841d2d80e3af0666 | SQL | teng-liu/myDocuments | /db/tmp.sql | UTF-8 | 1,874 | 3.515625 | 4 | [] | no_license |
----create new user, uuid from front-end, insert user and its map to contract-group
with t_new_user as (
insert into public.user (uuid, name_key, content)
values ($1, $2, $3)
on conflict (uuid)
do update set name_key=$2, content=$3
returning uuid
),
t_new_rel as (
insert into public.rel_user_contractgroup (user_uuid, contractgroup_uuid)
select * from jsonb_to_recordset($4) as x
(user_uuid uuid, group_uuid uuid )
on conflict (user_uuid, contractgroup_uuid) do nothing
returning user_uuid
)
select * from t_new_user
union all
select * from t_new_user
;
with t_new_user as (
insert into public.user (uuid, name_key, content)
values ('d062e8dd-df42-4820-a709-4cb9ea1c546e', 'ttt', '{"head":{"nameCode":"ttt","password":"123","firstName":"ert","lastName":"ewrt","email":"dfg","phone":"23","role":"310afc3e-0030-4fe2-b60d-ee12ad5c7929"}}')
on conflict (uuid)
do update set name_key='ttt', content='{"head":{"nameCode":"ttt","password":"123","firstName":"ert","lastName":"ewrt","email":"dfg","phone":"23","role":"310afc3e-0030-4fe2-b60d-ee12ad5c7929"}}'
returning uuid
),
t_new_rel as (
insert into public.rel_user_contractgroup (user_uuid, contractgroup_uuid)
select * from jsonb_to_recordset('
[ { "user_uuid": "edbf9a09-64a6-4427-bc9f-304a2893fcab",
"group_uuid": "9ed11346-a831-4fcc-8fba-9ae302b2fc9e" },
{ "user_uuid": "edbf9a09-64a6-4427-bc9f-304a2893fcab",
"group_uuid": "4f28156c-8956-478a-a1a8-3efe56b2fdd6" },
{ "user_uuid": "edbf9a09-64a6-4427-bc9f-304a2893fcab",
"group_uuid": "3b706eb3-8d98-48cb-853e-b6201244375e" } ]') as x
(user_uuid uuid, group_uuid uuid )
on conflict (user_uuid, contractgroup_uuid) do nothing
returning user_uuid
)
select * from t_new_user
union all
select * from t_new_user
;
| true |
266b4fee61614c2fe6d670865fc45ac5435dad29 | SQL | tiffam/Tallify | /tables.sql | UTF-8 | 565 | 3.203125 | 3 | [] | no_license | CREATE TABLE IF NOT EXISTS users(
id SERIAL PRIMARY KEY,
name varchar(255) NOT NULL,
email varchar(255) NOT NULL,
password varchar(255) NOT NULL
);
CREATE TABLE IF NOT EXISTS vouchers(
id SERIAL PRIMARY KEY,
value INTEGER NOT NULL,
expiry_date DATE,
created_at DATE DEFAULT current_timestamp,
redeemed varchar(255),
remarks TEXT,
user_id INTEGER,
company_id INTEGER,
voucher_type TEXT
);
CREATE TABLE IF NOT EXISTS company (
id SERIAL PRIMARY KEY,
company_name varchar(255) NOT NULL,
company_image varchar(255) NOT NULL,
shop_listing TEXT
);
| true |
8ee1a8c62833415059640b46377a1ac1e57ff4e7 | SQL | ANAHUACSERUA/UFT2 | /Procedure/pwacrev.prc | ISO-8859-1 | 10,787 | 3.59375 | 4 | [] | no_license | DROP PROCEDURE BANINST1.PWACREV;
CREATE OR REPLACE PROCEDURE BANINST1.PWACREV IS
/*
Tarea : Copia los criterios de evaluacin del curso a los alumnos.
Esto debe hacerse por los lumnos que se inscribieron despues de haber sido
asignados los criterios de evaluacin.
Autor : GEPC
Fecha : 02/12/2010
*/
TYPE reg_Crn IS RECORD (Crnn SWRXLST.SWRXLST_CRN%TYPE,
Grup SWRXLST.SWRXLST_XLST_GROUP%TYPE,
Term SWRXLST.SWRXLST_TERM_CODE%TYPE
);
TYPE tableCrn IS TABLE OF reg_Crn INDEX BY BINARY_INTEGER;
tabCrn tableCrn;
vnExiste INTEGER := 0;
vnRow INTEGER := 0;
vsError VARCHAR2(4000) := NULL;
vsBreak VARCHAR2(10) := 'BKP01';
--P_JobCriterioEvaluacion(
csA CONSTANT VARCHAR2(1) := 'A';
csM CONSTANT VARCHAR2(1) := 'M';
csS CONSTANT VARCHAR2(1) := 'S';
csRE CONSTANT VARCHAR2(2) := 'RE';
csRW CONSTANT VARCHAR2(2) := 'RW';
csOE CONSTANT VARCHAR2(2) := 'OE';
cs201010 CONSTANT VARCHAR2(6) := '201010';
csFixReg CONSTANT VARCHAR2(7) := 'FIX_REG';
csESCALALC CONSTANT VARCHAR2(8) := 'ESCALALC';
cdSysDate CONSTANT DATE := SYSDATE;
CURSOR cuCriterioAlumno IS
SELECT SHRGCOM_TERM_CODE AS Term,
SHRGCOM_CRN AS Crnn,
SFRSTCR_PIDM AS Pidm,
SHRGCOM_ID AS Iddd,
SHRGCOM_DATE AS GcoD
FROM SHRGCOM,
SFRSTCR
WHERE SHRGCOM_TERM_CODE = SFRSTCR_TERM_CODE
AND SHRGCOM_CRN = SFRSTCR_CRN
AND NOT EXISTS (SELECT NULL
FROM SHRMRKS
WHERE SHRMRKS_GCOM_ID = SHRGCOM_ID
AND SHRMRKS_PIDM = SFRSTCR_PIDM
AND SHRMRKS_CRN = SFRSTCR_CRN
AND SHRMRKS_TERM_CODE = SFRSTCR_TERM_CODE
)
AND SFRSTCR_RSTS_CODE IN (csRE,csRW)
AND SHRGCOM_TERM_CODE >= cs201010;
-- Cursos simultaneos con status activo
-- que tienen alumnos inscritos
-- no tiene registrados los criterios de evaluacin
-- y el curso maestro tiene criterios de evaluacin
CURSOR cuSimul IS
SELECT A.SWRXLST_CRN AS Crnn,
A.SWRXLST_XLST_GROUP AS Grup,
A.SWRXLST_TERM_CODE AS Term
FROM (SELECT B.SWRXLST_CRN AS Crnn,
B.SWRXLST_XLST_GROUP AS Grup,
B.SWRXLST_TERM_CODE AS Term
FROM SWRXLST B, SHRGCOM C
WHERE C.SHRGCOM_TERM_CODE = B.SWRXLST_TERM_CODE
AND C.SHRGCOM_CRN = B.SWRXLST_CRN
AND B.SWRXLST_TYPE = csM
AND B.SWRXLST_TERM_CODE >= cs201010
) Maestro,
SWRXLST A
WHERE A.SWRXLST_XLST_GROUP = Maestro.Grup
AND A.SWRXLST_TERM_CODE = Maestro.Term
AND EXISTS (SELECT NULL
FROM SFRSTCR,
SSBSECT
WHERE SSBSECT_TERM_CODE = A.SWRXLST_TERM_CODE
AND SSBSECT_CRN = A.SWRXLST_CRN
AND SFRSTCR_TERM_CODE = SSBSECT_TERM_CODE
AND SFRSTCR_CRN = SSBSECT_CRN
AND SSBSECT_SSTS_CODE = csA
AND SFRSTCR_RSTS_CODE IN (csRE,csRW)
AND SSBSECT_TERM_CODE >= cs201010
)
AND NOT EXISTS (SELECT NULL
FROM SHRGCOM
WHERE SHRGCOM_TERM_CODE = A.SWRXLST_TERM_CODE
AND SHRGCOM_CRN = A.SWRXLST_CRN
AND SHRGCOM_TERM_CODE >= cs201010
)
AND SWRXLST_TYPE = csS
AND SWRXLST_TERM_CODE >= cs201010;
--obtine los cursos maestros por grupo y periodo
CURSOR cuMaestro(psTerm VARCHAR2,
psGrup VARCHAR2
) IS
SELECT SHRGCOM_NAME AS Name,
SHRGCOM_WEIGHT AS Weight,
SHRGCOM_TOTAL_SCORE AS Score,
SHRGCOM_INCL_IND AS incl,
SHRGCOM_DATE AS Daet,
SHRGCOM_SEQ_NO AS Seq,
SHRGCOM_DESCRIPTION AS Descr,
SHRGCOM_GRADE_SCALE AS Escala,
SHRGCOM_MIN_PASS_SCORE AS Minp,
SHRGCOM_TERM_CODE AS Term,
SHRGCOM_CRN AS Crn,
SHRGCOM_ID as gcomId
FROM SHRGCOM C,SWRXLST A
WHERE SHRGCOM_TERM_CODE = SWRXLST_TERM_CODE
AND SHRGCOM_CRN = SWRXLST_CRN
AND SWRXLST_TYPE = csM
AND SWRXLST_XLST_GROUP = psGrup
AND SWRXLST_TERM_CODE = psTerm;
CURSOR cuAlumnos(psTerm VARCHAR2,
psNrc VARCHAR2
) IS
SELECT SFRSTCR_PIDM AS Pidm
FROM SFRSTCR
WHERE SFRSTCR_RSTS_CODE IN (csRE,csRW)
AND SFRSTCR_CRN = psNrc
AND SFRSTCR_TERM_CODE = psTerm;
BEGIN
--Seguardan datos antes de procesar la informacin
FOR regSim IN cuSimul LOOP
vnRow := vnRow + 1;
tabCrn(vnRow).Crnn := regSim.Crnn;
tabCrn(vnRow).Grup := regSim.Grup;
tabCrn(vnRow).Term := regSim.Term;
END LOOP;
vsBreak := 'BKP02';
--sebuscan los criterios de evaluacin del curso maestro
FOR vnI IN 1..vnRow LOOP
-- se actualiza la escala de calificacin del curso simultaneo
BEGIN
UPDATE SSBSECT
SET SSBSECT_GSCH_NAME = csESCALALC
WHERE SSBSECT_TERM_CODE = tabCrn(vnI).Term
AND SSBSECT_CRN = tabCrn(vnI).Crnn;
EXCEPTION
WHEN OTHERS THEN
NULL;
END;
vsBreak := 'BKP03';
FOR regMast IN cuMaestro(tabCrn(vnI).Term, tabCrn(vnI).Grup) LOOP
vnExiste := 0;
-- se busca el criterio de evaluacin para ya no agregarlo
SELECT COUNT(1)
INTO vnExiste
FROM SHRGCOM
WHERE SHRGCOM_TERM_CODE = regMast.Term
AND SHRGCOM_CRN = tabCrn(vnI).Crnn --CRN sumultaneo
AND SHRGCOM_NAME = regMast.Name
AND SHRGCOM_SEQ_NO = regMast.Seq;
IF vnExiste = 0 THEN
BEGIN
INSERT INTO SHRGCOM
(
SHRGCOM_TERM_CODE, SHRGCOM_CRN, SHRGCOM_ID, SHRGCOM_NAME,
SHRGCOM_WEIGHT, SHRGCOM_TOTAL_SCORE, SHRGCOM_INCL_IND, SHRGCOM_DATE,
SHRGCOM_SEQ_NO, SHRGCOM_DESCRIPTION, SHRGCOM_GRADE_SCALE, SHRGCOM_MIN_PASS_SCORE
)
VALUES
(
regMast.Term, tabCrn(vnI).Crnn, regMast.gcomId, regMast.Name,
regMast.Weight, regMast.Score, regMast.Incl, regMast.Daet,
regMast.Seq, regMast.Descr, regMast.Escala, regMast.Minp
);
EXCEPTION
WHEN DUP_VAL_ON_INDEX THEN
NULL;
WHEN OTHERS THEN
NULL;
END;
vsBreak := 'BKP04';
--registra el componente a los alumnos del curso
FOR regAlu IN cuAlumnos(regMast.Term, tabCrn(vnI).Crnn) LOOP
BEGIN
INSERT INTO SHRMRKS
(
SHRMRKS_TERM_CODE, SHRMRKS_CRN, SHRMRKS_PIDM, SHRMRKS_GCOM_ID,
SHRMRKS_GCOM_DATE, SHRMRKS_GCHG_CODE
)
VALUES
(
regMast.Term, tabCrn(vnI).Crnn, regAlu.Pidm, regMast.gcomId,
TRUNC(cdSysDate), csOE
);
EXCEPTION
WHEN DUP_VAL_ON_INDEX THEN
NULL;
WHEN OTHERS THEN
NULL;
END;
END LOOP;
END IF;
vsBreak := 'BKP05';
END LOOP;
COMMIT;
END LOOP;
vsBreak := 'BKP06';
--introduce los criterios de evaluacin al laumno que se registro despues que profesor
--capturo los criterios de evaluacin
FOR regCrAl IN cuCriterioAlumno LOOP
NULL;
BEGIN
INSERT INTO SHRMRKS
(
SHRMRKS_TERM_CODE, SHRMRKS_CRN, SHRMRKS_PIDM,
SHRMRKS_GCOM_ID, SHRMRKS_ACTIVITY_DATE, SHRMRKS_USER_ID,
SHRMRKS_GCOM_DATE, SHRMRKS_GCHG_CODE
)
VALUES
(
regCrAl.Term, regCrAl.CRNn, regCrAl.Pidm,
regCrAl.IDdd, cdSysDate, csFixReg,
regCrAl.GcoD, csOE
);
EXCEPTION
WHEN DUP_VAL_ON_INDEX THEN
NULL;
WHEN OTHERS THEN
NULL;
END;
END LOOP;
COMMIT;
vsBreak := 'BKP07';
-- Se agrega el update para actualizar la escala de calificaciones a cursos que les hace falta
-- y por ese motivo no pueden rolarse a historia acadmica
UPDATE SSBSECT
SET SSBSECT_GSCH_NAME = csESCALALC
WHERE EXISTS (SELECT NULL
FROM SHRGCOM
WHERE SHRGCOM_TERM_CODE = SSBSECT_TERM_CODE
AND SHRGCOM_CRN = SSBSECT_CRN
AND SHRGCOM_TERM_CODE >= cs201010
)
AND SSBSECT_GSCH_NAME IS NULL
AND SSBSECT_TERM_CODE >= cs201010;
COMMIT;
EXCEPTION
WHEN OTHERS THEN
RAISE;
END PWACREV;
/
| true |
4dd5769d0ba27f223f9634ae0251b867d51b85ec | SQL | kets911/aut-java-lab-2018-pavel-katsuba | /task9/src/main/resources/create.sql | UTF-8 | 8,059 | 3.890625 | 4 | [] | no_license | create database library;
use library;
CREATE TABLE books (
idBook INT AUTO_INCREMENT PRIMARY KEY,
bookName VARCHAR(200) UNIQUE,
publishingDate DATE,
count INT(11) DEFAULT NULL,
isTaken BOOLEAN DEFAULT FALSE
);
CREATE TABLE genre (
idGenre INT AUTO_INCREMENT PRIMARY KEY,
genreName VARCHAR(200) UNIQUE
);
CREATE TABLE author (
idAuthor INT AUTO_INCREMENT PRIMARY KEY,
authorName VARCHAR(200) UNIQUE
);
CREATE TABLE authorsOfBooks (
idAuthorBook INT AUTO_INCREMENT PRIMARY KEY,
bookId INT,
authorId INT,
UNIQUE (bookId , authorId),
FOREIGN KEY (bookId)
REFERENCES books (idBook),
FOREIGN KEY (authorId)
REFERENCES author (idAuthor)
);
CREATE TABLE genresOfBooks (
idGenreBook INT AUTO_INCREMENT PRIMARY KEY,
bookId INT,
genreId INT,
UNIQUE (bookId , genreId),
FOREIGN KEY (bookId)
REFERENCES books (idBook),
FOREIGN KEY (genreId)
REFERENCES genre (idGenre)
);
CREATE TABLE readers (
idReader INT(11) NOT NULL AUTO_INCREMENT,
readerName VARCHAR(20) DEFAULT NULL,
passw VARCHAR(50) DEFAULT NULL,
accountNonExpired TINYINT(1) DEFAULT NULL,
accountNonLocked TINYINT(1) DEFAULT NULL,
credentialsNonExpired TINYINT(1) DEFAULT NULL,
enabled TINYINT(1) DEFAULT NULL,
PRIMARY KEY (idReader),
UNIQUE KEY readerName (readerName)
);
CREATE TABLE bookofreaders (
id INT(11) NOT NULL AUTO_INCREMENT,
readerId INT(11) DEFAULT NULL,
bookId INT(11) DEFAULT NULL,
PRIMARY KEY (id),
UNIQUE KEY readerId (readerId , bookId),
KEY bookId (bookId),
CONSTRAINT bookofreaders_ibfk_1 FOREIGN KEY (readerId)
REFERENCES readers (idreader),
CONSTRAINT bookofreaders_ibfk_2 FOREIGN KEY (bookId)
REFERENCES books (idbook)
);
CREATE TABLE roles (
idRole INT(11) NOT NULL AUTO_INCREMENT,
roleName VARCHAR(20) DEFAULT NULL,
PRIMARY KEY (idRole),
UNIQUE KEY roleName (roleName)
);
CREATE TABLE rolesreaders (
id INT(11) NOT NULL AUTO_INCREMENT,
readerId INT(11) DEFAULT NULL,
roleId INT(11) DEFAULT NULL,
PRIMARY KEY (id),
UNIQUE KEY readerId (readerId , roleId),
KEY roleId (roleId),
CONSTRAINT rolesreaders_ibfk_1 FOREIGN KEY (readerId)
REFERENCES readers (idreader),
CONSTRAINT rolesreaders_ibfk_2 FOREIGN KEY (roleId)
REFERENCES roles (idrole)
);
insert into genre (genreName) value ('fantastic');
insert into genre (genreName) values ('science');
insert into genre (genreName) values ('science-fantastic');
insert into genre (genreName) values ('adventure');
insert into genre (genreName) values ('roman');
insert into author (authorName) values ('Bloh');
insert into author (authorName) values ('Romanchick');
insert into author (authorName) values ('Blinov');
insert into author (authorName) values ('Eckel');
insert into author (authorName) values ('Perumov');
insert into author (authorName) values ('Lukhyanenko');
insert into books (bookName, publishingDate, count, isTaken) values ('Night watch', '2010.02.20', 3, false);
insert into books (bookName, publishingDate, count, isTaken) values ('Effective java', '2010.02.21', 3, false);
insert into books (bookName, publishingDate, count, isTaken) values ('Java enterprise development', '2000.02.20', 3, false);
insert into books (bookName, publishingDate, count, isTaken) values ('Programm Eckel', '21.02.2000', 3, false);
insert into books (bookName, publishingDate, count, isTaken) values ('Do not time for dragon', '1998.02.02', 3, false);
insert into authorsOfBooks (bookId, authorId) values ((Select idBook from books where bookName = 'Night watch'),
(Select idAuthor from author where authorName = 'Lukhyanenko'));
insert into authorsOfBooks (bookId, authorId) values ((Select idBook from books where bookName = 'Effective java'),
(Select idAuthor from author where authorName = 'Bloh'));
insert into authorsOfBooks (bookId, authorId) values ((Select idBook from books where bookName = 'Java enterprise development'),
(Select idAuthor from author where authorName = 'Blinov'));
insert into authorsOfBooks (bookId, authorId) values ((Select idBook from books where bookName = 'Java enterprise development'),
(Select idAuthor from author where authorName = 'Romanchick'));
insert into authorsOfBooks (bookId, authorId) values ((Select idBook from books where bookName = 'Programm Eckel'),
(Select idAuthor from author where authorName = 'Eckel'));
insert into authorsOfBooks (bookId, authorId) values ((Select idBook from books where bookName = 'Do not time for dragon'),
(Select idAuthor from author where authorName = 'Perumov'));
insert into authorsOfBooks (bookId, authorId) values ((Select idBook from books where bookName = 'Do not time for dragon'),
(Select idAuthor from author where authorName = 'Lukhyanenko'));
insert into genresOfBooks (bookId, genreId) values ((Select idBook from books where bookName = 'Night watch'),
(Select idGenre from genre where genreName = 'fantastic'));
insert into genresOfBooks (bookId, genreId) values ((Select idBook from books where bookName = 'Night watch'),
(Select idGenre from genre where genreName = 'roman'));
insert into genresOfBooks (bookId, genreId) values ((Select idBook from books where bookName = 'Night watch'),
(Select idGenre from genre where genreName = 'adventure'));
insert into genresOfBooks (bookId, genreId) values ((Select idBook from books where bookName = 'Effective java'),
(Select idGenre from genre where genreName = 'science'));
insert into genresOfBooks (bookId, genreId) values ((Select idBook from books where bookName = 'Java enterprise development'),
(Select idGenre from genre where genreName = 'science'));
insert into genresOfBooks (bookId, genreId) values ((Select idBook from books where bookName = 'Programm Eckel'),
(Select idGenre from genre where genreName = 'science'));
insert into genresOfBooks (bookId, genreId) values ((Select idBook from books where bookName = 'Do not time for dragon'),
(Select idGenre from genre where genreName = 'fantastic'));
| true |
0c7409f3749b433ffdac1bc7863b1743fd152aa6 | SQL | pop5798pop5798/Game | /樂透/windows/DBSchema/Oracle/OracleSQL.sql | UTF-8 | 4,708 | 3.375 | 3 | [] | no_license | CREATE TABLE FROM_CONFIG(
TRANSPORT_ID VARCHAR2(10),
TRANSPORT_PASSWORD VARCHAR2(45),
PARTY_ID VARCHAR2(10) NOT NULL,
PARTY_DESCRIPTION VARCHAR2(200),
ROUTING_ID VARCHAR2(39),
ROUTING_DESCRIPTION VARCHAR2(200),
SIGN_ID VARCHAR2(4),
SUBSTITUTE_PARTY_ID VARCHAR2(10),
CONSTRAINT FROM_CONFIG_PK1 PRIMARY KEY (PARTY_ID)
);
CREATE INDEX "FROM_CONFIG_INDEX1"
ON FROM_CONFIG
(SUBSTITUTE_PARTY_ID);
CREATE TABLE TURNKEY_TRANSPORT_CONFIG (
TRANSPORT_ID VARCHAR2(10) NOT NULL,
TRANSPORT_PASSWORD VARCHAR2(60) NOT NULL,
CONSTRAINT TURNKEY_TRANSPORT_CONFIG_PK1 PRIMARY KEY (TRANSPORT_ID)
);
CREATE TABLE TURNKEY_USER_PROFILE(
USER_ID VARCHAR2(10) NOT NULL,
USER_PASSWORD VARCHAR2(100) NOT NULL,
USER_ROLE VARCHAR2(2),
CONSTRAINT TURNKEY_USER_PROFILE_PK1 PRIMARY KEY (USER_ID)
);
INSERT INTO TURNKEY_USER_PROFILE (USER_ID,USER_PASSWORD,USER_ROLE) VALUES
('ADMIN','ADMIN','0');
CREATE TABLE SCHEDULE_CONFIG(
TASK VARCHAR2(30) NOT NULL,
ENABLE VARCHAR2(1),
SCHEDULE_TYPE VARCHAR2(10),
SCHEDULE_WEEK VARCHAR2(15),
SCHEDULE_TIME VARCHAR2(50),
SCHEDULE_PERIOD VARCHAR2(10),
SCHEDULE_RANGE VARCHAR2(15),
CONSTRAINT SCHEDULE_CONFIG_PK1 PRIMARY KEY (TASK)
);
CREATE TABLE SIGN_CONFIG (
SIGN_ID VARCHAR2(4) NOT NULL,
SIGN_TYPE VARCHAR2(10) DEFAULT NULL,
PFX_PATH VARCHAR2(100) DEFAULT NULL,
SIGN_PASSWORD VARCHAR2(60) DEFAULT NULL,
CONSTRAINT SIGN_CONFIG_PK1 PRIMARY KEY (SIGN_ID)
);
CREATE TABLE TASK_CONFIG(
CATEGORY_TYPE VARCHAR2(5) NOT NULL,
PROCESS_TYPE VARCHAR2(10) NOT NULL,
TASK VARCHAR2(15) NOT NULL,
SRC_PATH VARCHAR2(200),
TARGET_PATH VARCHAR2(200),
FILE_FORMAT VARCHAR2(20),
VERSION VARCHAR2(5),
ENCODING VARCHAR2(15),
TRANS_CHINESE_DATE VARCHAR2(1),
CONSTRAINT TASK_CONFIG_PK1 PRIMARY KEY (CATEGORY_TYPE, PROCESS_TYPE, TASK)
);
CREATE TABLE TO_CONFIG(
PARTY_ID VARCHAR2(10) NOT NULL,
PARTY_DESCRIPTION VARCHAR2(200),
ROUTING_ID VARCHAR2(39),
ROUTING_DESCRIPTION VARCHAR2(200),
FROM_PARTY_ID VARCHAR2(10),
CONSTRAINT TO_CONFIG_PK1 PRIMARY KEY (FROM_PARTY_ID, PARTY_ID)
);
CREATE TABLE TURNKEY_MESSAGE_LOG (
SEQNO VARCHAR2(8) NOT NULL,
SUBSEQNO VARCHAR2(5) NOT NULL,
UUID VARCHAR2(40) DEFAULT NULL,
MESSAGE_TYPE VARCHAR2(10) DEFAULT NULL,
CATEGORY_TYPE VARCHAR2(5) DEFAULT NULL,
PROCESS_TYPE VARCHAR2(10) DEFAULT NULL,
FROM_PARTY_ID VARCHAR2(10) DEFAULT NULL,
TO_PARTY_ID VARCHAR2(10) DEFAULT NULL,
MESSAGE_DTS VARCHAR2(17) DEFAULT NULL,
CHARACTER_COUNT VARCHAR2(10) DEFAULT NULL,
STATUS VARCHAR2(5) DEFAULT NULL,
IN_OUT_BOUND VARCHAR2(1) DEFAULT NULL,
FROM_ROUTING_ID VARCHAR2(39) DEFAULT NULL,
TO_ROUTING_ID VARCHAR2(39) DEFAULT NULL,
INVOICE_IDENTIFIER VARCHAR2(30) DEFAULT NULL,
CONSTRAINT TURNKEY_MESSAGE_LOG_PK1 PRIMARY KEY (SEQNO, SUBSEQNO)
);
CREATE INDEX "TURNKEY_MESSAGE_LOG_INDEX1"
ON TURNKEY_MESSAGE_LOG
(MESSAGE_DTS);
CREATE INDEX "TURNKEY_MESSAGE_LOG_INDEX2"
ON TURNKEY_MESSAGE_LOG
(UUID);
CREATE TABLE TURNKEY_MESSAGE_LOG_DETAIL(
SEQNO VARCHAR2(8) NOT NULL,
SUBSEQNO VARCHAR2(5) NOT NULL,
PROCESS_DTS VARCHAR2(17),
TASK VARCHAR2(30) NOT NULL,
STATUS VARCHAR2(5),
FILENAME VARCHAR2(300),
UUID VARCHAR2(40),
CONSTRAINT TURNKEY_MESSAGE_LOG_DETAIL_PK1 PRIMARY KEY (SEQNO, SUBSEQNO, TASK)
);
CREATE INDEX "TK_MESSAGE_LOG_DETAIL_INDEX1"
ON TURNKEY_MESSAGE_LOG_DETAIL
(FILENAME);
CREATE TABLE TURNKEY_SEQUENCE(
SEQUENCE VARCHAR2(8) NOT NULL,
CONSTRAINT TURNKEY_SEQUENCE_PK1 PRIMARY KEY (SEQUENCE)
);
CREATE TABLE TURNKEY_SYSEVENT_LOG(
EVENTDTS VARCHAR2(17) NOT NULL,
PARTY_ID VARCHAR2(10),
SEQNO VARCHAR2(8),
SUBSEQNO VARCHAR2(5),
ERRORCODE VARCHAR2(4),
UUID VARCHAR2(40),
INFORMATION1 VARCHAR2(100),
INFORMATION2 VARCHAR2(100),
INFORMATION3 VARCHAR2(100),
MESSAGE1 VARCHAR2(100),
MESSAGE2 VARCHAR2(100),
MESSAGE3 VARCHAR2(100),
MESSAGE4 VARCHAR2(100),
MESSAGE5 VARCHAR2(100),
MESSAGE6 VARCHAR2(100),
CONSTRAINT TURNKEY_SYSEVENT_LOG_PK1 PRIMARY KEY (EVENTDTS)
);
CREATE INDEX "TURNKEY_SYSEVENT_LOG_INDEX1"
ON TURNKEY_SYSEVENT_LOG
(SEQNO, SUBSEQNO);
CREATE INDEX "TURNKEY_SYSEVENT_LOG_INDEX2"
ON TURNKEY_SYSEVENT_LOG
(UUID);
| true |
9d1fbfec797ed80a947daeb213000c2a3ef36300 | SQL | rfcaio/mysql-alura-course | /setup.sql | UTF-8 | 122,987 | 3.1875 | 3 | [] | no_license |
CREATE DATABASE IF NOT EXISTS purchase_control
DEFAULT CHARACTER SET utf8
DEFAULT COLLATE utf8_general_ci;
USE purchase_control;
CREATE TABLE IF NOT EXISTS purchase (
id INT AUTO_INCREMENT NOT NULL,
description VARCHAR(255),
price DOUBLE,
purchase_date DATE,
received BOOLEAN,
PRIMARY KEY (id)
) DEFAULT CHARSET = utf8;
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Licensed Frozen Chair', 534.04, '2018-05-15', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Incredible Plastic Chicken', 283.65, '2018-04-11', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Handcrafted Rubber Gloves', 222.13, '2018-03-05', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Intelligent Cotton Tuna', 100.19, '2018-03-01', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Intelligent Cotton Car', 895.71, '2018-08-14', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Licensed Rubber Sausages', 621.24, '2018-08-21', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Awesome Plastic Bike', 302.05, '2018-05-08', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Handcrafted Concrete Shoes', 770.95, '2018-09-30', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Gorgeous Plastic Sausages', 167.35, '2018-05-07', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Sleek Frozen Hat', 996.97, '2018-04-10', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Sleek Metal Tuna', 159.02, '2018-04-14', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Intelligent Soft Chair', 697.33, '2018-12-21', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Fantastic Concrete Ball', 30.93, '2018-11-08', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Unbranded Rubber Chips', 487.14, '2018-11-06', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Refined Steel Ball', 394.76, '2018-08-19', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Tasty Wooden Mouse', 108.33, '2018-02-21', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Rustic Frozen Shoes', 509.23, '2018-11-12', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Generic Cotton Bike', 715.55, '2018-05-09', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Sleek Fresh Tuna', 427.31, '2018-01-16', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Incredible Rubber Cheese', 644.77, '2018-04-09', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Refined Soft Cheese', 82.72, '2018-11-03', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Licensed Rubber Shirt', 995.47, '2018-01-10', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Generic Steel Chair', 84.77, '2018-01-16', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Incredible Rubber Keyboard', 478.58, '2018-04-14', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Practical Granite Chips', 481.94, '2018-06-28', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Sleek Metal Mouse', 117.54, '2018-10-30', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Incredible Granite Sausages', 306.54, '2018-09-21', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Unbranded Granite Cheese', 172.17, '2018-11-22', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Licensed Fresh Pizza', 406.39, '2018-03-23', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Practical Steel Salad', 51.57, '2018-03-22', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Incredible Wooden Tuna', 358.27, '2018-01-26', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Awesome Steel Chair', 428.83, '2018-06-08', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Refined Concrete Table', 590.99, '2018-11-09', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Handmade Rubber Soap', 803.84, '2018-05-04', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Practical Rubber Tuna', 597.14, '2018-10-12', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Awesome Concrete Mouse', 776.48, '2018-12-25', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Generic Steel Chips', 930.00, '2018-10-02', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Sleek Soft Shoes', 5.21, '2018-02-21', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Ergonomic Concrete Fish', 161.38, '2018-01-16', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Fantastic Wooden Salad', 99.45, '2018-10-29', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Tasty Steel Hat', 312.96, '2018-05-02', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Handcrafted Plastic Towels', 537.21, '2018-06-23', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Handmade Cotton Chair', 565.33, '2018-08-27', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Licensed Plastic Towels', 451.69, '2018-03-13', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Gorgeous Wooden Table', 521.52, '2018-01-16', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Ergonomic Metal Car', 695.55, '2018-03-25', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Licensed Concrete Towels', 391.97, '2018-04-01', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Ergonomic Steel Chips', 362.15, '2019-01-01', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Rustic Wooden Mouse', 429.19, '2018-02-19', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Fantastic Metal Cheese', 851.28, '2018-07-23', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Refined Fresh Chips', 876.17, '2018-10-20', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Practical Concrete Chips', 569.72, '2018-11-01', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Handmade Metal Chips', 976.17, '2018-03-04', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Handcrafted Granite Chair', 337.32, '2018-06-02', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Incredible Granite Car', 778.46, '2018-08-03', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Licensed Metal Soap', 94.28, '2018-03-05', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Incredible Steel Chair', 259.02, '2018-02-03', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Fantastic Metal Hat', 14.98, '2018-11-21', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Tasty Rubber Towels', 426.21, '2018-03-06', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Intelligent Concrete Shoes', 124.71, '2018-08-12', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Small Cotton Pants', 489.86, '2018-07-18', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Awesome Fresh Salad', 883.06, '2019-01-06', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Gorgeous Rubber Ball', 805.99, '2018-10-01', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Rustic Plastic Pizza', 731.22, '2018-12-03', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Fantastic Metal Shirt', 506.50, '2018-03-20', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Awesome Plastic Chair', 613.49, '2018-06-23', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Handmade Frozen Mouse', 369.29, '2018-08-09', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Awesome Frozen Bacon', 14.62, '2018-08-27', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Tasty Granite Pizza', 547.60, '2018-06-11', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Awesome Cotton Gloves', 764.94, '2018-09-12', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Unbranded Frozen Chips', 429.37, '2018-06-20', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Fantastic Frozen Mouse', 819.21, '2018-03-04', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Practical Concrete Towels', 649.58, '2018-08-06', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Practical Granite Keyboard', 729.57, '2018-07-26', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Intelligent Concrete Pizza', 31.87, '2018-08-01', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Rustic Rubber Chair', 921.24, '2018-12-15', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Licensed Frozen Chair', 157.05, '2018-02-25', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Handcrafted Rubber Tuna', 499.22, '2018-09-12', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Awesome Rubber Towels', 591.39, '2018-05-27', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Incredible Plastic Computer', 722.70, '2018-05-03', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Fantastic Rubber Chicken', 568.92, '2018-01-28', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Gorgeous Fresh Mouse', 185.29, '2018-10-19', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Intelligent Rubber Sausages', 37.69, '2018-07-10', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Ergonomic Wooden Hat', 353.61, '2018-04-11', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Unbranded Rubber Computer', 293.61, '2018-03-24', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Refined Fresh Chicken', 807.63, '2018-02-20', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Handmade Fresh Salad', 673.50, '2018-12-22', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Handcrafted Metal Table', 625.36, '2018-06-07', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Licensed Fresh Chips', 35.90, '2018-06-12', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Handcrafted Fresh Keyboard', 430.29, '2019-01-01', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Handcrafted Rubber Bike', 570.16, '2018-08-09', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Unbranded Wooden Soap', 741.47, '2018-10-16', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Awesome Metal Chicken', 785.91, '2018-07-15', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Tasty Plastic Chicken', 404.49, '2018-12-15', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Fantastic Frozen Fish', 129.34, '2018-11-26', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Fantastic Frozen Sausages', 307.57, '2018-12-04', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Ergonomic Granite Sausages', 118.58, '2018-08-31', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Licensed Cotton Pants', 388.30, '2018-08-11', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Licensed Wooden Salad', 825.96, '2018-05-30', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Refined Granite Mouse', 973.55, '2018-08-22', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Handmade Metal Pizza', 295.78, '2018-05-13', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Fantastic Granite Pants', 496.52, '2018-03-24', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Tasty Cotton Bike', 272.14, '2018-07-08', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Incredible Steel Sausages', 350.86, '2018-12-07', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Rustic Wooden Cheese', 850.89, '2018-06-03', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Sleek Frozen Tuna', 970.26, '2018-09-24', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Incredible Fresh Bike', 435.22, '2018-09-20', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Awesome Soft Towels', 523.74, '2018-09-20', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Practical Wooden Bacon', 509.72, '2018-07-31', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Tasty Soft Shirt', 705.14, '2018-07-04', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Licensed Soft Chair', 441.79, '2018-04-23', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Gorgeous Frozen Ball', 397.90, '2018-02-11', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Rustic Steel Table', 276.77, '2018-09-21', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Generic Soft Shirt', 780.23, '2018-04-26', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Small Frozen Ball', 98.16, '2018-10-04', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Generic Wooden Tuna', 389.16, '2018-11-06', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Handcrafted Frozen Shoes', 408.58, '2018-02-21', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Awesome Granite Computer', 631.66, '2018-06-15', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Unbranded Granite Soap', 436.92, '2018-10-22', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Sleek Concrete Chicken', 693.86, '2018-03-11', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Refined Plastic Ball', 625.57, '2018-07-22', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Rustic Wooden Gloves', 580.78, '2018-11-16', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Licensed Fresh Towels', 277.85, '2018-10-27', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Fantastic Rubber Car', 140.02, '2018-02-18', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Licensed Frozen Soap', 575.90, '2018-12-27', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Licensed Frozen Ball', 730.20, '2018-03-02', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Fantastic Granite Pants', 805.31, '2018-09-01', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Tasty Fresh Bike', 302.33, '2018-04-12', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Small Metal Sausages', 389.29, '2018-03-04', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Practical Metal Sausages', 286.01, '2018-08-11', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Gorgeous Soft Mouse', 439.73, '2018-02-02', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Intelligent Metal Keyboard', 731.68, '2018-09-25', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Fantastic Granite Keyboard', 37.53, '2018-11-26', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Awesome Fresh Computer', 687.51, '2018-04-23', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Licensed Cotton Shirt', 140.26, '2018-05-22', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Tasty Frozen Shoes', 542.14, '2018-12-24', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Handmade Fresh Cheese', 151.64, '2018-05-17', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Licensed Granite Salad', 151.11, '2018-01-25', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Gorgeous Fresh Hat', 183.41, '2018-03-04', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Intelligent Granite Keyboard', 934.06, '2018-11-02', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Small Granite Ball', 594.89, '2018-09-20', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Generic Frozen Car', 745.55, '2018-04-02', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Practical Wooden Ball', 887.37, '2019-01-06', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Incredible Concrete Tuna', 301.32, '2018-05-11', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Incredible Plastic Keyboard', 637.98, '2018-07-11', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Ergonomic Steel Mouse', 251.75, '2018-08-14', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Ergonomic Plastic Sausages', 713.73, '2018-03-07', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Licensed Rubber Gloves', 616.62, '2018-08-12', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Handmade Plastic Chair', 282.20, '2018-08-29', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Unbranded Plastic Pizza', 76.57, '2018-05-03', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Incredible Concrete Soap', 140.49, '2018-05-12', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Fantastic Steel Chicken', 987.02, '2018-03-15', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Handcrafted Concrete Cheese', 578.56, '2018-06-04', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Licensed Concrete Salad', 278.82, '2019-01-01', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Tasty Steel Car', 286.59, '2018-02-28', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Refined Cotton Chips', 351.61, '2018-11-27', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Fantastic Soft Fish', 59.78, '2018-03-27', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Handmade Concrete Pants', 796.60, '2018-02-07', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Awesome Soft Ball', 794.48, '2018-09-22', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Generic Cotton Fish', 603.54, '2018-12-06', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Licensed Fresh Sausages', 531.15, '2018-05-15', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Incredible Metal Chair', 43.23, '2018-11-01', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Ergonomic Concrete Chips', 45.61, '2018-11-19', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Licensed Cotton Pizza', 832.57, '2018-12-30', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Incredible Plastic Keyboard', 602.51, '2018-03-08', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Unbranded Frozen Chicken', 754.24, '2018-02-01', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Incredible Concrete Pizza', 936.43, '2018-03-14', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Gorgeous Concrete Chicken', 834.68, '2018-05-01', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Awesome Granite Hat', 479.45, '2018-08-31', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Fantastic Cotton Chicken', 319.98, '2018-04-30', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Licensed Granite Chair', 441.62, '2018-06-28', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Fantastic Frozen Cheese', 380.98, '2018-05-26', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Unbranded Granite Shoes', 859.10, '2018-06-07', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Incredible Plastic Hat', 680.77, '2018-02-11', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Unbranded Steel Car', 530.91, '2018-10-05', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Generic Cotton Chicken', 806.89, '2018-03-25', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Tasty Wooden Fish', 585.84, '2018-03-06', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Intelligent Steel Tuna', 486.69, '2018-06-15', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Handmade Rubber Shirt', 112.61, '2018-09-10', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Awesome Plastic Ball', 795.90, '2018-02-04', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Practical Metal Computer', 27.85, '2018-11-09', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Generic Soft Pizza', 8.93, '2018-12-12', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Gorgeous Wooden Fish', 807.10, '2018-09-29', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Practical Plastic Car', 271.41, '2018-12-15', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Incredible Frozen Fish', 952.69, '2018-05-29', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Ergonomic Soft Cheese', 654.08, '2018-12-01', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Practical Plastic Fish', 454.00, '2018-04-19', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Generic Metal Table', 626.96, '2018-12-08', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Tasty Granite Cheese', 297.39, '2018-05-13', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Fantastic Granite Chair', 35.22, '2018-10-26', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Rustic Rubber Pants', 794.50, '2018-04-23', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Refined Metal Table', 534.20, '2018-05-16', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Handmade Concrete Pizza', 669.70, '2018-12-15', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Small Plastic Pizza', 532.79, '2018-09-19', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Practical Frozen Chips', 175.44, '2018-02-25', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Refined Rubber Car', 879.75, '2018-09-20', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Unbranded Plastic Bacon', 698.60, '2018-11-19', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Generic Plastic Car', 522.89, '2018-09-09', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Licensed Wooden Car', 277.97, '2018-02-18', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Fantastic Soft Shoes', 524.82, '2018-04-08', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Unbranded Metal Car', 479.28, '2018-05-20', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Licensed Fresh Chicken', 273.94, '2018-11-07', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Tasty Wooden Car', 77.88, '2018-11-16', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Incredible Concrete Bike', 930.27, '2018-09-24', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Fantastic Wooden Soap', 185.00, '2018-03-19', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Intelligent Rubber Shirt', 435.00, '2018-04-27', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Intelligent Metal Table', 164.88, '2018-09-30', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Practical Granite Chicken', 127.14, '2018-10-18', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Handmade Metal Soap', 79.40, '2018-03-24', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Sleek Cotton Fish', 879.37, '2018-02-17', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Rustic Concrete Fish', 386.03, '2018-01-30', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Practical Steel Cheese', 647.14, '2018-07-24', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Unbranded Cotton Towels', 290.64, '2018-12-16', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Practical Metal Soap', 952.32, '2018-02-07', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Awesome Soft Keyboard', 154.47, '2018-02-19', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Gorgeous Concrete Cheese', 264.40, '2018-10-20', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Intelligent Frozen Sausages', 767.77, '2018-03-23', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Handcrafted Steel Towels', 606.04, '2018-06-02', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Gorgeous Frozen Shoes', 393.55, '2018-06-26', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Generic Steel Cheese', 665.87, '2018-12-08', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Gorgeous Metal Pants', 292.03, '2018-01-19', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Gorgeous Concrete Pants', 650.89, '2018-01-27', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Handmade Frozen Pants', 519.07, '2018-08-16', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Handmade Metal Salad', 64.15, '2018-07-18', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Awesome Granite Tuna', 574.16, '2018-04-11', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Ergonomic Wooden Computer', 142.68, '2018-08-15', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Licensed Metal Chicken', 150.13, '2018-08-22', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Unbranded Plastic Fish', 396.30, '2018-01-24', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Ergonomic Soft Tuna', 36.24, '2018-05-29', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Refined Rubber Pants', 304.27, '2018-08-04', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Fantastic Plastic Salad', 68.38, '2018-09-23', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Refined Plastic Sausages', 979.35, '2018-08-03', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Rustic Cotton Hat', 466.02, '2018-09-09', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Handmade Rubber Shoes', 17.42, '2018-09-26', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Intelligent Fresh Soap', 306.45, '2018-06-05', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Gorgeous Wooden Keyboard', 688.47, '2018-10-04', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Tasty Frozen Hat', 717.65, '2018-10-30', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Intelligent Soft Sausages', 982.07, '2018-01-09', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Licensed Rubber Towels', 972.60, '2018-02-06', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Gorgeous Granite Salad', 730.07, '2018-09-27', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Unbranded Granite Fish', 331.94, '2018-08-16', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Refined Frozen Tuna', 756.01, '2018-02-07', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Unbranded Rubber Gloves', 681.08, '2018-10-28', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Licensed Soft Shirt', 591.47, '2018-07-13', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Sleek Rubber Shoes', 373.08, '2018-06-15', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Incredible Fresh Chair', 373.33, '2018-04-12', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Tasty Plastic Hat', 957.29, '2018-05-16', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Refined Rubber Keyboard', 824.69, '2018-07-02', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Incredible Steel Pizza', 182.48, '2018-06-20', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Refined Steel Mouse', 819.13, '2018-08-04', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Unbranded Wooden Soap', 361.54, '2018-09-06', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Unbranded Metal Sausages', 930.03, '2018-05-20', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Fantastic Frozen Pants', 761.27, '2018-11-11', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Practical Metal Mouse', 35.44, '2018-09-27', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Generic Plastic Gloves', 173.41, '2018-07-15', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Gorgeous Cotton Hat', 678.99, '2018-05-10', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Fantastic Metal Chair', 655.00, '2018-03-29', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Unbranded Metal Tuna', 802.27, '2018-12-09', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Generic Metal Shirt', 556.49, '2018-12-23', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Handcrafted Rubber Hat', 370.58, '2018-09-06', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Handcrafted Plastic Bike', 945.43, '2018-11-05', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Practical Cotton Salad', 997.30, '2018-11-20', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Sleek Plastic Mouse', 16.02, '2018-01-22', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Refined Concrete Table', 138.14, '2018-12-25', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Gorgeous Steel Computer', 339.96, '2018-05-13', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Small Granite Chair', 125.29, '2018-01-27', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Handcrafted Plastic Chicken', 169.91, '2018-01-14', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Gorgeous Cotton Ball', 821.87, '2018-11-22', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Licensed Steel Cheese', 517.02, '2018-05-26', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Tasty Metal Shoes', 730.91, '2018-09-05', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Awesome Steel Tuna', 761.75, '2018-11-13', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Generic Cotton Table', 362.48, '2018-11-15', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Tasty Rubber Chicken', 375.18, '2018-10-24', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Incredible Soft Hat', 495.03, '2018-06-26', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Small Frozen Pizza', 210.10, '2018-10-04', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Licensed Rubber Tuna', 319.48, '2018-12-08', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Incredible Metal Shirt', 789.15, '2018-03-31', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Intelligent Soft Chicken', 548.26, '2019-01-01', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Rustic Granite Keyboard', 444.40, '2018-05-29', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Incredible Steel Computer', 817.89, '2018-04-24', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Tasty Concrete Shirt', 213.37, '2018-05-01', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Tasty Plastic Bacon', 602.47, '2018-12-05', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Generic Cotton Hat', 492.88, '2018-08-23', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Gorgeous Plastic Chips', 687.30, '2018-07-23', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Rustic Fresh Pants', 362.95, '2018-05-16', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Intelligent Steel Cheese', 86.18, '2018-07-24', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Small Rubber Ball', 608.62, '2018-08-09', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Handmade Soft Chips', 651.19, '2018-10-01', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Handmade Wooden Computer', 756.59, '2019-01-01', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Tasty Wooden Bacon', 886.94, '2018-09-17', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Tasty Granite Shirt', 828.61, '2018-03-17', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Incredible Plastic Sausages', 777.46, '2018-06-24', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Gorgeous Steel Salad', 93.18, '2018-01-17', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Licensed Soft Salad', 815.60, '2018-10-28', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Awesome Soft Fish', 879.97, '2018-10-27', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Generic Rubber Hat', 68.39, '2018-11-23', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Rustic Steel Pizza', 884.51, '2018-07-22', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Gorgeous Plastic Bike', 406.07, '2018-08-09', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Sleek Wooden Mouse', 609.30, '2018-02-10', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Generic Cotton Fish', 629.01, '2018-12-28', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Sleek Steel Sausages', 339.73, '2018-03-15', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Handmade Wooden Salad', 97.84, '2018-09-21', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Gorgeous Metal Fish', 977.71, '2018-10-23', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Generic Plastic Car', 625.00, '2018-02-24', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Unbranded Steel Salad', 887.11, '2018-06-09', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Fantastic Soft Car', 506.38, '2018-04-11', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Ergonomic Soft Shoes', 913.91, '2018-04-12', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Incredible Rubber Salad', 219.11, '2018-04-03', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Handmade Metal Car', 21.93, '2018-10-28', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Intelligent Granite Soap', 865.43, '2018-11-11', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Rustic Soft Salad', 502.95, '2018-09-05', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Awesome Granite Table', 229.85, '2018-04-01', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Generic Frozen Bacon', 347.75, '2018-08-14', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Gorgeous Steel Chair', 651.42, '2018-08-13', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Gorgeous Granite Computer', 894.42, '2018-11-22', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Practical Rubber Table', 353.50, '2018-12-10', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Awesome Fresh Shoes', 604.89, '2018-12-04', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Licensed Granite Shoes', 237.40, '2018-01-26', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Gorgeous Fresh Shoes', 587.59, '2018-03-27', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Handmade Frozen Soap', 558.07, '2018-08-11', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Fantastic Plastic Bike', 910.19, '2018-10-07', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Practical Plastic Salad', 331.60, '2018-06-24', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Unbranded Cotton Sausages', 383.31, '2018-07-28', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Gorgeous Rubber Shirt', 493.06, '2018-05-20', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Generic Granite Salad', 299.43, '2018-11-22', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Generic Cotton Cheese', 791.36, '2018-09-02', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Handmade Wooden Chicken', 742.39, '2018-06-23', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Awesome Soft Mouse', 748.63, '2018-01-21', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Handcrafted Granite Chips', 245.75, '2018-05-14', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Refined Fresh Table', 238.07, '2018-09-17', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Sleek Metal Mouse', 867.37, '2018-08-07', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Incredible Plastic Computer', 461.86, '2018-10-10', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Tasty Concrete Table', 817.40, '2018-01-08', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Unbranded Wooden Ball', 888.46, '2018-08-12', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Handcrafted Plastic Computer', 413.87, '2018-08-26', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Small Wooden Chicken', 296.28, '2019-01-03', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Small Cotton Computer', 835.79, '2018-02-09', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Rustic Rubber Soap', 859.36, '2018-01-25', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Gorgeous Granite Shirt', 391.99, '2018-10-11', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Gorgeous Cotton Shoes', 807.22, '2018-12-18', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Rustic Soft Soap', 817.69, '2018-07-14', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Incredible Metal Chips', 739.60, '2018-12-21', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Gorgeous Concrete Towels', 506.70, '2018-12-17', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Licensed Rubber Pants', 469.41, '2018-11-02', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Small Frozen Ball', 204.77, '2018-08-24', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Incredible Soft Computer', 256.84, '2018-10-25', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Licensed Cotton Sausages', 309.18, '2018-03-16', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Ergonomic Steel Pizza', 931.22, '2018-09-25', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Small Granite Ball', 418.14, '2018-08-08', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Sleek Metal Tuna', 501.01, '2018-02-19', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Sleek Soft Table', 830.22, '2018-07-04', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Practical Plastic Bacon', 464.72, '2018-08-09', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Tasty Concrete Car', 921.91, '2018-09-29', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Sleek Granite Table', 242.63, '2018-02-14', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Tasty Frozen Sausages', 644.38, '2018-05-23', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Sleek Fresh Tuna', 184.48, '2018-12-11', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Gorgeous Wooden Fish', 193.48, '2018-01-09', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Handcrafted Frozen Mouse', 420.31, '2018-06-07', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Intelligent Steel Computer', 725.21, '2018-05-14', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Sleek Steel Chair', 601.04, '2018-03-02', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Handcrafted Plastic Table', 722.91, '2018-07-06', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Practical Frozen Computer', 415.88, '2018-10-24', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Generic Rubber Pizza', 555.24, '2018-03-27', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Rustic Wooden Towels', 479.06, '2018-04-28', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Refined Metal Bike', 716.85, '2018-12-14', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Intelligent Rubber Sausages', 636.54, '2018-04-05', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Ergonomic Wooden Mouse', 353.89, '2018-12-12', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Rustic Fresh Bike', 436.51, '2018-03-05', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Fantastic Cotton Hat', 310.45, '2018-03-24', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Tasty Frozen Car', 423.22, '2018-09-28', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Licensed Cotton Towels', 39.42, '2018-05-28', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Licensed Frozen Bacon', 518.83, '2018-02-04', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Handcrafted Soft Chips', 958.43, '2018-06-19', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Handmade Metal Towels', 891.93, '2018-02-24', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Practical Concrete Mouse', 236.44, '2018-10-10', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Fantastic Metal Chicken', 262.95, '2018-04-29', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Handmade Frozen Fish', 809.62, '2018-10-28', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Sleek Wooden Chair', 244.45, '2018-11-13', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Handmade Plastic Bacon', 545.00, '2018-02-06', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Gorgeous Frozen Chips', 981.05, '2018-08-27', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Sleek Concrete Sausages', 696.49, '2018-03-07', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Intelligent Steel Computer', 228.66, '2018-01-13', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Gorgeous Wooden Towels', 921.05, '2018-04-01', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Generic Cotton Chicken', 819.33, '2018-01-15', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Tasty Granite Table', 168.80, '2018-11-14', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Intelligent Plastic Bacon', 983.28, '2018-04-29', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Handmade Metal Chair', 212.48, '2018-06-12', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Generic Plastic Shoes', 308.61, '2018-03-06', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Sleek Steel Gloves', 319.10, '2018-06-13', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Small Steel Gloves', 136.33, '2018-02-11', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Small Wooden Gloves', 93.58, '2018-11-02', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Tasty Granite Shirt', 222.60, '2018-08-03', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Refined Soft Hat', 318.84, '2018-10-09', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Handcrafted Granite Shoes', 619.87, '2018-04-18', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Refined Fresh Salad', 556.29, '2018-03-17', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Sleek Cotton Cheese', 59.35, '2018-01-12', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Intelligent Metal Shirt', 292.11, '2018-11-25', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Small Metal Bike', 469.39, '2018-12-23', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Licensed Cotton Car', 681.20, '2018-12-23', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Rustic Concrete Mouse', 269.89, '2018-06-22', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Tasty Soft Car', 392.81, '2018-02-26', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Tasty Frozen Towels', 991.70, '2018-09-06', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Refined Metal Table', 761.14, '2018-11-09', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Fantastic Rubber Salad', 554.15, '2018-01-10', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Handmade Plastic Sausages', 968.65, '2018-06-10', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Refined Plastic Towels', 94.15, '2018-04-21', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Rustic Plastic Cheese', 330.15, '2019-01-02', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Handcrafted Concrete Tuna', 439.26, '2018-11-01', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Tasty Rubber Bacon', 595.33, '2018-03-28', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Generic Plastic Pizza', 333.13, '2018-05-05', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Handmade Metal Chips', 624.25, '2018-10-18', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Practical Fresh Sausages', 718.89, '2018-10-06', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Gorgeous Frozen Chips', 349.82, '2018-01-09', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Gorgeous Soft Pizza', 368.50, '2018-12-31', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Gorgeous Concrete Car', 81.19, '2018-07-21', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Incredible Soft Table', 901.48, '2018-12-29', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Fantastic Soft Keyboard', 808.00, '2018-04-08', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Gorgeous Concrete Car', 319.35, '2018-12-20', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Sleek Rubber Bacon', 210.69, '2018-05-15', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Licensed Wooden Mouse', 693.08, '2018-09-25', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Incredible Plastic Fish', 531.47, '2018-07-05', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Gorgeous Cotton Bacon', 809.72, '2018-08-20', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Intelligent Metal Towels', 928.72, '2018-10-14', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Sleek Cotton Fish', 586.13, '2018-04-30', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Incredible Granite Salad', 440.04, '2018-06-20', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Ergonomic Plastic Tuna', 589.65, '2018-10-04', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Handmade Metal Keyboard', 573.88, '2018-02-04', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Handmade Soft Bacon', 649.55, '2018-01-14', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Gorgeous Steel Pizza', 971.04, '2018-05-03', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Small Granite Bike', 347.41, '2018-03-28', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Practical Rubber Mouse', 532.32, '2018-09-01', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Handmade Frozen Table', 859.37, '2018-05-04', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Awesome Soft Tuna', 925.31, '2018-12-04', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Refined Fresh Shoes', 330.63, '2018-09-04', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Rustic Steel Computer', 336.64, '2018-05-09', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Handcrafted Concrete Mouse', 206.81, '2018-08-26', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Small Granite Shirt', 35.69, '2018-08-26', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Practical Plastic Sausages', 14.12, '2018-10-27', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Sleek Metal Towels', 456.83, '2018-03-19', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Sleek Plastic Salad', 441.52, '2018-04-26', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Ergonomic Steel Computer', 920.90, '2018-11-28', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Practical Cotton Sausages', 460.58, '2018-03-06', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Handcrafted Soft Chips', 487.02, '2018-03-28', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Practical Cotton Chips', 475.27, '2018-07-06', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Fantastic Concrete Mouse', 894.10, '2018-07-27', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Sleek Granite Shirt', 934.40, '2018-02-26', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Small Plastic Pants', 796.14, '2018-07-26', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Incredible Concrete Chicken', 164.83, '2018-08-09', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Fantastic Rubber Pants', 255.28, '2018-02-25', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Intelligent Fresh Pants', 313.84, '2018-09-02', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Rustic Cotton Soap', 134.52, '2018-06-16', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Fantastic Rubber Chair', 254.18, '2018-02-27', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Refined Rubber Chips', 503.01, '2018-01-24', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Tasty Steel Cheese', 853.07, '2018-04-02', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Small Cotton Computer', 593.07, '2018-06-15', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Awesome Plastic Mouse', 53.45, '2018-07-09', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Rustic Granite Mouse', 445.88, '2018-08-19', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Handmade Fresh Soap', 199.45, '2018-05-29', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Sleek Metal Cheese', 933.27, '2018-09-08', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Generic Metal Table', 204.00, '2018-08-03', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Handcrafted Fresh Cheese', 553.95, '2018-03-30', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Tasty Soft Fish', 430.56, '2018-05-31', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Fantastic Fresh Chicken', 961.00, '2018-06-17', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Intelligent Granite Table', 801.82, '2018-03-03', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Unbranded Metal Fish', 641.86, '2018-10-16', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Intelligent Concrete Ball', 351.98, '2018-04-26', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Tasty Steel Mouse', 512.01, '2018-04-03', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Awesome Granite Keyboard', 823.34, '2018-09-23', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Generic Rubber Computer', 110.09, '2018-02-15', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Practical Frozen Chicken', 896.58, '2018-09-16', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Tasty Rubber Mouse', 731.24, '2018-06-13', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Fantastic Soft Shoes', 707.56, '2018-07-23', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Incredible Soft Soap', 686.56, '2018-09-22', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Small Frozen Soap', 499.87, '2018-11-04', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Practical Granite Shirt', 10.48, '2018-06-24', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Fantastic Soft Computer', 419.88, '2018-02-11', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Awesome Fresh Pants', 749.52, '2018-11-05', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Tasty Fresh Shoes', 380.50, '2018-10-15', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Incredible Soft Soap', 563.58, '2018-06-20', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Tasty Cotton Bike', 636.83, '2018-07-21', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Handmade Concrete Chips', 15.03, '2018-11-21', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Rustic Steel Cheese', 367.35, '2018-09-14', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Fantastic Granite Towels', 359.02, '2018-11-29', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Unbranded Frozen Tuna', 563.32, '2018-03-22', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Fantastic Fresh Shirt', 652.99, '2018-08-06', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Sleek Metal Cheese', 735.87, '2018-12-14', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Refined Steel Table', 464.38, '2018-04-14', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Awesome Steel Shirt', 764.59, '2018-07-01', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Fantastic Wooden Tuna', 310.10, '2018-09-23', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Rustic Cotton Pants', 234.23, '2018-10-18', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Intelligent Concrete Car', 499.21, '2018-02-09', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Tasty Cotton Chicken', 79.29, '2018-09-24', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Licensed Soft Sausages', 831.15, '2018-11-07', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Small Steel Ball', 775.71, '2018-11-20', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Sleek Granite Ball', 338.66, '2018-04-12', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Fantastic Fresh Computer', 589.82, '2018-06-18', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Awesome Rubber Tuna', 519.23, '2018-01-17', false);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Awesome Rubber Pizza', 973.07, '2018-10-25', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Incredible Soft Towels', 565.32, '2018-09-25', true);
INSERT INTO purchase (description, price, purchase_date, received) VALUES ('Practical Steel Pizza', 130.66, '2018-02-21', true);
CREATE TABLE IF NOT EXISTS client (
id INT AUTO_INCREMENT NOT NULL,
name VARCHAR (255) NOT NULL,
email VARCHAR(255) NOT NULL,
PRIMARY KEY (id)
) DEFAULT CHARSET = utf8;
INSERT INTO client (name, email) VALUES ('Miss Cyrus Halvorson', 'hank39@hotmail.com');
INSERT INTO client (name, email) VALUES ('Barbara Pollich', 'mariane_ruecker58@gmail.com');
INSERT INTO client (name, email) VALUES ('Grant Lesch', 'brando_zieme@gmail.com');
INSERT INTO client (name, email) VALUES ('Mittie OConnell', 'blake_bergnaum@hotmail.com');
INSERT INTO client (name, email) VALUES ('Rachelle Schmitt', 'brennon24@yahoo.com');
INSERT INTO client (name, email) VALUES ('Donna Bins', 'precious_strosin57@yahoo.com');
INSERT INTO client (name, email) VALUES ('Justyn Beier I', 'angie.hartmann@yahoo.com');
INSERT INTO client (name, email) VALUES ('Christy Homenick', 'jordan15@gmail.com');
INSERT INTO client (name, email) VALUES ('Elbert Terry', 'layla.kunde50@yahoo.com');
INSERT INTO client (name, email) VALUES ('Hudson Farrell', 'janiya.ondricka81@hotmail.com');
INSERT INTO client (name, email) VALUES ('Miss Rebeka McKenzie', 'doyle_schmitt58@hotmail.com');
INSERT INTO client (name, email) VALUES ('Quinten Rogahn', 'karina_flatley@hotmail.com');
INSERT INTO client (name, email) VALUES ('Sydney Koch', 'ashleigh.tremblay50@gmail.com');
INSERT INTO client (name, email) VALUES ('Chris Yundt', 'barrett79@hotmail.com');
INSERT INTO client (name, email) VALUES ('Keon Greenholt', 'greg_bayer17@gmail.com');
INSERT INTO client (name, email) VALUES ('Angus Daniel', 'darby.okon@gmail.com');
INSERT INTO client (name, email) VALUES ('Violet Beatty', 'mathew23@yahoo.com');
INSERT INTO client (name, email) VALUES ('Otilia Douglas', 'stephany.volkman@gmail.com');
INSERT INTO client (name, email) VALUES ('Pedro Beer I', 'edgardo_koepp28@hotmail.com');
INSERT INTO client (name, email) VALUES ('Rocky Lehner', 'christ69@yahoo.com');
INSERT INTO client (name, email) VALUES ('Demarco Marquardt', 'linnie_jerde@hotmail.com');
INSERT INTO client (name, email) VALUES ('Jaylen Willms', 'chauncey.mills57@yahoo.com');
INSERT INTO client (name, email) VALUES ('Micah Hahn', 'haven.kreiger3@gmail.com');
INSERT INTO client (name, email) VALUES ('Jaycee Prosacco', 'myron_kuhic2@hotmail.com');
INSERT INTO client (name, email) VALUES ('Corbin Paucek', 'kendall_wisozk55@gmail.com');
INSERT INTO client (name, email) VALUES ('Sally Cummerata', 'mylene_renner60@hotmail.com');
INSERT INTO client (name, email) VALUES ('Dr. Kurt Schuppe', 'wallace.goodwin@gmail.com');
INSERT INTO client (name, email) VALUES ('Adonis Grant', 'rowena52@yahoo.com');
INSERT INTO client (name, email) VALUES ('Blake Kshlerin V', 'jessie_leuschke@gmail.com');
INSERT INTO client (name, email) VALUES ('Montana Legros DDS', 'kiarra27@gmail.com');
INSERT INTO client (name, email) VALUES ('Betsy Hackett V', 'teresa28@gmail.com');
INSERT INTO client (name, email) VALUES ('Willis Kozey', 'isaac10@yahoo.com');
INSERT INTO client (name, email) VALUES ('Calista Beahan', 'olen70@yahoo.com');
INSERT INTO client (name, email) VALUES ('Miss Santiago Collins', 'danial52@gmail.com');
INSERT INTO client (name, email) VALUES ('Arvilla Little', 'yasmine.schmidt@hotmail.com');
INSERT INTO client (name, email) VALUES ('Haley Pfannerstill PhD', 'rico59@yahoo.com');
INSERT INTO client (name, email) VALUES ('Hardy Gulgowski', 'queenie10@gmail.com');
INSERT INTO client (name, email) VALUES ('Ransom Jenkins', 'anastacio_lowe@gmail.com');
INSERT INTO client (name, email) VALUES ('Dudley Crist', 'clinton_connelly@hotmail.com');
INSERT INTO client (name, email) VALUES ('Eusebio Lehner', 'verna91@hotmail.com');
INSERT INTO client (name, email) VALUES ('Joesph Yundt', 'kian55@yahoo.com');
INSERT INTO client (name, email) VALUES ('Abner Sawayn', 'fleta31@yahoo.com');
INSERT INTO client (name, email) VALUES ('Tyree MacGyver', 'golda_jacobi@hotmail.com');
INSERT INTO client (name, email) VALUES ('Justyn Wisozk', 'shyann.jacobs94@gmail.com');
INSERT INTO client (name, email) VALUES ('Bradford Rowe', 'luisa_west@gmail.com');
INSERT INTO client (name, email) VALUES ('Ms. Rodrigo Blanda', 'lauretta97@yahoo.com');
INSERT INTO client (name, email) VALUES ('Karson Donnelly', 'olaf_vandervort@hotmail.com');
INSERT INTO client (name, email) VALUES ('Yasmin Schmidt', 'bruce_rogahn@yahoo.com');
INSERT INTO client (name, email) VALUES ('Virgil Carroll', 'hiram_marquardt@hotmail.com');
INSERT INTO client (name, email) VALUES ('Hiram Christiansen', 'mitchel_treutel@yahoo.com');
INSERT INTO client (name, email) VALUES ('Samir Rice', 'eriberto.lang@yahoo.com');
INSERT INTO client (name, email) VALUES ('Dr. Jolie Rolfson', 'natalia9@hotmail.com');
INSERT INTO client (name, email) VALUES ('Elta Kemmer', 'alvena_harber5@gmail.com');
INSERT INTO client (name, email) VALUES ('Chanelle Rau', 'noble.renner39@hotmail.com');
INSERT INTO client (name, email) VALUES ('Darron Kuhlman', 'estelle64@hotmail.com');
INSERT INTO client (name, email) VALUES ('Kathryne Rogahn', 'efren86@yahoo.com');
INSERT INTO client (name, email) VALUES ('Kali Bins', 'antone53@yahoo.com');
INSERT INTO client (name, email) VALUES ('Gail Bode', 'henry37@gmail.com');
INSERT INTO client (name, email) VALUES ('Arne Weissnat', 'ryann_altenwerth@hotmail.com');
INSERT INTO client (name, email) VALUES ('Reina Ernser', 'kira62@gmail.com');
INSERT INTO client (name, email) VALUES ('Brennan Schuster', 'michaela8@yahoo.com');
INSERT INTO client (name, email) VALUES ('Rigoberto Hettinger', 'leonel.bauch@yahoo.com');
INSERT INTO client (name, email) VALUES ('Andres Klocko', 'deborah_robel7@gmail.com');
INSERT INTO client (name, email) VALUES ('Mireya Stark', 'aimee.paucek74@gmail.com');
INSERT INTO client (name, email) VALUES ('Aleen Kling', 'dell_ebert69@gmail.com');
INSERT INTO client (name, email) VALUES ('Guy Smitham', 'katherine_schmeler@gmail.com');
INSERT INTO client (name, email) VALUES ('Ms. Joyce Brekke', 'karson_mcclure3@yahoo.com');
INSERT INTO client (name, email) VALUES ('Malika Lockman', 'heloise45@gmail.com');
INSERT INTO client (name, email) VALUES ('Alexa Miller', 'karlee35@yahoo.com');
INSERT INTO client (name, email) VALUES ('Antonina Beier', 'golda_abshire11@hotmail.com');
INSERT INTO client (name, email) VALUES ('Orval Braun', 'laisha.mcdermott@yahoo.com');
INSERT INTO client (name, email) VALUES ('Madilyn Koepp', 'emiliano.boehm80@gmail.com');
INSERT INTO client (name, email) VALUES ('Rebekah Huel', 'amira_ritchie@gmail.com');
INSERT INTO client (name, email) VALUES ('Zachariah Hettinger', 'octavia_herzog25@gmail.com');
INSERT INTO client (name, email) VALUES ('Dixie Lynch', 'mitchell53@hotmail.com');
INSERT INTO client (name, email) VALUES ('Allan Walsh', 'judd.abshire44@yahoo.com');
INSERT INTO client (name, email) VALUES ('Bella Ryan', 'alyce33@gmail.com');
INSERT INTO client (name, email) VALUES ('Leonel Hansen', 'nikki54@hotmail.com');
INSERT INTO client (name, email) VALUES ('Armand Gleichner', 'lauretta.kreiger83@hotmail.com');
INSERT INTO client (name, email) VALUES ('Lemuel Breitenberg DDS', 'richard40@hotmail.com');
INSERT INTO client (name, email) VALUES ('Larry Zulauf', 'darrick.zulauf@yahoo.com');
INSERT INTO client (name, email) VALUES ('Adolph Cummerata', 'miles_klocko98@yahoo.com');
INSERT INTO client (name, email) VALUES ('Maudie Jenkins', 'dallas_becker@gmail.com');
INSERT INTO client (name, email) VALUES ('Ms. Jeremie Goodwin', 'jaylin.mills96@yahoo.com');
INSERT INTO client (name, email) VALUES ('Rene Russel', 'abby34@yahoo.com');
INSERT INTO client (name, email) VALUES ('Erik Schulist', 'marie_weber29@yahoo.com');
INSERT INTO client (name, email) VALUES ('Dorcas Mayert', 'cecile_white@hotmail.com');
INSERT INTO client (name, email) VALUES ('Mr. Elody Lindgren', 'lila_wilderman@gmail.com');
INSERT INTO client (name, email) VALUES ('Tatyana Okuneva', 'gia.boyer75@gmail.com');
INSERT INTO client (name, email) VALUES ('Joesph Smith', 'herminio58@hotmail.com');
INSERT INTO client (name, email) VALUES ('Minerva Green V', 'courtney.weissnat74@gmail.com');
INSERT INTO client (name, email) VALUES ('Mariela Hegmann', 'adell2@hotmail.com');
INSERT INTO client (name, email) VALUES ('Violet Bergstrom', 'jammie.farrell@yahoo.com');
INSERT INTO client (name, email) VALUES ('Delphine Hintz', 'wava_lang40@yahoo.com');
INSERT INTO client (name, email) VALUES ('Lorenzo Shanahan', 'rollin.ziemann@yahoo.com');
INSERT INTO client (name, email) VALUES ('Kiara Walsh', 'teagan_becker@hotmail.com');
INSERT INTO client (name, email) VALUES ('Euna Gerlach', 'daniela_hilll38@hotmail.com');
INSERT INTO client (name, email) VALUES ('Patsy Hirthe', 'carleton_corwin78@gmail.com');
INSERT INTO client (name, email) VALUES ('Torrey Muller', 'arne.runte@yahoo.com');
INSERT INTO client (name, email) VALUES ('Jaiden Schinner', 'ronaldo_considine@hotmail.com');
INSERT INTO client (name, email) VALUES ('Scotty Marks', 'jaida_homenick@yahoo.com');
INSERT INTO client (name, email) VALUES ('Vidal Gleason', 'shawna.kemmer76@yahoo.com');
INSERT INTO client (name, email) VALUES ('Ophelia Cormier', 'demarcus_littel@gmail.com');
INSERT INTO client (name, email) VALUES ('Tommie Daniel', 'elouise.dooley@yahoo.com');
INSERT INTO client (name, email) VALUES ('Keshaun Ritchie', 'aimee56@hotmail.com');
INSERT INTO client (name, email) VALUES ('Lenna Schumm', 'colten.denesik@yahoo.com');
INSERT INTO client (name, email) VALUES ('Althea Pagac', 'therese_schulist@hotmail.com');
INSERT INTO client (name, email) VALUES ('Arvilla King', 'nicola_schumm22@gmail.com');
INSERT INTO client (name, email) VALUES ('Dolores Reichert', 'madyson_tillman@gmail.com');
INSERT INTO client (name, email) VALUES ('Skylar Wunsch', 'ole81@yahoo.com');
INSERT INTO client (name, email) VALUES ('Helene Nikolaus', 'cary.macejkovic59@hotmail.com');
INSERT INTO client (name, email) VALUES ('Evalyn Kshlerin II', 'beryl_dietrich31@hotmail.com');
INSERT INTO client (name, email) VALUES ('Kaley Mayer DDS', 'alex27@yahoo.com');
INSERT INTO client (name, email) VALUES ('Lelia Corkery', 'jace15@gmail.com');
INSERT INTO client (name, email) VALUES ('Wilburn Thiel', 'kendall.wintheiser@gmail.com');
INSERT INTO client (name, email) VALUES ('Ms. Candido Leffler', 'vincent_pacocha40@yahoo.com');
INSERT INTO client (name, email) VALUES ('Lora Spencer', 'mireille_gislason32@hotmail.com');
INSERT INTO client (name, email) VALUES ('Savion Halvorson', 'jaquelin.keeling29@yahoo.com');
INSERT INTO client (name, email) VALUES ('Maximillia Tremblay DDS', 'okey34@gmail.com');
INSERT INTO client (name, email) VALUES ('Eldridge Senger', 'araceli60@gmail.com');
INSERT INTO client (name, email) VALUES ('Murray Schinner', 'aglae_larkin@hotmail.com');
INSERT INTO client (name, email) VALUES ('Reanna Rogahn', 'jedidiah.halvorson82@yahoo.com');
INSERT INTO client (name, email) VALUES ('Mrs. Willard Simonis', 'vern7@yahoo.com');
INSERT INTO client (name, email) VALUES ('Durward Lesch', 'ophelia_dubuque@yahoo.com');
INSERT INTO client (name, email) VALUES ('Alice Oberbrunner DDS', 'verla_wilkinson34@hotmail.com');
INSERT INTO client (name, email) VALUES ('Lennie Beer Jr.', 'bernhard.powlowski1@yahoo.com');
INSERT INTO client (name, email) VALUES ('Remington Orn', 'cecil.klein@hotmail.com');
INSERT INTO client (name, email) VALUES ('Mr. Amya Durgan', 'rosemary.labadie@hotmail.com');
INSERT INTO client (name, email) VALUES ('Jalen Metz', 'dorothea90@hotmail.com');
INSERT INTO client (name, email) VALUES ('Lilyan Dickens Sr.', 'dayana_fadel@gmail.com');
INSERT INTO client (name, email) VALUES ('Ansel Bahringer', 'tyree.greenfelder81@gmail.com');
INSERT INTO client (name, email) VALUES ('Miss Delores Donnelly', 'dayton_sauer@yahoo.com');
INSERT INTO client (name, email) VALUES ('Lia Hettinger', 'maximillian.carroll15@gmail.com');
INSERT INTO client (name, email) VALUES ('Amelie Dare IV', 'cale70@gmail.com');
INSERT INTO client (name, email) VALUES ('Elise Prosacco', 'emilio74@yahoo.com');
INSERT INTO client (name, email) VALUES ('Lucio Cormier', 'johan64@gmail.com');
INSERT INTO client (name, email) VALUES ('Pablo Weissnat', 'van_hirthe31@hotmail.com');
INSERT INTO client (name, email) VALUES ('Wilfredo Adams', 'genesis.stokes22@yahoo.com');
INSERT INTO client (name, email) VALUES ('Meghan Ratke', 'jettie_borer90@hotmail.com');
INSERT INTO client (name, email) VALUES ('Nico Moore', 'haven90@gmail.com');
INSERT INTO client (name, email) VALUES ('Kylie Wuckert', 'karen.buckridge@gmail.com');
INSERT INTO client (name, email) VALUES ('Lew White', 'micheal.senger@hotmail.com');
INSERT INTO client (name, email) VALUES ('Letitia Gutmann', 'thora_marvin38@gmail.com');
INSERT INTO client (name, email) VALUES ('Zachary Kozey', 'lurline73@hotmail.com');
INSERT INTO client (name, email) VALUES ('Mr. Sterling Okuneva', 'nelson86@yahoo.com');
INSERT INTO client (name, email) VALUES ('Jazmyne Corkery IV', 'lennie.greenfelder71@yahoo.com');
INSERT INTO client (name, email) VALUES ('Reese Wolf', 'noah.bergnaum@gmail.com');
INSERT INTO client (name, email) VALUES ('Willie Schowalter', 'garett50@gmail.com');
INSERT INTO client (name, email) VALUES ('Floyd Stoltenberg', 'kamren_cruickshank@gmail.com');
INSERT INTO client (name, email) VALUES ('Christiana Jast', 'nicholaus.murazik@gmail.com');
INSERT INTO client (name, email) VALUES ('Mrs. Malcolm Johnson', 'lacy_runte48@yahoo.com');
INSERT INTO client (name, email) VALUES ('Gilbert Bogan', 'zella94@yahoo.com');
INSERT INTO client (name, email) VALUES ('Arno Skiles', 'iva_jaskolski@gmail.com');
INSERT INTO client (name, email) VALUES ('Ms. Shannon Zulauf', 'daisha89@gmail.com');
INSERT INTO client (name, email) VALUES ('Lora Spencer', 'osvaldo_parisian@gmail.com');
INSERT INTO client (name, email) VALUES ('Brain Barton', 'lennie.turner51@yahoo.com');
INSERT INTO client (name, email) VALUES ('Rick Beatty', 'quinten_krajcik16@hotmail.com');
INSERT INTO client (name, email) VALUES ('Damion Emard', 'mallory47@gmail.com');
INSERT INTO client (name, email) VALUES ('Odie Ebert', 'darryl.bernhard@hotmail.com');
INSERT INTO client (name, email) VALUES ('Tyree Funk', 'jaida.oberbrunner@yahoo.com');
INSERT INTO client (name, email) VALUES ('Kaelyn Hansen', 'jacklyn70@gmail.com');
INSERT INTO client (name, email) VALUES ('Halie Jaskolski', 'ressie81@yahoo.com');
INSERT INTO client (name, email) VALUES ('Ludie Altenwerth', 'elouise_orn@hotmail.com');
INSERT INTO client (name, email) VALUES ('Sammy Smitham', 'marc24@hotmail.com');
INSERT INTO client (name, email) VALUES ('Shawn Hartmann', 'quinten.swaniawski@yahoo.com');
INSERT INTO client (name, email) VALUES ('Jaquan Reinger', 'toby19@hotmail.com');
INSERT INTO client (name, email) VALUES ('Elroy Larkin', 'branson34@yahoo.com');
INSERT INTO client (name, email) VALUES ('Larue Okuneva DVM', 'elizabeth_huel72@gmail.com');
INSERT INTO client (name, email) VALUES ('Aracely Kozey', 'geraldine_von72@gmail.com');
INSERT INTO client (name, email) VALUES ('Randy Harvey', 'wanda96@gmail.com');
INSERT INTO client (name, email) VALUES ('Earline Beer', 'susie.reynolds46@yahoo.com');
INSERT INTO client (name, email) VALUES ('Mrs. Gregorio Kshlerin', 'natalie_towne@yahoo.com');
INSERT INTO client (name, email) VALUES ('Gladys Carter', 'kianna36@yahoo.com');
INSERT INTO client (name, email) VALUES ('Martin Gorczany', 'carroll41@yahoo.com');
INSERT INTO client (name, email) VALUES ('Alexie Durgan', 'agustina93@gmail.com');
INSERT INTO client (name, email) VALUES ('Hassan Moen', 'nicola_wiza@gmail.com');
INSERT INTO client (name, email) VALUES ('Elvera Bernier', 'devonte78@yahoo.com');
INSERT INTO client (name, email) VALUES ('Eugene Kuhic', 'concepcion.adams@hotmail.com');
INSERT INTO client (name, email) VALUES ('Crystel Klocko', 'lance97@yahoo.com');
INSERT INTO client (name, email) VALUES ('Lilla Ruecker', 'rickie_murphy@hotmail.com');
INSERT INTO client (name, email) VALUES ('Selena Padberg', 'shaylee.quigley@hotmail.com');
INSERT INTO client (name, email) VALUES ('Delia Wisozk', 'frederic95@gmail.com');
INSERT INTO client (name, email) VALUES ('Waldo Goldner MD', 'rosario52@hotmail.com');
INSERT INTO client (name, email) VALUES ('Ms. Vernon Donnelly', 'keagan_kulas@yahoo.com');
INSERT INTO client (name, email) VALUES ('Sigrid Hansen', 'nelle57@gmail.com');
INSERT INTO client (name, email) VALUES ('Prudence Rutherford', 'raphael52@gmail.com');
INSERT INTO client (name, email) VALUES ('Mrs. Demarco Goyette', 'dion_christiansen76@gmail.com');
INSERT INTO client (name, email) VALUES ('Kiara Hagenes', 'augusta_muller6@hotmail.com');
INSERT INTO client (name, email) VALUES ('Mr. Demetris Bauch', 'jailyn65@gmail.com');
INSERT INTO client (name, email) VALUES ('Kurtis Upton', 'orville.bednar66@gmail.com');
INSERT INTO client (name, email) VALUES ('Mr. Reanna Glover', 'hermann.thiel23@gmail.com');
INSERT INTO client (name, email) VALUES ('Ahmed Boehm', 'tracy64@hotmail.com');
INSERT INTO client (name, email) VALUES ('Gavin Schiller', 'miracle.parker73@yahoo.com');
INSERT INTO client (name, email) VALUES ('Tremayne Zboncak DVM', 'marietta2@yahoo.com');
INSERT INTO client (name, email) VALUES ('America Cremin', 'layla.hermiston@hotmail.com');
INSERT INTO client (name, email) VALUES ('Mrs. Jules Luettgen', 'danielle62@gmail.com');
INSERT INTO client (name, email) VALUES ('Marcellus Gaylord', 'brandon76@yahoo.com');
INSERT INTO client (name, email) VALUES ('Leonor Graham', 'rusty61@gmail.com');
INSERT INTO client (name, email) VALUES ('Stanton Ortiz', 'faustino_tillman@yahoo.com');
INSERT INTO client (name, email) VALUES ('Alyce Schamberger', 'dominique.rath@yahoo.com');
INSERT INTO client (name, email) VALUES ('Claire Franecki', 'vivien37@gmail.com');
INSERT INTO client (name, email) VALUES ('Henderson Hoeger DVM', 'jonathon_pollich60@hotmail.com');
INSERT INTO client (name, email) VALUES ('Toy Connelly', 'clemens.friesen32@gmail.com');
INSERT INTO client (name, email) VALUES ('Miss Tate Ward', 'alexanne82@hotmail.com');
INSERT INTO client (name, email) VALUES ('Ervin Grimes MD', 'zola12@gmail.com');
INSERT INTO client (name, email) VALUES ('Caleb Volkman', 'gilberto_zemlak@yahoo.com');
INSERT INTO client (name, email) VALUES ('Alexys Schulist', 'alexie30@yahoo.com');
INSERT INTO client (name, email) VALUES ('Roberta Morissette', 'carrie71@yahoo.com');
INSERT INTO client (name, email) VALUES ('Ms. Carolina Carter', 'lavern_stroman93@hotmail.com');
INSERT INTO client (name, email) VALUES ('Dillan Mante', 'ardella_kozey@hotmail.com');
INSERT INTO client (name, email) VALUES ('Adrienne Grimes', 'zita.crona33@yahoo.com');
INSERT INTO client (name, email) VALUES ('Helene Satterfield', 'mylene_kuhic@yahoo.com');
INSERT INTO client (name, email) VALUES ('Vernice Mann', 'nathen.reichert@hotmail.com');
INSERT INTO client (name, email) VALUES ('Zella Gusikowski', 'timmothy_huel@gmail.com');
INSERT INTO client (name, email) VALUES ('Lindsay Paucek', 'anastacio1@hotmail.com');
INSERT INTO client (name, email) VALUES ('Albertha Goodwin II', 'meagan2@yahoo.com');
INSERT INTO client (name, email) VALUES ('Emmie Treutel', 'talon_romaguera5@yahoo.com');
INSERT INTO client (name, email) VALUES ('Joel Fisher', 'elmer16@hotmail.com');
INSERT INTO client (name, email) VALUES ('Heaven Nitzsche', 'amos_pagac@hotmail.com');
INSERT INTO client (name, email) VALUES ('Corrine Watsica', 'micaela41@hotmail.com');
INSERT INTO client (name, email) VALUES ('Jovan Kerluke', 'adele88@yahoo.com');
INSERT INTO client (name, email) VALUES ('Mr. Percival Hane', 'gino_gorczany@hotmail.com');
INSERT INTO client (name, email) VALUES ('Lloyd Medhurst', 'stan_kertzmann48@yahoo.com');
INSERT INTO client (name, email) VALUES ('Demetris Hoppe', 'kaia.ledner23@yahoo.com');
INSERT INTO client (name, email) VALUES ('Everardo Kozey', 'simone_eichmann@hotmail.com');
INSERT INTO client (name, email) VALUES ('Tamia Boehm MD', 'justina49@hotmail.com');
INSERT INTO client (name, email) VALUES ('Theodore Shanahan', 'braulio_mraz@yahoo.com');
INSERT INTO client (name, email) VALUES ('Lavina Kemmer', 'oren.dickinson@hotmail.com');
INSERT INTO client (name, email) VALUES ('Magnus Turner', 'wendy_gaylord@gmail.com');
INSERT INTO client (name, email) VALUES ('Danika Herzog', 'torey.mante72@hotmail.com');
INSERT INTO client (name, email) VALUES ('Gwendolyn Haag', 'marisa_bartell34@gmail.com');
INSERT INTO client (name, email) VALUES ('Michale Dach', 'ines27@hotmail.com');
INSERT INTO client (name, email) VALUES ('Lloyd Abernathy', 'robin47@yahoo.com');
INSERT INTO client (name, email) VALUES ('Dayna Langworth', 'clovis59@gmail.com');
INSERT INTO client (name, email) VALUES ('Gerald Prohaska', 'santos.bernhard73@yahoo.com');
INSERT INTO client (name, email) VALUES ('Emmanuelle Schaefer', 'bette.christiansen@yahoo.com');
INSERT INTO client (name, email) VALUES ('Corrine Fisher', 'andy.haag@gmail.com');
INSERT INTO client (name, email) VALUES ('Giovanny Senger IV', 'ricky.auer@gmail.com');
INSERT INTO client (name, email) VALUES ('Miss Fidel Feest', 'odell47@gmail.com');
INSERT INTO client (name, email) VALUES ('Asia Schumm', 'giovanny10@gmail.com');
INSERT INTO client (name, email) VALUES ('Mariah McGlynn DDS', 'evan_treutel@gmail.com');
INSERT INTO client (name, email) VALUES ('Chance Daniel', 'judge_bradtke@hotmail.com');
INSERT INTO client (name, email) VALUES ('Jade Rodriguez', 'aniya74@hotmail.com');
INSERT INTO client (name, email) VALUES ('Providenci Bechtelar I', 'don94@gmail.com');
INSERT INTO client (name, email) VALUES ('Ms. Grover Leannon', 'claudine79@hotmail.com');
INSERT INTO client (name, email) VALUES ('Lurline Sauer I', 'leilani_hamill@hotmail.com');
INSERT INTO client (name, email) VALUES ('Johnny McLaughlin', 'tillman.steuber20@yahoo.com');
INSERT INTO client (name, email) VALUES ('Rickie Spinka', 'ava_buckridge@gmail.com');
INSERT INTO client (name, email) VALUES ('Nicole Cormier', 'jayda25@gmail.com');
INSERT INTO client (name, email) VALUES ('Jovan Rippin', 'rodrigo_anderson67@yahoo.com');
INSERT INTO client (name, email) VALUES ('Karley Purdy', 'cloyd.rohan93@yahoo.com');
INSERT INTO client (name, email) VALUES ('Mrs. Tressa Stoltenberg', 'cornell.hilpert32@hotmail.com');
INSERT INTO client (name, email) VALUES ('Hailee Grady', 'elvis_quigley@hotmail.com');
INSERT INTO client (name, email) VALUES ('Lavinia Goodwin', 'fernando_collier63@gmail.com');
INSERT INTO client (name, email) VALUES ('Estelle Ullrich', 'torrey.bogisich21@hotmail.com');
INSERT INTO client (name, email) VALUES ('Kathryn Hessel MD', 'bartholome_mccullough@hotmail.com');
INSERT INTO client (name, email) VALUES ('Neal Beahan', 'laverne.bauch@gmail.com');
INSERT INTO client (name, email) VALUES ('Eleanore Abbott V', 'serenity19@gmail.com');
INSERT INTO client (name, email) VALUES ('Aric Gislason', 'vincenzo_hickle91@gmail.com');
INSERT INTO client (name, email) VALUES ('Keely Ledner', 'jose46@gmail.com');
INSERT INTO client (name, email) VALUES ('Dr. Keira OKeefe', 'shakira_harvey@hotmail.com');
INSERT INTO client (name, email) VALUES ('Nicolette Ankunding', 'justina20@yahoo.com');
INSERT INTO client (name, email) VALUES ('Nicole Halvorson V', 'ashlynn27@hotmail.com');
INSERT INTO client (name, email) VALUES ('Leola Wisoky', 'reece_bruen@hotmail.com');
INSERT INTO client (name, email) VALUES ('Erica Hirthe', 'bret.koch@hotmail.com');
INSERT INTO client (name, email) VALUES ('Jefferey Koss', 'loyal55@hotmail.com');
INSERT INTO client (name, email) VALUES ('Nora Wisozk', 'beryl_emard@hotmail.com');
INSERT INTO client (name, email) VALUES ('Rex Johns', 'terry4@yahoo.com');
INSERT INTO client (name, email) VALUES ('Elmore OConner DDS', 'rhoda.kessler@yahoo.com');
INSERT INTO client (name, email) VALUES ('Mrs. Dallas Orn', 'vance85@gmail.com');
INSERT INTO client (name, email) VALUES ('Florida Hoeger MD', 'taryn_wisoky92@gmail.com');
INSERT INTO client (name, email) VALUES ('Veronica Torphy MD', 'fern26@yahoo.com');
INSERT INTO client (name, email) VALUES ('Dr. Jed Shanahan', 'queen_vonrueden30@hotmail.com');
INSERT INTO client (name, email) VALUES ('Viola Mosciski', 'eli.schroeder@yahoo.com');
INSERT INTO client (name, email) VALUES ('Eryn Collins', 'mathew.hegmann55@hotmail.com');
INSERT INTO client (name, email) VALUES ('Luz Wunsch', 'tania36@yahoo.com');
INSERT INTO client (name, email) VALUES ('Chauncey McKenzie', 'florian83@yahoo.com');
INSERT INTO client (name, email) VALUES ('Brandon Lehner', 'amber94@gmail.com');
INSERT INTO client (name, email) VALUES ('Elda Walter', 'dangelo_schaefer@gmail.com');
INSERT INTO client (name, email) VALUES ('Arthur Hills', 'joshua_gerlach@hotmail.com');
INSERT INTO client (name, email) VALUES ('Kira Ondricka', 'jerod.kirlin11@yahoo.com');
INSERT INTO client (name, email) VALUES ('Elissa Gutmann', 'braulio.langosh@gmail.com');
INSERT INTO client (name, email) VALUES ('Alejandrin Rath', 'jessika_hettinger@gmail.com');
INSERT INTO client (name, email) VALUES ('Kellen Bernhard', 'verla.reynolds@yahoo.com');
INSERT INTO client (name, email) VALUES ('Zachariah Hane', 'hiram.spinka80@yahoo.com');
INSERT INTO client (name, email) VALUES ('Hazle Roberts', 'julius19@yahoo.com');
INSERT INTO client (name, email) VALUES ('Dayna Anderson', 'jany_brakus@yahoo.com');
INSERT INTO client (name, email) VALUES ('Don Veum Jr.', 'friedrich.frami@yahoo.com');
INSERT INTO client (name, email) VALUES ('Alfredo Kreiger', 'major47@hotmail.com');
INSERT INTO client (name, email) VALUES ('Era Mills PhD', 'florence.predovic39@yahoo.com');
INSERT INTO client (name, email) VALUES ('Claud Pfeffer DVM', 'crawford.hayes63@gmail.com');
INSERT INTO client (name, email) VALUES ('Bernadette Nader', 'israel.hahn88@yahoo.com');
INSERT INTO client (name, email) VALUES ('Christophe Powlowski', 'napoleon.collins96@yahoo.com');
INSERT INTO client (name, email) VALUES ('Kitty Blick', 'telly14@hotmail.com');
INSERT INTO client (name, email) VALUES ('Roma Kihn', 'edwin92@hotmail.com');
INSERT INTO client (name, email) VALUES ('Brendon Leffler', 'alexys36@gmail.com');
INSERT INTO client (name, email) VALUES ('Ned Cummings DDS', 'johnnie_zboncak87@hotmail.com');
INSERT INTO client (name, email) VALUES ('Colten Lehner', 'clair8@yahoo.com');
INSERT INTO client (name, email) VALUES ('Paula Wisozk', 'eldridge20@yahoo.com');
INSERT INTO client (name, email) VALUES ('Nikolas Watsica', 'flo_runolfsson@hotmail.com');
INSERT INTO client (name, email) VALUES ('Gabe Lowe', 'hardy_walker34@hotmail.com');
INSERT INTO client (name, email) VALUES ('Vance Lind', 'marcia.konopelski@gmail.com');
INSERT INTO client (name, email) VALUES ('Miss Natalie Kris', 'noe50@yahoo.com');
INSERT INTO client (name, email) VALUES ('Verna Hodkiewicz', 'jackie34@yahoo.com');
INSERT INTO client (name, email) VALUES ('Albertha Mueller', 'vicente.pfannerstill35@hotmail.com');
INSERT INTO client (name, email) VALUES ('Paula Shields', 'ignatius.goyette70@hotmail.com');
INSERT INTO client (name, email) VALUES ('Ambrose Jacobi', 'verlie.rempel57@yahoo.com');
INSERT INTO client (name, email) VALUES ('Talia Bernier', 'jarvis68@gmail.com');
INSERT INTO client (name, email) VALUES ('Philip Roberts', 'angeline_zemlak6@yahoo.com');
INSERT INTO client (name, email) VALUES ('Dr. Corbin Schaefer', 'trever_jenkins@hotmail.com');
INSERT INTO client (name, email) VALUES ('Ron Schinner', 'gabriella.hills@gmail.com');
INSERT INTO client (name, email) VALUES ('Rocky Romaguera', 'alison97@yahoo.com');
INSERT INTO client (name, email) VALUES ('Stanley Cassin', 'virginia3@hotmail.com');
INSERT INTO client (name, email) VALUES ('Miss Nathanial Wyman', 'halie_mitchell95@yahoo.com');
INSERT INTO client (name, email) VALUES ('Ashtyn Johnson', 'lucious69@yahoo.com');
INSERT INTO client (name, email) VALUES ('Alba Nikolaus', 'rahsaan11@hotmail.com');
INSERT INTO client (name, email) VALUES ('Clemmie Reichel', 'earl_lakin@yahoo.com');
INSERT INTO client (name, email) VALUES ('Kyler Hoeger', 'jeff_krajcik@gmail.com');
INSERT INTO client (name, email) VALUES ('Savanna Lind', 'jeanne.huels@hotmail.com');
INSERT INTO client (name, email) VALUES ('Tad Erdman', 'krystel_dach@hotmail.com');
INSERT INTO client (name, email) VALUES ('Ellie Moore', 'kim_weimann63@hotmail.com');
INSERT INTO client (name, email) VALUES ('Ms. Xavier Hartmann', 'foster_hills44@gmail.com');
INSERT INTO client (name, email) VALUES ('Justice Haag', 'rosie_murray@gmail.com');
INSERT INTO client (name, email) VALUES ('Zoey Marvin', 'ardith68@hotmail.com');
INSERT INTO client (name, email) VALUES ('Juston Adams Jr.', 'mina_reilly34@gmail.com');
INSERT INTO client (name, email) VALUES ('Tyrell Borer', 'dominique.kreiger@gmail.com');
INSERT INTO client (name, email) VALUES ('Mr. Taryn Dare', 'darryl_gutmann@hotmail.com');
INSERT INTO client (name, email) VALUES ('Willis Jacobs', 'meredith_stark75@gmail.com');
INSERT INTO client (name, email) VALUES ('Eladio Hackett Sr.', 'everett28@gmail.com');
INSERT INTO client (name, email) VALUES ('Rhiannon Satterfield', 'makenna76@yahoo.com');
INSERT INTO client (name, email) VALUES ('Elisa Nikolaus PhD', 'lyla40@yahoo.com');
INSERT INTO client (name, email) VALUES ('Frederick Kovacek', 'retta_vandervort37@hotmail.com');
INSERT INTO client (name, email) VALUES ('Addison Auer II', 'green.nienow@yahoo.com');
INSERT INTO client (name, email) VALUES ('Rhiannon Hickle', 'rubie_okeefe67@gmail.com');
INSERT INTO client (name, email) VALUES ('Tanner Daniel', 'mia.graham52@hotmail.com');
INSERT INTO client (name, email) VALUES ('Neil Goyette', 'lavada_gaylord22@hotmail.com');
INSERT INTO client (name, email) VALUES ('Stacey Lockman', 'olin_kerluke64@hotmail.com');
INSERT INTO client (name, email) VALUES ('Eleanora Kreiger', 'napoleon_larkin@gmail.com');
INSERT INTO client (name, email) VALUES ('Liliane Graham V', 'raphael52@yahoo.com');
INSERT INTO client (name, email) VALUES ('Rosalind McKenzie I', 'keagan32@gmail.com');
INSERT INTO client (name, email) VALUES ('Mrs. Sabina Von', 'tatum72@yahoo.com');
INSERT INTO client (name, email) VALUES ('Irving Kuhic', 'ima_schultz@hotmail.com');
INSERT INTO client (name, email) VALUES ('Caitlyn Beer', 'caterina.kuhic@gmail.com');
INSERT INTO client (name, email) VALUES ('Eleazar Cartwright', 'harvey31@yahoo.com');
INSERT INTO client (name, email) VALUES ('Onie Prosacco', 'ladarius.anderson@yahoo.com');
INSERT INTO client (name, email) VALUES ('Miss Abby Willms', 'ima_shanahan@hotmail.com');
INSERT INTO client (name, email) VALUES ('Hilton Corwin', 'robert_larkin@hotmail.com');
INSERT INTO client (name, email) VALUES ('Sterling Daniel', 'rebeca45@hotmail.com');
INSERT INTO client (name, email) VALUES ('Thurman Wyman', 'citlalli19@hotmail.com');
INSERT INTO client (name, email) VALUES ('Mrs. Berniece Crooks', 'maudie.kunde@yahoo.com');
INSERT INTO client (name, email) VALUES ('Hannah Thiel', 'hadley_kuhic17@hotmail.com');
INSERT INTO client (name, email) VALUES ('Russel Fisher', 'elian.bartoletti@hotmail.com');
INSERT INTO client (name, email) VALUES ('Mia Hegmann', 'chesley.mccullough66@hotmail.com');
INSERT INTO client (name, email) VALUES ('Mrs. Jess Hirthe', 'casimir68@yahoo.com');
INSERT INTO client (name, email) VALUES ('Talon Luettgen', 'meghan73@yahoo.com');
INSERT INTO client (name, email) VALUES ('Alize Eichmann', 'bria.swaniawski4@yahoo.com');
INSERT INTO client (name, email) VALUES ('Elmer Ondricka', 'luigi.morissette@gmail.com');
INSERT INTO client (name, email) VALUES ('Kara Dickinson', 'jettie92@gmail.com');
INSERT INTO client (name, email) VALUES ('Titus Medhurst', 'osbaldo.bruen6@gmail.com');
INSERT INTO client (name, email) VALUES ('Magdalena Veum', 'yessenia_swift26@gmail.com');
INSERT INTO client (name, email) VALUES ('Tyrese Feil', 'angus.grimes86@gmail.com');
INSERT INTO client (name, email) VALUES ('Mrs. Alfonso Spencer', 'kendra_marks68@gmail.com');
INSERT INTO client (name, email) VALUES ('Alexandre Will', 'raul.johns@gmail.com');
INSERT INTO client (name, email) VALUES ('Howard Goodwin', 'zackary.spencer@gmail.com');
INSERT INTO client (name, email) VALUES ('Anne McLaughlin Jr.', 'edmond_jakubowski60@gmail.com');
INSERT INTO client (name, email) VALUES ('Edwina Tillman', 'roberta.ortiz@yahoo.com');
INSERT INTO client (name, email) VALUES ('Kaelyn Zieme', 'estella73@yahoo.com');
INSERT INTO client (name, email) VALUES ('Kristin Rodriguez', 'monty_parisian@hotmail.com');
INSERT INTO client (name, email) VALUES ('Kelley Lueilwitz', 'deshaun.mccullough@yahoo.com');
INSERT INTO client (name, email) VALUES ('Araceli Conroy', 'rasheed_feil@hotmail.com');
INSERT INTO client (name, email) VALUES ('Margaretta Littel', 'lea_leuschke25@hotmail.com');
INSERT INTO client (name, email) VALUES ('Jensen Grimes', 'amelia_donnelly@gmail.com');
INSERT INTO client (name, email) VALUES ('Jayce Marquardt', 'lenny.carter@yahoo.com');
INSERT INTO client (name, email) VALUES ('Roberta Vandervort', 'audie61@gmail.com');
INSERT INTO client (name, email) VALUES ('Brandt Bergnaum', 'madelyn_lockman@hotmail.com');
INSERT INTO client (name, email) VALUES ('Tod Mertz', 'holden_harber90@yahoo.com');
INSERT INTO client (name, email) VALUES ('Adele Homenick', 'gilberto26@yahoo.com');
INSERT INTO client (name, email) VALUES ('Roberto Mann', 'vilma_hackett78@gmail.com');
INSERT INTO client (name, email) VALUES ('Jolie Effertz', 'neha.wolf59@hotmail.com');
INSERT INTO client (name, email) VALUES ('Gussie Thompson', 'dakota_kilback31@yahoo.com');
INSERT INTO client (name, email) VALUES ('Winston Stroman Sr.', 'vicky73@hotmail.com');
INSERT INTO client (name, email) VALUES ('Dr. Myles Von', 'miller.cummerata5@gmail.com');
INSERT INTO client (name, email) VALUES ('Jodie Murazik', 'bridgette_grady61@gmail.com');
INSERT INTO client (name, email) VALUES ('Pattie Boyle', 'theron.schinner48@hotmail.com');
INSERT INTO client (name, email) VALUES ('Darien Hilpert', 'margarita6@yahoo.com');
INSERT INTO client (name, email) VALUES ('Miss Efren Koch', 'tito1@yahoo.com');
INSERT INTO client (name, email) VALUES ('Kamron Effertz', 'newell.dicki@gmail.com');
INSERT INTO client (name, email) VALUES ('Jaycee Auer', 'dino42@hotmail.com');
INSERT INTO client (name, email) VALUES ('Hannah Rutherford', 'leora68@yahoo.com');
INSERT INTO client (name, email) VALUES ('Jesse Gislason', 'percy.kihn@gmail.com');
INSERT INTO client (name, email) VALUES ('Carlos Hoeger V', 'rubie.pagac88@gmail.com');
INSERT INTO client (name, email) VALUES ('Rowan Beahan II', 'shanon.anderson@gmail.com');
INSERT INTO client (name, email) VALUES ('Mr. Joey Ruecker', 'odessa.kautzer@hotmail.com');
INSERT INTO client (name, email) VALUES ('Ms. Jessyca Flatley', 'broderick11@yahoo.com');
INSERT INTO client (name, email) VALUES ('Tina Jakubowski', 'era.terry90@hotmail.com');
INSERT INTO client (name, email) VALUES ('Shanna Nienow MD', 'verlie.schaefer@hotmail.com');
INSERT INTO client (name, email) VALUES ('Isabel MacGyver', 'muhammad.bruen@gmail.com');
INSERT INTO client (name, email) VALUES ('Linwood Altenwerth', 'yolanda13@gmail.com');
INSERT INTO client (name, email) VALUES ('Davion Hackett', 'obie15@hotmail.com');
INSERT INTO client (name, email) VALUES ('Rhianna Muller', 'emelia_frami@gmail.com');
INSERT INTO client (name, email) VALUES ('Dortha Kuvalis', 'dolly_lang73@gmail.com');
INSERT INTO client (name, email) VALUES ('Karley Conroy', 'orion.hamill32@gmail.com');
INSERT INTO client (name, email) VALUES ('Bennie Cartwright', 'kris.littel2@yahoo.com');
INSERT INTO client (name, email) VALUES ('Jordi Von', 'rosalind.dare@hotmail.com');
INSERT INTO client (name, email) VALUES ('Kathryne Raynor Sr.', 'abraham_frami@hotmail.com');
INSERT INTO client (name, email) VALUES ('Silas Collier', 'nigel44@hotmail.com');
INSERT INTO client (name, email) VALUES ('Miss Camren Witting', 'buddy_reichert52@hotmail.com');
INSERT INTO client (name, email) VALUES ('Kavon Langworth', 'carolanne_littel@yahoo.com');
INSERT INTO client (name, email) VALUES ('Krista Kreiger', 'grady.smith@hotmail.com');
INSERT INTO client (name, email) VALUES ('Mr. Domingo Rippin', 'alessandra71@hotmail.com');
INSERT INTO client (name, email) VALUES ('Ms. Abigale Stiedemann', 'humberto18@hotmail.com');
INSERT INTO client (name, email) VALUES ('Karl McKenzie II', 'brenda_bergstrom41@gmail.com');
INSERT INTO client (name, email) VALUES ('Adam Batz', 'mateo.jacobi@yahoo.com');
INSERT INTO client (name, email) VALUES ('Gerardo Yundt', 'lafayette7@yahoo.com');
INSERT INTO client (name, email) VALUES ('Keagan Stark', 'solon95@gmail.com');
INSERT INTO client (name, email) VALUES ('Kane Rodriguez', 'garfield70@yahoo.com');
INSERT INTO client (name, email) VALUES ('Cristian Bayer', 'nathaniel20@yahoo.com');
INSERT INTO client (name, email) VALUES ('Ms. Marty Wolff', 'gerardo98@gmail.com');
INSERT INTO client (name, email) VALUES ('Lucy Graham', 'audie.stoltenberg@yahoo.com');
INSERT INTO client (name, email) VALUES ('Wellington Stiedemann', 'braden.gaylord@yahoo.com');
INSERT INTO client (name, email) VALUES ('Graham Jones', 'jada_zemlak25@hotmail.com');
INSERT INTO client (name, email) VALUES ('Theresa Effertz', 'nova10@gmail.com');
INSERT INTO client (name, email) VALUES ('Mrs. Jaylon Jaskolski', 'emmanuelle82@hotmail.com');
INSERT INTO client (name, email) VALUES ('Carlos Hoppe', 'cornell96@yahoo.com');
INSERT INTO client (name, email) VALUES ('Arnaldo Heidenreich V', 'justen49@hotmail.com');
INSERT INTO client (name, email) VALUES ('Elmer Heaney', 'grover_ortiz@yahoo.com');
INSERT INTO client (name, email) VALUES ('Vicky Lehner', 'alanis_bechtelar59@gmail.com');
INSERT INTO client (name, email) VALUES ('Sonny Dickinson', 'maribel.mertz@gmail.com');
INSERT INTO client (name, email) VALUES ('Isom Prohaska', 'destin_stracke78@gmail.com');
INSERT INTO client (name, email) VALUES ('Sebastian Lowe', 'amaya_aufderhar20@gmail.com');
INSERT INTO client (name, email) VALUES ('Berniece Corwin', 'demario_boyer76@hotmail.com');
INSERT INTO client (name, email) VALUES ('Emmalee Koelpin', 'taylor.osinski@yahoo.com');
INSERT INTO client (name, email) VALUES ('Lonny Schroeder V', 'brittany_renner87@yahoo.com');
INSERT INTO client (name, email) VALUES ('Grayce Runolfsdottir DVM', 'aracely.lang91@gmail.com');
INSERT INTO client (name, email) VALUES ('Gilda Legros', 'nella.runte23@gmail.com');
INSERT INTO client (name, email) VALUES ('Art Davis', 'nathanael_kuhic@gmail.com');
INSERT INTO client (name, email) VALUES ('Forest Tromp', 'stephania.bruen@hotmail.com');
INSERT INTO client (name, email) VALUES ('Natasha Romaguera', 'rita_okuneva20@yahoo.com');
INSERT INTO client (name, email) VALUES ('Orlando Goodwin', 'alda_torp82@yahoo.com');
INSERT INTO client (name, email) VALUES ('Reymundo Lesch', 'matteo.jaskolski@yahoo.com');
INSERT INTO client (name, email) VALUES ('Stanford Jacobson', 'alene_veum63@hotmail.com');
INSERT INTO client (name, email) VALUES ('Garrett Watsica', 'jamarcus_tromp@gmail.com');
INSERT INTO client (name, email) VALUES ('Kellen Bergnaum Sr.', 'sonya_kilback@gmail.com');
INSERT INTO client (name, email) VALUES ('Jacklyn Johns', 'antonina_cassin21@gmail.com');
INSERT INTO client (name, email) VALUES ('Felicita Lesch', 'lucas93@yahoo.com');
INSERT INTO client (name, email) VALUES ('Addison Hermiston', 'cyrus.kautzer78@yahoo.com');
INSERT INTO client (name, email) VALUES ('Connie Mohr', 'mathilde97@yahoo.com');
INSERT INTO client (name, email) VALUES ('Albin Greenfelder', 'haley.ankunding87@gmail.com');
INSERT INTO client (name, email) VALUES ('Kelley Brekke', 'ernesto_ratke@hotmail.com');
INSERT INTO client (name, email) VALUES ('Ms. Henriette Emard', 'madisen.nikolaus95@gmail.com');
INSERT INTO client (name, email) VALUES ('Shirley Ward', 'juvenal_cruickshank2@gmail.com');
INSERT INTO client (name, email) VALUES ('Emory Dickens', 'anabelle_kessler45@gmail.com');
INSERT INTO client (name, email) VALUES ('Bulah Cormier', 'jammie_hartmann@gmail.com');
INSERT INTO client (name, email) VALUES ('Kristopher Kuhlman', 'edwin_dietrich@hotmail.com');
INSERT INTO client (name, email) VALUES ('Wiley Reynolds', 'natasha5@hotmail.com');
INSERT INTO client (name, email) VALUES ('Amir Schamberger', 'adrienne_lindgren@hotmail.com');
INSERT INTO client (name, email) VALUES ('Alessandra Gaylord', 'destiny.ziemann@gmail.com');
INSERT INTO client (name, email) VALUES ('Emma Jast', 'dominique_langworth@yahoo.com');
INSERT INTO client (name, email) VALUES ('Lilyan Raynor', 'darron94@hotmail.com');
INSERT INTO client (name, email) VALUES ('Jailyn Rath', 'juana.stark31@gmail.com');
INSERT INTO client (name, email) VALUES ('Fern Fisher', 'chesley_hane81@gmail.com');
INSERT INTO client (name, email) VALUES ('Lambert Heidenreich', 'levi34@hotmail.com');
INSERT INTO client (name, email) VALUES ('Rylan Ebert', 'lorenz.haley@hotmail.com');
INSERT INTO client (name, email) VALUES ('Colten Wunsch', 'harmony_volkman@gmail.com');
INSERT INTO client (name, email) VALUES ('Reed Welch', 'tyrel33@gmail.com');
INSERT INTO client (name, email) VALUES ('Vivien Dickens', 'karina_schimmel67@yahoo.com');
INSERT INTO client (name, email) VALUES ('Lazaro Schiller', 'justine57@yahoo.com');
INSERT INTO client (name, email) VALUES ('Destini Goldner', 'lucius.mcglynn@yahoo.com');
INSERT INTO client (name, email) VALUES ('Christa Abbott', 'adolfo_hagenes78@yahoo.com');
INSERT INTO client (name, email) VALUES ('Nyah Altenwerth', 'timothy.marquardt@gmail.com');
INSERT INTO client (name, email) VALUES ('Deangelo Turner', 'dexter78@gmail.com');
INSERT INTO client (name, email) VALUES ('Roberto Rolfson', 'johnathan42@gmail.com');
INSERT INTO client (name, email) VALUES ('Manuela Treutel DDS', 'brock.sauer@hotmail.com');
INSERT INTO client (name, email) VALUES ('Miss Willa Altenwerth', 'tristian32@hotmail.com');
INSERT INTO client (name, email) VALUES ('Tremayne Eichmann', 'olen_berge@yahoo.com');
INSERT INTO client (name, email) VALUES ('Nat Stroman', 'bessie.upton99@hotmail.com');
INSERT INTO client (name, email) VALUES ('Miss Deon Dach', 'eddie_johnson@hotmail.com');
INSERT INTO client (name, email) VALUES ('Stephania Stracke', 'ima_fisher87@yahoo.com');
INSERT INTO client (name, email) VALUES ('Miss Casimer Vandervort', 'ericka_trantow81@yahoo.com');
INSERT INTO client (name, email) VALUES ('Cyrus Denesik', 'kole.hickle@gmail.com');
INSERT INTO client (name, email) VALUES ('Theresa Wisoky', 'ivah81@hotmail.com');
INSERT INTO client (name, email) VALUES ('Lurline Wisoky', 'thomas_hirthe97@yahoo.com');
INSERT INTO client (name, email) VALUES ('Dominique Wiza', 'queen.ledner@yahoo.com');
INSERT INTO client (name, email) VALUES ('Amiya Medhurst', 'daryl.cummings42@gmail.com');
INSERT INTO client (name, email) VALUES ('Mr. Nova Stoltenberg', 'alvena.harber18@hotmail.com');
INSERT INTO client (name, email) VALUES ('Silas Christiansen', 'rhea18@yahoo.com');
INSERT INTO client (name, email) VALUES ('Aron Torphy', 'judd76@gmail.com');
INSERT INTO client (name, email) VALUES ('Kristin Carroll IV', 'cesar.moore@yahoo.com');
INSERT INTO client (name, email) VALUES ('Cassidy Sipes', 'destin39@hotmail.com');
INSERT INTO client (name, email) VALUES ('Ignacio Shields', 'paris_reynolds@yahoo.com');
INSERT INTO client (name, email) VALUES ('Allene Stokes', 'rossie.kshlerin@hotmail.com');
INSERT INTO client (name, email) VALUES ('Mrs. Hugh Jenkins', 'timmothy70@yahoo.com');
INSERT INTO client (name, email) VALUES ('Chelsie Toy', 'hayley.koepp@gmail.com');
INSERT INTO client (name, email) VALUES ('Hubert Rutherford', 'leone18@yahoo.com');
INSERT INTO client (name, email) VALUES ('Richard Harber IV', 'sandy.dubuque@yahoo.com');
INSERT INTO client (name, email) VALUES ('Karson Hilll', 'enrique.eichmann25@yahoo.com');
INSERT INTO client (name, email) VALUES ('Willy Schumm', 'carleton.wyman73@yahoo.com');
INSERT INTO client (name, email) VALUES ('Luis Donnelly', 'nicholaus.dietrich55@gmail.com');
INSERT INTO client (name, email) VALUES ('Daphnee Leuschke', 'howell.okeefe@gmail.com');
INSERT INTO client (name, email) VALUES ('Carlo Cassin IV', 'aron_white65@gmail.com');
ALTER TABLE purchase ADD COLUMN client_id INT AFTER id;
UPDATE purchase SET client_id = 111 WHERE id = 1;
UPDATE purchase SET client_id = 460 WHERE id = 2;
UPDATE purchase SET client_id = 264 WHERE id = 3;
UPDATE purchase SET client_id = 146 WHERE id = 4;
UPDATE purchase SET client_id = 365 WHERE id = 5;
UPDATE purchase SET client_id = 493 WHERE id = 6;
UPDATE purchase SET client_id = 45 WHERE id = 7;
UPDATE purchase SET client_id = 208 WHERE id = 8;
UPDATE purchase SET client_id = 187 WHERE id = 9;
UPDATE purchase SET client_id = 189 WHERE id = 10;
UPDATE purchase SET client_id = 136 WHERE id = 11;
UPDATE purchase SET client_id = 100 WHERE id = 12;
UPDATE purchase SET client_id = 286 WHERE id = 13;
UPDATE purchase SET client_id = 305 WHERE id = 14;
UPDATE purchase SET client_id = 85 WHERE id = 15;
UPDATE purchase SET client_id = 351 WHERE id = 16;
UPDATE purchase SET client_id = 319 WHERE id = 17;
UPDATE purchase SET client_id = 465 WHERE id = 18;
UPDATE purchase SET client_id = 435 WHERE id = 19;
UPDATE purchase SET client_id = 279 WHERE id = 20;
UPDATE purchase SET client_id = 40 WHERE id = 21;
UPDATE purchase SET client_id = 217 WHERE id = 22;
UPDATE purchase SET client_id = 78 WHERE id = 23;
UPDATE purchase SET client_id = 184 WHERE id = 24;
UPDATE purchase SET client_id = 48 WHERE id = 25;
UPDATE purchase SET client_id = 192 WHERE id = 26;
UPDATE purchase SET client_id = 102 WHERE id = 27;
UPDATE purchase SET client_id = 227 WHERE id = 28;
UPDATE purchase SET client_id = 291 WHERE id = 29;
UPDATE purchase SET client_id = 258 WHERE id = 30;
UPDATE purchase SET client_id = 22 WHERE id = 31;
UPDATE purchase SET client_id = 134 WHERE id = 32;
UPDATE purchase SET client_id = 23 WHERE id = 33;
UPDATE purchase SET client_id = 100 WHERE id = 34;
UPDATE purchase SET client_id = 1 WHERE id = 35;
UPDATE purchase SET client_id = 403 WHERE id = 36;
UPDATE purchase SET client_id = 155 WHERE id = 37;
UPDATE purchase SET client_id = 344 WHERE id = 38;
UPDATE purchase SET client_id = 357 WHERE id = 39;
UPDATE purchase SET client_id = 472 WHERE id = 40;
UPDATE purchase SET client_id = 428 WHERE id = 41;
UPDATE purchase SET client_id = 328 WHERE id = 42;
UPDATE purchase SET client_id = 27 WHERE id = 43;
UPDATE purchase SET client_id = 398 WHERE id = 44;
UPDATE purchase SET client_id = 444 WHERE id = 45;
UPDATE purchase SET client_id = 120 WHERE id = 46;
UPDATE purchase SET client_id = 12 WHERE id = 47;
UPDATE purchase SET client_id = 273 WHERE id = 48;
UPDATE purchase SET client_id = 445 WHERE id = 49;
UPDATE purchase SET client_id = 32 WHERE id = 50;
UPDATE purchase SET client_id = 151 WHERE id = 51;
UPDATE purchase SET client_id = 355 WHERE id = 52;
UPDATE purchase SET client_id = 1 WHERE id = 53;
UPDATE purchase SET client_id = 332 WHERE id = 54;
UPDATE purchase SET client_id = 282 WHERE id = 55;
UPDATE purchase SET client_id = 356 WHERE id = 56;
UPDATE purchase SET client_id = 185 WHERE id = 57;
UPDATE purchase SET client_id = 134 WHERE id = 58;
UPDATE purchase SET client_id = 123 WHERE id = 59;
UPDATE purchase SET client_id = 43 WHERE id = 60;
UPDATE purchase SET client_id = 280 WHERE id = 61;
UPDATE purchase SET client_id = 417 WHERE id = 62;
UPDATE purchase SET client_id = 188 WHERE id = 63;
UPDATE purchase SET client_id = 371 WHERE id = 64;
UPDATE purchase SET client_id = 250 WHERE id = 65;
UPDATE purchase SET client_id = 402 WHERE id = 66;
UPDATE purchase SET client_id = 33 WHERE id = 67;
UPDATE purchase SET client_id = 163 WHERE id = 68;
UPDATE purchase SET client_id = 453 WHERE id = 69;
UPDATE purchase SET client_id = 284 WHERE id = 70;
UPDATE purchase SET client_id = 327 WHERE id = 71;
UPDATE purchase SET client_id = 103 WHERE id = 72;
UPDATE purchase SET client_id = 183 WHERE id = 73;
UPDATE purchase SET client_id = 406 WHERE id = 74;
UPDATE purchase SET client_id = 61 WHERE id = 75;
UPDATE purchase SET client_id = 437 WHERE id = 76;
UPDATE purchase SET client_id = 447 WHERE id = 77;
UPDATE purchase SET client_id = 274 WHERE id = 78;
UPDATE purchase SET client_id = 498 WHERE id = 79;
UPDATE purchase SET client_id = 192 WHERE id = 80;
UPDATE purchase SET client_id = 445 WHERE id = 81;
UPDATE purchase SET client_id = 188 WHERE id = 82;
UPDATE purchase SET client_id = 392 WHERE id = 83;
UPDATE purchase SET client_id = 197 WHERE id = 84;
UPDATE purchase SET client_id = 478 WHERE id = 85;
UPDATE purchase SET client_id = 170 WHERE id = 86;
UPDATE purchase SET client_id = 93 WHERE id = 87;
UPDATE purchase SET client_id = 285 WHERE id = 88;
UPDATE purchase SET client_id = 12 WHERE id = 89;
UPDATE purchase SET client_id = 22 WHERE id = 90;
UPDATE purchase SET client_id = 387 WHERE id = 91;
UPDATE purchase SET client_id = 409 WHERE id = 92;
UPDATE purchase SET client_id = 381 WHERE id = 93;
UPDATE purchase SET client_id = 13 WHERE id = 94;
UPDATE purchase SET client_id = 365 WHERE id = 95;
UPDATE purchase SET client_id = 218 WHERE id = 96;
UPDATE purchase SET client_id = 405 WHERE id = 97;
UPDATE purchase SET client_id = 272 WHERE id = 98;
UPDATE purchase SET client_id = 39 WHERE id = 99;
UPDATE purchase SET client_id = 291 WHERE id = 100;
UPDATE purchase SET client_id = 1 WHERE id = 101;
UPDATE purchase SET client_id = 259 WHERE id = 102;
UPDATE purchase SET client_id = 47 WHERE id = 103;
UPDATE purchase SET client_id = 267 WHERE id = 104;
UPDATE purchase SET client_id = 395 WHERE id = 105;
UPDATE purchase SET client_id = 324 WHERE id = 106;
UPDATE purchase SET client_id = 208 WHERE id = 107;
UPDATE purchase SET client_id = 52 WHERE id = 108;
UPDATE purchase SET client_id = 198 WHERE id = 109;
UPDATE purchase SET client_id = 426 WHERE id = 110;
UPDATE purchase SET client_id = 237 WHERE id = 111;
UPDATE purchase SET client_id = 130 WHERE id = 112;
UPDATE purchase SET client_id = 46 WHERE id = 113;
UPDATE purchase SET client_id = 36 WHERE id = 114;
UPDATE purchase SET client_id = 199 WHERE id = 115;
UPDATE purchase SET client_id = 78 WHERE id = 116;
UPDATE purchase SET client_id = 319 WHERE id = 117;
UPDATE purchase SET client_id = 242 WHERE id = 118;
UPDATE purchase SET client_id = 359 WHERE id = 119;
UPDATE purchase SET client_id = 201 WHERE id = 120;
UPDATE purchase SET client_id = 194 WHERE id = 121;
UPDATE purchase SET client_id = 299 WHERE id = 122;
UPDATE purchase SET client_id = 433 WHERE id = 123;
UPDATE purchase SET client_id = 355 WHERE id = 124;
UPDATE purchase SET client_id = 90 WHERE id = 125;
UPDATE purchase SET client_id = 431 WHERE id = 126;
UPDATE purchase SET client_id = 290 WHERE id = 127;
UPDATE purchase SET client_id = 274 WHERE id = 128;
UPDATE purchase SET client_id = 326 WHERE id = 129;
UPDATE purchase SET client_id = 282 WHERE id = 130;
UPDATE purchase SET client_id = 99 WHERE id = 131;
UPDATE purchase SET client_id = 378 WHERE id = 132;
UPDATE purchase SET client_id = 251 WHERE id = 133;
UPDATE purchase SET client_id = 277 WHERE id = 134;
UPDATE purchase SET client_id = 356 WHERE id = 135;
UPDATE purchase SET client_id = 4 WHERE id = 136;
UPDATE purchase SET client_id = 455 WHERE id = 137;
UPDATE purchase SET client_id = 137 WHERE id = 138;
UPDATE purchase SET client_id = 42 WHERE id = 139;
UPDATE purchase SET client_id = 293 WHERE id = 140;
UPDATE purchase SET client_id = 381 WHERE id = 141;
UPDATE purchase SET client_id = 472 WHERE id = 142;
UPDATE purchase SET client_id = 126 WHERE id = 143;
UPDATE purchase SET client_id = 251 WHERE id = 144;
UPDATE purchase SET client_id = 493 WHERE id = 145;
UPDATE purchase SET client_id = 215 WHERE id = 146;
UPDATE purchase SET client_id = 63 WHERE id = 147;
UPDATE purchase SET client_id = 71 WHERE id = 148;
UPDATE purchase SET client_id = 377 WHERE id = 149;
UPDATE purchase SET client_id = 240 WHERE id = 150;
UPDATE purchase SET client_id = 140 WHERE id = 151;
UPDATE purchase SET client_id = 371 WHERE id = 152;
UPDATE purchase SET client_id = 493 WHERE id = 153;
UPDATE purchase SET client_id = 374 WHERE id = 154;
UPDATE purchase SET client_id = 342 WHERE id = 155;
UPDATE purchase SET client_id = 103 WHERE id = 156;
UPDATE purchase SET client_id = 358 WHERE id = 157;
UPDATE purchase SET client_id = 100 WHERE id = 158;
UPDATE purchase SET client_id = 387 WHERE id = 159;
UPDATE purchase SET client_id = 390 WHERE id = 160;
UPDATE purchase SET client_id = 46 WHERE id = 161;
UPDATE purchase SET client_id = 462 WHERE id = 162;
UPDATE purchase SET client_id = 71 WHERE id = 163;
UPDATE purchase SET client_id = 399 WHERE id = 164;
UPDATE purchase SET client_id = 269 WHERE id = 165;
UPDATE purchase SET client_id = 143 WHERE id = 166;
UPDATE purchase SET client_id = 354 WHERE id = 167;
UPDATE purchase SET client_id = 413 WHERE id = 168;
UPDATE purchase SET client_id = 202 WHERE id = 169;
UPDATE purchase SET client_id = 52 WHERE id = 170;
UPDATE purchase SET client_id = 30 WHERE id = 171;
UPDATE purchase SET client_id = 356 WHERE id = 172;
UPDATE purchase SET client_id = 165 WHERE id = 173;
UPDATE purchase SET client_id = 32 WHERE id = 174;
UPDATE purchase SET client_id = 427 WHERE id = 175;
UPDATE purchase SET client_id = 217 WHERE id = 176;
UPDATE purchase SET client_id = 58 WHERE id = 177;
UPDATE purchase SET client_id = 380 WHERE id = 178;
UPDATE purchase SET client_id = 304 WHERE id = 179;
UPDATE purchase SET client_id = 105 WHERE id = 180;
UPDATE purchase SET client_id = 296 WHERE id = 181;
UPDATE purchase SET client_id = 398 WHERE id = 182;
UPDATE purchase SET client_id = 70 WHERE id = 183;
UPDATE purchase SET client_id = 447 WHERE id = 184;
UPDATE purchase SET client_id = 177 WHERE id = 185;
UPDATE purchase SET client_id = 231 WHERE id = 186;
UPDATE purchase SET client_id = 78 WHERE id = 187;
UPDATE purchase SET client_id = 444 WHERE id = 188;
UPDATE purchase SET client_id = 233 WHERE id = 189;
UPDATE purchase SET client_id = 452 WHERE id = 190;
UPDATE purchase SET client_id = 305 WHERE id = 191;
UPDATE purchase SET client_id = 456 WHERE id = 192;
UPDATE purchase SET client_id = 179 WHERE id = 193;
UPDATE purchase SET client_id = 69 WHERE id = 194;
UPDATE purchase SET client_id = 205 WHERE id = 195;
UPDATE purchase SET client_id = 446 WHERE id = 196;
UPDATE purchase SET client_id = 487 WHERE id = 197;
UPDATE purchase SET client_id = 97 WHERE id = 198;
UPDATE purchase SET client_id = 117 WHERE id = 199;
UPDATE purchase SET client_id = 122 WHERE id = 200;
UPDATE purchase SET client_id = 170 WHERE id = 201;
UPDATE purchase SET client_id = 422 WHERE id = 202;
UPDATE purchase SET client_id = 111 WHERE id = 203;
UPDATE purchase SET client_id = 449 WHERE id = 204;
UPDATE purchase SET client_id = 388 WHERE id = 205;
UPDATE purchase SET client_id = 133 WHERE id = 206;
UPDATE purchase SET client_id = 480 WHERE id = 207;
UPDATE purchase SET client_id = 312 WHERE id = 208;
UPDATE purchase SET client_id = 63 WHERE id = 209;
UPDATE purchase SET client_id = 455 WHERE id = 210;
UPDATE purchase SET client_id = 432 WHERE id = 211;
UPDATE purchase SET client_id = 266 WHERE id = 212;
UPDATE purchase SET client_id = 326 WHERE id = 213;
UPDATE purchase SET client_id = 196 WHERE id = 214;
UPDATE purchase SET client_id = 344 WHERE id = 215;
UPDATE purchase SET client_id = 230 WHERE id = 216;
UPDATE purchase SET client_id = 420 WHERE id = 217;
UPDATE purchase SET client_id = 327 WHERE id = 218;
UPDATE purchase SET client_id = 253 WHERE id = 219;
UPDATE purchase SET client_id = 307 WHERE id = 220;
UPDATE purchase SET client_id = 213 WHERE id = 221;
UPDATE purchase SET client_id = 162 WHERE id = 222;
UPDATE purchase SET client_id = 79 WHERE id = 223;
UPDATE purchase SET client_id = 258 WHERE id = 224;
UPDATE purchase SET client_id = 22 WHERE id = 225;
UPDATE purchase SET client_id = 278 WHERE id = 226;
UPDATE purchase SET client_id = 276 WHERE id = 227;
UPDATE purchase SET client_id = 369 WHERE id = 228;
UPDATE purchase SET client_id = 112 WHERE id = 229;
UPDATE purchase SET client_id = 350 WHERE id = 230;
UPDATE purchase SET client_id = 47 WHERE id = 231;
UPDATE purchase SET client_id = 345 WHERE id = 232;
UPDATE purchase SET client_id = 104 WHERE id = 233;
UPDATE purchase SET client_id = 71 WHERE id = 234;
UPDATE purchase SET client_id = 262 WHERE id = 235;
UPDATE purchase SET client_id = 218 WHERE id = 236;
UPDATE purchase SET client_id = 346 WHERE id = 237;
UPDATE purchase SET client_id = 232 WHERE id = 238;
UPDATE purchase SET client_id = 329 WHERE id = 239;
UPDATE purchase SET client_id = 327 WHERE id = 240;
UPDATE purchase SET client_id = 422 WHERE id = 241;
UPDATE purchase SET client_id = 388 WHERE id = 242;
UPDATE purchase SET client_id = 461 WHERE id = 243;
UPDATE purchase SET client_id = 202 WHERE id = 244;
UPDATE purchase SET client_id = 221 WHERE id = 245;
UPDATE purchase SET client_id = 412 WHERE id = 246;
UPDATE purchase SET client_id = 248 WHERE id = 247;
UPDATE purchase SET client_id = 306 WHERE id = 248;
UPDATE purchase SET client_id = 79 WHERE id = 249;
UPDATE purchase SET client_id = 321 WHERE id = 250;
UPDATE purchase SET client_id = 437 WHERE id = 251;
UPDATE purchase SET client_id = 47 WHERE id = 252;
UPDATE purchase SET client_id = 346 WHERE id = 253;
UPDATE purchase SET client_id = 267 WHERE id = 254;
UPDATE purchase SET client_id = 222 WHERE id = 255;
UPDATE purchase SET client_id = 278 WHERE id = 256;
UPDATE purchase SET client_id = 358 WHERE id = 257;
UPDATE purchase SET client_id = 192 WHERE id = 258;
UPDATE purchase SET client_id = 155 WHERE id = 259;
UPDATE purchase SET client_id = 473 WHERE id = 260;
UPDATE purchase SET client_id = 485 WHERE id = 261;
UPDATE purchase SET client_id = 406 WHERE id = 262;
UPDATE purchase SET client_id = 175 WHERE id = 263;
UPDATE purchase SET client_id = 94 WHERE id = 264;
UPDATE purchase SET client_id = 241 WHERE id = 265;
UPDATE purchase SET client_id = 115 WHERE id = 266;
UPDATE purchase SET client_id = 342 WHERE id = 267;
UPDATE purchase SET client_id = 119 WHERE id = 268;
UPDATE purchase SET client_id = 116 WHERE id = 269;
UPDATE purchase SET client_id = 269 WHERE id = 270;
UPDATE purchase SET client_id = 474 WHERE id = 271;
UPDATE purchase SET client_id = 62 WHERE id = 272;
UPDATE purchase SET client_id = 493 WHERE id = 273;
UPDATE purchase SET client_id = 355 WHERE id = 274;
UPDATE purchase SET client_id = 412 WHERE id = 275;
UPDATE purchase SET client_id = 116 WHERE id = 276;
UPDATE purchase SET client_id = 348 WHERE id = 277;
UPDATE purchase SET client_id = 463 WHERE id = 278;
UPDATE purchase SET client_id = 375 WHERE id = 279;
UPDATE purchase SET client_id = 192 WHERE id = 280;
UPDATE purchase SET client_id = 375 WHERE id = 281;
UPDATE purchase SET client_id = 448 WHERE id = 282;
UPDATE purchase SET client_id = 111 WHERE id = 283;
UPDATE purchase SET client_id = 322 WHERE id = 284;
UPDATE purchase SET client_id = 14 WHERE id = 285;
UPDATE purchase SET client_id = 40 WHERE id = 286;
UPDATE purchase SET client_id = 187 WHERE id = 287;
UPDATE purchase SET client_id = 271 WHERE id = 288;
UPDATE purchase SET client_id = 314 WHERE id = 289;
UPDATE purchase SET client_id = 416 WHERE id = 290;
UPDATE purchase SET client_id = 321 WHERE id = 291;
UPDATE purchase SET client_id = 81 WHERE id = 292;
UPDATE purchase SET client_id = 332 WHERE id = 293;
UPDATE purchase SET client_id = 50 WHERE id = 294;
UPDATE purchase SET client_id = 58 WHERE id = 295;
UPDATE purchase SET client_id = 302 WHERE id = 296;
UPDATE purchase SET client_id = 336 WHERE id = 297;
UPDATE purchase SET client_id = 245 WHERE id = 298;
UPDATE purchase SET client_id = 314 WHERE id = 299;
UPDATE purchase SET client_id = 169 WHERE id = 300;
UPDATE purchase SET client_id = 190 WHERE id = 301;
UPDATE purchase SET client_id = 350 WHERE id = 302;
UPDATE purchase SET client_id = 258 WHERE id = 303;
UPDATE purchase SET client_id = 91 WHERE id = 304;
UPDATE purchase SET client_id = 20 WHERE id = 305;
UPDATE purchase SET client_id = 420 WHERE id = 306;
UPDATE purchase SET client_id = 473 WHERE id = 307;
UPDATE purchase SET client_id = 140 WHERE id = 308;
UPDATE purchase SET client_id = 215 WHERE id = 309;
UPDATE purchase SET client_id = 271 WHERE id = 310;
UPDATE purchase SET client_id = 98 WHERE id = 311;
UPDATE purchase SET client_id = 255 WHERE id = 312;
UPDATE purchase SET client_id = 71 WHERE id = 313;
UPDATE purchase SET client_id = 133 WHERE id = 314;
UPDATE purchase SET client_id = 64 WHERE id = 315;
UPDATE purchase SET client_id = 453 WHERE id = 316;
UPDATE purchase SET client_id = 266 WHERE id = 317;
UPDATE purchase SET client_id = 328 WHERE id = 318;
UPDATE purchase SET client_id = 332 WHERE id = 319;
UPDATE purchase SET client_id = 179 WHERE id = 320;
UPDATE purchase SET client_id = 333 WHERE id = 321;
UPDATE purchase SET client_id = 174 WHERE id = 322;
UPDATE purchase SET client_id = 187 WHERE id = 323;
UPDATE purchase SET client_id = 304 WHERE id = 324;
UPDATE purchase SET client_id = 358 WHERE id = 325;
UPDATE purchase SET client_id = 125 WHERE id = 326;
UPDATE purchase SET client_id = 298 WHERE id = 327;
UPDATE purchase SET client_id = 172 WHERE id = 328;
UPDATE purchase SET client_id = 40 WHERE id = 329;
UPDATE purchase SET client_id = 386 WHERE id = 330;
UPDATE purchase SET client_id = 199 WHERE id = 331;
UPDATE purchase SET client_id = 447 WHERE id = 332;
UPDATE purchase SET client_id = 401 WHERE id = 333;
UPDATE purchase SET client_id = 157 WHERE id = 334;
UPDATE purchase SET client_id = 323 WHERE id = 335;
UPDATE purchase SET client_id = 356 WHERE id = 336;
UPDATE purchase SET client_id = 71 WHERE id = 337;
UPDATE purchase SET client_id = 39 WHERE id = 338;
UPDATE purchase SET client_id = 338 WHERE id = 339;
UPDATE purchase SET client_id = 283 WHERE id = 340;
UPDATE purchase SET client_id = 341 WHERE id = 341;
UPDATE purchase SET client_id = 172 WHERE id = 342;
UPDATE purchase SET client_id = 477 WHERE id = 343;
UPDATE purchase SET client_id = 55 WHERE id = 344;
UPDATE purchase SET client_id = 100 WHERE id = 345;
UPDATE purchase SET client_id = 356 WHERE id = 346;
UPDATE purchase SET client_id = 37 WHERE id = 347;
UPDATE purchase SET client_id = 358 WHERE id = 348;
UPDATE purchase SET client_id = 181 WHERE id = 349;
UPDATE purchase SET client_id = 242 WHERE id = 350;
UPDATE purchase SET client_id = 21 WHERE id = 351;
UPDATE purchase SET client_id = 179 WHERE id = 352;
UPDATE purchase SET client_id = 299 WHERE id = 353;
UPDATE purchase SET client_id = 204 WHERE id = 354;
UPDATE purchase SET client_id = 273 WHERE id = 355;
UPDATE purchase SET client_id = 429 WHERE id = 356;
UPDATE purchase SET client_id = 247 WHERE id = 357;
UPDATE purchase SET client_id = 219 WHERE id = 358;
UPDATE purchase SET client_id = 219 WHERE id = 359;
UPDATE purchase SET client_id = 311 WHERE id = 360;
UPDATE purchase SET client_id = 189 WHERE id = 361;
UPDATE purchase SET client_id = 24 WHERE id = 362;
UPDATE purchase SET client_id = 249 WHERE id = 363;
UPDATE purchase SET client_id = 18 WHERE id = 364;
UPDATE purchase SET client_id = 495 WHERE id = 365;
UPDATE purchase SET client_id = 442 WHERE id = 366;
UPDATE purchase SET client_id = 445 WHERE id = 367;
UPDATE purchase SET client_id = 19 WHERE id = 368;
UPDATE purchase SET client_id = 339 WHERE id = 369;
UPDATE purchase SET client_id = 3 WHERE id = 370;
UPDATE purchase SET client_id = 359 WHERE id = 371;
UPDATE purchase SET client_id = 380 WHERE id = 372;
UPDATE purchase SET client_id = 73 WHERE id = 373;
UPDATE purchase SET client_id = 294 WHERE id = 374;
UPDATE purchase SET client_id = 462 WHERE id = 375;
UPDATE purchase SET client_id = 55 WHERE id = 376;
UPDATE purchase SET client_id = 185 WHERE id = 377;
UPDATE purchase SET client_id = 50 WHERE id = 378;
UPDATE purchase SET client_id = 107 WHERE id = 379;
UPDATE purchase SET client_id = 357 WHERE id = 380;
UPDATE purchase SET client_id = 407 WHERE id = 381;
UPDATE purchase SET client_id = 130 WHERE id = 382;
UPDATE purchase SET client_id = 151 WHERE id = 383;
UPDATE purchase SET client_id = 396 WHERE id = 384;
UPDATE purchase SET client_id = 448 WHERE id = 385;
UPDATE purchase SET client_id = 258 WHERE id = 386;
UPDATE purchase SET client_id = 112 WHERE id = 387;
UPDATE purchase SET client_id = 399 WHERE id = 388;
UPDATE purchase SET client_id = 254 WHERE id = 389;
UPDATE purchase SET client_id = 413 WHERE id = 390;
UPDATE purchase SET client_id = 426 WHERE id = 391;
UPDATE purchase SET client_id = 371 WHERE id = 392;
UPDATE purchase SET client_id = 60 WHERE id = 393;
UPDATE purchase SET client_id = 36 WHERE id = 394;
UPDATE purchase SET client_id = 464 WHERE id = 395;
UPDATE purchase SET client_id = 322 WHERE id = 396;
UPDATE purchase SET client_id = 460 WHERE id = 397;
UPDATE purchase SET client_id = 311 WHERE id = 398;
UPDATE purchase SET client_id = 397 WHERE id = 399;
UPDATE purchase SET client_id = 125 WHERE id = 400;
UPDATE purchase SET client_id = 53 WHERE id = 401;
UPDATE purchase SET client_id = 107 WHERE id = 402;
UPDATE purchase SET client_id = 434 WHERE id = 403;
UPDATE purchase SET client_id = 348 WHERE id = 404;
UPDATE purchase SET client_id = 380 WHERE id = 405;
UPDATE purchase SET client_id = 262 WHERE id = 406;
UPDATE purchase SET client_id = 129 WHERE id = 407;
UPDATE purchase SET client_id = 305 WHERE id = 408;
UPDATE purchase SET client_id = 96 WHERE id = 409;
UPDATE purchase SET client_id = 373 WHERE id = 410;
UPDATE purchase SET client_id = 112 WHERE id = 411;
UPDATE purchase SET client_id = 290 WHERE id = 412;
UPDATE purchase SET client_id = 339 WHERE id = 413;
UPDATE purchase SET client_id = 183 WHERE id = 414;
UPDATE purchase SET client_id = 204 WHERE id = 415;
UPDATE purchase SET client_id = 218 WHERE id = 416;
UPDATE purchase SET client_id = 161 WHERE id = 417;
UPDATE purchase SET client_id = 369 WHERE id = 418;
UPDATE purchase SET client_id = 452 WHERE id = 419;
UPDATE purchase SET client_id = 343 WHERE id = 420;
UPDATE purchase SET client_id = 207 WHERE id = 421;
UPDATE purchase SET client_id = 274 WHERE id = 422;
UPDATE purchase SET client_id = 400 WHERE id = 423;
UPDATE purchase SET client_id = 220 WHERE id = 424;
UPDATE purchase SET client_id = 377 WHERE id = 425;
UPDATE purchase SET client_id = 40 WHERE id = 426;
UPDATE purchase SET client_id = 199 WHERE id = 427;
UPDATE purchase SET client_id = 114 WHERE id = 428;
UPDATE purchase SET client_id = 387 WHERE id = 429;
UPDATE purchase SET client_id = 219 WHERE id = 430;
UPDATE purchase SET client_id = 270 WHERE id = 431;
UPDATE purchase SET client_id = 143 WHERE id = 432;
UPDATE purchase SET client_id = 154 WHERE id = 433;
UPDATE purchase SET client_id = 287 WHERE id = 434;
UPDATE purchase SET client_id = 361 WHERE id = 435;
UPDATE purchase SET client_id = 165 WHERE id = 436;
UPDATE purchase SET client_id = 70 WHERE id = 437;
UPDATE purchase SET client_id = 22 WHERE id = 438;
UPDATE purchase SET client_id = 380 WHERE id = 439;
UPDATE purchase SET client_id = 208 WHERE id = 440;
UPDATE purchase SET client_id = 263 WHERE id = 441;
UPDATE purchase SET client_id = 395 WHERE id = 442;
UPDATE purchase SET client_id = 20 WHERE id = 443;
UPDATE purchase SET client_id = 152 WHERE id = 444;
UPDATE purchase SET client_id = 342 WHERE id = 445;
UPDATE purchase SET client_id = 111 WHERE id = 446;
UPDATE purchase SET client_id = 349 WHERE id = 447;
UPDATE purchase SET client_id = 474 WHERE id = 448;
UPDATE purchase SET client_id = 16 WHERE id = 449;
UPDATE purchase SET client_id = 27 WHERE id = 450;
UPDATE purchase SET client_id = 454 WHERE id = 451;
UPDATE purchase SET client_id = 367 WHERE id = 452;
UPDATE purchase SET client_id = 269 WHERE id = 453;
UPDATE purchase SET client_id = 367 WHERE id = 454;
UPDATE purchase SET client_id = 289 WHERE id = 455;
UPDATE purchase SET client_id = 207 WHERE id = 456;
UPDATE purchase SET client_id = 215 WHERE id = 457;
UPDATE purchase SET client_id = 407 WHERE id = 458;
UPDATE purchase SET client_id = 367 WHERE id = 459;
UPDATE purchase SET client_id = 82 WHERE id = 460;
UPDATE purchase SET client_id = 177 WHERE id = 461;
UPDATE purchase SET client_id = 116 WHERE id = 462;
UPDATE purchase SET client_id = 447 WHERE id = 463;
UPDATE purchase SET client_id = 22 WHERE id = 464;
UPDATE purchase SET client_id = 196 WHERE id = 465;
UPDATE purchase SET client_id = 491 WHERE id = 466;
UPDATE purchase SET client_id = 156 WHERE id = 467;
UPDATE purchase SET client_id = 118 WHERE id = 468;
UPDATE purchase SET client_id = 373 WHERE id = 469;
UPDATE purchase SET client_id = 106 WHERE id = 470;
UPDATE purchase SET client_id = 373 WHERE id = 471;
UPDATE purchase SET client_id = 172 WHERE id = 472;
UPDATE purchase SET client_id = 343 WHERE id = 473;
UPDATE purchase SET client_id = 80 WHERE id = 474;
UPDATE purchase SET client_id = 425 WHERE id = 475;
UPDATE purchase SET client_id = 493 WHERE id = 476;
UPDATE purchase SET client_id = 144 WHERE id = 477;
UPDATE purchase SET client_id = 457 WHERE id = 478;
UPDATE purchase SET client_id = 321 WHERE id = 479;
UPDATE purchase SET client_id = 494 WHERE id = 480;
UPDATE purchase SET client_id = 327 WHERE id = 481;
UPDATE purchase SET client_id = 357 WHERE id = 482;
UPDATE purchase SET client_id = 242 WHERE id = 483;
UPDATE purchase SET client_id = 416 WHERE id = 484;
UPDATE purchase SET client_id = 101 WHERE id = 485;
UPDATE purchase SET client_id = 458 WHERE id = 486;
UPDATE purchase SET client_id = 301 WHERE id = 487;
UPDATE purchase SET client_id = 125 WHERE id = 488;
UPDATE purchase SET client_id = 393 WHERE id = 489;
UPDATE purchase SET client_id = 228 WHERE id = 490;
UPDATE purchase SET client_id = 162 WHERE id = 491;
UPDATE purchase SET client_id = 379 WHERE id = 492;
UPDATE purchase SET client_id = 80 WHERE id = 493;
UPDATE purchase SET client_id = 60 WHERE id = 494;
UPDATE purchase SET client_id = 322 WHERE id = 495;
UPDATE purchase SET client_id = 479 WHERE id = 496;
UPDATE purchase SET client_id = 142 WHERE id = 497;
UPDATE purchase SET client_id = 243 WHERE id = 498;
UPDATE purchase SET client_id = 186 WHERE id = 499;
UPDATE purchase SET client_id = 375 WHERE id = 500;
ALTER TABLE purchase ADD FOREIGN KEY (client_id) REFERENCES client (id);
| true |
cf08d0d0fb382b9039a5b31a2d922e0ea30e1634 | SQL | emmad5/W3D2 | /import_db.sql | UTF-8 | 1,819 | 4.09375 | 4 | [] | no_license | DROP TABLE IF EXISTS users;
DROP TABLE IF EXISTS questions;
DROP TABLE IF EXISTS questions_follows;
DROP TABLE IF EXISTS replies;
DROP TABLE IF EXISTS questions_likes;
PRAGMA foreign_keys = ON;
CREATE TABLE users (
id INTEGER PRIMARY KEY,
fname TEXT NOT NULL,
lname TEXT NOT NULL
);
CREATE TABLE questions (
id INTEGER PRIMARY KEY,
title TEXT NOT NULL,
body TEXT NOT NULL,
author_id INTEGER NOT NULL,
FOREIGN KEY (author_id) REFERENCES users(id)
);
CREATE TABLE questions_follows (
user_id INTEGER,
questions_id INTEGER,
FOREIGN KEY (user_id) REFERENCES users(id),
FOREIGN KEY (questions_id) REFERENCES questions(id)
);
CREATE TABLE replies (
id INTEGER PRIMARY KEY,
questions_id INTEGER NOT NULL,
parent_id INTEGER,
user_id INTEGER NOT NULL,
body TEXT NOT NULL,
FOREIGN KEY (parent_id) REFERENCES replies(id),
FOREIGN KEY (questions_id) REFERENCES questions(id),
FOREIGN KEY (user_id) REFERENCES users(id)
);
CREATE TABLE questions_likes (
id INTEGER PRIMARY KEY,
user_id INTEGER,
questions_id INTEGER,
FOREIGN KEY (user_id) REFERENCES users(id),
FOREIGN KEY (questions_id) REFERENCES questions(id)
);
INSERT INTO
users(fname, lname)
VALUES
('Mikey', 'Sanders'),
('Joe', 'Miller'),
('Liz', 'Jones');
INSERT INTO
questions(title, body, author_id)
VALUES
('SQL', 'What is SQL?', (SELECT id FROM users WHERE fname = 'Mikey')),
('Ruby', 'What is Ruby?', (SELECT id FROM users WHERE fname = 'Joe')),
('Rails', 'What is Rails?', (SELECT id FROM users WHERE fname = 'Liz'));
INSERT INTO
replies(questions_id, parent_id, user_id, body)
VALUES
(1, null, 1, 'NED NED NED'),
(2, 1, 2, 'TOM TOM TOM');
INSERT INTO
questions_follows(user_id, questions_id)
VALUES
(1, 2),
(2, 1);
| true |
b43b1c0b1c7bd673412dacd5334092d7a760d041 | SQL | CUBRID/cubrid-testcases | /sql/_03_object_oriented/_03_inheritance/_001_class/cases/1002.sql | UTF-8 | 656 | 2.71875 | 3 | [
"BSD-3-Clause"
] | permissive | --create two tables ddl_0001,ddl_0002 and ddl_0003 inherited from ddl_0001 , ddl_0004 inherited from ddl_0002,drop all tables at last
CREATE CLASS ddl_0001(
col1 int Unique Not Null,
col2 varchar(100),
col3 varchar(100),
colCreateTm timestamp Not NULL
);
CREATE CLASS ddl_0002(
col1 int Unique Not Null,
col2 varchar(100),
col3 varchar(100),
colCreateTm timestamp Not Null
);
CREATE CLASS ddl_0003 UNDER ddl_0001(
col4 varchar(100),
col5 varchar(100)
);
CREATE CLASS ddl_0004 UNDER ddl_0002(
col4 varchar(100),
col5 varchar(100)
);
drop class ddl_0001;
drop class ddl_0002;
drop class ddl_0003;
drop class ddl_0004; | true |
d523e6244e757b36b302544b8f1966c0ad2be41a | SQL | thaok61/QuanLyVeTau | /quanLyVeTau.sql | UTF-8 | 4,025 | 3.03125 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 8.0.17, for Win64 (x86_64)
--
-- Host: localhost Database: quan_ly_ve
-- ------------------------------------------------------
-- Server version 8.0.17
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!50503 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
--
-- Table structure for table `khach_hang`
--
DROP TABLE IF EXISTS `khach_hang`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `khach_hang` (
`idkhach_hang` int(11) NOT NULL AUTO_INCREMENT,
`sdt` varchar(45) NOT NULL,
`mail` varchar(45) NOT NULL,
`cmnd` varchar(45) NOT NULL,
`tuoi` int(11) NOT NULL,
`doi_tuong` varchar(45) NOT NULL,
`namekhach_hang` varchar(45) NOT NULL,
PRIMARY KEY (`idkhach_hang`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `khach_hang`
--
LOCK TABLES `khach_hang` WRITE;
/*!40000 ALTER TABLE `khach_hang` DISABLE KEYS */;
INSERT INTO `khach_hang` VALUES (1,'1','thao.vd@gmail.com','212',12,'tre em','thao'),(2,'0212','sda@gmail.com','123',32,'nguoi lon','Ngoc'),(3,'021521','fafda@gmail.com','1224',12,'tre em','minh');
/*!40000 ALTER TABLE `khach_hang` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `lich_tau_chay`
--
DROP TABLE IF EXISTS `lich_tau_chay`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `lich_tau_chay` (
`idlich_tau_chay` int(11) NOT NULL AUTO_INCREMENT,
`ga_den` varchar(45) NOT NULL,
`ma_tau` varchar(45) NOT NULL,
`thoi_gian_di` varchar(45) NOT NULL,
`gia_ve` varchar(45) NOT NULL,
`so_cho` int(11) NOT NULL,
PRIMARY KEY (`idlich_tau_chay`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `lich_tau_chay`
--
LOCK TABLES `lich_tau_chay` WRITE;
/*!40000 ALTER TABLE `lich_tau_chay` DISABLE KEYS */;
INSERT INTO `lich_tau_chay` VALUES (2,'Ga Ha Noi','S1','10.00 am','1000',50),(3,'Ga Da Nang','S2','10.30 am','5000',40);
/*!40000 ALTER TABLE `lich_tau_chay` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `thong_tin_ve`
--
DROP TABLE IF EXISTS `thong_tin_ve`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `thong_tin_ve` (
`idve` int(11) NOT NULL AUTO_INCREMENT,
`idlich_tau_chay` int(11) NOT NULL,
`ma_cho` int(11) DEFAULT NULL,
`idkhach_hang` int(11) NOT NULL,
PRIMARY KEY (`idve`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `thong_tin_ve`
--
LOCK TABLES `thong_tin_ve` WRITE;
/*!40000 ALTER TABLE `thong_tin_ve` DISABLE KEYS */;
INSERT INTO `thong_tin_ve` VALUES (1,2,NULL,1),(5,2,21,2);
/*!40000 ALTER TABLE `thong_tin_ve` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2020-01-05 10:01:20
| true |
c3a006b573892e102019b462ab8a14ec2570ab63 | SQL | kfoon/SIM-Number-Management-System | /in_change.sql | UTF-8 | 10,855 | 2.96875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 2.11.8.1deb5+lenny8
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: May 24, 2011 at 05:26 PM
-- Server version: 5.0.51
-- PHP Version: 5.3.3-7
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
--
-- Database: `in_change`
--
-- --------------------------------------------------------
--
-- Table structure for table `hlr_request`
--
CREATE TABLE IF NOT EXISTS `hlr_request` (
`id` int(10) unsigned NOT NULL auto_increment,
`Customer_Name` text NOT NULL,
`Existing_Number` text NOT NULL,
`Requested_Number` text NOT NULL,
`Location` text NOT NULL,
`date` date NOT NULL,
`time` time NOT NULL,
`status` varchar(20) NOT NULL,
`operator` varchar(50) NOT NULL,
`in_tech` varchar(20) NOT NULL,
`hlr_tech` varchar(20) NOT NULL,
`Address` varchar(150) NOT NULL,
`NIN` varchar(150) NOT NULL default '0000000',
`active` varchar(1) NOT NULL default '1',
`sales_channel` varchar(100) NOT NULL,
`receipt_no` varchar(10) default NULL,
`nationality` varchar(100) default NULL,
`DOB` varchar(20) default NULL,
`reg_medium` varchar(20) NOT NULL default 'Not Set',
PRIMARY KEY (`id`),
UNIQUE KEY `id_2` (`id`),
KEY `id` (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='Created by phpFormGenerator' AUTO_INCREMENT=20677 ;
-- --------------------------------------------------------
--
-- Table structure for table `in_request`
--
CREATE TABLE IF NOT EXISTS `in_request` (
`id` int(10) unsigned NOT NULL auto_increment,
`Customer_Name` text NOT NULL,
`Existing_Number` text NOT NULL,
`Requested_Number` text NOT NULL,
`Location` text NOT NULL,
`date` date NOT NULL,
`time` time NOT NULL,
`status` varchar(20) NOT NULL,
`operator` varchar(50) NOT NULL,
`in_tech` varchar(20) NOT NULL,
`hlr_tech` varchar(20) NOT NULL,
`Address` varchar(150) NOT NULL,
`NIN` varchar(150) NOT NULL default '0000000',
`active` varchar(1) NOT NULL default '1',
`sales_channel` varchar(100) NOT NULL,
`receipt_no` varchar(10) default NULL,
`nationality` varchar(100) default NULL,
`DOB` varchar(20) default NULL,
`reg_medium` varchar(20) NOT NULL default 'Not Set',
PRIMARY KEY (`id`),
UNIQUE KEY `id_2` (`id`),
KEY `id` (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='Created by phpFormGenerator' AUTO_INCREMENT=20678 ;
-- --------------------------------------------------------
--
-- Table structure for table `members`
--
CREATE TABLE IF NOT EXISTS `members` (
`member_id` int(11) unsigned NOT NULL auto_increment,
`firstname` varchar(100) default NULL,
`lastname` varchar(100) default NULL,
`login` varchar(100) NOT NULL default '',
`passwd` varchar(32) NOT NULL default '',
`permission` varchar(20) NOT NULL,
PRIMARY KEY (`member_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=88 ;
-- --------------------------------------------------------
--
-- Table structure for table `numchange`
--
CREATE TABLE IF NOT EXISTS `numchange` (
`id` int(10) unsigned NOT NULL auto_increment,
`Customer_Name` text NOT NULL,
`Existing_Number` text NOT NULL,
`Requsted_Number` text NOT NULL,
`Location` text NOT NULL,
`date` date NOT NULL,
`time` time NOT NULL,
`status` varchar(20) NOT NULL,
`operator` varchar(50) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `id_2` (`id`),
KEY `id` (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='Created by phpFormGenerator' AUTO_INCREMENT=4 ;
-- --------------------------------------------------------
--
-- Table structure for table `prepaid_data`
--
CREATE TABLE IF NOT EXISTS `prepaid_data` (
`id` int(10) unsigned NOT NULL auto_increment,
`Customer_Name` text NOT NULL,
`contact` int(11) NOT NULL,
`Profession` varchar(100) NOT NULL,
`date` date NOT NULL,
`time` time NOT NULL,
`status` varchar(20) NOT NULL,
`operator` varchar(50) NOT NULL,
`Address` varchar(150) NOT NULL,
`NIN` varchar(150) NOT NULL default '0000000',
`active` varchar(1) NOT NULL default '1',
`email` varchar(100) default NULL,
`msisdn` varchar(30) NOT NULL,
`nationality` varchar(100) default NULL,
`DOA` varchar(20) NOT NULL default 'Not Set',
`imei` varchar(30) NOT NULL default 'Not Set',
`company` varchar(100) default 'Not Set',
`industry` varchar(100) NOT NULL default 'Not Set',
PRIMARY KEY (`id`),
UNIQUE KEY `id_2` (`id`),
KEY `id` (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='Created by phpFormGenerator' AUTO_INCREMENT=3 ;
-- --------------------------------------------------------
--
-- Table structure for table `register`
--
CREATE TABLE IF NOT EXISTS `register` (
`id` int(10) unsigned NOT NULL auto_increment,
`Customer_Name` text NOT NULL,
`Requested_Number` text NOT NULL,
`Location` text NOT NULL,
`date` date NOT NULL,
`time` time NOT NULL,
`status` varchar(20) NOT NULL,
`operator` varchar(50) NOT NULL,
`Address` varchar(150) NOT NULL,
`NIN` varchar(150) NOT NULL default '0000000',
`active` varchar(1) NOT NULL default '1',
`sales_channel` varchar(100) NOT NULL,
`receipt_no` varchar(10) default '000000',
`nationality` varchar(100) default NULL,
`DOB` varchar(20) default NULL,
`reg_medium` varchar(20) NOT NULL default 'Not Set',
PRIMARY KEY (`id`),
UNIQUE KEY `id_2` (`id`),
KEY `id` (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='Created by phpFormGenerator' AUTO_INCREMENT=6307 ;
-- --------------------------------------------------------
--
-- Table structure for table `report`
--
CREATE TABLE IF NOT EXISTS `report` (
`id` int(10) unsigned NOT NULL auto_increment,
`Customer_Name` text NOT NULL,
`Existing_Number` text NOT NULL,
`Requested_Number` text NOT NULL,
`Location` text NOT NULL,
`date` date NOT NULL,
`time` time NOT NULL,
`status` varchar(20) NOT NULL,
`operator` varchar(50) NOT NULL,
`in_tech` varchar(20) NOT NULL,
`hlr_tech` varchar(20) NOT NULL,
`Address` varchar(150) NOT NULL,
`NIN` varchar(150) NOT NULL default '0000000',
`active` varchar(1) NOT NULL default '1',
`sales_channel` varchar(100) NOT NULL,
`receipt_no` varchar(10) default NULL,
`nationality` varchar(100) default NULL,
`DOB` varchar(20) default NULL,
`reg_medium` varchar(20) NOT NULL default 'Not Set',
`act_time` datetime NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `id_2` (`id`),
KEY `id` (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='Created by phpFormGenerator' AUTO_INCREMENT=22854 ;
-- --------------------------------------------------------
--
-- Table structure for table `roaming`
--
CREATE TABLE IF NOT EXISTS `roaming` (
`id` int(11) NOT NULL auto_increment,
`Customer_Name` varchar(100) NOT NULL,
`Address` varchar(100) NOT NULL,
`Number` int(11) NOT NULL,
`date` date NOT NULL,
`time` time NOT NULL,
`operator` varchar(20) NOT NULL,
`switch_tech` varchar(20) NOT NULL,
`in_tech` varchar(20) default 'Pending',
`status` varchar(10) NOT NULL,
`active` int(1) NOT NULL default '1',
`NIN` varchar(20) NOT NULL,
`date_req` date NOT NULL,
`imsi` varchar(30) default NULL,
`act_time` time NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `Number` (`Number`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=865 ;
-- --------------------------------------------------------
--
-- Table structure for table `roaming_report`
--
CREATE TABLE IF NOT EXISTS `roaming_report` (
`id` int(11) NOT NULL auto_increment,
`Customer_Name` varchar(100) NOT NULL,
`Address` varchar(100) NOT NULL,
`Number` int(11) NOT NULL,
`date` date NOT NULL,
`time` time NOT NULL,
`operator` varchar(20) NOT NULL,
`switch_tech` varchar(20) NOT NULL,
`in_tech` varchar(20) default NULL,
`status` varchar(10) NOT NULL,
`active` int(1) NOT NULL default '1',
`NIN` varchar(20) NOT NULL,
`date_req` date NOT NULL,
`imsi` varchar(30) default NULL,
`act_time` time NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `Number` (`Number`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=863 ;
-- --------------------------------------------------------
--
-- Table structure for table `sim_replacement`
--
CREATE TABLE IF NOT EXISTS `sim_replacement` (
`id` int(11) NOT NULL auto_increment,
`Customer_Name` varchar(100) NOT NULL,
`new_sim` int(12) NOT NULL,
`lost_sim` int(7) NOT NULL,
`date_lost` date NOT NULL,
`ref_No1` varchar(15) NOT NULL,
`ref_No2` varchar(15) NOT NULL,
`ref_No3` varchar(15) NOT NULL,
`user` varchar(100) NOT NULL,
`date_created` date NOT NULL,
`time` time NOT NULL,
`status` varchar(100) NOT NULL,
`switch_tech` varchar(100) NOT NULL,
`Address` varchar(150) NOT NULL,
`active` varchar(1) NOT NULL default '1',
`private` int(1) NOT NULL default '0',
`mca` int(1) NOT NULL default '0',
`crbt` int(1) NOT NULL default '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=15351 ;
-- --------------------------------------------------------
--
-- Table structure for table `sim_replacement_history`
--
CREATE TABLE IF NOT EXISTS `sim_replacement_history` (
`id` int(11) NOT NULL auto_increment,
`Customer_Name` varchar(100) NOT NULL,
`new_sim` int(12) NOT NULL,
`lost_sim` int(7) NOT NULL,
`date_lost` date NOT NULL,
`ref_No1` varchar(15) NOT NULL,
`ref_No2` varchar(15) NOT NULL,
`ref_No3` varchar(15) NOT NULL,
`user` varchar(100) NOT NULL,
`date_created` date NOT NULL,
`time` time NOT NULL,
`status` varchar(100) NOT NULL,
`switch_tech` varchar(100) NOT NULL,
`Address` varchar(150) NOT NULL,
`active` varchar(1) NOT NULL default '1',
`private` int(1) NOT NULL default '0',
`mca` int(1) NOT NULL default '0',
`crbt` int(1) NOT NULL default '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=15293 ;
-- --------------------------------------------------------
--
-- Table structure for table `unallocate_rep`
--
CREATE TABLE IF NOT EXISTS `unallocate_rep` (
`id` int(11) NOT NULL,
`Customer_Name` varchar(100) NOT NULL,
`new_sim` int(12) NOT NULL,
`lost_sim` int(7) NOT NULL,
`date_lost` date NOT NULL,
`ref_No1` varchar(15) NOT NULL,
`ref_No2` varchar(15) NOT NULL,
`ref_No3` varchar(15) NOT NULL,
`user` varchar(100) NOT NULL,
`date_created` date NOT NULL,
`time` time NOT NULL,
`status` varchar(100) NOT NULL,
`switch_tech` varchar(100) NOT NULL,
`Address` varchar(150) NOT NULL,
`active` varchar(1) NOT NULL default '1',
`private` int(1) NOT NULL default '0',
`mca` int(1) NOT NULL default '0',
`crbt` int(1) NOT NULL default '0',
PRIMARY KEY (`id`),
UNIQUE KEY `id` (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
| true |
c4ad1b5a08e1cd743de6c62e8ffe8a1a102936f6 | SQL | teotiger/pldi | /__old__/examples/example_usage.sql | UTF-8 | 3,288 | 2.921875 | 3 | [
"MIT"
] | permissive | set serveroutput on;
begin
utils.processing_file('countries.csv');
file_text_data_api.insert_rows(i_frd_id => 1);
utils.processing_file('Eviction_Notices.csv');
utils.processing_file('tsv.tsv');
utils.processing_file('unemployment.csv');
utils.processing_file('categories.xlsx');
utils.processing_file('financial_sample.xlsx');
utils.processing_file('sample-xlsx-file.xlsx');
end;
/
select * from file_text_data order by 1, 2;
select * from file_raw_data;
select * from file_meta_data;
-- => tests !!!
-- tsv
begin
file_text_data_api.insert_rows(
i_frd_id=>file_raw_data_api.insert_row(
i_filename=>'test.tsv',
i_plain_text=>'Name Age Address
Paul 23 1115 W Franklin
Bessy the Cow 5 Big Farm Way
Zeke 45 W Main St
',
i_ora_charset_id =>873
)
);
end;
/
-- csv
begin
file_text_data_api.insert_rows(
i_frd_id=>file_raw_data_api.insert_row(i_filename=>'countries.csv',
i_plain_text=>
'"country","country_group","name_en","name_fr","name_de","latitude","longitude"
"at","eu","Austria","Autriche","Österreich","47.6965545","13.34598005"
"be","eu","Belgium","Belgique","Belgien","50.501045","4.47667405"
"bg","eu","Bulgaria","Bulgarie","Bulgarien","42.72567375","25.4823218"
"hr","non-eu","Croatia","Croatie","Kroatien","44.74664297","15.34084438"
"cy","eu","Cyprus","Chypre","Zypern","35.129141","33.4286823"
"cz","eu","Czech Republic","République tchèque","Tschechische Republik","49.803531","15.47499805"
"dk","eu","Denmark","Danemark","Dänemark","55.93968425","9.51668905"
"ee","eu","Estonia","Estonie","Estland","58.5924685","25.8069503"
"fi","eu","Finland","Finlande","Finnland","64.95015875","26.06756405"
"fr","eu","France","France","Frankreich","46.7109945","1.7185608"
"de","eu","Germany","Allemagne","Deutschland","51.16382538","10.4540478"
"gr","eu","Greece","Grèce","Griechenland","39.698467","21.57725572"
"hu","eu","Hungary","Hongrie","Ungarn","47.16116325","19.5042648"
"ie","eu","Ireland","Irlande","Irland","53.41526","-8.2391222"
"it","eu","Italy","Italie","Italien","42.504191","12.57378705"
"lv","eu","Latvia","Lettonie","Lettland","56.880117","24.60655505"
"lt","eu","Lithuania","Lituanie","Litauen","55.173687","23.9431678"
"lu","eu","Luxembourg","Luxembourg","Luxemburg","49.815319","6.13335155"
"mt","eu","Malta","Malte","Malta","35.902422","14.4474608"
"nl","eu","Netherlands","Pays-Bas","Niederlande","52.10811825","5.3301983"
"no","non-eu","Norway","Norvège","Norwegen","64.55645975","12.66576565"
"pl","eu","Poland","Pologne","Polen","51.91890725","19.1343338"
"pt","eu","Portugal","Portugal","Portugal","39.55806875","-7.84494095"
"ro","eu","Romania","Roumanie","Rumänien","45.94261125","24.99015155"
"sk","eu","Slovakia","Slovaquie","Slowakei","48.67264375","19.7000323"
"si","eu","Slovenia","Slovénie","Slowenien","46.14925925","14.98661705"
"es","eu","Spain","Espagne","Spanien","39.8950135","-2.9882957"
"se","eu","Sweden","Suède","Schweden","62.1984675","14.89630657"
"tr","non-eu","Turkey","Turquie","Türkei","38.95294205","35.43979471"
"uk","eu","United Kingdom","Royaume-Uni","Vereinigtes Königreich","54.315447","-2.23261195"
',
i_ora_charset_id =>873)
);
end;
/ | true |
971976b4463d2288fcc2687e3893a7b17efeee36 | SQL | mattvisco/insta | /schema.sql | UTF-8 | 391 | 2.734375 | 3 | [] | no_license | drop table if exists active;
drop table if exists ids;
create table active (
id integer primary key autoincrement,
img_type text not null,
filename text not null, -- TODO: make unique
insta_id text -- TODO: make unique
);
create table ids (
id integer primary key autoincrement,
img_type text not null,
filename text not null,
insta_id text not null -- TODO: make unique
); | true |
a47c06a0eb30b75620a91c5c803018f6642678b2 | SQL | rmohan/ot-jobs-portal | /mysql_import.sql | UTF-8 | 5,261 | 3.0625 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 5.6.24, for osx10.8 (x86_64)
--
-- Host: localhost Database: ot_job_login
-- ------------------------------------------------------
-- Server version 5.6.24
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
--
-- Current Database: `ot_job_login`
--
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `ot_job_login` /*!40100 DEFAULT CHARACTER SET utf8 */;
USE `ot_job_login`;
--
-- Table structure for table `access_token_cache`
--
DROP TABLE IF EXISTS `access_token_cache`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `access_token_cache` (
`access_token` varchar(250) NOT NULL DEFAULT '',
`user_id` int(11) DEFAULT NULL,
`ip_address` varchar(15) DEFAULT NULL,
`added_on` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
UNIQUE KEY `access_token` (`access_token`),
KEY `access_token_2` (`access_token`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `role`
--
DROP TABLE IF EXISTS `role`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `role` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(20) NOT NULL DEFAULT '',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `user`
--
DROP TABLE IF EXISTS `user`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `user` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`email` varchar(100) NOT NULL DEFAULT '',
`role_id` int(11) NOT NULL DEFAULT '1',
`first_name` varchar(100) NOT NULL DEFAULT '',
`last_name` varchar(100) DEFAULT NULL,
`image_url` varchar(500) DEFAULT NULL,
`signup_mode` varchar(20) DEFAULT NULL,
`added_on` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
KEY `email` (`email`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Current Database: `ot_job_operations`
--
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `ot_job_operations` /*!40100 DEFAULT CHARACTER SET latin1 */;
USE `ot_job_operations`;
--
-- Table structure for table `admin_audit_log`
--
DROP TABLE IF EXISTS `admin_audit_log`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `admin_audit_log` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `job`
--
DROP TABLE IF EXISTS `job`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `job` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`title` varchar(200) NOT NULL DEFAULT '',
`seo_title` varchar(200) NOT NULL DEFAULT '',
`description` text NOT NULL,
`start_date` timestamp NULL DEFAULT NULL,
`end_date` timestamp NULL DEFAULT NULL,
`is_active` tinyint(1) NOT NULL DEFAULT '1',
`landing_page_url` text,
`priority` int(11) DEFAULT NULL,
`added_by_admin` int(11) DEFAULT NULL,
`added_on` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
KEY `title` (`title`),
KEY `start_date` (`start_date`),
KEY `is_active` (`is_active`)
) ENGINE=InnoDB AUTO_INCREMENT=27 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `user_jobs`
--
DROP TABLE IF EXISTS `user_jobs`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `user_jobs` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`user_id` int(11) NOT NULL,
`job_id` int(11) NOT NULL,
`added_on` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
UNIQUE KEY `user_id_2` (`user_id`,`job_id`),
KEY `user_id` (`user_id`),
KEY `job_id` (`job_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2017-03-06 6:40:03
| true |
7d19c27fe02a5752e73297548556cebf1bdce9c2 | SQL | 314H/banco-de-dados-modelagem | /ecommerce/ecommerce.sql | UTF-8 | 1,332 | 3.765625 | 4 | [] | no_license | create database ecommerce;
use ecommerce;
create table clientes
(
id int primary key auto_increment,
nome varchar(100),
email varchar(100),
telefone varchar(100),
tipo_cliente char(2)
);
create table clientes_pj
(
id int primary key auto_increment,
cnpj varchar(100),
razao_social varchar(100),
cliente_id int,
foreign key (cliente_id) references clientes(id)
);
create table clientes_pf
(
id int primary key auto_increment,
cpf varchar(100),
rg varchar(100),
cliente_id int,
foreign key (cliente_id) references clientes(id)
);
create table categorias
(
id int primary key auto_increment,
nome varchar(200) not null unique
);
create table produtos
(
id int primary key auto_increment,
nome varchar(200),
descricao varchar(200),
preco decimal(5,2),
categoria_id int,
foreign key(categoria_id) references categorias(id)
);
create table pedidos
(
id int primary key auto_increment,
cliente_id int,
status varchar(20),
foreign key(cliente_id) references clientes(id)
);
create table pedido_itens
(
id int primary key auto_increment,
produto_id int,
pedido_id int,
quantidade int,
preco decimal(5,2),
foreign key(produto_id) references produtos(id),
foreign key(pedido_id) references pedidos(id)
);
| true |
1ba62d3accdbc06d7ad0957fb74e5e332b919d49 | SQL | krpharr/fictional-broccoli | /lib/cms_db.sql | UTF-8 | 5,670 | 4.25 | 4 | [] | no_license | DROP DATABASE IF EXISTS cms_db;
CREATE DATABASE cms_db;
USE cms_db;
CREATE TABLE department (
id INT NOT NULL AUTO_INCREMENT,
name VARCHAR(30) NOT NULL,
PRIMARY KEY (id)
);
CREATE TABLE role (
id INT NOT NULL AUTO_INCREMENT,
title VARCHAR(30) NOT NULL,
salary DECIMAL NOT NULL,
department_id INT NOT NULL,
CONSTRAINT `fk_role_department`
FOREIGN KEY (department_id)
REFERENCES department(id)
ON UPDATE CASCADE
ON DELETE RESTRICT,
PRIMARY KEY (id)
);
CREATE TABLE employee (
id INT NOT NULL AUTO_INCREMENT,
first_name VARCHAR(30) NOT NULL,
last_name VARCHAR(30) NOT NULL,
role_id INT NOT NULL,
manager_id INT NULL,
CONSTRAINT `fk_employee_role`
FOREIGN KEY (role_id)
REFERENCES role(id)
ON UPDATE CASCADE
ON DELETE RESTRICT,
CONSTRAINT `fk_employee_manager`
FOREIGN KEY (manager_id)
REFERENCES employee(id)
ON UPDATE CASCADE
ON DELETE SET NULL,
PRIMARY KEY (id)
);
INSERT INTO department (name) VALUES ("HR");
INSERT INTO department (name) VALUES ("IT");
INSERT INTO department (name) VALUES ("Finance");
INSERT INTO role (title, salary, department_id) VALUES ("HR Manager", 80000.00,1);
INSERT INTO role (title, salary, department_id) VALUES ("IT Manager", 80000.00,2);
INSERT INTO role (title, salary, department_id) VALUES ("CFO", 180000.00,3);
INSERT INTO role (title, salary, department_id) VALUES ("Online Rep", 45000.00,1);
INSERT INTO role (title, salary, department_id) VALUES ("Help Desk Analyst", 45000.00,2);
INSERT INTO role (title, salary, department_id) VALUES ("Junior Programmer", 60000.00,2);
INSERT INTO role (title, salary, department_id) VALUES ("Senior Programmer", 70000.00,2);
INSERT INTO role (title, salary, department_id) VALUES ("Accountant", 60000.00,3);
INSERT INTO employee (first_name, last_name, role_id, manager_id) VALUES ("Bob", "Peckman", 1, NULL);
INSERT INTO employee (first_name, last_name, role_id, manager_id) VALUES ("Hal", "Frommovie", 2, NULL);
INSERT INTO employee (first_name, last_name, role_id, manager_id) VALUES ("Fred", "Hass", 3, NULL);
INSERT INTO employee (first_name, last_name, role_id, manager_id) VALUES ("Nancy", "Drew", 4, 1);
INSERT INTO employee (first_name, last_name, role_id, manager_id) VALUES ("Clark", "Kent", 5, 2);
INSERT INTO employee (first_name, last_name, role_id, manager_id) VALUES ("Leslie", "Snead", 6, 2);
INSERT INTO employee (first_name, last_name, role_id, manager_id) VALUES ("Jerry", "Bergonzi", 7, 2);
INSERT INTO employee (first_name, last_name, role_id, manager_id) VALUES ("Linda", "Oh", 8, 3);
SELECT e.id, e.manager_id, d.name as dept
FROM employee AS e
INNER JOIN role as r
ON r.id = e.role_id
INNER JOIN department as d
ON r.department_id = d.id;
DELETE FROM role WHERE id = 1;
DELETE FROM department WHERE id = 1;
DELETE FROM employee WHERE id = 1;
UPDATE role SET salary = "82000.00" WHERE id = 2;
-- INSERT INTO department (name) VALUES ("Marketing");
-- INSERT INTO department (name) VALUES ("Finance");
-- INSERT INTO department (name) VALUES ("Operations");
-- INSERT INTO role (title, salary, department_id) VALUES ("CFO Chief Financial Officer", 120000.00,2);
-- INSERT INTO role (title, salary, department_id) VALUES ("Accounts Payable Accountant", 80000.00,2);
-- INSERT INTO role (title, salary, department_id) VALUES ("VP of Marketing", 120000.00,1);
-- INSERT INTO role (title, salary, department_id) VALUES ("Marketing Manager", 80000.00,1);
-- INSERT INTO role (title, salary, department_id) VALUES ("Operations Manager", 80000.00,3);
-- INSERT INTO role (title, salary, department_id) VALUES ("HR Manager", 80000.00,1);
-- INSERT INTO role (title, salary, department_id) VALUES ("IT Manager", 80000.00,2);
-- INSERT INTO role (title, salary, department_id) VALUES ("Hardware Tech", 50000.00,5);
-- INSERT INTO role (title, salary, department_id) VALUES ("Help Desk Analyst", 45000.00,5);
-- INSERT INTO role (title, salary, department_id) VALUES ("Network Administrator", 55000.00,5);
-- INSERT INTO role (title, salary, department_id) VALUES ("Project Manager", 60000.00,2);
-- INSERT INTO role (title, salary, department_id) VALUES ("Project Manager", 60000.00,3);
-- INSERT INTO role (title, salary, department_id) VALUES ("Systems Engineering Manager", 65000.00,5);
-- INSERT INTO role (title, salary, department_id) VALUES ("CIO", 80000.00,5);
select * FROM department;
SELECT * FROM role;
SELECT * FROM employee;
UPDATE employee SET role_id = 4, manager_id = null WHERE id = 6;
SELECT role.id, role.title as role, role.salary , department.name as department
FROM role
LEFT JOIN `department`
ON role.department_id = department.id
ORDER BY department, salary DESC;
-- view employee info
SELECT e.id,concat(e.first_name, ' ', e.last_name) as employee,
d.name as department,
r.title,r.salary,
concat(m.first_name, ' ', m.last_name) as manager
FROM employee e
INNER JOIN role r
ON e.role_id=r.id
INNER JOIN department d
ON r.department_id = d.id
LEFT OUTER JOIN employee m
ON e.manager_id = m.id
ORDER BY d.name, r.salary DESC;
-- view employee by manager
SELECT e.id, concat(e.first_name, ' ', e.last_name) as employee,
d.name as department,
r.title,r.salary,
concat(m.first_name, ' ', m.last_name) as manager
FROM employee e
INNER JOIN role r
ON e.role_id=r.id
INNER JOIN department d
ON r.department_id = d.id
INNER JOIN employee m
ON e.manager_id = m.id
ORDER BY e.manager_id;
SELECT e.id, r.salary, d.name
FROM employee e
INNER JOIN role r
ON e.role_id = r.id
INNER JOIN department d
ON r.department_id = d.id
WHERE d.name = "IT";
-- GROUP BY d.name;
| true |
f0049115ca7089b8915bd5a275e220899231159b | SQL | brunosilvaJava/ponto-inteligente-api | /src/main/resources/db/migration/mysql/V1__init.sql | UTF-8 | 1,226 | 3.40625 | 3 | [] | no_license | CREATE TABLE IF NOT EXISTS `empresa` (
`id` bigint(20) NOT NULL PRIMARY KEY AUTO_INCREMENT,
`razao_social` varchar(50) NOT NULL,
`cnpj` int(18) NOT NULL,
`data_criacao` date NOT NULL,
`data_atualizacao` date NOT NULL
);
CREATE TABLE `funcionario` (
`id` bigint(20) NOT NULL PRIMARY KEY AUTO_INCREMENT,
`nome` varchar(50) NOT NULL,
`email` varchar(100) NOT NULL,
`senha` varchar(8) NOT NULL,
`cpf` varchar(14) NOT NULL,
`valor_hora` decimal(19,2) NOT NULL,
`qtd_horas_trabalho_dia` float NOT NULL,
`qtd_horas_almoco` float DEFAULT NULL,
`tipo_perfil` int(11) NOT NULL,
`data_criacao` date NOT NULL,
`data_atualizacao` date NOT NULL,
`id_empresa` bigint(20) NOT NULL,
CONSTRAINT funcionario_id_empresa FOREIGN KEY (id_empresa) REFERENCES empresa(id)
);
CREATE TABLE IF NOT EXISTS `lancamento` (
`id` bigint(20) NOT NULL PRIMARY KEY AUTO_INCREMENT,
`data` date NOT NULL,
`descricao` varchar(50) NOT NULL,
`localizacao` varchar(50) NOT NULL,
`data_criacao` date NOT NULL,
`data_atualizacao` date NOT NULL,
`tipo` int(11) NOT NULL,
`id_funcionario` int(11) NOT NULL,
CONSTRAINT `lancamento_id_funcionario` FOREIGN KEY (`id_funcionario`) REFERENCES `funcionario` (`id`)
);
| true |
9cdd9e871b0c34a6c2d689a1a3726d051789456f | SQL | wanderingivan/ecommerce-example | /src/main/resources/scripts/sql/create_procedures_mysql.sql | UTF-8 | 3,491 | 4.40625 | 4 | [] | no_license | -- Procedures :
DROP PROCEDURE IF EXISTS unread//
DROP PROCEDURE IF EXISTS updateSold//
DROP PROCEDURE IF EXISTS addMessage//
DROP PROCEDURE IF EXISTS addOrder//
DROP PROCEDURE IF EXISTS sendMessage//
DROP PROCEDURE IF EXISTS setFeatured//
CREATE PROCEDURE `addOrder`(IN userId BIGINT,IN address VARCHAR(250))
BEGIN
DECLARE total DECIMAL(14,2);
DECLARE orderId BIGINT;
DECLARE cartId BIGINT;
SELECT cart_id FROM carts WHERE user_id = userId INTO cartId;
SELECT sum(price) FROM products p INNER JOIN carts_products cp ON cp.product_id =p.product_id AND cp.cart_id = cartId INTO total;
INSERT INTO orders(user_id,sent,total,address) VALUES(userId,1,total,address);
SELECT LAST_INSERT_ID() INTO orderId;
INSERT INTO orders_products SELECT orderId, product_id FROM carts_products cp WHERE cp.cart_id=cartId;
CALL updateSold(cartId);
DELETE FROM carts_products WHERE cart_id = cartId;
END//
CREATE PROCEDURE `updateSold`(IN cart_id BIGINT)
BEGIN
DECLARE counter INT;
DECLARE productId BIGINT;
DECLARE finished INT DEFAULT 0;
DECLARE cur CURSOR FOR SELECT count(*),p.product_id FROM products p INNER JOIN carts_products cp ON cp.product_id =p.product_id AND cp.cart_id =cart_id GROUP BY p.product_id;
DECLARE CONTINUE HANDLER FOR NOT FOUND SET finished = 1;
OPEN cur;
WHILE finished != 1 DO
FETCH cur INTO counter,productId;
IF finished !=1 THEN
UPDATE products p SET p.sold = p.sold + counter WHERE p.product_id = productId;
END IF;
END WHILE;
CLOSE cur;
END//
CREATE PROCEDURE `unread` (IN uid BIGINT)
BEGIN
SELECT cm.message_id,cm.message,cm.sent,cm.read,u.username,u.imagePath FROM chat_messages cm INNER JOIN users u ON u.user_id = cm.sender_id WHERE cm.chat_id IN (SELECT chat_id from chats_join_table WHERE user_id=uid) AND cm.sender_id !=uid AND cm.read=0;
UPDATE chat_messages cm SET cm.read = 1 WHERE cm.chat_id IN (SELECT chat_id from chats_join_table WHERE user_id=uid) AND cm.sender_id !=uid AND cm.read=0;
END//
CREATE PROCEDURE `setFeatured` (IN product_name VARCHAR(250),IN isFeatured TINYINT)
BEGIN
IF isFeatured = 1 THEN
INSERT INTO featured(product_id) VALUES((SELECT p.product_id FROM products p WHERE p.name = product_name));
UPDATE products p SET p.featured = 1 WHERE p.name = product_name;
ELSE
DELETE FROM featured WHERE product_id = (SELECT p.product_id FROM products p WHERE p.name = product_name);
UPDATE products p SET p.featured = 0 WHERE p.name = product_name;
END IF;
END//
CREATE PROCEDURE `addMessage` (IN sender VARCHAR(50), IN chatId BIGINT, IN msg VARCHAR(250))
BEGIN
INSERT INTO chat_messages(message,chat_id,sender_id) VALUES(msg,chatId,(SELECT user_id from users WHERE username = sender));
UPDATE chats SET lastUpdate = NOW() WHERE chat_id = chatId;
END//
CREATE PROCEDURE `sendMessage` (IN msg VARCHAR(250),IN sender VARCHAR(50),IN receiver VARCHAR(50))
BEGIN
DECLARE chatId BIGINT;
SELECT chat_id FROM chats_join_table
WHERE user_id IN (SELECT user_id FROM users where username = sender or username = receiver)
GROUP BY chat_id HAVING count(*) > 1 INTO chatId;
IF chatId IS NULL THEN
INSERT INTO chats(lastUpdate) VALUES(NOW());
SELECT LAST_INSERT_ID() INTO chatId;
INSERT INTO chats_join_table(chat_id,user_id) VALUES(chatId,(SELECT user_id FROM users WHERE username =sender));
INSERT INTO chats_join_table(chat_id,user_id) VALUES(chatId,(SELECT user_id FROM users WHERE username =receiver));
END IF;
CALL addMessage(sender,chatId,msg);
END// | true |
0ccbbf70241a023dc36cddac32f714955809b8f7 | SQL | FrikkieM/phpmvc-with-login | /app/config/DBScripts.sql | UTF-8 | 515 | 2.96875 | 3 | [] | no_license | -- DB SCRIPTS
-- ==========
-- Run these on your Database in PHPMYADMIN when setting up the project
-- USERS TABLE
CREATE TABLE users (
id int NOT NULL AUTO_INCREMENT,
name varchar(255),
email varchar(255),
password varchar(255),
created_at DATETIME default CURRENT_TIMESTAMP,
PRIMARY KEY (id)
);
CREATE TABLE posts (
id int NOT NULL AUTO_INCREMENT,
user_id INT,
title VARCHAR(255),
body TEXT,
created_at DATETIME default CURRENT_TIMESTAMP,
PRIMARY KEY (id)
);
| true |
1f13f871ea4983b97c5bb937c331c557e5d4a4ef | SQL | ellandar/GISMO | /BDD/Structure/CORE/GISMO_PARAM_CORE_STRUCT.sql | UTF-8 | 5,518 | 3.765625 | 4 | [] | no_license |
-- --------------------------------------------------------
DROP VIEW IF EXISTS GISMO_PROJ;
DROP TABLE IF EXISTS GISMO_WEEK_NUMBER;
DROP TABLE IF EXISTS GISMO_TASK_TYPE;
DROP TABLE IF EXISTS GISMO_SUB_VERSION;
DROP TABLE IF EXISTS GISMO_SUB_PROJECT;
DROP TABLE IF EXISTS GISMO_VERSION;
DROP TABLE IF EXISTS GISMO_PROJECT;
DROP TABLE IF EXISTS GISMO_PROJECT_GROUP;
--
-- Structure de la table `GISMO_PROJECT_GROUP`
--
CREATE TABLE `GISMO_PROJECT_GROUP` (
`id` int(11) NOT NULL,
`name` varchar(255) COLLATE utf8_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `GISMO_PROJECT` (
`id` int(11) NOT NULL,
`name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`project_group_id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
--
-- Structure de la table `GISMO_SUB_PROJECT`
--
CREATE TABLE `GISMO_SUB_PROJECT` (
`id` int(11) NOT NULL,
`name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`project_id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
--
-- Structure de la table `GISMO_VERSION`
--
CREATE TABLE `GISMO_VERSION` (
`id` int(11) NOT NULL,
`name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`project_id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
--
-- Structure de la table `GISMO_SUB_VERSION`
--
CREATE TABLE `GISMO_SUB_VERSION` (
`id` int(11) NOT NULL,
`name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`sub_project_id` int(11) NOT NULL,
`version_id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
--
-- Structure de la table `GISMO_TASK_TYPE`
--
CREATE TABLE `GISMO_TASK_TYPE` (
`id` int(11) NOT NULL,
`name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`type` enum('UO','SUPPORT','FORFAIT','') COLLATE utf8_unicode_ci NOT NULL,
`project_id` int(11) NOT NULL,
`default_task_id` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
--
-- Structure de la table `GISMO_WEEK_NUMBER`
--
CREATE TABLE `GISMO_WEEK_NUMBER` (
`id` int(11) NOT NULL,
`dateYear` int(11) NOT NULL,
`dateWeek` int(11) NOT NULL,
`dateDay` enum('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday') COLLATE utf8_unicode_ci NOT NULL,
`date` date NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
--
-- Déclencheurs `GISMO_PROJECT`
--
DELIMITER $$
CREATE TRIGGER `defaultProject` AFTER INSERT ON `GISMO_PROJECT` FOR EACH ROW INSERT INTO GISMO_SUB_PROJECT (name, project_id) VALUES ('DEFAULT', NEW.ID)
$$
DELIMITER ;
--
-- Déclencheurs `GISMO_SUB_PROJECT`
--
DELIMITER $$
CREATE TRIGGER `defaultSubProject` AFTER INSERT ON `GISMO_SUB_PROJECT` FOR EACH ROW INSERT INTO GISMO_SUB_VERSION (name, sub_project_id) VALUES ('DEFAULT', NEW.ID)
$$
DELIMITER ;
--
-- Index pour la table `GISMO_PROJECT_GROUP`
--
ALTER TABLE `GISMO_PROJECT_GROUP`
ADD PRIMARY KEY (`id`),
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1;
--
-- Index pour la table `GISMO_PROJECT`
--
ALTER TABLE `GISMO_PROJECT`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `name` (`name`),
ADD KEY `project_group_id` (`project_group_id`),
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1,
ADD CONSTRAINT `GISMO_PROJECT_ibfk_1` FOREIGN KEY (`project_group_id`) REFERENCES `GISMO_PROJECT_GROUP` (`id`) ON DELETE CASCADE;
--
-- Index pour la table `GISMO_SUB_PROJECT`
--
ALTER TABLE `GISMO_SUB_PROJECT`
ADD PRIMARY KEY (`id`),
ADD KEY `project_id` (`project_id`),
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1,
ADD CONSTRAINT `GISMO_SUB_PROJECT_ibfk_1` FOREIGN KEY (`project_id`) REFERENCES `GISMO_PROJECT` (`id`) ON DELETE CASCADE;
--
-- Index pour la table `GISMO_VERSION`
--
ALTER TABLE `GISMO_VERSION`
ADD PRIMARY KEY (`id`),
ADD KEY `project_id` (`project_id`),
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1,
ADD CONSTRAINT `GISMO_VERSION_ibfk_1` FOREIGN KEY (`project_id`) REFERENCES `GISMO_PROJECT` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION;
--
-- Index pour la table `GISMO_SUB_VERSION`
--
ALTER TABLE `GISMO_SUB_VERSION`
ADD PRIMARY KEY (`id`),
ADD KEY `sub_project_id` (`sub_project_id`),
ADD KEY `version_id` (`version_id`),
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1,
ADD CONSTRAINT `GISMO_SUB_VERSION_ibfk_1` FOREIGN KEY (`sub_project_id`) REFERENCES `GISMO_SUB_PROJECT` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION;
--
-- Index pour la table `GISMO_TASK_TYPE`
--
ALTER TABLE `GISMO_TASK_TYPE`
ADD PRIMARY KEY (`id`),
ADD KEY `TASK_TYPE_ibfk_1` (`project_id`),
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1,
ADD CONSTRAINT `GISMO_TASK_TYPE_ibfk_1` FOREIGN KEY (`project_id`) REFERENCES `GISMO_PROJECT` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION;
--
-- Index pour la table `GISMO_WEEK_NUMBER`
--
ALTER TABLE `GISMO_WEEK_NUMBER`
ADD PRIMARY KEY (`id`),
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1;
CREATE VIEW `GISMO_PROJ`
AS SELECT
grp.id as gismo_proj_grp_id, grp.name as gismo_proj_grp_name,
proj.id as gismo_proj_id, proj.name as gismo_proj_name,
vers.id as gismo_vers_id, vers.name as gismo_vers_name,
subP.id as gismo_subP_id, subP.name as gismo_subP_name
FROM
GISMO_PROJECT_GROUP as grp, GISMO_PROJECT as proj, GISMO_VERSION as vers, GISMO_SUB_PROJECT as subP
WHERE grp.id = proj.project_group_id AND proj.id = vers.project_id AND subP.project_id = proj.id; | true |
ea716603534a45868106bf268f7ee2157089995e | SQL | ThiagoCamiloNonatoWenceslau/CadastroDeContasApi | /src/Querys/TipoConta/UspAlterarTipoConta.sql | UTF-8 | 299 | 2.890625 | 3 | [] | no_license | Create Procedure uspTipoContaAlterar
@Id int,
@Codigo varchar(20),
@Nome varchar(50),
@DataDeCriacao datetime,
@Saldo decimal(18,2)
As
Begin
Update
TipoConta
Set
Codigo = @Codigo,
Nome = @Nome,
DataDeCriacao = @DataDeCriacao,
Saldo= @Saldo
Where Id = @Id
Select @Id AS Retorno
End | true |
8db145987cd335c62d03f45bc6f8e4353f24abce | SQL | MartynasIT/.Net-Clients | /sql.sql | UTF-8 | 334 | 2.640625 | 3 | [] | no_license | CREATE TABLE Clients (
id int NOT NULL IDENTITY(1,1) PRIMARY KEY,
name nvarchar(255),
address nvarchar(255),
post_code varchar(255 )
);
CREATE TABLE Logs(
id int NOT NULL IDENTITY(1,1) PRIMARY KEY,
time datetime default CURRENT_TIMESTAMP,
action nvarchar(255),
record nvarchar(255)
); | true |
086a8d9a3a9743394a2290bb2de8a0a5a8332eb1 | SQL | cityofaustin/atd-vz-data | /atd-vzd/triggers/find_location_id_for_cr3_collision.sql | UTF-8 | 971 | 2.828125 | 3 | [
"CC0-1.0",
"LicenseRef-scancode-public-domain"
] | permissive | CREATE OR REPLACE FUNCTION public.find_location_id_for_cr3_collision(
id integer)
RETURNS character varying
LANGUAGE 'sql'
COST 100
STABLE
AS $BODY$ SELECT atl.location_id FROM atd_txdot_crashes AS atc
INNER JOIN atd_txdot_locations AS atl
ON ( 1=1
AND atl.location_group = 1
AND (atl.shape && st_setsrid(ST_POINT(atc.longitude_primary, atc.latitude_primary ), 4326))
AND ST_Contains(atl.shape, st_setsrid(ST_POINT(atc.longitude_primary, atc.latitude_primary ), 4326))
)
WHERE atc.crash_id = id LIMIT 1
$BODY$;
alter function find_location_id_for_cr3_collision(integer) owner to atd_vz_data;
| true |
04f89f1547d62934d6872dd954c502f25041b024 | SQL | nucleo-digital/api-v2-specs | /database/data.sql | UTF-8 | 1,459 | 3.171875 | 3 | [
"MIT"
] | permissive | ALTER DATABASE :db SET postgrest.claims.user_id TO '';
INSERT INTO rs.users (id, username, password) VALUES
('36bcf3b6-7a88-4de2-ac77-6d92e0fd6109', 'user1', 'secret'),
('c291dc50-dad6-4bc9-bb54-7317ca03d20d', 'user2', 'secret'),
('5e3f1ab7-646b-4476-afc0-d2ae42cd18c6', 'user3', 'secret'),
('17b6486f-f0a6-4a7f-b107-eda2cc597e5f', 'user4', 'secret'),
('ce0878df-29ba-4ffe-809c-41c0a2c2cd91', 'user5', 'secret'),
('624a66e6-e1cc-4337-80a1-1a69b67fa23e', 'user6', 'secret');
INSERT INTO rs.estados (id, nome, uf, regiao) VALUES
('1', 'Acre', 'AC', 'Norte'),
('2', 'Alagoas', 'AL', 'Nordeste'),
('3', 'Amapá', 'AP', 'Norte');
INSERT INTO rs.cidades (id, estado_id, codigo, nome, uf) VALUES
(1,1,2,'A City','AC'),
(2,2,2,'B City','AL'),
(3,2,2,'C City','AL'),
(4,3,2,'D City','AP');
INSERT INTO rs.afiliados (user_id, nome, birthday, cidade_id, estado_id) VALUES
(1, 'A Name', '1990-06-10', 2, 2),
(2, 'B Name', '1991-06-10', 2, 2),
(3, 'C Name', '1992-06-10', 3, 2),
(4, 'D Name', '1993-06-10', 4, 3),
(5, 'E Name', '1994-06-10', 4, 3);
INSERT INTO rs.regra_afiliados (user_id, role_name, access_level, city_id, state_id) VALUES
(1, 'rs_role_afiliado', 'municipal'::access_level_kind, 2, null),
(3, 'rs_role_afiliado', 'estadual'::access_level_kind, null, 2),
(4, 'rs_role_afiliado', 'nacional'::access_level_kind, null, null);
| true |
cb38da4ba950610522c961f2ae5a3a92d5d8de66 | SQL | huangshiqiang/com.gcxcx | /code/cn.elwy.eplus/cn.elwy.eplus.core/src/main/resources/database/cn.elwy.repot.sql | UTF-8 | 3,880 | 3.421875 | 3 | [
"Apache-2.0"
] | permissive | /*
-- --------------------------------------------------------
-- 作者:黄仕强
-- 系统版本:version 2.0
-- 创建日期:2017-02-19 20:30:00
-- 版权所有:2027-02-19 All Right Reserved IN www.elwy.cn
-- 文件描述:创建数据库表、视图以及初始化系统数据
-- 表名命名规则:
-- 1.前两个字母表示应用名称,用于区分不同的系统
-- 2.第三个字母到"_"前的字符表示对象类型,可以取值:
-- F方法、I索引、P分区表、S序列、T表、V视图、PR存储过程、TR触发器、TE临时表、TY类型
-- 3.FSTATUS: 0应用、11系统,不可删除、20系统,不可以删除和修改
*/
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET FOREIGN_KEY_CHECKS=0;
/*
-- --------------------------------------------------------
-- 创建数据库: `CN_ELWY_EPLUS`
--
*/
CREATE DATABASE IF not EXISTS `CN_ELWY_EPLUS`;
USE `CN_ELWY_EPLUS`;
-- ----------------------------
-- 表的结构 `ECT_R_TEMPLATE`
-- ----------------------------
DROP TABLE IF EXISTS `ECT_R_TEMPLATE`;
CREATE TABLE `ECT_R_TEMPLATE` (
`FID` varchar(30) not null comment '主键',
`FCODE` varchar(30) not null comment '代码',
`FNAME` varchar(50) not null comment '名称',
`FFORM_WIDTH` double(11) default 0 comment '表单宽度',
`FFORM_HEIGHT` double(11) default 0 comment '表单高度',
`FPATH_RULE` varchar(50) not null comment '路径规则',
`FNAME_RULE` varchar(50) not null comment '名称规则',
`FRENDERER` varchar(30) not null comment '渲染',
`FEDIT_STATE` smallint(6) not null comment '编辑状态',
`FCHECK_STATE` smallint(6) default 0 comment '审核状态',
`FDELETE_STATE` smallint(6) default 0 comment '删除状态',
`FCHECKER_ID` varchar(30) default null comment '审核员',
`FCHECK_TIME` datetime default null comment '审核时间',
`FCREATOR_ID` varchar(30) not null comment '创建者',
`FCREATE_TIME` datetime not null comment '创建时间',
`FDELETOR_ID` varchar(30) default null comment '删除者',
`FDELETE_TIME` datetime default null comment '删除时间',
`FEDITOR_ID` varchar(30) default null comment '修改者',
`FEDIT_TIME` datetime default null comment '修改时间',
PRIMARY KEY (`FID`)
) ENGINE=InnoDB default charset=utf8 comment='应用信息表';
-- ----------------------------
-- 表的结构 `ECT_R_PARAMS_HISTORY`
-- ----------------------------
DROP TABLE IF EXISTS `ECT_R_PARAMS_HISTORY`;
CREATE TABLE `ECT_R_PARAMS_HISTORY` (
`FID` varchar(30) not null comment '主键',
`FUSER_ID` varchar(30) not null comment '代码',
`FREPORT_CODE` varchar(30) not null comment '代码',
`FNAME` varchar(50) not null comment '名称',
`FTIME` double(11) default 0 comment '表单宽度',
`FPARAMS` text comment '表单参数',
`FPATH_RULE` varchar(50) not null comment '路径规则',
`FNAME_RULE` varchar(50) not null comment '名称规则',
`FRENDERER` varchar(30) not null comment '渲染',
`FEDIT_STATE` smallint(6) not null comment '编辑状态',
`FCHECK_STATE` smallint(6) default 0 comment '审核状态',
`FDELETE_STATE` smallint(6) default 0 comment '删除状态',
`FCHECKER_ID` varchar(30) default null comment '审核员',
`FCHECK_TIME` datetime default null comment '审核时间',
`FCREATOR_ID` varchar(30) not null comment '创建者',
`FCREATE_TIME` datetime not null comment '创建时间',
`FDELETOR_ID` varchar(30) default null comment '删除者',
`FDELETE_TIME` datetime default null comment '删除时间',
`FEDITOR_ID` varchar(30) default null comment '修改者',
`FEDIT_TIME` datetime default null comment '修改时间',
PRIMARY KEY (`FID`)
) ENGINE=InnoDB default charset=utf8 comment='应用信息表';
-- ----------------------------
-- 恢复外键约束检查
-- ----------------------------
SET FOREIGN_KEY_CHECKS=1; | true |
3a49d843f41efecfa93183e05102bfd9caa98cc9 | SQL | CUBRID/cubrid-testcases | /sql/_31_cherry/issue_22161_CTE_extensions/_02_delete/cases/with_rollup.sql | UTF-8 | 2,371 | 4.375 | 4 | [
"BSD-3-Clause"
] | permissive | drop table if exists sale_tbl;
CREATE TABLE sales_tbl
(dept_no INT, name VARCHAR(20), sales_month INT, sales_amount INT DEFAULT 100, PRIMARY KEY (dept_no, name, sales_month));
INSERT INTO sales_tbl VALUES
(201, 'George' , 1, 450), (201, 'George' , 2, 250), (201, 'Laura' , 1, 100), (201, 'Laura' , 2, 500),
(301, 'Max' , 1, 300), (301, 'Max' , 2, 300),
(501, 'Stephan', 1, 300), (501, 'Stephan', 2, DEFAULT), (501, 'Chang' , 1, 150),(501, 'Chang' , 2, 150),
(501, 'Sue' , 1, 150), (501, 'Sue' , 2, 200);
drop table if exists sales_tbl2;
CREATE TABLE sales_tbl2
(dept_no INT, name VARCHAR(20), sales_month INT, sales_amount INT DEFAULT 100);
INSERT INTO sales_tbl2 VALUES
(null, 'George' , 1, 450), (201, 'George' , 2, 250), (201, 'Laura' , 1, 100), (201, 'Laura' , 2, 500),
(null, 'George' , 1, 450), (201, 'George' , 2, 250), (201, 'Laura' , 1, 100), (201, 'Laura' , 2, 500);
-- selecting rows grouped by dept_no
create table foo as
with cte(a,b) as
(
SELECT dept_no, avg(sales_amount)
FROM sales_tbl
GROUP BY dept_no
) select * from cte;
insert into foo
with cte as
(
SELECT dept_no, avg(sales_amount)
FROM sales_tbl
GROUP BY dept_no with rollup
)select * from cte;
select * from foo order by 1,2;
with mycte as
(
SELECT dept_no, avg(sales_amount)
FROM sales_tbl
GROUP BY dept_no with rollup
having dept_no <400 order by 1,2
) delete foo where exists (select * from mycte);
select * from foo order by 1,2;
insert into foo(b)
with mycte as
(
SELECT avg(sales_amount)
FROM sales_tbl
GROUP BY dept_no with rollup
having dept_no <400 order by 1
) select * from mycte;
select * from foo order by 1,2;
insert into foo(b)
with mycte as
(
SELECT count(distinct name) as X
FROM sales_tbl as OUTR
where outr.sales_amount in (select INNR.sales_amount AS Y FROM sales_tbl2 AS INNR WHERE INNR.dept_no IS NULL )
GROUP BY dept_no with rollup
having dept_no <400 order by 1
) select * from mycte;
select * from foo order by 1,2;
with mycte as
(
SELECT count(distinct name) as X
FROM sales_tbl as OUTR
where outr.sales_amount in (select INNR.sales_amount AS Y FROM sales_tbl2 AS INNR WHERE INNR.dept_no IS NULL )
and outr.dept_no <400 and outr.name <> 'a'
GROUP BY dept_no with rollup
having dept_no <400 order by 1
) update foo set a=-1 where exists( select * from mycte);
select * from foo order by 1,2;
drop if exists foo,sales_tbl,sales_tbl2;
| true |
fcb50bb130a33092e58d5283ac43b84e8b7e7ff0 | SQL | stacecadet17/MySQL-countries | /Buenos_Aires.sql | UTF-8 | 236 | 3.859375 | 4 | [] | no_license | SELECT countries.name, cities.name, cities.district, cities.population
FROM cities
JOIN countries ON countries.id = cities.country_id
WHERE countries.name = "Argentina" AND cities.district = "Buenos Aires" AND cities.population > 500000 | true |
2375b583d98afcfce692bce3fcecc0fe40d4e10c | SQL | JM00oo/web-demo | /migrations/mysql/20180710192638-postTable.sql | UTF-8 | 569 | 3.65625 | 4 | [] | no_license |
-- +migrate Up
CREATE TABLE `post` (
`id` varchar(64) COLLATE utf8mb4_bin NOT NULL,
`content` varchar(255) COLLATE utf8mb4_bin NOT NULL,
`title` varchar(16) COLLATE utf8mb4_bin NOT NULL,
`owner_name` varchar(64) COLLATE utf8mb4_bin NOT NULL,
`created_at` Datetime COLLATE utf8mb4_bin NOT NULL,
PRIMARY KEY (`id`),
CONSTRAINT `Post_FK_Owner` FOREIGN KEY (`owner_name`) REFERENCES `user` (`username`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC;
-- +migrate Down
DROP TABLE `post`;
| true |
cb5bb5c8946519dec368db6dbc8d6f86160d1548 | SQL | RanranHe/INFO6210_DMDD-Final-Project | /Course Materials/Week 04/ch06_CREATE_table_SQLServer.sql | UTF-8 | 1,379 | 3.765625 | 4 | [] | no_license | CREATE TABLE Customer
(
CustomerID int not null,
CustomerName nvarchar(25),
CustomerAddress varchar(30),
CustomerCity varchar(20),
CustomerState char(2),
CustomerPostalCode varchar(9)
CONSTRAINT Customer_PK primary key (CustomerID)
);
CREATE TABLE Product
(
ProductID int not null,
ProductDescription varchar(50),
ProductFinish varchar(20) CONSTRAINT ProductFinish_CHK CHECK ( ProductFinish IN ('Cherry', 'Natural Ash', 'White Ash', 'Red Oak',
'Natural Oak', 'Walnut') ),
ProductStandardPrice DECIMAL(6,2),
ProductLineID int,
CONSTRAINT Product_PK PRIMARY KEY (ProductID)
);
CREATE TABLE [Order]
(
OrderID int not null,
OrderDate Datetime default ( getdate()) ,
CustomerID int not null
CONSTRAINT Order_PK PRIMARY KEY (OrderID),
CONSTRAINT Order_FK FOREIGN KEY (CustomerID) references Customer(CustomerID)
);
CREATE TABLE OrderLine
(
OrderID int not null,
ProductID int not null,
OrderQuantity smallint,
CONSTRAINT OrderLine_PK PRIMARY KEY (OrderID, ProductID),
CONSTRAINT OrderLine_FK1 FOREIGN KEY (OrderID) REFERENCES [Order](OrderID),
CONSTRAINT OrderLine_FK2 FOREIGN KEY( ProductID) REFERENCES Product(ProductID)
);
-- Add new column
ALTER TABLE Customer ADD CustomerType varchar(2) default ( 'Commercial')
-- Add new column
ALTER TABLE Customer ALTER column CustomerType varchar(20)
| true |
ef7e72261a395ce0eb930aacf831d3a80824256b | SQL | fprp/sql-hospital | /SQL-PL/Checklist/checklist61.sql | UTF-8 | 411 | 3.125 | 3 | [] | no_license | --Checklist 61
DECLARE
CURSOR cur_medico (sal DECIMAL) is
SELECT nomemedico, sexo, salario
FROM medico
WHERE salario > sal;
reg_medico cur_medico%ROWTYPE;
BEGIN
OPEN cur_medico(16000.00);
LOOP
FETCH cur_medico INTO reg_medico;
EXIT WHEN cur_medico%NOTFOUND;
dbms_output.put_line(reg_medico.nomemedico||' '||reg_medico.sexo
||' '||reg_medico.salario);
END LOOP;
CLOSE cur_medico;
END;
/ | true |
d5929e345fb3ff728c2dfda5550d134bfd9248d8 | SQL | Zackwn/ezOrders | /sql/order.sql | UTF-8 | 263 | 3.203125 | 3 | [] | no_license | -- 1
CREATE TABLE Orders (
id varchar(36) PRIMARY KEY,
"table" int,
description TEXT,
status varchar(255)
);
-- 2
CREATE TYPE Status AS ENUM ('PENDING', 'DONE', 'CANCELED');
ALTER TABLE Orders
ALTER COLUMN status TYPE Status USING status::status; | true |
b77021db1493df45436c829e52072e45c31f4cf5 | SQL | jmgabon/Software_Engineering | /juansci/sql/02-22 grade_values.sql | UTF-8 | 2,042 | 3.25 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Feb 22, 2020 at 11:40 AM
-- Server version: 10.4.6-MariaDB
-- PHP Version: 7.3.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Database: `sjshs`
--
-- --------------------------------------------------------
--
-- Table structure for table `grade_values`
--
CREATE TABLE `grade_values` (
`GradeValID` int(11) NOT NULL,
`LRNNum` bigint(12) NOT NULL,
`GradeValLevel` int(11) NOT NULL,
`BehaviorID` varchar(50) NOT NULL,
`Quarter` int(11) NOT NULL,
`GradeValRating` varchar(50) DEFAULT NULL,
`DateCreated` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Triggers `grade_values`
--
DELIMITER $$
CREATE TRIGGER `AFTER INSERT grade_values` AFTER INSERT ON `grade_values` FOR EACH ROW INSERT INTO grade_values_backup
SELECT *, "CREATED"
FROM grade_values
WHERE GradeValID = new.GradeValID
$$
DELIMITER ;
DELIMITER $$
CREATE TRIGGER `AFTER UPDATE grade_values` AFTER UPDATE ON `grade_values` FOR EACH ROW INSERT INTO grade_values_backup
SELECT *, "UPDATED"
FROM grade_values
WHERE GradeValID = new.GradeValID
$$
DELIMITER ;
--
-- Indexes for dumped tables
--
--
-- Indexes for table `grade_values`
--
ALTER TABLE `grade_values`
ADD PRIMARY KEY (`GradeValID`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `grade_values`
--
ALTER TABLE `grade_values`
MODIFY `GradeValID` int(11) NOT NULL AUTO_INCREMENT;
COMMIT;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
| true |
59aa874d070378594d7fdb77c70f745dfc8d3296 | SQL | HaoyangCui0830/online-movie-ticket-booking | /OnlineMovieTicketBookingSystem/Cinema_Movie_DB_Setup.sql | UTF-8 | 223 | 3.453125 | 3 | [] | no_license | DROP TABLE Cinema_Movie;
CREATE TABLE Cinema_Movie(
movieId INT,
cinemaID INT,
PRIMARY KEY(movieId, cinemaId),
FOREIGN KEY (movieId) REFERENCES Movies(movie_id),
FOREIGN KEY (cinemaId) REFERENCES Cinema(cinema_id)
);
| true |
59bfec7a4a776d53be7ab1cc7ca6017763e91f57 | SQL | DimolSPA/Dimol-Fix-Carteras | /Dimol.Carteras/Dimol.Carteras.Database/dbo/Stored Procedures/Procs2/Find_Tipos_ProvCli.sql | UTF-8 | 197 | 2.515625 | 3 | [] | no_license |
Create Procedure Find_Tipos_ProvCli(@tpc_codemp integer, @tpc_tpcid integer) as
select count(tpc_tpcid)
from tipos_provcli
where tpc_codemp = @tpc_codemp and
tpc_tpcid = @tpc_tpcid
| true |
a619b1af1b5d9ee527fc3e7ed20995ce37dfd27e | SQL | pjrola/salesplay | /salesplay-auth/src/main/resources/db/migration/V6__create_password_reset_token_table.sql | UTF-8 | 380 | 2.828125 | 3 | [] | no_license | CREATE TABLE `password_reset_token` (
`id` bigint(20) NOT NULL,
`account_id` bigint(20) NOT NULL,
`expiry_date` datetime DEFAULT NULL,
`token` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `FK_PASSWORD_RESET_USER` (`account_id`),
CONSTRAINT `FK_PASSWORD_RESET_USER` FOREIGN KEY (`account_id`) REFERENCES `accounts` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1; | true |
5a3cace2bbdac32a6a3e7ba262f006f3562644c3 | SQL | ByteforceIndonesia/budget_system | /jewelery (1).sql | UTF-8 | 8,715 | 3.3125 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Oct 13, 2016 at 05:26 AM
-- Server version: 10.1.13-MariaDB
-- PHP Version: 7.0.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_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Database: `jewelery`
--
-- --------------------------------------------------------
--
-- Table structure for table `configuration`
--
CREATE TABLE `configuration` (
`id` int(11) NOT NULL,
`day-1` time NOT NULL,
`day` time NOT NULL,
`emas_lm` double NOT NULL,
`emas_24` double NOT NULL,
`dollar` double NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `configuration`
--
INSERT INTO `configuration` (`id`, `day-1`, `day`, `emas_lm`, `emas_24`, `dollar`) VALUES
(1, '14:46:00', '15:16:00', 550000, 500000, 13876);
-- --------------------------------------------------------
--
-- Table structure for table `installments`
--
CREATE TABLE `installments` (
`id` int(11) NOT NULL,
`transaction_id` int(11) NOT NULL,
`due` date NOT NULL,
`amount` double NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `installments`
--
INSERT INTO `installments` (`id`, `transaction_id`, `due`, `amount`) VALUES
(70, 82, '2016-10-14', 0),
(71, 83, '2016-10-14', 123);
-- --------------------------------------------------------
--
-- Table structure for table `monthly_limit`
--
CREATE TABLE `monthly_limit` (
`id` int(11) NOT NULL,
`month` enum('january','february','march','april','may','june','july','august','september','october','november','december') DEFAULT NULL,
`year` varchar(255) NOT NULL,
`limit_transaction` float NOT NULL DEFAULT '0',
`transaction_id` varchar(255) DEFAULT NULL,
`type` enum('gold','diamond') DEFAULT NULL,
`created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `monthly_limit`
--
INSERT INTO `monthly_limit` (`id`, `month`, `year`, `limit_transaction`, `transaction_id`, `type`, `created`) VALUES
(1, 'september', '2016', 10000, '', 'gold', '2016-09-13 13:55:57'),
(2, 'september', '2016', 600000, '', 'diamond', '2016-09-13 13:58:08'),
(4, 'october', '2016', 50000, '#83', 'diamond', '2016-09-14 03:57:14'),
(5, 'october', '2016', 100000, '#82', 'gold', '2016-09-14 04:00:00'),
(6, 'february', '2016', 1500, NULL, 'gold', '2016-09-14 14:48:54'),
(7, 'november', '2016', 123000, NULL, 'gold', '2016-09-15 02:31:30'),
(8, 'january', '2018', 10000, NULL, 'gold', '2016-09-16 01:05:23'),
(9, 'may', '2016', 1000, NULL, 'gold', '2016-09-26 03:36:35'),
(10, 'july', '2016', 1000, NULL, 'gold', '2016-09-26 03:37:08'),
(11, 'january', '2016', 20000, NULL, 'gold', '2016-09-28 02:02:42'),
(12, 'april', '2016', 12345, NULL, 'gold', '2016-09-28 07:53:00'),
(13, 'april', '2016', 6786, NULL, 'diamond', '2016-09-28 07:53:44'),
(14, 'january', '2025', 123, NULL, 'diamond', '2016-09-29 08:31:04'),
(15, 'february', '2016', 12345, NULL, 'diamond', '2016-09-29 01:55:06'),
(16, 'december', '2016', 9000, NULL, 'diamond', '2016-09-29 01:57:14'),
(17, 'january', '2016', 123123, NULL, 'diamond', '2016-09-29 08:58:43'),
(18, 'december', '2016', 80, NULL, 'gold', '2016-09-29 03:57:31');
-- --------------------------------------------------------
--
-- Table structure for table `monthly_limit_cicilan`
--
CREATE TABLE `monthly_limit_cicilan` (
`id` int(11) NOT NULL,
`month` varchar(255) NOT NULL,
`year` int(11) NOT NULL,
`amount` float NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `monthly_limit_cicilan`
--
INSERT INTO `monthly_limit_cicilan` (`id`, `month`, `year`, `amount`) VALUES
(1, 'january', 2016, 1000),
(2, 'september', 2016, 100000),
(3, 'october', 2016, 999999),
(4, 'january', 2017, 2000000),
(5, 'april', 2016, 123),
(6, 'november', 2016, 50000);
-- --------------------------------------------------------
--
-- Table structure for table `notes`
--
CREATE TABLE `notes` (
`id` int(11) NOT NULL,
`title` varchar(255) NOT NULL,
`content` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table `supplier`
--
CREATE TABLE `supplier` (
`id` int(11) NOT NULL,
`name` varchar(255) NOT NULL,
`phone` varchar(255) NOT NULL,
`address` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `supplier`
--
INSERT INTO `supplier` (`id`, `name`, `phone`, `address`) VALUES
(1, 'Setyawan', '08131239123', 'Apartment puri park view lt 32 nomor 440<br />\r\njakarta barat'),
(3, 'Felita', '081238123', 'adsfasdf');
-- --------------------------------------------------------
--
-- Table structure for table `transactions`
--
CREATE TABLE `transactions` (
`id` int(11) NOT NULL,
`month` enum('january','february','march','april','may','june','july','august','september','october','november','december') NOT NULL,
`year` varchar(255) NOT NULL,
`spanning_month` int(11) DEFAULT NULL,
`start_payment` date DEFAULT NULL,
`amount` float NOT NULL,
`gold_price` float DEFAULT NULL,
`weight` float DEFAULT NULL,
`description` text,
`type` enum('gold','diamond') NOT NULL,
`diamond_type` varchar(255) DEFAULT NULL,
`supplier_id` int(11) NOT NULL,
`created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `transactions`
--
INSERT INTO `transactions` (`id`, `month`, `year`, `spanning_month`, `start_payment`, `amount`, `gold_price`, `weight`, `description`, `type`, `diamond_type`, `supplier_id`, `created`) VALUES
(82, 'october', '2016', 1, '2016-10-14', 0, 0, 50, 'beli kalung', 'gold', NULL, 1, '2016-10-13 03:08:31'),
(83, 'october', '2016', 1, '2016-10-14', 123, 0, NULL, '78', 'diamond', 'Loose Diamond', 3, '2016-10-13 03:21:21');
-- --------------------------------------------------------
--
-- Table structure for table `users`
--
CREATE TABLE `users` (
`id` int(11) NOT NULL,
`username` varchar(255) NOT NULL,
`password` varchar(255) NOT NULL,
`fullname` varchar(255) NOT NULL,
`email` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `users`
--
INSERT INTO `users` (`id`, `username`, `password`, `fullname`, `email`) VALUES
(1, 'admin', '6af345b65cb88d569108839b58ecf02f1934825ba5e9b12cd19e21deeaba81ebc1129e3a9c37fb75a0f20c649cd07ea65f63a49968d84971cb3492fa27485705', 'Ferry', 'irvan@gethassee.com');
--
-- Indexes for dumped tables
--
--
-- Indexes for table `configuration`
--
ALTER TABLE `configuration`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `installments`
--
ALTER TABLE `installments`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `monthly_limit`
--
ALTER TABLE `monthly_limit`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `monthly_limit_cicilan`
--
ALTER TABLE `monthly_limit_cicilan`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `notes`
--
ALTER TABLE `notes`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `supplier`
--
ALTER TABLE `supplier`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `transactions`
--
ALTER TABLE `transactions`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `users`
--
ALTER TABLE `users`
ADD PRIMARY KEY (`id`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `configuration`
--
ALTER TABLE `configuration`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT for table `installments`
--
ALTER TABLE `installments`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=72;
--
-- AUTO_INCREMENT for table `monthly_limit`
--
ALTER TABLE `monthly_limit`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=19;
--
-- AUTO_INCREMENT for table `monthly_limit_cicilan`
--
ALTER TABLE `monthly_limit_cicilan`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;
--
-- AUTO_INCREMENT for table `notes`
--
ALTER TABLE `notes`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `supplier`
--
ALTER TABLE `supplier`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
--
-- AUTO_INCREMENT for table `transactions`
--
ALTER TABLE `transactions`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=84;
--
-- AUTO_INCREMENT for table `users`
--
ALTER TABLE `users`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
| true |
b3eb209437cf1e7f631b61d673b476808a4743bf | SQL | tgooden01/SnowConvertDDLExportScripts | /Redshift/output/currencyrate.sql | UTF-8 | 669 | 3.34375 | 3 | [] | no_license | --DROP TABLE adventureworks2012_sales.currencyrate;
CREATE TABLE IF NOT EXISTS adventureworks2012_sales.currencyrate
(
currencyrateid INTEGER NOT NULL DEFAULT "identity"(144541, 0, '1,1'::text) ENCODE az64
,currencyratedate TIMESTAMP WITHOUT TIME ZONE NOT NULL ENCODE az64
,fromcurrencycode VARCHAR(9) NOT NULL ENCODE zstd
,tocurrencycode VARCHAR(9) NOT NULL ENCODE zstd
,averagerate NUMERIC(19,4) NOT NULL ENCODE az64
,endofdayrate NUMERIC(19,4) NOT NULL ENCODE az64
,modifieddate TIMESTAMP WITHOUT TIME ZONE NOT NULL DEFAULT ('now'::text)::timestamp without time zone ENCODE az64
,PRIMARY KEY (currencyrateid)
)
DISTSTYLE KEY
DISTKEY (currencyrateid)
;
| true |
e216a3334cd98476d368fba802f3f017619f501c | SQL | fishg92/FrameworkDB | /Stored Procedures/Procs1/uspApplicationUserInsert.sql | UTF-8 | 1,708 | 3.015625 | 3 | [] | no_license | ----------------------------------------------------------------------------
-- Insert a single record into ApplicationUser
----------------------------------------------------------------------------
CREATE PROC uspApplicationUserInsert
( @UserName varchar(50)
, @FirstName varchar(50)
, @LastName varchar(50)
, @Password varchar(100)
, @fkDepartment decimal(18, 0) = NULL
, @WorkerNumber varchar(50) = NULL
, @LDAPUser bit = NULL
, @LDAPUniqueID varchar(100) = NULL
, @CountyCode varchar(50) = NULL
, @MiddleName varchar(50) = NULL
, @eMail varchar(50) = NULL
, @IsCaseworker bit = NULL
, @IsActive bit = NULL
, @eCAFFirstName varchar(50) = NULL
, @eCAFLastName varchar(50) = NULL
, @StateID varchar(50) = NULL
, @PhoneNumber varchar(10) = NULL
, @Extension varchar(10) = NULL
, @ExternalIDNumber nvarchar(300) = NULL
, @LUPUser varchar(50)
, @LUPMac char(17)
, @LUPIP varchar(15)
, @LUPMachine varchar(15)
, @pkApplicationUser decimal(18, 0) = NULL OUTPUT
)
AS
exec dbo.SetAuditDataContext @LupUser, @LupMachine
INSERT ApplicationUser
( UserName
, FirstName
, LastName
, Password
, fkDepartment
, WorkerNumber
, LDAPUser
, LDAPUniqueID
, CountyCode
, MiddleName
, eMail
, IsCaseworker
, IsActive
, eCAFFirstName
, eCAFLastName
, StateID
, PhoneNumber
, Extension
, ExternalIDNumber
)
VALUES
( @UserName
, @FirstName
, @LastName
, @Password
, @fkDepartment
, @WorkerNumber
, @LDAPUser
, @LDAPUniqueID
, COALESCE(@CountyCode, '')
, @MiddleName
, @eMail
, COALESCE(@IsCaseworker, (1))
, @IsActive
, @eCAFFirstName
, @eCAFLastName
, @StateID
, @PhoneNumber
, @Extension
, @ExternalIDNumber
)
SET @pkApplicationUser = SCOPE_IDENTITY()
| true |
799d448672659f74c6e0c06ed3900a311f849e2e | SQL | silence-do-good/stress-test-Postgres-and-MySQL | /dump/high/day19/select2124.sql | UTF-8 | 178 | 2.6875 | 3 | [] | no_license |
SELECT timeStamp, temperature FROM ThermometerOBSERVATION o
WHERE timestamp>'2017-11-18T21:24:00Z' AND timestamp<'2017-11-19T21:24:00Z' AND temperature>=20 AND temperature<=99
| true |
04575677622c757e730b5546378d003d748706c0 | SQL | zuishuaiweiwei/ssh | /crebas.sql | UTF-8 | 4,173 | 3.46875 | 3 | [] | no_license | /*==============================================================*/
/* DBMS name: MySQL 5.0 */
/* Created on: 8/4 20:20:44 */
/*==============================================================*/
DROP TABLE IF EXISTS emp_role;
DROP TABLE IF EXISTS lingdao;
DROP TABLE IF EXISTS role_privilege;
DROP TABLE IF EXISTS t_dept;
DROP TABLE IF EXISTS t_employee;
DROP TABLE IF EXISTS t_org;
DROP TABLE IF EXISTS t_privilege;
DROP TABLE IF EXISTS t_role;
/*==============================================================*/
/* Table: emp_role */
/*==============================================================*/
CREATE TABLE emp_role
(
emp_id VARCHAR(32) NOT NULL,
role_id VARCHAR(32) NOT NULL,
state INT,
PRIMARY KEY (emp_id, role_id)
);
/*==============================================================*/
/* Table: lingdao */
/*==============================================================*/
CREATE TABLE lingdao
(
emp_id VARCHAR(32) NOT NULL,
dept_id VARCHAR(32),
name VARCHAR(32),
position VARCHAR(32),
PRIMARY KEY (emp_id)
);
/*==============================================================*/
/* Table: role_privilege */
/*==============================================================*/
CREATE TABLE role_privilege
(
role_id VARCHAR(32) NOT NULL,
pri_id VARCHAR(32) NOT NULL,
PRIMARY KEY (role_id, pri_id)
);
/*==============================================================*/
/* Table: t_dept */
/*==============================================================*/
CREATE TABLE t_dept
(
dept_id VARCHAR(32) NOT NULL,
org_id VARCHAR(32) NOT NULL,
name VARCHAR(32),
PRIMARY KEY (dept_id)
);
/*==============================================================*/
/* Table: t_employee */
/*==============================================================*/
CREATE TABLE t_employee
(
emp_id VARCHAR(32) NOT NULL,
dept_id VARCHAR(32) NOT NULL,
name VARCHAR(32),
PRIMARY KEY (emp_id)
);
/*==============================================================*/
/* Table: t_org */
/*==============================================================*/
CREATE TABLE t_org
(
org_id VARCHAR(32) NOT NULL,
name VARCHAR(32),
PRIMARY KEY (org_id)
);
/*==============================================================*/
/* Table: t_privilege */
/*==============================================================*/
CREATE TABLE t_privilege
(
pri_id VARCHAR(32) NOT NULL,
name VARCHAR(32),
PRIMARY KEY (pri_id)
);
/*==============================================================*/
/* Table: t_role */
/*==============================================================*/
CREATE TABLE t_role
(
role_id VARCHAR(32) NOT NULL,
name VARCHAR(32),
PRIMARY KEY (role_id)
);
ALTER TABLE emp_role
ADD CONSTRAINT FK_emp_role FOREIGN KEY (emp_id)
REFERENCES t_employee (emp_id)
ON DELETE RESTRICT
ON UPDATE RESTRICT;
ALTER TABLE emp_role
ADD CONSTRAINT FK_emp_role2 FOREIGN KEY (role_id)
REFERENCES t_role (role_id)
ON DELETE RESTRICT
ON UPDATE RESTRICT;
ALTER TABLE lingdao
ADD CONSTRAINT FK_Inheritance_1 FOREIGN KEY (emp_id)
REFERENCES t_employee (emp_id)
ON DELETE RESTRICT
ON UPDATE RESTRICT;
ALTER TABLE role_privilege
ADD CONSTRAINT FK_belong FOREIGN KEY (role_id)
REFERENCES t_role (role_id)
ON DELETE RESTRICT
ON UPDATE RESTRICT;
ALTER TABLE role_privilege
ADD CONSTRAINT FK_own FOREIGN KEY (pri_id)
REFERENCES t_privilege (pri_id)
ON DELETE RESTRICT
ON UPDATE RESTRICT;
ALTER TABLE t_dept
ADD CONSTRAINT FK_org_dept FOREIGN KEY (org_id)
REFERENCES t_org (org_id)
ON DELETE RESTRICT
ON UPDATE RESTRICT;
ALTER TABLE t_employee
ADD CONSTRAINT FK_dept_emp FOREIGN KEY (dept_id)
REFERENCES t_dept (dept_id)
ON DELETE RESTRICT
ON UPDATE RESTRICT;
| true |
fb4fbccb6f94d2ea3370f86f6114e76a29567626 | SQL | jhalverson/data_science | /sql_mysql/pandas_sql_comparison.sql | UTF-8 | 8,050 | 3.390625 | 3 | [] | no_license | Thursday, July 14, 2016
Sample insurance portfolio (download .csv file)
The sample insurance file contains 36,634 records in Florida for 2012 from a sample company that implemented an agressive growth plan in 2012. There are total insured value (TIV) columns containing TIV from 2011 and 2012, so this dataset is great for testing out the comparison feature. This file has address information that you can choose to geocode, or you can use the existing latitude/longitude in the file.
Upload file to:
http://www.convertcsv.com/csv-to-sql.htm
In Step 2, be sure to check "First row is column names"
If find ^M as line returns then in vi do: s/ctrl+v+m/\r/g
DROP TABLE mytable;
CREATE TABLE insur(
policy_id INTEGER NOT NULL PRIMARY KEY
,statecode VARCHAR(2) NOT NULL
,county VARCHAR(19) NOT NULL
,eq_site_limit NUMERIC(11,1) NOT NULL
,hu_site_limit NUMERIC(12,2) NOT NULL
,fl_site_limit NUMERIC(11,1) NOT NULL
,fr_site_limit NUMERIC(11,1) NOT NULL
,tiv_2011 NUMERIC(12,2) NOT NULL
,tiv_2012 NUMERIC(12,2) NOT NULL
,eq_site_deductible NUMERIC(9,1) NOT NULL
,hu_site_deductible NUMERIC(9,1) NOT NULL
,fl_site_deductible NUMERIC(8,1) NOT NULL
,fr_site_deductible INTEGER NOT NULL
,point_latitude NUMERIC(9,6) NOT NULL
,point_longitude NUMERIC(10,6) NOT NULL
,line VARCHAR(11) NOT NULL
,construction VARCHAR(19) NOT NULL
,point_granularity INTEGER NOT NULL
);
The table can be made as a regular user. However, to fill the table one must
be root. Then do:
mysql> load data infile "/Users/jhalverson/data_science/sql_mysql/FL_insurance_sample_no_header.csv" into table insur columns terminated by ',' lines terminated by '\n';
Query OK, 36634 rows affected (0.81 sec)
Records: 36634 Deleted: 0 Skipped: 0 Warnings: 0
mysql> desc insur;
+--------------------+---------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+--------------------+---------------+------+-----+---------+-------+
| policy_id | int(11) | NO | PRI | NULL | |
| statecode | varchar(2) | NO | | NULL | |
| county | varchar(19) | NO | | NULL | |
| eq_site_limit | decimal(11,1) | NO | | NULL | |
| hu_site_limit | decimal(12,2) | NO | | NULL | |
| fl_site_limit | decimal(11,1) | NO | | NULL | |
| fr_site_limit | decimal(11,1) | NO | | NULL | |
| tiv_2011 | decimal(12,2) | NO | | NULL | |
| tiv_2012 | decimal(12,2) | NO | | NULL | |
| eq_site_deductible | decimal(9,1) | NO | | NULL | |
| hu_site_deductible | decimal(9,1) | NO | | NULL | |
| fl_site_deductible | decimal(8,1) | NO | | NULL | |
| fr_site_deductible | int(11) | NO | | NULL | |
| point_latitude | decimal(9,6) | NO | | NULL | |
| point_longitude | decimal(10,6) | NO | | NULL | |
| line | varchar(11) | NO | | NULL | |
| construction | varchar(19) | NO | | NULL | |
| point_granularity | int(11) | NO | | NULL | |
+--------------------+---------------+------+-----+---------+-------+
mysql> select avg(point_latitude), min(point_latitude), max(point_latitude), stddev(point_latitude) from insur;
+---------------------+---------------------+---------------------+------------------------+
| avg(point_latitude) | min(point_latitude) | max(point_latitude) | stddev(point_latitude) |
+---------------------+---------------------+---------------------+------------------------+
| 28.0874765122 | 24.547514 | 30.989820 | 1.6477116104781675 |
+---------------------+---------------------+---------------------+------------------------+
select county, count(county) from insur group by county order by count(county) desc;
+---------------------+---------------+
| county | count(county) |
+---------------------+---------------+
| MIAMI DADE COUNTY | 4315 |
| BROWARD COUNTY | 3193 |
| PALM BEACH COUNTY | 2791 |
| DUVAL COUNTY | 1894 |
| ORANGE COUNTY | 1811 |
| PINELLAS COUNTY | 1774 |
| POLK COUNTY | 1629 |
| VOLUSIA COUNTY | 1367 |
| HILLSBOROUGH COUNTY | 1166 |
| MARION COUNTY | 1138 |
| OKALOOSA COUNTY | 1115 |
| SEMINOLE COUNTY | 1100 |
| ALACHUA COUNTY | 973 |
| BREVARD COUNTY | 872 |
...
# avg total insured value difference by construction material of the property
mysql> select construction, avg(tiv_2012 - tiv_2011) from insur group by construction;
+---------------------+--------------------------+
| construction | avg(tiv_2012 - tiv_2011) |
+---------------------+--------------------------+
| Masonry | 181117.849026 |
| Reinforced Concrete | 3561250.852741 |
| Reinforced Masonry | 796516.138596 |
| Steel Frame | 16508382.352941 |
| Wood | 19777.946735 |
+---------------------+--------------------------+
# a simple example of the where clause
mysql> select policy_id, tiv_2011, tiv_2012, construction from insur where construction='wood' and (tiv_2012 - tiv_2011 > 250000.0);
+-----------+-----------+-----------+--------------+
| policy_id | tiv_2011 | tiv_2012 | construction |
+-----------+-----------+-----------+--------------+
| 118775 | 349906.50 | 600607.51 | Wood |
| 222173 | 355414.25 | 649046.12 | Wood |
| 226317 | 303766.20 | 566463.21 | Wood |
| 307614 | 342198.00 | 605323.62 | Wood |
| 321321 | 293965.28 | 545011.62 | Wood |
| 412421 | 358402.50 | 611365.85 | Wood |
| 437709 | 359482.50 | 610030.30 | Wood |
| 476120 | 356865.79 | 623665.79 | Wood |
| 584847 | 326592.00 | 592326.85 | Wood |
| 640441 | 354681.00 | 610388.27 | Wood |
| 758391 | 341280.46 | 634269.73 | Wood |
| 856215 | 350161.20 | 602679.25 | Wood |
| 870827 | 348955.20 | 609223.44 | Wood |
| 925819 | 343412.76 | 594724.62 | Wood |
| 948662 | 339359.71 | 602122.54 | Wood |
| 969495 | 357947.10 | 608309.62 | Wood |
| 975826 | 353849.81 | 607132.67 | Wood |
+-----------+-----------+-----------+--------------+
17 rows in set (0.03 sec)
mysql> select distinct county from insur where county like '%c%m%';
+-----------------+
| county |
+-----------------+
| ESCAMBIA COUNTY |
| COLUMBIA COUNTY |
+-----------------+
2 rows in set (0.02 sec)
# defining variables
mysql> select @ax := avg(tiv_2011) from insur;
+----------------------+
| @ax := avg(tiv_2011) |
+----------------------+
| 2172875.000322924 |
+----------------------+
mysql> select sum(@ax - tiv_2012) from insur;
+---------------------------------------------+
| sum(@ax - tiv_2012) |
+---------------------------------------------+
| -14585061340.200002184000000000000000000000 |
+---------------------------------------------+
# computing the correlation in SQL
create table sample( x float not null, y float not null );
insert into sample values (1, 10), (2, 4), (3, 5), (6,17);
select @ax := avg(x),
@ay := avg(y),
@div := (stddev_samp(x) * stddev_samp(y))
from sample;
select sum( ( x - @ax ) * (y - @ay) ) / ((count(x) -1) * @div) from sample;
+---------------------------------------------------------+
| sum( ( x - @ax ) * (y - @ay) ) / ((count(x) -1) * @div) |
+---------------------------------------------------------+
| 0.700885077729073 |
+---------------------------------------------------------+
| true |
ea40378d87ee9c0f60813216755ef01ead845364 | SQL | andrtechno/app | /modules/install/migrations/scheme.sql | UTF-8 | 1,038 | 3.21875 | 3 | [
"BSD-3-Clause"
] | permissive | DROP TABLE IF EXISTS `{prefix}modules`;
CREATE TABLE `{prefix}modules` (
`id` int(4) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(255) DEFAULT '',
`className` varchar(255) DEFAULT '',
`switch` tinyint(1) NOT NULL DEFAULT '1',
`access` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
UNIQUE KEY `name` (`name`)
) ENGINE=InnoDB DEFAULT CHARSET={charset};
DROP TABLE IF EXISTS `{prefix}settings`;
CREATE TABLE `{prefix}settings` (
`id` int(4) unsigned NOT NULL AUTO_INCREMENT,
`category` varchar(255) DEFAULT '',
`param` varchar(255) DEFAULT '',
`value` text,
PRIMARY KEY (`id`),
KEY `category` (`category`),
KEY `param` (`param`)
) ENGINE=InnoDB DEFAULT CHARSET={charset};
DROP TABLE IF EXISTS `{prefix}chat`;
CREATE TABLE `{prefix}chat` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_id` int(11) DEFAULT NULL,
`message` text,
`date_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT; | true |
92321b59ec5170ad0614bcf632eb113982684460 | SQL | jgarzonext/plsql-testing | /script_plsql/bd_iaxis/script/indices/RIEACTAMP_PK.sql | UTF-8 | 590 | 2.578125 | 3 | [] | no_license | --------------------------------------------------------
-- DDL for Index RIEACTAMP_PK
--------------------------------------------------------
CREATE UNIQUE INDEX "AXIS"."RIEACTAMP_PK" ON "AXIS"."RIESGOACTAMP_CONF" ("CEMPRES", "CRAMO", "CMODALI", "CTIPSEG", "CRIESGOACT", "CCODAMPARO", "CACTIVI", "FFECINI", "CCOLECT")
PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE "AXIS" ;
| true |
6c3922183423b49f11d0edcf42b8ee7171074630 | SQL | BreakthrougBackEndTech/examples | /distributed-transaction/tcc/test.sql | UTF-8 | 501 | 2.6875 | 3 | [] | no_license | -- 数据库实例inst01
CREATE TABLE tb_account_one (
acct_id varchar(16),
amount double(10, 2),
frozen double(10, 2),
PRIMARY KEY (acct_id)
) ENGINE=InnoDB;
insert into tb_account_one (acct_id, amount, frozen) values('1001', 100, 0.00);
-- 数据库实例inst02
CREATE TABLE tb_account_two (
acct_id varchar(16),
amount double(10, 2),
frozen double(10, 2),
PRIMARY KEY (acct_id)
) ENGINE=InnoDB;
insert into tb_account_two (acct_id, amount, frozen) values('2001', 10000.00, 0.00); | true |
7ea5e1840e68768b4ead33a38d4de1dde6f0845d | SQL | tenisme/tenisme_study | /MySQL_sql/초반 수업/200529.sql | UTF-8 | 2,344 | 4.40625 | 4 | [] | no_license | use mydb;
-- ((1)) 예제 1 : 리뷰 작성을 안 한 사람도 표시하되(0으로), 사람별로 각 리뷰의 갯수, 리뷰의 최소 별점, 최대 별점, 평균 별점(rating) 조회하고,
-- 만약 별점을 준 리뷰 갯수가 0보다 크면 "ACTIVE", 그렇지 않으면 "INACTIVE"로 표시(컬럼 명은 status)
-- firstname, lastname, count, min, max, avg, status
-- ifnull(), count(*), as, round(), min(), max(), case-when-then-else-end as, left join-on, group by, order by
-- (( 1 )) 내 풀이(계속 변경함)
select r.first_name, r.last_name, count(rv.rating) as COUNT, round(min(ifnull(rv.rating, 0)), 2) as MIN,
round(max(ifnull(rv.rating, 0)), 2) as MAX, round(avg(ifnull(rv.rating, 0)), 2) as "AVG",
case
when count(rv.rating) > 0 then "ACTIVE"
else "INACTIVE"
end as "STATUS"
from Reviewers as r
left join Reviews as rv
on r.id = rv.reviewer_id
group by r.first_name, r.last_name
order by COUNT, MIN, MAX, AVG;
-- 결국 입맛에 맞게 고쳤당
-- 조인하고 갯수 셀 때의 예시
-- (( 2 )) 강사님 풀이
select r.first_name, r.last_name, count(*) as COUNT, min(rv.rating) as MIN,
max(rv.rating) as MAX, round(avg(rv.rating), 2) as AVG, if(count(*) > 0, "ACTIVE", "INACTIVE") as STATUS
from Reviewers as r
join Reviews as rv
on r.id = rv.reviewer_id
group by r.id
order by COUNT, MIN, MAX, AVG;
-- ★ 조인 한 다음에 그룹바이.
-- 조건이 단 두개(true or false)면 if로 쓰는 게 편하고, 조건이 여러개(if, else if)면 case가 좋다.
-- if()도 else if를 추가해 쓸 수 있지만 복잡하기 때문에 그냥 위와 같이 활용한다.
-- ★ 강사님 거 고쳐졌음. 고친 거 올려놓으신댔음. (깃헙 19번)
-- 아래 것도 대입 가능(다수 조건)
-- case
-- when count(rv.rating) >= 10 then "POWER USER"
-- when count(rv.rating) > 0 then "ACTIVE"
-- else "INACTIVE"
-- end as "STATUS"
-- ((2)) 예제 2. 영화 제목으로 알파벳 오름차순 정렬해서, 영화 제목, 별점, 리뷰 작성자 이름(합쳐서)을 조회하시오.
-- round(), concat(), as, join-on, order by
select s.title, round(rv.rating, 1) as rating, concat(r.first_name, " ",r.last_name) as reviewer
from Reviews as rv
join Reviewers as r
on rv.reviewer_id = r.id
join Series as s
on rv.series_id = s.id
order by s.title;
| true |
934853c2a83d63e15c2f2b1b8967f1b7c369fe56 | SQL | alvin-ictn/Covid-Digital-Signage | /css/127_0_0_1(1).sql | UTF-8 | 131,957 | 3.125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: 11 Jul 2018 pada 12.10
-- Versi Server: 10.1.25-MariaDB
-- PHP Version: 5.6.31
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Database: `peternakan`
--
CREATE DATABASE IF NOT EXISTS `peternakan` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;
USE `peternakan`;
-- --------------------------------------------------------
--
-- Struktur dari tabel `agenda`
--
CREATE TABLE `agenda` (
`id` int(11) NOT NULL,
`agenda` varchar(11) NOT NULL,
`jadwal_mulai` date NOT NULL,
`jadwal_selesai` date NOT NULL,
`hari_mulai` varchar(15) NOT NULL,
`hari_selesai` varchar(15) NOT NULL,
`tanggal_mulai` varchar(15) NOT NULL,
`tanggal_selesai` varchar(15) NOT NULL,
`bulan_mulai` varchar(15) NOT NULL,
`bulan_selesai` varchar(15) NOT NULL,
`tahun_mulai` varchar(15) NOT NULL,
`tahun_selesai` varchar(15) NOT NULL,
`jam_mulai` varchar(15) NOT NULL,
`jam_selesai` varchar(15) NOT NULL,
`menit_mulai` varchar(15) NOT NULL,
`menit_selesai` varchar(15) NOT NULL,
`status` varchar(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data untuk tabel `agenda`
--
INSERT INTO `agenda` (`id`, `agenda`, `jadwal_mulai`, `jadwal_selesai`, `hari_mulai`, `hari_selesai`, `tanggal_mulai`, `tanggal_selesai`, `bulan_mulai`, `bulan_selesai`, `tahun_mulai`, `tahun_selesai`, `jam_mulai`, `jam_selesai`, `menit_mulai`, `menit_selesai`, `status`) VALUES
(21, 'aggg', '2018-07-22', '2018-07-26', 'Minggu', 'Kamis', '22', '26', '07', '07', '2018', '2018', '17', '17', '32', '27', ''),
(22, 'eeaaa', '2018-07-22', '2018-07-29', 'Minggu', 'Minggu', '22', '29', '07', '07', '2018', '2018', '17', '17', '45', '43', ''),
(23, 'dzzz', '2018-08-22', '2018-08-25', 'Rabu', 'Sabtu', '22', '25', '08', '08', '2018', '2018', '17', '17', '45', '46', '');
-- --------------------------------------------------------
--
-- Struktur dari tabel `atas`
--
CREATE TABLE `atas` (
`id` int(5) NOT NULL,
`Keterangan` varchar(222) NOT NULL,
`judul` varchar(222) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data untuk tabel `atas`
--
INSERT INTO `atas` (`id`, `Keterangan`, `judul`) VALUES
(16, 'hortik', 'b_hortikultura.jpeg'),
(17, 'b1', 'b_perkebunan.jpeg'),
(18, 'b2', 'b_sapra.jpeg'),
(19, 'b3', 'b_tangan.jpeg');
-- --------------------------------------------------------
--
-- Struktur dari tabel `berita`
--
CREATE TABLE `berita` (
`id` int(30) NOT NULL,
`info` varchar(300) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data untuk tabel `berita`
--
INSERT INTO `berita` (`id`, `info`) VALUES
(61, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau '),
(62, 'terwujudnya Pertanian dan Peternakan Riau yang Maju'),
(64, 'aku adalah anak gembala');
-- --------------------------------------------------------
--
-- Struktur dari tabel `beritagabung`
--
CREATE TABLE `beritagabung` (
`id` int(11) NOT NULL,
`info` varchar(1000) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data untuk tabel `beritagabung`
--
INSERT INTO `beritagabung` (`id`, `info`) VALUES
(1, 'jurss. tez. zzz. zzz. info doang. mastin punya yang baru'),
(2, ''),
(3, ''),
(4, 'test'),
(5, 'EZ'),
(6, ''),
(7, 'test. EZ. EZ. EZ'),
(8, 'test. EZ. EZ. EZ. EZ'),
(9, 'test. EZ. EZ. EZ. EZ. TES EZ BANGET COKKKKKKK'),
(10, 'EZ. EZ. EZ. EZ. TES EZ BANGET COKKKKKKK'),
(11, 'EZ. EZ. EZ. TES EZ BANGET COKKKKKKK'),
(12, 'EZ. EZ. TES EZ BANGET COKKKKKKK'),
(13, 'EZ. TES EZ BANGET COKKKKKKK'),
(14, 'TES EZ BANGET COKKKKKKK'),
(15, 'TES EZ BANGET COKKKKKKK. tez EZ BANGET COK'),
(16, 'tez EZ BANGET COK'),
(17, 'tez EZ BANGET COK'),
(18, 'tez EZ BANGET COK'),
(19, 'tez EZ BANGET COK'),
(20, 'tez EZ BANGET COK'),
(21, 'tez EZ BANGET COK'),
(22, 'tez EZ BANGET COK'),
(23, 'tez EZ BANGET COK'),
(24, 'tez EZ BANGET COK'),
(25, 'tez EZ BANGET COK'),
(26, 'tez EZ BANGET COK'),
(27, 'tez EZ BANGET COK. '),
(28, 'tez EZ BANGET COK. '),
(29, 'tez EZ BANGET COK. '),
(30, 'tez EZ BANGET COK. '),
(31, ''),
(32, ''),
(33, '. tezz'),
(34, '. tezz'),
(35, '. tezz'),
(36, '. tezz'),
(37, '. tezz'),
(38, '. tezz'),
(39, '. tezz'),
(40, '. tezz'),
(41, '. tezz'),
(42, '. tezz'),
(43, '. tezz'),
(44, '. tezz'),
(45, '. tezz'),
(46, '. tezz'),
(47, '. tezz'),
(48, '. tezz'),
(49, '. tezz'),
(50, '. tezz'),
(51, '. tezz'),
(52, '. tezz'),
(53, '. tezz'),
(54, '. tezz'),
(55, '. tezz'),
(56, '. tezz'),
(57, '. tezz'),
(58, '. tezz'),
(59, '. tezz'),
(60, '. tezz'),
(61, '. tezz'),
(62, '. tezz'),
(63, '. tezz'),
(64, '. tezz'),
(65, '. tezz'),
(66, '. tezz'),
(67, '. tezz'),
(68, '. tezz'),
(69, '. tezz'),
(70, '. tezz'),
(71, '. tezz'),
(72, '. tezz'),
(73, '. tezz'),
(74, '. tezz'),
(75, '. tezz'),
(76, '. tezz'),
(77, '. tezz'),
(78, '. tezz'),
(79, '. tezz'),
(80, '. tezz'),
(81, '. tezz'),
(82, '. tezz'),
(83, '. tezz'),
(84, '. tezz'),
(85, '. tezz'),
(86, '. tezz'),
(87, '. tezz'),
(88, '. tezz'),
(89, '. tezz'),
(90, '. tezz'),
(91, '. tezz'),
(92, '. tezz'),
(93, '. tezz'),
(94, '. tezz'),
(95, ''),
(96, ''),
(97, ''),
(98, ''),
(99, ''),
(100, ''),
(101, ''),
(102, ''),
(103, ''),
(104, ''),
(105, ''),
(106, ''),
(107, ''),
(108, ''),
(109, ''),
(110, ''),
(111, ''),
(112, ''),
(113, ''),
(114, ''),
(115, ''),
(116, '. tezz'),
(117, '. tezz'),
(118, '. tezz'),
(119, '. tezz'),
(120, '. tezz'),
(121, '. tezz'),
(122, '. tezz'),
(123, '. tezz'),
(124, '. tezz'),
(125, '. tezz'),
(126, '. tezz'),
(127, '. tezz'),
(128, '. tezz'),
(129, '. tezz'),
(130, '. tezz'),
(131, '. tezz'),
(132, '. tezz'),
(133, '. tezz'),
(134, ''),
(135, ''),
(136, ''),
(137, ''),
(138, ''),
(139, ''),
(140, ''),
(141, ''),
(142, ''),
(143, ''),
(144, ''),
(145, ''),
(146, ''),
(147, ''),
(148, ''),
(149, ''),
(150, ''),
(151, ''),
(152, ''),
(153, ''),
(154, ''),
(155, '. tezz'),
(156, '. tezz'),
(157, '. tezz. TESt'),
(158, '. tezz. TESt'),
(159, '. tezz. TESt'),
(160, '. tezz. TESt'),
(161, ''),
(162, '. tezz. TESt. test. test. test. test. test'),
(163, '. tezz. TESt. test. test. test. test. test'),
(164, '. tezz. TESt. test. test. test. test. test'),
(165, '. tezz. TESt. test. test. test. test. test'),
(166, '  |   tezz  |   TESt  |   test  |   test  |   test  |   test  |   test'),
(167, '  |   tezz  |   TESt  |   test  |   test  |   test  |   test  |   test'),
(168, '  |   tezz  |   TESt  |   test  |   test  |   test  |   test  |   test'),
(169, '  |   tezz  |   TESt  |   test  |   test  |   test  |   test'),
(170, '  |   tezz  |   TESt  |   test  |   test  |   test  |   test'),
(171, '  |   tezz  |   TESt  |   test  |   test  |   test  |   test'),
(172, '  |   TESt  |   test  |   test  |   test  |   test'),
(173, '  |   TESt  |   test  |   test  |   test  |   test'),
(174, '  |   TESt  |   test  |   test  |   test  |   test'),
(175, 'TESt  |   test  |   test  |   test  |   test'),
(176, 'TESt  |   test  |   test  |   test  |   test'),
(177, 'TESt  |   test  |   test  |   test  |   test'),
(178, 'test  |   test  |   test  |   test'),
(179, 'test  |   test  |   test  |   test'),
(180, 'test  |   test  |   test  |   test'),
(181, 'test  |   test  |   test'),
(182, 'test  |   test  |   test'),
(183, 'test  |   test  |   test'),
(184, 'test  |   test  |   test'),
(185, 'test  |   test  |   test'),
(186, 'test  |   test  |   test'),
(187, 'test  |   test  |   test'),
(188, 'test  |   test  |   test'),
(189, 'test  |   test  |   test'),
(190, 'test  |   test  |   test'),
(191, 'test  |   test  |   test'),
(192, 'test  |   test  |   test'),
(193, 'test  |   test  |   test'),
(194, 'test  |   test  |   test'),
(195, 'test  |   test  |   test'),
(196, 'test  |   test  |   test'),
(197, 'test  |   test  |   test'),
(198, 'test  |   test  |   test'),
(199, 'test  |   test  |   test'),
(200, 'test  |   test  |   test'),
(201, 'test  |   test  |   test'),
(202, 'test  |   test  |   test'),
(203, 'test  |   test  |   test'),
(204, 'test  |   test  |   test'),
(205, 'test  |   test  |   test'),
(206, 'test  |   test  |   test'),
(207, 'test  |   test  |   test'),
(208, 'test  |   test  |   test'),
(209, 'test  |   test  |   test'),
(210, 'test  |   test  |   test'),
(211, 'test  |   test  |   test'),
(212, 'test  |   test  |   test'),
(213, 'test  |   test  |   test'),
(214, 'test  |   test  |   test'),
(215, 'test  |   test  |   test'),
(216, 'test  |   test  |   test'),
(217, 'test  |   test  |   test'),
(218, 'test  |   test  |   test'),
(219, 'test  |   test  |   test'),
(220, 'test  |   test  |   test'),
(221, 'test  |   test  |   test'),
(222, 'test  |   test  |   test'),
(223, 'test  |   test  |   test'),
(224, 'test  |   test  |   test'),
(225, 'test  |   test  |   test'),
(226, 'test  |   test  |   test'),
(227, 'test  |   test  |   test'),
(228, 'test  |   test  |   test'),
(229, 'test  |   test  |   test'),
(230, 'test  |   test  |   test'),
(231, 'test  |   test  |   test'),
(232, 'test  |   test  |   test'),
(233, 'test  |   test  |   test'),
(234, 'test  |   test  |   test'),
(235, 'test  |   test  |   test'),
(236, 'test  |   test  |   test'),
(237, 'test  |   test  |   test'),
(238, 'test  |   test  |   test'),
(239, 'test  |   test  |   test'),
(240, 'test  |   test  |   test'),
(241, 'test  |   test  |   test'),
(242, 'test  |   test  |   test'),
(243, 'test  |   test  |   test'),
(244, 'test  |   test  |   test'),
(245, 'test  |   test  |   test'),
(246, 'test  |   test  |   test'),
(247, 'test  |   test  |   test'),
(248, 'test  |   test  |   test'),
(249, 'test  |   test  |   test'),
(250, 'test  |   test  |   test'),
(251, 'test  |   test  |   test'),
(252, 'test  |   test  |   test'),
(253, 'test  |   test  |   test'),
(254, 'test  |   test  |   test'),
(255, 'test  |   test  |   test'),
(256, 'test  |   test  |   test'),
(257, 'test  |   test  |   test'),
(258, 'test  |   test  |   test'),
(259, 'test  |   test  |   test'),
(260, 'test  |   test  |   test'),
(261, 'test  |   test  |   test'),
(262, 'test  |   test  |   test'),
(263, 'test  |   test  |   test'),
(264, 'test  |   test  |   test'),
(265, 'test  |   test  |   test'),
(266, 'test  |   test  |   test'),
(267, 'test  |   test  |   test'),
(268, 'test  |   test  |   test'),
(269, 'test  |   test  |   test'),
(270, 'test  |   test  |   test'),
(271, 'test  |   test  |   test'),
(272, 'test  |   test  |   test'),
(273, 'test  |   test  |   test'),
(274, 'test  |   test  |   test'),
(275, 'test  |   test  |   test'),
(276, 'test  |   test  |   test'),
(277, 'test  |   test  |   test'),
(278, 'test  |   test  |   test'),
(279, 'test  |   test  |   test'),
(280, 'test  |   test  |   test'),
(281, 'test  |   test  |   test'),
(282, 'test  |   test  |   test'),
(283, 'test  |   test  |   test'),
(284, 'test  |   test  |   test'),
(285, 'test  |   test  |   test'),
(286, 'test  |   test  |   test'),
(287, 'test  |   test  |   test'),
(288, 'test  |   test  |   test'),
(289, 'test  |   test  |   test'),
(290, 'test  |   test  |   test'),
(291, 'test  |   test  |   test'),
(292, 'test  |   test  |   test'),
(293, 'test  |   test  |   test'),
(294, 'test  |   test  |   test'),
(295, 'test  |   test  |   test'),
(296, 'test  |   test  |   test'),
(297, 'test  |   test  |   test'),
(298, 'test  |   test  |   test'),
(299, 'test  |   test  |   test'),
(300, 'test  |   test  |   test'),
(301, 'test  |   test  |   test'),
(302, 'test  |   test  |   test'),
(303, 'test  |   test  |   test'),
(304, 'test  |   test  |   test'),
(305, 'test  |   test  |   test'),
(306, 'test  |   test  |   test'),
(307, 'test  |   test  |   test'),
(308, 'test  |   test  |   test'),
(309, 'test  |   test  |   test'),
(310, 'test  |   test  |   test'),
(311, 'test  |   test  |   test'),
(312, 'test  |   test  |   test'),
(313, 'test  |   test  |   test'),
(314, 'test  |   test  |   test'),
(315, 'test  |   test  |   test'),
(316, 'test  |   test  |   test'),
(317, 'test  |   test  |   test'),
(318, 'test  |   test  |   test'),
(319, 'test  |   test  |   test'),
(320, 'test  |   test  |   test'),
(321, 'test  |   test  |   test'),
(322, 'test  |   test  |   test'),
(323, 'test  |   test  |   test'),
(324, 'test  |   test  |   test'),
(325, 'test  |   test  |   test'),
(326, 'test  |   test  |   test'),
(327, 'test  |   test  |   test'),
(328, 'test  |   test  |   test'),
(329, 'test  |   test  |   test'),
(330, 'test  |   test  |   test'),
(331, 'test  |   test  |   test'),
(332, 'test  |   test  |   test'),
(333, 'test  |   test  |   test'),
(334, 'test  |   test  |   test'),
(335, 'test  |   test  |   test'),
(336, 'test  |   test  |   test'),
(337, 'test  |   test  |   test'),
(338, 'test  |   test  |   test'),
(339, 'test  |   test  |   test'),
(340, 'test  |   test  |   test'),
(341, 'test  |   test  |   test'),
(342, 'test  |   test  |   test'),
(343, 'test  |   test  |   test'),
(344, 'test  |   test  |   test'),
(345, 'test  |   test  |   test'),
(346, 'test  |   test  |   test'),
(347, 'test  |   test  |   test'),
(348, 'test  |   test  |   test'),
(349, 'test  |   test  |   test'),
(350, 'test  |   test  |   test'),
(351, 'test  |   test  |   test'),
(352, 'test  |   test  |   test'),
(353, 'test  |   test  |   test'),
(354, 'test  |   test  |   test'),
(355, 'test  |   test  |   test'),
(356, 'test  |   test  |   test'),
(357, 'test  |   test  |   test'),
(358, 'test  |   test  |   test'),
(359, 'test  |   test  |   test'),
(360, 'test  |   test  |   test'),
(361, 'test  |   test  |   test'),
(362, 'test  |   test  |   test'),
(363, 'test  |   test  |   test'),
(364, 'test  |   test  |   test'),
(365, 'test  |   test  |   test'),
(366, 'test  |   test  |   test'),
(367, 'test  |   test  |   test'),
(368, 'test  |   test  |   test'),
(369, 'test  |   test  |   test'),
(370, 'test  |   test  |   test'),
(371, 'test  |   test  |   test'),
(372, 'test  |   test  |   test'),
(373, 'test  |   test  |   test'),
(374, 'test  |   test  |   test'),
(375, 'test  |   test  |   test'),
(376, 'test  |   test  |   test'),
(377, 'test  |   test  |   test'),
(378, 'test  |   test  |   test'),
(379, 'test  |   test  |   test'),
(380, 'test  |   test  |   test'),
(381, 'test  |   test  |   test'),
(382, 'test  |   test  |   test'),
(383, 'test  |   test  |   test'),
(384, 'test  |   test  |   test'),
(385, 'test  |   test  |   test'),
(386, 'test  |   test  |   test'),
(387, 'test  |   test  |   test'),
(388, 'test  |   test  |   test'),
(389, 'test  |   test  |   test'),
(390, 'test  |   test  |   test'),
(391, 'test  |   test  |   test'),
(392, 'test  |   test  |   test'),
(393, 'test  |   test  |   test'),
(394, 'test  |   test  |   test'),
(395, 'test  |   test  |   test'),
(396, 'test  |   test  |   test'),
(397, 'test  |   test  |   test'),
(398, 'test  |   test  |   test'),
(399, 'test  |   test  |   test'),
(400, 'test  |   test  |   test'),
(401, 'test  |   test  |   test'),
(402, 'test  |   test  |   test'),
(403, 'test  |   test  |   test'),
(404, 'test  |   test  |   test'),
(405, 'test  |   test  |   test'),
(406, 'test  |   test  |   test'),
(407, 'test  |   test  |   test'),
(408, 'test  |   test  |   test'),
(409, 'test  |   test  |   test'),
(410, 'test  |   test  |   test'),
(411, 'test  |   test  |   test'),
(412, 'test  |   test  |   test'),
(413, 'test  |   test  |   test'),
(414, 'test  |   test  |   test'),
(415, 'test  |   test  |   test'),
(416, 'test  |   test  |   test'),
(417, 'test  |   test  |   test'),
(418, 'test  |   test  |   test'),
(419, 'test  |   test  |   test'),
(420, 'test  |   test  |   test'),
(421, 'test  |   test  |   test'),
(422, 'test  |   test  |   test'),
(423, 'test  |   test  |   test'),
(424, 'test  |   test  |   test'),
(425, 'test  |   test  |   test'),
(426, 'test  |   test  |   test'),
(427, 'test  |   test  |   test'),
(428, 'test  |   test  |   test'),
(429, 'test  |   test  |   test'),
(430, 'test  |   test  |   test'),
(431, 'test  |   test  |   test'),
(432, 'test  |   test  |   test'),
(433, 'test  |   test  |   test'),
(434, 'test  |   test  |   test'),
(435, 'test  |   test  |   test'),
(436, 'test  |   test  |   test'),
(437, 'test  |   test  |   test'),
(438, 'test  |   test  |   test'),
(439, 'test  |   test  |   test'),
(440, 'test  |   test  |   test'),
(441, 'test  |   test  |   test'),
(442, 'test  |   test  |   test'),
(443, 'test  |   test  |   test'),
(444, 'test  |   test  |   test'),
(445, 'test  |   test  |   test'),
(446, 'test  |   test  |   test'),
(447, 'test  |   test  |   test'),
(448, 'test  |   test  |   test'),
(449, 'test  |   test  |   test'),
(450, 'test  |   test  |   test'),
(451, 'test  |   test  |   test'),
(452, 'test  |   test  |   test'),
(453, 'test  |   test  |   test'),
(454, 'test  |   test  |   test'),
(455, 'test  |   test  |   test'),
(456, 'test  |   test  |   test'),
(457, 'test  |   test  |   test'),
(458, 'test  |   test  |   test'),
(459, 'test  |   test  |   test'),
(460, 'test  |   test  |   test'),
(461, 'test  |   test  |   test'),
(462, 'test  |   test  |   test'),
(463, 'test  |   test  |   test'),
(464, 'test  |   test  |   test'),
(465, 'test  |   test  |   test'),
(466, 'test  |   test  |   test'),
(467, 'test  |   test  |   test'),
(468, 'test  |   test  |   test'),
(469, 'test  |   test  |   test'),
(470, 'test  |   test  |   test'),
(471, 'test  |   test  |   test'),
(472, 'test  |   test  |   test'),
(473, 'test  |   test  |   test'),
(474, 'test  |   test  |   test'),
(475, 'test  |   test  |   test'),
(476, 'test  |   test  |   test'),
(477, 'test  |   test  |   test'),
(478, 'test  |   test  |   test'),
(479, 'test  |   test  |   test'),
(480, 'test  |   test  |   test'),
(481, 'test  |   test  |   test'),
(482, 'test  |   test  |   test'),
(483, 'test  |   test  |   test'),
(484, 'test  |   test  |   test'),
(485, 'test  |   test  |   test'),
(486, 'test  |   test  |   test'),
(487, 'test  |   test  |   test'),
(488, 'test  |   test  |   test'),
(489, 'test  |   test  |   test'),
(490, 'test  |   test  |   test'),
(491, 'test  |   test  |   test'),
(492, 'test  |   test  |   test'),
(493, 'test  |   test  |   test'),
(494, 'test  |   test  |   test'),
(495, 'test  |   test  |   test'),
(496, 'test  |   test  |   test'),
(497, 'test  |   test  |   test'),
(498, 'test  |   test  |   test'),
(499, 'test  |   test  |   test'),
(500, 'test  |   test  |   test'),
(501, 'test  |   test  |   test'),
(502, 'test  |   test  |   test'),
(503, 'test  |   test  |   test'),
(504, 'test  |   test  |   test'),
(505, 'test  |   test  |   test'),
(506, 'test  |   test  |   test'),
(507, 'test  |   test  |   test'),
(508, 'test  |   test  |   test'),
(509, 'test  |   test  |   test'),
(510, 'test  |   test  |   test'),
(511, 'test  |   test  |   test'),
(512, 'test  |   test  |   test'),
(513, 'test  |   test  |   test'),
(514, 'test  |   test  |   test'),
(515, 'test  |   test  |   test'),
(516, 'test  |   test  |   test'),
(517, 'test  |   test  |   test'),
(518, 'test  |   test  |   test'),
(519, 'test  |   test  |   test'),
(520, 'test  |   test  |   test'),
(521, 'test  |   test  |   test'),
(522, 'test  |   test  |   test'),
(523, 'test  |   test  |   test'),
(524, 'test  |   test  |   test'),
(525, 'test  |   test  |   test'),
(526, 'test  |   test  |   test'),
(527, 'test  |   test  |   test'),
(528, 'test  |   test  |   test'),
(529, 'test  |   test  |   test'),
(530, 'test  |   test  |   test'),
(531, 'test  |   test  |   test'),
(532, 'test  |   test  |   test'),
(533, 'test  |   test  |   test'),
(534, 'test  |   test  |   test'),
(535, 'test  |   test  |   test'),
(536, 'test  |   test  |   test'),
(537, 'test  |   test  |   test'),
(538, 'test  |   test  |   test'),
(539, 'test  |   test  |   test'),
(540, 'test  |   test  |   test'),
(541, 'test  |   test  |   test'),
(542, 'test  |   test  |   test'),
(543, 'test  |   test  |   test'),
(544, 'test  |   test  |   test'),
(545, 'test  |   test  |   test'),
(546, 'test  |   test  |   test'),
(547, 'test  |   test  |   test'),
(548, 'test  |   test  |   test'),
(549, 'test  |   test  |   test'),
(550, 'test  |   test  |   test'),
(551, 'test  |   test  |   test'),
(552, 'test  |   test  |   test'),
(553, 'test  |   test  |   test'),
(554, 'test  |   test  |   test'),
(555, 'test  |   test  |   test'),
(556, 'test  |   test  |   test'),
(557, 'test  |   test  |   test'),
(558, 'test  |   test  |   test'),
(559, 'test  |   test  |   test'),
(560, 'test  |   test  |   test'),
(561, 'test  |   test  |   test'),
(562, 'test  |   test  |   test'),
(563, 'test  |   test  |   test'),
(564, 'test  |   test  |   test'),
(565, 'test  |   test  |   test'),
(566, 'test  |   test  |   test'),
(567, 'test  |   test  |   test'),
(568, 'test  |   test  |   test'),
(569, 'test  |   test  |   test'),
(570, 'test  |   test  |   test'),
(571, 'test  |   test  |   test'),
(572, 'test  |   test  |   test'),
(573, 'test  |   test  |   test'),
(574, 'test  |   test  |   test'),
(575, 'test  |   test  |   test'),
(576, 'test  |   test  |   test'),
(577, 'test  |   test  |   test'),
(578, 'test  |   test  |   test'),
(579, 'test  |   test  |   test'),
(580, 'test  |   test  |   test'),
(581, 'test  |   test  |   test'),
(582, 'test  |   test  |   test'),
(583, 'test  |   test  |   test'),
(584, 'test  |   test  |   test'),
(585, 'test  |   test  |   test'),
(586, 'test  |   test  |   test'),
(587, 'test  |   test  |   test'),
(588, 'test  |   test  |   test'),
(589, 'test  |   test  |   test'),
(590, 'test  |   test  |   test'),
(591, 'test  |   test  |   test'),
(592, 'test  |   test  |   test'),
(593, 'test  |   test  |   test'),
(594, 'test  |   test  |   test'),
(595, 'test  |   test  |   test'),
(596, 'test  |   test  |   test'),
(597, 'test  |   test  |   test'),
(598, 'test  |   test  |   test'),
(599, 'test  |   test  |   test'),
(600, 'test  |   test  |   test'),
(601, 'test  |   test  |   test'),
(602, 'test  |   test  |   test'),
(603, 'test  |   test  |   test'),
(604, 'test  |   test  |   test'),
(605, 'test  |   test  |   test'),
(606, 'test  |   test  |   test'),
(607, 'test  |   test  |   test'),
(608, 'test  |   test  |   test'),
(609, 'test  |   test  |   test'),
(610, 'test  |   test  |   test'),
(611, 'test  |   test  |   test'),
(612, 'test  |   test  |   test'),
(613, 'test  |   test  |   test'),
(614, 'test  |   test  |   test'),
(615, 'test  |   test  |   test'),
(616, 'test  |   test  |   test'),
(617, 'test  |   test  |   test'),
(618, 'test  |   test  |   test'),
(619, 'test  |   test  |   test'),
(620, 'test  |   test  |   test'),
(621, 'test  |   test  |   test'),
(622, 'test  |   test  |   test'),
(623, 'test  |   test  |   test'),
(624, 'test  |   test  |   test'),
(625, 'test  |   test  |   test'),
(626, 'test  |   test  |   test'),
(627, 'test  |   test  |   test'),
(628, 'test  |   test  |   test'),
(629, 'test  |   test  |   test'),
(630, 'test  |   test  |   test'),
(631, 'test  |   test  |   test'),
(632, 'test  |   test  |   test'),
(633, 'test  |   test  |   test'),
(634, 'test  |   test  |   test'),
(635, 'test  |   test  |   test'),
(636, 'test  |   test  |   test'),
(637, 'test  |   test  |   test'),
(638, 'test  |   test  |   test'),
(639, 'test  |   test  |   test'),
(640, 'test  |   test  |   test'),
(641, 'test  |   test  |   test'),
(642, 'test  |   test  |   test'),
(643, 'test  |   test  |   test'),
(644, 'test  |   test  |   test'),
(645, 'test  |   test  |   test'),
(646, 'test  |   test  |   test'),
(647, 'test  |   test  |   test'),
(648, 'test  |   test  |   test'),
(649, 'test  |   test  |   test'),
(650, 'test  |   test  |   test'),
(651, 'test  |   test  |   test'),
(652, 'test  |   test  |   test'),
(653, 'test  |   test  |   test'),
(654, 'test  |   test  |   test'),
(655, 'test  |   test  |   test'),
(656, 'test  |   test  |   test'),
(657, 'test  |   test  |   test'),
(658, 'test  |   test  |   test'),
(659, 'test  |   test  |   test'),
(660, 'test  |   test  |   test'),
(661, 'test  |   test  |   test'),
(662, 'test  |   test  |   test'),
(663, 'test  |   test  |   test'),
(664, 'test  |   test  |   test'),
(665, 'test  |   test  |   test'),
(666, 'test  |   test  |   test'),
(667, 'test  |   test  |   test'),
(668, 'test  |   test  |   test'),
(669, 'test  |   test  |   test'),
(670, 'test  |   test  |   test'),
(671, 'test  |   test  |   test'),
(672, 'test  |   test  |   test'),
(673, 'test  |   test  |   test'),
(674, 'test  |   test  |   test'),
(675, 'test  |   test  |   test'),
(676, 'test  |   test  |   test'),
(677, 'test  |   test  |   test'),
(678, 'test  |   test  |   test'),
(679, 'test  |   test  |   test'),
(680, 'test  |   test  |   test'),
(681, 'test  |   test  |   test'),
(682, 'test  |   test  |   test'),
(683, 'test  |   test  |   test'),
(684, 'test  |   test  |   test'),
(685, 'test  |   test  |   test'),
(686, 'test  |   test  |   test'),
(687, 'test  |   test  |   test'),
(688, 'test  |   test  |   test'),
(689, 'test  |   test  |   test'),
(690, 'test  |   test  |   test'),
(691, 'test  |   test  |   test'),
(692, 'test  |   test  |   test'),
(693, 'test  |   test  |   test'),
(694, 'test  |   test  |   test'),
(695, 'test  |   test  |   test'),
(696, 'test  |   test  |   test'),
(697, 'test  |   test  |   test'),
(698, 'test  |   test  |   test'),
(699, 'test  |   test  |   test'),
(700, 'test  |   test  |   test'),
(701, 'test  |   test  |   test'),
(702, 'test  |   test  |   test'),
(703, 'test  |   test  |   test'),
(704, 'test  |   test  |   test'),
(705, 'test  |   test  |   test'),
(706, 'test  |   test  |   test'),
(707, 'test  |   test  |   test'),
(708, 'test  |   test  |   test'),
(709, 'test  |   test  |   test'),
(710, 'test  |   test  |   test'),
(711, 'test  |   test  |   test'),
(712, 'test  |   test  |   test'),
(713, 'test  |   test  |   test'),
(714, 'test  |   test  |   test'),
(715, 'test  |   test  |   test'),
(716, 'test  |   test  |   test'),
(717, 'test  |   test  |   test'),
(718, 'test  |   test  |   test'),
(719, 'test  |   test  |   test'),
(720, 'test  |   test  |   test'),
(721, 'test  |   test  |   test'),
(722, 'test  |   test  |   test'),
(723, 'test  |   test  |   test'),
(724, 'test  |   test  |   test'),
(725, 'test  |   test  |   test'),
(726, 'test  |   test  |   test'),
(727, 'test  |   test  |   test'),
(728, 'test  |   test  |   test'),
(729, 'test  |   test  |   test'),
(730, 'test  |   test  |   test'),
(731, 'test  |   test  |   test'),
(732, 'test  |   test  |   test'),
(733, 'test  |   test  |   test'),
(734, 'test  |   test  |   test'),
(735, 'test  |   test  |   test'),
(736, 'test  |   test  |   test'),
(737, 'test  |   test  |   test'),
(738, 'test  |   test  |   test'),
(739, 'test  |   test  |   test'),
(740, 'test  |   test  |   test'),
(741, 'test  |   test  |   test'),
(742, 'test  |   test  |   test'),
(743, 'test  |   test  |   test'),
(744, 'test  |   test  |   test'),
(745, 'test  |   test  |   test'),
(746, 'test  |   test  |   test'),
(747, 'test  |   test  |   test'),
(748, 'test  |   test  |   test'),
(749, 'test  |   test  |   test'),
(750, 'test  |   test  |   test'),
(751, 'test  |   test  |   test'),
(752, 'test  |   test  |   test'),
(753, 'test  |   test  |   test'),
(754, 'test  |   test  |   test'),
(755, 'test  |   test  |   test'),
(756, 'test  |   test  |   test'),
(757, 'test  |   test  |   test'),
(758, 'test  |   test  |   test'),
(759, 'test  |   test  |   test'),
(760, 'test  |   test  |   test'),
(761, 'test  |   test  |   test'),
(762, 'test  |   test  |   test'),
(763, 'test  |   test  |   test'),
(764, 'test  |   test  |   test'),
(765, 'test  |   test  |   test'),
(766, 'test  |   test  |   test'),
(767, 'test  |   test  |   test'),
(768, 'test  |   test  |   test'),
(769, 'test  |   test  |   test'),
(770, 'test  |   test  |   test'),
(771, 'test  |   test  |   test'),
(772, 'test  |   test  |   test'),
(773, 'test  |   test  |   test'),
(774, 'test  |   test  |   test'),
(775, 'test  |   test  |   test'),
(776, 'test  |   test  |   test'),
(777, 'test  |   test  |   test'),
(778, 'test  |   test  |   test'),
(779, 'test  |   test  |   test'),
(780, 'test  |   test  |   test'),
(781, 'test  |   test  |   test'),
(782, 'test  |   test  |   test'),
(783, 'test  |   test  |   test'),
(784, 'test  |   test  |   test'),
(785, 'test  |   test  |   test'),
(786, 'test  |   test  |   test'),
(787, 'test  |   test  |   test'),
(788, 'test  |   test  |   test'),
(789, 'test  |   test  |   test'),
(790, 'test  |   test  |   test'),
(791, 'test  |   test  |   test'),
(792, 'test  |   test  |   test'),
(793, 'test  |   test  |   test'),
(794, 'test  |   test  |   test'),
(795, 'test  |   test  |   test'),
(796, 'test  |   test  |   test'),
(797, 'test  |   test  |   test'),
(798, 'test  |   test  |   test'),
(799, 'test  |   test  |   test'),
(800, 'test  |   test  |   test'),
(801, 'test  |   test  |   test'),
(802, 'test  |   test  |   test'),
(803, 'test  |   test  |   test'),
(804, 'test  |   test  |   test'),
(805, 'test  |   test  |   test'),
(806, 'test  |   test  |   test'),
(807, 'test  |   test  |   test'),
(808, 'test  |   test  |   test'),
(809, 'test  |   test  |   test'),
(810, 'test  |   test  |   test'),
(811, 'test  |   test  |   test'),
(812, 'test  |   test  |   test'),
(813, 'test  |   test  |   test'),
(814, 'test  |   test  |   test'),
(815, 'test  |   test  |   test'),
(816, 'test  |   test  |   test'),
(817, 'test  |   test  |   test'),
(818, 'test  |   test  |   test'),
(819, 'test  |   test  |   test'),
(820, 'test  |   test  |   test'),
(821, 'test  |   test  |   test'),
(822, 'test  |   test  |   test'),
(823, 'test  |   test  |   test'),
(824, 'test  |   test  |   test'),
(825, 'test  |   test  |   test'),
(826, 'test  |   test  |   test'),
(827, 'test  |   test  |   test'),
(828, 'test  |   test  |   test'),
(829, 'test  |   test  |   test'),
(830, 'test  |   test  |   test'),
(831, 'test  |   test  |   test'),
(832, 'test  |   test  |   test'),
(833, 'test  |   test  |   test'),
(834, 'test  |   test  |   test'),
(835, 'test  |   test  |   test'),
(836, 'test  |   test  |   test'),
(837, 'test  |   test  |   test'),
(838, 'test  |   test  |   test'),
(839, 'test  |   test  |   test'),
(840, 'test  |   test  |   test'),
(841, 'test  |   test  |   test'),
(842, 'test  |   test  |   test'),
(843, 'test  |   test  |   test'),
(844, 'test  |   test  |   test'),
(845, 'test  |   test  |   test'),
(846, 'test  |   test  |   test'),
(847, 'test  |   test  |   test'),
(848, 'test  |   test  |   test'),
(849, 'test  |   test  |   test'),
(850, 'test  |   test  |   test'),
(851, 'test  |   test  |   test'),
(852, 'test  |   test  |   test'),
(853, 'test  |   test  |   test'),
(854, 'test  |   test  |   test'),
(855, 'test  |   test  |   test'),
(856, 'test  |   test  |   test'),
(857, 'test  |   test  |   test'),
(858, 'test  |   test  |   test'),
(859, 'test  |   test  |   test'),
(860, 'test  |   test  |   test'),
(861, 'test  |   test  |   test'),
(862, 'test  |   test  |   test'),
(863, 'test  |   test  |   test'),
(864, 'test  |   test  |   test'),
(865, 'test  |   test  |   test'),
(866, 'test  |   test  |   test'),
(867, 'test  |   test  |   test'),
(868, 'test  |   test  |   test'),
(869, 'test  |   test  |   test'),
(870, 'test  |   test  |   test'),
(871, 'test  |   test  |   test'),
(872, 'test  |   test  |   test'),
(873, 'test  |   test  |   test'),
(874, 'test  |   test  |   test');
INSERT INTO `beritagabung` (`id`, `info`) VALUES
(875, 'test  |   test  |   test'),
(876, 'test  |   test  |   test'),
(877, 'test  |   test  |   test'),
(878, 'test  |   test  |   test'),
(879, 'test  |   test  |   test'),
(880, 'test  |   test  |   test'),
(881, 'test  |   test  |   test'),
(882, 'test  |   test  |   test'),
(883, 'test  |   test  |   test'),
(884, 'test  |   test  |   test'),
(885, 'test  |   test  |   test'),
(886, 'test  |   test  |   test'),
(887, 'test  |   test  |   test'),
(888, 'test  |   test  |   test'),
(889, 'test  |   test  |   test'),
(890, 'test  |   test  |   test'),
(891, 'test  |   test  |   test'),
(892, 'test  |   test  |   test'),
(893, 'test  |   test  |   test'),
(894, 'test  |   test  |   test'),
(895, 'test  |   test  |   test'),
(896, 'test  |   test  |   test'),
(897, 'test  |   test  |   test'),
(898, 'test  |   test  |   test'),
(899, 'test  |   test  |   test'),
(900, 'test  |   test  |   test'),
(901, 'test  |   test  |   test'),
(902, 'test  |   test  |   test'),
(903, 'test  |   test  |   test'),
(904, 'test  |   test  |   test'),
(905, 'test  |   test  |   test'),
(906, 'test  |   test  |   test'),
(907, 'test  |   test  |   test'),
(908, 'test  |   test  |   test'),
(909, 'test  |   test  |   test'),
(910, 'test  |   test  |   test'),
(911, 'test  |   test  |   test'),
(912, 'test  |   test  |   test'),
(913, 'test  |   test'),
(914, 'test  |   test'),
(915, 'test  |   test'),
(916, 'test  |   test'),
(917, 'test  |   test'),
(918, 'test  |   test'),
(919, 'test  |   test'),
(920, 'test  |   test'),
(921, 'test  |   test'),
(922, 'test  |   test'),
(923, 'test  |   test'),
(924, 'test  |   test'),
(925, 'test  |   test'),
(926, 'test  |   test'),
(927, 'test  |   test'),
(928, 'test  |   test'),
(929, 'test  |   test'),
(930, 'test  |   test'),
(931, 'test  |   test'),
(932, 'test  |   test'),
(933, 'test  |   test'),
(934, 'test  |   test'),
(935, 'test  |   test'),
(936, 'test  |   test'),
(937, 'test  |   test  |   Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau '),
(938, 'test  |   test  |   Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau '),
(939, 'test  |   test  |   Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau '),
(940, 'test  |   Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau '),
(941, 'test  |   Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau '),
(942, 'test  |   Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau '),
(943, 'test  |   Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   erwujudnya Pertanian dan Peternakan Riau yang Maju,'),
(944, 'test  |   Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   erwujudnya Pertanian dan Peternakan Riau yang Maju,'),
(945, 'test  |   Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   erwujudnya Pertanian dan Peternakan Riau yang Maju,'),
(946, 'test  |   Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   erwujudnya Pertanian dan Peternakan Riau yang Maju,'),
(947, 'test  |   Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   erwujudnya Pertanian dan Peternakan Riau yang Maju,'),
(948, 'test  |   Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   erwujudnya Pertanian dan Peternakan Riau yang Maju,'),
(949, 'test  |   Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   erwujudnya Pertanian dan Peternakan Riau yang Maju'),
(950, 'test  |   Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   erwujudnya Pertanian dan Peternakan Riau yang Maju'),
(951, 'test  |   Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   erwujudnya Pertanian dan Peternakan Riau yang Maju'),
(952, 'test  |   Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   erwujudnya Pertanian dan Peternakan Riau yang Maju  |   Menuju Petani dan Peternak yang Sejahtera dengan Dukungan Aparatur yang Andal'),
(953, 'test  |   Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   erwujudnya Pertanian dan Peternakan Riau yang Maju  |   Menuju Petani dan Peternak yang Sejahtera dengan Dukungan Aparatur yang Andal'),
(954, 'test  |   Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   erwujudnya Pertanian dan Peternakan Riau yang Maju  |   Menuju Petani dan Peternak yang Sejahtera dengan Dukungan Aparatur yang Andal'),
(955, 'test  |   Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   erwujudnya Pertanian dan Peternakan Riau yang Maju  |   Menuju Petani dan Peternak yang Sejahtera dengan Dukungan Aparatur yang Andal'),
(956, 'test  |   Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   erwujudnya Pertanian dan Peternakan Riau yang Maju  |   Menuju Petani dan Peternak yang Sejahtera dengan Dukungan Aparatur yang Andal'),
(957, 'test  |   Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   erwujudnya Pertanian dan Peternakan Riau yang Maju  |   Menuju Petani dan Peternak yang Sejahtera dengan Dukungan Aparatur yang Andal'),
(958, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   erwujudnya Pertanian dan Peternakan Riau yang Maju  |   Menuju Petani dan Peternak yang Sejahtera dengan Dukungan Aparatur yang Andal'),
(959, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   erwujudnya Pertanian dan Peternakan Riau yang Maju  |   Menuju Petani dan Peternak yang Sejahtera dengan Dukungan Aparatur yang Andal'),
(960, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   erwujudnya Pertanian dan Peternakan Riau yang Maju  |   Menuju Petani dan Peternak yang Sejahtera dengan Dukungan Aparatur yang Andal'),
(961, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   erwujudnya Pertanian dan Peternakan Riau yang Maju  |   Menuju Petani dan Peternak yang Sejahtera dengan Dukungan Aparatur yang Andal'),
(962, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   erwujudnya Pertanian dan Peternakan Riau yang Maju  |   Menuju Petani dan Peternak yang Sejahtera dengan Dukungan Aparatur yang Andal'),
(963, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   erwujudnya Pertanian dan Peternakan Riau yang Maju  |   Menuju Petani dan Peternak yang Sejahtera dengan Dukungan Aparatur yang Andal'),
(964, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   erwujudnya Pertanian dan Peternakan Riau yang Maju  |   Menuju Petani dan Peternak yang Sejahtera dengan Dukungan Aparatur yang Andal'),
(965, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   erwujudnya Pertanian dan Peternakan Riau yang Maju  |   Menuju Petani dan Peternak yang Sejahtera dengan Dukungan Aparatur yang Andal'),
(966, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   erwujudnya Pertanian dan Peternakan Riau yang Maju  |   Menuju Petani dan Peternak yang Sejahtera dengan Dukungan Aparatur yang Andal'),
(967, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   erwujudnya Pertanian dan Peternakan Riau yang Maju  |   Menuju Petani dan Peternak yang Sejahtera dengan Dukungan Aparatur yang Andal'),
(968, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   erwujudnya Pertanian dan Peternakan Riau yang Maju  |   Menuju Petani dan Peternak yang Sejahtera dengan Dukungan Aparatur yang Andal'),
(969, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   erwujudnya Pertanian dan Peternakan Riau yang Maju  |   Menuju Petani dan Peternak yang Sejahtera dengan Dukungan Aparatur yang Andal'),
(970, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   erwujudnya Pertanian dan Peternakan Riau yang Maju  |   Menuju Petani dan Peternak yang Sejahtera dengan Dukungan Aparatur yang Andal'),
(971, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   erwujudnya Pertanian dan Peternakan Riau yang Maju  |   Menuju Petani dan Peternak yang Sejahtera dengan Dukungan Aparatur yang Andal'),
(972, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   erwujudnya Pertanian dan Peternakan Riau yang Maju  |   Menuju Petani dan Peternak yang Sejahtera dengan Dukungan Aparatur yang Andal'),
(973, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   erwujudnya Pertanian dan Peternakan Riau yang Maju  |   Menuju Petani dan Peternak yang Sejahtera dengan Dukungan Aparatur yang Andal'),
(974, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   erwujudnya Pertanian dan Peternakan Riau yang Maju  |   Menuju Petani dan Peternak yang Sejahtera dengan Dukungan Aparatur yang Andal'),
(975, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   erwujudnya Pertanian dan Peternakan Riau yang Maju  |   Menuju Petani dan Peternak yang Sejahtera dengan Dukungan Aparatur yang Andal'),
(976, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   erwujudnya Pertanian dan Peternakan Riau yang Maju  |   Menuju Petani dan Peternak yang Sejahtera dengan Dukungan Aparatur yang Andal'),
(977, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   erwujudnya Pertanian dan Peternakan Riau yang Maju  |   Menuju Petani dan Peternak yang Sejahtera dengan Dukungan Aparatur yang Andal'),
(978, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   erwujudnya Pertanian dan Peternakan Riau yang Maju  |   Menuju Petani dan Peternak yang Sejahtera dengan Dukungan Aparatur yang Andal'),
(979, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   erwujudnya Pertanian dan Peternakan Riau yang Maju  |   Menuju Petani dan Peternak yang Sejahtera dengan Dukungan Aparatur yang Andal'),
(980, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   erwujudnya Pertanian dan Peternakan Riau yang Maju  |   Menuju Petani dan Peternak yang Sejahtera dengan Dukungan Aparatur yang Andal'),
(981, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   erwujudnya Pertanian dan Peternakan Riau yang Maju  |   Menuju Petani dan Peternak yang Sejahtera dengan Dukungan Aparatur yang Andal'),
(982, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   erwujudnya Pertanian dan Peternakan Riau yang Maju  |   Menuju Petani dan Peternak yang Sejahtera dengan Dukungan Aparatur yang Andal'),
(983, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   erwujudnya Pertanian dan Peternakan Riau yang Maju  |   Menuju Petani dan Peternak yang Sejahtera dengan Dukungan Aparatur yang Andal'),
(984, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   erwujudnya Pertanian dan Peternakan Riau yang Maju  |   Menuju Petani dan Peternak yang Sejahtera dengan Dukungan Aparatur yang Andal'),
(985, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   erwujudnya Pertanian dan Peternakan Riau yang Maju  |   Menuju Petani dan Peternak yang Sejahtera dengan Dukungan Aparatur yang Andal'),
(986, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   erwujudnya Pertanian dan Peternakan Riau yang Maju  |   Menuju Petani dan Peternak yang Sejahtera dengan Dukungan Aparatur yang Andal'),
(987, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   erwujudnya Pertanian dan Peternakan Riau yang Maju  |   Menuju Petani dan Peternak yang Sejahtera dengan Dukungan Aparatur yang Andal'),
(988, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   erwujudnya Pertanian dan Peternakan Riau yang Maju  |   Menuju Petani dan Peternak yang Sejahtera dengan Dukungan Aparatur yang Andal'),
(989, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   erwujudnya Pertanian dan Peternakan Riau yang Maju  |   Menuju Petani dan Peternak yang Sejahtera dengan Dukungan Aparatur yang Andal'),
(990, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   erwujudnya Pertanian dan Peternakan Riau yang Maju  |   Menuju Petani dan Peternak yang Sejahtera dengan Dukungan Aparatur yang Andal'),
(991, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   erwujudnya Pertanian dan Peternakan Riau yang Maju  |   Menuju Petani dan Peternak yang Sejahtera dengan Dukungan Aparatur yang Andal'),
(992, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   erwujudnya Pertanian dan Peternakan Riau yang Maju  |   Menuju Petani dan Peternak yang Sejahtera dengan Dukungan Aparatur yang Andal'),
(993, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   erwujudnya Pertanian dan Peternakan Riau yang Maju  |   Menuju Petani dan Peternak yang Sejahtera dengan Dukungan Aparatur yang Andal'),
(994, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   erwujudnya Pertanian dan Peternakan Riau yang Maju  |   Menuju Petani dan Peternak yang Sejahtera dengan Dukungan Aparatur yang Andal'),
(995, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   erwujudnya Pertanian dan Peternakan Riau yang Maju  |   Menuju Petani dan Peternak yang Sejahtera dengan Dukungan Aparatur yang Andal'),
(996, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   erwujudnya Pertanian dan Peternakan Riau yang Maju  |   Menuju Petani dan Peternak yang Sejahtera dengan Dukungan Aparatur yang Andal'),
(997, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   erwujudnya Pertanian dan Peternakan Riau yang Maju  |   Menuju Petani dan Peternak yang Sejahtera dengan Dukungan Aparatur yang Andal'),
(998, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   erwujudnya Pertanian dan Peternakan Riau yang Maju  |   Menuju Petani dan Peternak yang Sejahtera dengan Dukungan Aparatur yang Andal'),
(999, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   erwujudnya Pertanian dan Peternakan Riau yang Maju  |   Menuju Petani dan Peternak yang Sejahtera dengan Dukungan Aparatur yang Andal'),
(1000, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   erwujudnya Pertanian dan Peternakan Riau yang Maju  |   Menuju Petani dan Peternak yang Sejahtera dengan Dukungan Aparatur yang Andal'),
(1001, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   erwujudnya Pertanian dan Peternakan Riau yang Maju  |   Menuju Petani dan Peternak yang Sejahtera dengan Dukungan Aparatur yang Andal'),
(1002, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   erwujudnya Pertanian dan Peternakan Riau yang Maju  |   Menuju Petani dan Peternak yang Sejahtera dengan Dukungan Aparatur yang Andal'),
(1003, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   erwujudnya Pertanian dan Peternakan Riau yang Maju  |   Menuju Petani dan Peternak yang Sejahtera dengan Dukungan Aparatur yang Andal'),
(1004, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   erwujudnya Pertanian dan Peternakan Riau yang Maju  |   Menuju Petani dan Peternak yang Sejahtera dengan Dukungan Aparatur yang Andal'),
(1005, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   erwujudnya Pertanian dan Peternakan Riau yang Maju  |   Menuju Petani dan Peternak yang Sejahtera dengan Dukungan Aparatur yang Andal'),
(1006, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   erwujudnya Pertanian dan Peternakan Riau yang Maju  |   Menuju Petani dan Peternak yang Sejahtera dengan Dukungan Aparatur yang Andal'),
(1007, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   erwujudnya Pertanian dan Peternakan Riau yang Maju  |   Menuju Petani dan Peternak yang Sejahtera dengan Dukungan Aparatur yang Andal'),
(1008, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   erwujudnya Pertanian dan Peternakan Riau yang Maju  |   Menuju Petani dan Peternak yang Sejahtera dengan Dukungan Aparatur yang Andal'),
(1009, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   erwujudnya Pertanian dan Peternakan Riau yang Maju  |   Menuju Petani dan Peternak yang Sejahtera dengan Dukungan Aparatur yang Andal'),
(1010, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   erwujudnya Pertanian dan Peternakan Riau yang Maju  |   Menuju Petani dan Peternak yang Sejahtera dengan Dukungan Aparatur yang Andal'),
(1011, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   erwujudnya Pertanian dan Peternakan Riau yang Maju  |   Menuju Petani dan Peternak yang Sejahtera dengan Dukungan Aparatur yang Andal'),
(1012, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   erwujudnya Pertanian dan Peternakan Riau yang Maju  |   Menuju Petani dan Peternak yang Sejahtera dengan Dukungan Aparatur yang Andal'),
(1013, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   erwujudnya Pertanian dan Peternakan Riau yang Maju  |   Menuju Petani dan Peternak yang Sejahtera dengan Dukungan Aparatur yang Andal'),
(1014, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   erwujudnya Pertanian dan Peternakan Riau yang Maju  |   Menuju Petani dan Peternak yang Sejahtera dengan Dukungan Aparatur yang Andal'),
(1015, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   erwujudnya Pertanian dan Peternakan Riau yang Maju  |   Menuju Petani dan Peternak yang Sejahtera dengan Dukungan Aparatur yang Andal'),
(1016, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   erwujudnya Pertanian dan Peternakan Riau yang Maju  |   Menuju Petani dan Peternak yang Sejahtera dengan Dukungan Aparatur yang Andal'),
(1017, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   erwujudnya Pertanian dan Peternakan Riau yang Maju  |   Menuju Petani dan Peternak yang Sejahtera dengan Dukungan Aparatur yang Andal'),
(1018, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   erwujudnya Pertanian dan Peternakan Riau yang Maju  |   Menuju Petani dan Peternak yang Sejahtera dengan Dukungan Aparatur yang Andal'),
(1019, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   erwujudnya Pertanian dan Peternakan Riau yang Maju  |   Menuju Petani dan Peternak yang Sejahtera dengan Dukungan Aparatur yang Andal'),
(1020, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   erwujudnya Pertanian dan Peternakan Riau yang Maju  |   Menuju Petani dan Peternak yang Sejahtera dengan Dukungan Aparatur yang Andal'),
(1021, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   erwujudnya Pertanian dan Peternakan Riau yang Maju  |   Menuju Petani dan Peternak yang Sejahtera dengan Dukungan Aparatur yang Andal'),
(1022, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   erwujudnya Pertanian dan Peternakan Riau yang Maju  |   Menuju Petani dan Peternak yang Sejahtera dengan Dukungan Aparatur yang Andal'),
(1023, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   erwujudnya Pertanian dan Peternakan Riau yang Maju  |   Menuju Petani dan Peternak yang Sejahtera dengan Dukungan Aparatur yang Andal'),
(1024, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   erwujudnya Pertanian dan Peternakan Riau yang Maju  |   Menuju Petani dan Peternak yang Sejahtera dengan Dukungan Aparatur yang Andal'),
(1025, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   erwujudnya Pertanian dan Peternakan Riau yang Maju  |   Menuju Petani dan Peternak yang Sejahtera dengan Dukungan Aparatur yang Andal'),
(1026, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   erwujudnya Pertanian dan Peternakan Riau yang Maju  |   Menuju Petani dan Peternak yang Sejahtera dengan Dukungan Aparatur yang Andal'),
(1027, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   erwujudnya Pertanian dan Peternakan Riau yang Maju  |   Menuju Petani dan Peternak yang Sejahtera dengan Dukungan Aparatur yang Andal'),
(1028, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   erwujudnya Pertanian dan Peternakan Riau yang Maju  |   Menuju Petani dan Peternak yang Sejahtera dengan Dukungan Aparatur yang Andal'),
(1029, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   erwujudnya Pertanian dan Peternakan Riau yang Maju  |   Menuju Petani dan Peternak yang Sejahtera dengan Dukungan Aparatur yang Andal'),
(1030, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   erwujudnya Pertanian dan Peternakan Riau yang Maju  |   Menuju Petani dan Peternak yang Sejahtera dengan Dukungan Aparatur yang Andal'),
(1031, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   erwujudnya Pertanian dan Peternakan Riau yang Maju  |   Menuju Petani dan Peternak yang Sejahtera dengan Dukungan Aparatur yang Andal'),
(1032, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   erwujudnya Pertanian dan Peternakan Riau yang Maju  |   Menuju Petani dan Peternak yang Sejahtera dengan Dukungan Aparatur yang Andal'),
(1033, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   erwujudnya Pertanian dan Peternakan Riau yang Maju  |   Menuju Petani dan Peternak yang Sejahtera dengan Dukungan Aparatur yang Andal'),
(1034, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   erwujudnya Pertanian dan Peternakan Riau yang Maju  |   Menuju Petani dan Peternak yang Sejahtera dengan Dukungan Aparatur yang Andal'),
(1035, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   erwujudnya Pertanian dan Peternakan Riau yang Maju  |   Menuju Petani dan Peternak yang Sejahtera dengan Dukungan Aparatur yang Andal'),
(1036, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   erwujudnya Pertanian dan Peternakan Riau yang Maju  |   Menuju Petani dan Peternak yang Sejahtera dengan Dukungan Aparatur yang Andal'),
(1037, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   erwujudnya Pertanian dan Peternakan Riau yang Maju  |   Menuju Petani dan Peternak yang Sejahtera dengan Dukungan Aparatur yang Andal'),
(1038, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   erwujudnya Pertanian dan Peternakan Riau yang Maju  |   Menuju Petani dan Peternak yang Sejahtera dengan Dukungan Aparatur yang Andal'),
(1039, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   erwujudnya Pertanian dan Peternakan Riau yang Maju  |   Menuju Petani dan Peternak yang Sejahtera dengan Dukungan Aparatur yang Andal'),
(1040, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   erwujudnya Pertanian dan Peternakan Riau yang Maju  |   Menuju Petani dan Peternak yang Sejahtera dengan Dukungan Aparatur yang Andal'),
(1041, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   erwujudnya Pertanian dan Peternakan Riau yang Maju  |   Menuju Petani dan Peternak yang Sejahtera dengan Dukungan Aparatur yang Andal'),
(1042, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   erwujudnya Pertanian dan Peternakan Riau yang Maju  |   Menuju Petani dan Peternak yang Sejahtera dengan Dukungan Aparatur yang Andal'),
(1043, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   erwujudnya Pertanian dan Peternakan Riau yang Maju  |   Menuju Petani dan Peternak yang Sejahtera dengan Dukungan Aparatur yang Andal'),
(1044, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   erwujudnya Pertanian dan Peternakan Riau yang Maju  |   Menuju Petani dan Peternak yang Sejahtera dengan Dukungan Aparatur yang Andal'),
(1045, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   erwujudnya Pertanian dan Peternakan Riau yang Maju  |   Menuju Petani dan Peternak yang Sejahtera dengan Dukungan Aparatur yang Andal'),
(1046, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   erwujudnya Pertanian dan Peternakan Riau yang Maju  |   Menuju Petani dan Peternak yang Sejahtera dengan Dukungan Aparatur yang Andal'),
(1047, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   erwujudnya Pertanian dan Peternakan Riau yang Maju  |   Menuju Petani dan Peternak yang Sejahtera dengan Dukungan Aparatur yang Andal'),
(1048, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   erwujudnya Pertanian dan Peternakan Riau yang Maju  |   Menuju Petani dan Peternak yang Sejahtera dengan Dukungan Aparatur yang Andal'),
(1049, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   erwujudnya Pertanian dan Peternakan Riau yang Maju  |   Menuju Petani dan Peternak yang Sejahtera dengan Dukungan Aparatur yang Andal'),
(1050, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   erwujudnya Pertanian dan Peternakan Riau yang Maju  |   Menuju Petani dan Peternak yang Sejahtera dengan Dukungan Aparatur yang Andal'),
(1051, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   erwujudnya Pertanian dan Peternakan Riau yang Maju  |   Menuju Petani dan Peternak yang Sejahtera dengan Dukungan Aparatur yang Andal'),
(1052, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   erwujudnya Pertanian dan Peternakan Riau yang Maju  |   Menuju Petani dan Peternak yang Sejahtera dengan Dukungan Aparatur yang Andal'),
(1053, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   erwujudnya Pertanian dan Peternakan Riau yang Maju  |   Menuju Petani dan Peternak yang Sejahtera dengan Dukungan Aparatur yang Andal'),
(1054, ''),
(1055, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   erwujudnya Pertanian dan Peternakan Riau yang Maju  |   Menuju Petani dan Peternak yang Sejahtera dengan Dukungan Aparatur yang Andal'),
(1056, ''),
(1057, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   erwujudnya Pertanian dan Peternakan Riau yang Maju  |   Menuju Petani dan Peternak yang Sejahtera dengan Dukungan Aparatur yang Andal'),
(1058, ''),
(1059, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   erwujudnya Pertanian dan Peternakan Riau yang Maju  |   Menuju Petani dan Peternak yang Sejahtera dengan Dukungan Aparatur yang Andal'),
(1060, ''),
(1061, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   erwujudnya Pertanian dan Peternakan Riau yang Maju'),
(1062, ''),
(1063, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   terwujudnya Pertanian dan Peternakan Riau yang Maju'),
(1064, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   terwujudnya Pertanian dan Peternakan Riau yang Maju'),
(1065, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   terwujudnya Pertanian dan Peternakan Riau yang Maju'),
(1066, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   terwujudnya Pertanian dan Peternakan Riau yang Maju'),
(1067, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   terwujudnya Pertanian dan Peternakan Riau yang Maju'),
(1068, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   terwujudnya Pertanian dan Peternakan Riau yang Maju'),
(1069, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   terwujudnya Pertanian dan Peternakan Riau yang Maju'),
(1070, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   terwujudnya Pertanian dan Peternakan Riau yang Maju'),
(1071, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   terwujudnya Pertanian dan Peternakan Riau yang Maju'),
(1072, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   terwujudnya Pertanian dan Peternakan Riau yang Maju'),
(1073, ''),
(1074, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   terwujudnya Pertanian dan Peternakan Riau yang Maju'),
(1075, ''),
(1076, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   terwujudnya Pertanian dan Peternakan Riau yang Maju'),
(1077, ''),
(1078, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   terwujudnya Pertanian dan Peternakan Riau yang Maju'),
(1079, ''),
(1080, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   terwujudnya Pertanian dan Peternakan Riau yang Maju'),
(1081, ''),
(1082, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   terwujudnya Pertanian dan Peternakan Riau yang Maju'),
(1083, ''),
(1084, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   terwujudnya Pertanian dan Peternakan Riau yang Maju'),
(1085, ''),
(1086, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   terwujudnya Pertanian dan Peternakan Riau yang Maju'),
(1087, ''),
(1088, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   terwujudnya Pertanian dan Peternakan Riau yang Maju  |   aku adalah anak gembala'),
(1089, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   terwujudnya Pertanian dan Peternakan Riau yang Maju  |   aku adalah anak gembala'),
(1090, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   terwujudnya Pertanian dan Peternakan Riau yang Maju  |   aku adalah anak gembala'),
(1091, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   terwujudnya Pertanian dan Peternakan Riau yang Maju  |   aku adalah anak gembala'),
(1092, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   terwujudnya Pertanian dan Peternakan Riau yang Maju  |   aku adalah anak gembala'),
(1093, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   terwujudnya Pertanian dan Peternakan Riau yang Maju  |   aku adalah anak gembala'),
(1094, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   terwujudnya Pertanian dan Peternakan Riau yang Maju  |   aku adalah anak gembala'),
(1095, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   terwujudnya Pertanian dan Peternakan Riau yang Maju  |   aku adalah anak gembala'),
(1096, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   terwujudnya Pertanian dan Peternakan Riau yang Maju  |   aku adalah anak gembala'),
(1097, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   terwujudnya Pertanian dan Peternakan Riau yang Maju  |   aku adalah anak gembala'),
(1098, ''),
(1099, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   terwujudnya Pertanian dan Peternakan Riau yang Maju  |   aku adalah anak gembala'),
(1100, ''),
(1101, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   terwujudnya Pertanian dan Peternakan Riau yang Maju  |   aku adalah anak gembala'),
(1102, ''),
(1103, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   terwujudnya Pertanian dan Peternakan Riau yang Maju  |   aku adalah anak gembala'),
(1104, ''),
(1105, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   terwujudnya Pertanian dan Peternakan Riau yang Maju  |   aku adalah anak gembala'),
(1106, ''),
(1107, ''),
(1108, '  |     |     |     |     |     |   '),
(1109, ''),
(1110, '  |     |     |     |     |     |   '),
(1111, ''),
(1112, ''),
(1113, ''),
(1114, ''),
(1115, ''),
(1116, ''),
(1117, ''),
(1118, '  |     |     |     |     |     |   '),
(1119, ''),
(1120, '  |     |     |     |     |     |   '),
(1121, ''),
(1122, '  |     |     |     |     |     |   '),
(1123, ''),
(1124, '  |     |     |     |     |     |   '),
(1125, ''),
(1126, '  |     |     |     |     |     |   '),
(1127, ''),
(1128, '  |     |     |     |     |     |   '),
(1129, ''),
(1130, '  |     |     |     |     |     |   '),
(1131, ''),
(1132, '  |     |     |     |     |     |   '),
(1133, ''),
(1134, '  |     |     |     |     |     |   '),
(1135, ''),
(1136, '  |     |     |     |     |     |   '),
(1137, ''),
(1138, '  |     |     |     |     |     |   '),
(1139, ''),
(1140, '  |     |     |     |     |     |   '),
(1141, ''),
(1142, '  |     |     |     |     |     |   '),
(1143, ''),
(1144, '  |     |     |     |     |     |   '),
(1145, ''),
(1146, '  |     |     |     |     |     |   '),
(1147, ''),
(1148, '  |     |     |     |     |     |   '),
(1149, ''),
(1150, '  |     |     |     |     |     |   '),
(1151, ''),
(1152, '  |     |     |     |     |     |   '),
(1153, ''),
(1154, '  |     |     |     |     |     |   '),
(1155, ''),
(1156, '  |     |     |     |     |     |   '),
(1157, ''),
(1158, '  |     |     |     |     |     |   '),
(1159, ''),
(1160, '  |     |     |     |     |     |   '),
(1161, ''),
(1162, '  |     |     |     |     |     |   '),
(1163, ''),
(1164, '  |     |     |     |     |     |   '),
(1165, ''),
(1166, '  |     |     |     |     |     |   '),
(1167, ''),
(1168, '  |     |     |     |     |     |   '),
(1169, ''),
(1170, '  |     |     |     |     |     |   '),
(1171, ''),
(1172, '  |     |     |     |     |     |   '),
(1173, ''),
(1174, '  |     |     |     |     |     |   '),
(1175, ''),
(1176, '  |     |     |     |     |     |   '),
(1177, ''),
(1178, '  |     |     |     |     |     |   '),
(1179, ''),
(1180, '  |     |     |     |     |     |   '),
(1181, ''),
(1182, '  |     |     |     |     |     |   '),
(1183, ''),
(1184, '  |     |     |     |     |     |   '),
(1185, ''),
(1186, '  |     |     |     |     |     |   '),
(1187, ''),
(1188, '  |     |     |     |     |     |   '),
(1189, ''),
(1190, '  |     |     |     |     |     |   '),
(1191, ''),
(1192, '  |     |     |     |     |     |   '),
(1193, ''),
(1194, '  |     |     |     |     |     |   '),
(1195, ''),
(1196, '  |     |     |     |     |     |   '),
(1197, ''),
(1198, '  |     |     |     |     |     |   '),
(1199, ''),
(1200, '  |     |     |     |     |     |   '),
(1201, ''),
(1202, '  |     |     |     |     |     |   '),
(1203, ''),
(1204, '  |     |     |     |     |     |   '),
(1205, ''),
(1206, '  |     |     |     |     |     |   '),
(1207, ''),
(1208, '  |     |     |     |     |     |   '),
(1209, ''),
(1210, '  |     |     |     |     |     |   '),
(1211, ''),
(1212, '  |     |     |     |     |     |   '),
(1213, ''),
(1214, '  |     |     |     |     |     |   '),
(1215, ''),
(1216, '  |     |     |     |     |     |   '),
(1217, ''),
(1218, '  |     |     |     |     |     |   '),
(1219, ''),
(1220, '  |     |     |     |     |     |   '),
(1221, ''),
(1222, '  |     |     |     |     |     |   '),
(1223, ''),
(1224, '  |     |     |     |     |     |   '),
(1225, ''),
(1226, '  |     |     |     |     |     |   '),
(1227, ''),
(1228, '  |     |     |     |     |     |   '),
(1229, ''),
(1230, '  |     |     |     |     |     |   '),
(1231, ''),
(1232, '  |     |     |     |     |     |   '),
(1233, ''),
(1234, '  |     |     |     |     |     |   '),
(1235, ''),
(1236, '  |     |     |     |     |     |   '),
(1237, ''),
(1238, '  |     |     |     |     |     |   '),
(1239, ''),
(1240, '  |     |     |     |     |     |   '),
(1241, ''),
(1242, '  |     |     |     |     |     |   '),
(1243, ''),
(1244, '  |     |     |     |     |     |   '),
(1245, ''),
(1246, '  |     |     |     |     |     |   '),
(1247, ''),
(1248, '  |     |     |     |     |     |   '),
(1249, ''),
(1250, '  |     |     |     |     |     |   '),
(1251, ''),
(1252, '  |     |     |     |     |     |   '),
(1253, ''),
(1254, '  |     |     |     |     |     |   '),
(1255, ''),
(1256, '  |     |     |     |     |     |   '),
(1257, ''),
(1258, '  |     |     |     |     |     |   '),
(1259, ''),
(1260, '  |     |     |     |     |     |   '),
(1261, ''),
(1262, '  |     |     |     |     |     |   '),
(1263, ''),
(1264, '  |     |     |     |     |     |   '),
(1265, ''),
(1266, '  |     |     |     |     |     |   '),
(1267, ''),
(1268, '  |     |     |     |     |     |   '),
(1269, ''),
(1270, '  |     |     |     |     |     |   '),
(1271, ''),
(1272, '  |     |     |     |     |     |   '),
(1273, ''),
(1274, '  |     |     |     |     |     |   '),
(1275, ''),
(1276, '  |     |     |     |     |     |   '),
(1277, ''),
(1278, '  |     |     |     |     |     |   '),
(1279, ''),
(1280, '  |     |     |     |     |     |   '),
(1281, ''),
(1282, '  |     |     |     |     |     |   '),
(1283, ''),
(1284, '  |     |     |     |     |     |   ');
INSERT INTO `beritagabung` (`id`, `info`) VALUES
(1285, ''),
(1286, '  |     |     |     |     |     |   '),
(1287, ''),
(1288, '  |     |     |     |     |     |   '),
(1289, ''),
(1290, '  |     |     |     |     |     |   '),
(1291, ''),
(1292, '  |     |     |     |     |     |   '),
(1293, ''),
(1294, '  |     |     |     |     |     |   '),
(1295, ''),
(1296, '  |     |     |     |     |     |   '),
(1297, ''),
(1298, '  |     |     |     |     |     |   '),
(1299, ''),
(1300, '  |     |     |     |     |     |   '),
(1301, ''),
(1302, '  |     |     |     |     |     |   '),
(1303, ''),
(1304, '  |     |     |     |     |     |   '),
(1305, ''),
(1306, '  |     |     |     |     |     |   '),
(1307, ''),
(1308, '  |     |     |     |     |     |   '),
(1309, ''),
(1310, '  |     |     |     |     |     |   '),
(1311, ''),
(1312, '  |     |     |     |     |     |   '),
(1313, ''),
(1314, '  |     |     |     |     |     |   '),
(1315, ''),
(1316, '  |     |     |     |     |     |     |     |     |     |     |   '),
(1317, ''),
(1318, '  |     |     |     |     |     |     |     |     |     |     |   '),
(1319, ''),
(1320, '  |     |     |     |     |     |     |     |     |     |     |   '),
(1321, ''),
(1322, '  |     |     |     |     |     |     |     |     |     |     |   '),
(1323, ''),
(1324, '  |     |     |     |     |     |     |     |     |     |     |   '),
(1325, ''),
(1326, '  |     |     |     |     |     |     |     |     |     |     |   '),
(1327, ''),
(1328, '  |     |     |     |     |     |     |     |     |     |     |   '),
(1329, ''),
(1330, '  |     |     |     |     |     |     |     |     |     |     |   '),
(1331, ''),
(1332, '  |     |     |     |     |     |     |     |     |     |     |     |     |     |     |     |     |     |     |   '),
(1333, ''),
(1334, '  |     |     |     |     |     |     |     |     |     |     |     |     |     |     |     |     |     |     |   '),
(1335, ''),
(1336, '  |     |     |     |     |     |     |     |     |     |     |     |     |     |     |     |     |     |     |   '),
(1337, ''),
(1338, '  |     |     |     |     |     |     |     |     |     |     |     |     |     |     |     |     |     |     |   '),
(1339, ''),
(1340, '  |     |     |     |     |     |     |     |     |     |     |     |     |     |     |     |     |     |     |   '),
(1341, ''),
(1342, '  |     |     |     |     |     |     |     |     |     |     |     |     |     |     |     |     |     |     |   '),
(1343, ''),
(1344, '  |     |     |     |     |     |     |     |     |     |     |     |     |     |     |     |     |     |     |   '),
(1345, ''),
(1346, '  |     |     |     |     |     |     |     |     |     |     |     |     |     |     |     |     |     |     |   '),
(1347, ''),
(1348, '  |     |     |     |     |     |     |     |     |     |     |     |     |     |     |     |     |     |     |   '),
(1349, ''),
(1350, '  |     |     |     |     |     |     |     |     |     |     |     |     |     |     |     |     |     |     |   '),
(1351, ''),
(1352, '  |     |     |     |     |     |     |     |     |     |     |     |     |     |     |     |     |     |     |   '),
(1353, ''),
(1354, '  |     |     |     |     |     |     |     |     |     |     |     |     |     |     |     |     |     |     |   '),
(1355, ''),
(1356, '  |     |     |     |     |     |     |     |     |     |     |     |     |     |     |     |     |     |     |   '),
(1357, ''),
(1358, '  |     |     |     |     |     |     |     |     |     |     |     |     |     |     |     |     |     |     |   '),
(1359, '  |     |     |     |     |     |     |     |     |     |     |     |     |     |     |     |     |     |     |   '),
(1360, '  |     |     |     |     |     |     |     |     |     |     |     |     |     |     |     |     |     |     |   '),
(1361, '  |     |     |     |     |     |     |     |     |     |     |     |     |     |     |     |     |     |   '),
(1362, '  |     |     |     |     |     |     |     |     |     |     |     |     |     |     |     |     |   '),
(1363, '  |     |     |     |     |     |     |     |     |     |     |     |     |     |     |     |   '),
(1364, '  |     |     |     |     |     |     |     |     |     |     |     |     |     |     |   '),
(1365, '  |     |     |     |     |     |     |     |     |     |     |     |     |     |   '),
(1366, '  |     |     |     |     |     |     |     |     |     |     |     |     |   '),
(1367, '  |     |     |     |     |     |     |     |     |     |     |     |   '),
(1368, '  |     |     |     |     |     |     |     |     |     |     |   '),
(1369, '  |     |     |     |     |     |     |     |     |     |     |     |   '),
(1370, '  |     |     |     |     |     |     |     |     |     |     |     |     |   '),
(1371, '  |     |     |     |     |     |     |     |     |     |     |     |     |   '),
(1372, '  |     |     |     |     |     |     |     |     |     |     |     |   '),
(1373, '  |     |     |     |     |     |     |     |     |     |     |   '),
(1374, '  |     |     |     |     |     |     |     |     |     |   '),
(1375, '  |     |     |     |     |     |     |     |     |     |   '),
(1376, '  |     |     |     |     |     |     |     |     |   '),
(1377, '  |     |     |     |     |     |     |     |   '),
(1378, '  |     |     |     |     |     |     |   '),
(1379, '  |     |     |     |     |     |   '),
(1380, '  |     |     |     |     |   '),
(1381, '  |     |     |     |   '),
(1382, '  |     |     |   '),
(1383, '  |     |   '),
(1384, '  |     |   '),
(1385, '  |     |   '),
(1386, '  |     |   '),
(1387, '  |     |   '),
(1388, '  |     |   '),
(1389, '  |     |   '),
(1390, '  |     |   '),
(1391, '  |     |   '),
(1392, '  |     |   '),
(1393, '  |     |   '),
(1394, '  |     |   '),
(1395, '  |     |   '),
(1396, '  |     |   '),
(1397, '  |     |   '),
(1398, ''),
(1399, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   terwujudnya Pertanian dan Peternakan Riau yang Maju  |   aku adalah anak gembala'),
(1400, ''),
(1401, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   terwujudnya Pertanian dan Peternakan Riau yang Maju  |   aku adalah anak gembala'),
(1402, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   terwujudnya Pertanian dan Peternakan Riau yang Maju  |   aku adalah anak gembala'),
(1403, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   terwujudnya Pertanian dan Peternakan Riau yang Maju  |   aku adalah anak gembala'),
(1404, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   terwujudnya Pertanian dan Peternakan Riau yang Maju  |   aku adalah anak gembala'),
(1405, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   terwujudnya Pertanian dan Peternakan Riau yang Maju  |   aku adalah anak gembala'),
(1406, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   terwujudnya Pertanian dan Peternakan Riau yang Maju  |   aku adalah anak gembala'),
(1407, 'Dinas Tanaman Pangan Hortikultura dan Perkebunan Provinsi Riau   |   terwujudnya Pertanian dan Peternakan Riau yang Maju  |   aku adalah anak gembala');
-- --------------------------------------------------------
--
-- Struktur dari tabel `kanan_bawah`
--
CREATE TABLE `kanan_bawah` (
`id` int(5) NOT NULL,
`Keterangan` varchar(222) NOT NULL,
`judul` varchar(222) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data untuk tabel `kanan_bawah`
--
INSERT INTO `kanan_bawah` (`id`, `Keterangan`, `judul`) VALUES
(6, 'c', 'cintai.jpeg'),
(7, 'pan', 'panen.jpeg'),
(8, 'pe', 'pedoman.jpeg'),
(9, 'tan', 'tanah.jpeg'),
(10, 'tatan', 'tantan.jpeg');
-- --------------------------------------------------------
--
-- Struktur dari tabel `kiri_atas`
--
CREATE TABLE `kiri_atas` (
`id` int(5) NOT NULL,
`Keterangan` varchar(222) NOT NULL,
`judul` varchar(222) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data untuk tabel `kiri_atas`
--
INSERT INTO `kiri_atas` (`id`, `Keterangan`, `judul`) VALUES
(5, 'ag', 'agro.jpeg'),
(6, 'ag2', 'agro18.jpeg'),
(7, 'hor', 'hortikult.jpeg'),
(8, 'stat', 'statis.jpeg');
-- --------------------------------------------------------
--
-- Struktur dari tabel `kiri_bawah`
--
CREATE TABLE `kiri_bawah` (
`id` int(5) NOT NULL,
`Keterangan` varchar(222) NOT NULL,
`judul` varchar(222) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data untuk tabel `kiri_bawah`
--
INSERT INTO `kiri_bawah` (`id`, `Keterangan`, `judul`) VALUES
(12, 'porgan.jpeg', 'porgan.jpeg'),
(13, 'pulmi', 'pulmi.jpeg'),
(14, 'pupat', 'pupat.jpeg'),
(15, 'pupuk', 'pupuk.jpeg');
-- --------------------------------------------------------
--
-- Struktur dari tabel `konfigurasi`
--
CREATE TABLE `konfigurasi` (
`id` int(11) NOT NULL,
`timeslide` int(15) NOT NULL DEFAULT '5000',
`jarak` int(1) NOT NULL DEFAULT '1',
`color1` varchar(11) NOT NULL,
`color2` varchar(20) NOT NULL,
`clockcolor` varchar(20) NOT NULL,
`textcolor` varchar(12) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data untuk tabel `konfigurasi`
--
INSERT INTO `konfigurasi` (`id`, `timeslide`, `jarak`, `color1`, `color2`, `clockcolor`, `textcolor`) VALUES
(1, 5000, 1, '3d3d3d', '3d3d3d', '3d3d3d', 'ffffff');
-- --------------------------------------------------------
--
-- Struktur dari tabel `pegawai`
--
CREATE TABLE `pegawai` (
`id` int(5) NOT NULL,
`Nama` varchar(55) NOT NULL,
`Jabatan` varchar(55) NOT NULL,
`Nomor` varchar(55) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data untuk tabel `pegawai`
--
INSERT INTO `pegawai` (`id`, `Nama`, `Jabatan`, `Nomor`) VALUES
(0, 'Abcd, M.Sc., S.T.', 'Security', '54232');
-- --------------------------------------------------------
--
-- Struktur dari tabel `slider`
--
CREATE TABLE `slider` (
`id` int(30) NOT NULL,
`keterangan` varchar(200) NOT NULL,
`judul` varchar(200) NOT NULL,
`judul_konversi` varchar(155) NOT NULL,
`tipe` int(15) DEFAULT NULL,
`durasi` int(22) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data untuk tabel `slider`
--
INSERT INTO `slider` (`id`, `keterangan`, `judul`, `judul_konversi`, `tipe`, `durasi`) VALUES
(16, 'test1313', 'WhatsAppImage2018-06-24at17.03.44.mp4', 'WhatsAppImage2018-06-24at17.03.44.jpeg', 1, 2500),
(17, 'gg', 'WhatsAppImage2018-06-24at17.03.46.mp4', 'WhatsAppImage2018-06-24at17.03.46.jpeg', 1, 5000),
(18, 'gda', 'WhatsAppImage2018-06-24at17.03.35.mp4', 'WhatsAppImage2018-06-24at17.03.35.jpeg', 1, 1000),
(19, 'test', 'WhatsAppImage2018-06-24at17.03.49.mp4', 'WhatsAppImage2018-06-24at17.03.49.jpeg', 1, 5000),
(20, 'testg', 'badan.mp4', 'badan.png', 2, 213252),
(21, 'gea', 'WhatsAppImage2018-06-24at17.03.51.mp4', 'WhatsAppImage2018-06-24at17.03.51.jpeg', 1, 2111),
(22, 'tag', 'WhatsAppImage2018-06-24at17.04.12.mp4', 'WhatsAppImage2018-06-24at17.04.12.jpeg', 1, 2144),
(23, 'awt', 'WhatsAppVideo2018-06-24at17.05.32.mp4', 'WhatsAppVideo2018-06-24at17.05.32.png', 2, 105535);
-- --------------------------------------------------------
--
-- Struktur dari tabel `user`
--
CREATE TABLE `user` (
`id` int(31) NOT NULL,
`nama` varchar(66) NOT NULL,
`username` varchar(66) NOT NULL,
`password` varchar(66) NOT NULL,
`user_type` varchar(66) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data untuk tabel `user`
--
INSERT INTO `user` (`id`, `nama`, `username`, `password`, `user_type`) VALUES
(1, 'admin', 'admin', '21232f297a57a5a743894a0e4a801fc3', 'admin');
--
-- Indexes for dumped tables
--
--
-- Indexes for table `agenda`
--
ALTER TABLE `agenda`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `atas`
--
ALTER TABLE `atas`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `berita`
--
ALTER TABLE `berita`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `beritagabung`
--
ALTER TABLE `beritagabung`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `kanan_bawah`
--
ALTER TABLE `kanan_bawah`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `kiri_atas`
--
ALTER TABLE `kiri_atas`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `kiri_bawah`
--
ALTER TABLE `kiri_bawah`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `konfigurasi`
--
ALTER TABLE `konfigurasi`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `slider`
--
ALTER TABLE `slider`
ADD PRIMARY KEY (`id`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `agenda`
--
ALTER TABLE `agenda`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=24;
--
-- AUTO_INCREMENT for table `atas`
--
ALTER TABLE `atas`
MODIFY `id` int(5) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=20;
--
-- AUTO_INCREMENT for table `berita`
--
ALTER TABLE `berita`
MODIFY `id` int(30) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=65;
--
-- AUTO_INCREMENT for table `beritagabung`
--
ALTER TABLE `beritagabung`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1408;
--
-- AUTO_INCREMENT for table `kanan_bawah`
--
ALTER TABLE `kanan_bawah`
MODIFY `id` int(5) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11;
--
-- AUTO_INCREMENT for table `kiri_atas`
--
ALTER TABLE `kiri_atas`
MODIFY `id` int(5) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;
--
-- AUTO_INCREMENT for table `kiri_bawah`
--
ALTER TABLE `kiri_bawah`
MODIFY `id` int(5) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=16;
--
-- AUTO_INCREMENT for table `slider`
--
ALTER TABLE `slider`
MODIFY `id` int(30) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=24;COMMIT;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
| true |
06623daf6a74ae19ca907e8a16d6a0e88226fc6d | SQL | tsak/glitch-auto-sell | /app/config/schema/glitch_update_20110911.sql | UTF-8 | 291 | 2.859375 | 3 | [] | no_license | # New fields to allow consistent calculations for changing rules
ALTER TABLE `auctions` ADD `quantity` INT UNSIGNED NULL ,
ADD `price` INT UNSIGNED NULL ;
# Auction status
ALTER TABLE `auctions` ADD `status` ENUM( 'PENDING', 'SOLD', 'UNSOLD' ) NOT NULL DEFAULT 'PENDING' AFTER `rule_id` ;
| true |
5160a54f3c030bc6387a3e3560073708ba8f6e56 | SQL | sugishia/shop | /DB export/mst_product.sql | UTF-8 | 1,695 | 3.171875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.0
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: 2018 年 4 朁E27 日 19:30
-- サーバのバージョン: 5.6.34-log
-- PHP Version: 7.1.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Database: `shop`
--
-- --------------------------------------------------------
--
-- テーブルの構造 `mst_product`
--
CREATE TABLE `mst_product` (
`code` int(11) NOT NULL,
`name` varchar(30) COLLATE utf8_unicode_ci NOT NULL,
`price` int(11) NOT NULL,
`picture` varchar(30) COLLATE utf8_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
--
-- テーブルのデータのダンプ `mst_product`
--
INSERT INTO `mst_product` (`code`, `name`, `price`, `picture`) VALUES
(9, 'コーヒー', 3000, 'kawaii3.jpg'),
(10, 'おいしい牛乳', 180, 'default/default.png');
--
-- Indexes for dumped tables
--
--
-- Indexes for table `mst_product`
--
ALTER TABLE `mst_product`
ADD PRIMARY KEY (`code`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `mst_product`
--
ALTER TABLE `mst_product`
MODIFY `code` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11;COMMIT;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
| true |
a03de06d85a478c9da35928288b1a5e974b7bd47 | SQL | batego/db_fintra | /fintra/con_/Tables/_con.factura_ingresoerradocomparar.sql | UTF-8 | 425 | 2.78125 | 3 | [] | no_license | -- Table: con.factura_ingresoerradocomparar
-- DROP TABLE con.factura_ingresoerradocomparar;
CREATE TABLE con.factura_ingresoerradocomparar
(
factura character varying(10),
valor_ingreso moneda
)
WITH (
OIDS=FALSE
);
ALTER TABLE con.factura_ingresoerradocomparar
OWNER TO postgres;
GRANT ALL ON TABLE con.factura_ingresoerradocomparar TO postgres;
GRANT SELECT ON TABLE con.factura_ingresoerradocomparar TO msoto;
| true |
a0ede8b24b61c3a28a5aa9ebaba121579eaf818b | SQL | hoon4233/Database-System | /project1/26.sql | UTF-8 | 152 | 3.125 | 3 | [] | no_license | SELECT Pokemon.name
FROM Pokemon, CatchedPokemon
WHERE Pokemon.id = CatchedPokemon.pid
and CatchedPokemon.nickname LIKE '% %'
ORDER BY Pokemon.name DESC | true |
a9f7a2f796f4af7b51c9bdb16b55a74647d10c9b | SQL | ramesesinc/clfc21 | /osiris3-server/workspace/services/apps/clfc/modules/rameses-clfc-loan-services.jar/sql/capture_payment.sql | UTF-8 | 3,028 | 3.5 | 4 | [] | no_license | [getList]
SELECT * FROM capture_payment
WHERE collector_name LIKE $P{searchtext}
ORDER BY txndate DESC
[getListByState]
SELECT * FROM capture_payment
WHERE collector_name LIKE $P{searchtext}
AND state = $P{state}
ORDER BY txndate DESC
[getPendingList]
SELECT c.*
FROM capture_payment_pending cp
INNER JOIN capture_payment c ON cp.objid = c.objid
WHERE c.collector_name LIKE $P{searchtext}
ORDER BY c.txndate DESC
[getDetails]
SELECT * FROM capture_payment_detail
WHERE parentid = $P{objid}
[getBorrowerLookupList]
SELECT l.objid, l.borrower_objid, l.borrower_name, l.objid AS loanapp_objid,
l.loanamount AS loanapp_loanamount, l.appno AS loanapp_appno,
lr.code AS route_code, lr.area AS route_area,
lr.description AS route_description
FROM loanapp l
INNER JOIN loan_ledger ll ON l.objid = ll.appid
INNER JOIN loan_route lr ON l.route_code = lr.code
WHERE l.borrower_name LIKE $P{searchtext}
AND ll.state = 'OPEN'
[getBorrowerLookupListByRemmittanceid]
SELECT l.objid, l.borrower_objid, l.borrower_name, l.objid AS loanapp_objid,
l.loanamount AS loanapp_loanamount, l.appno AS loanapp_appno,
lr.code AS route_code, lr.area AS route_area,
lr.description AS route_description
FROM collection_remittance r
INNER JOIN loanapp l ON r.group_objid = l.route_code
INNER JOIN loan_ledger ll ON l.objid = ll.appid
INNER JOIN loan_route lr ON l.route_code = lr.code
WHERE r.objid = $P{remittanceid}
AND l.borrower_name LIKE $P{searchtext}
AND ll.state = 'OPEN'
[getPendingCapturedPaymentCollectorsByDate]
select distinct collector_objid as objid, collector_name as name
from capture_payment_pending
where txndate=$P{date}
order by collector_name
[getPendingCapturedPaymentsByCollectorAndDate]
select *
from capture_payment_pending
where txndate=$P{date}
and collector_objid=$P{collectorid}
and borrowername like $P{searchtext}
order by dtpaid
[getCapturedPaymentByCollectorAndDate]
select *
from capture_payment
where collector_objid=$P{collectorid}
and txndate=$P{date}
[getCapturedPaymentCollectorsByDate]
select distinct collector_objid as objid, collector_name as name
from capture_payment
where txndate=$P{date}
order by collector_name
[getCapturedPaymentCollectionsByDateAndCollector]
select *
from capture_payment
where txndate=$P{date}
and collector_objid=$P{collectorid}
order by dtfiled
[findBySpecialCollectionid]
SELECT c.*
FROM capture_payment c
WHERE c.specialcollectionid = $P{specialcollectionid}
[findPendingByFieldcollection]
select *
from capture_payment_pending
where fieldcollectionid=$P{objid}
[xfindPendingByFieldcollection]
SELECT c.objid
FROM capture_payment_pending cp
INNER JOIN capture_payment c ON cp.objid = c.objid
WHERE c.fieldcollectionid = $P{objid}
[findByFieldcollectionidAndState]
select *
from capture_payment
where fieldcollectionid=$P{objid}
and state=$P{state}
[findSendBack]
SELECT s.*
FROM capture_payment_sendback s
WHERE s.parentid = $P{objid}
ORDER BY s.dtcreated DESC
[changeState]
UPDATE capture_payment SET state = $P{state}
WHERE objid = $P{objid} | true |
830e272fc11863cf6309657eb49ddbc6de0bf6c4 | SQL | 601729260/Navicat | /MySQL/servers/开发库/mamahao_crm/模糊匹配.sql | UTF-8 | 106 | 2.71875 | 3 | [] | no_license | select * from t_member a
inner join
t_member_binding b
on a.member_id=b.member_id
where b.staff_id=888
| true |
87fda887c8f82626ffa7150e30cf2193fc2adca9 | SQL | mpassak/db | /ddl/01_TABLE/BM_PLAN.sql | UTF-8 | 672 | 2.671875 | 3 | [] | no_license | --------------------------------------------------------
-- DDL for Table BM_PLAN
--------------------------------------------------------
CREATE TABLE "METSM_OWNER"."BM_PLAN"
( "ID_PLAN" NUMBER(*,0),
"CD_PLAN" VARCHAR2(20 CHAR),
"PLAN_NAME" VARCHAR2(50 CHAR),
"DESCRIPTION" VARCHAR2(200 CHAR),
"DT_CREATED" DATE,
"DT_UPDATED" DATE
) SEGMENT CREATION IMMEDIATE
PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255
NOCOMPRESS LOGGING
STORAGE(INITIAL 524288 NEXT 524288 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE "METSM_OWNER_DATA" ;
| true |
19844fe8e75646354ff2365617bf8b4b51203fdc | SQL | beck-bowen/MyStuff | /DataBases/dbMyStuff/Tables/tst.MyStuff.sql | UTF-8 | 236 | 2.765625 | 3 | [] | no_license | CREATE TABLE [tst].[MyStuff] (
[Id] INT IDENTITY (1, 1) NOT NULL,
[MyColumn] NVARCHAR (MAX) NULL,
[MyTimeStamp] DATETIME DEFAULT (getdate()) NOT NULL,
PRIMARY KEY CLUSTERED ([Id] ASC)
);
| true |
a2e1428a0190e95571d775446b100623c2c6f57a | SQL | goelakash/Graph_rec | /UI/web/NeoRecApp/cypher/pearson_sim.cql | UTF-8 | 432 | 3.140625 | 3 | [] | no_license | MATCH (u1:User)-[x:RATED]->(m:Movie)<-[y:RATED]-(u2:User)
WITH SUM((x.rating-u1.avg_rating) * (y.rating-u2.avg_rating)) AS xyDotProduct,
SQRT(REDUCE(xDot = 0.0, a IN COLLECT(x.rating) | xDot + (a-u1.avg_rating)^2 )) AS xLength,
SQRT(REDUCE(yDot = 0.0, b IN COLLECT(y.rating) | yDot + (b-u2.avg_rating)^2 )) AS yLength,
u1, u2
MERGE (u1)-[s:PEARSON_SIM]-(u2)
SET s.similarity = xyDotProduct / (xLength * yLength);
| true |
86c682c4f3c0c30a65de36b75fa68419b41c7025 | SQL | dimitri78700/WF3mars2017 | /sql/03-bibliotheque/requete_bibliotheque.sql | UTF-8 | 8,612 | 4.03125 | 4 | [] | no_license | -- **************************************
-- Création de la BDD
-- **************************************
CREATE DATABASE bibliotheque;
USE bibliotheque;
-- Copier le contenue de dossier bibliotheque
-- **************************************
-- Exercices
-- **************************************
-- 1. Quel est l'id_abonne de Laura ?
SELECT id_abonne FROM abonne WHERE prenom = 'Laura';
-- 2. L'abonné d'id_abonne 2 est venu emprunter un livre à quelle dates ?
SELECT date_sortie FROM emprunt WHERE id_abonne = 2;
-- 3. Combien d'emprunts ont été effectués en tout ?
SELECT COUNT(id_emprunt) FROM emprunt;
-- 4.Combien de livres sont sortis le 2011-12-19 ?
SELECT COUNT(date_sortie) FROM emprunt WHERE date_sortie = '2011-12-19';
-- 5. Une Vie est de quel auteur ?
SELECT auteur FROM livre WHERE titre = 'Une vie';
-- 6. De combien de livre d'Alexnadre Dumas dispose-t-on ?
SELECT COUNT(id_livre) FROM livre WHERE auteur = 'Alexandre Dumas';
-- 7. Quel id_livre est le plus emprunté ?
SELECT id_livre, COUNT(id_livre) AS nombre FROM emprunt GROUP BY id_livre ORDER BY nombre DESC LIMIT 0,1;
-- 8. Quel id_abonne emprunte le plus de livre ?
SELECT id_abonne, COUNT(id_emprunt) FROM emprunt GROUP BY id_abonne ORDER BY COUNT(id_emprunt) DESC LIMIT 1;
-- **************************************
-- Requêtes imbriquées
-- **************************************
-- Syntaxe "aide mémoire" de larequête imbriquée :
-- SELECT a FROM table_de_a WHERE b IN (SELECT b FROM table_de_b WHERE condition);
-- Afin de réaliser une requête imbriquée il faut obligatoirement un champ en COMMUN entre les deux tables.
-- Un champ NULL se teste avec IS NULL :
SELECT id_livre FROM emprunt WHERE date_rendu IS NULL; -- Affiche les id_livre non rendus
-- Afficher les titres de ces livres non rendus :
SELECT titre FROM livre WHERE id_livre IN (SELECT id_livre FROM emprunt WHERE date_rendu IS NULL);
-- Afficher le n° de slivres que Chloé a emprunté :
SELECT id_livre FROM emprunt WHERE id_abonne = (SELECT id_abonne FROM abonne WHERE prenom = 'chloe'); -- Quand il n'y a qu'un seul résultat dans la requête imbriquée, on met un signe "="
-- Exercices : Afficher le prénom des abonnés ayant emprunté un livre le 19-12-2011
SELECT prenom FROM abonne WHERE id_abonne IN (SELECT id_abonne FROM emprunt WHERE date_sortie = '2011-12-19');
-- Exercices : Afficher le prénom des abonnés ayant emprunté un livre d'alphonse Daudet
SELECT prenom FROM abonne WHERE id_abonne IN (SELECT id_abonne FROM emprunt WHERE id_livre in(SELECT id_livre FROM livre WHERE auteur = 'Alphonse Daudet');
-- Exercices : Afficher le ou les titres de livres que Chloé a emprunté(s) :
SELECT titre FROM livre WHERE id_livre IN ( SELECT id_livre FROM emprunt WHERE id_abonne IN (SELECT id_abonne FROM abonne WHERE prenom = 'Chloé'));
-- Exercices : Afficher le ou les titres de livre que Chloé n'a pas encore rendu ?
SELECT titre FROM livre WHERE id_livre IN ( SELECT id_livre FROM emprunt WHERE date_rendu IS NULL AND id_abonne IN (SELECT id_abonne FROM abonne WHERE prenom = 'Chloé'));
-- Exercices : Combien de livres Benoit a empruntés ?
SELECT COUNT(id_livre) FROM emprunt WHERE id_abonne IN ( SELECT id_abonne FROM abonne WHERE prenom ='Benoit' );
-- Exercices : Qui (prénom) a emprunté le plus de livres ?
SELECT prenom FROM abonne WHERE id_abonne = ( SELECT id_abonne FROM emprunt GROUP BY id_abonne ORDER BY COUNT(id_emprunt) DESC LIMIT 0,1); -- remarque : on ne peut pas utiliser LIMIT dans IN mais obligatoirement un '='
-- **************************************
-- Jointures internes
-- **************************************
-- Différence entre jointure et une requête imbiriquée : un requête imbriquée est possible seulement dans le cas où les champs affichés ( ceux qui sont dans le SELECT ) sont issus de la même table.
-- Avec une requête de jointure, les champs sélectionnés peuvent être issus de table différentes. Une jointure est une reqûete permettant de faire des relations entre les différentes tables afain d'avoir des colonnes associées quui ne forme qu'un seul resultat
-- Afficher les dates de sortie et de rendu pour l'abonnée Guillaume :
SELECT a.prenom, e.date_sortie, e.date_rendu
FROM abonne a
INNER JOIN emprunt e
ON a.id_abonne = e.id_abonne
WHERE a.prenom = 'guillaume';
-- 1e ligne : ce que je souhaite afficher
-- 2e ligne : la 1ere table d'ou provinnenent les informations
-- 3e ligne : la seconde table d'où provinnent les infos
-- 4e ligne : la jointure qui lie les 2 tables avec le champs COMMUN
-- 5e ligne : la ou les conditions supplémentaire
-------- Exo ----------
-- Nous aimerions connaitre les mouvements des livres ( titre, date de sortie et date de rendu ) ecrit par Alphonse Daudet :
SELECT l.titre, e.date_sortie, e.date_rendu
FROM livre l
INNER JOIN emprunt e
ON l.id_livre = e.id_livre
WHERE l.auteur = 'Alphonse Daudet';
-- Qui a emprunté "une vie" sur l'année 2011 ?
SELECT a.prenom
FROM abonne a
INNER JOIN emprunt e
ON a.id_abonne = e.id_abonne
INNER JOIN livre l
ON l.id_livre = e.id_livre
WHERE l.titre = 'une vie' AND date_sortie LIKE '2011%';
-- Afficher le nombre de livres emprunté chaque abonnée
SELECT a.prenom, COUNT(e.id_emprunt) AS nombre
FROM abonne a
INNER JOIN emprunt e
ON a.id_abonne = e.id_abonne
GROUP BY a.prenom;
-- Afficher qui a emprunté quels livres et à quelles dates de sortie ? ( prénom, date de sortie, titre) :
SELECT a.prenom, e.date_sortie, l.titre
FROM abonne a
INNER JOIN emprunt e
ON a.id_abonne = e.id_abonne
INNER JOIN livre l
ON e.id_livre = l.id_livre;
-- ICI pas de group by car il est normal que les prénoms sortent plusieurs fois ils peuvent emprunté plusieurs livres
-- Afficher les prénoms des abonnes avcec les id livre qu'ils ont empruntés :
SELECT a.prenom, e.id_livre
FROM abonne a
INNER JOIN emprunt e
ON a.id_abonne = e.id_abonne;
-- **************************************
-- Jointures externe
-- **************************************
-- Une jointure externe permet de faire des requetes sans correspondance exigée entre les valeurs requêtées.
-- Ajouter vous dans la table abonné :
INSERT INTO abonne (prenom) VALUES('DIMITRI');
-- Si on relance la derniere requetes de jointure interne, nous n'apparaissons pas dans la liste car nous n'avons pas emprunté de livres.
-- Pour y remédier, nous faisons une jointure externe.
SELECT a.prenom, e.id_livre
FROM abonne a
LEFT JOIN emprunt e
ON a.id_abonne = e.id_abonne;
-- la clause LEFT join permet de rapatrier toutes les données dans la table considérée comme étant à gauche de l'instruction LEFT JOIN (donc abonne dans notre cas), sans correspondance exigée dans l'autre table (emprunt ici)
-- voici le cas avec un livvre supprimé de la bibliothéque
DELETE FROM livre WHERE id_livre = 100; -- "une vie "
-- On visualise les emprunts avec une jointure interne
SELECT emprunt.id_emprunt, livre.titre
FROM emprunt
INNER JOIN livre
ON emprunt.id_livre = livre.id_livre;
-- on ne voit pas dans cette requête le livre "une vie" qui a été supprimé.
-- On fait la même chose avec une jointure externe :
SELECT emprunt.id_emprunt, livre.titre
FROM emprunt
LEFT JOIN livre
ON emprunt.id_livre = livre.id_livre;
-- Ici tous les emprunts sont affichés y compris ceux pour lesquels les titres sont suppr et remplacé par NULL.
-- **************************************
-- UNION
-- **************************************
-- Union permet de fusionner le resultat de deux requetes dans la meme liste de resultat
-- Exemple : si on désinscrit Guillaume (suppression du profil de la table abonne) on peut afficher à la fois tous les livres empruntés, y compris ceux par des lecteurs désinscrits ( on affiche NULL dans id_livre pour l'abonné 'JLM')
-- Suppr Guillaume
DELETE FROM abonne WHERE id_abonne = 1;
-- Requete sur les livres empruntés avec UNION
(SELECT abonne.prenom, emprunt.id_livre FROM abonne LEFT JOIN emprunt ON abonne.id_abonne = emprunt .id_abonne)
UNION
(SELECT abonne.prenom, emprunt.id_livre FROM abonne RIGHT JOIN emprunt ON abonne.id_abonne = emprunt .id_abonne); | true |
80e6962ae99bf4c6f149cd59c0a470cb774578b3 | SQL | tobiasengblom/Databaser | /Part 3/tests.sql | UTF-8 | 2,836 | 3.3125 | 3 | [] | no_license | -- TEST #1: Register to an unlimited course.
-- EXPECTED OUTCOME: Pass
INSERT INTO Registrations VALUES ('6666666666', 'CCC111');
-- TEST #2: Register to a limited course.
-- EXPECTED OUTCOME: Pass
INSERT INTO Registrations VALUES ('6666666666', 'CCC666');
-- TEST #3: Waiting for a limited course.
-- EXPECTED OUTCOME: Pass
INSERT INTO Registrations VALUES ('5555555555', 'CCC666');
-- TEST #4: Unregister from an unlimited course.
-- EXPECTED OUTCOME: Pass
DELETE FROM Registrations WHERE student = '6666666666' AND course = 'CCC111';
-- TEST #5: Unregister the same student from the same course as Test #4 once again.
-- EXPECTED OUTCOME: Fail
DELETE FROM Registrations WHERE student = '6666666666' AND course = 'CCC111';
-- TEST #6: Unregister from a limited course without a waiting list.
-- EXPECTED OUTCOME: Pass
DELETE FROM Registrations WHERE student = '1111111111' AND course = 'CCC222';
-- TEST #7: Unregister from a limited course with a waiting list, when the student is registered.
-- EXPECTED OUTCOME: Pass
DELETE FROM Registrations WHERE student = '6666666666' AND course = 'CCC666';
-- TEST #8: Unregister from a limited course with a waiting list, when the student is in the middle of the waiting list.
-- EXPECTED OUTCOME: Pass
DELETE FROM Registrations WHERE student = '2222222222' AND course = 'CCC333';
-- TEST #9: Unregister from an overfull course with a waiting list.
-- EXPECTED OUTCOME: Pass
DELETE FROM Registrations WHERE student = '1111111111' AND course = 'CCC777';
-- TEST #10: Register to a course, when the student is already registered.
-- EXPECTED OUTCOME: Fail
INSERT INTO Registrations VALUES ('1111111111', 'CCC111');
-- TEST #11: Register to a course which the student has already passed.
-- EXPECTED OUTCOME: Fail
INSERT INTO Registrations VALUES ('1111111111', 'CCC111');
-- TEST #12: Register non existent student to a course.
-- EXPECTED OUTCOME: Fail
INSERT INTO Registrations VALUES ('8888888888', 'CCC111');
-- TEST #13: Register student to a non existent course.
-- EXPECTED OUTCOME: Fail
INSERT INTO Registrations VALUES ('1111111111', 'CCC999');
-- TEST #14: Register null student to a course.
-- EXPECTED OUTCOME: Fail
INSERT INTO Registrations VALUES (NULL, 'CCC111');
-- TEST #15: Register student to a null course.
-- EXPECTED OUTCOME: Fail
INSERT INTO Registrations VALUES ('1111111111', NULL);
-- TEST #16: Unregister student when student is not registered.
-- EXPECTED OUTCOME: Fail
DELETE FROM Registrations WHERE student = '6666666666' AND course = 'CCC777';
-- TEST #17: Unregister null student from a course.
-- EXPECTED OUTCOME: Fail
DELETE FROM Registrations WHERE student = NULL AND course = 'CCC111';
-- TEST #18: Unregister student from a null course.
-- EXPECTED OUTCOME: Fail
DELETE FROM Registrations WHERE student = '1111111111' AND course = NULL; | true |
a95f71d1048be3934b7f8ed253d0c30a77e3d95a | SQL | altamira/visualstudio | /Sistema de Informação Altamira/EGISSQL.Database/dbo/Stored Procedures/Procs1/pr_consulta_pedido_venda_sem_vendedor.sql | UTF-8 | 1,370 | 3.546875 | 4 | [] | no_license |
CREATE PROCEDURE pr_consulta_pedido_venda_sem_vendedor
@dt_inicial datetime,
@dt_final datetime,
@cd_pedido_venda int
AS
----------------------
if @cd_pedido_venda = 0
----------------------
begin
SELECT
pv.cd_pedido_venda,
pv.dt_pedido_venda,
isnull(pv.vl_total_pedido_venda,0) as 'vl_total_pedido_venda',
vw.nm_fantasia as 'nm_fantasia_cliente',
tp.nm_tipo_pedido
FROM Pedido_Venda pv
left outer join vw_Destinatario vw on
vw.cd_destinatario=pv.cd_cliente and vw.cd_tipo_destinatario=1
left outer join Tipo_Pedido tp on
tp.cd_tipo_pedido=pv.cd_tipo_pedido
WHERE
pv.dt_pedido_venda between @dt_inicial and @dt_final and
pv.dt_cancelamento_pedido is null and
IsNull(pv.cd_vendedor,0) = 0
end
----------------------
else
----------------------
begin
SELECT
pv.cd_pedido_venda,
pv.dt_pedido_venda,
isnull(pv.vl_total_pedido_venda,0) as 'vl_total_pedido_venda',
vw.nm_fantasia as 'nm_fantasia_cliente',
tp.nm_tipo_pedido
FROM Pedido_Venda pv
left outer join vw_Destinatario vw on
vw.cd_destinatario=pv.cd_cliente and vw.cd_tipo_destinatario=1
left outer join Tipo_Pedido tp on
tp.cd_tipo_pedido=pv.cd_tipo_pedido WHERE
pv.cd_pedido_venda= @cd_pedido_venda and
pv.dt_cancelamento_pedido is null and
IsNull(pv.cd_vendedor,0) = 0
end
| true |
5787ea9797baaee78f08aec617fc39718add9396 | SQL | linkedin/coral | /coral-trino/src/test/resources/product_test_cases_expected/implicit_explicit_inner_expected.sql | UTF-8 | 137 | 2.78125 | 3 | [
"BSD-2-Clause",
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] | permissive | select `p_partkey`, `n_name`, `r_name`
from `nation`
inner join `part` on `r_regionkey` = `p_partkey`
where `n_nationkey` = `r_regionkey` | true |
f63c0c98f805876bee1cac2ee52a1c774b3977d5 | SQL | itsring/sql_study | /06_서브쿼리와 집합.sql | UTF-8 | 4,784 | 4.9375 | 5 | [] | no_license | -- 서브쿼리
-- Popp 직원보다 고용일이 최근(이후)에 고용한 사람
-- 주의점: 단일행 서브쿼리를 사용할때는 서브쿼리의 결과가 비교하는 데이터와 같고 하나만 출력되어야 한다.
SELECT last_name 이름, hire_date 고용일자
FROM employees
WHERE hire_date > ( SELECT hire_date FROM employees WHERE last_name = 'Popp');
-- 그룹함수의 결과를 서브쿼리로 사용
SELECT last_name 이름, job_id 직종, salary 급여
FROM employees
WHERE salary = ( SELECT min(salary) FROM employees );
-- 예제 풀기 1,2,3,4
SELECT last_name 이름, salary 급여
FROM employees
WHERE salary > ( SELECT salary FROM employees WHERE last_name = 'Abel');
SELECT employee_id 직원번호, last_name 이름, department_id 부서번호, salary 급여
FROM employees
WHERE department_id = ( SELECT department_id FROM employees WHERE last_name = 'Bull')
AND salary > ( SELECT salary FROM employees WHERE last_name = 'Bull');
SELECT last_name 이름, salary 급여, manager_id 매니저
FROM employees
WHERE manager_id = ( SELECT employee_id FROM employees WHERE last_name = 'Russell');
SELECT *
FROM employees
WHERE job_id = ( SELECT job_id FROM jobs WHERE job_title = 'Stock Manager' );
-- 다중행 서브쿼리 (서브쿼리 결과가 여러개의 행으로 출력)
SELECT MIN(salary) FROM employees GROUP BY department_id; -- 부서별 최저월급
-- 다중행 서브쿼리에서는 바로 = >< 비교를 할수 없음.
-- IN 은 값이 하나라도 같으면 검색됨
SELECT department_id, employee_id , last_name
FROM employees
WHERE salary IN (SELECT MIN(salary) FROM employees GROUP BY department_id)
ORDER BY department_id;
-- ANY 도 값이 하나라도 맞으면 검색됨
SELECT department_id, last_name, salary
FROM employees
WHERE salary < ANY(SELECT salary FROM employees WHERE job_id = 'IT_PROG')
AND job_id != 'IT_PROG'
ORDER BY salary DESC;
-- ALL 은 값이 전부 다 만족 해야 된다.
SELECT department_id, last_name, salary
FROM employees
WHERE salary < ALL(SELECT salary FROM employees WHERE job_id = 'IT_PROG')
AND job_id != 'IT_PROG'
ORDER BY salary DESC;
-- 예제 1,2,3
SELECT employee_id, first_name, job_id 직종, salary 급여
FROM employees
WHERE manager_id IN (SELECT manager_id FROM employees WHERE department_id = 20)
AND department_id != 20;
SELECT employee_id, last_name, job_id 직종, salary 급여
FROM employees
WHERE salary < ANY(SELECT salary FROM employees WHERE job_id = 'ST_MAN');
SELECT employee_id, last_name, job_id 직종, salary 급여
FROM employees
WHERE salary < ALL(SELECT salary FROM employees WHERE job_id = 'IT_PROG');
-- 다중열 서브쿼리 ( 열이 여러개일때 )
-- 이름이 브루스인 직원과 같은 매니저, 같은 직업인 직원들을 출력
SELECT employee_id, first_name, job_id, salary, manager_id
FROM employees
WHERE (manager_id, job_id) IN (SELECT manager_id , job_id FROM employees WHERE first_name = 'Bruce')
AND first_name <> 'Bruce';
-- 부서별 최소 급여를 받는 직원들을 검색
select department_id 부서번호, employee_id 사원번호, first_name, salary
from employees
where (department_id, salary) in (select department_id, min(salary)
from employees
group by department_id)
order by department_id;
-- 예제 : 직업별 최소월급을 받는 직원들을 출력
select first_name 이름, job_id 직종, salary 월급, department_id 부서번호
from employees
where (job_id, salary) in (select job_id, min(salary) from employees group by job_id)
order by salary DESC;
-- 집합
-- UNION 합집합 : 중복을 제거한다.(결과줄수 115)
SELECT employee_id 직원번호, job_id 직종 FROM employees
UNION
SELECT employee_id , job_id FROM job_history;
-- UNION ALL 합집합 : 두개의 셀렉트문의 결과를 합친다.(결과줄수 117)
SELECT employee_id 직원번호, job_id 직종 FROM employees
UNION ALL
SELECT employee_id , job_id FROM job_history;
-- INTERSECT 교집합 (2)
SELECT employee_id 직원번호, job_id 직종 FROM employees
INTERSECT
SELECT employee_id , job_id FROM job_history;
-- MINUS 차집합 (결과줄수 105 : 107 - 2 )
SELECT employee_id 직원번호, job_id 직종 FROM employees
MINUS
SELECT employee_id , job_id FROM job_history;
-- 예제 1,2,3,4
SELECT department_id 부서번호 FROM employees
UNION
SELECT department_id FROM departments;
SELECT department_id 부서번호 FROM employees
UNION ALL
SELECT department_id FROM departments;
SELECT department_id 부서번호 FROM employees
INTERSECT
SELECT department_id FROM departments;
SELECT department_id 부서번호 FROM employees
MINUS
SELECT department_id FROM departments;
| true |
c764a343b40ec42a71b6b1ea83afd8c7cdbe003a | SQL | CBIIT/icrp | /database/MSSQL/Ad-hoc Scripts/UpdatePartnerOrg.sql | UTF-8 | 2,125 | 3.53125 | 4 | [] | no_license | -- 9/28/2017
-- Update Partner
Select * from Partner
select * from partnerorg where membertype='partner'
SELECT * FROM Partner WHERE SponsorCode='AVONFDN'
SELECT * FROM Partner WHERE SponsorCode='KWF'
SELECT * FROM Partner WHERE SponsorCode='INCa'
SELECT * FROM PartnerOrg WHERE SponsorCode='AVONFDN'
SELECT * FROM PartnerOrg WHERE SponsorCode='KWF'
SELECT * FROM PartnerOrg WHERE SponsorCode='INCa'
SELECT * FROM icrp_data_dev.dbo.PartnerOrg WHERE SponsorCode='AVONFDN'
SELECT * FROM icrp_data_dev.dbo.PartnerOrg WHERE SponsorCode='KWF'
SELECT * FROM icrp_data_dev.dbo.PartnerOrg WHERE SponsorCode='INCa'
BEGIN TRANSACTION
UPDATE Partner SET Name = 'AVON Breast Cancer Crusade' WHERE SponsorCode='AVONFDN'
UPDATE Partner SET Name = 'Dutch Cancer Society (KWF)' WHERE SponsorCode='KWF'
UPDATE Partner SET Name = 'French National Cancer Institute (INCa)' WHERE SponsorCode='INCa'
UPDATE PartnerOrg SET Name = 'AVON Breast Cancer Crusade' WHERE SponsorCode='AVONFDN' AND MemberType = 'Partner'
UPDATE PartnerOrg SET Name = 'Dutch Cancer Society (KWF)' WHERE SponsorCode='KWF' AND MemberType = 'Partner'
UPDATE PartnerOrg SET Name = 'French National Cancer Institute (INCa)' WHERE SponsorCode='INCa' AND MemberType = 'Partner'
COMMIT
BEGIN TRANSACTION
UPDATE Partner SET JoinedDate = '1/1/2000' WHERE SponsorCode IN ('ACS', 'CBCRP','CDMRP','KOMEN','NCRI','NIH','ONSF')
COMMIT
-- Update FundingOrg
Select * from FundingOrg WHERE Abbreviation IN ('AVONFDN', 'AT')
select * from partnerorg where membertype='Associate' and SponsorCode IN ('NIH', 'AVONFDN')
BEGIN TRANSACTION
UPDATE FundingOrg SET Name = 'AVON Breast Cancer Crusade' WHERE SponsorCode='AVONFDN' AND Abbreviation = 'AVONFDN'
UPDATE FundingOrg SET Name = 'National Center for Complementary and Integrative Health' WHERE SponsorCode='NIH' AND Abbreviation = 'AT'
UPDATE PartnerOrg SET Name = 'AVON Breast Cancer Crusade' WHERE Name ='Avon Foundation for Women' AND MemberType = 'Associate'
UPDATE PartnerOrg SET Name = 'National Center for Complementary and Integrative Health' WHERE Name ='National Center for Complementary and Alternative Medicine' AND MemberType = 'Associate'
COMMIT
| true |
4d7738a7a1d7464c307a2e9b72021b74a931dab3 | SQL | BrandonRodriguez1336/sql-challenge | /EmployeeSQL/SQLscript.sql | UTF-8 | 2,266 | 4.5625 | 5 | [] | no_license | --1. List the following details of each employee: employee number, last name, first name, gender, and salary.
Select
e.emp_no,
e.last_name,
e.first_name,
e.gender,
s.salary
from employees e
inner join salaries s on e.emp_no=s.emp_no
--2. List employees who were hired in 1986.
Select
e.emp_no,
e.first_name,
e.last_name,
e.hire_date
from employees e
where e.hire_date between '1986-01-01' and '1986-12-31'
--3. List the manager of each department with the following information: department number, department name, the manager's employee number, last name, first name, and start and end employment dates.
Select
dm.dept_no,
d.dept_name,
dm.emp_no,
e.last_name,
e.first_name,
dm.from_date,
dm.to_date
from dept_manager dm
inner join departments d on d.dept_no=dm.dept_no
inner join employees e on e.emp_no=dm.emp_no
--4. List the department of each employee with the following information:
--employee number, last name, first name, and department name.
Select
e.emp_no,
e.last_name,
e.first_name,
d.dept_name
from employees e
inner join dept_emp de on e.emp_no=de.emp_no
inner join departments d on d.dept_no=de.dept_no
--5. List all employees whose first name is "Hercules" and last names begin with "B."
Select
e.emp_no,
e.first_name,
e.last_name
from employees e
where e.first_name = 'Hercules'
and e.last_name like 'B%'
--6. List all employees in the Sales department,
--including their employee number, last name, first name, and department name.
Select
e.emp_no,
e.last_name,
e.first_name,
d.dept_name
from employees e
inner join dept_emp de on e.emp_no=de.emp_no
inner join departments d on d.dept_no=de.dept_no
where d.dept_name = 'Sales'
--7. List all employees in the Sales and Development departments,
--including their employee number, last name, first name, and department name.
Select
e.emp_no,
e.last_name,
e.first_name,
d.dept_name
from employees e
inner join dept_emp de on e.emp_no=de.emp_no
inner join departments d on d.dept_no=de.dept_no
where d.dept_name in ('Sales','Development')
--8. In descending order, list the frequency count of employee last names,
--i.e., how many employees share each last name.
Select
e.last_name,
count(e.last_name) Total_Count
from employees e
group by e.last_name
order by Total_Count DESC
| true |
64ff2af132fb0823fa6a3092936df290b0246291 | SQL | alamops/TXQ | /src/database/migrations/x202009010001-add-assets.sql | UTF-8 | 490 | 3.296875 | 3 | [
"MIT"
] | permissive | CREATE TABLE txasset (
assetid varchar NOT NULL,
owner_address varchar NULL,
owner_pubkey varchar NULL,
data jsonb NULL,
txid varchar NOT NULL,
index integer NOT NULL
);
CREATE UNIQUE INDEX idx_asset_txid_index ON txasset USING btree (txid, index);
CREATE INDEX idx_asset_assetid ON txasset USING btree (assetid);
CREATE INDEX idx_asset_owner_pubkey ON txasset USING btree (owner_pubkey);
CREATE INDEX idx_asset_owner_address ON txasset USING btree (owner_address); | true |
b4d5f8179f688efe573a03098cfb1416f50e3ce8 | SQL | bcgov/PIMS | /backend/dal/Migrations/v01.08.00/Up/Postup/01-ProjectStatusTransitions.sql | UTF-8 | 763 | 2.703125 | 3 | [
"Apache-2.0"
] | permissive | PRINT 'Adding ProjectStatusTransitions'
INSERT INTO dbo.[ProjectStatusTransitions] (
[FromWorkflowId]
, [FromStatusId]
, [Action]
, [ToWorkflowId]
, [ToStatusId]
, [ValidateTasks]
) VALUES
-- Allow progression from Not in SPL to Disposed
(
5 -- ERP
, 22 -- Not in SPL
, 'Dispose Project'
, 5 -- ERP
, 32 -- Disposed
, 0
),
-- Allow progression from Not in SPL to Transfer within GRE
(
5 -- ERP
, 22 -- Not in SPL
, 'Transfer within GRE'
, 5 -- ERP
, 20 -- Transferred within GRE
, 0
),
-- Allow progression from Not in SPL to Transfer within GRE
(
4 -- 'ASSESS-EX-DISPOSAL'
, 22 -- Not in SPL
, 'Transfer within GRE'
, 5 -- ERP
, 20 -- Transferred within GRE
, 0
)
| true |
3ba20f90f38f3ab49fbc224be5f052c4f9b5b233 | SQL | cruzer45/ilearn-gms | /iLearn/db/ilearn/Missing Grades - teachers.sql | UTF-8 | 539 | 3.703125 | 4 | [] | no_license | SELECT DISTINCT `subCode` as 'Subject Code', `subName` as 'Subject', CONCAT_WS(' ',`staFirstName`,`staLastName`) as 'Teacher'
FROM `Subject`
INNER JOIN `Staff` ON `Staff`.`staCode` = `Subject`.`subStaffCode`
LEFT JOIN `Assments` ON `Assments`.`assmtSubject` = `Subject`.`subCode`
LEFT JOIN `TermGrade` ON `TermGrade`.`grdAssmtID` = `Assments`.`assmtID`
WHERE (`grdPointsEarned` IS NULL OR `grdPointsEarned` = '' OR `grdPointsEarned` = ' ' OR `grdPointsEarned` = 'Absent' OR `grdPointsEarned` = 'Incomplete') AND `grdStatus` = 'Active' | true |
3f71e07871a0badbc3ab8f706ad4731d9238cd41 | SQL | radtek/Database-3 | /oracle/admin/scripts/tbs2.sql | UTF-8 | 2,563 | 3.421875 | 3 | [] | no_license | REM ################################################
REM # Creator: Vincent Fenoll
REM # Created: 2004/01/22
REM # Name: tbslight.sql
REM ################################################
REM #
REM # Compatible: Oracle 7 8i 9i 10g 11g
REM#
REM ################################################
REM #
REM # Tablespaces usage (light report)
REM #
REM ################################################
set echo off
set timing off
set pages 999
set verify off
set feedback off
column run_date new_value xxrun_date noprint
column inst new_value xxinst noprint
column host_name new_value xxhost noprint
column "% Libre" Format 999.99 heading "%|Libre"
column "Really used" Format 999,999,999 heading "Really|used"
column largest_free_chunk format 999,999,999 heading "Biggest|Chunk (M)"
column smallest_free_chunk format 999,999,999 heading "Smallest|Chunk (M)"
column Average_chunk format 999,999,999 heading "Average|Chunk (M)"
column COUNT_CHUNKS format 999,999 heading "# Free|Chunks"
column total_free format 999,999,999 heading "Free|Total"
column total_size format 999,999,999 heading "Space|total"
column tablespace_name format a25 heading "TableSpace name"
COMPUTE SUM LABEL 'Totals ' OF Total_Free on REPORT
COMPUTE SUM LABEL 'Totals ' OF Total_Size on REPORT
BREAK ON REPORT
select sysdate run_date from dual;
select instance_name inst, host_name from v$instance;
prompt************************************************************************
prompt SPACE USED BY TABLESPACES
prompt DATABASE : &xxinst
prompt HOST : &xxhost
prompt Run date : &xxrun_date
prompt
prompt NOTE ** STATS ARE IN MEGABYTES **
prompt************************************************************************
select dfs.tablespace_name,
trunc(sum(dfs.bytes)/1048576) "Total_Free",
Round( (1 - ( ( (a.total_size) - sum(dfs.bytes) ) / (a.total_size) ) ) * 100,2) "% Libre",
trunc(a.total_size/1048576) - trunc(sum(dfs.bytes)/1048576) "Reellement occupe",
trunc(a.total_size/1048576) "Total_Size"
from dba_free_space dfs,
(select tablespace_name, sum(bytes) total_size from dba_data_files group by tablespace_name) a
where dfs.tablespace_name = a.tablespace_name
group by dfs.tablespace_name, a.total_size
order by 1
/
prompt
prompt
prompt***************************** END OF REPORT ****************************
prompt-------------------------------------------------------------------------
clear columns
clear computes
clear breaks | true |
dbded148577aa632cd86dca348fcf2133537a122 | SQL | jaliste/unitime | /Documentation/Database/MySQL/Changes/72 Instructor limit distribution pref.sql | UTF-8 | 1,691 | 2.828125 | 3 | [] | no_license | /*
* UniTime 3.2 (University Timetabling Application)
* Copyright (C) 2008 - 2010, UniTime LLC
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
select 32767 * next_hi into @id from hibernate_unique_key;
insert into distribution_type (uniqueid, reference, label, sequencing_required, req_id, allowed_pref, description, abbreviation, instructor_pref, exam_pref) values
(@id, 'MAX_HRS_DAY(6)', 'At Most 6 Hours A Day', 0, 39, '210R', 'Classes are to be placed in a way that there is no more than six hours in any day.', 'At Most 6 Hrs', 1, 0),
(@id + 1, 'MAX_HRS_DAY(7)', 'At Most 7 Hours A Day', 0, 40, '210R', 'Classes are to be placed in a way that there is no more than seven hours in any day.', 'At Most 7 Hrs', 1, 0),
(@id + 2, 'MAX_HRS_DAY(8)', 'At Most 8 Hours A Day', 0, 41, '210R', 'Classes are to be placed in a way that there is no more than eight hours in any day.', 'At Most 8 Hrs', 1, 0);
update hibernate_unique_key set next_hi=next_hi+1;
/*
* Update database version
*/
update application_config set value='72' where name='tmtbl.db.version';
commit;
| true |
4293f3a16fed09d44317b30f64e2d1adfb7608fb | SQL | rpsalmon/my_SQrLd | /comp_sub_comp_sub.sql | UTF-8 | 5,938 | 3.671875 | 4 | [] | no_license | CREATE VOLATILE TABLE COMP_HP AS (
SELECT DISTINCT HP.division, HP.region, HP.dma, HP.location_id
, CASE WHEN (sP.max_internet_speed_qty > 100 AND sP.service_provider_id = 1) THEN 'ATT FIBER'
WHEN ((sP.max_internet_speed_qty <= 100 OR sP.max_internet_speed_qty IS NULL) AND sP.service_provider_id = 1) THEN 'ATT NON-FIBER'
WHEN ( sP.service_provider_id = 17) THEN 'RCN'
WHEN ( sP.service_provider_id = 23) THEN 'TDS'
WHEN ( sP.service_provider_id = -1 OR sP.service_provider_id IS NULL) THEN 'NONE'
ELSE sP.service_provider_name END AS COMP
, hp.ethnic_roll_up, hp.city, hp.demo_income_code, HP.dwell_type_group AS dwell_hp
,SP.max_internet_speed_qty --, SP.record_start_ts, SP.record_end_ts, SP.address_check_date
,CASE WHEN EBI.PRO_CHURN_NPD_DECILE_REG = 1 THEN 'BAD DEBT' ELSE 'OK' END AS BAD_DEBT
FROM ndw_rosetta_views.rosetta_homes_passed_current AS HP
LEFT JOIN
(SELECT SP.LOCATION_ID, SP.service_provider_id, SR.service_provider_name,
SP.max_internet_speed_qty--, SP.record_start_ts, SP.record_end_ts, SP.address_check_date
FROM
ndw_base_views.service_provider_location_hist AS SP
LEFT JOIN ndw_base_views.service_provider_ref AS SR
ON SP.service_provider_id = SR.service_provider_id
WHERE SP.service_provider_id IN (1,2,4,9,10,11,16,17,23,27,28,129)
AND YEAR(SP.address_check_date) > 2017
) AS SP
ON HP.location_id = SP.location_id
LEFT JOIN NDW_EBI_MODEL_VIEWS.MASTER_EBI_PROSPECT_MODELS AS EBI
ON (hp.HOUSE_ID = EBI.HOUSEKEY)
WHERE (
HP.HSD_SERVICABILITY_IND = 'Y'
OR HP.VIDEO_SERVICABILITY_IND = 'Y'
OR HP.VOICE_SERVICABILITY_IND = 'Y'
)
--AND EBI.PRO_CHURN_NPD_DECILE_REG <> 1
AND HP.HSD_HOMES_PASSED_IND = 'y'
AND HP.hsd_homes_passed_cust_type_cd = 'RESI'
-- ATT 1, CTL 2, FTR 4, EPB 9, Google Fiber 10, Hotwire 11, Metronet 16, RCN 17, TDS 23, Windstream 27, WOW 28, WebPass 129
AND HP.dwell_type_group IN ('MDU','SFU')
AND HP.division = 'CENTRAL DIVISION'
GROUP BY 1,2,3,8,5,6,7,9,10,4,11
--SAMPLE 500
)
WITH DATA PRIMARY INDEX (location_id)
ON COMMIT PRESERVE ROWS;
CREATE VOLATILE TABLE COMP_SUB AS (
SELECT DISTINCT SB.division, SB.region, SB.dma, SB.location_id
, CASE WHEN (sP.max_internet_speed_qty > 100 AND sP.service_provider_id = 1) THEN 'ATT FIBER'
WHEN ((sP.max_internet_speed_qty <= 100 OR sP.max_internet_speed_qty IS NULL) AND sP.service_provider_id = 1) THEN 'ATT NON-FIBER'
WHEN ( sP.service_provider_id = 17) THEN 'RCN'
WHEN ( sP.service_provider_id = 23) THEN 'TDS'
WHEN ( sP.service_provider_id = -1 OR sP.service_provider_id IS NULL) THEN 'NONE'
ELSE sP.service_provider_name END AS COMP
, SB.ETHNICITY_ROLL_UP, SB.city, SB.income_code, SB.dwell_type_group AS dwell_sb
,SP.max_internet_speed_qty --, SP.record_start_ts, SP.record_end_ts, SP.address_check_date
,CASE WHEN SUB_CHURN_NPD_DECILE_REG = 1 THEN 'BAD DEBT' ELSE 'OK' END AS BAD_DEBT
FROM ndw_rosetta_views.ROSETTA_202010 AS SB
LEFT JOIN
(SELECT SP.LOCATION_ID, SP.service_provider_id, SR.service_provider_name,
SP.max_internet_speed_qty--, SP.record_start_ts, SP.record_end_ts, SP.address_check_date
FROM
ndw_base_views.service_provider_location_hist SP
LEFT JOIN ndw_base_views.service_provider_ref SR
ON SP.service_provider_id = SR.service_provider_id
WHERE SP.service_provider_id IN (1,2,4,9,10,11,16,17,23,27,28,129)
AND YEAR(SP.address_check_date) > 2017
) AS SP
ON SB.location_id = SP.location_id
WHERE SB.account_status = 'ACT'
AND SB.customer_type = 'RESIDENTIAL'
-- ATT 1, CTL 2, FTR 4, EPB 9, Google Fiber 10, Hotwire 11, Metronet 16, RCN 17, TDS 23, Windstream 27, WOW 28, WebPass 129
--AND SUB_CHURN_NPD_DECILE_REG <> 1
AND SB.dwell_type_group IN ('MDU','SFU')
AND SB.division = 'CENTRAL DIVISION'
GROUP BY 1,2,3,8,5,6,7,9,10,4,11
--SAMPLE 500
)
WITH DATA PRIMARY INDEX (location_id)
ON COMMIT PRESERVE ROWS;
DROP TABLE COMP_SUB | true |
9a51e1d20610861e8552b71f8bd1bc225c4e3134 | SQL | andyymor/employee-management-system | /db/seed.sql | UTF-8 | 588 | 3.078125 | 3 | [] | no_license | USE employees_db
INSERT INTO department
(name)
VALUES
('Sales'), ('Engineering'), ('Finance'), ('Legal');
INSERT INTO role
(title, salary, department_id)
VALUES
('Sales Person', 50000, 1),
('Software Engineer', 100000, 2),
('Accountant', 200000, 3),
('Lawyer', 50000, 4);
INSERT INTO employee
(first_name, last_name, role_id, manager_id)
VALUES
('Bob', 'Smith', 1, NULL),
('John', 'Doe', 2, NULL),
('David', 'Lopez', 3, NULL),
('Johanna', 'Doe', 4, NULL); | true |
8acafedcc722621ca65ded538ca90f1892269d58 | SQL | LuisPalominoTrevilla/advanced-databases-course | /pentaho/sales.cql | UTF-8 | 366 | 2.609375 | 3 | [] | no_license | CREATE TABLE company.daily_sales (
product_name varchar,
order_number int,
date date,
week_number,
product_quantity int,
unit_price float,
total float,
product_description varchar,
sales_person varchar,
client_email varchar,
tax float,
PRIMARY KEY (week_number, product_quantity)
) WITH comment='records daily sales';
| true |
82fdaa56081012cd0a1d66888e51b7ad6ea77229 | SQL | HannaKlimovich/lab_files | /DWH/batch_with_packages(don't see file)/sa_src/create_grant_user.sql | UTF-8 | 646 | 2.5625 | 3 | [] | no_license | CREATE USER sa_src
IDENTIFIED BY "123"
DEFAULT TABLESPACE tbs_pdb_test;
--GRANT CONNECT TO sa_src;
--GRANT RESOURCE TO sa_src;
GRANT all privileges to sa_src;
CREATE USER bl_cl
IDENTIFIED BY "123"
DEFAULT TABLESPACE tbs_pdb_test;
--GRANT CONNECT TO bl_cl;
--GRANT RESOURCE TO bl_cl;
GRANT all privileges to bl_cl;
CREATE USER bl_3nf
IDENTIFIED BY "123"
DEFAULT TABLESPACE tbs_pdb_test;
--GRANT CONNECT TO bl_3nf;
--GRANT RESOURCE TO bl_3nf;
GRANT all privileges to bl_3nf;
CREATE USER bl_dm
IDENTIFIED BY "123"
DEFAULT TABLESPACE tbs_pdb_test;
--GRANT CONNECT TO bl_dm;
--GRANT RESOURCE TO bl_dm;
GRANT all privileges to bl_dm; | true |
a45279d9fecba4bb4f0568c2f3aca4b9d6bbb1b8 | SQL | raiprakhar/Jaipur-Metro-Website | /SQL_codes/station.sql | UTF-8 | 2,055 | 3.1875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Nov 18, 2019 at 09:30 AM
-- Server version: 10.4.8-MariaDB
-- PHP Version: 7.2.24
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Database: `metro`
--
-- --------------------------------------------------------
--
-- Table structure for table `station`
--
CREATE TABLE `station` (
`station_id` int(100) NOT NULL,
`route_id` int(100) NOT NULL,
`station_name` varchar(100) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `station`
--
INSERT INTO `station` (`station_id`, `route_id`, `station_name`) VALUES
(3001, 5001, 'MANSAROVAR'),
(3001, 5002, 'MANSAROVAR'),
(3001, 5003, 'MANSAROVAR'),
(3003, 5003, 'CHANDPOLE'),
(3003, 5004, 'CHANDPOLE'),
(3003, 5005, 'CHANDPOLE'),
(3005, 5001, 'AMBABADI'),
(3005, 5005, 'AMBABADI'),
(3005, 5006, 'AMBABADI'),
(3007, 5002, 'S.M.STADIUM'),
(3007, 5004, 'S.M.STADIUM'),
(3007, 5006, 'S.M.STADIUM'),
(3008, 5002, 'DURGAPURA'),
(3008, 5004, 'DURGAPURA'),
(3008, 5006, 'DURGAPURA'),
(3002, 5001, 'RAILWAY STATION'),
(3002, 5002, 'RAILWAY STATION'),
(3002, 5003, 'RAILWAY STATION'),
(3006, 5001, 'SUBHASH NAGAR'),
(3006, 5005, 'SUBHASH NAGAR'),
(3006, 5006, 'SUBHASH NAGAR'),
(3004, 5003, 'BADI CHOPAR'),
(3004, 5004, 'BADI CHOPAR'),
(3004, 5005, 'BADI CHOPAR');
--
-- Triggers `station`
--
DELIMITER $$
CREATE TRIGGER `new1` AFTER INSERT ON `station` FOR EACH ROW begin
insert into newstation values (new.station_id,new.station_name,curdate());
end
$$
DELIMITER ;
COMMIT;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
| true |
0559f7eb8e2b1b39bf4d3339071ccf32c411dc87 | SQL | sd-2017-30233/db-operations-revision-alinadenisa | /script.sql | UTF-8 | 2,773 | 3.5 | 4 | [] | no_license | -- MySQL Script generated by MySQL Workbench
-- Thu Mar 16 00:14:46 2017
-- 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='TRADITIONAL,ALLOW_INVALID_DATES';
-- -----------------------------------------------------
-- Schema mydb
-- -----------------------------------------------------
-- -----------------------------------------------------
-- Schema univesity
-- -----------------------------------------------------
-- -----------------------------------------------------
-- Schema univesity
-- -----------------------------------------------------
CREATE SCHEMA IF NOT EXISTS `univesity` DEFAULT CHARACTER SET latin1 ;
USE `univesity` ;
-- -----------------------------------------------------
-- Table `univesity`.`course`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `univesity`.`course` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`name` VARCHAR(45) NOT NULL,
`teacher` VARCHAR(45) NULL DEFAULT NULL,
`studyYear` INT(11) NOT NULL,
PRIMARY KEY (`id`))
ENGINE = InnoDB
AUTO_INCREMENT = 6
DEFAULT CHARACTER SET = latin1;
-- -----------------------------------------------------
-- Table `univesity`.`student`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `univesity`.`student` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`name` VARCHAR(45) NULL DEFAULT NULL,
`birthdate` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`address` VARCHAR(45) NULL DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE INDEX `id_UNIQUE` (`id` ASC))
ENGINE = InnoDB
AUTO_INCREMENT = 5
DEFAULT CHARACTER SET = latin1;
-- -----------------------------------------------------
-- Table `univesity`.`enrollment`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `univesity`.`enrollment` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`idStudent` INT(11) NOT NULL,
`idCourse` INT(11) NOT NULL,
PRIMARY KEY (`id`),
INDEX `idStudent_idx` (`idStudent` ASC),
INDEX `idCourse_idx` (`idCourse` ASC),
CONSTRAINT `idCourse`
FOREIGN KEY (`idCourse`)
REFERENCES `univesity`.`course` (`id`)
ON DELETE NO ACTION
ON UPDATE NO ACTION,
CONSTRAINT `idStudent`
FOREIGN KEY (`idStudent`)
REFERENCES `univesity`.`student` (`id`)
ON DELETE NO ACTION
ON UPDATE NO ACTION)
ENGINE = InnoDB
AUTO_INCREMENT = 4
DEFAULT CHARACTER SET = latin1;
SET SQL_MODE=@OLD_SQL_MODE;
SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS;
SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS; | true |
93d10302ae414f52be92063ffb920a098e568637 | SQL | josephmachado/sde_superset_demo | /init.sql | UTF-8 | 551 | 2.640625 | 3 | [] | no_license | CREATE SCHEMA clickstream;
DROP TABLE IF EXISTS clickstream.people;
CREATE TABLE IF NOT EXISTS clickstream.people (
age INT,
workclass VARCHAR(100),
fnlwgt BIGINT,
education VARCHAR(100),
education_num INT,
marital_status VARCHAR(100),
occupation VARCHAR(100),
relationship VARCHAR(100),
race VARCHAR(100),
sex VARCHAR(100),
capital_gain INT,
capital_loss INT,
hours_per INT,
native_country VARCHAR(100),
earnings VARCHAR(50)
);
COPY clickstream.people
FROM '/data/adult.data' DELIMITER ','; | true |
585b89a102e2700d66443f00433e6716ec5bce32 | SQL | Janche/springboot-security-project | /backend/src/test/resources/template.sql | UTF-8 | 1,082 | 3.859375 | 4 | [] | no_license | # 根据账号查询用户的信息
SELECT
u.id u_id,
u.org_id u_org_Id,
u.account,
u.username,
u.staff_id u_staff_id,
u.staff_type u_staff_type,
u.staff_position u_staff_position,
u.staff_title u_staff_title,
u.tel,
u.email,
u.status u_status,
u.description u_description,
u.gmt_create u_gmt_create,
r.id r_id,
r.name r_name,
r.org_id r_org_id,
r.description r_description,
r.gmt_create r_gmt_create,
p.id p_id,
p.org_id p_org_id,
p.name p_name,
p.url url,
p.per_type p_type,
p.menu_sort p_menu_sort,
p.parent_id p_parent_id,
p.available p_available,
p.gmt_create p_gmt_create
FROM sys_user AS u
LEFT JOIN sys_user_role AS ur ON u.id = ur.uid
LEFT JOIN sys_role AS r ON r.id = ur.rid
LEFT JOIN sys_role_permission AS rp ON r.id = rp.rid
LEFT JOIN sys_permission AS p ON rp.pid = p.id
WHERE u.account = 'admin' and p.per_type='menu'
ORDER BY p.parent_id , p.menu_sort | true |
10e485f27bae87700448c6663bdeeeab68d70409 | SQL | Seojun-Park/42_camagru | /db/db.sql | UTF-8 | 1,341 | 3.625 | 4 | [] | no_license | SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
--
-- Database: `db_cama`
--
CREATE DATABASE IF NOT EXISTS `db_cama` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
USE `db_cama`;
CREATE TABLE `feed` (
`idx` int NOT NULL AUTO_INCREMENT,
`userid` varchar(100) NOT NULL,
`imgname` varchar(100) NOT NULL,
`date` date NOT NULL,
PRIMARY KEY (`idx`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `member` (
`idx` INT NOT NULL AUTO_INCREMENT,
`id` VARCHAR(100) NOT NULL ,
`pw` VARCHAR(1000) NOT NULL ,
`firstname` VARCHAR(100) NOT NULL ,
`lastname` VARCHAR(100) NOT NULL ,
`email` VARCHAR(100) NOT NULL ,
`avatar` VARCHAR(2000) NOT NULL ,
`username` VARCHAR(20) NOT NULL,
`verified` BOOLEAN DEFAULT false,
PRIMARY KEY (`idx`)
) ENGINE = InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `comment` (
`idx` INT NOT NULL AUTO_INCREMENT,
`userId` VARCHAR(100) NOT NULL,
`text` VARCHAR(1000) NOT NULL,
`feedId` INT NOT NULL,
`date` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY(`idx`)
) ENGINE = InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `likefeed` (
`idx` INT NOT NULL AUTO_INCREMENT,
`feedId` INT NOT NULL,
`memberId` INT NOT NULL,
PRIMARY KEY (`idx`)
) ENGINE = InnoDB DEFAULT CHARSET=utf8;
COMMIT;
| true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.