text stringlengths 6 9.38M |
|---|
CREATE TABLE [Register].[CarsHistories] (
[IdCarReportHistory] UNIQUEIDENTIFIER CONSTRAINT [DEF_RegisterCarsHistoriesIdCarReportHistory] DEFAULT (newsequentialid()) ROWGUIDCOL NOT NULL,
[IdCar] UNIQUEIDENTIFIER NOT NULL,
[Type] INT NOT NULL,
[CreateDate] DATETIME CONSTRAINT [DEF_RegisterCarsHistoriesCreateDate] DEFAULT (getdate()) NOT NULL,
[Decription] VARCHAR (MAX) NULL,
CONSTRAINT [PK_RegisterCarsHistories] PRIMARY KEY CLUSTERED ([IdCarReportHistory] ASC),
CONSTRAINT [FK_RegisterCarsIdCarRegisterCarsHistoriesIdCar] FOREIGN KEY ([IdCar]) REFERENCES [Register].[Cars] ([IdCar])
);
|
SELECT
game_id,
league_id,
game_date,
title
FROM game g
inner join league l
on g.league_id=l.id
group by game_date
order by game_date desc; |
DROP TABLE IF EXISTS properties;
CREATE TABLE properties(
id SERIAL8,
address VARCHAR(255),
value INT4,
no_of_bedrooms INT2,
year_built INT2,
build VARCHAR(255)
);
|
create table phantom_user(
id NUMBER(20) ,
name varchar(50),
age integer
) |
create table Visitor(visitor_id VARCHAR(15),visitor_name varchar(20),email varchar(30), password varchar(32),visitor_ip varchar(50) ,primary key(visitor_id));
create table Website(website_url varchar(20),website_type varchar(20),website_name
varchar(20),primary key(website_url));
create table Developer(developer_id int primary key auto_increment,first_name varchar(20),last_name
varchar(20),gender varchar(20),designation varchar(20),DOB varchar(20),website_url VARCHAR(20),foreign key(website_url) references
Website(website_url));
create table Visits(vdate date, vtime varchar(10),visitor_id varchar(15),website_url
varchar(20),primary key(visitor_id,website_url),foreign key(visitor_id) references
Visitor(visitor_id),foreign key(website_url) references Website(website_url));
insert into Visitor values('glen121','Glen','glen121111992@gmail.com','5892563433d3e26e5775a8995f4101cd','192.168.0.1');
insert into Visitor values('ashleydsouza882','Ashley','asheydsouza882@gmail.com','5892563433d3e26e5775a8995f4101cd','209.22.2.1');
insert into Website values('google.com','searchengine','google');
insert into Website values('youtube.com','videos','youtube');
insert into Developer values(1,'Glis','dsouza','female','frontend_developer',' 2019-09-21','google.com');
insert into Developer values(2,'ryan','fernandes','male','databasemanager',' 2019-09-21','google.com');
insert into Visits values('2019-09-21','1:23:32','glen121','google.com');
insert into Visits values('2019-09-21','1:23:32','ashleydsouza882','youtube.com');
|
/* Formatted on 21/07/2014 18:35:10 (QP5 v5.227.12220.39754) */
CREATE OR REPLACE FORCE VIEW MCRE_OWN.V_MCRE0_APP_RIO_ALERT_POS
(
COD_ABI_CARTOLARIZZATO,
COD_NDG,
ID_ALERT,
DESC_ALERT,
VAL_COLORE,
VAL_ORDINE_RISCHIO,
VAL_ORDINE_GRUPPO_RISCHIO,
DESC_GRUPPO_RISCHIO,
VAL_FATTORE_RISCHIO,
ID_GRUPPO,
VAL_PESO,
VAL_PESO_TOTALE,
VAL_COLORE_TOTALE
)
AS
SELECT -- v1 ???????? VG: prima versione
-- v2 30/03/2011 MDM: modificata vista valorizzando val_ordine_rischio con il val_ordine_gestore estratto da t_mcre0_app_alert
-- v3 04/04/2011 VG: val_ordine_rischio
-- V4 06/05/2011 VG: modiicato calcolo e aggiunto id_gruppo
R.COD_ABI_CARTOLARIZZATO,
R.COD_NDG,
ID_ALERT,
R.DESC_ALERT,
R.VAL_COLORE,
VAL_ORDINE_RISCHIO,
VAL_ORDINE_GRUPPO_RISCHIO,
DESC_GRUPPO_RISCHIO,
R.VAL_FATTORE_RISCHIO,
R.ID_GRUPPO,
R.VAL_FATTORE_RISCHIO
* DECODE (
VAL_COLORE,
'V', VAL_VERDE,
DECODE (VAL_COLORE,
'A', VAL_ARANCIO,
DECODE (VAL_COLORE, 'R', VAL_ROSSO, NULL)))
VAL_PESO,
SUM (
R.VAL_FATTORE_RISCHIO
* DECODE (
VAL_COLORE,
'V', VAL_VERDE,
DECODE (VAL_COLORE,
'A', VAL_ARANCIO,
DECODE (VAL_COLORE, 'R', VAL_ROSSO, NULL))))
OVER (PARTITION BY COD_ABI_CARTOLARIZZATO, COD_NDG, ID_GRUPPO)
VAL_PESO_TOTALE,
CASE
WHEN SUM (
R.VAL_FATTORE_RISCHIO
* DECODE (
VAL_COLORE,
'V', VAL_VERDE,
DECODE (VAL_COLORE,
'A', VAL_ARANCIO,
DECODE (VAL_COLORE, 'R', VAL_ROSSO, NULL))))
OVER (PARTITION BY COD_ABI_CARTOLARIZZATO, COD_NDG, ID_GRUPPO) <=
45
THEN
'V'
WHEN SUM (
R.VAL_FATTORE_RISCHIO
* DECODE (
VAL_COLORE,
'V', VAL_VERDE,
DECODE (VAL_COLORE,
'A', VAL_ARANCIO,
DECODE (VAL_COLORE, 'R', VAL_ROSSO, NULL))))
OVER (PARTITION BY COD_ABI_CARTOLARIZZATO, COD_NDG, ID_GRUPPO) BETWEEN 46
AND 69
THEN
'A'
WHEN SUM (
R.VAL_FATTORE_RISCHIO
* DECODE (
VAL_COLORE,
'V', VAL_VERDE,
DECODE (VAL_COLORE,
'A', VAL_ARANCIO,
DECODE (VAL_COLORE, 'R', VAL_ROSSO, NULL))))
OVER (PARTITION BY COD_ABI_CARTOLARIZZATO, COD_NDG, ID_GRUPPO) >=
70
THEN
'R'
ELSE
NULL
END
VAL_COLORE_TOTALE
FROM (SELECT P.COD_ABI_CARTOLARIZZATO,
P.COD_NDG,
A.ID_ALERT,
A.DESC_ALERT,
A.VAL_VERDE,
A.VAL_ROSSO,
A.VAL_ARANCIO,
A.VAL_GRUPPO VAL_ORDINE_RISCHIO,
SUBSTR (A.VAL_GRUPPO, 0, 1) VAL_ORDINE_GRUPPO_RISCHIO,
A.DESC_GRUPPO DESC_GRUPPO_RISCHIO,
DECODE (A.COD_PRIVILEGIO,
'A', A.VAL_FATTORE_RISCHIO_A,
A.VAL_FATTORE_RISCHIO_E)
VAL_FATTORE_RISCHIO,
A.ID_GRUPPO,
CASE
WHEN A.ID_ALERT = 1 THEN P.ALERT_1
WHEN A.ID_ALERT = 2 THEN P.ALERT_2
WHEN A.ID_ALERT = 3 THEN P.ALERT_3
WHEN A.ID_ALERT = 4 THEN P.ALERT_4
WHEN A.ID_ALERT = 5 THEN P.ALERT_5
WHEN A.ID_ALERT = 6 THEN P.ALERT_6
WHEN A.ID_ALERT = 7 THEN P.ALERT_7
WHEN A.ID_ALERT = 8 THEN P.ALERT_8
WHEN A.ID_ALERT = 9 THEN P.ALERT_9
WHEN A.ID_ALERT = 10 THEN P.ALERT_10
WHEN A.ID_ALERT = 11 THEN P.ALERT_11
WHEN A.ID_ALERT = 12 THEN P.ALERT_12
WHEN A.ID_ALERT = 13 THEN P.ALERT_13
WHEN A.ID_ALERT = 14 THEN P.ALERT_14
WHEN A.ID_ALERT = 15 THEN P.ALERT_15
WHEN A.ID_ALERT = 16 THEN P.ALERT_16
WHEN A.ID_ALERT = 17 THEN P.ALERT_17
WHEN A.ID_ALERT = 18 THEN P.ALERT_18
WHEN A.ID_ALERT = 19 THEN P.ALERT_19
WHEN A.ID_ALERT = 20 THEN P.ALERT_20
WHEN A.ID_ALERT = 21 THEN P.ALERT_21
WHEN A.ID_ALERT = 22 THEN P.ALERT_22
WHEN A.ID_ALERT = 23 THEN P.ALERT_23
WHEN A.ID_ALERT = 24 THEN P.ALERT_24
WHEN A.ID_ALERT = 25 THEN P.ALERT_25
ELSE NULL
END
VAL_COLORE
FROM T_MCRE0_APP_ALERT_POS P,
V_MCRE0_APP_UPD_FIELDS_P1 X,
(SELECT A.*, R.COD_PRIVILEGIO, R.ID_GRUPPO
FROM T_MCRE0_APP_ALERT A, T_MCRE0_APP_ALERT_RUOLI R
WHERE A.ID_ALERT = R.ID_ALERT(+)
AND A.FLG_ATTIVO = 'A'
AND A.FLG_RIO = 1
AND VAL_GRUPPO IS NOT NULL) A
WHERE P.COD_ABI_CARTOLARIZZATO = X.COD_ABI_CARTOLARIZZATO
AND P.COD_NDG = X.COD_NDG
AND X.COD_MACROSTATO = 'RIO') R;
|
-- phpMyAdmin SQL Dump
-- version 4.7.7
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Mar 18, 2018 at 08:32 PM
-- Server version: 10.1.30-MariaDB
-- PHP Version: 7.2.1
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: `gokkers`
--
-- --------------------------------------------------------
--
-- Table structure for table `users`
--
CREATE TABLE `users` (
`id` int(11) NOT NULL,
`user_name` varchar(255) NOT NULL,
`user_password` varchar(255) NOT NULL,
`email` varchar(255) NOT NULL,
`registered_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `users`
--
INSERT INTO `users` (`id`, `user_name`, `user_password`, `email`, `registered_time`) VALUES
(1, 'Brisingir', 'test', 'D231100@edu.rocwb.nl', '2018-03-18 19:52:10'),
(2, 'Kevin', 'test', 'd123456@edu.rocwb.nl', '2018-03-18 20:12:45'),
(3, 'Ismay', 'charming', 'something@something.com', '2018-03-18 20:25:38');
--
-- Indexes for dumped tables
--
--
-- Indexes for table `users`
--
ALTER TABLE `users`
ADD PRIMARY KEY (`id`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `users`
--
ALTER TABLE `users`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
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 */;
|
-- test -----------
CREATE TABLE x (a int, b int, key k (a), key k (b));
exception RuntimeException "Duplicate key name 'k'"
-- test -----------
CREATE TABLE x (a int, b int, key k (a), unique key k (b));
exception RuntimeException "Duplicate key name 'k'"
-- test -----------
CREATE TABLE x (a int, b int, key (c));
exception RuntimeException "Key column 'c' doesn't exist in table"
-- test -----------
CREATE TABLE x (a int, CONSTRAINT KEY (a));
exception RuntimeException "Bad CONSTRAINT"
-- test -----------
CREATE TABLE x (a int, CONSTRAINT INDEX (a));
exception RuntimeException "Bad CONSTRAINT"
-- test -----------
CREATE TABLE x (a int, CONSTRAINT FULLTEXT (a));
exception RuntimeException "Bad CONSTRAINT"
-- test -----------
CREATE TABLE x (a int, CONSTRAINT con KEY (a));
exception RuntimeException "Bad CONSTRAINT"
-- test -----------
CREATE TABLE x (a int primary key, b int primary key);
exception RuntimeException "Multiple PRIMARY KEYs defined"
|
-- --------------------------------------------------------
-- 主机: 127.0.0.1
-- 服务器版本: 5.7.17-log - MySQL Community Server (GPL)
-- 服务器操作系统: Win64
-- HeidiSQL 版本: 9.3.0.4984
-- --------------------------------------------------------
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET NAMES utf8mb4 */;
/*!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' */;
-- 导出 mpet 的数据库结构
CREATE DATABASE IF NOT EXISTS `mpet` /*!40100 DEFAULT CHARACTER SET utf8 */;
USE `mpet`;
-- 导出 表 mpet.account 结构
CREATE TABLE IF NOT EXISTS `account` (
`userid` int(11) NOT NULL AUTO_INCREMENT,
`username` varchar(80) NOT NULL,
`password` varchar(60) DEFAULT NULL,
`email` varchar(80) NOT NULL,
`xm` varchar(80) NOT NULL,
`address` varchar(40) DEFAULT NULL,
PRIMARY KEY (`userid`)
) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8 COMMENT='InnoDB free: 7168 kB; InnoDB free: 6144 kB';
-- 正在导出表 mpet.account 的数据:~13 rows (大约)
DELETE FROM `account`;
/*!40000 ALTER TABLE `account` DISABLE KEYS */;
INSERT INTO `account` (`userid`, `username`, `password`, `email`, `xm`, `address`) VALUES
(1, '1112123154', '1111', '123@123.com', '123', '12312'),
(2, '121212', '111', '123@123.com', '111', '222'),
(3, '12121244', '111', '123@123.com', '123', '123123'),
(4, '121235454', '111', '123@124.com', '343434', '123'),
(5, '12211', '111', 'wk@123.com', '121212', '121212'),
(6, '1221233434', '111', 'wk@123.com', '121212', '1123123'),
(7, '12222', '111', '123@123.com', '12312', '123123'),
(8, '123', '123', '123@123', '123', '123'),
(9, '12312', '111', '123@123.com', '123', '1232'),
(10, '1231231344', '111', 'wk@123.com', '123', '222'),
(11, '1231231`1', '111', '123@123.com', '12312', '123123'),
(12, 'dsf', 'df', 'df', 'df', 'df'),
(13, 'con', '999', '999', '999', '999'),
(14, 'kkk', 'kkk', 'kkk', 'kk', 'kk');
/*!40000 ALTER TABLE `account` ENABLE KEYS */;
-- 导出 过程 mpet.addCart 结构
DELIMITER //
CREATE DEFINER=`root`@`localhost` PROCEDURE `addCart`(IN `in_itemid` vaRCHAR(50), IN `in_qty` INT, OUT `out_total` FLOAT, OUT `out_oid` INT)
BEGIN
set @maxid=0;
set @orderdate='';
set @count=0;
set @qty=0;
select max(orderid),orderdate into @maxid,@orderdate from orders;
if @orderdate is null then -- 代表订单还可以添加新商品
-- 查询本次添加的商品是否在同一订单下还有同种商品,
-- 如果有,将进行修改数量,如果没有,是真正的新商品,只需要insert。
select count(*) into @count
from cart
where orderid=@maxid and
itemid=in_itemid;
if @count=0 then
insert into cart(orderid,itemid,quantity)
values( @maxid ,in_itemid,in_qty);
else
select quantity into @qty
from cart
where orderid=@maxid and
itemid=in_itemid;
call updateCart(@maxid,in_itemid,@qty+in_qty);
end if;
else -- 日期为空的时候
select max(orderid)+1 into @maxid from orders;
insert into orders(orderid)
values( @maxid );
insert into cart(orderid,itemid,quantity)
values( @maxid ,in_itemid,in_qty);
end if;
commit;
set out_oid:=@maxid;
call queryCart(@maxid,out_total);
END//
DELIMITER ;
-- 导出 过程 mpet.addCart1 结构
DELIMITER //
CREATE DEFINER=`root`@`localhost` PROCEDURE `addCart1`(IN `in_itemid` CHAR(50), IN `in_quantity` INT)
COMMENT '增加购物车商品'
BEGIN
set @odate='';
set @oid=0;
set @itemid='';
set @qty=0;
select orderid,orderdate into @oid,@odate
from orders o
where o.orderid=(select max(orderid) from orders);
-- select @oid;-- 最大id
-- select @odate;-- 最大id中的日期
if @odate is null then-- 就说明这个订单并没有形成订单号可以继续购买
select itemid,quantity into @itemid,@qty
from cart c
where orderid=@oid and itemid=in_itemid;
if @itemid='' then -- 新商品,直接添加
insert into cart (orderid,itemid,quantity)
values(@oid,in_itemid,in_quantity);
commit;
else -- 有老商品,数量累加
select @qty;
select in_quantity;
select @oid ;
select @in_itemid;
update cart
set quantity=in_quantity+@qty
where orderid=@oid and itemid=in_itemid;
commit;
end if;
else -- 需要形成新的订单号
set @oid:=@oid+1;
insert into orders (orderid) values(@oid);
insert into cart (orderid,itemid,quantity)
values(@oid,in_itemid,in_quantity);
commit;
end if;
END//
DELIMITER ;
-- 导出 过程 mpet.addCart10 结构
DELIMITER //
CREATE DEFINER=`root`@`localhost` PROCEDURE `addCart10`(IN `in_username` varchar(10), IN `in_iid` varchar(20), IN `in_quantity` INT, OUT `o_oid` INT)
begin
set @oid:=0;
set @odate:="";
set @quantity:=0;
select orderid , orderdate into @oid, @odate
from orders
where username = in_username
order by username ,orderid desc
limit 1;
#select @odate;
if @odate!='' then -- 代表已经结算了,订单编号需要自增
set @oid:=@oid+1;-- 最新的订单编号
#select @oid;
-- 新增加主表
insert into orders (username,orderid) values(in_username,@oid);
-- 对购物车表进行添加数据
insert into cart (username,orderid,itemid,quantity)
values(in_username,@oid,in_iid,in_quantity);
else -- 还是老订单,需要判断item在当前购物车下是否存在编号一样的记录
select quantity into @quantity
from cart
where username=in_username and itemid=in_iid and orderid=@oid;
if @quantity='' then -- 代表是纯新数据
insert into cart (username,orderid,itemid,quantity) values(in_username,@oid,in_iid,in_quantity);
else -- 已经有数据了,需要新老数据叠加
set @quantity=@quantity+in_quantity;
update cart set quantity=@quantity
where username=in_username and itemid=in_iid and orderid=@oid;
end if;
end if;
commit;
set o_oid:=@oid;
end//
DELIMITER ;
-- 导出 过程 mpet.addCart3 结构
DELIMITER //
CREATE DEFINER=`root`@`localhost` PROCEDURE `addCart3`(IN `in_itemid` varchar(50), IN `in_qty` INT)
BEGIN
set @oid=0;
set @odate='';
set @count=0;-- 是否存在老商品
set @qty=0;-- 老商品的数量
-- 先看看该购物车的情况,是否已经提交生成了订单
select orderid,orderdate into @oid ,@odate
from orders
where orderid=(select max(orderid) from orders limit 1 );
if @odate is null then -- 还可以在当前订单下购物
-- 再次判断是纯新的商品,还是已经在同一个订单下有老的商品了
-- 有老的商品,需要修改同订单下,同商品下的数量
-- 没有老的商品,直接插入该商品
select count(*) into @count
from cart
where orderid=@oid and itemid=in_itemid;
if @count=0 then-- 新商品,只增加
insert into cart(orderid,itemid,quantity)
values(@oid ,in_itemid,in_qty);
else -- 修改老商品,数量做修改
-- 取出老商品的数量,和现有数量累加
select quantity into @qty
from cart
where orderid=@oid and itemid=in_itemid;
call updateCart3(in_itemid,in_qty+@qty);
end if;
else
-- 订单日期不等于空,代表需要新形成订单
insert into orders(orderid) values(@oid+1);
-- 在进入购物车数据
insert into cart(orderid,itemid,quantity)
values(@oid+1 ,in_itemid,in_qty);
end if;
call queryCart3();
END//
DELIMITER ;
-- 导出 过程 mpet.addCart4 结构
DELIMITER //
CREATE DEFINER=`root`@`localhost` PROCEDURE `addCart4`(IN `in_itemid` varchar(100), IN `in_qty` int)
begin
/*根据最大订单查询出该订单是否已经被使用了,如果没被完全使用完,
那么它的order_date字段是空*/
set @oid=0;/*订单编号*/
set @odate='';/*订单日期*/
set @itemid='';
set @qty=0;/*数量*/
select orderid,orderdate into @oid,@odate
from orders
where orderid=(select max(orderid) from orders limit 1);
/*判读orderdate是否存在值*/
if @odate is null then/*已经开始购买,只不过还没买完*/
/*新物品是否在已买的中同一订单下存在*/
select itemid,quantity into @itemid,@qty
from cart
where orderid=@oid and itemid=in_itemid;
if @itemid='' then
insert into cart(orderid,itemid,quantity) values(@oid,in_itemid,in_qty);
else/*数量改变*/
call updateCart4(in_itemid,@oid,@qty+in_qty);
end if;
else/*还没购买新东西那,重新生成订单号*/
insert into orders (orderid) values(@oid+1);
insert into cart(orderid,itemid,quantity) values(@oid+1,in_itemid,in_qty);
set @oid=@oid+1;
end if;
commit;
call queryCart4(@oid);
end//
DELIMITER ;
-- 导出 过程 mpet.addCart5 结构
DELIMITER //
CREATE DEFINER=`root`@`localhost` PROCEDURE `addCart5`(IN `in_itemid` varchar(10), IN `in_quantity` int
)
begin
set @id:=0;#orderid
set @date:='';#orderdate
set @iid:='';#itemid
set @qty:=0;#quantity
#1先取订单编号
select orderid ,orderdate into @id,@date
from orders
order by orderid desc
limit 1;
#2判断其@date是否为空,如果为空代表还没提交还可以在当前订单下继续购买
#如果不为空,代表已经提交了,需要生产新订单编号
if @date!='' then
set @id:=@id+1;
insert into orders(orderid) values(@id);
#select 'Hello';
#新订单形成后,下一句就是添加新的购物车
insert into cart(orderid,itemid,quantity)
values(@id,in_itemid,in_quantity);
else
#对购物车标修改
#3如果itemid相等,代表当前商品是老商品,只需要改数量
#否则是新商品,重新加记录
select itemid,quantity into @iid,@qty
from cart c
where c.orderid=@id and
c.itemid=in_itemid;
if @iid='' then
insert into cart(orderid,itemid,quantity)
values(@id,in_itemid,in_quantity);
else
call updateCart5(@iid,@id,@qty+in_quantity);
end if;
end if;
select * from cart where orderid=@id;
end//
DELIMITER ;
-- 导出 过程 mpet.addCart6 结构
DELIMITER //
CREATE DEFINER=`root`@`localhost` PROCEDURE `addCart6`(IN `in_itemid` varchar(20), IN `in_quantity` int, IN `in_username` varchar(20), OUT `out_oid` int
)
begin
set @oid:=0;
set @itemid:="";
set @qu:=0;# 老数量
-- 以下取出没结账的最大订单编号
select orderid into @oid
from orders o
where o.orderdate is null and username=in_username
order by o.orderid desc
limit 1;
if @oid='' then #没有新开订单
select orderid into @oid
from orders
where username=in_username
order by orderid desc
limit 1;
set @oid:=@oid+1;
insert into orders (orderid,username)
values(@oid ,in_username) ;
end if;
select itemid,quantity into @itemid,@qu
from cart c
where c.orderid=@oid and c.itemid=in_itemid and username=in_username;
if @itemid='' then -- 证明是纯新商品,我们应该insert
insert into cart(orderid,itemid,quantity,username)
values(@oid,in_itemid,in_quantity,in_username);
else # 证明该购物车中有该商品,需要更新数量
update cart c
set quantity=@qu+in_quantity
where c.orderid=@oid and c.itemid=in_itemid and username=in_username;
end if;
set out_oid=@oid;
end//
DELIMITER ;
-- 导出 过程 mpet.addCart7 结构
DELIMITER //
CREATE DEFINER=`root`@`localhost` PROCEDURE `addCart7`(IN `in_username` varchar(10), IN `in_itemid` varchar(10), IN `in_quantity` int(2)
, OUT `out_oid` INT)
begin
#取得当前用户下的订单编号和日期,如果日期为null,代表它还没有提交
#可以继续购物。
set @id:=0;
set @odate:='';
set @oqu:=0;#老数量
select orderid ,orderdate into @id,@odate
from orders
where username=in_username
order by orderid desc
limit 1;
if @odate is not null then#证明,他已经购物完毕,需要 增加新订单编号
set @id=@id+1;
insert into orders(orderid,username)
values(@id,in_username);
end if;
#但是还需要判断是否是已经买了同类产品
select quantity into @oqu
from cart
where username=in_username and
orderid=@id and
itemid=in_itemid;
if @oqu='' then #没有同类
insert into cart(username,orderid,itemid,quantity)
values(in_username,@id,in_itemid,in_quantity);
else#有同类,修改
set @nqu=in_quantity+@oqu;#新数量
call updateCart7(in_username,in_itemid,@nqu,@id);
end if;
set out_oid:=@id;
end//
DELIMITER ;
-- 导出 过程 mpet.addCart8 结构
DELIMITER //
CREATE DEFINER=`root`@`localhost` PROCEDURE `addCart8`(IN `in_username` varchar(10), IN `in_itemid` varchar(10), IN `in_quantity` int
, OUT `out_orderid` INT)
begin
set @maxid:=0;
set @odate:='';
set @oquantity=0;
set @iid='';
select orderid ,orderdate into @maxid,@odate
from orders
where username=in_username
order by orderid desc
limit 1;
select @odate;
if @odate is not null then# 如果条件为真,代表必须重新生成订单编号。
select orderid into @maxid
from orders
where username=in_username
order by orderid desc
limit 1;
set @maxid=@maxid+1;
insert into orders(orderid,username)
values(@maxid,in_username);
end if;
#还没买完商品吗,还可以继续购买
#看购物车在当前订单编号下 当前用户下,当前买的产品下是否有相同产品
#如果有相同产品,新老数量叠加。
#如果是新商品,做新纪录存储
select itemid,quantity into @iid, @oquantity
from cart
where username=in_username and
orderid=@maxid and
itemid=in_itemid;
if @iid ='' then#没有老商品
insert into cart(username,orderid,itemid,quantity)
values(in_username,@maxid,in_itemid,in_quantity);
else#只能修改了
set @nquantity=in_quantity+@oquantity;
call updateCart8(in_username,in_itemid,@nquantity,@maxid);
end if;
set out_orderid:=@maxid;
end//
DELIMITER ;
-- 导出 过程 mpet.addCart9 结构
DELIMITER //
CREATE DEFINER=`root`@`localhost` PROCEDURE `addCart9`(
in in_itemid varchar(20),
in in_username varchar(20),
in in_quantity int,
out out_oid int
)
begin
#1 取出订单日期为空,且是当前用户的那笔订单
set @oid:=0;
set @qua:=0;
select orderid into @oid
from orders o
where o.orderdate is null and o.username=in_username
limit 1;
if @oid='' then #代表不能继续购物,必须重新生成订单
select orderid into @oid
from orders o
where o.username=in_username
order by orderid desc
limit 1;
set @oid:=@oid+1; #计算出新的订单编号
#新生成订单
insert into orders (orderid,username) values(@oid,in_username);
else # 代表还可以继续购物,还没进行结算,需要看是否在该订单下有老商品
select quantity into @qua
from cart c
where c.orderid=@oid and c.username=in_username and c.itemid=in_itemid;
if @qua='' then #判断是否有老商品,纯新商品
#再在该订单下生成新的购物数据
insert into cart(orderid,username,itemid,quantity)
values(@oid,in_username,in_itemid,in_quantity);
else # 有老商品
#再在该订单下生成新的购物数据
set @qua:=@qua+in_quantity;
update cart c set quantity=@qua
where c.orderid=@oid and c.username=in_username
and c.itemid=in_itemid;
end if;
end if;
set out_oid:=@oid;
end//
DELIMITER ;
-- 导出 表 mpet.cart 结构
CREATE TABLE IF NOT EXISTS `cart` (
`userid` int(11) NOT NULL,
`itemid` int(11) NOT NULL,
`orderid` int(11) NOT NULL,
`quantity` int(11) DEFAULT NULL,
PRIMARY KEY (`userid`,`itemid`,`orderid`),
KEY `FK_cart_item` (`itemid`),
KEY `FK_cart_orders` (`orderid`),
CONSTRAINT `FK_account` FOREIGN KEY (`userid`) REFERENCES `account` (`userid`),
CONSTRAINT `FK_cart_item` FOREIGN KEY (`itemid`) REFERENCES `item` (`itemid`),
CONSTRAINT `FK_cart_orders` FOREIGN KEY (`orderid`) REFERENCES `orders` (`orderid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- 正在导出表 mpet.cart 的数据:~15 rows (大约)
DELETE FROM `cart`;
/*!40000 ALTER TABLE `cart` DISABLE KEYS */;
INSERT INTO `cart` (`userid`, `itemid`, `orderid`, `quantity`) VALUES
(8, 1, 5, 1),
(8, 4, 6, 3),
(8, 5, 5, 2),
(8, 7, 1, 3),
(8, 7, 6, 1),
(8, 8, 4, 3),
(8, 10, 5, 2),
(8, 11, 4, 1),
(8, 11, 6, 1),
(8, 17, 5, 2),
(8, 20, 6, 2),
(8, 22, 1, 8),
(8, 23, 1, 1),
(8, 27, 1, 5),
(8, 27, 3, 1);
/*!40000 ALTER TABLE `cart` ENABLE KEYS */;
-- 导出 表 mpet.category 结构
CREATE TABLE IF NOT EXISTS `category` (
`catid` varchar(10) NOT NULL,
`name` varchar(80) DEFAULT NULL,
`descn` varchar(255) DEFAULT NULL,
PRIMARY KEY (`catid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='InnoDB free: 7168 kB; InnoDB free: 6144 kB';
-- 正在导出表 mpet.category 的数据:~5 rows (大约)
DELETE FROM `category`;
/*!40000 ALTER TABLE `category` DISABLE KEYS */;
INSERT INTO `category` (`catid`, `name`, `descn`) VALUES
('BIRDS', '鸟类', '<image src="${ppath}/static/images/birds_icon.gif"><font size="5" color="blue"> Birds</font>'),
('CATS', '猫', '<image src="${ppath}/static/images/cats_icon.gif"><font size="5" color="blue"> Cats</font>'),
('DOGS', '狗', '<image src="${ppath}/static/images/dogs_icon.gif"><font size="5" color="blue"> Dogs</font>'),
('FISH', '鱼', '<image src="${ppath}/static/images/fish_icon.gif"><font size="5" color="blue"> Fish</font>'),
('REPTILES', '爬虫类', '<image src="${ppath}/static/images/reptiles_icon.gif"><font size="5" color="blue"> Reptiles</font>');
/*!40000 ALTER TABLE `category` ENABLE KEYS */;
-- 导出 过程 mpet.delCart 结构
DELIMITER //
CREATE DEFINER=`root`@`localhost` PROCEDURE `delCart`(IN `in_orderid` INT, IN `in_itemid` vARCHAR(50), OUT `out_total` FLOAT, OUT `out_oid` INT)
BEGIN
delete from Cart
where orderid=in_orderid and
itemid=in_itemid;
commit;
set out_oid:=in_orderid;
call queryCart(in_orderid,out_total);
END//
DELIMITER ;
-- 导出 过程 mpet.delCart1 结构
DELIMITER //
CREATE DEFINER=`root`@`localhost` PROCEDURE `delCart1`(IN `in_orderid` INT, IN `in_itemid` CHAR(50))
BEGIN
delete
from cart
where orderid=in_orderid and
itemid=in_itemid ;
END//
DELIMITER ;
-- 导出 过程 mpet.delCart3 结构
DELIMITER //
CREATE DEFINER=`root`@`localhost` PROCEDURE `delCart3`(IN `in_orderid` INT, IN `in_itemid` varCHAR(50))
BEGIN
delete
from cart
where orderid=in_orderid and
itemid=in_itemid;
call queryCart3();
END//
DELIMITER ;
-- 导出 过程 mpet.delCart4 结构
DELIMITER //
CREATE DEFINER=`root`@`localhost` PROCEDURE `delCart4`(
in in_itemid varchar(10),
in in_oid int
)
begin
delete from cart
where itemid=in_itemid and
orderid=in_oid;
commit;
call queryCart4(in_oid);
end//
DELIMITER ;
-- 导出 过程 mpet.delCart7 结构
DELIMITER //
CREATE DEFINER=`root`@`localhost` PROCEDURE `delCart7`(
in in_username varchar(10),
in in_itemid varchar(10),
in in_oid int
)
begin
delete from cart
where username=in_username and itemid=in_itemid and orderid=in_oid;
end//
DELIMITER ;
-- 导出 过程 mpet.delCart8 结构
DELIMITER //
CREATE DEFINER=`root`@`localhost` PROCEDURE `delCart8`(
in_username varchar(10),
in_orderid int,
in_itemid varchar(10)
)
begin
delete from cart
where username=in_username and
orderid=in_orderid and
itemid=in_itemid;
end//
DELIMITER ;
-- 导出 函数 mpet.func_get_split_string 结构
DELIMITER //
CREATE DEFINER=`root`@`localhost` FUNCTION `func_get_split_string`(`f_string` varchar(1000), `f_delimiter` varchar(5), `f_order` int) RETURNS varchar(255) CHARSET utf8
BEGIN
-- Get the separated number of given string.
declare result varchar(255) default '';
set result = reverse(substring_index(reverse(substring_index(f_string,f_delimiter,f_order)),f_delimiter,1));
return result;
END//
DELIMITER ;
-- 导出 函数 mpet.func_get_split_string_total 结构
DELIMITER //
CREATE DEFINER=`root`@`localhost` FUNCTION `func_get_split_string_total`(`f_string` varchar(1000), `f_delimiter` varchar(5)
) RETURNS int(11)
BEGIN
-- Get the total number of given string.
return 1+(length(f_string) - length(replace(f_string,f_delimiter,'')));
END//
DELIMITER ;
-- 导出 表 mpet.item 结构
CREATE TABLE IF NOT EXISTS `item` (
`itemid` int(11) NOT NULL,
`itemno` varchar(10) NOT NULL,
`listprice` decimal(10,2) DEFAULT NULL,
`productid` int(11) DEFAULT NULL,
`unitcost` decimal(10,2) DEFAULT NULL,
`status` varchar(2) DEFAULT NULL,
`attr1` varchar(80) DEFAULT NULL,
PRIMARY KEY (`itemid`),
KEY `FK_item_product` (`productid`),
CONSTRAINT `FK_item_product` FOREIGN KEY (`productid`) REFERENCES `product` (`productid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='InnoDB free: 7168 kB; (`productid`) REFER `jpetstore/product';
-- 正在导出表 mpet.item 的数据:~28 rows (大约)
DELETE FROM `item`;
/*!40000 ALTER TABLE `item` DISABLE KEYS */;
INSERT INTO `item` (`itemid`, `itemno`, `listprice`, `productid`, `unitcost`, `status`, `attr1`) VALUES
(1, 'EST_1', 16.50, 3, 10.00, 'P', 'Large'),
(2, 'EST_10', 18.50, 11, 12.00, 'P', 'Spotted Adult Female'),
(3, 'EST_11', 18.50, 16, 12.00, 'P', 'Venomless'),
(4, 'EST_12', 18.50, 16, 12.00, 'P', 'Rattleless'),
(5, 'EST_13', 18.50, 15, 12.00, 'P', 'Green Adult'),
(6, 'EST_14', 58.50, 8, 12.00, 'P', 'Tailless'),
(7, 'EST_15', 23.50, 8, 12.00, 'P', 'With tail'),
(8, 'EST_16', 93.50, 7, 12.00, 'P', 'Adult Female'),
(9, 'EST_17', 93.50, 7, 12.00, 'P', 'Adult Male'),
(10, 'EST_18', 193.50, 1, 92.00, 'P', 'Adult Male'),
(11, 'EST_19', 15.50, 2, 2.00, 'P', 'Adult Male'),
(12, 'EST_2', 16.50, 5, 10.00, 'P', 'Small'),
(13, 'EST_20', 5.50, 4, 2.00, 'P', 'Adult Male'),
(14, 'EST_21', 5.29, 4, 1.00, 'P', 'Adult Female'),
(15, 'EST_22', 135.50, 14, 100.00, 'P', 'Adult Male'),
(16, 'EST_23', 145.49, 14, 100.00, 'P', 'Adult Female'),
(17, 'EST_24', 255.50, 14, 92.00, 'P', 'Adult Male'),
(18, 'EST_25', 325.29, 14, 90.00, 'P', 'Adult Female'),
(19, 'EST_26', 125.50, 10, 92.00, 'P', 'Adult Male'),
(20, 'EST_27', 155.29, 10, 90.00, 'P', 'Adult Female'),
(21, 'EST_28', 155.29, 13, 90.00, 'P', 'Adult Female'),
(22, 'EST_3', 18.50, 6, 12.00, 'P', 'Toothless'),
(23, 'EST_4', 18.50, 5, 12.00, 'P', 'Spotted'),
(24, 'EST_5', 18.50, 5, 12.00, 'P', 'Spotless'),
(25, 'EST_6', 18.50, 9, 12.00, 'P', 'Male Adult'),
(26, 'EST_7', 18.50, 9, 12.00, 'P', 'Female Puppy'),
(27, 'EST_8', 18.50, 12, 12.00, 'P', 'Male Puppy'),
(28, 'EST_9', 18.50, 11, 12.00, 'P', 'Spotless Male Puppy');
/*!40000 ALTER TABLE `item` ENABLE KEYS */;
-- 导出 表 mpet.orders 结构
CREATE TABLE IF NOT EXISTS `orders` (
`userid` int(11) NOT NULL,
`orderid` int(11) NOT NULL,
`orderdate` varchar(40) DEFAULT NULL,
`totalprice` decimal(10,2) DEFAULT NULL,
PRIMARY KEY (`userid`,`orderid`),
KEY `FK_fk_account_1` (`userid`),
KEY `pk_orders_2` (`orderid`),
CONSTRAINT `FK_fk_account_1` FOREIGN KEY (`userid`) REFERENCES `account` (`userid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- 正在导出表 mpet.orders 的数据:~16 rows (大约)
DELETE FROM `orders`;
/*!40000 ALTER TABLE `orders` DISABLE KEYS */;
INSERT INTO `orders` (`userid`, `orderid`, `orderdate`, `totalprice`) VALUES
(1, 1, NULL, NULL),
(2, 1, NULL, NULL),
(3, 1, NULL, NULL),
(4, 1, NULL, NULL),
(5, 1, NULL, NULL),
(6, 1, NULL, NULL),
(7, 1, NULL, NULL),
(8, 1, NULL, NULL),
(8, 2, NULL, NULL),
(8, 3, 'Sat Nov 03 22:00:22 CST 2018', 18.50),
(8, 4, 'Sat Nov 03 22:58:35 CST 2018', 296.00),
(8, 5, 'Sat Nov 03 23:00:15 CST 2018', 951.50),
(8, 6, 'Sat Nov 03 23:01:58 CST 2018', 405.08),
(9, 1, NULL, NULL),
(10, 1, NULL, NULL),
(11, 1, NULL, NULL),
(12, 1, NULL, NULL),
(13, 1, NULL, NULL);
/*!40000 ALTER TABLE `orders` ENABLE KEYS */;
-- 导出 表 mpet.product 结构
CREATE TABLE IF NOT EXISTS `product` (
`productid` int(11) NOT NULL AUTO_INCREMENT,
`productno` varchar(10) NOT NULL,
`catid` varchar(10) NOT NULL,
`name` varchar(80) DEFAULT NULL,
`descn` varchar(255) DEFAULT NULL,
`pic` varchar(50) DEFAULT NULL,
PRIMARY KEY (`productid`),
KEY `FK_fk_product_1` (`catid`),
CONSTRAINT `FK_fk_product_1` FOREIGN KEY (`catid`) REFERENCES `category` (`catid`)
) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8 COMMENT='InnoDB free: 7168 kB; (`category`) REFER `jpetstore/category';
-- 正在导出表 mpet.product 的数据:~16 rows (大约)
DELETE FROM `product`;
/*!40000 ALTER TABLE `product` DISABLE KEYS */;
INSERT INTO `product` (`productid`, `productno`, `catid`, `name`, `descn`, `pic`) VALUES
(1, 'AV-CB-01', 'BIRDS', 'Amazon Parrot', 'Great companion for up to 75 years', 'bird4.gif'),
(2, 'AV-SB-02', 'BIRDS', 'Finch', 'Great stress reliever', 'bird1.gif'),
(3, 'FI-FW-01', 'FISH', 'Koi', 'Fresh Water fish from Japan', 'fish3.gif'),
(4, 'FI-FW-02', 'FISH', 'Goldfish', 'Fresh Water fish from China', 'fish2.gif'),
(5, 'FI-SW-01', 'FISH', 'Angelfish', 'Salt Water fish from Australia', 'fish1.jpg'),
(6, 'FI-SW-02', 'FISH', 'Tiger Shark', 'Salt Water fish from Australia', 'fish4.gif'),
(7, 'FL-DLH-02', 'CATS', 'Persian', 'Friendly house cat, doubles as a princess', 'cat1.gif'),
(8, 'FL-DSH-01', 'CATS', 'Manx', 'Great for reducing mouse populations', 'cat3.gif'),
(9, 'K9-BD-01', 'DOGS', 'Bulldog', 'Friendly dog from England', 'dog2.gif'),
(10, 'K9-CW-01', 'DOGS', 'Chihuahua', 'Great companion dog', 'dog4.gif'),
(11, 'K9-DL-01', 'DOGS', 'Dalmation', 'Great dog for a Fire Station', 'dog5.gif'),
(12, 'K9-PO-02', 'DOGS', 'Poodle', 'Cute dog from France', 'dog6.gif'),
(13, 'K9-RT-01', 'DOGS', 'Golden Retriever', 'Great family dog', 'dog1.gif'),
(14, 'K9-RT-02', 'DOGS', 'Labrador Retriever', 'Great hunting dog', 'dog5.gif'),
(15, 'RP-LI-02', 'REPTILES', 'Iguana', 'Friendly green friend', 'lizard2.gif'),
(16, 'RP-SN-01', 'REPTILES', 'Rattlesnake', 'Doubles as a watch dog', 'lizard3.gif');
/*!40000 ALTER TABLE `product` ENABLE KEYS */;
-- 导出 表 mpet.profile 结构
CREATE TABLE IF NOT EXISTS `profile` (
`userid` int(11) NOT NULL,
`lang` varchar(80) NOT NULL,
`catid` varchar(30) NOT NULL,
PRIMARY KEY (`userid`),
KEY `FK_Reference_7` (`catid`),
CONSTRAINT `FK_Reference_7` FOREIGN KEY (`catid`) REFERENCES `category` (`catid`),
CONSTRAINT `FK_Relationship_4` FOREIGN KEY (`userid`) REFERENCES `account` (`userid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- 正在导出表 mpet.profile 的数据:~2 rows (大约)
DELETE FROM `profile`;
/*!40000 ALTER TABLE `profile` DISABLE KEYS */;
INSERT INTO `profile` (`userid`, `lang`, `catid`) VALUES
(12, 'eng', 'BIRDS'),
(13, 'eng', 'BIRDS'),
(14, 'eng', 'FISH');
/*!40000 ALTER TABLE `profile` ENABLE KEYS */;
-- 导出 过程 mpet.p_1 结构
DELIMITER //
CREATE DEFINER=`root`@`localhost` PROCEDURE `p_1`(IN `in_category` varchar(10), IN `in_pro` varchar(10), IN `in_item` varchar(10)
)
begin
if in_category!="" then
select * from product p,category c
where p.catid=in_category and
p.catid=c.catid;
elseif(in_pro!="") then
select * from item i,product p
where i.productid=in_pro and
i.productid=p.productid ;
elseif(in_item!="") then
select * from item i,product p
where i.itemid=in_item and
i.productid=p.productid ;
end if;
end//
DELIMITER ;
-- 导出 过程 mpet.p_3 结构
DELIMITER //
CREATE DEFINER=`root`@`localhost` PROCEDURE `p_3`(
in in_itemid varchar(10),# 新买的宠物编号
in in_qty int #新买的宠物的数量
)
begin
#
#1.找到进行中的订单编号
set @orderid:='';
set @quantity:=0;
select orderid into @orderid
from orders
where orderdate is null;
#如果没有进行中的订单,就需要把当前最大的订单编号取出来
if @orderid="" then
select max(orderid)+1 into @orderid
from orders;
insert into orders(orderid) values(@orderid);
commit;
end if;
#2.判断在当前订单中的购物车上是否有同一宠物
select quantity into @quantity
from cart
where orderid=@orderid and itemid=in_itemid;
#3把新老宠物的数量进行叠加
if @quantity = 0 then#代表是新的宠物
insert into cart (orderid,itemid,quantity) values(@orderid,in_itemid,in_qty);
elseif @quantity > 0 then#之前有同itemid的老宠物
update cart set quantity=in_qty+@quantity
where orderid=@orderid and
itemid=in_itemid;
end if;
commit;
end//
DELIMITER ;
-- 导出 过程 mpet.p_4 结构
DELIMITER //
CREATE DEFINER=`root`@`localhost` PROCEDURE `p_4`(#针对当前订单下的购物车进行查询所有宠物
)
begin
set @orderid:='';
select orderid into @orderid
from orders
where orderdate is null;
select * from cart c ,item i,product p
where c.itemid=i.itemid and
i.productid=p.productid and
c.orderid=@orderid;
end//
DELIMITER ;
-- 导出 过程 mpet.p_5 结构
DELIMITER //
CREATE DEFINER=`root`@`localhost` PROCEDURE `p_5`(
in in_orderid int,
in in_itemid varchar(10)
)
begin
delete from cart
where orderid=in_orderid and
itemid=in_itemid;
commit;
end//
DELIMITER ;
-- 导出 过程 mpet.p_6 结构
DELIMITER //
CREATE DEFINER=`root`@`localhost` PROCEDURE `p_6`(
in in_orderid int,
in in_itemid varchar(10),
in in_quantity int
)
begin
update cart
set quantity=in_quantity
where orderid=in_orderid and
itemid=in_itemid;
commit;
end//
DELIMITER ;
-- 导出 过程 mpet.p_7 结构
DELIMITER //
CREATE DEFINER=`root`@`localhost` PROCEDURE `p_7`(
in in_catid varchar(10),
in in_proid varchar(10),
in in_itemid varchar(10)
)
begin
if in_catid!="" then
select *
from product p
inner join category c on p.catid=c.catid
where p.catid=in_catid;
elseif in_proid!="" then
select *
from item i
inner join product p on i.productid=p.productid
inner join category c on p.catid=c.catid
where p.productid=in_proid;
elseif in_itemid!="" then
select *
from item i
inner join product p on i.productid=p.productid
inner join category c on p.catid=c.catid
where i.itemid=in_itemid;
end if;
end//
DELIMITER ;
-- 导出 过程 mpet.p_8 结构
DELIMITER //
CREATE DEFINER=`root`@`localhost` PROCEDURE `p_8`(
in in_itemid varchar(10) ,# 商品编号
in in_quantity int,#数量
out out_orderid int #最新的orderid
)
begin
#1先判断该购物车是否形成了订单,
# 如果其orderdate字段为空,证明他还可以继续购物。
#订单编号就是该编号。
#如果,如果其orderdate字段不为空,证明订单已经形成,那么重新找个最大订单编号
set @maxid:=0;
set @odate:="";
select orderid,orderdate into @maxid, @odate from orders order by orderid desc limit 1;
if @odate is null then #这是需要修改老订单
set @maxid:=@maxid;
#增加购物车 cart
set @oldqua:=0;
set @iid:="";
#判断是否是同一订单下的新商品
select itemid into @iid
from cart
where orderid=@maxid and itemid=in_itemid;
if @iid='' then#同一订单下该商品不存在
insert into cart (orderid,itemid,quantity)
values(@maxid,in_itemid,in_quantity);
else#同一订单下该商品存在
#如果同一订单编号在同个商品,那么数量需要累加
select quantity into @oldqua
from cart
where orderid=@maxid and itemid=in_itemid;
# 累加之后再送入当前顶单编号下的该商品。
update cart set quantity=@oldqua+in_quantity
where orderid=@maxid and itemid=in_itemid;
end if;
else #这是新订单
set @maxid:=@maxid+1;
insert into orders(orderid)
value(@maxid);
insert into cart (orderid,itemid,quantity)
values(@maxid,in_itemid,in_quantity);
end if;
set out_orderid:=@maxid;
end//
DELIMITER ;
-- 导出 过程 mpet.queryCart 结构
DELIMITER //
CREATE DEFINER=`root`@`localhost` PROCEDURE `queryCart`(IN `in_orderid` INT, OUT `out_total` fLOAT)
BEGIN
select sum(i.listprice*c.quantity) into out_total
from item i,cart c
where c.itemid=i.itemid and c.orderid=in_orderid;
select *
from product p,category c,item i,cart a
where
p.catid=c.catid and
i.productid=p.productid and
a.itemid=i.itemid and
a.orderid=in_orderid;
END//
DELIMITER ;
-- 导出 过程 mpet.queryCart1 结构
DELIMITER //
CREATE DEFINER=`root`@`localhost` PROCEDURE `queryCart1`()
BEGIN
set @oid=0;
select orderid into @oid
from orders o
where o.orderid=(select max(orderid) from orders);
select *
from cart c,item i,product p,orders o
where
c.orderid=@oid and
c.itemid=i.itemid and
i.productid=p.productid and
c.orderid=o.orderid;
END//
DELIMITER ;
-- 导出 过程 mpet.queryCart3 结构
DELIMITER //
CREATE DEFINER=`root`@`localhost` PROCEDURE `queryCart3`()
BEGIN
set @oid=0;
select max(orderid) into @oid from orders limit 1 ;
select *
from cart c ,item i ,product p,category ca
where c.orderid=@oid and
c.itemid=i.itemid and
p.productid=i.productid and
p.catid=ca.catid;
END//
DELIMITER ;
-- 导出 过程 mpet.queryCart4 结构
DELIMITER //
CREATE DEFINER=`root`@`localhost` PROCEDURE `queryCart4`(IN `in_oid` int
)
begin
select *
from cart c,product p,item i,category c1
where orderid=in_oid and
c.itemid=i.itemid and
i.productid=p.productid and
p.catid=c1.catid;
end//
DELIMITER ;
-- 导出 过程 mpet.queryCart6 结构
DELIMITER //
CREATE DEFINER=`root`@`localhost` PROCEDURE `queryCart6`(IN `in_username` varchar(20)
)
begin
set @oid:='';
select orderid into @oid
from orders
where username=in_username and orderdate is null;
select *
from cart c
where c.orderid=@oid
and username=in_username;
end//
DELIMITER ;
-- 导出 过程 mpet.queryCart7 结构
DELIMITER //
CREATE DEFINER=`root`@`localhost` PROCEDURE `queryCart7`(
in in_username varchar(10),
in in_oid int
)
begin
select *
from cart
where username=in_username and
orderid=in_oid;
end//
DELIMITER ;
-- 导出 过程 mpet.queryCart8 结构
DELIMITER //
CREATE DEFINER=`root`@`localhost` PROCEDURE `queryCart8`(
in_username varchar(10),
in_orderid int
)
begin
select * from cart
where username=in_username and
orderid=in_orderid;
end//
DELIMITER ;
-- 导出 过程 mpet.queryPet 结构
DELIMITER //
CREATE DEFINER=`root`@`localhost` PROCEDURE `queryPet`(IN `in_category` CHAR(10), IN `in_pro` CHAR(10), IN `in_item` CHAR(10))
BEGIN
/*
in_category:宠物种类,为了查询product表
in_pro:宠物产品,为了查询item表
in_item:宠物项目,为了查询单个项目 为了查询item表
*/
if in_category!='' then
select * from
product p,category c
where
p.catid=in_category and
p.catid=c.catid;
elseif in_pro!='' then
select *
from product p,category c,item i
where i.productid=in_pro and
p.catid=c.catid and
i.productid=p.productid;
elseif in_item!='' then
select *
from item i,product p
where i.itemid=in_item and
i.productid=p.productid;
end if;
END//
DELIMITER ;
-- 导出 过程 mpet.queryPet2 结构
DELIMITER //
CREATE DEFINER=`root`@`localhost` PROCEDURE `queryPet2`(IN `in_cate` CHAR(50), IN `in_pro` CHAR(50), IN `in_item` CHAR(50))
BEGIN
if in_cate!='' then /* 通过种类进行查询产品*/
select p.*,c.*,p.name pname
from category c, product p
where c.catid=p.catid and p.catid=in_cate;
elseif in_pro!='' then /* 通过产品进行查询项目*/
select *
from Item i,product p
where i.productid=p.productid and
i.productid=in_pro;
elseif in_item!='' then/* 通过项目进行查询更详细的项目内容*/
select p.*,i.*,p.name pname
from Item i,product p
where i.productid=p.productid and
i.itemid=in_item;
end if;
END//
DELIMITER ;
-- 导出 过程 mpet.queryPet3 结构
DELIMITER //
CREATE DEFINER=`root`@`localhost` PROCEDURE `queryPet3`(IN `in_cate` VARCHAR(50), IN `in_pro` VARCHAR(50), IN `in_item` VARCHAR(50))
BEGIN
if in_cate!='' then -- 根据种类查询产品
select p.*,c.*
from category c,product p
where p.catid=in_cate and p.catid=c.catid;
elseif in_pro!='' then -- 根据产品查询商品
select *
from product p,item i
where i.productid=in_pro and p.productid=i.productid;
else
select *
from item i,product p
where i.itemid=in_item and
i.productid=p.productid;
end if;
END//
DELIMITER ;
-- 导出 过程 mpet.queryPet4 结构
DELIMITER //
CREATE DEFINER=`root`@`localhost` PROCEDURE `queryPet4`(
in in_catid varchar(10),
in in_productid varchar(10),
in in_itemid varchar(10)
)
begin
if in_catid!="" then # 通过种类去查产品
select *
from product p
inner join category c on(p.catid=c.catid)
where p.catid=in_catid;
elseif in_productid!="" then
select *
from item i
inner join product p on(p.productid=i.productid)
inner join category c on(p.catid=c.catid)
where i.productid=in_productid;
elseif in_itemid!="" then
select *
from item i
inner join product p on(p.productid=i.productid)
inner join category c on(p.catid=c.catid)
where i.itemid=in_itemid;
end if;
end//
DELIMITER ;
-- 导出 过程 mpet.querypet5 结构
DELIMITER //
CREATE DEFINER=`root`@`localhost` PROCEDURE `querypet5`(
in in_catid varchar(20),
in in_proid varchar(20),
in in_itemid varchar(20)
)
begin
if in_catid!="" then
select *
from product p
inner join category c on (c.catid=p.catid)
where p.catid=in_catid;
end if;
if in_proid !="" then
select *
from item i
inner join product p on (i.productid=p.productid)
inner join category c on (c.catid=p.catid)
where i.productid=in_proid;
end if;
if in_itemid !="" then
select *
from item i
inner join product p on (i.productid=p.productid)
inner join category c on (c.catid=p.catid)
where i.itemid=in_itemid;
end if;
end//
DELIMITER ;
-- 导出 过程 mpet.sp_print_result 结构
DELIMITER //
CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_print_result`(
IN f_string varchar(1000),IN f_delimiter varchar(5)
)
BEGIN
-- Get the separated string.
declare cnt int default 0;
declare i int default 0;
set cnt = func_get_split_string_total(f_string,f_delimiter);
drop table if exists tmp_print;
create temporary table tmp_print (num int not null);
while i < cnt
do
set i = i + 1;
insert into tmp_print(num) values (func_get_split_string(f_string,f_delimiter,i));
end while;
select * from tmp_print;
END//
DELIMITER ;
-- 导出 过程 mpet.updateCart 结构
DELIMITER //
CREATE DEFINER=`root`@`localhost` PROCEDURE `updateCart`(IN `in_oid` INT, IN `in_itemid` CHAR(50), IN `in_qty` INT)
BEGIN
update cart c
set quantity=in_qty
where c.orderid=in_oid and
c.itemid=in_itemid;
commit;
END//
DELIMITER ;
-- 导出 过程 mpet.updateCart3 结构
DELIMITER //
CREATE DEFINER=`root`@`localhost` PROCEDURE `updateCart3`(IN `in_itemid` VARCHAR(50), IN `in_qty` INT)
BEGIN
set @oid=0;
select orderid into @oid
from orders
where orderid=(select max(orderid) from orders limit 1 );
update cart
set quantity=in_qty
where orderid=@oid and
itemid=in_itemid;
END//
DELIMITER ;
-- 导出 过程 mpet.updateCart4 结构
DELIMITER //
CREATE DEFINER=`root`@`localhost` PROCEDURE `updateCart4`(IN `in_itemid` varchar(10), IN `in_oid` int, IN `in_qty` int
)
begin
update cart set quantity=in_qty
where orderid=in_oid and itemid=in_itemid;
commit;
end//
DELIMITER ;
-- 导出 过程 mpet.updateCart5 结构
DELIMITER //
CREATE DEFINER=`root`@`localhost` PROCEDURE `updateCart5`(
in in_itemid varchar(10),
in in_oid int,
in in_qty int
)
begin
update cart
set quantity=in_qty
where orderid=in_oid and itemid=in_itemid;
end//
DELIMITER ;
-- 导出 过程 mpet.updateCart6 结构
DELIMITER //
CREATE DEFINER=`root`@`localhost` PROCEDURE `updateCart6`(IN `in_username` varchar(20), IN `in_orderid` varchar(20), IN `in_itemid` varchar(20), IN `in_qty` int
)
begin
update cart c
set quantity=in_qty
where c.orderid=in_orderid and c.itemid=in_itemid
and username=in_username;
end//
DELIMITER ;
-- 导出 过程 mpet.updateCart7 结构
DELIMITER //
CREATE DEFINER=`root`@`localhost` PROCEDURE `updateCart7`(IN `in_username` varchar(10), IN `in_itemid` varchar(10), IN `in_quantity` int(2), IN `in_orderid` int
)
begin
update cart set quantity=in_quantity
where username=in_username and
itemid=in_itemid and
orderid=in_orderid;
end//
DELIMITER ;
-- 导出 过程 mpet.updateCart8 结构
DELIMITER //
CREATE DEFINER=`root`@`localhost` PROCEDURE `updateCart8`(IN `in_username` varchar(10), IN `in_itemid` varchar(10), IN `in_quantity` int
, IN `in_orderid` INT)
begin
update cart set quantity=in_quantity
where username=in_username and
orderid=in_orderid and
itemid=in_itemid;
end//
DELIMITER ;
-- 导出 过程 mpet.updateCartB 结构
DELIMITER //
CREATE DEFINER=`root`@`localhost` PROCEDURE `updateCartB`(IN `in_olist` varchar(1000), IN `in_qlist` varchar(1000), IN `in_dlist` varchar(1000), IN `f_delimiter` varchar(5)
, OUT `out_total` FLOAT, OUT `out_oid` INT)
BEGIN
/*
in_olist-- 要分割的orderid字符串
in_qlist-- 要分割的quantity字符串
in_dlist-- 要分割的itemid字符串
f_delimiter-- 分隔符
*/
set @cnt = func_get_split_string_total(in_olist,f_delimiter);
set @i=0;
while @i < @cnt do
set @i = @i + 1;
set @orderid=0+func_get_split_string(in_olist,f_delimiter,@i);
set @itemid=func_get_split_string(in_dlist,f_delimiter,@i);
set @quantity=0+func_get_split_string(in_qlist,f_delimiter,@i);
update cart set quantity=@quantity
where orderid=@orderid
and itemid=trim(@itemid);
end while;
commit;
set out_oid:=@orderid;
-- select @cnt;
call queryCart(@orderid,out_total);
END//
DELIMITER ;
-- 导出 过程 mpet.updateOrders 结构
DELIMITER //
CREATE DEFINER=`root`@`localhost` PROCEDURE `updateOrders`(IN `in_orderid` INT, IN `in_total` FLOAT)
BEGIN
update orders
set orderdate=now() ,
totalprice=in_total
where orderid=in_orderid;
commit;
END//
DELIMITER ;
/*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */;
/*!40014 SET FOREIGN_KEY_CHECKS=IF(@OLD_FOREIGN_KEY_CHECKS IS NULL, 1, @OLD_FOREIGN_KEY_CHECKS) */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
|
CREATE TABLE [wms].[bodegas] (
[id_bodega] INT IDENTITY (1, 1) NOT NULL,
[codigo] VARCHAR (20) NOT NULL,
[nombre] VARCHAR (100) NOT NULL,
[prefijo_rutas] VARCHAR (6) NULL,
[consecutivo_rutas] INT NULL,
[id_ciudad] INT NULL,
[direccion] VARCHAR (150) NOT NULL,
[indicaciones_direccion] VARCHAR (150) NOT NULL,
[direccion_estandarizada] VARCHAR (150) NOT NULL,
[latitud] NUMERIC (18, 15) NULL,
[longitud] NUMERIC (18, 15) NULL,
[ordinal] INT NULL,
[activo] BIT NOT NULL,
[fecha_actualizacion] DATETIME2 (0) NOT NULL,
[usuario_actualizacion] VARCHAR (50) NOT NULL,
[id_centro_planeacion_ruta] INT NULL,
[maneja_renta] BIT NOT NULL,
CONSTRAINT [PK_bodegas] PRIMARY KEY CLUSTERED ([id_bodega] ASC) WITH (FILLFACTOR = 80),
CONSTRAINT [FK_bodegas_01] FOREIGN KEY ([id_centro_planeacion_ruta]) REFERENCES [cpr].[centros_planeacion_ruta] ([id_centro_planeacion_ruta]),
CONSTRAINT [FK_bodegas_02] FOREIGN KEY ([id_ciudad]) REFERENCES [geo].[ciudades] ([id_ciudad]),
CONSTRAINT [UK_bodegas_01] UNIQUE NONCLUSTERED ([nombre] ASC) WITH (FILLFACTOR = 80),
CONSTRAINT [UK_bodegas_02] UNIQUE NONCLUSTERED ([codigo] ASC) WITH (FILLFACTOR = 80)
);
|
-- phpMyAdmin SQL Dump
-- version 3.4.5
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Aug 12, 2012 at 09:09 PM
-- Server version: 5.5.16
-- PHP Version: 5.3.8
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: `widget_corp`
--
-- --------------------------------------------------------
--
-- Table structure for table `pages`
--
CREATE TABLE IF NOT EXISTS `pages` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`subject_id` int(11) NOT NULL,
`menu_name` varchar(30) NOT NULL,
`position` int(3) NOT NULL,
`visible` tinyint(1) NOT NULL,
`content` text NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ;
--
-- Dumping data for table `pages`
--
INSERT INTO `pages` (`id`, `subject_id`, `menu_name`, `position`, `visible`, `content`) VALUES
(1, 1, 'Our history', 1, 1, 'This is our history...'),
(2, 1, 'Our mission', 2, 1, 'Our corporate mission statement...'),
(3, 2, 'Widjet 2000', 1, 1, 'The Widget 2000 is a great product');
-- --------------------------------------------------------
--
-- Table structure for table `subject`
--
CREATE TABLE IF NOT EXISTS `subject` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`menu_name` varchar(30) NOT NULL,
`position` int(3) NOT NULL,
`visible` tinyint(1) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=7 ;
--
-- Dumping data for table `subject`
--
INSERT INTO `subject` (`id`, `menu_name`, `position`, `visible`) VALUES
(1, 'About Widjet Corp', 1, 1),
(2, 'Project', 2, 1),
(3, 'Blog', 3, 1),
(4, 'Tools', 4, 1),
(5, 'Education', 5, 1),
(6, 'Contact', 6, 1);
-- --------------------------------------------------------
--
-- Table structure for table `users`
--
CREATE TABLE IF NOT EXISTS `users` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`username` varchar(50) NOT NULL,
`hashed_password` varchar(40) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
/*!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 */;
|
CREATE TABLE DEPT (
DNAME VARCHAR(10) NOT
NULL, DNUMBER INTEGER
NOT NULL, MGRSSN
CHAR(9), MGRSTARTDATE
CHAR(9), PRIMARY KEY
(DNUMBER), UNIQUE
(DNAME),
FOREIGN KEY (MGRSSN) REFERENCES EMP(SSN));
INSERT ALL
INTO Emps VALUES(100, 'Steven','King', 'SKING','515.123.4567', '17-JUN-2006',
'AD_PRESS',24000, NULL, NULL, 90)
INTO Emps VALUES(101, 'Neena','Kochar', 'NKOCHAR','515.123.4568', '21-SEP-
2008', 'AD_VP',17000, NULL, 100, 90)
INTO Emps VALUES(102, 'Lex','De Haan', 'DEHAAN','515.123.4569', '13-JAN-2009',
'AD_VP',17000, NULL, 100, 90)
INTO Emps VALUES(103, 'Alexander','Hunold', 'AHUNOLD','590.423.4567', '03-JAN-
2008', 'IT_PROG',9000,NULL, 102, 60)
INTO Emps VALUES(104, 'Bruce','Ernst', 'BERNST','590.423.4568', '21-MAY-2009',
'IT_PROG',6000,NULL, 103, 60)
INTO Emps VALUES(107, 'Diana','Lorentz', 'DLORENTZ','590.423.5567', '07-FEB-
2008', 'IT_PROG',4200,NULL, 103, 60)
INTO Emps VALUES(124, 'Kevin','Mourgos', 'KMORGOS','650.123.5234', '16-NOV-
2012', 'ST_MAN',5800,NULL, 100, 50)
INTO Emps VALUES(141, 'Treena','Rajs', 'RRAJS','650.121.5234', '17-OCT-2004',
'ST_CLERK',3500,NULL, 124, 50)
INTO Emps VALUES(142, 'Curtis','Davies', 'CDAVIES','121.123.5234', '29-JAN-2007',
'ST_CLERK',3100,NULL, 124, 50)
INTO Emps VALUES(143, 'Randall','Matos', 'RMATOS','121.123.5234', '15-MAR-2008',
'ST_CLERK',2600,NULL, 124, 50)
INTO Emps VALUES(144, 'Peter','Vargas', 'PVARGAS','121.123.5234', '09-JUL-2008',
'ST_CLERK',2500,NULL, 124, 50)
INTO Emps VALUES(149, 'Eleni','Zlotkey', 'EZLOTKEY','44.1344.429018', '29-JAN-
2014', 'SA_MAN',10500,.2, 100, 80)
INTO Emps VALUES(174, 'Ellen','Abel', 'EABEL','44.1644.429017', '11-MAY-2004',
'SA_REP',11000,.3, 149, 80)
INTO Emps VALUES(176, 'Jnathon','Taylor', 'JTAILOR','44.1644.429021', '24-MAR-
2008', 'SA_MAN',8600,.2, 149, 80)
INTO Emps VALUES(178, 'Kimberely','Grant', 'KGRANT','44.1644.429023', '24-MAY-
2009', 'SA_MAN',7000,.15, 149, NULL)
INTO Emps VALUES(200, 'Jennifer','Whalem', 'JWHALEN','515.123.4444', '17-SEP-
2003', 'ADD_ASST',4400,NULL, 101, 10)
INTO Emps VALUES(201, 'Michael','Hartstein', 'MHARSTEIN','515.123.5555', '17-FEB-
2008', 'MK_MAN',13000,NULL, 100, 20)
INTO Emps VALUES(202, 'Pat','Fay','PFAY','603.123.6666', '17-AUG-2010',
'MK_REP',6000,NULL, 201, 20)
INTO Emps VALUES(205, 'Shelley','Higgins', 'SHIGGINS','515.123.8050', '07-JUN-
2007', 'AC_MGR',12000,NULL, 101, 110)
INTO Emps VALUES(206, 'William','Gietz', 'WGIETZ','515.123.8181', '07-JUN-2007',
'AC_ACCOUNT',8300,NULL, 205, 110)
SELECT * FROM dual; |
SELECT
--A.交易方代码
A.CUSTOMER_CODE,
--C.交易方名称
C.CUSTOMER_ABBR_NAME AS CUSTOMER_NAME,
--A.决算月度
SUBSTRING(A.SETTLEMENT_MONTH,1,4)+'/'+SUBSTRING(A.SETTLEMENT_MONTH,5,6) AS SETTLEMENT_MONTH,
--A.报表频率
A.REPORT_FREQUENCY,
--E.报表频率名
E.CODE_NAME AS REPORT_FREQUENCY_NAME,
--A.报表数据来源
A.REPORT_DATA_SOURCE,
--F.报表数据来源名称
F.CODE_NAME AS REPORT_DATA_SOURCE_NAME,
--B.作废标志
B.DELETE_FLG,
--G.作废标志
G.CODE_NAME AS DELETE_FLG_NAME,
--A.是否经过审计
A.REPORT_AUDIT_FLAG,
--H.是否经过审计名称
H.CODE_NAME AS REPORT_AUDIT_FLAG_NAME,
--A.审计事务所名称
A.REPORT_AUDIT_FIRMS,
--A.审计日期
A.REPORT_AUDIT_DATE,
--A.审计意见
A.REPORT_AUDIT_OPINION,
--A.审计事务所营业执照号
A.REPORT_AUDIT_FIRMS_LICENSE_NUMBER,
--A.录入年月日
A.REG_DATE,
--A.录入者
A.REG_USER,
--D.用户名 AS 录入者名
D.USER_NAME AS REG_USER_NAME,
--A.调整理由
A.ADJUSTED_MEMO,
--A.调整担当者
J.USER_NAME AS ADJUSTMENT_USER_ID,
--A.调整日期
A.ADJUSTED_DATE,
--A.履历号 AS 导入履历号
A.SEQ_NO AS I_SEQ_NO,
--A.币种
A.CURRENCY_ID,
--A.汇率
A.EXCHANGE_RATE,
--A.会計通貨
A.ACCOUNTING_CURRENCY,
--B.新規日付/更新日付
B.MODIFY_DATE
FROM
--财务报表摘要_实际(A)
FINANCIAL_STATEMENTS_SUMMARY_ACTUAL A
INNER JOIN
--财务报表摘要暨导入履历(B)
FINANCIAL_STATEMENTS_IMPORT B
ON
--财务报表摘要_实际.履历号. = 财务报表摘要暨导入履历.履历号.
A.SEQ_NO = B.SEQ_NO
INNER JOIN
--CodeMaster(G)
CODE_MASTER G
ON
--财务报表摘要_实际.作废标志 = G.Code值(+)
B.DELETE_FLG = G.CODE_ID
AND
--AND G.Code类型 = '352'
G.CODE_TYPE = /*reportInvalidFlg*/'352'
AND
--AND G.国ID = 参数:当前用户国家代码
G.COUNTRY_ID = /*dto.countryId*/'81'
INNER JOIN
--CodeMaster(E)
CODE_MASTER E
ON
--财务报表摘要_实际.报表频率 = E.Code值(+)
A.REPORT_FREQUENCY = E.CODE_ID
AND
--AND E.Code类型 = '343'
E.CODE_TYPE = /*codeType*/'343'
AND
--AND D.国ID = 参数:当前用户国家代码
E.COUNTRY_ID = /*dto.countryId*/'81'
INNER JOIN
--CodeMaster(F)
CODE_MASTER F
ON
--财务报表摘要_实际.报表数据来源 = F.Code值(+)
A.REPORT_DATA_SOURCE = F.CODE_ID
AND
--AND F.Code类型 = '350'
F.CODE_TYPE = /*reportDataSource*/'350'
AND
--AND F.国ID = 参数:当前用户国家代码
F.COUNTRY_ID = /*dto.countryId*/'81'
INNER JOIN
--CodeMaster(H)
CODE_MASTER H
ON
--财务报表摘要_实际.是否经过审计 = H.Code值(+)
A.REPORT_DATA_SOURCE = H.CODE_ID
AND
--AND H.Code类型 = '351'
H.CODE_TYPE = /*reportAuditFlag*/'351'
AND
--AND H.国ID = 参数:当前用户国家代码
H.COUNTRY_ID = /*dto.countryId*/'81'
INNER JOIN
--交易方信息(C)
CUSTOMER_MST C
ON
--A.交易方代码 = C.交易方代码
A.CUSTOMER_CODE = C.CUSTOMER_CODE
INNER JOIN
--用户信息(D)
LEASE_USER D
ON
--A.录入者ID. = D.用户ID.
A.REG_USER = D.USER_ID
LEFT JOIN
--用户信息(J)
LEASE_USER J
ON
--A.录入者ID. = J.用户ID.
A.ADJUSTMENT_USER = J.USER_ID
WHERE
--A.调整履历No. = 参数.履历号
A.ADJUST_SEQ_NO = /*dto.seqNo*/''
|
-- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Feb 18, 2019 at 03:33 PM
-- Server version: 10.1.28-MariaDB
-- PHP Version: 5.6.32
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: `kfirshop`
--
-- --------------------------------------------------------
--
-- Table structure for table `carts`
--
CREATE TABLE `carts` (
`id` int(11) NOT NULL,
`cartId` varchar(100) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
`products` varchar(10000) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table `orders`
--
CREATE TABLE `orders` (
`id` int(11) NOT NULL,
`date` date NOT NULL,
`name` varchar(50) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
`email` varchar(200) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
`address` varchar(1000) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
`phone` varchar(30) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
`products` varchar(10000) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `orders`
--
INSERT INTO `orders` (`id`, `date`, `name`, `email`, `address`, `phone`, `products`) VALUES
(2, '0000-00-00', 'Olga', 'email@mail.com', '1 Street St.', '05454545454', '[{\"id\":3,\"name\":\"שוקולד\",\"price\":10,\"img\":\"chocolate.jpg\",\"category\":\"sweets\",\"quantity\":4}]'),
(3, '0000-00-00', 'o', 'email@mail.com', '', '05454545454', '[{\"id\":7,\"name\":\"עיתון\",\"price\":20,\"img\":\"newspaper.jpg\",\"category\":\"others\",\"quantity\":1}]');
-- --------------------------------------------------------
--
-- Table structure for table `products`
--
CREATE TABLE `products` (
`id` int(11) NOT NULL,
`name` varchar(100) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
`price` int(11) NOT NULL,
`img` text NOT NULL,
`category` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `products`
--
INSERT INTO `products` (`id`, `name`, `price`, `img`, `category`) VALUES
(1, 'קפה', 10, 'coffee.jpg', 'drinks'),
(2, 'סודה', 7, 'coke.jpg', 'drinks'),
(3, 'שוקולד', 10, 'chocolate.jpg', 'sweets'),
(4, 'גלידה', 15, 'icecream.jpg', 'sweets'),
(5, 'סיגריות', 25, 'cigarettes.jpg', 'smokes'),
(6, 'מצית', 10, 'lighter.jpg', 'smokes'),
(7, 'עיתון', 20, 'newspaper.jpg', 'others');
-- --------------------------------------------------------
--
-- Table structure for table `users`
--
CREATE TABLE `users` (
`id` int(11) NOT NULL,
`username` varchar(20) NOT NULL,
`password` varchar(50) NOT NULL,
`email` varchar(200) NOT NULL,
`tz` int(15) NOT NULL,
`name` varchar(50) NOT NULL,
`city` varchar(50) NOT NULL,
`street` varchar(200) NOT NULL,
`role` varchar(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `users`
--
INSERT INTO `users` (`id`, `username`, `password`, `email`, `tz`, `name`, `city`, `street`, `role`) VALUES
(1, 'admin', '123', 'admin@theshop.io', 123456789, 'Dan', 'London', 'Allenby', 'admin'),
(2, 'user', '123', 'firstuser@theshop.io', 987654321, 'Kate', 'Hogwarts', 'Ben Yehuda', 'user'),
(3, 'cat', 'hhh', 'cat@me.ow', 1234, 'Tom', 'The Burrow', 'Fluff Street', 'user'),
(4, 'dog', '123', 'dog@bark.co', 555, 'Rex', 'Little Hangleton', 'Queen Street', 'user');
--
-- Indexes for dumped tables
--
--
-- Indexes for table `carts`
--
ALTER TABLE `carts`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `orders`
--
ALTER TABLE `orders`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `products`
--
ALTER TABLE `products`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `users`
--
ALTER TABLE `users`
ADD PRIMARY KEY (`id`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `carts`
--
ALTER TABLE `carts`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `orders`
--
ALTER TABLE `orders`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
--
-- AUTO_INCREMENT for table `products`
--
ALTER TABLE `products`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;
--
-- AUTO_INCREMENT for table `users`
--
ALTER TABLE `users`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
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 */;
|
INSERT INTO PRICE (id, value, PRODUCT_ID) VALUES (1, 1000, 1);
INSERT INTO PRICE (id, value, PRODUCT_ID) VALUES (2, 2000, 2);
INSERT INTO PRICE (id, value, PRODUCT_ID) VALUES (3, 3000, 3);
INSERT INTO PRICE (id, value, PRODUCT_ID) VALUES (4, 4000, 4);
INSERT INTO PRICE (id, value, PRODUCT_ID) VALUES (5, 5000, 5);
INSERT INTO PRICE (id, value, PRODUCT_ID) VALUES (6, 6000, 6);
INSERT INTO PRICE (id, value, PRODUCT_ID) VALUES (7, 7000, 7);
INSERT INTO PRICE (id, value, PRODUCT_ID) VALUES (8, 8000, 8);
INSERT INTO PRICE (id, value, PRODUCT_ID) VALUES (9, 9000, 9);
INSERT INTO PRICE (id, value, PRODUCT_ID) VALUES (10, 10000, 10);
INSERT INTO PRICE (id, value, PRODUCT_ID) VALUES (11, 11000, 11);
INSERT INTO PRICE (id, value, PRODUCT_ID) VALUES (12, 12000, 12);
|
drop table ORDER_TITLE;
|
CREATE TABLE userData (
id INT IDENTITY(1,1) NOT NULL,
name NVARCHAR(20) NOT NULL,
[value] NVARCHAR(20) NULL,
CONSTRAINT prim_userData PRIMARY KEY CLUSTERED ([id] ASC)
);
|
CREATE TABLE controle_sequencia (
codigo VARCHAR(20),
numero_factura BIGINT,
numero_cotacao BIGINT,
numero_entrada BIGINT,
numero_proforma BIGINT,
ano DATE,
PRIMARY KEY(codigo)
);
|
-- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Apr 26, 2021 at 01:22 PM
-- Server version: 10.4.18-MariaDB
-- PHP Version: 8.0.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_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: `uts_xml`
--
-- --------------------------------------------------------
--
-- Table structure for table `buku`
--
CREATE TABLE `buku` (
`id_buku` int(11) NOT NULL,
`judul` varchar(50) NOT NULL,
`penulis` varchar(35) NOT NULL,
`tahun_terbit` varchar(4) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `buku`
--
INSERT INTO `buku` (`id_buku`, `judul`, `penulis`, `tahun_terbit`) VALUES
(1, 'Masih Belajar', 'Iman Usman', '2018'),
(2, 'Seni Untuk Bersikap Bodoh', 'Mark Manson', '2018'),
(3, 'Minimalsm', 'Sinab ', '2020'),
(4, 'Gramedia', 'PT', '2000'),
(5, 'Kilauan Senja', 'Rania', '2016'),
(6, 'Clover', 'Ashaima-va', '2017');
--
-- Indexes for dumped tables
--
--
-- Indexes for table `buku`
--
ALTER TABLE `buku`
ADD PRIMARY KEY (`id_buku`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `buku`
--
ALTER TABLE `buku`
MODIFY `id_buku` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13;
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 */;
|
# Write your MySQL query statement below
SELECT tempTable.Email
FROM
(SELECT Email,COUNT(Id) AS cnt
FROM Person
GROUP BY Email) AS tempTable
WHERE tempTable.cnt > 1
|
insert into exchange_value(id,currency_from,currency_to,conversion_multiple,port)
values(10001,'USD','KES',100,0);
insert into exchange_value(id,currency_from,currency_to,conversion_multiple,port)
values(10002,'EUR','KES',110,0);
insert into exchange_value(id,currency_from,currency_to,conversion_multiple,port)
values(10003,'AUD','KES',70,0); |
CREATE DATABASE ejercicio_5;
USE ejercicio_5;
CREATE TABLE countries (
id INT(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY,
population INT(10),
name VARCHAR(100) NOT NULL,
alpha_3_code VARCHAR(10) NOT NULL,
capital VARCHAR(50) NOT NULL,
region VARCHAR(50) NOT NULL,
subregion VARCHAR(50) NOT NULL,
flag VARCHAR(250) NOT NULL
) |
CREATE TABLE Passports (
PassportID INT NOT NULL IDENTITY(101, 1),
PassportNumber CHAR(8) NOT NULL
CONSTRAINT PK_Passports PRIMARY KEY (PassportID)
)
CREATE TABLE Persons (
PersonID INT NOT NULL IDENTITY(1, 1),
FirstName NVARCHAR(30) NOT NULL,
Salary DECIMAL(8,2) NOT NULL,
PassportID INT NOT NULL,
CONSTRAINT PK_Persons PRIMARY KEY(PersonID),
CONSTRAINT FK_Persons_Passports FOREIGN KEY (PassportID) REFERENCES Passports(PassportID)
)
INSERT INTO Passports
VALUES ('N34FG21B'),
('K65LO4R7'),
('ZE657QP2')
INSERT INTO Persons
VALUES('Roberto', 43300.00, 102),
('Tom', 56100, 103),
('Yana', 60200.00, 101)
--SELECT * FROM Persons as p
--JOIN Passports as pa
--ON p.PassportID = pa.PassportID |
-- Count number of users with yahoo emails.
SELECT COUNT(*) AS yahoo_users FROM users WHERE email LIKE '%yahoo.com'; |
CREATE USER 'root'@'%' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION;
FLUSH PRIVILEGES;
CREATE DATABASE db;
USE db;
CREATE TABLE IF NOT EXISTS center_info(
id INT,
name VARCHAR(40),
address TEXT,
state_name VARCHAR(16),
district_name VARCHAR(16),
pincode INT,
PRIMARY KEY(id)
);
CREATE TABLE IF NOT EXISTS appointment_session(
id BINARY(36),
center_idfk INT,
date VARCHAR(16),
available_capacity INT,
min_age_limit INT,
vaccine VARCHAR(16),
available_capacity_dose1 INT,
available_capacity_dose2 INT,
PRIMARY KEY(id),
FOREIGN KEY (center_idfk)
REFERENCES center_info(id)
ON DELETE CASCADE
); |
/*==============================================================*/
/* Table: PUB_SEQ_NO */
/*==============================================================*/
create table PUB_SEQ_NO
(
TYPE VARCHAR2(2) not null,
ID NUMBER,
DATETIME TIMESTAMP(6),
constraint PK_PUB_SEQ_NO primary key (TYPE)
);
comment on table PUB_SEQ_NO is
'平台序号服务表';
comment on column PUB_SEQ_NO.TYPE is
'类型';
comment on column PUB_SEQ_NO.ID is
'序号ID';
comment on column PUB_SEQ_NO.DATETIME is
'时间戳';
/*==============================================================*/
/* Table: PUB_LOCK_CTL */
/*==============================================================*/
create table PUB_LOCK_CTL
(
RES_ID VARCHAR2(40) not null,
LOCK_TIME TIMESTAMP(6),
RLS_TIME TIMESTAMP(6),
constraint PK_PUB_LOCK_CTL primary key (RES_ID)
);
comment on table PUB_LOCK_CTL is
'平台锁资源控制表';
comment on column PUB_LOCK_CTL.RES_ID is
'资源ID';
comment on column PUB_LOCK_CTL.LOCK_TIME is
'加锁时间';
comment on column PUB_LOCK_CTL.RLS_TIME is
'释放时间';
/*==============================================================*/
/* Table: PUB_REQUEST_JOURNAL */
/*==============================================================*/
create table PUB_REQUEST_JOURNAL
(
JRN_NO VARCHAR2(20) not null,
APP_REQ_NO VARCHAR2(50),
REQ_DATE VARCHAR2(8),
BEG_TIME VARCHAR2(6),
END_TIME VARCHAR2(6),
TIME_DUR VARCHAR2(10),
BIZ_CODE VARCHAR2(10),
SOURCE VARCHAR2(10),
IP_ADR VARCHAR2(20),
USER_INFO VARCHAR2(200),
RSP_CODE VARCHAR2(20),
RSP_MSG VARCHAR2(512),
CREATE_TIME TIMESTAMP(6),
constraint PK_PUB_REQUEST_JOURNAL primary key (JRN_NO)
);
comment on table PUB_REQUEST_JOURNAL is
'平台请求流水表';
comment on column PUB_REQUEST_JOURNAL.JRN_NO is
'流水号';
comment on column PUB_REQUEST_JOURNAL.APP_REQ_NO is
'应用请求流水号';
comment on column PUB_REQUEST_JOURNAL.REQ_DATE is
'请求日期';
comment on column PUB_REQUEST_JOURNAL.BEG_TIME is
'请求开始时间';
comment on column PUB_REQUEST_JOURNAL.END_TIME is
'请求结束时间';
comment on column PUB_REQUEST_JOURNAL.TIME_DUR is
'交易耗时';
comment on column PUB_REQUEST_JOURNAL.BIZ_CODE is
'业务代码';
comment on column PUB_REQUEST_JOURNAL.SOURCE is
'交易来源';
comment on column PUB_REQUEST_JOURNAL.IP_ADR is
'IP地址';
comment on column PUB_REQUEST_JOURNAL.USER_INFO is
'用户信息';
comment on column PUB_REQUEST_JOURNAL.RSP_CODE is
'返回码';
comment on column PUB_REQUEST_JOURNAL.RSP_MSG is
'返回信息';
comment on column PUB_REQUEST_JOURNAL.CREATE_TIME is
'创建时间戳';
/*==============================================================*/
/* Index: INDEX_PUB_REQUEST_APPREQNO */
/*==============================================================*/
create index INDEX_PUB_REQUEST_APPREQNO on PUB_REQUEST_JOURNAL (
APP_REQ_NO ASC,
SOURCE ASC
);
/*==============================================================*/
/* Table: PUB_SERVICE_INFO */
/*==============================================================*/
create table PUB_SERVICE_INFO
(
BIZ_CODE VARCHAR2(10) not null,
BIZ_NAME VARCHAR2(60) not null,
STATUS CHAR(1) not null,
CREATE_TIME TIMESTAMP(6) not null,
constraint PK_PUB_SERVICE_INFO primary key (BIZ_CODE)
);
comment on table PUB_SERVICE_INFO is
'接口服务信息表';
comment on column PUB_SERVICE_INFO.BIZ_CODE is
'服务代码/业务代码';
comment on column PUB_SERVICE_INFO.BIZ_NAME is
'接口服务名称';
comment on column PUB_SERVICE_INFO.STATUS is
'状态:0-无效,1-有效';
comment on column PUB_SERVICE_INFO.CREATE_TIME is
'创建时间戳';
/*==============================================================*/
/* Table: PUB_CHANNEL_INFO */
/*==============================================================*/
create table PUB_CHANNEL_INFO
(
CHANNEL_ID VARCHAR2(15) not null,
SOURCE VARCHAR2(10) not null,
IP VARCHAR2(20) not null,
CHANNEL_DESC VARCHAR2(60),
STATUS CHAR(1) not null,
CREATE_TIME TIMESTAMP(6) not null,
constraint PK_PUB_CHANNEL_INFO primary key (CHANNEL_ID)
);
comment on table PUB_CHANNEL_INFO is
'渠道信息表';
comment on column PUB_CHANNEL_INFO.CHANNEL_ID is
'渠道ID:渠道来源+序号';
comment on column PUB_CHANNEL_INFO.SOURCE is
'渠道来源:cbs-CBS,asp-统一应用服务平台,sys-系统';
comment on column PUB_CHANNEL_INFO.IP is
'IP地址';
comment on column PUB_CHANNEL_INFO.CHANNEL_DESC is
'渠道描述';
comment on column PUB_CHANNEL_INFO.STATUS is
'状态:0-无效,1-有效';
comment on column PUB_CHANNEL_INFO.CREATE_TIME is
'创建时间戳';
/*==============================================================*/
/* Table: PUB_GROUP_INFO */
/*==============================================================*/
create table PUB_GROUP_INFO
(
GROUP_ID INTEGER not null,
GROUP_NAME VARCHAR2(60) not null,
STATUS CHAR(1) not null,
CREATE_TIME TIMESTAMP(6) not null,
constraint PK_PUB_GROUP_INFO primary key (GROUP_ID)
);
comment on table PUB_GROUP_INFO is
'组别信息表';
comment on column PUB_GROUP_INFO.GROUP_ID is
'组别ID';
comment on column PUB_GROUP_INFO.GROUP_NAME is
'组别名称';
comment on column PUB_GROUP_INFO.STATUS is
'状态:0-无效,1-有效';
comment on column PUB_GROUP_INFO.CREATE_TIME is
'创建时间戳';
/*==============================================================*/
/* Table: PUB_CHANNEL_GROUP */
/*==============================================================*/
create table PUB_CHANNEL_GROUP
(
CHANNEL_ID VARCHAR2(12) not null,
GROUP_ID INTEGER not null,
STATUS char(1) not null,
constraint PK_PUB_CHANNEL_GROUP primary key (CHANNEL_ID, GROUP_ID)
);
comment on table PUB_CHANNEL_GROUP is
'渠道组别关系表';
comment on column PUB_CHANNEL_GROUP.CHANNEL_ID is
'渠道ID';
comment on column PUB_CHANNEL_GROUP.GROUP_ID is
'组别ID';
comment on column PUB_CHANNEL_GROUP.STATUS is
'状态:0-无效,1-有效';
/*==============================================================*/
/* Table: PUB_GROUP_SERVICE */
/*==============================================================*/
create table PUB_GROUP_SERVICE
(
GROUP_ID INTEGER not null,
BIZ_CODE VARCHAR2(10) not null,
constraint PK_PUB_GROUP_SERVICE primary key (GROUP_ID, BIZ_CODE)
);
comment on table PUB_GROUP_SERVICE is
'组别服务关系表';
comment on column PUB_GROUP_SERVICE.GROUP_ID is
'服务ID';
comment on column PUB_GROUP_SERVICE.BIZ_CODE is
'服务代码/业务代码';
/*==============================================================*/
/* SEQUENCE: PUB_SEQUENCE */
/*==============================================================*/
create sequence PUB_SEQUENCE
increment by 1
start with 1
maxvalue 9999999
minvalue 1
cycle
cache 20;
|
-- part 1
--1
/*
View is a kind of virtual tables, A view also has rows and columns as they are in a real
table in the database. And a view can be created by selecting fields from one or more tabes
present in the database. A view can either have all the rows of a table or specific rows based
on certain condition.
The benefits are that:
(1) retricting data access
views provide an additional level of table secutrity by restricting access to a
predetermined set of rows and columns of a table
(2) Hiding data complexity
a view can hide the complexity taht exists in a multiple table join
(3)simplify commands for the user
views allow the user to select information from multiple tables without requiring the user
to actually know how to perform a join
(4)store complex queries
views can be used to store complex queries
(5)rename columns
views can also be used to rename the columns without affecting the base tables provided the
number of columns in view must match the number of columns specified in select statement.
Thus, renaming helps to hide the names of the columns of the base tables
(6)muliple view facility
different views can be created on the same table for different users
*/
--2
/*
Yes, usng transact sql
*/
--3
/*
Stored procedure is a batch of statements grouped as a logical unit and stored dataset.
It accepts the parameters and executes the T-sql statment in the procedure.
(1)It can be easily modified.We can easily modify the code inside the stored procedure
without the need to restart or deploying the application.
(2)Reduced network traffic: When we use stored procedures instead of writing T-SQL queries at
the application level, only the procedure name is passed over the network instead of the
whole T-SQL code.
(3)Reusable: Stored procedures can be executed by multiple users or multiple client applications
without the need of writing the code again.
(4)Security: Stored procedures reduce the threat by eliminating direct access to the tables.
we can also encrypt the stored procedures while creating them so that source code inside
the stored procedure is not visible.
(5)Performance: The SQL Server stored procedure when executed for the first time creates a plan
and stores it in the buffer pool so that the plan can be reused when it executes next time.
*/
--4
/*
Stored procedure:
accepts parameter
can not be used as building block in a larger query
can contain serveral statements, loop, if else, etc
can not be used as the target of insert, update, delete statement
view:
does not accept parameter
can be used as building block in a larger query
can contain only one select statment
can be used as the target of insert, update, delete
*/
--5
/*
- The function must return a value but in Stored Procedure it is optional. Even a procedure can
return zero or n values.
- Functions can have only input parameters for it whereas Procedures can have input or output parameters.
- Functions can be called from Procedure whereas Procedures cannot be called from a Function.
- The procedure allows SELECT as well as DML(INSERT/UPDATE/DELETE) statement in it whereas Function allows
only SELECT statement in it.
- Procedures cannot be utilized in a SELECT statement whereas Function can be embedded in a SELECT statement.
- Stored Procedures cannot be used in the SQL statements anywhere in the WHERE/HAVING/SELECT section whereas
Function can be.
- Functions that return tables can be treated as another rowset. This can be used in JOINs with other tables.
- Inline Function can be though of as views that take parameters and can be used in JOINs and other Rowset operations.
- An exception can be handled by try-catch block in a Procedure whereas try-catch block cannot be used in a Function.
- We can use Transactions in Procedure whereas we can't use Transactions in Function.
*/
--6
/*
Yes
You can call an existing stored procedure using the CallableStatement. The prepareCall() method of the Connection
interface accepts the procedure call in string format and returns a callable statement
object.
CallableStatement cstmt = con.prepareCall("{call sampleProcedure()}");
Execute the above created callable statement using the executeQuery() method this returns a
result set object.
ResultSet rs1 = cstmt.executeQuery();
If this procedure returns more result-set objects move to the next result-set using the
cstmt.getMoreResults() method.
And then, retrieve the next result-set using the getResultSet() method of the
CallableStatement interface.
ResultSet rs2 = cstmt.getResultSet();
*/
--7
/*
No.
stored procedure cannot return a value
*/
--8
/*
A trigger is a special type of stored procedure that automatically runs when an event
occurs in the database server.
it includes DML, DDL, and Logon trigger.
*/
--9
/*
DML triggers run when a user tries to modify data through a data manipulation language (DML)
event. DML events are INSERT, UPDATE, or DELETE statements on a table or view. These
triggers fire when any valid event fires, whether table rows are affected or not.
DDL triggers run in response to a variety of data definition language (DDL) events.
These events primarily correspond to Transact-SQL CREATE, ALTER, and DROP statements,
and certain system stored procedures that perform DDL-like operations.
Logon triggers fire in response to the LOGON event that's raised when a user's session
is being established. You can create triggers directly from Transact-SQL statements or
from methods of assemblies that are created in the Microsoft .NET Framework common
language runtime (CLR) and uploaded to an instance of SQL Server. SQL Server lets you
create multiple triggers for any specific statement.
*/
--10
/*
Triggers cannot be manually executed by the user.
There is no chance for triggers to receive parameters.
You cannot commit or rollback a transaction inside a trigger.
*/
--part 2
--1
-- do not know how to lock and unlock table
insert into Region values (5, 'Middle Earth')
insert into Territories values (87654, 'Gondor', 5)
insert into Employees values (10, 'King', 'Aragorn', 'Sales Representative',
'Mr.', '1960-05-29 00:00:00.000', '1994-01-02 00:00:00.000', 'Edgeham Hollow
Winchester Way', 'Melad', 'Middle Earth', '12345', 'Middle Earth', '(206) 555-1189',
'2344', null, 'description', 2, null)
insert into EmployeeTerritories values (10, 5)
--2
update Territories set TerritoryDescription = 'Arnor' where TerritoryID = 87654
--3
delete from Employees where Region = 'Middle Earth'
delete from EmployeeTerritories where TerritoryID = 5
delete from Territories where RegionID = 5
delete from Region where RegionID = 5
--4
create view view_product_order_fang as
select p.ProductID, p.ProductName, p.UnitsOnOrder
from Products p
--5
create procedure sp_product_order_quantity_fang @productid int
as
select d.ProductID, count(d.OrderID)
from [Order Details] d
where d.ProductID = @productid
group by d.ProductID
execute sp_product_order_quantity_fang @productid = 10250
--6
create procedure sp_product_order_city_fang @ProductName nvarchar(20)
as
select top 5 o.ShipCity, sum(d.Quantity)
from Orders o inner join [Order Details] d
on o.OrderID = d.OrderID
inner join Products p
on d.ProductID = p.ProductID
where p.ProductName = @ProductName
group by o.ShipCity
execute sp_product_order_city_fang @ProductName = 'NuNuCa Nuß-Nougat-Creme'
--7
--need to take the lesson about stored procedure and function
create procedure sp_move_employees_fang
as
select e.EmployeeID
from Employees e inner join EmployeeTerritories t
on e.EmployeeID = t.EmployeeID
inner join Territories te
on t.TerritoryID = te.TerritoryID
where te.TerritoryDescription = 'Tory'
--8
--need to take the lesson about trigger
--9
create table city_fang (Id int, City varchar(20))
create table people_fang (Id int, pname varchar(20), CityId int)
insert into city_fang values (1, 'Seattle')
insert into city_fang values (2, 'Green Bay')
insert into people_fang values (1, 'Aaron Rodgers', 2)
insert into people_fang values (2, 'Russell Wilson', 1)
insert into people_fang values (3, 'Jody Nelson', 2)
insert into city_fang values (3, 'Madison')
update people_fang set CityId = 3
where CityId = 1
delete from city_fang where City = 'Seattle'
create view Packers_fang
as
select p.Id, p.pname, p.CityId
from people_fang p
where CityId = 3
drop view Packers_fang
drop table people_fang
drop table city_fang
--10
create procedure sp_birthday_employees_fang
as
create table birthday_employees_fang (id int, ename varchar(20), birthdaydate datetime)
insert into birthday_employees_fang values (1, 'Kate', '1990-04-28')
insert into birthday_employees_fang values (2, 'Karen', '1992-02-28')
insert into birthday_employees_fang values (3, 'Smith', '1991-05-28')
insert into birthday_employees_fang values (4, 'Jake', '1990-04-02')
drop table birthday_employees_fang
--11
create procedure sp_fang_1
as
select City
from (
select customerID, City from Customers where
customerid not in
(select CustomerID from Orders group by CustomerID having count(OrderID) > 1)
)dt
group by City
having Count(CustomerID) >=2
--not sure how to do it without subquery
create procedure sp_fang_2
as
select distinct c.City, c.CustomerID
from Customers c
except
select c.City, c.CustomerID
from customers c inner join Orders o
on c.CustomerID = o.CustomerID
group by c.CustomerID
having count(o.OrderID) > 1
--12
/*
using except clause
SELECT * FROM table1
EXCEPT
SELECT * FROM table2
SELECT * FROM table2
EXCEPT
SELECT * FROM table1
*/
--14
select t.FirstName + t.LastName as "Full Name"
from testtable
where t.MiddleName is null
union
select t.FirstName + t.LastName + t.MiddleName + '.'
from testtable
where t.MiddleName is not null
--15
select top 1 marks
from testtable
where sex = 'F'
order by marks
--16
select student, marks, sex
from testtable
order by sex, marks
|
-- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Nov 07, 2018 at 05:25 AM
-- Server version: 5.7.18-0ubuntu0.16.04.1
-- PHP Version: 7.0.18-0ubuntu0.16.04.1
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-information-db`
--
-- --------------------------------------------------------
--
-- Table structure for table `announcements`
--
CREATE TABLE `announcements` (
`id` int(10) UNSIGNED NOT NULL,
`priority_id` int(11) NOT NULL,
`title` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`date_start` date NOT NULL,
`date_end` date NOT NULL,
`message` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`publish_status` tinyint(1) NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `announcements`
--
INSERT INTO `announcements` (`id`, `priority_id`, `title`, `date_start`, `date_end`, `message`, `publish_status`, `created_at`, `updated_at`) VALUES
(1, 0, 'TEST 321', '2018-09-01', '2018-09-30', 'the quick brown fox jumps over the lazy dog.', 1, '2018-09-01 02:24:16', NULL),
(2, 0, 'SAMPLE', '2018-09-03', '2018-09-08', 'lorem ipsum dolor with the quick brown fox jumps over the lazy dog.', 1, '2018-09-01 02:28:11', NULL),
(3, 0, '7 ELEVEN', '2018-09-24', '2018-09-25', 'FOR TESTING PURPOSE', 1, '2018-09-01 05:54:03', NULL);
-- --------------------------------------------------------
--
-- Table structure for table `credentials`
--
CREATE TABLE `credentials` (
`id` int(11) UNSIGNED NOT NULL,
`name` varchar(50) NOT NULL DEFAULT '0',
`description` varchar(50) DEFAULT NULL,
`date_created` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`date_modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`created_by` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `credentials`
--
INSERT INTO `credentials` (`id`, `name`, `description`, `date_created`, `date_modified`, `created_by`) VALUES
(1, 'BIRTH CERTIFICATE', 'Photocopy of NSO Certified Birth Certificate', '2018-09-14 16:50:55', '2018-09-14 17:10:04', 0),
(2, 'REPORT CARD', 'Photocopy of Report Card (Form 138)', '2018-09-14 16:51:05', '2018-09-14 17:09:52', 0),
(3, 'ID PHOTO', '2 pcs 1\" x 1\" ID Photo', '2018-09-14 17:08:20', '2018-09-14 17:10:11', 0),
(4, 'DOCTOR\'S CERTIFICATE', 'Doctor\'s Certificate of Good Health', '2018-09-14 17:09:38', '2018-09-14 17:10:16', 0),
(5, 'DEMO CREDENTIAL', 'The quick brown fox jumps over the lazy dog.', '2018-09-14 20:35:17', '2018-09-14 20:35:17', 0),
(6, 'NEW DEMO CREDENTIAL', 'adasdasdasd adasdasdasd adasdasdasd adasdasdasd ad', '2018-09-14 20:48:22', '2018-09-14 20:48:22', 0);
-- --------------------------------------------------------
--
-- Table structure for table `credential_requirements`
--
CREATE TABLE `credential_requirements` (
`id` int(11) NOT NULL,
`credential_template_id` int(11) UNSIGNED NOT NULL,
`credential_id` int(11) UNSIGNED NOT NULL DEFAULT '0',
`date_creadted` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`date_modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`created_by` int(11) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `credential_requirements`
--
INSERT INTO `credential_requirements` (`id`, `credential_template_id`, `credential_id`, `date_creadted`, `date_modified`, `created_by`) VALUES
(1, 1, 1, '2018-09-19 01:34:30', '2018-09-19 01:34:30', 1),
(2, 1, 2, '2018-09-19 01:34:30', '2018-09-19 01:34:30', 1),
(3, 1, 3, '2018-09-19 01:34:30', '2018-09-19 01:34:30', 1),
(4, 1, 4, '2018-09-19 01:34:30', '2018-09-19 01:34:30', 1),
(5, 1, 5, '2018-09-19 01:34:30', '2018-09-19 01:34:30', 1),
(6, 1, 6, '2018-09-19 01:34:30', '2018-09-19 01:34:30', 1),
(7, 2, 1, '2018-09-19 01:34:55', '2018-09-19 01:34:55', 1),
(8, 2, 2, '2018-09-19 01:34:55', '2018-09-19 01:34:55', 1),
(9, 2, 3, '2018-09-19 01:34:55', '2018-09-19 01:34:55', 1),
(10, 2, 4, '2018-09-19 01:34:55', '2018-09-19 01:34:55', 1),
(11, 2, 5, '2018-09-19 01:34:55', '2018-09-19 01:34:55', 1),
(12, 2, 6, '2018-09-19 01:34:55', '2018-09-19 01:34:55', 1),
(13, 3, 1, '2018-09-19 01:35:17', '2018-09-19 01:35:17', 1),
(14, 3, 2, '2018-09-19 01:35:17', '2018-09-19 01:35:17', 1),
(15, 3, 3, '2018-09-19 01:35:17', '2018-09-19 01:35:17', 1),
(16, 3, 4, '2018-09-19 01:35:17', '2018-09-19 01:35:17', 1);
-- --------------------------------------------------------
--
-- Table structure for table `credential_templates`
--
CREATE TABLE `credential_templates` (
`id` int(11) NOT NULL,
`name` varchar(50) NOT NULL DEFAULT '0',
`date_created` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`date_modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`created_by` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `credential_templates`
--
INSERT INTO `credential_templates` (`id`, `name`, `date_created`, `date_modified`, `created_by`) VALUES
(1, 'GRADE ONE CREDENTIAL TEMPLATE', '2018-09-19 01:34:30', '2018-09-19 01:34:30', 0),
(2, 'GRADE TWO CREDENTIAL TEMPLATE', '2018-09-19 01:34:55', '2018-09-19 01:34:55', 0),
(3, 'GRADE THREE CREDENTIAL TEMPLATE', '2018-09-19 01:35:17', '2018-09-19 01:35:17', 0);
-- --------------------------------------------------------
--
-- Table structure for table `events`
--
CREATE TABLE `events` (
`id` int(10) UNSIGNED NOT NULL,
`priority_id` int(11) NOT NULL,
`title` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`date_start` date NOT NULL,
`date_end` date NOT NULL,
`message` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`publish_status` tinyint(1) NOT NULL,
`active_status` tinyint(1) NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
`eventscol` varchar(45) COLLATE utf8mb4_unicode_ci DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `events`
--
INSERT INTO `events` (`id`, `priority_id`, `title`, `date_start`, `date_end`, `message`, `publish_status`, `active_status`, `created_at`, `updated_at`, `eventscol`) VALUES
(1, 0, 'EVENT 1', '2018-12-12', '2018-12-12', 'The quick brown fox jumps over the lazy dog', 1, 0, '2018-10-04 16:46:22', NULL, NULL);
-- --------------------------------------------------------
--
-- Table structure for table `groups`
--
CREATE TABLE `groups` (
`id` mediumint(8) UNSIGNED NOT NULL,
`name` varchar(20) NOT NULL,
`description` varchar(100) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `groups`
--
INSERT INTO `groups` (`id`, `name`, `description`) VALUES
(1, 'admin', 'Administrator'),
(2, 'members', 'General User'),
(3, 'student', ''),
(4, 'teacher', '');
-- --------------------------------------------------------
--
-- Table structure for table `login_attempts`
--
CREATE TABLE `login_attempts` (
`id` int(11) UNSIGNED NOT NULL,
`ip_address` varchar(45) NOT NULL,
`login` varchar(100) NOT NULL,
`time` int(11) UNSIGNED DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `login_attempts`
--
INSERT INTO `login_attempts` (`id`, `ip_address`, `login`, `time`) VALUES
(1, '192.168.33.1', 'JUSTIN_BIEBER', 1541499712);
-- --------------------------------------------------------
--
-- Table structure for table `migrations`
--
CREATE TABLE `migrations` (
`id` int(10) UNSIGNED NOT NULL,
`migration` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`batch` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `migrations`
--
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES
(1, '2018_08_11_125459_create_school_years_table', 1),
(2, '2018_08_11_125551_create_school_departments_table', 1),
(3, '2018_08_11_125610_create_school_grade_levels_table', 1),
(4, '2018_08_11_125622_create_school_sections_table', 1),
(5, '2018_08_11_125633_create_school_subjects_table', 1),
(6, '2018_08_11_125644_create_announcements_table', 1),
(7, '2018_08_11_125655_create_students_table', 1);
-- --------------------------------------------------------
--
-- Table structure for table `schedule_class`
--
CREATE TABLE `schedule_class` (
`id` int(11) UNSIGNED NOT NULL,
`schedule_master_id` int(11) UNSIGNED NOT NULL DEFAULT '0',
`subject_id` int(11) UNSIGNED NOT NULL DEFAULT '0',
`teacher_id` int(11) UNSIGNED NOT NULL DEFAULT '0',
`room_id` int(11) NOT NULL,
`time_start` time NOT NULL DEFAULT '00:00:00',
`time_end` time NOT NULL DEFAULT '00:00:00',
`days` varchar(50) NOT NULL DEFAULT '0',
`date_created` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `schedule_class`
--
INSERT INTO `schedule_class` (`id`, `schedule_master_id`, `subject_id`, `teacher_id`, `room_id`, `time_start`, `time_end`, `days`, `date_created`) VALUES
(1, 1, 1, 1, 0, '00:08:00', '00:09:00', 'MON-TUE-WED-THU-FRI', '2018-08-29 13:01:55'),
(2, 1, 2, 1, 0, '00:09:00', '00:10:00', 'MON-TUE-WED-THU-FRI', '2018-08-29 13:03:16'),
(3, 1, 3, 2, 0, '00:10:00', '00:11:00', 'MON-WED-FRI', '2018-08-29 13:03:55'),
(4, 1, 4, 1, 0, '00:11:00', '00:12:00', 'TUE-THU', '2018-08-29 13:04:36'),
(8, 2, 2, 1, 0, '09:00:00', '10:00:00', 'MON-WED-FRI', '2018-09-01 05:44:47'),
(9, 2, 3, 2, 0, '10:00:00', '11:00:00', 'MON-TUE-WED-THU-FRI', '2018-09-01 05:45:21'),
(10, 4, 6, 1, 0, '10:00:00', '11:00:00', 'MON-WED-FRI', '2018-09-01 05:46:16'),
(11, 2, 4, 1, 0, '00:12:00', '02:32:00', 'MON-FRI', '2018-09-17 13:59:58'),
(12, 4, 5, 1, 0, '15:00:00', '16:00:00', 'TUE-WED-THU', '2018-10-05 02:25:09'),
(13, 4, 7, 2, 0, '16:00:00', '17:00:00', 'MON-TUE-WED', '2018-10-05 15:35:06'),
(14, 5, 1, 1, 0, '08:00:00', '09:00:00', 'MON-TUE-WED-THU-FRI', '2018-10-15 23:52:35');
-- --------------------------------------------------------
--
-- Table structure for table `schedule_master`
--
CREATE TABLE `schedule_master` (
`id` int(11) UNSIGNED NOT NULL,
`school_year_id` int(11) UNSIGNED NOT NULL,
`department_id` int(11) UNSIGNED NOT NULL,
`grade_level_id` int(11) UNSIGNED NOT NULL,
`section_id` int(11) UNSIGNED NOT NULL,
`adviser_id` int(11) UNSIGNED NOT NULL,
`capacity` int(11) UNSIGNED NOT NULL,
`total_dropped` int(11) UNSIGNED NOT NULL,
`total_enrolled` int(11) UNSIGNED NOT NULL,
`date_created` datetime NOT NULL,
`date_modified` datetime NOT NULL,
`created_by` int(11) NOT NULL,
`active_status` tinyint(1) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `schedule_master`
--
INSERT INTO `schedule_master` (`id`, `school_year_id`, `department_id`, `grade_level_id`, `section_id`, `adviser_id`, `capacity`, `total_dropped`, `total_enrolled`, `date_created`, `date_modified`, `created_by`, `active_status`) VALUES
(1, 1, 2, 2, 1, 0, 0, 0, 0, '2018-08-29 17:19:14', '0000-00-00 00:00:00', 0, 1),
(2, 1, 2, 2, 2, 0, 8, 0, 0, '2018-08-29 17:23:55', '0000-00-00 00:00:00', 0, 1),
(3, 1, 2, 2, 3, 2, 10, 0, 0, '2018-09-01 13:09:42', '0000-00-00 00:00:00', 0, 1),
(4, 1, 2, 5, 24, 2, 10, 0, 0, '2018-09-01 13:18:11', '0000-00-00 00:00:00', 0, 1),
(5, 1, 2, 2, 4, 2, 10, 0, 0, '2018-09-17 13:58:20', '0000-00-00 00:00:00', 0, 1),
(6, 1, 2, 4, 18, 1, 4, 0, 0, '2018-10-15 23:51:23', '0000-00-00 00:00:00', 0, 1);
-- --------------------------------------------------------
--
-- Table structure for table `school_departments`
--
CREATE TABLE `school_departments` (
`id` int(10) UNSIGNED NOT NULL,
`name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`code_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`description` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`active_status` tinyint(1) NOT NULL DEFAULT '1',
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `school_departments`
--
INSERT INTO `school_departments` (`id`, `name`, `code_name`, `description`, `active_status`, `created_at`, `updated_at`) VALUES
(1, 'KINDERGARTEN', 'KG', '', 1, NULL, NULL),
(2, 'PRIMARY SCHOOL', 'PS', '', 1, NULL, NULL),
(3, 'JUNIOR HIGH SCHOOL', 'JHS', '', 1, NULL, NULL),
(4, 'SENIOR HIGH SCHOOL', 'SHS', '', 1, NULL, NULL);
-- --------------------------------------------------------
--
-- Table structure for table `school_grade_levels`
--
CREATE TABLE `school_grade_levels` (
`id` int(10) UNSIGNED NOT NULL,
`department_id` int(11) NOT NULL,
`name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`description` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`active_status` tinyint(1) NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `school_grade_levels`
--
INSERT INTO `school_grade_levels` (`id`, `department_id`, `name`, `description`, `active_status`, `created_at`, `updated_at`) VALUES
(1, 1, 'KINDERGARTEN', '', 1, NULL, NULL),
(2, 2, 'GRADE 1', '', 1, NULL, NULL),
(3, 2, 'GRADE 2 ', '', 1, NULL, NULL),
(4, 2, 'GRADE 3', '', 1, NULL, NULL),
(5, 2, 'GRADE 4', '', 1, NULL, NULL),
(6, 2, 'GRADE 5', '', 1, NULL, NULL),
(7, 2, 'GRADE 6', '', 1, NULL, NULL),
(8, 3, 'GRADE 7', '', 1, NULL, NULL),
(9, 3, 'GRADE 8', '', 1, NULL, NULL),
(10, 3, 'GRADE 9', '', 1, NULL, NULL),
(11, 3, 'GRADE 10', '', 1, NULL, NULL),
(12, 4, 'GRADE 11', '', 1, NULL, NULL),
(13, 4, 'GRADE 12', '', 1, NULL, NULL);
-- --------------------------------------------------------
--
-- Table structure for table `school_sections`
--
CREATE TABLE `school_sections` (
`id` int(10) UNSIGNED NOT NULL,
`grade_level_id` int(11) NOT NULL,
`name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`description` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`active_status` tinyint(1) NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `school_sections`
--
INSERT INTO `school_sections` (`id`, `grade_level_id`, `name`, `description`, `active_status`, `created_at`, `updated_at`) VALUES
(1, 2, 'SUN', '', 1, NULL, NULL),
(2, 2, 'MERCURY', '', 1, NULL, NULL),
(3, 2, 'VENUS', '', 1, NULL, NULL),
(4, 2, 'EARTH', '', 1, NULL, NULL),
(5, 2, 'MARS', '', 1, NULL, NULL),
(6, 2, 'JUPITER', '', 1, NULL, NULL),
(7, 2, 'SATURN', '', 1, NULL, NULL),
(8, 2, 'URANUS', '', 1, NULL, NULL),
(9, 2, 'NEPTUNE', '', 1, NULL, NULL),
(10, 2, 'PLUTO', '', 1, NULL, NULL),
(11, 3, 'APPLE ', '', 1, NULL, NULL),
(12, 3, 'GRAPES', '', 1, NULL, NULL),
(13, 3, 'BANANA', '', 1, NULL, NULL),
(14, 3, 'STRAWBERRY', '', 1, NULL, NULL),
(15, 3, 'MANGO', '', 1, NULL, NULL),
(16, 3, 'ORANGE', '', 1, NULL, NULL),
(17, 3, 'PINEAPPLE', '', 1, NULL, NULL),
(18, 4, 'RED', '', 1, NULL, NULL),
(19, 4, 'BLUE', '', 1, NULL, NULL),
(20, 4, 'GREEN', '', 1, NULL, NULL),
(21, 4, 'YELLOW', '', 1, NULL, NULL),
(22, 4, 'PURPLE', '', 1, NULL, NULL),
(23, 4, 'PINK', '', 1, NULL, NULL),
(24, 5, 'ONE', '', 1, NULL, NULL),
(25, 5, 'TWO ', '', 1, NULL, NULL),
(26, 5, 'THREE', '', 1, NULL, NULL),
(27, 5, 'FOUR', '', 1, NULL, NULL);
-- --------------------------------------------------------
--
-- Table structure for table `school_subjects`
--
CREATE TABLE `school_subjects` (
`id` int(10) UNSIGNED NOT NULL,
`department_id` int(11) NOT NULL,
`grade_level_id` int(11) NOT NULL,
`parent_subject_id` int(11) NOT NULL,
`name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`description` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`active_status` tinyint(1) NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `school_subjects`
--
INSERT INTO `school_subjects` (`id`, `department_id`, `grade_level_id`, `parent_subject_id`, `name`, `description`, `active_status`, `created_at`, `updated_at`) VALUES
(1, 2, 2, 0, 'ENGLISH', '', 1, NULL, NULL),
(2, 2, 2, 0, 'MATHEMATICS', '', 1, NULL, NULL),
(3, 2, 2, 0, 'SCIENCE', '', 1, NULL, NULL),
(4, 2, 2, 0, 'PHYSICAL EDUCATION', '', 1, NULL, NULL),
(5, 2, 5, 0, 'MATHEMATICS', '', 1, NULL, NULL),
(6, 2, 5, 0, 'SCIENCE', '', 1, NULL, NULL),
(7, 2, 5, 0, 'ENGLISH', '', 1, NULL, NULL),
(8, 2, 4, 0, 'ASD', '', 1, NULL, NULL),
(9, 2, 4, 0, 'ZXC', '', 1, NULL, NULL),
(10, 2, 4, 0, 'QWE', '', 1, NULL, NULL),
(11, 2, 4, 0, 'RTY', '', 1, NULL, NULL);
-- --------------------------------------------------------
--
-- Table structure for table `school_years`
--
CREATE TABLE `school_years` (
`id` int(10) UNSIGNED NOT NULL,
`name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`description` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`date_start` date NOT NULL,
`date_end` date NOT NULL,
`is_current` tinyint(1) NOT NULL,
`active_status` tinyint(1) NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `school_years`
--
INSERT INTO `school_years` (`id`, `name`, `description`, `date_start`, `date_end`, `is_current`, `active_status`, `created_at`, `updated_at`) VALUES
(1, '2018 - 2019', '', '2018-06-04', '2019-03-29', 1, 0, NULL, NULL),
(2, '2020 - 2021 ', '', '2020-06-01', '2021-03-31', 0, 0, NULL, NULL),
(3, '2020 - 2021 ', '', '2020-06-04', '2021-03-30', 0, 0, NULL, NULL);
-- --------------------------------------------------------
--
-- Table structure for table `students`
--
CREATE TABLE `students` (
`id` int(10) UNSIGNED NOT NULL,
`user_id` int(11) NOT NULL,
`student_number` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
`first_name` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
`middle_name` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
`last_name` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
`suffix_name` varchar(10) COLLATE utf8mb4_unicode_ci NOT NULL,
`current_address` varchar(250) COLLATE utf8mb4_unicode_ci NOT NULL,
`telephone_number` varchar(25) COLLATE utf8mb4_unicode_ci NOT NULL,
`mobile_number` varchar(25) COLLATE utf8mb4_unicode_ci NOT NULL,
`email_address` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
`gender` tinyint(1) NOT NULL,
`birth_date` date NOT NULL,
`birth_place` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`is_old_student` tinyint(1) NOT NULL,
`is_enrolled` tinyint(1) NOT NULL,
`profile_photo_filename` varchar(250) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`profile_photo_filepath` varchar(250) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`student_enrolled_id` tinyint(1) NOT NULL,
`student_profile_id` tinyint(1) NOT NULL,
`active_status` tinyint(1) NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `students`
--
INSERT INTO `students` (`id`, `user_id`, `student_number`, `first_name`, `middle_name`, `last_name`, `suffix_name`, `current_address`, `telephone_number`, `mobile_number`, `email_address`, `gender`, `birth_date`, `birth_place`, `is_old_student`, `is_enrolled`, `profile_photo_filename`, `profile_photo_filepath`, `student_enrolled_id`, `student_profile_id`, `active_status`, `created_at`, `updated_at`) VALUES
(2, 5, '2018-03-00005', 'Kobe', 'beef', 'Bryant', '', '123 int somewhere street philippines', '44444444', '44444444', 'kobe.bryant@email.com', 1, '0000-00-00', 'manila', 0, 1, 'd4fb47d0024744fdd1ca463d493f6d16.png', 'http://192.168.33.10/sis-app/assets/img/student-photos/d4fb47d0024744fdd1ca463d493f6d16.png', 1, 0, 1, '2018-08-31 08:10:58', NULL),
(3, 6, '2018-03-00006', 'jeniffer', 'violo', 'tio', '', '123 int somewhere street philippines', '44444444', '44444444', 'jeniffer.tio@email.com', 0, '0000-00-00', 'manila', 0, 1, '9b7b9c8d33d29432ed46a69527d281d9.jpg', 'http://192.168.33.10/sis-app/assets/img/student-photos/9b7b9c8d33d29432ed46a69527d281d9.jpg', 2, 0, 1, '2018-09-01 05:48:21', NULL),
(4, 7, '2018-03-00007', 'Miguel', '', 'Rivera', '', '123 int somewhere street philippines', '123123123', '09123456789', 'miguel.rivera@email.com', 1, '0000-00-00', 'manila', 0, 1, '68e896cb92268eb7ad5e04ea34905ea3.jpg', 'http://192.168.33.10/sis-app/assets/img/student-photos/68e896cb92268eb7ad5e04ea34905ea3.jpg', 3, 0, 1, '2018-11-06 10:14:45', NULL),
(6, 9, '2018-03-00009', 'Lebron', '', 'James', '', '123 int somewhere street philippines', '123123123', '09123456789', 'lebron.james@email.com', 1, '0000-00-00', 'Akron, Ohio, United States', 0, 1, '460ce5c0ac3c4c3c359d1b0b28484566.png', 'http://192.168.33.10/sis-app/assets/img/student-photos/460ce5c0ac3c4c3c359d1b0b28484566.png', 4, 0, 1, '2018-11-06 13:27:13', NULL);
-- --------------------------------------------------------
--
-- Table structure for table `student_credentials`
--
CREATE TABLE `student_credentials` (
`id` int(11) UNSIGNED NOT NULL,
`student_id` int(11) UNSIGNED NOT NULL DEFAULT '0',
`credential_template_id` int(11) UNSIGNED NOT NULL DEFAULT '0',
`credential_id` int(11) UNSIGNED NOT NULL DEFAULT '0',
`is_submitted` tinyint(1) UNSIGNED NOT NULL DEFAULT '0',
`document_type` int(1) UNSIGNED NOT NULL DEFAULT '0' COMMENT '1 = pdf; 2 = docx; 3 = hard copy',
`remarks` varchar(250) NOT NULL DEFAULT '0',
`date_created` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`date_modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`created_by` int(11) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `student_credentials`
--
INSERT INTO `student_credentials` (`id`, `student_id`, `credential_template_id`, `credential_id`, `is_submitted`, `document_type`, `remarks`, `date_created`, `date_modified`, `created_by`) VALUES
(1, 2, 1, 1, 1, 3, 'demo demo demo demode mo', '2018-09-21 03:07:14', '2018-09-21 03:07:14', 1),
(2, 2, 1, 2, 1, 1, 'demo demo demo demode mo', '2018-09-21 03:07:14', '2018-09-21 03:07:15', 1),
(3, 2, 1, 3, 1, 2, 'demo demo demo demode mo', '2018-09-21 03:07:15', '2018-09-21 03:07:15', 1);
-- --------------------------------------------------------
--
-- Table structure for table `student_enrolled`
--
CREATE TABLE `student_enrolled` (
`id` int(11) UNSIGNED NOT NULL,
`student_id` int(11) UNSIGNED NOT NULL,
`school_year_id` int(11) UNSIGNED NOT NULL DEFAULT '0',
`department_id` int(11) UNSIGNED NOT NULL DEFAULT '0',
`grade_level_id` int(11) UNSIGNED NOT NULL DEFAULT '0',
`section_id` int(11) UNSIGNED NOT NULL DEFAULT '0',
`is_regular` tinyint(1) UNSIGNED NOT NULL DEFAULT '0',
`date_enrolled` date DEFAULT NULL,
`date_created` datetime DEFAULT CURRENT_TIMESTAMP,
`date_modified` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`created_by` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `student_enrolled`
--
INSERT INTO `student_enrolled` (`id`, `student_id`, `school_year_id`, `department_id`, `grade_level_id`, `section_id`, `is_regular`, `date_enrolled`, `date_created`, `date_modified`, `created_by`) VALUES
(1, 2, 1, 2, 2, 1, 0, '0000-00-00', '2018-10-17 17:58:04', '2018-10-17 17:58:04', NULL),
(2, 3, 1, 2, 4, 18, 0, '0000-00-00', '2018-11-06 05:40:11', '2018-11-06 05:40:11', NULL),
(3, 4, 1, 2, 2, 2, 0, '0000-00-00', '2018-11-07 04:56:46', '2018-11-07 04:56:46', NULL),
(4, 6, 1, 2, 2, 2, 0, '0000-00-00', '2018-11-07 04:57:02', '2018-11-07 04:57:02', NULL);
-- --------------------------------------------------------
--
-- Table structure for table `student_parent`
--
CREATE TABLE `student_parent` (
`id` int(11) NOT NULL,
`student_id` int(11) NOT NULL,
`parent_type_id` tinyint(1) NOT NULL COMMENT '1 = father; 2 = mother',
`first_name` varchar(50) NOT NULL,
`middle_name` varchar(50) NOT NULL,
`last_name` varchar(50) NOT NULL,
`suffix_name` varchar(25) NOT NULL,
`current_address` varchar(250) NOT NULL,
`telephone_number` varchar(50) NOT NULL,
`mobile_number` varchar(50) NOT NULL,
`email_address` varchar(50) NOT NULL,
`active_status` tinyint(1) NOT NULL DEFAULT '1',
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `student_parent`
--
INSERT INTO `student_parent` (`id`, `student_id`, `parent_type_id`, `first_name`, `middle_name`, `last_name`, `suffix_name`, `current_address`, `telephone_number`, `mobile_number`, `email_address`, `active_status`, `created_at`, `updated_at`) VALUES
(1, 0, 1, 'Anthony', '', 'McClelland', '', '123 int somewhere street philippines', '123123123', '09123456789', 'anthony.mcclelland@email.com', 1, NULL, NULL);
-- --------------------------------------------------------
--
-- Table structure for table `teachers`
--
CREATE TABLE `teachers` (
`id` int(11) UNSIGNED NOT NULL,
`user_id` int(11) UNSIGNED NOT NULL,
`specialized_subject_id` int(11) UNSIGNED NOT NULL,
`teacher_number` varchar(100) DEFAULT NULL,
`first_name` varchar(100) NOT NULL DEFAULT '0',
`middle_name` varchar(100) NOT NULL DEFAULT '0',
`last_name` varchar(100) NOT NULL DEFAULT '0',
`suffix_name` varchar(100) NOT NULL,
`address` varchar(250) NOT NULL DEFAULT '0',
`email_address` varchar(100) NOT NULL DEFAULT '0',
`telephone_number` varchar(100) NOT NULL DEFAULT '0',
`mobile_number` varchar(100) NOT NULL DEFAULT '0',
`gender` tinyint(1) UNSIGNED NOT NULL,
`birth_date` date DEFAULT NULL,
`birth_place` varchar(50) DEFAULT NULL,
`profile_photo_filename` varchar(250) DEFAULT NULL,
`profile_photo_filepath` varchar(250) DEFAULT NULL,
`active_status` tinyint(1) NOT NULL DEFAULT '0',
`created_by` int(11) UNSIGNED NOT NULL DEFAULT '0',
`date_created` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`date_modified` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `teachers`
--
INSERT INTO `teachers` (`id`, `user_id`, `specialized_subject_id`, `teacher_number`, `first_name`, `middle_name`, `last_name`, `suffix_name`, `address`, `email_address`, `telephone_number`, `mobile_number`, `gender`, `birth_date`, `birth_place`, `profile_photo_filename`, `profile_photo_filepath`, `active_status`, `created_by`, `date_created`, `date_modified`) VALUES
(1, 3, 1, '2018-04-00003', 'john', 'ewan', 'doe', '', '281 int 5th avenue m.h del pilar street caloocan city', 'john.doe@email.com', '33333333', '+6391233456789', 1, '0000-00-00', 'manila', '45b9de03ba7ceeeb0f90e820d8bb446f4.jpg', 'http://192.168.33.10/sis-app/assets/img/teacher-photos/45b9de03ba7ceeeb0f90e820d8bb446f4.jpg', 1, 1, '2018-08-31 10:48:39', NULL),
(2, 4, 3, '2018-04-00004', 'jane', 'ewan', 'doe', '', '281 int 5th avenue m.h del pilar street caloocan city', 'jane.doe@email.com', '33333333', '091233456789', 1, '0000-00-00', 'manila', 'a439eedfb4feed2d50aca35724feeaa56.jpg', 'http://192.168.33.10/sis-app/assets/img/teacher-photos/a439eedfb4feed2d50aca35724feeaa56.jpg', 1, 1, '2018-08-31 11:43:37', NULL),
(4, 11, 8, '2018-04-00011', 'Justin', '', 'Bieber', '', '123 int somewhere street philippines', 'justin.bieber@email.com', '123123123', '09123456789', 1, '0000-00-00', 'anywhere', '771d603f9e567288a851e429afb28883.png', 'http://192.168.33.10/sis-app/assets/img/teacher-photos/771d603f9e567288a851e429afb28883.png', 1, 1, '2018-11-06 16:32:12', NULL);
-- --------------------------------------------------------
--
-- Table structure for table `users`
--
CREATE TABLE `users` (
`id` int(11) UNSIGNED NOT NULL,
`ip_address` varchar(45) NOT NULL,
`username` varchar(100) DEFAULT NULL,
`password` varchar(255) NOT NULL,
`salt` varchar(255) DEFAULT NULL,
`email` varchar(254) NOT NULL,
`activation_code` varchar(40) DEFAULT NULL,
`forgotten_password_code` varchar(40) DEFAULT NULL,
`forgotten_password_time` int(11) UNSIGNED DEFAULT NULL,
`remember_code` varchar(40) DEFAULT NULL,
`created_on` int(11) UNSIGNED NOT NULL,
`last_login` int(11) UNSIGNED DEFAULT NULL,
`active` tinyint(1) UNSIGNED DEFAULT NULL,
`first_name` varchar(50) DEFAULT NULL,
`last_name` varchar(50) DEFAULT NULL,
`company` varchar(100) DEFAULT NULL,
`phone` varchar(20) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `users`
--
INSERT INTO `users` (`id`, `ip_address`, `username`, `password`, `salt`, `email`, `activation_code`, `forgotten_password_code`, `forgotten_password_time`, `remember_code`, `created_on`, `last_login`, `active`, `first_name`, `last_name`, `company`, `phone`) VALUES
(1, '127.0.0.1', 'administrator', '$2a$07$SeBknntpZror9uyftVopmu61qg0ms8Qv1yV6FG.kQOSM.9QhmTo36', '', 'admin@admin.com', '', NULL, NULL, NULL, 1268889823, 1541566441, 1, 'Admin', 'istrator', 'ADMIN', '0'),
(3, '192.168.33.1', 'DOE_JOHN', '$2a$07$SeBknntpZror9uyftVopmu61qg0ms8Qv1yV6FG.kQOSM.9QhmTo36', NULL, 'john.doe@email.com', '', NULL, NULL, NULL, 1535683719, 1541566688, 1, 'JOHN', 'DOE', NULL, NULL),
(4, '192.168.33.1', 'DOE_JANE', '$2a$07$SeBknntpZror9uyftVopmu61qg0ms8Qv1yV6FG.kQOSM.9QhmTo36', NULL, 'jane.doe@email.com', NULL, NULL, NULL, NULL, 1535687017, 1535778402, 1, 'JANE', 'DOE', NULL, NULL),
(5, '192.168.33.1', 'BRYANT_KOBE', '$2a$07$SeBknntpZror9uyftVopmu61qg0ms8Qv1yV6FG.kQOSM.9QhmTo36', NULL, 'kobe.bryant@email.com', NULL, NULL, NULL, NULL, 1535703058, 1539770292, 1, 'KOBE', 'BRYANT', NULL, NULL),
(6, '192.168.33.1', 'TIO_JENIFFER', '$2a$07$SeBknntpZror9uyftVopmu61qg0ms8Qv1yV6FG.kQOSM.9QhmTo36', NULL, 'kobe.bryant@email.com', NULL, NULL, NULL, NULL, 1535780901, 1539770079, 1, 'JENIFFER', 'TIO', NULL, NULL),
(7, '192.168.33.1', 'RIVERA_MIGUEL', '$2y$08$soOatUUyqHX9.84GPV5FQeHxkcOowGHkVh2HFhzqGUNyR22V5fDlm', NULL, 'miguel.rivera@email.com', NULL, NULL, NULL, NULL, 1541470485, NULL, 1, 'MIGUEL', 'RIVERA', NULL, NULL),
(9, '192.168.33.1', 'JAMES_LEBRON', '$2y$08$rtnsawyXgutE8ck7n9pjnO.6gCs1yEn760XduZppwiO5SrzEtz1we', NULL, 'lebron.james@email.com', NULL, NULL, NULL, NULL, 1541482033, 1541514346, 1, 'LEBRON', 'JAMES', NULL, NULL),
(11, '192.168.33.1', 'BIEBER_JUSTIN', '$2y$08$EgBQTiNNzLKuTyHYZpbzbebINx8TOGCWLSD7pVGzmkqloiEYSFgra', NULL, 'justin.bieber@email.com', NULL, NULL, NULL, NULL, 1541493132, 1541514942, 1, 'JUSTIN', 'BIEBER', NULL, NULL);
-- --------------------------------------------------------
--
-- Table structure for table `users_groups`
--
CREATE TABLE `users_groups` (
`id` int(11) UNSIGNED NOT NULL,
`user_id` int(11) UNSIGNED NOT NULL,
`group_id` mediumint(8) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `users_groups`
--
INSERT INTO `users_groups` (`id`, `user_id`, `group_id`) VALUES
(1, 1, 1),
(2, 1, 2),
(10, 3, 4),
(11, 4, 4),
(12, 5, 3),
(13, 6, 3),
(14, 7, 3),
(16, 9, 3),
(18, 11, 4);
--
-- Indexes for dumped tables
--
--
-- Indexes for table `announcements`
--
ALTER TABLE `announcements`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `credentials`
--
ALTER TABLE `credentials`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `credential_requirements`
--
ALTER TABLE `credential_requirements`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `credential_templates`
--
ALTER TABLE `credential_templates`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `events`
--
ALTER TABLE `events`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `groups`
--
ALTER TABLE `groups`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `login_attempts`
--
ALTER TABLE `login_attempts`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `migrations`
--
ALTER TABLE `migrations`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `schedule_class`
--
ALTER TABLE `schedule_class`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `schedule_master`
--
ALTER TABLE `schedule_master`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `school_departments`
--
ALTER TABLE `school_departments`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `school_grade_levels`
--
ALTER TABLE `school_grade_levels`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `school_sections`
--
ALTER TABLE `school_sections`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `school_subjects`
--
ALTER TABLE `school_subjects`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `school_years`
--
ALTER TABLE `school_years`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `students`
--
ALTER TABLE `students`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `student_credentials`
--
ALTER TABLE `student_credentials`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `student_enrolled`
--
ALTER TABLE `student_enrolled`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `student_parent`
--
ALTER TABLE `student_parent`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `teachers`
--
ALTER TABLE `teachers`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `users`
--
ALTER TABLE `users`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `users_groups`
--
ALTER TABLE `users_groups`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `uc_users_groups` (`user_id`,`group_id`),
ADD KEY `fk_users_groups_users1_idx` (`user_id`),
ADD KEY `fk_users_groups_groups1_idx` (`group_id`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `announcements`
--
ALTER TABLE `announcements`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
--
-- AUTO_INCREMENT for table `credentials`
--
ALTER TABLE `credentials`
MODIFY `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;
--
-- AUTO_INCREMENT for table `credential_requirements`
--
ALTER TABLE `credential_requirements`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=17;
--
-- AUTO_INCREMENT for table `credential_templates`
--
ALTER TABLE `credential_templates`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
--
-- AUTO_INCREMENT for table `events`
--
ALTER TABLE `events`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT for table `groups`
--
ALTER TABLE `groups`
MODIFY `id` mediumint(8) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
--
-- AUTO_INCREMENT for table `login_attempts`
--
ALTER TABLE `login_attempts`
MODIFY `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
--
-- AUTO_INCREMENT for table `migrations`
--
ALTER TABLE `migrations`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;
--
-- AUTO_INCREMENT for table `schedule_class`
--
ALTER TABLE `schedule_class`
MODIFY `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=15;
--
-- AUTO_INCREMENT for table `schedule_master`
--
ALTER TABLE `schedule_master`
MODIFY `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;
--
-- AUTO_INCREMENT for table `school_departments`
--
ALTER TABLE `school_departments`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
--
-- AUTO_INCREMENT for table `school_grade_levels`
--
ALTER TABLE `school_grade_levels`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=14;
--
-- AUTO_INCREMENT for table `school_sections`
--
ALTER TABLE `school_sections`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=28;
--
-- AUTO_INCREMENT for table `school_subjects`
--
ALTER TABLE `school_subjects`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=12;
--
-- AUTO_INCREMENT for table `school_years`
--
ALTER TABLE `school_years`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
--
-- AUTO_INCREMENT for table `students`
--
ALTER TABLE `students`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;
--
-- AUTO_INCREMENT for table `student_credentials`
--
ALTER TABLE `student_credentials`
MODIFY `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
--
-- AUTO_INCREMENT for table `student_enrolled`
--
ALTER TABLE `student_enrolled`
MODIFY `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
--
-- AUTO_INCREMENT for table `student_parent`
--
ALTER TABLE `student_parent`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT for table `teachers`
--
ALTER TABLE `teachers`
MODIFY `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
--
-- AUTO_INCREMENT for table `users`
--
ALTER TABLE `users`
MODIFY `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=12;
--
-- AUTO_INCREMENT for table `users_groups`
--
ALTER TABLE `users_groups`
MODIFY `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=19;
--
-- Constraints for dumped tables
--
--
-- Constraints for table `users_groups`
--
ALTER TABLE `users_groups`
ADD CONSTRAINT `fk_users_groups_groups1` FOREIGN KEY (`group_id`) REFERENCES `groups` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION,
ADD CONSTRAINT `fk_users_groups_users1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION;
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 */;
|
ALTER TABLE organization ADD oauth_secret VARCHAR(500) |
ALTER TABLE `gallery` ADD COLUMN `bPrivate` BOOL NOT NULL; |
CREATE PROCEDURE [uspGetUserInfo]
@username nvarchar(20)
AS
SELECT [User].[ID], [User].[FirstName], [User].[LastName], [User].[Email], [User].[DOB], [User].[RegistrationDate] as "RegDate", [User].[UserType], [User].[Location] FROM [User]
WHERE [User].[UserName] = @username; |
/***************************/
/* Name: */
/* Class: CS 3410 */
/* Term: Fall 2017 */
/* Lab #: 3part2 */
/***************************/
/*List the name of all products for which an order was placed. (Interactive SQL-->Queries-Advanced-->Join)*/
SELECT pname
FROM products, orders
WHERE products.Pid = orders.Pid
/*List the name of customersthat ordered product ‘p07’ (Interactive SQL -> Queries-Advanced-->Join and
Queries-Basic -> Restriction)*/
SELECT Cname
FROM customers, orders
WHERE orders.Pid = 'p07';
/*List name of agents that placed an order for customer c003 or customer c006*/
SELECT Aname
FROM agents, orders
WHERE orders.Cid = 'c003';
SELECT Aname
FROM agents, orders
WHERE orders.Cid = 'c006';
/*List name of customers that ordered product ‘p01’ through agent 'a01' */
SELECT Cname
FROM customers, orders
WHERE (customers.Cid = orders.Cid) AND (orders.Pid = 'p01') AND (orders.Aid = 'a01');
/*List the name of each customer that placed an order, the pid of what they ordered. */
SELECT Cname, Pid
FROM customers, orders
WHERE customers.Cid = orders.Cid;
/*List the name of each customer that placed an order and the product name for each product they
ordered.*/
SELECT Cname, Cname
FROM customers , orders, products
WHERE (customers.Cid = orders.Cid) AND (orders.Pid=orders.Pid);
/*List the name of each customer and the total amount ordered by the customers and also list the
customers that did not place an order.*/
SELECT Cname, sum(dolars)
FROM customers
JOIN orders
ON customers.Cid = orders.Cid
SELECT Cname
FROM customers
JOIN orders
ON customers.Cid= orders.Cid
WHERE ordno= null;
/*List the name and the sum of dollars for each customer that ordered more than $1,000*/
SELECT Cname, sum(dollars) AS sumOfDollars
FROM customers
JOIN orders
ON customers.Cid= orders.Cid
WHERE sum(dollars) > 1000;
/*List the agent name, product name and customer name for each product ordered.*/
SELECT Aname, Aname, Cname sum(dollars) as sumOfDollars
FROM customers
INNER JOIN orders
ON customers.Cid= orders.Cid
INNER JOIN product
ON products.Pid = orders.Pid;
/*What would be the result of the following SQL Statement:
SELECT * from CUSTOMERS, PRODUCTS*/
It is a cross join so the result would be the rows of both tables |
-- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jun 14, 2019 at 10:45 AM
-- Server version: 10.3.15-MariaDB
-- PHP Version: 7.3.6
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: `standardchartered`
--
-- --------------------------------------------------------
--
-- Table structure for table `accounts`
--
CREATE TABLE `accounts` (
`id` int(11) NOT NULL,
`customerid` int(11) NOT NULL,
`accounttype` varchar(1) NOT NULL,
`accountnumber` varchar(20) NOT NULL,
`branchname` varchar(40) NOT NULL,
`interestrate` double NOT NULL,
`chequebooknumber` varchar(20) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `accounts`
--
INSERT INTO `accounts` (`id`, `customerid`, `accounttype`, `accountnumber`, `branchname`, `interestrate`, `chequebooknumber`) VALUES
(1, 1, 'S', '5558-9795', 'PJ', 3, ''),
(2, 1, 'C', '5555-8784-1', 'KL', 0, '555-897');
-- --------------------------------------------------------
--
-- Table structure for table `customers`
--
CREATE TABLE `customers` (
`id` int(11) NOT NULL,
`firstname` varchar(40) NOT NULL,
`lastname` varchar(40) NOT NULL,
`icnumber` varchar(20) NOT NULL,
`passportnumber` varchar(20) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `customers`
--
INSERT INTO `customers` (`id`, `firstname`, `lastname`, `icnumber`, `passportnumber`) VALUES
(1, 'Thayanithy', 'Jegan', '444-3333', '8888-9999'),
(3, 'Peter', 'Parker', '88822193', 'AB093842'),
(4, 'Paul', 'Mac', '73847', 'AB8888');
--
-- Indexes for dumped tables
--
--
-- Indexes for table `accounts`
--
ALTER TABLE `accounts`
ADD PRIMARY KEY (`id`),
ADD KEY `customerid` (`customerid`);
--
-- Indexes for table `customers`
--
ALTER TABLE `customers`
ADD PRIMARY KEY (`id`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `accounts`
--
ALTER TABLE `accounts`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
--
-- AUTO_INCREMENT for table `customers`
--
ALTER TABLE `customers`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
--
-- Constraints for dumped tables
--
--
-- Constraints for table `accounts`
--
ALTER TABLE `accounts`
ADD CONSTRAINT `accounts_ibfk_1` FOREIGN KEY (`customerid`) REFERENCES `customers` (`id`);
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 */;
|
DROP TABLE IF EXISTS `XXX_papoo_messe_pref`; ##b_dump##
CREATE TABLE IF NOT EXISTS `XXX_papoo_messe_pref` (
`messe_id` int(11) NOT NULL default '0',
`messe_liste` varchar(255) NOT NULL default '',
`messe_daten` text NOT NULL,
`messe_xml_yn` varchar(255) NOT NULL default '',
`messe_xml_link` text NOT NULL,
`messe_lang` text NOT NULL,
`messe_show` varchar(255) NOT NULL default ''
) ; ##b_dump##
INSERT INTO `XXX_papoo_messe_pref`
(messe_id, messe_liste, messe_daten)
VALUES ('1', '1', '0') ; ##b_dump##
DROP TABLE IF EXISTS `XXX_papoo_messe_lang_pref`; ##b_dump##
CREATE TABLE IF NOT EXISTS `XXX_papoo_messe_lang_pref` (
`messe_id_id` varchar(255) NOT NULL default '',
`messe_lang_id` int(11) NOT NULL,
`messe_lang` text NOT NULL
); ##b_dump##
DROP TABLE IF EXISTS `XXX_papoo_messe_daten`; ##b_dump##
CREATE TABLE IF NOT EXISTS `XXX_papoo_messe_daten` (
`messe_id` int(11) NOT NULL auto_increment,
`messe_von` varchar(255) NOT NULL default '',
`messe_bis` varchar(255) NOT NULL default '',
`messe_logo` TEXT NOT NULL ,
`messe_name` TEXT NOT NULL ,
PRIMARY KEY (`messe_id`)
); ##b_dump##
DROP TABLE IF EXISTS `XXX_papoo_messe_daten_lang`; ##b_dump##
CREATE TABLE IF NOT EXISTS `XXX_papoo_messe_daten_lang` (
`messe_id_id` int(11) NOT NULL ,
`messe_lang_id` int(11) NOT NULL ,
`messe_descrip` text NOT NULL
); ##b_dump##
|
select PhoneId, IsCorporate, Size, ActionRoute
, MonthAndYear, Units, Unit, RecomputeUnits
from SourceData.viInputCalls
where MonthAndYear > '2017-01-01' and Unit = 'min' |
insert into @include_columns(col) values ({Column}); |
select last_name
, count(last_name) `count`
from actor
group by last_name
having `count` >= 2 |
DROP TABLE IF EXISTS `non_auth_route`;
CREATE TABLE `non_auth_route` (
`object_pkey` VARCHAR(254) NOT NULL,
`created_at` DATE NOT NULL,
PRIMARY KEY (`object_pkey`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
TRUNCATE version;
INSERT INTO version VALUES ('internals-1.96');
|
INSERT INTO `senior` (`id`, `username`, `email`, `create_time`, `city`) VALUES
(1, 'Pepa', 'test@test.cz', '2020-04-18 18:20:57', 'Praha'),
(2, 'Jan Hlozek', 'hlozek@ema.com', '2020-04-28 21:53:49', 'Praha'),
(3, 'Karel', 'ss@ss.cm', '2020-04-28 21:54:49', 'Zlin'),
(4, 'Novotna Marie', 'das@ji.c', '2020-04-28 21:56:30', 'Albertov'),
(5, 'Lukas Hron', 'hron@see.cz', '2020-04-28 21:57:32', 'Pce'),
(6, 'Jan novak', 'stt@sss.cz', '2020-05-04 13:36:56', 'Prague'),
(7, 'Ludek Svoboda', 'test@svob.mm', '2020-05-06 13:27:34', 'Chotebor'),
(8, 'Helmut Marko', 'helmut@ss.oo', '2020-05-06 13:40:34', 'Liben'),
(9, 'Marie Nová', 'nova@mm.vt', '2020-05-07 10:50:45', 'Brno'),
(10, 'Lukas Kral', 'lukasino22@seznam.cz', '2020-05-07 18:23:35', 'Prelouc'),
(11, 'Anthon Ruml', 'lukasino22@seznam.cz', '2020-05-07 18:29:53', 'Pardubice'),
(12, 'Jon On', 'lukasino22@seznam.cz', '2020-05-07 18:31:03', 'Prague'),
(13, 'Ahmed Morta', 'lukasino22@seznam.cz', '2020-05-07 18:46:03', 'Brno'),
(14, 'Jan Jankov', 'lukasino22@seznam.cz', '2020-05-10 17:18:58', 'Berlin'),
(15, 'Shon Defant', 'lukasino22@seznam.cz', '2020-05-10 17:20:23', 'Warsava');
-- --------------------------------------------------------
INSERT INTO `user` (`id`, `username`, `email`, `password`, `create_time`) VALUES
(1, 'novak', 'novak@szn.cz', '$2a$10$qbLjkQCFE8HSldZ/pB18rujxtRsBAgRnEknEcd13RPrPaH4V2fxnO', '2020-04-18 15:24:28'),
(2, 'dvorak', 'dvorak@gg.cz', '$2a$10$qbLjkQCFE8HSldZ/pB18rujxtRsBAgRnEknEcd13RPrPaH4V2fxnO', '2020-04-18 15:24:28'),
(3, 'port', 'test@test.cz', '$2a$10$qbLjkQCFE8HSldZ/pB18rujxtRsBAgRnEknEcd13RPrPaH4V2fxnO', '2020-04-18 18:20:57'),
(4, 'Jon', 'test3@rpn.com', '$2a$10$qbLjkQCFE8HSldZ/pB18rujxtRsBAgRnEknEcd13RPrPaH4V2fxnO', '2020-04-23 18:42:19'),
(5, 'tesact', 'lol@kii.cz', '$2a$10$ZVA/4udCHtNnsdoUiEnrVeSZvuemoVLR5Jz1WpYNjOc4QhdZFGXwO', '2020-05-04 16:49:36'),
(6, 'lukas', 'lukas@test.cz', '$2a$10$qbLjkQCFE8HSldZ/pB18rujxtRsBAgRnEknEcd13RPrPaH4V2fxnO', '2020-05-04 17:11:58');
-- --------------------------------------------------------
INSERT INTO `cart` (`idcart`, `time`, `time_done`, `done`, `user_id`, `senior_id`) VALUES
(1, '2020-04-18 18:20:57','2020-04-19 15:10:33', 1, 3, 1),
(2, '2020-04-19 21:53:49','2020-04-20 09:20:25', 1, 6, 2),
(3, '2020-04-19 21:54:49','2020-04-20 12:25:20', 1, 6, 3),
(4, '2020-04-22 21:56:30','2020-04-23 09:26:10', 1, 2, 4),
(5, '2020-04-23 21:57:32',NULL, 0, 2, 5),
(6, '2020-04-25 13:36:56',NULL, 0, 6, 6),
(7, '2020-04-26 13:27:34','2020-04-27 11:36:15', 1, 1, 7),
(8, '2020-05-01 13:40:34',NULL, 0, 5, 8),
(9, '2020-05-02 10:50:45','2020-05-05 19:45:57', 1, 5, 9),
(10, '2020-05-03 18:23:36','2020-05-10 09:20:50', 1, 3, 10),
(11, '2020-05-04 18:29:53',NULL, 0, 4, 11),
(12, '2020-05-05 18:31:04','2020-05-07 12:21:45', 1, 6, 12),
(13, '2020-05-06 18:46:03',NULL, 0, 6, 13),
(14, '2020-05-08 17:18:58',NULL, 0, NULL, 14),
(15, '2020-05-10 17:20:23',NULL, 0, NULL, 15);
-- --------------------------------------------------------
INSERT INTO `cartitem` (`id`, `item`, `cart_id`) VALUES
(1, 'das', 4),
(2, 'dsa', 4),
(3, 'rum', 5),
(4, 'rohlik 6x', 5),
(5, 'maso', 5),
(6, 'pečivo', 6),
(7, 'mléko', 6),
(8, 'pecivo', 7),
(9, 'mineralka', 7),
(10, 'cheese', 8),
(11, 'whine', 8),
(12, 'apples', 9),
(13, 'pečivo', 9),
(14, 'chicken mean', 10),
(15, 'whine', 10),
(16, 'bear', 10),
(17, 'bread', 10),
(18, 'bread', 11),
(19, 'milk', 11),
(20, 'apples', 11),
(21, 'some alcohol', 11),
(22, 'mineral water', 12),
(23, 'just some whiskey', 13),
(24, 'sádlo', 1),
(25, 'džus', 1),
(26, 'chleba', 1),
(27, 'mouka hladka', 2),
(28, 'vajíčka', 2),
(29, 'salám', 2),
(30, 'pivo', 3),
(31, 'paprika', 3),
(32, 'sádlo', 4),
(33, 'džus', 4),
(34, 'chleba', 13),
(35, 'mouka hladka', 9),
(36, 'vajíčka', 9),
(37, 'salám', 2),
(38, 'pivo', 6),
(39, 'paprika', 6),
(40, 'vine', 14),
(41, 'bread', 14),
(42, 'flour', 14),
(43, 'milk', 15),
(44, 'bread', 15),
(45, 'cheese', 15); |
SELECT AVG(end_date - start_date) AS average_duration
FROM reservations;
|
-- phpMyAdmin SQL Dump
-- version 4.0.10deb1
-- http://www.phpmyadmin.net
--
-- Servidor: localhost
-- Tiempo de generación: 10-06-2015 a las 18:00:48
-- Versión del servidor: 5.5.43-0ubuntu0.14.04.1
-- Versión de PHP: 5.5.9-1ubuntu4.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
--
-- Base de datos: `db_movies`
--
CREATE DATABASE IF NOT EXISTS `db_movies` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
USE `db_movies`;
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `actores`
--
DROP TABLE IF EXISTS `actores`;
CREATE TABLE IF NOT EXISTS `actores` (
`id_actor` int(11) NOT NULL AUTO_INCREMENT,
`name_actor` varchar(25) COLLATE utf8_spanish_ci NOT NULL,
PRIMARY KEY (`id_actor`),
UNIQUE KEY `name_actor` (`name_actor`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_spanish_ci AUTO_INCREMENT=237 ;
--
-- Volcado de datos para la tabla `actores`
--
INSERT INTO `actores` (`id_actor`, `name_actor`) VALUES
(173, 'Aaron Eckhart'),
(62, 'Aaron Johnson'),
(88, 'Adrienne King'),
(2, 'Al Pacino'),
(38, 'Alan Rickman'),
(151, 'Albert Brooks'),
(70, 'Alec Baldwin'),
(59, 'Alejo Sauras'),
(121, 'Alex Winter'),
(213, 'Alexandra Maria Lara'),
(181, 'Alice Evans'),
(183, 'Anna Faris'),
(74, 'Anne Hathaway'),
(82, 'Annette Bening'),
(191, 'Anthony Anderson'),
(139, 'Anthony Hopkins'),
(68, 'Ashley C. Williams'),
(199, 'Barbra Streisand'),
(234, 'Ben Affleck'),
(161, 'Ben Burtt'),
(21, 'Ben Kingsley'),
(195, 'Ben Stiller'),
(45, 'Benicio del Toro'),
(92, 'Betsy Baker'),
(87, 'Betsy Palmer'),
(47, 'Bill Murray'),
(166, 'Billy Connolly'),
(149, 'Billy Crystal'),
(197, 'Blythe Danner'),
(180, 'Bob Barr'),
(37, 'Bonnie Bedelia'),
(157, 'Bonnie Hunt'),
(22, 'Brad Pitt'),
(143, 'Bradley Cooper'),
(96, 'Bridget Fonda'),
(230, 'Britt Robertson'),
(90, 'Bruce Campbell'),
(12, 'Bruce Willis'),
(212, 'Bruno Ganz'),
(55, 'Bryan Cranston'),
(231, 'Bryce Dallas Howard'),
(76, 'Cameron Díaz'),
(119, 'Carrie Fisher'),
(177, 'Charles Dance'),
(63, 'Chloe Grace Moretz'),
(124, 'Chris Evans'),
(98, 'Chris Hemsworth'),
(228, 'Chris O''Donnel'),
(140, 'Chris Pratt'),
(57, 'Christian Bale'),
(110, 'Christopher Plummer'),
(36, 'Connie Nielsen'),
(214, 'Corinna Harfouch'),
(187, 'Courteney Cox'),
(153, 'Craig T. Nelson'),
(42, 'Curro Cruz'),
(48, 'Dan Aykroyd'),
(215, 'Dan Castellaneta'),
(94, 'Dan Hicks'),
(233, 'Daniel Radcliffe'),
(224, 'Danny DeVito'),
(101, 'Daryl Hannah'),
(142, 'Dave Bautista'),
(145, 'Dave Foley'),
(102, 'David Carradine'),
(200, 'David Emge'),
(17, 'Dee Wallace'),
(103, 'Dev Patel'),
(67, 'Dieter Laser'),
(198, 'Dustin Hoffman'),
(117, 'Dylan Moran'),
(186, 'Ed Harris'),
(108, 'Edward Asner'),
(56, 'Edward Burns'),
(23, 'Edward Norton'),
(60, 'Elena Ballesteros'),
(65, 'Elisabeth Shue'),
(162, 'Elissa Knight'),
(152, 'Ellen DeGeneres'),
(41, 'Ellen Page'),
(91, 'Ellen Sandweiss'),
(95, 'Embeth Davidtz'),
(27, 'Emilio Estévez'),
(165, 'Emma Thompson'),
(168, 'Feng Xiaogang'),
(99, 'Fran Kranz'),
(4, 'Frank Morgan'),
(219, 'Freddie Prinze Jr.'),
(104, 'Freida Pinto'),
(19, 'Gary Lockwood'),
(79, 'Gary Oldman'),
(71, 'Geena Davis'),
(122, 'George Carlin'),
(229, 'George Clooney'),
(136, 'Gwyneth Paltrow'),
(26, 'Harrison Ford'),
(129, 'Hayley Atwell'),
(172, 'Heath Ledger'),
(85, 'Heather Langenkamp'),
(209, 'Helge Schneider'),
(16, 'Henry Thomas'),
(154, 'Holly Hunter'),
(130, 'Hugo Weaving'),
(13, 'Humphrey Bogart'),
(160, 'Ian Holm'),
(188, 'Ian McNeice'),
(105, 'Ian Ziering'),
(14, 'Ingrid Bergman'),
(113, 'Jack McBrayer'),
(222, 'Jack Nicholson'),
(205, 'Jake Weber'),
(24, 'Jared Leto'),
(163, 'Jeff Garlin'),
(193, 'Jeffrey Tambor'),
(194, 'Jennifer Aniston'),
(126, 'Jeremy Renner'),
(43, 'Jess Franco'),
(75, 'Jim Carrey'),
(147, 'Joan Cusack'),
(35, 'Joaquin Phoenix'),
(111, 'John C. Reilly'),
(49, 'John Cleese'),
(148, 'John Goodman'),
(107, 'John Heard'),
(30, 'John Hurt'),
(9, 'John Travolta'),
(44, 'Johnny Depp'),
(109, 'Jordan Nagai'),
(6, 'Joseph Cotten'),
(40, 'Joseph Gordon-Levitt'),
(28, 'Judd Nelson'),
(3, 'Judy Garland'),
(146, 'Julia Louis-Dreyfus'),
(216, 'Julie Kavner'),
(232, 'Justin Fletcher'),
(115, 'Kate Ashfield'),
(170, 'Katie Holmes'),
(120, 'Keanu Reeves'),
(18, 'Keir Dullea'),
(164, 'Kelly MacDonald'),
(179, 'Ken Davitian'),
(201, 'Ken Foree'),
(89, 'Kevin Bacon'),
(81, 'Kevin Spacey'),
(223, 'Kim Basinger'),
(97, 'Kristen Connolly'),
(84, 'Lance Henriksen'),
(53, 'Laura Dern'),
(184, 'Laura Linney'),
(39, 'Leonardo DiCaprio'),
(20, 'Liam Neeson'),
(133, 'Liv Tyler'),
(159, 'Lou Romano'),
(100, 'Lucy Liu'),
(25, 'Mark Hamill'),
(125, 'Mark Ruffalo'),
(1, 'Marlon Brando'),
(206, 'Martin Freeman'),
(235, 'Mary-Elizabeth Winstead'),
(54, 'Matt Damon'),
(196, 'Matt Dillon'),
(221, 'Matthew Lillard'),
(73, 'Matthew McConaughey'),
(171, 'Michael Caine'),
(236, 'Michael Cera'),
(176, 'Michael Gambon'),
(69, 'Michael Keaton'),
(50, 'Michael Palin'),
(225, 'Michelle Pfeiffer'),
(137, 'Mickey Rourke'),
(80, 'Milla Jovovich'),
(8, 'Morgan Freeman'),
(207, 'Mos Def'),
(217, 'Nancy Cartwright'),
(138, 'Natalie Portman'),
(116, 'Nick Frost'),
(64, 'Nicolas Cage'),
(227, 'Nicole Kidman'),
(185, 'Noah Emmerich'),
(5, 'Orson Welles'),
(155, 'Owen Wilson'),
(178, 'Pamela Anderson'),
(158, 'Patton Oswalt'),
(156, 'Paul Newman'),
(83, 'Paul Reiser'),
(192, 'Rachel Bailit'),
(32, 'Randy Newman'),
(190, 'René Zellweger'),
(66, 'Richard Lewis'),
(15, 'Robert De Niro'),
(123, 'Robert Downey Jr.'),
(86, 'Robert Englund'),
(132, 'Robert Redford'),
(34, 'Russell Crowe'),
(77, 'Rutger Hauer'),
(175, 'Sacha Baron Cohen'),
(52, 'Sam Neill'),
(208, 'Sam Rockwell'),
(10, 'Samuel L. Jackson'),
(61, 'Santi Millán'),
(93, 'Sarah Berry'),
(220, 'Sarah Michelle Gellar'),
(203, 'Sarah Polley'),
(112, 'Sarah Silverman'),
(127, 'Scarlett Johansson'),
(202, 'Scott H. Reiniger'),
(78, 'Sean Young'),
(29, 'Sigourney Weaver'),
(189, 'Simon Callow'),
(114, 'Simon Pegg'),
(167, 'Stephen Chow'),
(150, 'Steve Buscemi'),
(211, 'Sylvester Groth'),
(106, 'Tara Reid'),
(135, 'Terrence Howard'),
(51, 'Terry Jones'),
(33, 'Tim Allen'),
(7, 'Tim Robbins'),
(134, 'Tim Roth'),
(118, 'Timothy Dalton'),
(46, 'Tobey Maguire'),
(31, 'Tom Hanks'),
(174, 'Tom Hardy'),
(128, 'Tom Hiddleston'),
(131, 'Tommy Lee Jones'),
(182, 'Trishelle Cannatella'),
(210, 'Ulrich Matthes'),
(11, 'Uma Thurman'),
(226, 'Val Kilmer'),
(144, 'Vin Diesel'),
(204, 'Ving Rhames'),
(58, 'Willem Dafoe'),
(72, 'Winona Ryder'),
(218, 'Yeardley Smith'),
(169, 'Yuen Wah'),
(141, 'Zoe Saldana');
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `almacena`
--
DROP TABLE IF EXISTS `almacena`;
CREATE TABLE IF NOT EXISTS `almacena` (
`id_storage` int(11) NOT NULL AUTO_INCREMENT,
`id_list` int(11) NOT NULL,
`id_movie` int(11) NOT NULL,
PRIMARY KEY (`id_storage`),
KEY `almacena_ibfk_1` (`id_movie`),
KEY `almacena_ibfk_2` (`id_list`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_spanish_ci AUTO_INCREMENT=2 ;
--
-- Volcado de datos para la tabla `almacena`
--
INSERT INTO `almacena` (`id_storage`, `id_list`, `id_movie`) VALUES
(1, 6, 63);
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `cines`
--
DROP TABLE IF EXISTS `cines`;
CREATE TABLE IF NOT EXISTS `cines` (
`id_cinema` int(11) NOT NULL AUTO_INCREMENT,
`address_cinema` varchar(100) COLLATE utf8_spanish_ci NOT NULL,
`name_cinema` varchar(35) COLLATE utf8_spanish_ci NOT NULL,
PRIMARY KEY (`id_cinema`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_spanish_ci AUTO_INCREMENT=6 ;
--
-- Volcado de datos para la tabla `cines`
--
INSERT INTO `cines` (`id_cinema`, `address_cinema`, `name_cinema`) VALUES
(1, 'Calle Silvano 77, Madrid', 'Dreams Cinema Palacio de Hielo'),
(2, 'Calle Montera 31, Madrid', 'Acteón'),
(3, 'Calle Alcalá 414, Madrid', 'Artesiete Alcalá'),
(4, 'Calle Doctor Cortezo 6, Madrid', 'Yelmo Cines Ideal'),
(5, 'Avenida Pablo iglesias 17, Fuenlabrada', 'Cinesa Loranca 3D');
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `compra_digital`
--
DROP TABLE IF EXISTS `compra_digital`;
CREATE TABLE IF NOT EXISTS `compra_digital` (
`id_buy_digital` int(11) NOT NULL AUTO_INCREMENT,
`id_movie` int(11) NOT NULL,
`id_user` int(11) NOT NULL,
`date_buy` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id_buy_digital`),
KEY `ibfk_compra_digital_1` (`id_user`),
KEY `ibfk_compra_digital_2` (`id_movie`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=8 ;
--
-- Volcado de datos para la tabla `compra_digital`
--
INSERT INTO `compra_digital` (`id_buy_digital`, `id_movie`, `id_user`, `date_buy`) VALUES
(2, 9, 2, '2015-06-10 16:05:41'),
(3, 84, 2, '2015-06-10 16:05:41'),
(4, 85, 2, '2015-06-10 16:05:41'),
(5, 63, 2, '2015-06-10 16:05:41'),
(6, 32, 2, '2015-06-10 16:05:41'),
(7, 20, 2, '2015-06-10 16:05:41');
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `compra_tickets`
--
DROP TABLE IF EXISTS `compra_tickets`;
CREATE TABLE IF NOT EXISTS `compra_tickets` (
`id_buy_tickets` int(11) NOT NULL AUTO_INCREMENT,
`id_movie` int(11) NOT NULL,
`id_user` int(11) NOT NULL,
`date_buy` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`tickets_buy` varchar(200) COLLATE utf8_spanish_ci DEFAULT NULL,
`id_cinema` int(11) DEFAULT NULL,
`hora_sesion` time NOT NULL,
PRIMARY KEY (`id_buy_tickets`),
KEY `compra_ibfk_1` (`id_movie`),
KEY `compra_ibfk_2` (`id_user`),
KEY `compra_ibfk_3` (`id_cinema`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_spanish_ci AUTO_INCREMENT=4 ;
--
-- Volcado de datos para la tabla `compra_tickets`
--
INSERT INTO `compra_tickets` (`id_buy_tickets`, `id_movie`, `id_user`, `date_buy`, `tickets_buy`, `id_cinema`, `hora_sesion`) VALUES
(2, 102, 2, '2015-06-10 16:05:41', '[[2,3],[2,4]]', 1, '13:30:00'),
(3, 103, 2, '2015-06-10 16:10:19', '[[2,5],[2,6]]', 1, '13:00:00');
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `directores`
--
DROP TABLE IF EXISTS `directores`;
CREATE TABLE IF NOT EXISTS `directores` (
`id_director` int(11) NOT NULL AUTO_INCREMENT,
`name_director` varchar(55) COLLATE utf8_spanish_ci NOT NULL,
PRIMARY KEY (`id_director`),
UNIQUE KEY `name_director` (`name_director`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_spanish_ci AUTO_INCREMENT=88 ;
--
-- Volcado de datos para la tabla `directores`
--
INSERT INTO `directores` (`id_director`, `name_director`) VALUES
(53, 'Alan Taylor'),
(87, 'Alexandre Aja'),
(60, 'Andrew Stanton'),
(40, 'Anthony C. Ferrante'),
(47, 'Anthony Russo'),
(42, 'Bob Peterson'),
(70, 'Bobby Farrelly'),
(58, 'Brad Bird'),
(62, 'Brenda Chapman'),
(80, 'Brian Levant'),
(18, 'Christopher Nolan'),
(30, 'Chuck Russel'),
(84, 'Colin Trevorrow'),
(63, 'Dan Scanlon'),
(78, 'Dani Levy'),
(38, 'Danny Boyle'),
(12, 'David Fincher'),
(56, 'David Silverman'),
(37, 'Drew Goddard'),
(44, 'Edgar Wright'),
(1, 'Francis Ford Coppola'),
(7, 'Frank Darabont'),
(76, 'Garth Jennings'),
(74, 'George A. Romero'),
(13, 'George Lucas'),
(21, 'Ivan Reitman'),
(33, 'James Cameron'),
(54, 'James Gunn'),
(73, 'Jay Roach'),
(46, 'Joe Johnston'),
(59, 'Joe Ranft'),
(48, 'Joe Russo'),
(81, 'Joel Schumacher'),
(14, 'John Hughes'),
(16, 'John Lasseter'),
(17, 'John McTiernan'),
(50, 'Jon Favreau'),
(45, 'Joss Whedon'),
(51, 'Kenneth Branagh'),
(5, 'King Vidor'),
(66, 'Larry Charles'),
(55, 'Lee Unkrich'),
(49, 'Louis Leterrier'),
(39, 'Loveleen Tandan'),
(31, 'Luc Besson'),
(24, 'Luis Piedrahita'),
(61, 'Mark Andrews'),
(86, 'Mark Burton'),
(65, 'Mark Mylod'),
(23, 'Mary Harron'),
(26, 'Matthew Vaughn'),
(3, 'Mervyn LeRoy'),
(9, 'Michael Curtiz'),
(27, 'Mike Figgis'),
(79, 'Oliver Hirschbiegel'),
(6, 'Orson Welles'),
(19, 'Pedro Temboury'),
(41, 'Pete Docter'),
(71, 'Peter Farrelly'),
(67, 'Peter Weir'),
(8, 'Quentin Tarantino'),
(83, 'Raja Gosnell'),
(43, 'Rich Moore'),
(85, 'Richard Starzak'),
(4, 'Richard Thorpe'),
(15, 'Ridley Scott'),
(25, 'Rodrigo Sopeña'),
(72, 'Ron Howard'),
(32, 'Sam Mendes'),
(36, 'Sam Raimi'),
(35, 'Sean S. Cunningham'),
(52, 'Shane Black'),
(11, 'Stanley Kubrick'),
(64, 'Stephen Chow'),
(82, 'Stephen Herek'),
(69, 'Steve Oedekerk'),
(10, 'Steven Spielberg'),
(20, 'Terry Gilliam'),
(22, 'Terry Jones'),
(29, 'Tim Burton'),
(68, 'Tom Shadyac'),
(28, 'Tom Six'),
(2, 'Victor Fleming'),
(34, 'Wes Craven'),
(75, 'Zack Snyder');
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `dirige`
--
DROP TABLE IF EXISTS `dirige`;
CREATE TABLE IF NOT EXISTS `dirige` (
`id_direction` int(11) NOT NULL AUTO_INCREMENT,
`id_director` int(11) NOT NULL,
`id_movie` int(11) NOT NULL,
PRIMARY KEY (`id_direction`),
KEY `dirige_ibfk_1` (`id_movie`),
KEY `dirige_ibfk_2` (`id_director`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_spanish_ci AUTO_INCREMENT=135 ;
--
-- Volcado de datos para la tabla `dirige`
--
INSERT INTO `dirige` (`id_direction`, `id_director`, `id_movie`) VALUES
(1, 1, 1),
(2, 2, 2),
(3, 3, 2),
(4, 4, 2),
(5, 5, 2),
(6, 6, 3),
(7, 7, 4),
(8, 8, 5),
(9, 9, 6),
(10, 1, 7),
(11, 10, 8),
(13, 10, 10),
(14, 12, 11),
(15, 13, 12),
(16, 14, 13),
(17, 15, 14),
(18, 16, 15),
(19, 15, 16),
(20, 17, 17),
(21, 18, 18),
(22, 19, 19),
(24, 21, 21),
(25, 20, 22),
(26, 22, 22),
(27, 10, 23),
(28, 10, 24),
(29, 23, 25),
(30, 24, 26),
(31, 25, 26),
(32, 26, 27),
(33, 27, 28),
(34, 28, 29),
(35, 29, 30),
(37, 15, 33),
(38, 31, 34),
(39, 32, 35),
(40, 33, 36),
(41, 34, 37),
(42, 35, 38),
(43, 36, 39),
(44, 36, 40),
(45, 36, 41),
(46, 37, 42),
(47, 8, 43),
(48, 8, 44),
(49, 38, 45),
(50, 39, 46),
(51, 41, 47),
(52, 42, 47),
(53, 43, 48),
(54, 44, 49),
(55, 44, 50),
(56, 13, 51),
(57, 13, 52),
(58, 45, 54),
(59, 46, 55),
(60, 47, 56),
(61, 48, 56),
(62, 49, 57),
(63, 50, 58),
(64, 50, 59),
(65, 51, 60),
(66, 52, 61),
(67, 53, 62),
(69, 16, 64),
(70, 16, 65),
(71, 55, 65),
(72, 41, 67),
(73, 55, 67),
(74, 56, 67),
(75, 60, 68),
(76, 55, 68),
(77, 58, 69),
(78, 16, 70),
(79, 59, 70),
(80, 58, 71),
(81, 60, 72),
(82, 61, 73),
(83, 62, 73),
(84, 55, 66),
(85, 63, 74),
(86, 64, 75),
(87, 18, 76),
(88, 18, 77),
(89, 18, 78),
(90, 65, 79),
(91, 66, 80),
(92, 66, 81),
(93, 66, 82),
(94, 67, 83),
(97, 70, 86),
(98, 71, 86),
(99, 72, 87),
(100, 68, 88),
(101, 70, 89),
(102, 71, 89),
(103, 73, 90),
(104, 73, 91),
(105, 74, 92),
(106, 75, 93),
(107, 76, 94),
(108, 78, 95),
(109, 79, 96),
(110, 56, 97),
(111, 83, 98),
(112, 29, 99),
(113, 29, 100),
(114, 81, 101),
(116, 82, 53),
(117, 18, 31),
(118, 58, 102),
(120, 68, 84),
(123, 30, 32),
(124, 20, 20),
(125, 84, 103),
(126, 86, 104),
(127, 85, 104),
(129, 87, 105),
(132, 11, 9),
(133, 69, 85),
(134, 54, 63);
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `generos`
--
DROP TABLE IF EXISTS `generos`;
CREATE TABLE IF NOT EXISTS `generos` (
`id_genre` int(3) NOT NULL AUTO_INCREMENT,
`name_genre` varchar(25) COLLATE utf8_spanish_ci NOT NULL,
PRIMARY KEY (`id_genre`),
UNIQUE KEY `name_genre` (`name_genre`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_spanish_ci AUTO_INCREMENT=28 ;
--
-- Volcado de datos para la tabla `generos`
--
INSERT INTO `generos` (`id_genre`, `name_genre`) VALUES
(1, 'Acción'),
(8, 'Animación'),
(9, 'Artes Marciales'),
(21, 'Aventuras'),
(24, 'Bélica'),
(12, 'Bíblica'),
(3, 'Ciencia Ficción'),
(10, 'Clase B'),
(2, 'Comedia'),
(26, 'Comedia adolescente'),
(4, 'Comedia negra'),
(18, 'Deportiva'),
(5, 'Drama'),
(6, 'Fantasía'),
(22, 'Gángsters'),
(16, 'Gore'),
(27, 'Guerra'),
(11, 'Histórica'),
(7, 'Musical'),
(17, 'Policiaca'),
(23, 'Romance'),
(19, 'Space Opera'),
(20, 'Superheroes'),
(15, 'Suspense'),
(13, 'Terror'),
(14, 'Thriller'),
(25, 'Thriller psicológico');
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `listas`
--
DROP TABLE IF EXISTS `listas`;
CREATE TABLE IF NOT EXISTS `listas` (
`id_list` int(11) NOT NULL AUTO_INCREMENT,
`id_user` int(11) NOT NULL,
`name_list` varchar(50) COLLATE utf8_spanish_ci NOT NULL,
PRIMARY KEY (`id_list`),
KEY `listas_ibfk_1` (`id_user`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_spanish_ci AUTO_INCREMENT=7 ;
--
-- Volcado de datos para la tabla `listas`
--
INSERT INTO `listas` (`id_list`, `id_user`, `name_list`) VALUES
(6, 2, 'Mis Favoritas');
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `mensajea`
--
DROP TABLE IF EXISTS `mensajea`;
CREATE TABLE IF NOT EXISTS `mensajea` (
`id_message` int(11) NOT NULL AUTO_INCREMENT,
`id_transmitter` int(11) NOT NULL,
`id_receiver` int(11) NOT NULL,
`content_message` varchar(500) COLLATE utf8_spanish_ci DEFAULT NULL,
PRIMARY KEY (`id_message`),
KEY `id_receiver` (`id_receiver`),
KEY `id_transmitter` (`id_transmitter`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_spanish_ci AUTO_INCREMENT=5 ;
--
-- Volcado de datos para la tabla `mensajea`
--
INSERT INTO `mensajea` (`id_message`, `id_transmitter`, `id_receiver`, `content_message`) VALUES
(4, 2, 4, 'sdf');
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `ofrece`
--
DROP TABLE IF EXISTS `ofrece`;
CREATE TABLE IF NOT EXISTS `ofrece` (
`id_offer` int(11) NOT NULL AUTO_INCREMENT,
`id_cinema` int(11) NOT NULL,
`id_movie` int(11) NOT NULL,
`tickets` varchar(1000) COLLATE utf8_spanish_ci DEFAULT NULL,
`hora` time NOT NULL,
PRIMARY KEY (`id_offer`),
KEY `ofrece_ibfk_1` (`id_cinema`),
KEY `ofrece_ibfk_2` (`id_movie`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_spanish_ci AUTO_INCREMENT=135 ;
--
-- Volcado de datos para la tabla `ofrece`
--
INSERT INTO `ofrece` (`id_offer`, `id_cinema`, `id_movie`, `tickets`, `hora`) VALUES
(1, 1, 31, '[[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]]', '16:30:00'),
(2, 1, 31, '[[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]]', '19:30:00'),
(3, 1, 31, '[[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]]', '22:30:00'),
(4, 2, 31, '[[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]]', '16:30:00'),
(5, 2, 31, '[[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]]', '19:30:00'),
(6, 2, 31, '[[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]]', '22:30:00'),
(7, 3, 31, '[[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]]', '16:30:00'),
(8, 3, 31, '[[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]]', '19:30:00'),
(9, 3, 31, '[[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]]', '22:30:00'),
(10, 4, 31, '[[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]]', '16:30:00'),
(11, 4, 31, '[[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]]', '19:30:00'),
(12, 4, 31, '[[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]]', '22:30:00'),
(14, 5, 31, '[[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]]', '16:30:00'),
(15, 5, 31, '[[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]]', '19:30:00'),
(16, 5, 31, '[[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]]', '22:30:00'),
(17, 1, 102, '[[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[2,2],[2,2],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]]', '13:30:00'),
(18, 1, 102, '[[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]]', '15:30:00'),
(19, 1, 102, '[[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]]', '17:30:00'),
(20, 1, 102, '[[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]]', '19:30:00'),
(21, 1, 102, '[[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]]', '21:30:00'),
(22, 2, 102, '[[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]]', '13:30:00'),
(23, 2, 102, '[[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]]', '15:30:00'),
(24, 2, 102, '[[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]]', '17:30:00'),
(25, 2, 102, '[[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]]', '19:30:00'),
(26, 2, 102, '[[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]]', '21:30:00'),
(27, 3, 102, '[[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]]', '13:30:00'),
(28, 3, 102, '[[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]]', '15:30:00'),
(29, 3, 102, '[[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]]', '17:30:00'),
(30, 3, 102, '[[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]]', '19:30:00'),
(31, 3, 102, '[[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]]', '21:30:00'),
(32, 4, 102, '[[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]]', '13:30:00'),
(33, 4, 102, '[[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]]', '15:30:00'),
(34, 4, 102, '[[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]]', '17:30:00'),
(35, 4, 102, '[[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]]', '19:30:00'),
(36, 4, 102, '[[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]]', '21:30:00'),
(37, 5, 102, '[[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]]', '13:30:00'),
(38, 5, 102, '[[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]]', '15:30:00'),
(39, 5, 102, '[[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]]', '17:30:00'),
(40, 5, 102, '[[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]]', '19:30:00'),
(41, 5, 102, '[[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]]', '21:30:00'),
(42, 1, 103, '[[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[2,2],[2,2],[0,0],[0,0],[0,0]]]', '13:00:00'),
(43, 1, 103, '[[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]]', '15:30:00'),
(44, 1, 103, '[[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]]', '18:00:00'),
(45, 1, 103, '[[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]]', '22:30:00'),
(46, 2, 103, '[[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]]', '13:00:00'),
(47, 2, 103, '[[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]]', '15:30:00'),
(48, 2, 103, '[[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]]', '18:00:00'),
(49, 2, 103, '[[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]]', '22:30:00'),
(50, 3, 103, '[[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]]', '13:00:00'),
(51, 3, 103, '[[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]]', '15:30:00'),
(52, 3, 103, '[[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]]', '18:00:00'),
(53, 3, 103, '[[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]]', '22:30:00'),
(54, 4, 103, '[[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]]', '13:00:00'),
(55, 4, 103, '[[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]]', '15:30:00'),
(56, 4, 103, '[[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]]', '18:00:00'),
(57, 4, 103, '[[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]]', '22:30:00'),
(58, 5, 103, '[[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]]', '13:00:00'),
(59, 5, 103, '[[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]]', '15:30:00'),
(60, 5, 103, '[[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]]', '18:00:00'),
(61, 5, 103, '[[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]]', '22:30:00'),
(62, 1, 104, '[[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]]', '14:30:00'),
(63, 1, 104, '[[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]]', '16:00:00'),
(64, 1, 104, '[[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]]', '17:30:00'),
(65, 1, 104, '[[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]]', '19:00:00'),
(66, 1, 104, '[[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]]', '20:30:00'),
(67, 1, 104, '[[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]]', '22:00:00'),
(68, 3, 104, '[[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]]', '14:30:00'),
(69, 3, 104, '[[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]]', '16:00:00'),
(70, 3, 104, '[[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]]', '17:30:00'),
(71, 3, 104, '[[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]]', '19:00:00'),
(72, 3, 104, '[[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]]', '20:30:00'),
(73, 3, 104, '[[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]]', '22:00:00'),
(74, 5, 104, '[[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]]', '14:30:00'),
(75, 5, 104, '[[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]]', '16:00:00'),
(76, 5, 104, '[[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]]', '17:30:00'),
(77, 5, 104, '[[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]]', '19:00:00'),
(78, 5, 104, '[[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]]', '20:30:00'),
(79, 5, 104, '[[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]]', '22:00:00'),
(110, 1, 105, '[[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]]', '13:00:00'),
(111, 1, 105, '[[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]]', '15:00:00'),
(112, 1, 105, '[[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]]', '17:00:00'),
(113, 1, 105, '[[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]]', '19:00:00'),
(114, 1, 105, '[[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]]', '21:00:00'),
(115, 2, 105, '[[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]]', '13:00:00'),
(116, 2, 105, '[[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]]', '15:00:00'),
(117, 2, 105, '[[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]]', '17:00:00'),
(118, 2, 105, '[[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]]', '19:00:00'),
(119, 2, 105, '[[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]]', '21:00:00'),
(120, 3, 105, '[[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]]', '13:00:00'),
(121, 3, 105, '[[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]]', '15:00:00'),
(122, 3, 105, '[[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]]', '17:00:00'),
(123, 3, 105, '[[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]]', '19:00:00'),
(124, 3, 105, '[[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]]', '21:00:00'),
(125, 4, 105, '[[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]]', '13:00:00'),
(126, 4, 105, '[[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]]', '15:00:00'),
(127, 4, 105, '[[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]]', '17:00:00'),
(128, 4, 105, '[[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]]', '19:00:00'),
(129, 4, 105, '[[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]]', '21:00:00'),
(130, 5, 105, '[[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]]', '13:00:00'),
(131, 5, 105, '[[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]]', '15:00:00'),
(132, 5, 105, '[[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]]', '17:00:00'),
(133, 5, 105, '[[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]]', '19:00:00'),
(134, 5, 105, '[[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]]', '21:00:00');
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `participa`
--
DROP TABLE IF EXISTS `participa`;
CREATE TABLE IF NOT EXISTS `participa` (
`id_participation` int(11) NOT NULL AUTO_INCREMENT,
`id_movie` int(11) NOT NULL,
`id_actor` int(11) NOT NULL,
PRIMARY KEY (`id_participation`),
KEY `participa_ibfk_1` (`id_movie`),
KEY `participa_ibfk_2` (`id_actor`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_spanish_ci AUTO_INCREMENT=363 ;
--
-- Volcado de datos para la tabla `participa`
--
INSERT INTO `participa` (`id_participation`, `id_movie`, `id_actor`) VALUES
(1, 1, 1),
(2, 1, 2),
(3, 2, 3),
(4, 2, 4),
(5, 3, 5),
(6, 3, 6),
(7, 4, 7),
(8, 4, 8),
(9, 5, 9),
(10, 5, 10),
(11, 5, 11),
(12, 5, 12),
(13, 6, 13),
(14, 6, 14),
(15, 7, 2),
(16, 7, 15),
(17, 8, 16),
(18, 8, 17),
(21, 10, 20),
(22, 10, 21),
(23, 11, 22),
(24, 11, 23),
(25, 11, 24),
(26, 12, 25),
(27, 12, 26),
(28, 13, 27),
(29, 13, 28),
(30, 14, 29),
(31, 14, 30),
(32, 15, 31),
(33, 15, 32),
(34, 15, 33),
(35, 16, 34),
(36, 16, 35),
(37, 16, 36),
(38, 17, 12),
(39, 17, 37),
(40, 17, 38),
(41, 18, 39),
(42, 18, 40),
(43, 18, 41),
(44, 19, 42),
(45, 19, 43),
(49, 21, 47),
(50, 21, 48),
(51, 21, 29),
(52, 22, 49),
(53, 22, 50),
(54, 22, 51),
(55, 23, 52),
(56, 23, 53),
(57, 23, 10),
(58, 24, 31),
(59, 24, 54),
(60, 24, 55),
(61, 24, 56),
(62, 25, 57),
(63, 25, 58),
(64, 25, 24),
(65, 26, 59),
(66, 26, 60),
(67, 26, 61),
(68, 27, 62),
(69, 27, 63),
(70, 27, 64),
(71, 28, 64),
(72, 28, 65),
(73, 28, 66),
(74, 29, 67),
(75, 29, 68),
(76, 30, 69),
(77, 30, 70),
(78, 30, 71),
(79, 30, 72),
(80, 31, 73),
(81, 31, 74),
(82, 31, 54),
(85, 33, 26),
(86, 33, 77),
(87, 33, 78),
(88, 34, 12),
(89, 34, 79),
(90, 34, 80),
(91, 35, 81),
(92, 35, 82),
(93, 36, 29),
(94, 36, 83),
(95, 36, 84),
(96, 37, 85),
(97, 37, 86),
(98, 37, 44),
(99, 38, 87),
(100, 38, 88),
(101, 38, 89),
(102, 39, 90),
(103, 39, 91),
(104, 39, 92),
(105, 40, 90),
(106, 40, 93),
(107, 40, 94),
(108, 41, 90),
(109, 41, 95),
(110, 41, 96),
(111, 42, 97),
(112, 42, 98),
(113, 42, 99),
(114, 43, 11),
(115, 43, 100),
(116, 43, 101),
(117, 44, 11),
(118, 44, 102),
(119, 44, 100),
(120, 44, 101),
(121, 45, 103),
(122, 45, 104),
(123, 46, 105),
(124, 46, 106),
(125, 46, 107),
(126, 47, 108),
(127, 47, 109),
(128, 47, 110),
(129, 48, 111),
(130, 48, 112),
(131, 48, 113),
(132, 49, 114),
(133, 49, 115),
(134, 49, 116),
(135, 49, 117),
(136, 50, 114),
(137, 50, 116),
(138, 50, 118),
(139, 51, 25),
(140, 51, 26),
(141, 51, 119),
(142, 52, 25),
(143, 52, 26),
(144, 52, 119),
(145, 53, 120),
(146, 53, 121),
(147, 53, 122),
(148, 54, 123),
(149, 54, 124),
(150, 54, 125),
(151, 54, 98),
(152, 54, 126),
(153, 54, 127),
(154, 54, 128),
(155, 54, 10),
(156, 55, 124),
(157, 55, 129),
(158, 55, 130),
(159, 55, 131),
(160, 56, 124),
(161, 56, 127),
(162, 56, 10),
(163, 56, 132),
(164, 57, 23),
(165, 57, 133),
(166, 57, 134),
(167, 58, 123),
(168, 58, 135),
(169, 58, 136),
(170, 59, 123),
(171, 59, 137),
(172, 59, 136),
(173, 59, 127),
(174, 59, 10),
(175, 60, 98),
(176, 60, 138),
(177, 60, 128),
(178, 60, 139),
(179, 61, 123),
(180, 61, 21),
(181, 61, 136),
(182, 62, 98),
(183, 62, 138),
(184, 62, 128),
(185, 62, 139),
(191, 64, 145),
(192, 64, 81),
(193, 64, 146),
(194, 65, 31),
(195, 65, 33),
(196, 65, 147),
(197, 66, 31),
(198, 66, 33),
(199, 66, 147),
(200, 67, 148),
(201, 67, 149),
(202, 67, 150),
(203, 68, 151),
(204, 68, 58),
(205, 68, 152),
(206, 69, 153),
(207, 69, 10),
(208, 69, 154),
(209, 70, 155),
(210, 70, 156),
(211, 70, 157),
(212, 71, 158),
(213, 71, 159),
(214, 71, 160),
(215, 72, 161),
(216, 72, 162),
(217, 72, 163),
(218, 73, 164),
(219, 73, 165),
(220, 73, 166),
(221, 74, 148),
(222, 74, 149),
(223, 74, 145),
(224, 74, 150),
(225, 75, 167),
(226, 75, 168),
(227, 75, 169),
(228, 76, 57),
(229, 76, 20),
(230, 76, 170),
(231, 76, 171),
(232, 76, 8),
(233, 76, 79),
(234, 77, 57),
(235, 77, 172),
(236, 77, 173),
(237, 77, 171),
(238, 77, 79),
(239, 77, 8),
(240, 78, 57),
(241, 78, 74),
(242, 78, 174),
(243, 78, 40),
(244, 78, 171),
(245, 78, 79),
(246, 79, 175),
(247, 79, 176),
(248, 79, 177),
(249, 80, 175),
(250, 80, 178),
(251, 80, 179),
(252, 80, 180),
(253, 81, 175),
(254, 81, 181),
(255, 81, 182),
(256, 82, 175),
(257, 82, 183),
(258, 82, 21),
(259, 83, 75),
(260, 83, 184),
(261, 83, 185),
(262, 83, 186),
(269, 86, 75),
(270, 86, 190),
(271, 86, 191),
(272, 87, 75),
(273, 87, 192),
(274, 87, 193),
(275, 88, 75),
(276, 88, 194),
(277, 88, 8),
(278, 89, 76),
(279, 89, 195),
(280, 89, 196),
(281, 90, 15),
(282, 90, 195),
(283, 90, 197),
(284, 91, 195),
(285, 91, 15),
(286, 91, 198),
(287, 91, 199),
(288, 91, 197),
(289, 92, 200),
(290, 92, 201),
(291, 92, 202),
(292, 93, 203),
(293, 93, 204),
(294, 93, 205),
(295, 94, 206),
(296, 94, 207),
(297, 94, 208),
(298, 95, 209),
(299, 95, 210),
(300, 95, 211),
(301, 96, 212),
(302, 96, 213),
(303, 96, 214),
(304, 97, 215),
(305, 97, 216),
(306, 97, 217),
(307, 97, 218),
(308, 97, 151),
(309, 98, 219),
(310, 98, 220),
(311, 98, 221),
(312, 99, 69),
(313, 99, 222),
(314, 99, 223),
(315, 100, 69),
(316, 100, 224),
(317, 100, 225),
(318, 101, 226),
(319, 101, 227),
(320, 101, 228),
(321, 101, 131),
(322, 101, 75),
(323, 102, 230),
(324, 102, 229),
(327, 84, 75),
(328, 84, 78),
(329, 84, 187),
(338, 32, 75),
(339, 32, 76),
(340, 20, 44),
(341, 20, 45),
(342, 20, 46),
(343, 103, 231),
(344, 103, 140),
(345, 104, 173),
(346, 104, 232),
(348, 105, 233),
(353, 9, 18),
(354, 9, 19),
(355, 85, 75),
(356, 85, 188),
(357, 85, 189),
(358, 63, 140),
(359, 63, 141),
(360, 63, 142),
(361, 63, 143),
(362, 63, 144);
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `peliculas`
--
DROP TABLE IF EXISTS `peliculas`;
CREATE TABLE IF NOT EXISTS `peliculas` (
`id_movie` int(11) NOT NULL AUTO_INCREMENT,
`title_movie` varchar(50) CHARACTER SET utf8 NOT NULL,
`poster_movie` varchar(200) CHARACTER SET utf8 DEFAULT NULL,
`sinopsis_movie` varchar(500) CHARACTER SET utf8 NOT NULL DEFAULT 'Sin sinopsis por ahora',
`year_movie` varchar(4) CHARACTER SET utf8 DEFAULT NULL,
`format_movie` enum('Digital','Taquilla') CHARACTER SET utf8 NOT NULL DEFAULT 'Digital',
`price_movie` float NOT NULL DEFAULT '5',
`duration_movie` int(4) NOT NULL DEFAULT '0',
`awards_movie` int(3) DEFAULT '0',
`age_calification` varchar(45) CHARACTER SET utf8 NOT NULL,
`trailer_movie` varchar(150) CHARACTER SET utf8 DEFAULT NULL,
`archive_url` varchar(250) COLLATE utf8_spanish_ci DEFAULT NULL,
PRIMARY KEY (`id_movie`),
UNIQUE KEY `title_movie` (`title_movie`),
KEY `fk_movie_format` (`format_movie`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_spanish_ci AUTO_INCREMENT=106 ;
--
-- Volcado de datos para la tabla `peliculas`
--
INSERT INTO `peliculas` (`id_movie`, `title_movie`, `poster_movie`, `sinopsis_movie`, `year_movie`, `format_movie`, `price_movie`, `duration_movie`, `awards_movie`, `age_calification`, `trailer_movie`, `archive_url`) VALUES
(1, 'El Padrino', 'elpadrino.png\r\n', 'Don Vito Corleone es el respetado y temido jefe de una de las cinco familias de la mafia de Nueva York. Tiene cuatro hijos: Connie, el impulsivo Sonny, el pusilánime Freddie y Michael, que no quiere saber nada de los negocios de su padre. Cuando Corleone, en contra de los consejos de "Il consigliere" Tom Hagen, se niega a intervenir en el negocio de las drogas, el jefe de otra banda ordena su asesinato. Empieza entonces una violenta y cruenta guerra entre las familias mafiosas.', '1972', 'Digital', 5, 175, 18, '+18', 'https://www.youtube.com/watch?v=COQvkUmN6H8', 'El-Padrino.mp4'),
(2, 'El Mago de Oz', 'magodeoz.png\r\n', 'Dorothy, que sueña con viajar "más allá del arco iris", ve su deseo hecho realidad cuando un tornado se la lleva al mundo de Oz.Tras ofender a la Malvada Bruja del Oeste, la niña se dirige hacia la Ciudad Esmeralda, donde vive el todopoderoso Mago de Oz, que puede ayudarla a regresar a Kansas. Durante el viaje, se hace amiga de 3 personajes, convencidos de que el Mago también les puede ayudar a ellos, deciden unirse a Dorothy en su odisea hasta la Ciudad Esmeralda.', '1939', 'Digital', 5, 101, 1, 'Todos los públicos', 'https://www.youtube.com/watch?v=1aIWvRHoarM', NULL),
(3, 'Ciudadano Kane', 'ciudadanokane.png\r\n', 'Un importante magnate estadounidense, Charles Foster Kane, muere en Xanadú, su fabuloso castillo de estilo oriental. La última palabra que pronuncia antes de expirar, ”Rosebud”, cuyo significado es un enigma, despierta una enorme curiosidad tanto en la prensa como entre la población. Así las cosas, un grupo de periodistas emprende una investigación para desentrañar el misterio.', '1941', 'Digital', 5, 119, 1, '+10', 'https://www.youtube.com/watch?v=QaXQX4Hz8SM', NULL),
(4, 'Cadena Perpetua', 'cadenaperpetua.png\r\n', 'Acusado del asesinato de su mujer, Andrew Dufresne, tras ser condenado a cadena perpetua, es enviado a la cárcel de Shawshank. Con el paso de los años conseguirá ganarse la confianza del director del centro y el respeto de sus compañeros de prisión, especialmente de Red, el jefe de la mafia de los sobornos.', '1994', 'Digital', 5, 142, 2, '+12', 'https://www.youtube.com/watch?v=6hB3S9bIaco', NULL),
(5, 'Pulp Fiction', 'pulpfiction.png\r\n', 'Jules y Vincent, dos asesinos a sueldo con muy pocas luces, trabajan para Marsellus Wallace. Vincent le confiesa a Jules que Marsellus le ha pedido que cuide de Mia, su mujer. Jules le recomienda prudencia porque es muy peligroso sobrepasarse con la novia del jefe. Cuando llega la hora de trabajar, ambos deben ponerse manos a la obra. Su misión: recuperar un misterioso maletín. ', '1994', 'Digital', 5, 153, 4, '+18', 'https://www.youtube.com/watch?v=ZFYCXAG6fdo', NULL),
(6, 'Casablanca', 'casablanca.png\r\n', 'Durante la Segunda Guerra Mundial, Casablanca era una ciudad a la que llegaban huyendo del nazismo gente de todas partes. El objetivo de la policía secreta alemana es el líder checo y héroe de la resistencia Victor Laszlo, cuya única esperanza es Rick Blaine, antiguo amante de su mujer, Ilsa. Cuando Ilsa se ofrece a quedarse a cambio de un visado para sacar a Laszlo del país, Rick deberá elegir entre su propia felicidad o el idealismo que rigió su vida en el pasado.', '1942', 'Digital', 5, 102, 3, 'Todos los públicos', 'https://www.youtube.com/watch?v=rXUAQQjNh5g', NULL),
(7, 'El Padrino II', 'elpadrino2.png\r\n', 'Continuación de la historia de los Corleone por medio de dos historias paralelas: la elección de Michael Corleone como jefe de los negocios familiares y los orígenes del patriarca, el ya fallecido Don Vito, primero en Sicilia y luego en Estados Unidos, donde, empezando desde abajo, llegó a ser un poderosísimo jefe de la mafia de Nueva York.', '1974', 'Digital', 5, 200, 4, '+18', 'https://www.youtube.com/watch?v=2X4hIriy8U8', NULL),
(8, 'ET el Extraterrestre', 'etextraterrestre.png\r\n', 'Un pequeño ser de otro planeta se queda abandonado en la Tierra cuando su nave, al emprender el regreso, se olvida de él. Está completamente solo y tiene miedo, pero se hará amigo de un niño, que lo esconde en su casa. El pequeño y sus hermanos intentan encontrar la forma de que el pequeño extraterrestre regrese a su planeta antes de que lo encuentren los científicos y la policía.', '1982', 'Digital', 5, 115, 4, 'Todos los públicos', 'https://www.youtube.com/watch?v=jzC0c-GWeDQ', NULL),
(9, '2001: Una Odisea en el Espacio', 'odiseaespacio.png\r\n', 'Narra los diversos periodos de la historia de la humanidad, no sólo del pasado, sino también del futuro. Hace millones de años, unos primates descubren un monolito que los conduce a un estadio de inteligencia superior. Millones de años después, otro monolito, enterrado en una luna, despierta el interés de los científicos. Durante una misión de la NASA, una máquina dotada de inteligencia artificial, se encarga de controlar todos los sistemas de una nave espacial tripulada.', '1968', 'Digital', 5, 160, 4, '+13', 'https://www.youtube.com/watch?v=PfQ9QGgptns', 'Odisea-en-el-espacio.mp4'),
(10, 'La lista de Schindler', 'listaschindler.png\r\n', 'Segunda Guerra Mundial. Oskar Schindler organiza un ambicioso plan para ganarse la simpatía de los nazis. Después de la invasión de Polonia por los alemanes, consigue la propiedad de una fábrica de Cracovia. Allí emplea a cientos de operarios judíos, cuya explotación le hace prosperar rápidamente. Su gerente, también judío, es el verdadero director en la sombra, pues Schindler carece completamente de conocimientos para dirigir una empresa.', '1993', 'Digital', 5, 195, 4, '+18', 'https://www.youtube.com/watch?v=CIsLXCDiAIg', NULL),
(11, 'El Club de la Lucha', 'clubdelalucha.png', 'Un joven hastiado de su gris y monótona vida lucha contra el insomnio. En un viaje en avión conoce a un carismático vendedor de jabón que sostiene una teoría muy particular: el perfeccionismo es cosa de gentes débiles; sólo la autodestrucción hace que la vida merezca la pena. Ambos deciden entonces fundar un club secreto de lucha, donde poder descargar sus frustaciones y su ira, que tendrá un éxito arrollador.', '1999', 'Digital', 5, 139, 0, '+18', 'https://www.youtube.com/watch?v=WJ7YOEoPnpY', NULL),
(12, 'Star Wars Episodio IV: Una Nueva Esperanza', 'swiv.png\r\n', 'a princesa Leia, líder del movimiento rebelde que desea reinstaurar la República en la galaxia, es capturada por las Fuerzas Imperiales, capitaneadas por el implacable Darth Vader. El intrépido y joven Luke Skywalker, ayudado por Han Solo, capitán de la nave espacial "El Halcón Milenario", y los androides, R2D2 y C3PO, serán los encargados de luchar contra el enemigo y e intentar rescatar a la princesa para volver a instaurar la justicia en el seno de la galaxia.', '1977', 'Digital', 5, 121, 7, 'Todos los públicos', 'https://www.youtube.com/watch?v=UNgvt2TlGU8', NULL),
(13, 'El club de los cinco', 'clubdelos5.png\r\n', 'Cinco estudiantes de distinta educación, formación y gustos son castigados a pasar un sábado en el instituto en el que estudian. Pronto las desavenencias entre ellos aparecen, especialmente cuando el director que les vigila se ausenta del aula... Comedia juvenil de culto de los años ochenta.', '1985', 'Digital', 5, 97, 1, '+13', 'https://www.youtube.com/watch?v=qtyZCg61INs', NULL),
(14, 'Alien, El octavo pasajero', 'alien.png\r\n', 'De regreso a la Tierra, la nave de carga Nostromo interrumpe su viaje y despierta a sus siete tripulantes. El ordenador central, MADRE, ha detectado la misteriosa transmisión de una forma de vida desconocida, procedente de un planeta cercano aparentemente deshabitado. La nave se dirige entonces al extraño planeta para investigar el origen de la comunicación.', '1979', 'Digital', 5, 117, 4, '+13', 'https://www.youtube.com/watch?v=D3oC17nILkw', NULL),
(15, 'Toy Story', 'toystory.png\r\n', 'Los juguetes de Andy, un niño de 6 años, temen que haya llegado su hora y que un nuevo regalo de cumpleaños les sustituya en el corazón de su dueño. Woody, un vaquero que ha sido hasta ahora el juguete favorito de Andy, trata de tranquilizarlos hasta que aparece Buzz Lightyear, un héroe espacial dotado de todo tipo de avances tecnológicos. Woody es relegado a un segundo plano. Su constante rivalidad se transformará en una gran amistad cuando ambos se pierden en la ciudad sin saber cómo volver a ', '1995', 'Digital', 5, 81, 2, 'Todos los públicos', 'https://www.youtube.com/watch?v=Y1RwAChTewA', NULL),
(16, 'Gladiator', 'gladiator.png\r\n', 'En el año 180, el Imperio Romano domina todo el mundo conocido. Tras una gran victoria sobre los bárbaros del norte, el anciano emperador Marco Aurelio decide transferir el poder a Máximo, bravo general de sus ejércitos y hombre de inquebrantable lealtad al imperio. Pero su hijo Cómodo, que aspiraba al trono, no lo acepta y trata de asesinar a Máximo.', '2000', 'Digital', 5, 155, 7, '+18', 'https://www.youtube.com/watch?v=N9S1KadxMms', NULL),
(17, 'Jungla de Cristal', 'junglacristal.png\r\n', 'En lo alto de la ciudad de Los Ángeles, un grupo terrorista se ha apoderado de un edificio tomando a un grupo de personas como rehenes. Sólo un hombre, el policía de Nueva York John McClane, ha conseguido escapar del acoso terrorista. Aunque está solo y fuera de servicio, Mc Clane se enfrentará a los secuestradores. Él es la única esperanza para los rehenes.', '1988', 'Digital', 5, 131, 2, '+18', 'https://www.youtube.com/watch?v=-7o-c34j0Uc', NULL),
(18, 'Origen', 'origen.png\r\n', 'Dom Cobb es un experto en el arte de apropiarse de los secretos del subconsciente ajeno. La habilidad de Cobb le ha convertido en un hombre muy cotizado en el mundo del espionaje, pero también lo ha condenado a ser un fugitivo. Su única oportunidad para cambiar de vida será hacer exactamente lo contrario de lo que ha hecho siempre: la incepción, que consiste en implantar una idea en el subconsciente en lugar de sustraerla.', '2010', 'Digital', 5, 148, 5, '+12', 'https://www.youtube.com/watch?v=RV9L7ui9Cn8', NULL),
(19, 'Karate a muerte en Torremolinos', 'torremolinos.png\r\n', 'Torremolinos, año 2000. El malévolo Dr. Malvedades llega a la ciudad para resucitar a cuatro karatecas que murieron ahogados en la la bahía de Málaga cuando ejercían como asesinos a sueldo durante la II Guerra Mundial. Con la ayuda de los zombies, secuestrará a cinco adolescentes recién desvirgadas, a quienes utilizará para despertar al monstruo Jocántaro, engendro mitad centollo mitad pulpo que dormita en algún lugar de la costa, y conseguir dominar el mundo. ', '2003', 'Digital', 5, 79, 0, 'Todos los públicos', 'https://www.youtube.com/watch?v=SadAPEPsuzU', NULL),
(20, 'Miedo y Asco en Las Vegas', 'miedovegas.png\r\n', 'Un periodista y un misterioso abogado que viajan en un descapotable rojo se dirigen, a través del desierto, a Las Vegas. El maletero del coche es una auténtica farmacia: dos bolsas de marihuana, 75 pastillas de mescalina, 5 hojas de ácidos y muchas otras drogas.', '1998', 'Digital', 5, 118, 1, '+18', 'https://www.youtube.com/watch?v=rYZzgVtIZNU', 'Miedo-y-asco-en-Las Vegas.3gp'),
(21, 'Los cazafantasmas', 'cazafantasmas.png\r\n', 'A los doctores Venkman, Stantz y Spengler, expertos en parapsicología, no les conceden una beca de investigación que habían solicitado. Al encontrarse sin trabajo, deciden fundar la empresa "Los Cazafantasmas", dedicada a limpiar Nueva York de ectoplasmas. El aumento repentino de apariciones espectrales en la ciudad será el presagio de la llegada de un peligroso y poderoso demonio. ', '1984', 'Digital', 5, 105, 2, 'Todos los públicos', 'https://www.youtube.com/watch?v=UGqw7tVp4T0', NULL),
(22, 'Monty Python y los caballeros de la mesa cuadrada', 'montypython.png\r\n', 'Segunda película de los Monty Python, en la que abordan la historia del legendario rey Arturo y de sus caballeros que van a la búsqueda del Santo Grial. ', '1974', 'Digital', 5, 91, 1, 'Todos los públicos', 'https://www.youtube.com/watch?v=RDM75-oXGmQ', NULL),
(23, 'Parque Jurásico', 'jurassicpark.png\r\n', 'El multimillonario John Hammond consigue hacer realidad su sueño de clonar dinosaurios del Jurásico y crear con ellos un parque temático en una isla remota. Antes de abrirlo al público, invita a una pareja de eminentes científicos y a un matemático para que comprueben la viabilidad del proyecto. Pero las medidas de seguridad del parque no prevén el instinto de supervivencia de la madre naturaleza ni la codicia humana.', '1993', 'Digital', 5, 127, 4, '+13', 'https://www.youtube.com/watch?v=dPwvOBT9zNI', NULL),
(24, 'Salvar al soldado Ryan', 'salvarsoldadoryan.png\r\n', ' Tras el desembarco de los Aliados en Normandía, a un grupo de soldados americanos se le encomienda una peligrosa misión: poner a salvo al soldado James Ryan. Los hombres de la patrulla del capitán John Miller deben arriesgar sus vidas para encontrar a este soldado, cuyos tres hermanos han muerto en la guerra. Lo único que se sabe del soldado Ryan es que se lanzó con su escuadrón de paracaidistas detrás de las líneas enemigas. ', '1998', 'Digital', 5, 1998, 7, '+13', 'https://www.youtube.com/watch?v=BM4P7FpEoLc', NULL),
(25, 'American Psycho', 'americanpsycho.png\r\n', 'Patrick Bateman es un espécimen soberbiamente elaborado que cumple todos los requisitos de Master del Universo. Es prácticamente perfecto, como casi todos en su mundo e intenta desesperadamente encajar en él. Cuando más intenta ser como cualquier otro hombre adinerado de Wall Street, más anónimo se vuelve y menos control tiene sobre sus terribles instintos y su insaciable sed de sangre.', '2000', 'Digital', 5, 101, 1, '+13', 'https://www.youtube.com/watch?v=XKEX1aaf1DI', NULL),
(26, 'La Habitación de Fermat', 'habitacionfermat.png\r\n', 'Cuatro matemáticos, que no se conocen entre sí, son invitados por un misterioso anfitrión con el pretexto de resolver un gran enigma. Pronto descubren que se encuentran en una sala que empieza a menguar y que corren el riesgo de morir aplastados entre sus paredes. Tendrán entonces que averiguar qué relación hay entre ellos y por qué alguien quiere asesinarlos.', '2007', 'Digital', 5, 90, 4, '+16', 'https://www.youtube.com/watch?v=5O4RpFjipCI', NULL),
(27, 'Kick-Ass', 'kickass.png\r\n', 'Un estudiante de instituto que pasa inadvertido entre sus compañeros, apasionado de los cómics, un día concibe la idea de convertirse en un superhéroe, aunque no tenga superpoderes. Pero la vida de Dave cambiará para siempre cuando conozca a un par de locos vigilantes, la terremoto de 11 años Hit Girl y su padre Big Daddy, y forje amistad con un joven que lucha contra el crimen, Red Mist. Y cuando todos se tengan que enfrentar al jefe de la mafia local.', '2010', 'Digital', 5, 117, 15, '+16', 'https://www.youtube.com/watch?v=g_Z9S-qvt5o', NULL),
(28, 'Leaving Las Vegas', 'leavingvegas.png\r\n', 'Ben Sanderson, un guionista alcohólico, acaba de perder su trabajo en Hollywood debido a que sus problemas con la bebida afectan a su rendimiento. Sin amigos y sin familia, decide ir a Las Vegas con el propósito de beber hasta morir. Nada más llegar a la ciudad, conoce a Sera, una atractiva prostituta de la que se queda prendado.', '1995', 'Digital', 5, 112, 1, '+13', 'https://www.youtube.com/watch?v=yxVJOSwxty4', NULL),
(29, 'El Ciempiés Humano', 'ciempieshumano.png\r\n', 'Dos chicas norteamericanas que viajan a través de Europa tienen una avería en el coche en mitad de un bosque, en Alemania. Buscando ayuda llegan a una casa aislada y, al día siguiente, despiertan atrapadas en un tétrico sótano junto a un hombre japonés. Poco después descubren que están en manos de un siniestro médico alemán que anteriormente era un cirujano especializado en separar a gemelos siameses. Sin embargo, para ellos tiene otro plan, en los límites de lo imaginable...', '2009', 'Digital', 5, 91, 3, '+18', 'https://www.youtube.com/watch?v=vs4-2od3AIg', NULL),
(30, 'Beetlejuice', 'beetlejuice.png\r\n', 'Un matrimonio de fantasmas contrata los servicios de Beetlejuice, un especialista en asustar mortales, para que ahuyente a los nuevos propietarios de su casa.', '1988', 'Digital', 5, 92, 2, 'Todos los públicos', 'https://www.youtube.com/watch?v=Gpg6OzvwuiA', NULL),
(31, 'Interstellar', 'interstellar.png\r\n', 'Al ver que la vida en la Tierra está llegando a su fin, un grupo de exploradores liderados por el piloto Cooper y la científica Amelia se embarca en la que puede ser la misión más importante de la historia de la humanidad y emprenden un viaje más allá de nuestra galaxia en el que descubrirán si las estrellas pueden albergar el futuro de la raza humana. ', '2014', 'Taquilla', 7, 169, 3, '+7', 'https://www.youtube.com/watch?v=9Lk6A_tq3DA', NULL),
(32, 'La Máscara', 'mascara.png\r\n', 'Stanley Ipkiss es un empleado de banca extremadamente amable, pero desgraciadamente es un pusilánime cuando tiene que enfrentarse a alguien. Tras uno de los peores días de su vida, Stanley encuentra una máscara que representa a Loki, un dios de la malicia y la travesura. Cuando se coloca la máscara se convierte en una persona completamente diferente.', '1994', 'Digital', 5, 97, 1, '+13', 'https://www.youtube.com/watch?v=GXsKPxBRXWI', 'La-Mascara.3gp'),
(33, 'Blade Runner', 'bladerunner.png\r\n', 'La poderosa Tyrell Corporation creó un robot llamado Nexus 6, un ser virtualmente idéntico al hombre pero superior a él en fuerza y agilidad, al que se dio el nombre de Replicante. Estos robots trabajaban como esclavos en las colonias exteriores de la Tierra. Después de la sangrienta rebelión de un equipo de Nexus 6, los Replicantes fueron desterrados de la Tierra. Los Blade Runners, tenían órdenes de matar a todos los que no hubieran acatado la condena.', '1982', 'Digital', 5, 117, 4, '+13', 'https://www.youtube.com/watch?v=kPeYlNUIjZE', NULL),
(34, 'El Quinto Elemento', 'quintoelemento.png\r\n', 'Cada 5.000 años se abre una puerta entre dos dimensiones. En una dimensión existe el Universo y la vida. En la otra dimensión existe un elemento que no está hecho ni de tierra, ni de fuego, ni de aire, ni de agua, sino que es una anti-energía, la anti-vida: es el quinto elemento.', '1993', 'Digital', 5, 127, 2, '+13', 'https://www.youtube.com/watch?v=aB-AUTGqUCU', NULL),
(35, 'American Beauty', 'americanbeauty.png\r\n', 'Lester Burnham, un cuarentón en crisis, cansado de su trabajo y de su mujer Carolyn, despierta de su letargo cuando conoce a la atractiva amiga de su hija, a la que intentará impresionar a toda costa.', '1999', 'Digital', 5, 122, 8, '+18', 'https://www.youtube.com/watch?v=aQOYD53oNe8', NULL),
(36, 'Alien El regreso', 'alien2.png\r\n', 'La oficial Ripley y la tripulación de la nave “Nostromo” se habían enfrentado a esa monstruosa criatura, Alien. Y sólo Ripley sobrevivió a la masacre. Después de vagar por el espacio durante varios años, Ripley fue rescatada. Durante ese tiempo, el planeta de Alien ha sido colonizado. Pero, de repente, se pierde la comunicación con la colonia y se envía una expedición de marines espaciales, capitaneados por Ripley. Allí les esperan miles de espeluznantes criaturas.', '1986', 'Digital', 5, 132, 3, '+18', 'https://www.youtube.com/watch?v=LqXIE7igywg', NULL),
(37, 'Pesadilla en Elm Street', 'pesadillaelmstreet.png\r\n', 'Varios jóvenes de una pequeña localidad tienen habitualmente pesadillas en las que son perseguidos por un hombre deformado por el fuego y que usa un guante terminado en afiladas cuchillas. Algunos de ellos comienzan a ser asesinados mientras duermen por este ser, que resulta ser un asesino al que los padres de estos jóvenes quemaron vivo hace varios años tras descubrir que había asesinado a varios niños.', '1984', 'Digital', 5, 94, 1, '+18', 'https://www.youtube.com/watch?v=UDMdTTvoD5A', NULL),
(38, 'Viernes 13', 'viernes13.png\r\n', 'Varios jóvenes pasan sus vacaciones en un campamento de verano, reabierto recientemente, y en el que unos años antes murió un joven ahogado en el lago. En poco tiempo, algunos de ellos son encontrados sin vida.', '1980', 'Digital', 5, 95, 1, '+18', 'https://www.youtube.com/watch?v=dgoYIJ-badI', NULL),
(39, 'Evil Dead', 'evildead.png\r\n', 'Cinco chicos van a pasar el fin de semana a una cabaña perdida en un espeso bosque en las montañas de Tennessee. Una vez instalados, y cuando se encuentran cenando, la trampilla que da acceso al sótano se abre de golpe. Extrañados, deciden bajar a investigar. Allí encuentran un magnetófono, un extraño cuchillo ritual y un libro antiquísimo.', '1981', 'Digital', 5, 85, 1, '+18', 'https://www.youtube.com/watch?v=cgH-uwm3C94', NULL),
(40, 'Evil Dead II', 'evildead2.png\r\n', 'El bueno de Ash se dispone a pasar un fin de semana en el bosque con su novia. Pero todo se va al traste cuando reproducen una cinta en la que un profesor había grabado varios pasajes del Necronomicon, el Libro de los Muertos. El hechizo convoca a una fuerza demoniaca que convierte a la compañera de Ash en un monstruo ávido de carne. Sin saberlo, él y sus compañeros se disponen a pasar una noche en una cabaña en medio del bosque con un demonio en casa.', '1987', 'Digital', 5, 85, 1, '+18', 'https://www.youtube.com/watch?v=7fIUYxqA0wg', NULL),
(41, 'Evil Dead III', 'evildead3.png\r\n', 'Inglaterra, siglo XIII. Las fuerzas del Mal ejercen su reinado en la Edad Media. Valerosos caballeros se disponen a entrar en desigual batalla, mientras los atemorizados campesinos se refugian tras los muros del castillo. Todo cambia con la inesperada llegada de un nuevo héroe, provisto de sofisticadas armas y que dice provenir del siglo XX.', '1992', 'Digital', 5, 89, 0, '+18', 'https://www.youtube.com/watch?v=CmUZYVoWkCo', NULL),
(42, 'Cabin in the Woods', 'cabinwoods.png\r\n', 'Cinco estudiantes universitarios se preparan para pasar el fin de semana en una cabaña situada en un remoto bosque. En el sótano encuentran una extraña colección de recuerdos; entre ellos, un diario que habla de la antigua familia que ocupó la casa. Mientras, un par de técnicos en una planta industrial se están preparando para una operación. Están filmando a los jóvenes con cámaras ocultas, los técnicos manipulan el medio ambiente .', '2012', 'Digital', 5, 95, 1, '+18', 'https://www.youtube.com/watch?v=mZXgfyITdto', NULL),
(43, 'Kill Bill: Volumen 1', 'killbill1.png\r\n', 'El día de su boda, una asesina profesional sufre el ataque de algunos miembros de su propia banda, que obedecen las órdenes de Bill, el jefe de la organización criminal. Logra sobrevivir al ataque, aunque queda en coma. Cuatro años después despierta dominada por un gran deseo de venganza. ', '2003', 'Digital', 5, 110, 3, '+13', 'https://www.youtube.com/watch?v=ot6C1ZKyiME', NULL),
(44, 'Kill Bill: Volumen 2', 'killbill2.png\r\n', 'Tras eliminar a algunos miembros de la banda que intentaron asesinarla el día de su boda, "Mamba Negra" intenta acabar con los demás, especialmente con Bill, su antiguo jefe, que la había dado por muerta.', '2004', 'Digital', 5, 136, 1, '+18', 'https://www.youtube.com/watch?v=NSR7xRGBnOE', NULL),
(45, 'Slumdog Millionaire', 'slumdog.png\r\n', 'Jamal Malik es un adolescente pobre de los suburbios de Bombay que participa en la versión hindú del popular programa "¿Quién quiere ser millonario?". A punto de conseguir 20 millones de rupias, que es el premio máximo del concurso, el joven es interrogado por la policía, que sospecha que está haciendo trampas. Pero para cada una de las preguntas, Jamal tiene una respuesta. ', '2008', 'Digital', 5, 120, 12, '+13', 'https://www.youtube.com/watch?v=QygldUZhhO8', NULL),
(46, 'Sharknado', 'sharknado.png\r\n', 'La trama se centra en una ciudad que está aterrorizada por miles de tiburones que han sido transportados por un huracán. Cuando los tornados se empiezan a formar, los mortíferos escualos comienzan su destrucción en el agua, la tierra y en el aire.', '2013', 'Digital', 5, 86, 1, '+13', 'https://www.youtube.com/watch?v=X56cEyd4U7w', NULL),
(47, 'Up', 'up.png\r\n', 'Carl Fredricksen es un viudo vendedor de globos de 78 años que, finalmente, consigue llevar a cabo el sueño de su vida: enganchar miles de globos a su casa y salir volando rumbo a América del Sur. Pero ya estando en el aire y sin posibilidad de retornar Carl descubre que viaja acompañado de Russell, un explorador que tiene ocho años y un optimismo a prueba de bomba.', '2009', 'Digital', 5, 96, 3, 'Todos los públicos', 'https://www.youtube.com/watch?v=qoZo9MiICo0', NULL),
(48, 'Rompe Ralph', 'romperalph.png\r\n', 'Durante décadas, Ralph ha vivido a la sombra de Repara-Félix Jr., el chico bueno de su videojuego. Cansado de ser el malo de la historia, Ralph decide tomar el asunto por sus propias y gigantes manos, y se lanza en un viaje a través de los distintos mundos y generaciones de videojuegos para demostrarle al mundo que él también puede ser un héroe. ', '2012', 'Digital', 5, 120, 1, 'Todos los públicos', 'https://www.youtube.com/watch?v=FlKdyQavzdE', NULL),
(49, 'Shaun of the Dead', 'shaunofthedead.png\r\n', 'Shaun se pasa la vida en la taberna local, "The Winchester", con su amigo Ed, discute con su madre y descuida a su novia, Liz. Cuando Liz le deja plantado, Shaun decide poner su vida en orden. Pero los muertos están volviendo a la vida. Asique armado con un palo de cricket y una pala, emprende una guerra sin cuartel contra una horda de zombies para rescatar a su madre y a su novia llevándolos a todos al lugar más seguro y protegido que conoce: "The Winchester".', '2004', 'Digital', 5, 99, 1, '+13', 'https://www.youtube.com/watch?v=XlAsMAVLAZE', NULL),
(50, 'Hot Fuzz', 'hotfuzz.png\r\n', 'Un superpolicía londinense, de los que disparan a dos manos y saltan sobre el capó de los coches en marcha, es enviado a un pueblecito de la campiña inglesa que, en realidad, no es tan tranquilo como parece.', '2007', 'Digital', 5, 121, 0, '+13', 'https://www.youtube.com/watch?v=ayTnvVpj9t4', NULL),
(51, 'Star Wars Episodio V: El Imperio Contraataca', 'swv.png\r\n', 'Tras un ataque sorpresa de las tropas imperiales a las bases camufladas de la alianza rebelde, Luke Skywalker, en compañía de R2D2, parte hacia el planeta Dagobah en busca de Yoda, el último maestro Jedi, para que le enseñe los secretos de la Fuerza. Mientras, Han Solo, la princesa Leia, Chewbacca, y C3PO esquivan a las fuerzas imperiales y piden refugio al antiguo propietario del Halcón Milenario, Lando Calrissian, donde les prepara una trampa urdida por Darth Vader.', '1980', 'Digital', 5, 124, 4, 'Todos los públicos', 'https://www.youtube.com/watch?v=vZd57NIVKLY', NULL),
(52, 'Star Wars Episodio VI: El Retorno del Jedi', 'swvi.png\r\n', 'Para ir a Tatooine y liberar a Han Solo, Luke Skywalker y la princesa Leia deben infiltrarse en la peligrosa guarida de Jabba the Hutt. Una vez reunidos, el equipo recluta a tribus de Ewoks para combatir a las fuerzas imperiales. Mientras tanto, el Emperador y Darth Vader conspiran para atraer a Luke al lado oscuro, pero el joven está decidido a reavivar el espíritu del Jedi en su padre.', '1983', 'Digital', 5, 128, 2, 'Todos los públicos', 'https://www.youtube.com/watch?v=syeqY1PXtLw', NULL),
(53, 'Bill and Ted''s Excellent Adventure', 'billandted.png\r\n', 'Bill y Ted, de diecisiete años, amigos y miembros de una banda de rock, sienten más interés por la música que por sus estudios. El día de su graduación está cerca y deben aprobar como sea el examen de Historia. Las cosas están difíciles para los chicos, sin embargo, la aparición de un personaje inesperado va a serles de crucial ayuda. Se trata de Rufus, un emisario del futuro, que les ofrece un alucinante viaje en el tiempo.', '1989', 'Digital', 5, 90, 0, 'Todos los públicos', 'https://www.youtube.com/watch?v=sFy17auuK08', NULL),
(54, 'Los Vengadores', 'vengadores.png\r\n', 'Cuando un enemigo inesperado surge como una gran amenaza para la seguridad mundial, Nick Fury, director de la Agencia SHIELD, decide reclutar a un equipo para salvar al mundo de un desastre casi seguro. Adaptación del cómic de Marvel "Los Vengadores", el legendario grupo de superhéroes formado por Ironman, Hulk, Thor y el Capitán América entre otros.', '2012', 'Digital', 5, 142, 4, '+7', 'https://www.youtube.com/watch?v=eOrNdBpGMv8', NULL),
(55, 'Capitán América: El Primer Vengador', 'capitanamerica1.png\r\n', 'Steve Rogers creció como un chico enclenque en una familia pobre. Decidió enrolarse en el ejército; pero debido a su precaria salud, fue rechazado. Enternecido por sus súplicas, el General Chester Phillips le ofreció la oportunidad de participar en un experimento especial: la "Operación Renacimiento". El cuerpo de Steve se hace perfecto. Se sometió a un intensivo programa de entrenamiento físico y táctico. Tres meses después, le encomendaron su primera misión como Capitán América.', '2011', 'Digital', 5, 124, 0, '+7', 'https://www.youtube.com/watch?v=EMX7UdiRuGs', NULL),
(56, 'Capitán América: El Soldado de Invierno', 'capitanamerica2.png\r\n', 'Tras los devastadores acontecimientos acaecidos en Nueva York con Los Vengadores, el Capitán América, vive tranquilamente en Washington D.C. intentando adaptarse al mundo moderno. Pero cuando atacan a un colega de S.H.I.E.L.D., Steve se ve envuelto en una trama de intrigas que representa una amenaza para el mundo. Se unirá entonces a la Viuda Negra para desenmascarar a los conspiradores.', '2014', 'Digital', 5, 136, 0, 'Todos los públicos', 'https://www.youtube.com/watch?v=jwOp9DLfsqk', NULL),
(57, 'El Increíble Hulk', 'hulk.png\r\n', 'El científico Bruce Banner recorre el mundo en busca de un antídoto que le permita librarse de su Alter Ego. Perseguido por el ejército y dominado por su propia rabia, es incapaz de sacarse de la cabeza a Betty Ross, por lo que decide volver a la civilización. Mientras se enfrenta a una extraña criatura, el agente de la KGB Emil Blonsky se expone a una dosis de radiación más intensa que la que convirtió a Bruce en Hulk.', '2008', 'Digital', 5, 114, 0, 'Todos los públicos', 'https://www.youtube.com/watch?v=U-ld923GXIQ', NULL),
(58, 'Iron Man', 'ironman.png\r\n', 'El multimillonario fabricante de armas Tony Stark debe enfrentarse a su turbio pasado después de sufrir un accidente con una de sus armas. Equipado con una armadura de última generación tecnológica, se convierte en "El hombre de hierro", un héroe que se dedica a combatir el mal en todo el mundo.', '2008', 'Digital', 5, 126, 0, 'Todos los públicos', 'https://www.youtube.com/watch?v=GwgePyzkC34', NULL),
(59, 'Iron Man 2', 'ironman2.png\r\n', 'El mundo ya sabe que el multimillonario Tony Stark es Iron Man, el superhéroe enmascarado. A pesar de las presiones del gobierno, la prensa y la opinión pública para que comparta su tecnología con el ejército, Tony es reacio a desvelar los secretos de la armadura de Iron Man, porque teme que esa información caiga en en manos de irresponsables. Con Pepper Potts y James Rhodey Rhodes a su lado, Tony forja alianzas nuevas y se enfrenta a nuevas y poderosas fuerzas.', '2010', 'Digital', 5, 125, 0, 'Todos los públicos', 'https://www.youtube.com/watch?v=Ab_mvS68xng', NULL),
(60, 'Thor', 'thor.png\r\n', 'Thor es un arrogante y codicioso guerrero cuya imprudencia desata una antigua guerra. Por ese motivo, su padre Odín lo castiga desterrándolo a la Tierra para que viva entre los hombres y descubra así el verdadero sentido de la humildad. Cuando el villano más peligroso de su mundo envía a la Tierra a las fuerzas más oscuras de Asgard, Thor se dará cuenta de lo que realmente hace falta para ser un verdadero héroe.', '2011', 'Digital', 5, 0, 115, 'Todos los públicos', 'https://www.youtube.com/watch?v=IYvSUXaeZ5Q', NULL),
(61, 'Iron Man 3', 'ironman3.png\r\n', 'El descarado y brillante empresario Tony Stark se enfrentará a un enemigo cuyo poder no conoce límites. Cuando Stark comprende que su enemigo ha destruido su universo personal, se embarca en una angustiosa búsqueda para encontrar a los responsables. Este viaje pondrá a prueba su entereza una y otra vez. Acorralado, Stark tendrá que sobrevivir por sus propios medios, confiando en su ingenio y su instinto para proteger a las personas que quiere.', '2013', 'Digital', 5, 135, 0, 'Todos los públicos', 'https://www.youtube.com/watch?v=6dhCPF_Jsco', NULL),
(62, 'Thor: The Dark World', 'thor2.png\r\n', 'Thor lucha por restablecer el orden en el cosmos, pero una antigua raza liderada por el vengativo Malekith regresa con el propósito de volver a sumir el universo en la oscuridad. Se trata de un villano con el que ni siquiera Odín y Asgard se atreven a enfrentarse; por esa razón, Thor tendrá que emprender un viaje muy peligroso, durante el cual se reunirá con Jane Foster y la obligará a sacrificarlo todo para salvar el mundo.', '2013', 'Digital', 5, 112, 0, 'Todos los públicos', 'https://www.youtube.com/watch?v=npvJ9FTgZbM', NULL),
(63, 'Guardianes de la Galaxia', 'guardianesgalaxia.png\r\n', 'El aventurero Peter Quill es objeto de un implacable cazarrecompensas después de robar una misteriosa esfera codiciada por Ronan, un poderoso villano. Para poder escapar de Ronan, se ve obligado a pactar una tregua con un cuarteto de disparatados inadaptados: Rocket el mapache, Groot, un humanoide con forma de árbol, la enigmática Gamora y Drax the Destroyer. Pero cuando Quill descubre el poder de la esfera, deberá derrotar a sus rivales en un intento desesperado de salvar la galaxia.', '2014', 'Digital', 5, 122, 1, 'Todos los públicos', 'https://www.youtube.com/watch?v=Oxc1OyjVhtQ', 'Guardianes-de-la-galaxia.mp4'),
(64, 'Bichos', 'bichos.png\r\n', 'Un grupo de saltamontes asalta cada verano la colonia de hormigas donde vive Flick, para apoderarse de las provisiones que han recogido durante el invierno. Un día, Flick abandona el hormiguero y parte en busca de insectos guerreros que les ayuden a defenderse de los temibles saltamontes, pero, al final, acaba reclutando a una troupe circense.', '1998', 'Digital', 5, 96, 0, 'Todos los públicos', 'https://www.youtube.com/watch?v=s44vZsmWJK0', NULL),
(65, 'Toy Story 2', 'toystory2.png\r\n', 'Cuando Andy se va de campamento dejando solos a los juguetes, Al McWhiggin, un compulsivo coleccionista de juguetes valiosos, secuestra a Woody. Buzz Lightyear y los demás juguetes tendrán que actuar con rapidez si quieren rescatarlo. Durante la operación de rescate no sólo tendrán que afrontar múltiples peligros, sino que también vivirán divertidas situaciones.', '1999', 'Digital', 5, 92, 0, 'Todos los públicos', 'https://www.youtube.com/watch?v=Lu0sotERXhI', NULL),
(66, 'Toy Story 3', 'toystory3.png\r\n', 'Cuando su dueño Andy se prepara para ir a la universidad, el vaquero Woody, el astronauta Buzz y el resto de sus amigos juguetes comienzan a preocuparse por su incierto futuro. Efectivamente todos acaban en una guardería, donde por ejemplo la muñeca Barbie conocerá al guapo Ken. Esta reunión de nuestros amigos con otros nuevos juguetes no será sino el principio de una serie de trepidantes y divertidas aventuras.', '2010', 'Digital', 5, 103, 2, 'Todos los públicos', 'https://www.youtube.com/watch?v=Lu0sotERXhI', NULL),
(67, 'Monstruos S.A.', 'monstruos.png\r\n', 'Monsters Inc. es la mayor empresa de miedo del mundo, y James P. Sullivan es uno de sus mejores empleados. Asustar a los niños no es un trabajo fácil, ya que todos creen que los niños son tóxicos y no pueden tener contacto con ellos. Pero un día una niña se cuela sin querer en la empresa, provocando el caos.', '2001', 'Digital', 5, 1, 1, 'Todos los públicos', 'https://www.youtube.com/watch?v=Z5TTrL6Tr2Y', NULL),
(68, 'Buscando a Nemo', 'nemo.png\r\n', 'El pececillo Nemo, que es hijo único, es muy querido y protegido por su padre. Después de ser capturado en un arrecife australiano va a parar a la pecera de la oficina de un dentista de Sidney. Su tímido padre emprenderá una peligrosa aventura para rescatarlo. Pero Nemo y sus nuevos amigos tienen también un astuto plan para escapar de la pecera y volver al mar.', '2003', 'Digital', 5, 0, 1, '100', 'https://www.youtube.com/watch?v=ozseLMnv1Es', NULL),
(69, 'Los Increíbles', 'increibles.png\r\n', 'Una familia de superhéroes casi retirados, son obligados a volver a la acción. Bob Paar solía ser uno de los más grandes superhéroes del mundo ("Mr. Increíble"), salvaba vidas y luchaba contra villanos a diario. Han pasado 15 años, y Bob y su mujer (una famosa ex-superheroína por derecho propio) han adoptado una identidad civil y se han retirado a la periferia para llevar una vida normal con sus tres hijos.', '2004', 'Digital', 5, 115, 1, 'Todos los públicos', 'https://www.youtube.com/watch?v=eMzejXYKT_Y', NULL),
(70, 'Cars', 'cars.png\r\n', 'El aspirante a campeón de carreras Rayo McQueen parece que está a punto de conseguir el éxito, la fama y todo lo que había soñado, hasta que por error toma un desvío inesperado en la polvorienta y solitaria Ruta 66. Su actitud arrogante se desvanece cuando llega a una pequeña comunidad olvidada que le enseña las cosas importantes de la vida que había olvidado.', '2006', 'Digital', 5, 116, 0, 'Todos los públicos', 'https://www.youtube.com/watch?v=1uq5eJHwio4', NULL),
(71, 'Ratatouille', 'ratatouille.png\r\n', 'Remy es una rata que sueña con convertirse en un gran chef francés a pesar de la oposición de su familia y del problema que supone ser una rata en una profesión que detesta a los roedores. El destino lleva a Remy a las alcantarillas de París, se encuentra justo debajo de un restaurante que se ha hecho famoso gracias a Auguste Gusteau, una estrella de la nouvelle cuisine. A pesar del peligro que representa ser un visitante poco común en los fogones de un exquisito restaurante francés. ', '2007', 'Digital', 5, 110, 1, 'Todos los públicos', 'https://www.youtube.com/watch?v=b5ZNJoS2RtI', NULL),
(72, 'WALL-E', 'walle.png\r\n', 'En el año 2800, en un planeta Tierra devastado y sin vida, tras cientos de años haciendo aquello para lo que fue construido, limpiar el planeta de basura, el pequeño robot WALL-E descubre una nueva misión en su vida cuando se encuentra con una moderna y lustrosa robot exploradora llamada EVE. Ambos viajarán a lo largo de la galaxia y vivirán una emocionante e inolvidable aventura...', '2008', 'Digital', 5, 98, 1, 'Todos los públicos', 'https://www.youtube.com/watch?v=D8kwXBZIOUE', NULL),
(73, 'Brave', 'brave.png\r\n', 'Merida, la indómita hija del Rey Fergus y de la Reina Elinor, es una hábil arquera que decide romper con una antigua costumbre, que es sagrada para los señores de la tierra. Las acciones de Merida desencadenan el caos y la furia en el reino. Pide ayuda a una sabia anciana que le concede un deseo muy desafortunado. La muchacha tendrá que afrontar grandes peligros antes de aprender qué es la auténtica valentía.', '2012', 'Digital', 5, 0, 1, 'Todos los públicos', 'https://www.youtube.com/watch?v=SjDME1tkTbI', NULL),
(74, 'Monsters University', 'monstruosuniversity.png\r\n', 'Mike Wazowski y James P. Sullivan son amigos inseparables, pero no fue siempre así. Cuando se conocieron en la Universidad, no se podían soportar, pero acabaron superando sus diferencias y se convirtieron en los mejores amigos. Precuela de la exitosa "Monstruos, S.A.".', '2013', 'Digital', 5, 104, 0, 'Todos los públicos', 'https://www.youtube.com/watch?v=Yh-aMVF_Wjk', NULL),
(75, 'Kung Fu Sion', 'kungfusion.png\r\n', 'La historia se sitúa durante el caos pre-revolucionario de los años 40 en China. Sing es un delincuente con poca suerte decidido a entrar en el Axe Gang, uno de los clanes mafiosos más importantes de China. Para lograrlo, Sing pretende sacar dinero de los vecinos de un bloque de casas, pero pronto descubre que éstos no son lo que parecen. La banda Axe Gang acude a la zona y una serie de sucesos lleva hasta la confrontación final entre los vecinos y los delincuentes.', '2004', 'Digital', 5, 95, 0, 'Todos los públicos', 'https://www.youtube.com/watch?v=CMQPMdDq2Os', NULL),
(76, 'Batman Begins', 'batmanbegins.png\r\n', 'Bruce Wayne vive obsesionado con el recuerdo de sus padres. Atormentado por el dolor, recorre el mundo hasta que encuentra a un extraño personaje que lo adiestra en todas las disciplinas físicas y mentales, la Liga de las Sombras, dirigida por Ra''s Al Ghul. Cuando Bruce vuelve a Gotham, la ciudad está dominada por el crimen y la corrupción. Wayne libera a su alter ego: Batman, un justiciero enmascarado que utiliza la fuerza, la inteligencia y la más alta tecnología para combatir el mal.', '2005', 'Digital', 5, 140, 0, '+12', 'https://www.youtube.com/watch?v=JIGLjChePqk', NULL),
(77, 'The Dark Knight', 'darknight.png\r\n', 'Bruce Wayne regresa para continuar su guerra contra el crimen. Con la ayuda del teniente Jim Gordon y del Fiscal del Distrito Harvey Dent, Batman se propone destruir el crimen organizado en la ciudad de Gotham. El triunvirato demuestra su eficacia, pero, de repente, aparece Joker, un nuevo criminal que desencadena el caos y tiene aterrados a los ciudadanos.', '2008', 'Digital', 5, 152, 1, '+13', 'https://www.youtube.com/watch?v=emYLYfuZAbU', NULL),
(78, 'The Dark Knight Rises', 'darknightrises.png\r\n', 'Batman desapareció, dejando de ser un héroe para convertirse en un fugitivo. Al asumir la culpa por la muerte del fiscal del distrito Harvey Dent. La mentira funciona durante un tiempo, pero todo cambia con la llegada de una astuta gata ladrona que pretende llevar a cabo un misterioso plan.Mucho más peligroso es Bane, un terrorista enmascarado cuyos despiadados planes obligan a Bruce a regresar de su voluntario exilio.', '2012', 'Digital', 5, 165, 0, '+18', 'https://www.youtube.com/watch?v=5sDUVj6YykE', NULL),
(79, 'Ali G anda suelto', 'alig.png\r\n', 'El Centro de Ocio John Nike va a cerrar por falta de fondos. Le preocupa el destino del club alternativo de boy scouts que ha estado dirigiendo hasta ese momento. Decidido a salvar el centro se encadena para protestar. Consigue llamar la atención del primer ministro, que buscaba a un joven intelectual que le ayudase a ganar las elecciones. El político convence a Ali de que la mejor forma de salvar el centro es presentarse a las elecciones para el Gobierno, y Ali le toma la palabra. ', '2002', 'Digital', 5, 85, 0, '+13', 'https://www.youtube.com/watch?v=eCONwfrjY_w', NULL),
(80, 'Borat', 'borat.png\r\n', 'Borat, un reportero de Kazajistán. Por orden de su gobierno, el periodista va a Estados Unidos para rodar un documental pedagógico, que debe recoger las mejores enseñanzas de los USA para que su país las aproveche. Pero el trabajo no será tan fácil como parece...', '2006', 'Digital', 5, 84, 0, '+13', 'https://www.youtube.com/watch?v=feU2-Br4cMs', NULL),
(81, 'Bruno', 'bruno.png\r\n', 'Bruno, un reportero gay, con cierta obsesión por la moda y por el culto al cuerpo. Esto le llevará a parodiar a los diseñadores de alta costura y modelos.', '2009', 'Digital', 5, 81, 0, '+18', 'https://www.youtube.com/watch?v=e_uT0bcMOew', NULL),
(82, 'El Dictador', 'dictador.png\r\n', 'El Almirante Haffaz Aladeen, un dictador antioccidental, arriesga su vida con tal de evitar el establecimiento de la democracia en Wadiya, un país norteafricano con recursos petrolíferos. Su más fiel consejero es su tío Tamir. Por desgracia para Aladeen, Occidente ha empezado a inmiscuirse en los asuntos de Wadiya. Tras sufrir un atentado que le cuesta la vida a uno de sus consejeros, Tamir convence a Aladeen para que vaya a Nueva York a solucionar la cuestión en la ONU.', '2012', 'Digital', 5, 83, 0, '+16', 'https://www.youtube.com/watch?v=Ai61eHS0tpM', NULL),
(83, 'El Show de Truman', 'truman.png\r\n', 'Truman Burbank es un hombre corriente y algo ingenuo que ha vivido toda su vida en uno de esos pueblos donde nunca pasa nada. Sin embargo, de repente, unos extraños sucesos le hacen sospechar que algo anormal está ocurriendo. Todos sus amigos son actores, toda su ciudad es un plató, toda su vida está siendo filmada y emitida como el reality más ambicioso de la historia.', '1998', 'Digital', 5, 135, 3, 'Todos los públicos', 'https://www.youtube.com/watch?v=IYqEpdTy0xE', NULL),
(84, 'Ace Ventura', 'aceventura.png\r\n', 'El detective Ace Ventura, especializado en rescatar animales secuestrados, recibe el encargo de localizar y rescatar el delfin Copo de Nieve, mascota del equipo de fútbol de Miami, que ha sido secuestrado el día anterior a la gran final que debe disputar el equipo.', '1994', 'Digital', 5, 86, 0, 'Todos los públicos', 'https://www.youtube.com/watch?v=Sg7Il74pOxE', 'Ace-Ventura.3gp'),
(85, 'Ace Ventura 2: Operación Africa', 'aceventura2.png\r\n', 'Intentando superar el trauma que le ha dejado el fracaso de su última misión, en la que no pudo evitar que muriera el mapache que tenía que rescatar, el inefable detective Ace Ventura se retira a un monasterio budista. Pero, una vez allí, un extraño personaje le ofrece una fuerte suma de dinero para que trate de encontrar al animal sagrado de una tribu.', '1995', 'Digital', 5, 90, 0, 'Todos los públicos', 'https://www.youtube.com/watch?v=jhoFzCYPTl4', 'Ace-Ventura-2.mp4'),
(86, 'Yo, Yo Mismo e Irene', 'yoyoirene.png\r\n', 'Charlie es un inocente y amable policía de Rhode Island que es todo un caballero, además de un abnegado padre soltero de tres hijos de color que su esposa tuvo tras una aventura. Pero un día Charlie, conocido por su buen carácter, no soporta más que le tomen por blando y sufre de repente un trastorno de personalidad, convirtiéndose en alguien completamente distinto, en el que sale a relucir su hiperagresivo álter ego... ', '2000', 'Digital', 5, 95, 0, '+13', 'https://www.youtube.com/watch?v=CZScZP91JE4', NULL),
(87, 'El Grinch', 'grinch.png\r\n', 'El Grinch es una especie de ogro verde que siempre ha vivido aislado en la cima de una montaña, en las afueras de Villa Quién. Habituado a la soledad, lo que le destroza los nervios son los villancicos que la gente del pueblo canta en Navidad; para vengarse, decide robar los regalos de Santa Claus.', '2000', 'Digital', 5, 105, 0, 'Todos los públicos', 'https://www.youtube.com/watch?v=NZ8RsgiIxIQ', NULL),
(88, 'Como Dios', 'comodios.png\r\n', 'Tras pasar el peor día de su vida, el reportero de televisión Bruce Nolan desafía a Dios reprochándole lo mal que está administrando el mundo. Dios acepta el reto, le otorga todos sus poderes y lo conmina a hacerlo mejor que él.', '2003', 'Digital', 5, 101, 0, '+13', 'https://www.youtube.com/watch?v=icuTE1A2e2E', NULL),
(89, 'Algo pasa con Mary', 'algopasaconmary.png\r\n', 'Ted Strohehmann ha vivido angustiado durante 14 años de su vida. La razón de su desgracia no es otra que la famosa Mary Jensen, la chica a la que todos desean y con la que por fin consigue tener una cita en la fiesta de graduación. Pero un desgraciado accidente con la cremallera del pantalón arruina sus planes. Ahora parece que tendrá otra oportunidad.', '1998', 'Digital', 5, 119, 1, 'Todos los públicos', 'https://www.youtube.com/watch?v=lW0RiZFJons', NULL),
(90, 'Los padres de Ella', 'padresdeella.png\r\n', 'Greg Focker es un enfermero que, tras anunciar su compromiso con novia Pam, tiene que pasar unos días con los padres de ella, para conocerles. Su encuentro inicial no será muy afortunado, en especial por las suspicacias que Greg levanta en el estricto padre de la novia, un padre protector que ha trabajado para la CIA', '2000', 'Digital', 5, 103, 1, 'Todos los públicos', 'https://www.youtube.com/watch?v=bcz-G9Nv8b0', NULL),
(91, 'Los padres de Él', 'padresdeel.png\r\n', 'Cuatro años después de que el enfermero Greg Focker, durante un fin de semana en casa de sus suegros, por fin, ha conseguido ganarse la confianza de su suegro y todo son planes de boda. Sólo queda un pequeño escollo que superar: los futuros consuegros deben pasar un fin de semana juntos para conocerse mejor y para que Jack, el padre de la novia, pueda estudiar a los padres de Greg. Todo parece ir viento en popa hasta que Jack descubre que los padres de Greg.', '2004', 'Digital', 5, 110, 1, 'Todos los públicos', 'https://www.youtube.com/watch?v=SMzj5ojILHA', NULL),
(92, 'Dawn of the Dead (1978)', 'dawndead1978.png\r\n', 'La epidemia que hace resucitar a los muertos convertidos en seres ávidos de carne humana se ha extendido, llegando al punto en el que varias ciudades han quedado prácticamente desiertas. Los supervivientes deben refugiarse en zonas militares ya que los zombies no dudan en acabar con sus propios familiares...', '1978', 'Digital', 5, 126, 0, '+18', 'https://www.youtube.com/watch?v=Yd-z5wBeFTU', NULL),
(93, 'Dawn of the Dead (2004)', 'dawndead2004.png\r\n', 'Una inexplicable plaga ha diezmado la población del planeta, convirtiendo a los muertos en horribles zombies que continuamente buscan carne y sangre humana para sobrevivir. En Wisconsin, un variopinto grupo de personas que han escapado a la plaga, tratan de salvar la vida refugiándose en un centro comercial, donde deben aprender no sólo a protegerse de las hordas de zombies, sino también a convivir.', '2004', 'Digital', 5, 100, 0, '+18', 'https://www.youtube.com/watch?v=j69OPw9nFHw', NULL);
INSERT INTO `peliculas` (`id_movie`, `title_movie`, `poster_movie`, `sinopsis_movie`, `year_movie`, `format_movie`, `price_movie`, `duration_movie`, `awards_movie`, `age_calification`, `trailer_movie`, `archive_url`) VALUES
(94, 'La Guía del Autoestopista Galáctico', 'autoestopistagalactico.png\r\n', 'La casa de Arthur Dent está a punto de ser derribada, descubre que su mejor amigo es un alien y, por si esto fuera poco, la Tierra está a punto de ser aniquilada para construir una autopista espacial. La única salida de Arthur es embarcar en algún vehiculo espacial. La gran aventura empieza precisamente el día en que el mundo se acaba. Arthur acaba descubriendo el significado de la vida y averigua que todo lo que necesita saber está en un libro: la Guía del Autoestopista Galáctico.', '2005', 'Digital', 5, 110, 0, 'Todos los públicos', 'https://www.youtube.com/watch?v=SF9KHCqRGug', NULL),
(95, 'Mein Führer', 'meinfuhrer.png\r\n', 'Diciembre de 1944: la "guerra total" está totalmente perdida. Goebbels, sin embargo, no está dispuesto a ser derrotado tan fácilmente. Durante el día del Año Nuevo, se supone que el Führer debe reactivar el espíritu de lucha del público con un discurso agresivo. El único problema es que el Führer no puede hacerlo. Enfermo y depresivo, evita el contacto con el pueblo. La única persona que ahora le puede ayudar es su antiguo profesor de interpretación, Adolfo Grünbaum... un judío.', '2007', 'Digital', 5, 87, 0, '+13', 'https://www.youtube.com/watch?v=_OqgHXMMg20', NULL),
(96, 'El Hundimiento', 'elhundimiento.png\r\n', 'Berlín, abril de 1945. En las calles de Berlín se libra una encarnizada batalla. Hitler y sus fieles se han atrincherado en un búnker. Entre ellos se encuentra Traudl Junge, la secretaria personal del Führer. En el exterior, la situación se recrudece. A pesar de que Berlín ya no puede resistir más, Hitler se niega a abandonar la ciudad y, acompañado de Eva Braun, prepara su despedida.', '2004', 'Digital', 5, 156, 1, '+13', 'https://www.youtube.com/watch?v=Fb0Fb31LECY', NULL),
(97, 'Los Simpson: la película', 'simpson.png\r\n', 'Homer debe salvar al mundo de una catástrofe que él mismo ha provocado. Todo comienza con Homer, su nueva mascota, un cerdo, y un silo lleno de excrementos que tiene una fuga, una combinación que desencadena un desastre distinto a todo lo que Springfield haya experimentado jamás. Mientras Marge está indignada por la monumental metedura de pata de su patán marido, una turba vengativa cae sobre el hogar de los Simpson...', '2007', 'Digital', 5, 87, 1, 'Todos los públicos', 'https://www.youtube.com/watch?v=AB7VF980cEA', NULL),
(98, 'Scooby Doo', 'scoobydoo.png\r\n', 'Scooby-Doo y sus amigos Fred, Daphne, Shaggy y Velma, son llamados individualmente a Spooky Island para investigar una serie de incidentes paranormales en el club nocturno Spring Break. Preocupado porque su popular centro turístico pueda estar realmente embrujado, el propietario de Spooky Island, trata de volver a unir a esos detectives con fama de entrometidos para que resuelvan el misterio antes de que su secreto sobrenatural asuste a la multutud de universitarios que lo frecuentan.', '2002', 'Digital', 5, 86, 0, 'Todos los públicos', 'https://www.youtube.com/watch?v=Bzz4EQ2NmpQ', NULL),
(99, 'Batman (1989)', 'batman1989.png\r\n', 'Cinta basada en el cómic homónimo. La oscura y peligrosa ciudad de Gotham tan sólo se halla protegida por su corrupto cuerpo de policía. A pesar de los esfuerzos del fiscal del distrito Harvey Dent y el comisionado de policía Jim Gordon, la ciudad es cada vez más insegura hasta que aparece Batman, el Señor de la Noche. La reputada periodista Vicky Vale intentará descubrir el secreto que se oculta tras el hombre murciélago.', '1989', 'Digital', 5, 126, 1, '+13', 'https://www.youtube.com/watch?v=ik7xfWne0g8', NULL),
(100, 'Batman Returns', 'batmanreturns.png\r\n', 'Gotham City se enfrenta a dos nuevos y peculiares criminales: el diabólico y siniestro Pingüino, una criatura solitaria y extrañamente deformada, y la hermosa y seductora -aunque letalmente peligrosa- Catwoman. Batman se deberá enfrentar a Pingüino, que quiere convertirse en el amo de la ciudad.', '1992', 'Digital', 5, 126, 0, '+13', 'https://www.youtube.com/watch?v=2vAdmRdgRV8', NULL),
(101, 'Batman Forever', 'batmanforever.png', 'La ciudad de Gotham está amenazada por un hombre que intenta vengarse de la Humanidad; su rostro está desfigurado por el ácido y se hace llamar El Caras. Por otra parte, un psicópata con intención de dominar el mundo ha inventado un estrafalario aparato que permite absorber las ondas cerebrales de los seres humanos. Ambos se unirán para lograr sus propósitos.', '1995', 'Digital', 5, 122, 0, '+13', 'https://www.youtube.com/watch?v=ROLvjRB4E_Q', NULL),
(102, 'Tomorrowland: El mundo del mañana', 'Tomorrowland.jpg', 'Unidos por el mismo destino, una adolescente inteligente y optimista llena de curiosidad científica y un antiguo niño prodigio inventor hastiado por las desilusiones se embarcan en una peligrosa misión para desenterrar los secretos de un enigmático lugar localizado en algún lugar del tiempo y el espacio conocido en la memoria colectiva como “Tomorrowland”, y así salvar a la Humanidad. ', '2015', 'Taquilla', 7, 130, 0, 'Todos los públicos', 'https://www.youtube.com/watch?v=WLD7NAxRMnM', ''),
(103, 'Jurassic World', 'JurassicWorld.jpg', 'Nueva entrega de la saga iniciada por Steven Spielberg. Veintidós años después de lo ocurrido en Jurassic Park, la isla Nublar ha sido transformada en un parque temático, Jurassic Wold, con versiones «domesticadas» de algunos de los dinosaurios más conocidos. Cuando todo parece ir a la perfección y ser el negocio del siglo, un nuevo dinosaurio de especie todavía desconocida y que es mucho más inteligente de lo que se pensaba, comienza a causar estragos entre los habitantes del Parque.', '2015', 'Taquilla', 7, 124, 0, '+13', 'https://www.youtube.com/watch?v=zfURZ-Vb8_E', ''),
(104, 'La Oveja Shaun: La película', 'ShaunTheSheep.jpg', 'Shaun iniciará una aventura para adentrarse en la ciudad en la búsqueda de su granjero. Adaptación en formato largometraje de la serie homónima', '2015', 'Taquilla', 7, 85, 0, 'Todos los públicos', 'https://www.youtube.com/watch?v=frai3WbnGX8', ''),
(105, 'Horns', 'Horns.jpg', 'Merrin Williams está muerta. Ha muerto en extrañas circunstancias, y su novio Ignatus ''Ig'' Perrish (Daniel Radcliffe) es el único sospechoso. En el primer aniversario de la muerte de Merrin, Ig se pasa la noche borracho y haciendo cosas espantosas. Cuando se despierta, tiene una resaca tremenda… y cuernos que le están naciendo en la cabeza. Ig posee un nuevo poder macabro que intenta usar para descubrir al monstruo que mató a su amor. Ser bueno y rezar no lo llevó a ningún sitio. ', '2015', 'Taquilla', 7, 120, 0, '+13', 'https://www.youtube.com/watch?v=Y5Y5yQXl-lc', '');
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `tiene`
--
DROP TABLE IF EXISTS `tiene`;
CREATE TABLE IF NOT EXISTS `tiene` (
`id_has` int(11) NOT NULL AUTO_INCREMENT,
`id_movie` int(11) NOT NULL,
`id_genre` int(3) NOT NULL,
PRIMARY KEY (`id_has`),
KEY `tiene_ibfk_1` (`id_movie`),
KEY `tiene_ibfk_2` (`id_genre`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_spanish_ci AUTO_INCREMENT=179 ;
--
-- Volcado de datos para la tabla `tiene`
--
INSERT INTO `tiene` (`id_has`, `id_movie`, `id_genre`) VALUES
(1, 1, 5),
(2, 1, 22),
(3, 2, 7),
(4, 2, 6),
(5, 3, 5),
(6, 4, 5),
(7, 5, 22),
(8, 5, 4),
(9, 6, 5),
(10, 6, 23),
(11, 6, 27),
(12, 7, 5),
(13, 8, 3),
(15, 10, 5),
(16, 11, 5),
(17, 11, 25),
(18, 12, 19),
(19, 12, 3),
(20, 13, 26),
(21, 14, 14),
(22, 14, 3),
(23, 15, 8),
(24, 16, 1),
(25, 16, 5),
(26, 18, 5),
(27, 18, 14),
(28, 18, 1),
(29, 19, 1),
(31, 21, 2),
(32, 21, 3),
(33, 22, 2),
(34, 23, 21),
(35, 23, 3),
(36, 24, 24),
(37, 24, 5),
(38, 25, 4),
(39, 26, 14),
(40, 27, 20),
(41, 27, 2),
(42, 28, 5),
(43, 29, 13),
(44, 30, 2),
(45, 30, 6),
(46, 31, 3),
(48, 33, 1),
(49, 33, 3),
(50, 33, 5),
(51, 34, 3),
(52, 35, 5),
(53, 36, 14),
(54, 36, 3),
(55, 37, 13),
(56, 38, 13),
(57, 39, 13),
(58, 40, 13),
(59, 40, 2),
(60, 41, 13),
(61, 41, 2),
(62, 42, 13),
(63, 43, 1),
(64, 44, 1),
(65, 45, 5),
(66, 46, 1),
(67, 47, 8),
(68, 48, 8),
(69, 49, 2),
(70, 49, 1),
(71, 50, 1),
(72, 50, 2),
(73, 51, 19),
(74, 51, 3),
(75, 52, 19),
(76, 52, 3),
(77, 54, 1),
(78, 54, 20),
(79, 54, 3),
(80, 55, 20),
(81, 56, 20),
(82, 56, 1),
(83, 57, 20),
(84, 58, 20),
(85, 58, 1),
(86, 59, 20),
(87, 60, 20),
(88, 61, 20),
(89, 62, 20),
(93, 64, 8),
(94, 65, 8),
(95, 66, 8),
(96, 67, 8),
(97, 68, 8),
(98, 69, 8),
(99, 70, 8),
(100, 71, 8),
(101, 72, 8),
(102, 73, 8),
(103, 74, 8),
(104, 75, 2),
(105, 75, 1),
(106, 76, 1),
(107, 76, 20),
(108, 77, 1),
(109, 77, 20),
(110, 78, 1),
(111, 78, 20),
(112, 79, 2),
(113, 80, 2),
(114, 81, 2),
(115, 82, 2),
(116, 83, 5),
(117, 83, 2),
(120, 86, 2),
(121, 87, 2),
(122, 87, 6),
(123, 89, 2),
(124, 90, 2),
(125, 91, 2),
(126, 92, 13),
(127, 93, 13),
(128, 94, 3),
(129, 94, 2),
(130, 95, 2),
(131, 96, 5),
(132, 96, 24),
(133, 98, 21),
(134, 98, 2),
(135, 99, 1),
(136, 99, 20),
(137, 100, 1),
(138, 100, 20),
(139, 101, 1),
(140, 101, 20),
(141, 53, 2),
(142, 53, 3),
(143, 19, 10),
(144, 39, 10),
(145, 40, 10),
(146, 41, 10),
(147, 39, 16),
(148, 40, 16),
(149, 41, 16),
(150, 19, 9),
(151, 10, 11),
(152, 17, 1),
(153, 88, 2),
(154, 97, 8),
(155, 97, 2),
(156, 102, 3),
(158, 84, 2),
(163, 32, 2),
(164, 20, 4),
(165, 103, 1),
(166, 103, 3),
(167, 104, 8),
(170, 105, 6),
(171, 105, 14),
(174, 9, 3),
(175, 85, 2),
(176, 63, 1),
(177, 63, 2),
(178, 63, 20);
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `usuarios`
--
DROP TABLE IF EXISTS `usuarios`;
CREATE TABLE IF NOT EXISTS `usuarios` (
`id_user` int(11) NOT NULL AUTO_INCREMENT,
`nick_user` varchar(20) COLLATE utf8_spanish_ci NOT NULL,
`email_user` varchar(50) CHARACTER SET utf8 NOT NULL,
`role_user` enum('admin','moderator','regular') CHARACTER SET utf8 NOT NULL DEFAULT 'regular',
`name_user` varchar(50) COLLATE utf8_spanish_ci DEFAULT NULL,
`pass_user` varchar(256) CHARACTER SET utf8 NOT NULL,
`age_user` int(2) DEFAULT NULL,
`activo` varchar(32) COLLATE utf8_spanish_ci NOT NULL DEFAULT 'activate',
`idActivo` int(32) DEFAULT NULL,
PRIMARY KEY (`id_user`),
UNIQUE KEY `nick_user` (`nick_user`,`email_user`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_spanish_ci AUTO_INCREMENT=24 ;
--
-- Volcado de datos para la tabla `usuarios`
--
INSERT INTO `usuarios` (`id_user`, `nick_user`, `email_user`, `role_user`, `name_user`, `pass_user`, `age_user`, `activo`, `idActivo`) VALUES
(2, 'JaimeFC', 'jaime.fernandez.cuesta@gmail.com', 'moderator', 'Jaime Fernández', '8cb2237d0679ca88db6464eac60da96345513964', NULL, 'activate', NULL),
(3, 'admin', '', 'admin', NULL, '8cb2237d0679ca88db6464eac60da96345513964', NULL, 'activate', NULL),
(4, 'Paco Pico Piedra', 'emailpruebas@gmail.com', 'regular', 'Paco Pico Piedra', '8cb2237d0679ca88db6464eac60da96345513964', NULL, 'activate', NULL),
(5, 'patatabrava', 'prueba2@gmail.com', 'regular', 'Armando Bronca Segur', '8cb2237d0679ca88db6464eac60da96345513964', NULL, 'activate', NULL),
(6, 'salchipapa', 'prueba3@gmail.com', 'regular', 'Elena Nito del Bosqu', '8cb2237d0679ca88db6464eac60da96345513964', NULL, 'activate', NULL),
(7, 'Acomodador', 'prueba4@gmail.com', 'regular', 'Esteban Cuesta Ocupa', '8cb2237d0679ca88db6464eac60da96345513964', NULL, 'activate', NULL),
(8, 'Tito MC', 'prueba5@gmail.com', 'regular', 'Jose Luis Hernández ', '8cb2237d0679ca88db6464eac60da96345513964', NULL, 'activate', NULL),
(9, 'trolololo', 'prueba6@gmail.com', 'regular', 'Eduard Khil', '8cb2237d0679ca88db6464eac60da96345513964', NULL, 'activate', NULL),
(10, 'Fila de Alante', 'prueba7@gmail.com', 'regular', 'Fila de Alante', '8cb2237d0679ca88db6464eac60da96345513964', NULL, 'activate', NULL),
(11, 'NoSoyNadie', 'prueba8@gmail.com', 'regular', 'Paco Jones', '8cb2237d0679ca88db6464eac60da96345513964', NULL, 'activate', NULL),
(12, 'Cubo de Palomitas', 'prueba9@gmail.com', 'regular', 'Leandro Gado Fuerte', '8cb2237d0679ca88db6464eac60da96345513964', NULL, 'activate', NULL),
(13, 'Marty McFly', 'prueba10@gmail.com', 'regular', 'Marty McFly', '8cb2237d0679ca88db6464eac60da96345513964', NULL, 'activate', NULL),
(14, 'Doc Brown', 'prueba12@gmail.com', 'regular', 'Emerett Brown', '8cb2237d0679ca88db6464eac60da96345513964', NULL, 'activate', NULL),
(15, 'WesAndersonNoEsHipst', 'tenernovioparaesto@hotmail.com', 'regular', 'Wes Anderson', '8cb2237d0679ca88db6464eac60da96345513964', NULL, 'activate', NULL),
(18, 'Luis', 'llorenzo13@gmail.com', 'regular', 'Luis Lorenzo', '8cb2237d0679ca88db6464eac60da96345513964', NULL, 'activate', 0),
(19, 'fayre', 'thefayreone@gmail.com', 'regular', 'fayre', '8cb2237d0679ca88db6464eac60da96345513964', NULL, 'activate', NULL);
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `valora`
--
DROP TABLE IF EXISTS `valora`;
CREATE TABLE IF NOT EXISTS `valora` (
`id_valoration` int(11) NOT NULL AUTO_INCREMENT,
`id_user` int(11) NOT NULL,
`id_movie` int(11) NOT NULL,
`valoration` float NOT NULL,
`review` varchar(250) COLLATE utf8_spanish_ci NOT NULL,
`date_valoration` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id_valoration`),
KEY `valora_ibfk_1` (`id_user`),
KEY `valora_ibfk_2` (`id_movie`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_spanish_ci AUTO_INCREMENT=24 ;
--
-- Volcado de datos para la tabla `valora`
--
INSERT INTO `valora` (`id_valoration`, `id_user`, `id_movie`, `valoration`, `review`, `date_valoration`) VALUES
(1, 2, 101, 2, 'Diría que esta es la peor película de Batman, pero "Batman & Robin", de Clooney, existe.', '2015-06-09 19:01:57'),
(2, 2, 25, 4, '¡Eh, Paul! ¡Intenta hacer una crítica en "American Psycho" ahora!', '2015-06-09 19:04:38'),
(3, 2, 20, 4, 'No se qué he visto, pero me ha encantado', '2015-06-09 19:05:02'),
(4, 2, 99, 4, 'La mejor de Batman. Jack Nicholson hace un Joker excelente, quizás con el vestuario como única pega. Hablando de eso, ¿qué pasa con el traje de Keaton para hacer de Batman? No puede mover los hombros. Si le vienen por los lados le noquean fijo.', '2015-06-09 19:06:14'),
(5, 2, 63, 5, 'Me esperaba algo bueno. Marvel superó mis expectativas. ', '2015-06-09 19:08:21'),
(6, 2, 55, 3, 'Oh, Dios, no. Si no fuera porque existe una segunda, esta película se podría saltar perfectamente.', '2015-06-09 19:08:46'),
(7, 2, 56, 4, 'Esta SÍ que hace justicia al Capitán. La mejor de Marvel a nivel de superhéroe individual, aunque Black Widow y Falcon estén también.', '2015-06-09 19:09:38'),
(8, 2, 98, 1, 'Horrible, apocalíptica, parece salida del mismísimo averno. Tendrían que haber mantenido el guión original.', '2015-06-09 19:10:10'),
(10, 4, 14, 4, 'Ufff que mal rato pasé con esta', '2015-06-09 19:10:54'),
(11, 4, 80, 4, 'JAJAJAJAJA LA MEJOR DE ESTE TÍO', '2015-06-09 19:11:14'),
(12, 4, 45, 2, 'Mmmmm muy aburrida para mi gusto', '2015-06-09 19:12:02'),
(13, 11, 25, 3, 'Tres estrellas', '2015-06-09 19:12:30'),
(14, 11, 89, 4, 'Cuatro estrellas', '2015-06-09 19:12:45'),
(15, 11, 84, 2, 'Dos estrellas', '2015-06-09 19:12:58'),
(16, 11, 70, 1, 'Una estrella', '2015-06-09 19:13:14'),
(17, 11, 63, 4, 'Cuatro estrellas', '2015-06-09 19:13:25'),
(18, 11, 20, 3, 'Tres estrellas', '2015-06-09 19:13:40'),
(19, 11, 42, 3, 'Tres estrellas', '2015-06-09 19:13:56'),
(20, 11, 32, 4, 'Cuatro estrellas', '2015-06-09 19:14:19'),
(21, 2, 32, 4, 'They call me ''Cuban Pete''! I''m the king of the rumba beat! When I play the maracas I go chick-chicky-boom, go chick-chicky-boom, go chick-chicky-boom.', '2015-06-09 19:15:04');
--
-- Restricciones para tablas volcadas
--
--
-- Filtros para la tabla `almacena`
--
ALTER TABLE `almacena`
ADD CONSTRAINT `almacena_ibfk_1` FOREIGN KEY (`id_movie`) REFERENCES `peliculas` (`id_movie`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `almacena_ibfk_2` FOREIGN KEY (`id_list`) REFERENCES `listas` (`id_list`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Filtros para la tabla `compra_digital`
--
ALTER TABLE `compra_digital`
ADD CONSTRAINT `ibfk_compra_digital_1` FOREIGN KEY (`id_user`) REFERENCES `usuarios` (`id_user`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `ibfk_compra_digital_2` FOREIGN KEY (`id_movie`) REFERENCES `peliculas` (`id_movie`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Filtros para la tabla `compra_tickets`
--
ALTER TABLE `compra_tickets`
ADD CONSTRAINT `compra_tickets_ibfk_1` FOREIGN KEY (`id_movie`) REFERENCES `peliculas` (`id_movie`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `compra_tickets_ibfk_2` FOREIGN KEY (`id_user`) REFERENCES `usuarios` (`id_user`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `compra_tickets_ibfk_3` FOREIGN KEY (`id_cinema`) REFERENCES `cines` (`id_cinema`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Filtros para la tabla `dirige`
--
ALTER TABLE `dirige`
ADD CONSTRAINT `dirige_ibfk_1` FOREIGN KEY (`id_movie`) REFERENCES `peliculas` (`id_movie`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `dirige_ibfk_2` FOREIGN KEY (`id_director`) REFERENCES `directores` (`id_director`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Filtros para la tabla `listas`
--
ALTER TABLE `listas`
ADD CONSTRAINT `listas_ibfk_1` FOREIGN KEY (`id_user`) REFERENCES `usuarios` (`id_user`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Filtros para la tabla `mensajea`
--
ALTER TABLE `mensajea`
ADD CONSTRAINT `mensajea_ibfk_1` FOREIGN KEY (`id_receiver`) REFERENCES `usuarios` (`id_user`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `mensajea_ibfk_2` FOREIGN KEY (`id_transmitter`) REFERENCES `usuarios` (`id_user`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Filtros para la tabla `ofrece`
--
ALTER TABLE `ofrece`
ADD CONSTRAINT `ofrece_ibfk_1` FOREIGN KEY (`id_cinema`) REFERENCES `cines` (`id_cinema`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `ofrece_ibfk_2` FOREIGN KEY (`id_movie`) REFERENCES `peliculas` (`id_movie`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Filtros para la tabla `participa`
--
ALTER TABLE `participa`
ADD CONSTRAINT `participa_ibfk_1` FOREIGN KEY (`id_movie`) REFERENCES `peliculas` (`id_movie`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `participa_ibfk_2` FOREIGN KEY (`id_actor`) REFERENCES `actores` (`id_actor`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Filtros para la tabla `tiene`
--
ALTER TABLE `tiene`
ADD CONSTRAINT `tiene_ibfk_1` FOREIGN KEY (`id_movie`) REFERENCES `peliculas` (`id_movie`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `tiene_ibfk_2` FOREIGN KEY (`id_genre`) REFERENCES `generos` (`id_genre`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Filtros para la tabla `valora`
--
ALTER TABLE `valora`
ADD CONSTRAINT `valora_ibfk_1` FOREIGN KEY (`id_user`) REFERENCES `usuarios` (`id_user`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `valora_ibfk_2` FOREIGN KEY (`id_movie`) REFERENCES `peliculas` (`id_movie`) ON DELETE CASCADE ON UPDATE CASCADE;
/*!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 */;
|
-- 02. Tabellen verbunden + INSERT
-- Vorbereitung
DROP DATABASE IF EXISTS mydb;
CREATE DATABASE IF NOT EXISTS mydb;
USE mydb;
/* Servants */
CREATE TABLE IF NOT EXISTS `mydb`.`servants` (
`id` INT NOT NULL AUTO_INCREMENT,
`servant_name` VARCHAR(45) NOT NULL,
`yrs_served` VARCHAR(45) NOT NULL,
PRIMARY KEY (`id`))
ENGINE = InnoDB;
-- Servants: CREATE
DESCRIBE servants;
-- Servants: Inserts
INSERT INTO `mydb`.`servants` (`id`, `servant_name`, `yrs_served`) VALUES (DEFAULT, "Sven", 4);
INSERT INTO `mydb`.`servants` (`id`, `servant_name`, `yrs_served`) VALUES (DEFAULT, "Jan", 2);
-- Servants: Inhalte
SELECT * FROM servants;
/* Products */
CREATE TABLE IF NOT EXISTS `mydb`.`products` (
`id` INT NOT NULL AUTO_INCREMENT,
`product_name` VARCHAR(45) NOT NULL,
`product_price` DECIMAL(4,2) NOT NULL,
PRIMARY KEY (`id`))
ENGINE = InnoDB;
-- Products: CREATE
DESCRIBE products;
-- Products: Inserts
INSERT INTO `mydb`.`products` (`id`, `product_name`, `product_price`) VALUES (Default,"Whaiskas|Lachs",2.75);
INSERT INTO `mydb`.`products` (`id`, `product_name`, `product_price`) VALUES (Default,"Whaiskas|Huhn",2.80);
INSERT INTO `mydb`.`products` (`id`, `product_name`, `product_price`) VALUES (Default,"Felix|Yelly", 3.75);
INSERT INTO `mydb`.`products` (`id`, `product_name`, `product_price`) VALUES (Default,"Felix|Sauce", 3.80);
-- Products: Inhalte
SELECT * FROM products;
/* Purchases*/
CREATE TABLE IF NOT EXISTS `mydb`.`purchases` (
`servants_id` INT NOT NULL,
`products_id` INT NOT NULL,
PRIMARY KEY (`servants_id`, `products_id`),
INDEX `fk_servants_has_products_products1_idx` (`products_id` ASC) VISIBLE,
INDEX `fk_servants_has_products_servants_idx` (`servants_id` ASC) VISIBLE,
CONSTRAINT `fk_servants_has_products_servants`
FOREIGN KEY (`servants_id`)
REFERENCES `mydb`.`servants` (`id`)
ON DELETE NO ACTION
ON UPDATE NO ACTION,
CONSTRAINT `fk_servants_has_products_products1`
FOREIGN KEY (`products_id`)
REFERENCES `mydb`.`products` (`id`)
ON DELETE NO ACTION
ON UPDATE NO ACTION)
ENGINE = InnoDB;
-- Purchases:Create
DESCRIBE purchases;
-- Purchases: Inserts
INSERT INTO `mydb`.`purchases` (`servants_id`, `products_id`) VALUES (1,2);
INSERT INTO `mydb`.`purchases` (`servants_id`, `products_id`) VALUES (1,3);
INSERT INTO `mydb`.`purchases` (`servants_id`, `products_id`) VALUES (2,1);
INSERT INTO `mydb`.`purchases` (`servants_id`, `products_id`) VALUES (2,2);
INSERT INTO `mydb`.`purchases` (`servants_id`, `products_id`) VALUES (2,3);
INSERT INTO `mydb`.`purchases` (`servants_id`, `products_id`) VALUES (2,4);
-- Purchases: Inhalte
SELECT * FROM purchases;
|
SELECT 'coffees: DID-->CM' AS FD, CASE WHEN COUNT(*)=0 THEN 'Gildir' ELSE 'Gildir ekki' END AS VALIDITY
FROM(
SELECT DID
FROM coffees
GROUP BY DID
HAVING COUNT(DISTINCT CM) > 1
) X;
|
/*
Find the top-10 articles (title, ID and like received) with most LIKE received from user on 2017-04-01
*/
SELECT
t.title,
t.article_id,
t.value
FROM
(
SELECT
a.title AS title,
a.id AS article_id,
COUNT(c.action) AS value,
ROW_NUMBER() OVER (ORDER BY COUNT(c.action) DESC) AS rn
FROM clickstream c
JOIN articles a ON c.objectId = a.id
WHERE c.dtime = '2017-04-01'
GROUP BY 1, 2
)t
WHERE t.rn < 11;
/*
Find the count of users who install the app (i.e. with FIRST_INSTALL event) on
2017-04-01 and use our app at least once (i.e. with any event) between 2017-04-02 and 2017-04-08
*/
CREATE TEMP TABLE tmp_usr AS (
SELECT DISTINCT userId AS userId
FROM clickstream WHERE action = 'FIRST_INSTALL'
AND dtime = '2017-04-01'
);
SELECT COUNT(DISTINCT src.userId) AS value
FROM clickstream src
JOIN tmp_usr tmp_usr ON src.userId = tmp_usr.userId
WHERE src.dtime BETWEEN '2017-04-02' AND '2017-04-08';
|
-- MySQL dump 10.13 Distrib 5.7.17, for Win64 (x86_64)
--
-- Host: 127.0.0.1 Database: room_reservation_system
-- ------------------------------------------------------
-- Server version 5.5.5-10.1.16-MariaDB
/*!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 `reservations`
--
DROP TABLE IF EXISTS `reservations`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `reservations` (
`res_no` int(11) NOT NULL AUTO_INCREMENT,
`mee_no` int(10) unsigned NOT NULL,
`use_no` int(10) unsigned NOT NULL,
`date` date NOT NULL,
`hour` time NOT NULL,
`descript` text,
PRIMARY KEY (`res_no`),
KEY `fk_reservations_user_idx` (`use_no`),
KEY `fk_reservations_meeting_rooms1_idx` (`mee_no`),
CONSTRAINT `fk_reservations_meeting_rooms1` FOREIGN KEY (`mee_no`) REFERENCES `meeting_rooms` (`mee_no`) ON DELETE NO ACTION ON UPDATE NO ACTION,
CONSTRAINT `fk_reservations_user` FOREIGN KEY (`use_no`) REFERENCES `user` (`use_no`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=38 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `reservations`
--
LOCK TABLES `reservations` WRITE;
/*!40000 ALTER TABLE `reservations` DISABLE KEYS */;
INSERT INTO `reservations` VALUES (1,4,32,'2017-04-16','09:30:00','teste'),(3,2,32,'2017-04-27','14:20:00',''),(7,1,30,'2017-04-18','21:59:00','fjhfhgj'),(18,1,32,'2017-04-01','03:34:00',''),(19,1,32,'2017-04-01','03:34:00',''),(25,1,32,'2017-04-16','09:30:00',''),(30,3,32,'2017-04-16','09:30:00',''),(33,3,32,'2017-04-29','04:57:00',''),(35,3,32,'2017-04-16','10:31:00',''),(36,1,32,'2017-04-14','23:33:00',''),(37,1,30,'2017-04-14','22:20:00','');
/*!40000 ALTER TABLE `reservations` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
--
-- 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` (
`use_no` int(11) unsigned NOT NULL AUTO_INCREMENT,
`full_name` varchar(60) NOT NULL,
`email` varchar(45) NOT NULL,
`password` varchar(45) DEFAULT NULL,
`hash` varchar(32) DEFAULT NULL,
`status` tinyint(3) unsigned NOT NULL DEFAULT '1',
`admin` tinyint(4) DEFAULT '0',
PRIMARY KEY (`use_no`),
UNIQUE KEY `hash_UNIQUE` (`hash`)
) ENGINE=InnoDB AUTO_INCREMENT=33 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `user`
--
LOCK TABLES `user` WRITE;
/*!40000 ALTER TABLE `user` DISABLE KEYS */;
INSERT INTO `user` VALUES (30,'Admin','admin@ditech.local',NULL,'5F0BCB3A8F4A5B4381A25ACB90168D74',1,1),(32,'carlos','carlos@ditech.local',NULL,'038B1231A54871688F8FCF5FD43EE318',1,0);
/*!40000 ALTER TABLE `user` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
--
-- Table structure for table `meeting_rooms`
--
DROP TABLE IF EXISTS `meeting_rooms`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `meeting_rooms` (
`mee_no` int(11) unsigned NOT NULL AUTO_INCREMENT,
`room_name` varchar(45) NOT NULL,
`status` tinyint(4) NOT NULL DEFAULT '1',
PRIMARY KEY (`mee_no`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `meeting_rooms`
--
LOCK TABLES `meeting_rooms` WRITE;
/*!40000 ALTER TABLE `meeting_rooms` DISABLE KEYS */;
INSERT INTO `meeting_rooms` VALUES (1,'Sala de reuniões 1',0),(2,'Sala de reuniões 2',1),(3,'Auditorio',1),(4,'Sala do terror 2',1);
/*!40000 ALTER TABLE `meeting_rooms` 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 2017-04-14 19:41:27
|
--@Autor: Berdejo Arvizu Oscar || Olmos Cruz Edwin
--@Fecha creación: 25/10/2018
--@Descripción: Creacion De secuencias
--Usuario Admin: baoc_proy_admin
--Usuario Invitado: baoc_proy_invitado
prompt creando secuencias
prompt conectando usuario baoc_proy_admin
connect baoc_proy_admin
CREATE SEQUENCE ESTUDIANTE_SEQ
START WITH 6
INCREMENT BY 1
NOMINVALUE
NOMAXVALUE
CACHE 50;
CREATE SEQUENCE PROFESOR_SEQ
START WITH 1
INCREMENT BY 1
NOMINVALUE
NOMAXVALUE
CACHE 50;
CREATE SEQUENCE CURSO_SEQ
START WITH 1
INCREMENT BY 1
NOMINVALUE
NOMAXVALUE
CACHE 50;
CREATE SEQUENCE INSCRIPCION_SEQ
START WITH 1
INCREMENT BY 1
NOMINVALUE
NOMAXVALUE
CACHE 50;
CREATE SEQUENCE HIS_GE_SEQ
START WITH 1
INCREMENT BY 1
NOMINVALUE
NOMAXVALUE
CACHE 50;
|
select * from students;
INSERT INTO students VALUES (1, 'John', 'Doe', '1981-01-01');
INSERT INTO students VALUES (2, 'Jane', 'Doe', '1982-01-07');
INSERT INTO students VALUES (3, 'Jane', 'Dee', '2003-03-01');
select distinct * from students;
insert into courses values (1, 'SQL', 'AG', 'BN', 2, '2016-10-21');
insert into courses values (2, 'JAVA', 'VS', 'BN', 3, '2016-10-25');
insert into courses values (3, 'R', 'KP', 'TT', 4, '2016-11-09');
insert into courses values (4, 'PYTHON', 'KK', 'DD', 5, '2016-11-09');
select count(StID) from students;
select CourseName from courses where Duration>3;
select FName, LName from students where DateOfBirth<'1999-10-02';
select month(StartingDate) from courses where CourseName='SQL';
select * from courses where Duration>2 and month(StartingDate)=11;
select LecturerName, sum(Duration) as TeachingDays from courses group by LecturerName having sum(Duration)>2;
insert into grades values (1, 1, 7);
insert into grades values (1, 3, 4);
insert into grades values (2, 1, 9);
insert into grades values (2, 4, 1);
insert into grades values (3, 2, 10);
select * from grades;
select distinct students.FName, students.LName from students inner join grades on students.StID=grades.StID;
select students.StID, students.FName, students.LName, courses.CourseName, grades.grade from (students inner join grades on students.StID=grades.StID)
inner join courses on grades.CourseID=courses.CourseID;
select FName, LName, AVG(grade) from (select students.StID, students.FName, students.LName, courses.CourseName, grades.grade from (students inner join grades on students.StID=grades.StID)
inner join courses on grades.CourseID=courses.CourseID) as personal group by StID;
select FName, LName from (select students.StID, students.FName, students.LName, courses.CourseName, grades.grade from (students inner join grades on students.StID=grades.StID)
inner join courses on grades.CourseID=courses.CourseID) as personal group by StID having avg(grade)>5;
select CourseName, avg(grade) from (select students.StID, students.FName, students.LName, courses.CourseName, grades.grade from (students inner join grades on students.StID=grades.StID)
inner join courses on grades.CourseID=courses.CourseID) as personal group by CourseName;
select FName, LName from (select students.StID, students.FName, students.LName, courses.CourseName, grades.grade from (students inner join grades on students.StID=grades.StID)
inner join courses on grades.CourseID=courses.CourseID) as personal where CourseName='SQL';
select CourseName, max(grade) from (select students.StID, students.FName, students.LName, courses.CourseName, grades.grade from (students inner join grades on students.StID=grades.StID)
inner join courses on grades.CourseID=courses.CourseID) as personal group by CourseName;
select FName, LName from (select students.StID, students.FName, students.LName, courses.CourseName, grades.grade from (students inner join grades on students.StID=grades.StID)
inner join courses on grades.CourseID=courses.CourseID) as personal where CourseName='SQL' and Grade>5; |
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Aug 03, 2017 at 03:38 PM
-- Server version: 10.1.9-MariaDB
-- PHP Version: 5.6.15
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: `perpus_new`
--
-- --------------------------------------------------------
--
-- Table structure for table `admin`
--
CREATE TABLE `admin` (
`id_admin` int(11) NOT NULL,
`nama` varchar(50) NOT NULL,
`username` varchar(50) NOT NULL,
`password` varchar(50) NOT NULL,
`Foto` varchar(100) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `admin`
--
INSERT INTO `admin` (`id_admin`, `nama`, `username`, `password`, `Foto`) VALUES
(1, 'Novrialdi', 'admin', '21232f297a57a5a743894a0e4a801fc3', 'IMG_5403.jpg'),
(2, 'Tono', 'admin2', '25d55ad283aa400af464c76d713c07ad', '');
-- --------------------------------------------------------
--
-- Table structure for table `kecamatan`
--
CREATE TABLE `kecamatan` (
`id_kecamatan` int(11) NOT NULL,
`nama` varchar(100) NOT NULL,
`id_admin` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `kecamatan`
--
INSERT INTO `kecamatan` (`id_kecamatan`, `nama`, `id_admin`) VALUES
(2, 'Sukajadi', 0),
(6, 'Marpoyan Damai', 0),
(8, 'Tampan', 0),
(9, 'Payung Sekaki', 0),
(10, 'Rumbai', 0),
(11, 'Rumbai Pesisir', 0),
(13, 'Pekanbaru Kota', 1),
(14, 'Lima Puluh', 1),
(15, 'Tenayan Raya', 1),
(16, 'Senapelan', 1),
(17, 'Sail', 1),
(19, 'Bukit Raya', 1);
-- --------------------------------------------------------
--
-- Table structure for table `puskes`
--
CREATE TABLE `puskes` (
`id_puskes` int(11) NOT NULL,
`nama` varchar(100) NOT NULL,
`kategori` varchar(50) NOT NULL,
`jenis` varchar(50) NOT NULL,
`email` varchar(50) NOT NULL,
`alamat` varchar(100) NOT NULL,
`telp` varchar(30) NOT NULL,
`lat` double NOT NULL,
`lng` double NOT NULL,
`gambar` varchar(200) NOT NULL,
`id_kecamatan` varchar(20) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `puskes`
--
INSERT INTO `puskes` (`id_puskes`, `nama`, `kategori`, `jenis`, `email`, `alamat`, `telp`, `lat`, `lng`, `gambar`, `id_kecamatan`) VALUES
(2, 'Awal Bros Panam', 'Rumah Sakit', 'Swasta', '', 'Jl. HR Soebrantas No 88, Tampan, Pekanbaru. Riau - 28292', ' +62 761 586888', 0.4638467724986561, 101.3902299106121, 'awal_bros_panam.jpg', '8'),
(3, 'Prima', 'Rumah Sakit', 'Swasta', 'info@rsprimapekanbaru.com', 'Jalan Bima No 1 Nangka Ujung', '0761 - 8419007 ', 0.49738795676632275, 101.40001595020294, 'prima.jpg', '8'),
(4, 'Eka Hospital', 'Rumah Sakit', 'Swasta', 'infoPKU@ekahospital.com', 'Jl. Ir Soekarno-Hatta Km 6.5, Pekanbaru, Riau 28282', '(+62-761) 698 99 99', 0.48240568492929703, 101.41968727111816, 'eka.jpg', '6'),
(5, ' Prof. Dr. Tabrani', 'Rumah Sakit', 'Swasta', 'rsprofdrtabranirab@yahoo.co.id', 'Jl. Jend. Sudirman, No. 410, Pekanbaru - Riau, 28282', '(0761) - 35464 / 35467', 0.5089062592241947, 101.4497085660696, 'tabrani.jpg', '6'),
(6, 'Tentara Tingkat IV Pekanbaru', 'Rumah Sakit', 'RSUD', '', 'Jl. Kesehatan No. 2, Kp. Bandar, Senapelan, Kota Pekanbaru, Riau', ' (0761) 22426', 0.5364446941284924, 101.44108057022095, 'rumah-sakit-tentara-tingkat-iv-pekanbaru.jpg', '16'),
(8, 'Eria Bunda', 'Rumah Sakit', 'Swasta', '', 'Jl. KH. Ahmad Dahlan No.163, Kp. Tengah, Sukajadi, Kota Pekanbaru, Riau 28122, Indonesia', '+62 761 23100', 0.5123514198802543, 101.4381093531847, 'rsiaeb_luar.jpg', '2'),
(9, 'Jiwa Tampan', 'Rumah Sakit', 'RSUD', '', 'Jl. HR. Soebrantas KM. 12.5, Simpang Baru, Tampan, Kota Pekanbaru, Riau 28293, Indonesia', '+62 761 63240', 0.46491827980488654, 101.38260841369629, 'rsj.jpg', '8'),
(10, 'Umum Daerah Arifin Achmad', 'Rumah Sakit', 'RSUD', 'rsudarifinachmad@riau.go.id', 'Jl. Diponegoro No.2, Sumahilang, Pekanbaru Kota, Kota Pekanbaru, Riau 28125, Indonesia', ' 0761 - 21618, 21657, 855702', 0.5234955429996724, 101.45236730575562, 'ariahmad.jpeg', '13'),
(11, 'Budhi Mulia', 'Rumah Sakit', 'Swasta', 'informasi_budhimulia@yahoo.com', 'Jalan Soekarno Hatta No. 226-228, Sidomulyo Tim., Pekanbaru, Kota Pekanbaru, Riau 28289', '07618417200', 0.47667132290678116, 101.41893558204174, 'budhimu.jpg', '6'),
(12, 'Annisa', 'Rumah Sakit', 'Swasta', '', 'Jl. Garuda No. 66 Tangkerang Tengah, Wonorejo, Marpoyan Damai, Kota Pekanbaru, Riau 28121', '(0761) 848652', 0.5070676772094144, 101.44777938723564, 'rsannisa.jpg', '6'),
(13, 'Ibu dan Anak Andini', 'Rumah Sakit', 'Swasta', '', 'Jl. Tuanku Tambusai No.55, Sukajadi, Pekanbaru. Riau - 28125', '(0761) 33612', 0.5030438494708686, 101.42843529582024, 'andini.JPG', '6'),
(14, 'MATA SMEC Pekanbaru', 'Rumah Sakit', 'Swasta', 'info@rsmatasmec.com', 'Jl. Arifin Ahmad No.58, Tengkerang Bar., Marpoyan Damai, Kota Pekanbaru, Riau 28289', '(0761) 565686', 0.4803078, 101.4402769, 'rumah-sakit-mata-smec.jpg', '6'),
(15, 'Universitas Riau', 'Rumah Sakit', 'RSUD', '', 'Kampus Bina Widya, Simpang Baru KM 12,5, Tampan, Simpang Baru, Tampan, Kota Pekanbaru, Riau 28293', ' 0851-0560-300', 0.4695261616819373, 101.38047873973846, 'rsur.jpg', '8'),
(16, 'JMB Pekanbaru', 'Rumah Sakit', 'Swasta', '', 'Jl. Sekolah No.53, Limbungan Baru, Rumbai Pesisir, Kota Pekanbaru, Riau 28266', '(0761) 53171', 0.5603286712219598, 101.43788941204548, 'jmb.jpg', '11'),
(17, 'Syafira', 'Rumah Sakit', 'Swasta', 'info@rs-syafira.com', 'Jalan Jenderal Sudirman No.134 Pekanbaru, Riau', '(0761) 37927 - 37947', 0.49858015364182384, 101.45470418035984, 'syafira.jpg', '6'),
(18, 'Tni Au Lanud Pekanbaru', 'Rumah Sakit', 'RSUD', '', 'Jl. Adi Sucipto No.12, Maharatu, Marpoyan Damai, Kota Pekanbaru, Riau 28288', '(0761) 61456', 0.4633304641642433, 101.43014721572399, 'auri.jpeg', ''),
(19, 'Umum Daerah Petala Bumi', 'Rumah Sakit', 'RSUD', '', 'Jalan Dr. Soetomo No. 65, Sekip, Lima Puluh, Kota Pekanbaru, Riau 28155', ' (0761) 23024', 0.5289670186081705, 101.45699143409729, 'petala.jpg', '14'),
(20, 'Islam Ibnu Sina', 'Rumah Sakit', 'Swasta', 'info@rsibnusina.or.id', 'Jl. Melati No.60, Sukajadi, Pekanbaru. Riau - 28122', '(0411) 452917 / 452958', 0.5256298213720371, 101.43649868667126, 'RSI-ibnu-sina-pekanbaru.jpg', '2'),
(21, 'Ibu dan Anak Zainab', 'Rumah Sakit', 'Swasta', 'Rs_Zainab@yahoo.com', 'Jl.Ronggowarsito I No.1 Pekanbaru', ' (0761) 24000, 25444', 0.513795, 101.454695, 'zainab.jpg', '17'),
(22, 'Pekanbaru Medical Centre (Pmc)', 'Rumah Sakit', 'Swasta', '', 'Jl. Lembaga Pemasyarakatan No.25, Suka Maju, Sail, Kota Pekanbaru, Riau', ' (0761) 848100', 0.5089894044232816, 101.46219223737717, 'pmc.jpg', '17'),
(23, 'Bhayangkara Pekanbaru', 'Rumah Sakit', 'RSUD', 'rsb_pekanbaru@yahoo.com', ' Jl. RA Kartini No.14, Simpang Empat, Pekanbaru Kota, Kota Pekanbaru, Riau 28156, Indonesia', ' +62 761 47691', 0.5205224377043945, 101.44896291196346, 'RS-Bhayangkara-Pekanbaru-POLDA-Riau.jpg', '13'),
(24, 'Aulia Hospital', 'Rumah Sakit', 'Swasta', 'info@auliahospital.co.id', 'Jl. HR. Soebrantas No. 63, Tampan, Pekanbaru. Riau - 28291', ' (0761) 6700000', 0.4638896864364514, 101.38526849448681, 'aulia.jpg', '8'),
(25, 'Mata Pekanbaru', 'Rumah Sakit', 'Swasta', '', 'Jl. Soekarno - Hatta No.236, Sidomulyo Tim., Marpoyan Damai, Kota Pekanbaru, Riau 28282', '(0761) 7875191 , 7875192', 0.47553410554735137, 101.41863450407982, 'rsmata.jpg', '6'),
(26, 'Bina Kasih Pekanbaru', 'Rumah Sakit', 'Swasta', '', 'Jl. Samanhudi, No.3-5, Sago, Senapelan, Kota Pekanbaru, Riau', ' (0761) 21718', 0.5355797195735934, 101.44555985927582, 'binaksih.jpg', '16'),
(27, 'Ahmad Yani', 'Rumah Sakit', 'Swasta', '', ' JL. Ahmad Yani | No 73, Sukajadi, Pekanbaru. Riau - 28126', ' (0761) 23954', 0.5209274345390159, 101.4434590190649, 'ayani.jpg', '2'),
(28, 'Sansani', 'Rumah Sakit', 'Swasta', '', 'Jl. Soekarno Hatta, Sidomulyo Tim., Marpoyan Damai, Kota Pekanbaru, Riau', '(0761) 564666', 0.45535114878329297, 101.4186680316925, 'sansa.jpg', '6'),
(29, 'Santa Maria', 'Rumah Sakit', 'Swasta', 'rssmpku@gmail.com', 'Jalan Nangka, Sukajadi, Pekanbaru. Riau - 281260', '(0761) 22213', 0.527816399871734, 101.44239149987698, 'sm.jpg', '2'),
(30, 'Ibu dan Anak Labuh Baru', 'Rumah Sakit', 'RSUD', 'rsialabuhbaru80@yahoo.com', 'Jl. Durian No.43b, Labuh Baru Tim., Payung Sekaki, Kota Pekanbaru, Riau 28156', '(0761) 37564', 0.5170591772885886, 101.42657451331615, 'labuh.jpg', '9'),
(31, 'Lancang Kuning', 'Rumah Sakit', 'Swasta', '', 'Jalan Ronggowarsito Ujung | No.5a, Sail, Pekanbaru. Riau - 28132', ' (0761) 859273 / 859274', 0.5128150882081092, 101.46467696875334, 'lk.jpg', '17'),
(32, 'Payung Sekaki', 'Puskesmas', 'Non Rawat Inap', '', 'Jl. Fajar No.21 kec. Payung Sekaki', '0761 62563', 0.5119859, 101.4156958, 'pksps.jpg', '9'),
(33, 'Simpang Baru', 'Puskesmas', 'Non Rawat Inap', '', 'Jl. Flamboyan No. 100', '081268223111', 0.4804501, 101.3710682, 'smpbru.JPG', '8'),
(34, 'Sidomulyo', 'Puskesmas', 'Non Rawat Inap', '', 'Jl. Raya Pekanbaru - Bangkinang', '0761 63170', 0.4649642, 101.3988284, 'puskesmassidomulyo.jpg', '8'),
(35, 'RI Sidomulyo', 'Puskesmas', 'Rawat Inap', '', 'Jalan Garuda, Delima', '0761-705186', 0.4699251, 101.4060134, 'risudi.JPG', '8'),
(36, 'Harapan Raya', 'Puskesmas', 'Non Rawat Inap', '', 'Jl. Imam Munandar No.40', ' 0761 26326', 0.4994874, 101.4559598, 'haray.jpg', '19'),
(38, 'Garuda', 'Puskesmas', 'Non Rawat Inap', '', 'Jl. Garuda No. 12 A', '0761 7051494', 0.4918515, 101.4447984, 'pgaruda.png', '6'),
(39, 'Tenayan Raya', 'Puskesmas', 'Rawat Inap', '', 'Jl. Budi Luhur', ' 0761 3059830', 0.501994, 101.485681, 'ptenayan.JPG', '15'),
(40, 'Rejosari', 'Puskesmas', 'Non Rawat Inap', '', 'Jl. Taman sari No.3', ' 0761 3059830', 0.5202509, 101.4829361, 'prejo.jpg', '15'),
(41, 'LIma Puluh', 'Puskesmas', 'Non Rawat Inap', '', 'Jl. Sumber Sari', ' 076136436', 0.5403304, 101.4635235, 'lima_puluh.jpg', '14'),
(42, 'kecantikan aurellyn', 'Klinik', '', '', 'Jl.Jendral Sudirman No.175, Tengkerang Sel., Bukit Raya, Kota Pekanbaru, Riau 28125', ' (0761) 853555', 0.4959428, 101.4554789, 'AURELLYN-CLINIC.jpg', '19'),
(43, 'Al Kadriah ', 'Klinik', '', '', 'Jl. H. Rsoebratasno 148, Delima, Tampan, Kota Pekanbaru, Riau 28289', '(0761) 62265', 0.46408346968352376, 101.40906505286694, 'kadriah.JPG', '8'),
(44, 'Aisyiyah', 'Klinik', 'Pratama', '', 'Jl. KH Ahmad Dahlan NO 83', '', 0.514401, 101.437462, 'Klinik-Pratama-Aisyiyah (1).jpg', '2'),
(45, 'Aira Skin Care', 'Klinik', 'Pratama', '', 'Jl. T. Tambusai No. 18 EF', '(0761) 571656', 0.501024, 101.421192, 'aira.JPG', '6'),
(46, 'Annisa Medika 2', '', 'Pratama', '', 'Jl. HR. Soebrantas No. 107', '', 0.4634874, 101.4146383, 'medika2.jpg', '8'),
(47, 'Afiyah', 'Klinik', 'Pratama', '', 'Jl. Fajar IV Labuh Baru', '0811-765-362', 0.5123829, 101.4139222, '', '9'),
(48, 'Amanda Clinik', 'Klinik', 'Utama', '', 'JL. Kartini No.31', ' 0812-7003-466', 0.520808, 101.451098, 'amnda.JPG', '13'),
(49, 'Auladi Medika', 'Klinik', 'Utama', '', 'Jl. H. Imam Munandar No.135Tengkerang Labuai, Bukit Raya, Pekanbaru City, Riau 28131, ', ' ', 0.4999547, 101.4769742, 'auladi.jpg', '19'),
(50, 'Astrid Medika', 'Klinik', 'Pratama', '', 'Jl. Hangtuah Ujung Tenayan Raya', ' ', 0.4861647, 101.5199887, 'astd.jpg', '15'),
(51, 'Amanah', 'Klinik', 'Pratama', '', 'Jl. Suka Karya No.124, Tuah Karya, Tampan, Kota Pekanbaru, Riau 28293', '', 0.457561, 101.3878655, 'amnah.jpg', '8'),
(52, ' Amanah Ayah Bunda', 'Klinik', 'Pratama', '', 'Soekarno Hatta-99C-D', '(0761) 6704164', 0.4796188, 101.4184848, '', '6'),
(53, 'Bina Kasih', 'Klinik', 'Pratama', '', 'jl. Riau no 51 D, kecamatan Payung Sekaki, Prkanbaru', '085107192227', 0.5350272, 101.421416, 'binakasih2.png', '9'),
(54, 'Bintang Jaya', 'Klinik', 'Pratama', '', 'KH. Ahmad Dahlan-99C', '0821-8939-9328', 0.4409576, 101.4481831, 'bintjaya.png', '6'),
(55, 'Anugerah Medika', 'Klinik', 'Pratama', '', 'KH. Nasution-120', ' ', 0.468701, 101.454478, 'smpng3.png', '19'),
(56, 'Bunda Medical Centre', 'Klinik', 'Pratama', '', 'Jalan. Paus-32 F', '0851-0561-7614', 0.5693571, 101.438214, 'bmc.png', '11'),
(57, 'Cendana Husada', 'Klinik', 'Pratama', '', 'Jl. Jati No.76, Kp. Baru, Senapelan, Kota Pekanbaru, Riau 28155', ' (0761) 860479', 0.5375846, 101.4336106, '', '16'),
(58, 'Cahaya Amanah Medika', 'Klinik', 'Pratama', '', 'Hangtuah-01', ' ', 0.5070167, 101.4973114, 'cahayaamanah.png', '15'),
(59, 'Circum Medika', 'Klinik', 'Pratama', '', 'Jl. Paus-88', '', 0.501258, 101.439286, '', '6'),
(61, 'Simpang Tiga', 'Puskesmas', 'Rawat Inap', '', 'Jl. Imam Munandar-40', '(0761) 26326', 0.499488, 101.456096, 'psimpangtga.JPG', '7'),
(62, 'Sail', 'Puskesmas', 'Non Rawat Inap', '', 'Jl. Hang Jebat No.15', ' (0761) 21640', 0.522332, 101.460711, 'psail.jpg', '17'),
(63, 'Langsat', 'Puskesmas', 'Non Rawat Inap', '', 'Jl. Langsat No.13', '(0761) 21051', 0.513432, 101.444202, 'plangsat.png', '2'),
(64, 'Melur', 'Puskesmas', 'Non Rawat Inap', '', 'Jl. Melur No.103', '(0761) 22508', 0.525365, 101.434511, 'pmelur.png', '2'),
(65, 'Senapelan', 'Puskesmas', 'Non Rawat Inap', '', 'Jl. Jati-04', ' ', 0.537696, 101.435943, 'psenapelan.png', '16'),
(66, 'Muara Fajar', 'Puskesmas', 'Rawat Inap', '', 'Raya Pekanbaru Km 18 ', '', 0.623791, 101.421129, 'mfajr.JPG', '10'),
(67, 'Umban Sari', 'Puskesmas', 'Non Rawat Inap', '', 'Jalan Purnama Sari No.1', '(0761) 51764', 0.569418, 101.417201, 'pumban.png', '10'),
(68, 'Rumbai', 'Puskesmas', 'Non Rawat Inap', '', ' Jl. Sekolah No.52, Meranti Pandak', ' (0761) 53537', 0.560234, 101.44106, 'prumbai.png', '11'),
(69, 'Karya Wanita', 'Puskesmas', 'Rawat Inap', '', 'Jl. Raya Gabus No.3, Limbungan Baru', '(0761) 53126', 0.561565, 101.440387, 'pwanita.jpg', '11'),
(70, 'Rumbai Bukit', 'Puskesmas', 'Non Rawat Inap', '', 'Jl. Palas, Rumbai Bukit', ' ', 0.607778, 101.401782, 'pbukit.png', '10'),
(71, 'Daffa', 'Klinik', 'Pratama', '', 'Paus-99B', '(0761) 9887748', 0.494712, 101.43842, 'daffa.png', '6'),
(72, 'Deliana', 'Klinik', 'Pratama', '', 'Soekarno Hatta-363', '', 0.433418, 101.42597, 'deliana.png', '8'),
(73, 'Dokter Keluarga', 'Klinik', 'Pratama', '', 'Jl. Jendral No.43, Labuh Baru Tim., Payung Sekaki, Kota Pekanbaru, Riau 28291', '(0761) 8400902', 0.523193, 101.422093, 'keluarga.png', '9'),
(74, 'Diva', 'Klinik', 'Pratama', '', 'Arifin Achmad-138D', '0821-7442-3322', 0.480295, 101.434703, 'diva.png', '6'),
(75, 'dr. Hasni', 'Klinik', 'Pratama', '', ' Jalan Hr. Subrantas, Tuah Karya', '(0761) 66056', 0.463739, 101.390871, 'hasni.png', '8'),
(76, 'dr. Eka', 'Klinik', 'Pratama', '', 'Jl. Yos Sudarso No.30', '(0761) 52760', 0.561665, 101.432766, 'eka.png', '10'),
(77, 'Eszquera', 'Klinik', 'Utama', '', 'Gatot Subroto-36C', ' 0812-6184-9839', 0.52992, 101.454343, 'ezquera.png', '14'),
(78, 'Dokter Misbah Rumbai Medical Center', 'Klinik', 'Pratama', '', 'JL. Sembilang, No. 53, Rumbai', '0812-7650-454', 0.561619, 101.449495, 'misbah.png', '11'),
(79, 'dr. Herlinda', 'Klinik', 'Pratama', '', 'Jl. HR. Soebrantas Panam, Delima', '', 0.464647, 101.398142, 'herlinda.png', '8'),
(80, 'Dhuha Medika', 'Klinik', 'Pratama', '', 'jl. Soekarno Hatta-8', '(0761) 968353', 0.425363, 101.435102, 'darel.png', '6'),
(81, 'Dilla', 'Klinik', 'Pratama', '', 'Jl. Kartama No.51, Maharatu', '0812-6506-830', 0.443655, 101.438772, 'dilla.png', '6'),
(82, 'Harapan Medika', 'Klinik', 'Pratama', '', 'Jl. H. Imam Munandar No.41, Tengkerang Utara', ' ', 0.499992, 101.455701, 'harapanmedika.png', '19'),
(83, 'Hasanah', 'Klinik', 'Pratama', '', 'Jl. Pangeran Hidayat, Sukarama', ' (0761) 854289', 0.524291, 101.445957, 'hasanah.png', '13'),
(84, 'Hangtuah', 'Klinik', 'Pratama', '', 'Jl. Hangtuah-38, Rejosari', ' ', 0.518013, 101.484282, 'hangtuah.jpg', '15'),
(85, 'Indi Medika', 'Klinik', 'Pratama', '', 'Jl. Kaharuddin Nst No.98C, Maharatu', '(0761) 678280', 0.45658, 101.452465, 'indiamed.png', '6'),
(86, 'Indo Sehat', 'Klinik', 'Pratama', '', 'Jl. Kaharudin Nasution, No. 36 - 39', ' 0822-8849-8728', 0.438104, 101.446849, 'indosehat.png', '6'),
(87, 'Inpres', 'Klinik', 'Pratama', '', 'Jl. Inpres, Maharatu', '', 0.455631, 101.424711, 'inpres.png', '6'),
(88, 'Jambu Mawar', 'Klinik', 'Pratama', '', ' Jl. Jambu Mawar', ' ', 0.538259, 101.411322, 'jambu.png', '9'),
(89, 'Kartika Utama', 'Klinik', 'Pratama', '', 'Jl. Jend. Ahmad Yani, Kota Baru', '', 0.529411, 101.442491, 'kartika.png', '1'),
(90, 'Kecantikan Natsha Skin', 'Klinik', 'Pratama', '', 'Jl. Dr. Sutomo No. 55, Sekip', ' (0761) 41878', 0.530236, 101.456701, 'natashaa.png', '14'),
(91, 'Keluarga Sehat dr. Bastian', 'Klinik', 'Pratama', '', 'Jl. Garuda Sakti KM.2, Simpang Baru', '0821-7171-1999', 0.479252, 101.366095, 'bastian.jpg', '8'),
(92, 'Kecantikan MMC Body Care', 'Klinik', 'Pratama', '', 'Jl. KH. Ahmad Dahlan No.29', ' 0852-8354-999', 0.514413, 101.437778, 'mmc.png', '2'),
(95, 'Awal bros Pekanbaru', 'Rumah Sakit', 'Swasta', '', 'Jalan Jend. Sudirman No. 117', '(0761) 47333', 0.496501, 101.456274, 'abospku.jpg', '19'),
(96, 'xyz', 'Rumah Sakit', 'RSUD', 'sshd@yahoo.com', 'jl.garuda', '077576', 0.5513678326116751, 101.44998550415039, '', '14');
-- --------------------------------------------------------
--
-- Table structure for table `spesialis`
--
CREATE TABLE `spesialis` (
`id_spesialis` int(11) NOT NULL,
`jenis_spesialis` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `spesialis`
--
INSERT INTO `spesialis` (`id_spesialis`, `jenis_spesialis`) VALUES
(1, 'Umum'),
(2, 'Gigi'),
(3, 'Mata'),
(4, 'THT'),
(5, 'Jantung'),
(6, 'Kandungan'),
(7, 'Bedah'),
(8, 'Gizi'),
(9, 'Anak'),
(10, 'Penyakit Dalam'),
(11, 'Saraf'),
(12, 'Jiwa'),
(13, 'Ortopedi'),
(14, 'Fisioterapi');
-- --------------------------------------------------------
--
-- Table structure for table `spesialis_puskes`
--
CREATE TABLE `spesialis_puskes` (
`id_puskes` int(11) NOT NULL,
`id_spesialis` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `spesialis_puskes`
--
INSERT INTO `spesialis_puskes` (`id_puskes`, `id_spesialis`) VALUES
(3, '1, 3, 4, 7, 9, 10, 11, 13'),
(4, '1, 2, 3, 5, 6, 7, 8, 9, 11, 13'),
(5, '1, 2, 3, 4, 6, 7, 9, 10, 11, 13'),
(6, ''),
(8, ''),
(9, '1, 2, 9, 10, 11, 12'),
(10, '1, 2, 3, 4, 5, 7, 9, 10, 11, 13'),
(11, '1, 6, 9'),
(14, '3'),
(15, '1, 2, 6, 9, 10'),
(16, '1'),
(17, '1, 2, 3, 4, 5, 6, 9, 10, 11, 13'),
(20, '1, 2, 3, 4, 5, 6, 7, 9, 10, 11, 13'),
(13, '1, 6, 9'),
(12, '6, 9'),
(18, ''),
(19, '1, 2, 3, 4, 6, 7, 9, 10, 11, 13, 14'),
(22, ''),
(23, ''),
(24, '1, 2, 4, 5, 6, 7, 9, 10, 11, 12, 13'),
(25, '3'),
(26, '1, 2, 3, 4, 5, 9, 10, 11'),
(27, '1, 3, 4, 6, 9, 10, 11, 12'),
(28, '1, 8'),
(29, '1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13'),
(31, '1, 2, 6, 7, 9, 10, 11, 12'),
(2, '1, 2, 3, 5, 6, 7, 8, 9, 10, 11, 12, 13'),
(35, '1, 2, 4, 6, 9'),
(34, '1, 2, 9'),
(48, '1, 4, 7, 10, 12, 14'),
(51, '1, 2, 6'),
(95, '1, 2, 4, 5, 6, 7, 9, 10, 11, 12');
--
-- Indexes for dumped tables
--
--
-- Indexes for table `admin`
--
ALTER TABLE `admin`
ADD PRIMARY KEY (`id_admin`);
--
-- Indexes for table `kecamatan`
--
ALTER TABLE `kecamatan`
ADD PRIMARY KEY (`id_kecamatan`);
--
-- Indexes for table `puskes`
--
ALTER TABLE `puskes`
ADD PRIMARY KEY (`id_puskes`);
--
-- Indexes for table `spesialis`
--
ALTER TABLE `spesialis`
ADD PRIMARY KEY (`id_spesialis`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `admin`
--
ALTER TABLE `admin`
MODIFY `id_admin` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
--
-- AUTO_INCREMENT for table `kecamatan`
--
ALTER TABLE `kecamatan`
MODIFY `id_kecamatan` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=20;
--
-- AUTO_INCREMENT for table `puskes`
--
ALTER TABLE `puskes`
MODIFY `id_puskes` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=97;
--
-- AUTO_INCREMENT for table `spesialis`
--
ALTER TABLE `spesialis`
MODIFY `id_spesialis` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=15;
/*!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 */;
|
INSERT INTO products (product_name, department_name,
price, stock_quantity)
VALUES ("shovel", "garden", "$19.99", 5),
("dogfood", "pets", "$49.99", 8),
("light bulb", "home", "$5.99", 10),
("tv", "electronics", "$2,000", 3),
("football", "sports", "19.99", 8),
("hairbrush", "beauty", "9.99", 12),
("laptop", "electronics", "1,500", 8),
("fishfood", "pets", "3.99", 25),
("shampoo", "beauty", "7.65", 30),
("catfood", "pets", "19.99", 8); |
CREATE TABLE IF NOT EXISTS `chat` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`msg` varchar(1024) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;
|
alter table GAME add constraint GAME_FK1 foreign key (FIRST_TEAM) references TEAM (TEAM_ID);
alter table GAME add constraint GAME_FK2 foreign key (LAST_TEAM) references TEAM (TEAM_ID);
|
-- --------------------------------------------------------
-- Host: 127.0.0.1
-- Server version: 10.1.21-MariaDB - mariadb.org binary distribution
-- Server OS: Win32
-- HeidiSQL Verzió: 9.4.0.5125
-- --------------------------------------------------------
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET NAMES utf8 */;
/*!50503 SET NAMES utf8mb4 */;
/*!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' */;
-- Dumping database structure for login-system-db
CREATE DATABASE IF NOT EXISTS `login-system-db` /*!40100 DEFAULT CHARACTER SET utf8 COLLATE utf8_hungarian_ci */;
USE `login-system-db`;
-- Dumping structure for tábla login-system-db.roles
CREATE TABLE IF NOT EXISTS `roles` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'role id',
`title` varchar(255) COLLATE utf8_hungarian_ci NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_hungarian_ci;
-- Dumping data for table login-system-db.roles: ~0 rows (approximately)
/*!40000 ALTER TABLE `roles` DISABLE KEYS */;
INSERT INTO `roles` (`id`, `title`) VALUES
(1, 'admin'),
(2, 'editor');
/*!40000 ALTER TABLE `roles` ENABLE KEYS */;
-- Dumping structure for tábla login-system-db.users
CREATE TABLE IF NOT EXISTS `users` (
`user_id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(50) COLLATE utf8_hungarian_ci NOT NULL,
`email` varchar(100) COLLATE utf8_hungarian_ci NOT NULL,
`username` varchar(50) COLLATE utf8_hungarian_ci NOT NULL,
`password` varchar(250) COLLATE utf8_hungarian_ci NOT NULL,
`role_id` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`user_id`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_hungarian_ci;
-- Dumping data for table login-system-db.users: 1 rows
/*!40000 ALTER TABLE `users` DISABLE KEYS */;
INSERT INTO `users` (`user_id`, `name`, `email`, `username`, `password`, `role_id`) VALUES
(1, 'Admin Admin', 'admin@admin.com', 'admin', '8c6976e5b5410415bde908bd4dee15dfb167a9c873fc4bb8a81f6f2ab448a918', 1);
/*!40000 ALTER TABLE `users` ENABLE KEYS */;
/*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */;
/*!40014 SET FOREIGN_KEY_CHECKS=IF(@OLD_FOREIGN_KEY_CHECKS IS NULL, 1, @OLD_FOREIGN_KEY_CHECKS) */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
|
USE Agenda
CREATE PROCEDURE dbo.Contactos_Insert
@Nombre nchar(50),
@Direccion nchar(100),
@Mail nchar(50)
AS
BEGIN
INSERT INTO Contactos (Nombre,Direccion,Mail)
VALUES(
@Nombre,
@Direccion,
@Mail
);
SELECT CAST(scope_identity() AS int);
END
EXEC Contactos_Insert 'Juan Antonio Lavalleja', 'Avenida de las Leyes', 'jlavalleja@lavalleja.com.uy'
SELECT * FROM Contactos
|
drop sequence id_sequence_crypt;
create sequence id_sequence start 200 increment 10;
|
ALTER TABLE neosuniversity.tc_course
ADD FOREIGN KEY (author_id)
REFERENCES neosuniversity.tc_author (id);
ALTER TABLE neosuniversity.tr_requirement_course
ADD FOREIGN KEY (course_id)
REFERENCES neosuniversity.tc_course (id);
ALTER TABLE neosuniversity.tr_requirement_course
ADD FOREIGN KEY (requirement_id)
REFERENCES neosuniversity.tc_requirement (id);
ALTER TABLE neosuniversity.tr_categ_course
ADD FOREIGN KEY (category_id)
REFERENCES neosuniversity.tc_category (id);
ALTER TABLE neosuniversity.tr_categ_course
ADD FOREIGN KEY (course_id)
REFERENCES neosuniversity.tc_course (id);
ALTER TABLE neosuniversity.tr_objective_course
ADD FOREIGN KEY (course_id)
REFERENCES neosuniversity.tc_course (id);
ALTER TABLE neosuniversity.tr_objective_course
ADD FOREIGN KEY (objective_id)
REFERENCES neosuniversity.tc_objective (id);
ALTER TABLE neosuniversity.tw_class
ADD FOREIGN KEY (control_panel_id)
REFERENCES neosuniversity.tw_control_panel (id);
ALTER TABLE neosuniversity.tw_class
ADD FOREIGN KEY (section_id)
REFERENCES neosuniversity.tr_course_section (id);
ALTER TABLE neosuniversity.tw_section
ADD FOREIGN KEY (control_panel_id)
REFERENCES neosuniversity.tw_control_panel (id);
ALTER TABLE neosuniversity.tw_section
ADD FOREIGN KEY (section_id)
REFERENCES neosuniversity.tr_course_section (id);
ALTER TABLE neosuniversity.tr_class
ADD FOREIGN KEY (section_id)
REFERENCES neosuniversity.tr_course_section (id);
ALTER TABLE neosuniversity.tr_course_section
ADD FOREIGN KEY (course_id)
REFERENCES neosuniversity.tc_course (id);
ALTER TABLE neosuniversity.tw_control_panel
ADD FOREIGN KEY (course_id)
REFERENCES neosuniversity.tc_course (id);
ALTER TABLE neosuniversity.tw_control_panel
ADD FOREIGN KEY (username_id)
REFERENCES neosuniversity.tw_user (username);
ALTER TABLE neosuniversity.tw_user
ADD FOREIGN KEY (country_id)
REFERENCES neosuniversity.tc_country (id);
/*is pending tw_control_panel*/
|
ALTER TABLE VND.ELO_PRIORITY_PANEL
DROP CONSTRAINT ELO_PRIORITY_PANEL_U01;
ALTER TABLE VND.ELO_PRIORITY_PANEL
ADD CONSTRAINT XucCENTRO_EXPEDIDOR
UNIQUE (CD_ELO_PRIORITY_OPTION, NU_ORDER, CD_CENTRO_EXPEDIDOR);
COMMIT; |
CREATE VIEW BURI_PATH_DATA_USER AS
SELECT
BURI_PATH_DATA.PATH_ID AS PATH_ID
,BURI_PATH_DATA.PATH_NAME AS PATH_NAME
,BURI_PATH_DATA.REAL_PATH_NAME AS REAL_PATH_NAME
,BURI_PATH_DATA.PATH_TYPE AS PATH_TYPE
,BURI_PATH_DATA.PKEY_NUM AS PKEY_NUM
,BURI_PATH_DATA.PKEY_VAL AS PKEY_VAL
,BURI_PATH_DATA.DATA_TYPE AS DATA_TYPE
,BURI_PATH_DATA.TABLE_NAME AS TABLE_NAME
,BURI_PATH_DATA.DATA_ID AS DATA_ID
,BURI_PATH_DATA.STATE_ID AS STATE_ID
,BURI_PATH_DATA.AUTO_RUN_TIME AS AUTO_RUN_TIME
,BURI_PATH_DATA.PARTICIPANT_NAME AS PARTICIPANT_NAME
,BURI_PATH_DATA.PARTICIPANT_TYPE AS PARTICIPANT_TYPE
,BURI_USER.BURI_USER_ID AS BURI_USER_ID
,BURI_USER.USER_ID_VAL AS USER_ID_VAL
,BURI_USER.USER_ID_NUM AS USER_ID_NUM
FROM
BURI_PATH_DATA,
BURI_STATE_USER,
BURI_USER
WHERE
BURI_PATH_DATA.STATE_ID = BURI_STATE_USER.STATE_ID
AND BURI_USER.BURI_USER_ID = BURI_STATE_USER.BURI_USER_ID
AND BURI_STATE_USER.DELETE_DATE > CURRENT_TIMESTAMP
;
|
USE `sotorrent17_12`;
SET foreign_key_checks = 0;
LOAD DATA LOCAL INFILE 'PostReferenceGH.csv' INTO TABLE `PostReferenceGH`
CHARACTER SET utf8mb4
FIELDS TERMINATED BY ','
OPTIONALLY ENCLOSED BY '\"'
ESCAPED BY '\"'
LINES TERMINATED BY '\n'
IGNORE 1 LINES;
SET foreign_key_checks = 1;
|
/*CREACION Y CONEXIÓN DE LA BD*/
CREATE DATABASE gestiongym;
\c gestiongym
/*EXTENSION pgcrypto */
CREATE EXTENSION pgcrypto
/*TABLA GYMS*/
create table gyms (
id INT PRIMARY KEY GENERATED ALWAYS AS IDENTITY,
direccion VARCHAR(50),
codigo_postal VARCHAR(50),
pais VARCHAR(50),
ciudad VARCHAR(50)
);
insert into gyms (direccion, codigo_postal, pais, ciudad) values (
'C/Mayor 5', '64851', 'España', 'Barcelona');
/*TABLA CLIENTES*/
create table clientes (
id INT PRIMARY KEY GENERATED ALWAYS AS IDENTITY,
id_gym INT REFERENCES gyms(id),
dni VARCHAR(8) UNIQUE,
password VARCHAR(60),
nombre VARCHAR(50),
apellidos VARCHAR(50),
pagado BOOLEAN,
dentro BOOLEAN,
fecha_inscripcion VARCHAR(10),
fecha_nacimiento VARCHAR(10),
es_admin BOOLEAN
);
insert into clientes ( id_gym, dni, password, nombre, apellidos, pagado,
dentro, fecha_inscripcion, fecha_nacimiento,es_admin) values ( 1, '1871854D',
crypt('alene',gen_salt('bf')), 'Alene', 'Roussell', false, true, '04/05/2019', '20/03/1996',false);
insert into clientes ( id_gym, dni, password, nombre, apellidos, pagado,
dentro, fecha_inscripcion, fecha_nacimiento,es_admin) values ( 1, '3981749L',
crypt('marc',gen_salt('bf')), 'Marc', 'Roussell', false, true, '04/05/2019', '02/05/1992',true);
/*TABLA CHECK_HORAS*/
create table check_horas (
id INT PRIMARY KEY GENERATED ALWAYS AS IDENTITY,
dni_cliente VARCHAR(8) UNIQUE references clientes(dni),
id_gym INT references gyms(id),
horas INT,
fecha VARCHAR(10)
);
insert into check_horas ( dni_cliente, id_gym, horas, fecha) values ('1871854D', 1, 0, '12/9/2019');
|
--@Autor: Berdejo Arvizu Oscar || Olmos Cruz Edwin
--@Fecha creación: 25/10/2018
--@Descripción: Creacion De indices
--Usuario Admin: baoc_proy_admin
--Usuario Invitado: baoc_proy_invitado
connect baoc_proy_admin
CREATE TABLE DIRECTORES_TESIS(
ID NUMBER(3,0),
NOMBRE VARCHAR(100)
);
DECLARE
vClaveProf profesor.profesor_id%TYPE;
vNombre profesor.nombre%TYPE;
vApellidoP profesor.ap_paterno%TYPE;
vApellidoM profesor.ap_materno%TYPE;
CURSOR dirTesis
IS
SELECT profesor_id, nombre, ap_paterno, ap_materno
from profesor
where TIPO_PROFESOR = 'C';
BEGIN
open dirTesis;
dbms_output.put_line('Directores para tu tesis');
LOOP
FETCH dirTesis INTO vClaveProf,vNombre,vApellidoP,vApellidoM;
EXIT WHEN dirTesis%NOTFOUND;
INSERT INTO DIRECTORES_TESIS(ID,NOMBRE)
VALUES(vClaveProf, vNombre ||' ' ||vApellidoP ||' '|| vApellidoM);
END LOOP;
CLOSE dirTesis;
END;
/ |
DROP DATABASE adlister_db;
CREATE DATABASE adlister_db;
DROP TABLE IF EXISTS ads;
DROP TABLE IF EXISTS users;
DROP TABLE IF EXISTS ad_categories;
DROP TABLE IF EXISTS comments;
DROP TABLE IF EXISTS admins;
DROP TABLE IF EXISTS vote_comment;
USE adlister_db;
CREATE TABLE users (
id INT UNSIGNED NOT NULL AUTO_INCREMENT,
username VARCHAR(240) UNIQUE NOT NULL,
email VARCHAR(240) UNIQUE NOT NULL,
password VARCHAR(255) NOT NULL,
PRIMARY KEY (id)
);
CREATE TABLE admins (
id INT UNSIGNED NOT NULL AUTO_INCREMENT,
level ENUM('1', '2', '3') NOT NULL,
jedimaster INT UNSIGNED NULL DEFAULT NULL,
user_id INT UNSIGNED NOT NULL,
password VARCHAR(255) NOT NULL,
created TIMESTAMP NOT NULL,
PRIMARY KEY (id),
FOREIGN KEY (user_id) REFERENCES users(id)
ON DELETE CASCADE,
FOREIGN KEY (jedimaster) REFERENCES users(id)
ON DELETE CASCADE
);
-- MAKE UNIQUES
CREATE TABLE report (
id INT UNSIGNED NOT NULL AUTO_INCREMENT,
user_id INT UNSIGNED NOT NULL,
offense INT UNSIGNED NOT NULL,
user_reported_id INT UNSIGNED NULL DEFAULT NULL,
ad_id INT UNSIGNED NULL DEFAULT NULL,
comment_id INT UNSIGNED NULL DEFAULT NULL,
description TEXT NOT NULL,
created TIMESTAMP NOT NULL,
PRIMARY KEY (id),
FOREIGN KEY (user_id) REFERENCES users(id)
ON DELETE CASCADE,
FOREIGN KEY (user_reported_id) REFERENCES users(id)
ON DELETE CASCADE,
FOREIGN KEY (ad_id) REFERENCES ads(id)
ON DELETE CASCADE,
FOREIGN KEY (comment_id) REFERENCES comments(id)
ON DELETE CASCADE,
FOREIGN KEY (offense) REFERENCES offense(id)
ON DELETE CASCADE
);
CREATE TABLE offense (
id INT UNSIGNED NOT NULL AUTO_INCREMENT,
offense_name VARCHAR(50) NOT NULL,
PRIMARY KEY (id)
);
CREATE TABLE ads (
id INT UNSIGNED NOT NULL AUTO_INCREMENT,
user_id INT UNSIGNED NOT NULL,
title VARCHAR(240) NOT NULL,
description TEXT NOT NULL,
created TIMESTAMP NOT NULL,
PRIMARY KEY (id),
FOREIGN KEY (user_id) REFERENCES users(id)
ON DELETE CASCADE
);
CREATE TABLE categories (
id INT UNSIGNED NOT NULL AUTO_INCREMENT,
category_name VARCHAR(50) NOT NULL,
PRIMARY KEY (id)
);
CREATE TABLE ad_categories (
ad_id INT UNSIGNED NOT NULL,
categories_id INT UNSIGNED NOT NULL,
FOREIGN KEY (ad_id) REFERENCES ads(id)
ON DELETE CASCADE,
FOREIGN KEY (categories_id) REFERENCES categories(id)
);
CREATE TABLE vote_ad (
ad_id INT UNSIGNED NOT NULL,
user_id INT UNSIGNED NOT NULL,
direction ENUM('up', 'down') NOT NULL,
vote TIMESTAMP NOT NULL,
FOREIGN KEY (ad_id) REFERENCES ads(id)
ON DELETE CASCADE,
FOREIGN KEY (user_id) REFERENCES users(id)
ON DELETE CASCADE
);
CREATE TABLE vote_comment (
comment_id INT UNSIGNED NOT NULL,
user_id INT UNSIGNED NOT NULL,
direction ENUM('up', 'down') NOT NULL,
vote TIMESTAMP NOT NULL,
FOREIGN KEY (comment_id) REFERENCES comments(id)
ON DELETE CASCADE,
FOREIGN KEY (user_id) REFERENCES users(id)
ON DELETE CASCADE
);
CREATE TABLE profile_pic (
id INT UNSIGNED NOT NULL AUTO_INCREMENT,
user_id INT UNSIGNED NOT NULL,
fileHandler VARCHAR(50) NOT NULL,
PRIMARY KEY (id),
FOREIGN KEY (user_id) REFERENCES users(id)
ON DELETE CASCADE
);
CREATE TABLE comments (
id INT UNSIGNED NOT NULL AUTO_INCREMENT,
user_id INT UNSIGNED NOT NULL,
ad_id INT UNSIGNED NOT NULL,
parent_comment_id int UNSIGNED NULL DEFAULT NULL,
comment TEXT NOT NULL,
posted TIMESTAMP NOT NULL,
PRIMARY KEY (id),
FOREIGN KEY (user_id) REFERENCES users(id)
ON DELETE CASCADE,
FOREIGN KEY (ad_id) REFERENCES ads(id)
ON DELETE CASCADE,
FOREIGN KEY (parent_comment_id) REFERENCES comments (id)
ON DELETE CASCADE
); |
CREATE TABLE Social_Media (
Platform VARCHAR,
Party VARCHAR,
Max_Followers NUMERIC,
Total_Posts NUMERIC,
Average_FavReac NUMERIC,
Average_RetweetsShares NUMERIC
);
CREATE TABLE Governors (
state VARCHAR,
county VARCHAR,
candidate VARCHAR,
Party VARCHAR,
votes INT,
won VARCHAR
);
CREATE TABLE Senate (
state VARCHAR,
county VARCHAR,
candidate VARCHAR,
Party VARCHAR,
votes INT
);
CREATE TABLE President (
state VARCHAR,
county VARCHAR,
candidate VARCHAR,
Party VARCHAR,
votes INT,
won VARCHAR
);
CREATE TABLE Top100 (
Term VARCHAR,
Year VARCHAR,
Party VARCHAR,
Average_Effect NUMERIC,
Facebook_Posts NUMERIC,
Facebook_Reactions NUMERIC,
Facebook_Shares NUMERIC,
Number_Tweets NUMERIC,
Effect_TwitterFavorites NUMERIC,
Effect_TwitterRetweets NUMERIC
);
SELECT * FROM Governors
SELECT * FROM President
SELECT * FROM Senate
SELECT * FROM Social_Media
SELECT * FROM Top100 |
# Write your MySQL query statement below
select name, ifnull(sum(distance),0) as travelled_distance
from Users u left join Rides r
on u.id=r.user_id
group by r.user_id
order by travelled_distance desc, name
|
-- phpMyAdmin SQL Dump
-- version 4.6.6deb5
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Aug 28, 2019 at 10:13 PM
-- Server version: 5.7.23-0ubuntu0.18.04.1
-- PHP Version: 5.6.40-10+ubuntu18.04.1+deb.sury.org+1
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: `cake_project`
--
-- --------------------------------------------------------
--
-- Table structure for table `users`
--
CREATE TABLE `users` (
`id` int(11) NOT NULL,
`name` varchar(100) NOT NULL,
`email` varchar(255) NOT NULL,
`mobile` varchar(40) NOT NULL,
`status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '1 => Active,0=>Inactive'
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Indexes for dumped tables
--
--
-- Indexes for table `users`
--
ALTER TABLE `users`
ADD PRIMARY KEY (`id`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `users`
--
ALTER TABLE `users`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
/*!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 */;
|
CREATE TABLE [crm].[proveedores] (
[id_proveedor] INT IDENTITY (1, 1) NOT NULL,
[activo] BIT NOT NULL,
[codigo] VARCHAR (20) NOT NULL,
[fecha_actualizacion] DATETIME2 (0) NOT NULL,
[nombre] VARCHAR (100) NOT NULL,
[usuario_actualizacion] VARCHAR (50) NOT NULL,
[id_cliente] INT NOT NULL,
CONSTRAINT [PK_proveedores] PRIMARY KEY CLUSTERED ([id_proveedor] ASC) WITH (FILLFACTOR = 80),
CONSTRAINT [FK_proveedores] FOREIGN KEY ([id_cliente]) REFERENCES [crm].[clientes] ([id_cliente]),
CONSTRAINT [UK_proveedores_01] UNIQUE NONCLUSTERED ([nombre] ASC) WITH (FILLFACTOR = 80),
CONSTRAINT [UK_proveedores_02] UNIQUE NONCLUSTERED ([codigo] ASC) WITH (FILLFACTOR = 80)
);
|
SELECT COUNT(*) AS nbr_doublon, email
FROM nounou
GROUP BY email
HAVING COUNT(*) > 1
DELETE t1
FROM nounou AS t1, nounou AS t2
WHERE t1.id_nounou > t2.id_nounou
AND t1.email = t2.email |
CREATE OR REPLACE VIEW SCH_COLUMN AS
SELECT
COL.TABLE_CATALOG AS CATALOG_NAME
, COL.TABLE_SCHEMA AS SCHEMA_NAME
, COL.TABLE_NAME AS TABLE_NAME
, TAB.TABLE_TYPE AS TABLE_TYPE
, COL.COLUMN_NAME AS COLUMN_NAME
, COL.ORDINAL_POSITION AS POSITION
, COL.COLUMN_DEFAULT AS DEFAULT
, COL.IS_NULLABLE AS IS_NULL
, COL.DATA_TYPE AS TYPE
, COL.DOMAIN_NAME AS DOMAIN_NAME
, CASE
WHEN COL.CHARACTER_MAXIMUM_LENGTH IS NOT NULL
THEN COL.CHARACTER_MAXIMUM_LENGTH
ELSE COL.NUMERIC_PRECISION
END AS SIZE
, COL.UDT_NAME AS UDT
, CASE
WHEN EXISTS (SELECT 1
FROM INFORMATION_SCHEMA.CONSTRAINT_COLUMN_USAGE
JOIN INFORMATION_SCHEMA.TABLE_CONSTRAINTS
USING (TABLE_NAME, CONSTRAINT_NAME)
WHERE TABLE_NAME = COL.TABLE_NAME
AND COLUMN_NAME = COL.COLUMN_NAME
AND CONSTRAINT_TYPE = 'PRIMARY KEY'
) THEN 'YES'::VARCHAR(3)
ELSE 'NO'::VARCHAR(3)
END AS PRIMARY_KEY
, CASE
WHEN EXISTS (SELECT 1
FROM INFORMATION_SCHEMA.CONSTRAINT_COLUMN_USAGE
JOIN INFORMATION_SCHEMA.TABLE_CONSTRAINTS
USING (TABLE_NAME, CONSTRAINT_NAME)
WHERE TABLE_NAME = COL.TABLE_NAME
AND COLUMN_NAME = COL.COLUMN_NAME
AND CONSTRAINT_TYPE = 'UNIQUE'
) THEN 'YES'::VARCHAR(3)
ELSE 'NO'::VARCHAR(3)
END AS UNIQUE_KEY
, CASE
WHEN EXISTS (SELECT 1
FROM INFORMATION_SCHEMA.CONSTRAINT_COLUMN_USAGE
JOIN INFORMATION_SCHEMA.TABLE_CONSTRAINTS
USING (TABLE_NAME, CONSTRAINT_NAME)
JOIN INFORMATION_SCHEMA.CHECK_CONSTRAINTS
USING (CONSTRAINT_NAME)
WHERE TABLE_NAME = COL.TABLE_NAME
AND COLUMN_NAME = COL.COLUMN_NAME
AND CONSTRAINT_TYPE = 'CHECK'
) THEN (SELECT CHECK_CLAUSE
FROM INFORMATION_SCHEMA.CONSTRAINT_COLUMN_USAGE
JOIN INFORMATION_SCHEMA.TABLE_CONSTRAINTS
USING (TABLE_NAME, CONSTRAINT_NAME)
JOIN INFORMATION_SCHEMA.CHECK_CONSTRAINTS
USING (CONSTRAINT_NAME)
WHERE TABLE_NAME = COL.TABLE_NAME
AND COLUMN_NAME = COL.COLUMN_NAME
AND CONSTRAINT_TYPE = 'CHECK'
)
ELSE 'NO'
END AS CHECK_KEY
, FK.TABLE_REFERENCE
, FK.COLUMN_REFERENCE
FROM INFORMATION_SCHEMA.COLUMNS COL
LEFT JOIN (
SELECT
KEY_COL_USE.TABLE_NAME
, KEY_COL_USE.COLUMN_NAME
, (SELECT TABLE_NAME
FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE
WHERE CONSTRAINT_NAME = REF_CONST.UNIQUE_CONSTRAINT_NAME
) AS TABLE_REFERENCE
, (SELECT COLUMN_NAME
FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE
WHERE CONSTRAINT_NAME = REF_CONST.UNIQUE_CONSTRAINT_NAME
) AS COLUMN_REFERENCE
FROM INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS REF_CONST
INNER JOIN INFORMATION_SCHEMA.KEY_COLUMN_USAGE KEY_COL_USE
USING (CONSTRAINT_NAME)
INNER JOIN INFORMATION_SCHEMA.TABLE_CONSTRAINTS TAB_CONST
USING (CONSTRAINT_NAME)
) AS FK ON
(
COL.TABLE_NAME = FK.TABLE_NAME
AND COL.COLUMN_NAME = FK.COLUMN_NAME
)
LEFT JOIN INFORMATION_SCHEMA.TABLES TAB
ON (COL.TABLE_CATALOG = TAB.TABLE_CATALOG
AND COL.TABLE_SCHEMA = TAB.TABLE_SCHEMA
AND COL.TABLE_NAME = TAB.TABLE_NAME)
ORDER BY COL.TABLE_NAME, COL.ORDINAL_POSITION |
alter database autumnia_db;
character set = 'utf8mb4';
collate='utf8mb4_general_ci';
select @@time_zone, now();
create table test (
id bigint(20) not null auto_increment,
content varchar(255) default null,
primary key(id)
) engine=InnoDB; |
-- Get the names of all of the students from a single cohort.
SELECT * FROM students WHERE cohort_id =1 ORDER BY name;
-- Select the total number of students who were in the first 3 cohorts.
SELECT count(name) AS count from students WHERE cohort_ID <=3;
SELECT count(id)
FROM students
WHERE cohort_id IN (1,2,3);
--Get all of the students that don't have an email or phone number.
SELECT name, id, cohort_id
WHERE email IS NULL
OR phone IS NULL;
-- Get all of the students without a gmail.com or phone number.
SELECT name, id, email, cohort_id
FROM students
WHERE email NOT LIKE '%gmail.com'
AND phone IS NULL;
-- Get all of the students currently enrolled.
SELECT name,email,id,cohort_id
FROM students
WHERE end_date IS NULL
ORDER BY cohort_id;
-- Get all graduates without a linked Github account.
SELECT name, email, phone
FROM students
WHERE github IS NULL
AND end_date IS NOT NULL; |
update REPORT_TEMPLATE set IS_ALTERABLE_OUTPUT = false where IS_ALTERABLE_OUTPUT is null^ |
-- Classification Values
INSERT INTO
public."ClassificationTypeCategory"
(
"ClassificationTypeCategoryID",
"Name",
"IsActive",
"IsDeleted"
)
VALUES (
91829172,
'HelpTypeID',
true,
false
);
INSERT INTO public."ClassificationType"("ClassificationTypeID", "Name",
"ClassificationTypeCategoryID")
VALUES (918291721,'Tour', 91829172);
INSERT INTO public."ClassificationType"("ClassificationTypeID", "Name",
"ClassificationTypeCategoryID")
VALUES (918291722,'Callout', 91829172);
INSERT INTO public."ClassificationType"("ClassificationTypeID", "Name",
"ClassificationTypeCategoryID")
VALUES (918291723,'Show Me How', 91829172);
INSERT INTO
public."ClassificationTypeCategory"
(
"ClassificationTypeCategoryID",
"Name"
)
VALUES (
127838127,
'HelpPosition'
);
INSERT INTO public."ClassificationType"("ClassificationTypeID","Name", "ClassificationTypeCategoryID")
VALUES (1278381271,'Top',127838127);
INSERT INTO public."ClassificationType"("ClassificationTypeID","Name", "ClassificationTypeCategoryID")
VALUES (1278381272,'Bottom',127838127);
INSERT INTO public."ClassificationType"("ClassificationTypeID","Name", "ClassificationTypeCategoryID")
VALUES (1278381273,'Left',127838127);
INSERT INTO public."ClassificationType"("ClassificationTypeID","Name", "ClassificationTypeCategoryID")
VALUES (1278381274,'Right',127838127);
-- New Resources And Claims
-- create resource and operations
INSERT INTO
public."Resource"
(
"ResourceName"
)
VALUES (
'Help'
);
INSERT INTO public."ResourceOperation"("ResourceID", "OperationID")
VALUES ((
select "ResourceID"
from "Resource"
where "ResourceName" = 'Help'
), (
select "OperationID"
from "Operation"
where "OperationName" = 'Add'
));
INSERT INTO public."ResourceOperation"("ResourceID", "OperationID")
VALUES ((
select "ResourceID"
from "Resource"
where "ResourceName" = 'Help'
), (
select "OperationID"
from "Operation"
where "OperationName" = 'View'
));
INSERT INTO public."ResourceOperation"("ResourceID", "OperationID")
VALUES ((
select "ResourceID"
from "Resource"
where "ResourceName" = 'Help'
), (
select "OperationID"
from "Operation"
where "OperationName" = 'Edit'
));
INSERT INTO public."ResourceOperation"("ResourceID", "OperationID")
VALUES ((
select "ResourceID"
from "Resource"
where "ResourceName" = 'Help'
), (
select "OperationID"
from "Operation"
where "OperationName" = 'Delete'
));
-- Role Claims
-- create claims support all, user view
INSERT INTO public."RoleClaim"("RoleID", "ResourceID", "OperationID", "IsGlobal"
)
VALUES ((
select "RoleID"
from "Role"
where "RoleName" = 'Support Administrator'
), (
select "ResourceID"
from "Resource"
where "ResourceName" = 'Help'
), (
select "OperationID"
from "Operation"
where "OperationName" = 'Delete'
), true);
INSERT INTO public."RoleClaim"("RoleID", "ResourceID", "OperationID", "IsGlobal"
)
VALUES ((
select "RoleID"
from "Role"
where "RoleName" = 'Support Administrator'
), (
select "ResourceID"
from "Resource"
where "ResourceName" = 'Help'
), (
select "OperationID"
from "Operation"
where "OperationName" = 'View'
), true);
INSERT INTO public."RoleClaim"("RoleID", "ResourceID", "OperationID", "IsGlobal"
)
VALUES ((
select "RoleID"
from "Role"
where "RoleName" = 'Support Administrator'
), (
select "ResourceID"
from "Resource"
where "ResourceName" = 'Help'
), (
select "OperationID"
from "Operation"
where "OperationName" = 'Edit'
), true);
INSERT INTO public."RoleClaim"("RoleID", "ResourceID", "OperationID", "IsGlobal"
)
VALUES ((
select "RoleID"
from "Role"
where "RoleName" = 'User'
), (
select "ResourceID"
from "Resource"
where "ResourceName" = 'Help'
), (
select "OperationID"
from "Operation"
where "OperationName" = 'View'
), true);
INSERT INTO public."RoleClaim"("RoleID", "ResourceID", "OperationID", "IsGlobal"
)
VALUES ((
select "RoleID"
from "Role"
where "RoleName" = 'Organisation Employee'
), (
select "ResourceID"
from "Resource"
where "ResourceName" = 'Help'
), (
select "OperationID"
from "Operation"
where "OperationName" = 'View'
), true);
INSERT INTO public."RoleClaim"("RoleID", "ResourceID", "OperationID", "IsGlobal"
)
VALUES ((
select "RoleID"
from "Role"
where "RoleName" = 'Support Administrator'
), (
select "ResourceID"
from "Resource"
where "ResourceName" = 'Help'
), (
select "OperationID"
from "Operation"
where "OperationName" = 'Add'
), true);
-- Support Management
INSERT INTO
public."Resource"
(
"ResourceName"
)
VALUES (
'SupportManagement'
);
INSERT INTO public."ResourceOperation"("ResourceID", "OperationID")
VALUES ((
select "ResourceID"
from "Resource"
where "ResourceName" = 'SupportManagement'
), (
select "OperationID"
from "Operation"
where "OperationName" = 'View'
));
INSERT INTO public."RoleClaim"("RoleID", "ResourceID", "OperationID", "IsGlobal"
)
VALUES ((
select "RoleID"
from "Role"
where "RoleName" = 'Support Administrator'
), (
select "ResourceID"
from "Resource"
where "ResourceName" = 'SupportManagement'
), (
select "OperationID"
from "Operation"
where "OperationName" = 'View'
), true);
-- Backfill Claims
-- backfill organisation role with new Support Claims
insert into
"OrganisationRoleClaim"("OrganisationRoleID", "ResourceID", "OperationID", "StateID", "StateItemID", "IsActive", "IsDeleted",
"OrganisationID")
select
org."OrganisationRoleID",
rc."ResourceID",
rc."OperationID",
rc."StateID",
rc."StateItemID",
true,
false,
org."OrganisationID"
from
"RoleClaim" rc
inner join "OrganisationRole" org on org."IsActive" = true and org."IsDeleted" = false and org."ParentID" = rc."RoleID"
where
rc."RoleID" =
(
select "RoleID"
from "Role"
where "RoleName" = 'Support Administrator'
) and
not exists (
select
orc."OrganisationRoleClaimID"
from
"OrganisationRoleClaim" orc
where
orc."OrganisationID" = org."OrganisationID" and
orc."OrganisationRoleID" = org."OrganisationRoleID" and
orc."OperationID" = rc."OperationID" and
orc."ResourceID" = rc."ResourceID" and
orc."StateID" = rc."StateID" and
orc."StateItemID" = rc."StateItemID"
);
insert into
"OrganisationRoleClaim"("OrganisationRoleID", "ResourceID", "OperationID", "StateID", "StateItemID", "IsActive", "IsDeleted",
"OrganisationID")
select
org."OrganisationRoleID",
rc."ResourceID",
rc."OperationID",
rc."StateID",
rc."StateItemID",
true,
false,
org."OrganisationID"
from
"RoleClaim" rc
inner join "OrganisationRole" org on org."IsActive" = true and org."IsDeleted" = false and org."ParentID" = rc."RoleID"
where
rc."RoleID" =
(
select "RoleID"
from "Role"
where "RoleName" = 'User'
) and
not exists (
select
orc."OrganisationRoleClaimID"
from
"OrganisationRoleClaim" orc
where
orc."OrganisationID" = org."OrganisationID" and
orc."OrganisationRoleID" = org."OrganisationRoleID" and
orc."OperationID" = rc."OperationID" and
orc."ResourceID" = rc."ResourceID" and
orc."StateID" = rc."StateID" and
orc."StateItemID" = rc."StateItemID"
);
insert into
"OrganisationRoleClaim"("OrganisationRoleID", "ResourceID", "OperationID", "StateID", "StateItemID", "IsActive", "IsDeleted",
"OrganisationID")
select
org."OrganisationRoleID",
rc."ResourceID",
rc."OperationID",
rc."StateID",
rc."StateItemID",
true,
false,
org."OrganisationID"
from
"RoleClaim" rc
inner join "OrganisationRole" org on org."IsActive" = true and org."IsDeleted" = false and org."ParentID" = rc."RoleID"
where
rc."RoleID" =
(
select "RoleID"
from "Role"
where "RoleName" = 'Organisation Employee'
) and
not exists (
select
orc."OrganisationRoleClaimID"
from
"OrganisationRoleClaim" orc
where
orc."OrganisationID" = org."OrganisationID" and
orc."OrganisationRoleID" = org."OrganisationRoleID" and
orc."OperationID" = rc."OperationID" and
orc."ResourceID" = rc."ResourceID" and
orc."StateID" = rc."StateID" and
orc."StateItemID" = rc."StateItemID"
);
-- backfill organisation role with new Support Claims
insert into
"OrganisationRoleClaim"("OrganisationRoleID", "ResourceID", "OperationID", "StateID", "StateItemID", "IsActive", "IsDeleted",
"OrganisationID")
select
org."OrganisationRoleID",
rc."ResourceID",
rc."OperationID",
rc."StateID",
rc."StateItemID",
true,
false,
org."OrganisationID"
from
"RoleClaim" rc
inner join "OrganisationRole" org on org."IsActive" = true and org."IsDeleted" = false and org."ParentID" = rc."RoleID"
where
rc."RoleID" =
(
select "RoleID"
from "Role"
where "RoleName" = 'Support Administrator'
) and
not exists (
select
orc."OrganisationRoleClaimID"
from
"OrganisationRoleClaim" orc
where
orc."OrganisationID" = org."OrganisationID" and
orc."OrganisationRoleID" = org."OrganisationRoleID" and
orc."OperationID" = rc."OperationID" and
orc."ResourceID" = rc."ResourceID" and
orc."StateID" = rc."StateID" and
orc."StateItemID" = rc."StateItemID"
);
-- backfill organisation role with new Support Claims
insert into
"OrganisationRoleClaim"("OrganisationRoleID", "ResourceID", "OperationID", "StateID", "StateItemID", "IsActive", "IsDeleted",
"OrganisationID")
select
org."OrganisationRoleID",
rc."ResourceID",
rc."OperationID",
rc."StateID",
rc."StateItemID",
true,
false,
org."OrganisationID"
from
"RoleClaim" rc
inner join "OrganisationRole" org on org."IsActive" = true and org."IsDeleted" = false and org."ParentID" = rc."RoleID"
where
rc."RoleID" =
(
select "RoleID"
from "Role"
where "RoleName" = 'Support Administrator'
) and
not exists (
select
orc."OrganisationRoleClaimID"
from
"OrganisationRoleClaim" orc
where
orc."OrganisationID" = org."OrganisationID" and
orc."OrganisationRoleID" = org."OrganisationRoleID" and
orc."OperationID" = rc."OperationID" and
orc."ResourceID" = rc."ResourceID" and
orc."StateID" = rc."StateID" and
orc."StateItemID" = rc."StateItemID"
);
-- Tables
CREATE TABLE public."Help" (
"HelpID" UUID DEFAULT uuid_generate_v1() NOT NULL,
"Name" VARCHAR(400) NOT NULL,
"Description" VARCHAR(2000),
"HelpTypeID" INTEGER NOT NULL,
"IsActive" BOOLEAN DEFAULT true NOT NULL,
"IsDeleted" BOOLEAN DEFAULT false NOT NULL,
"CreatedOn" TIMESTAMP WITH TIME ZONE DEFAULT now() NOT NULL,
"ModifiedOn" TIMESTAMP WITH TIME ZONE,
"UiPageUrl" VARCHAR(400),
"CreatedBy" UUID NOT NULL,
"ModifiedBy" UUID,
CONSTRAINT "Help_pkey" PRIMARY KEY("HelpID"),
CONSTRAINT "HelpTypeiD_Classificiation" FOREIGN KEY ("HelpTypeID")
REFERENCES public."ClassificationType"("ClassificationTypeID")
ON DELETE NO ACTION
ON UPDATE NO ACTION
NOT DEFERRABLE,
CONSTRAINT "Help_fk" FOREIGN KEY ("CreatedBy")
REFERENCES public."UserAccountOrganisation"("UserAccountOrganisationID")
ON DELETE NO ACTION
ON UPDATE NO ACTION
NOT DEFERRABLE,
CONSTRAINT "Help_fk1" FOREIGN KEY ("ModifiedBy")
REFERENCES public."UserAccountOrganisation"("UserAccountOrganisationID")
ON DELETE NO ACTION
ON UPDATE NO ACTION
NOT DEFERRABLE
NOT VALID
)
WITH (oids = false);
CREATE TABLE public."HelpItem" (
"HelpItemID" UUID DEFAULT uuid_generate_v1() NOT NULL,
"HelpID" UUID NOT NULL,
"Title" VARCHAR(400) NOT NULL,
"Description" VARCHAR,
"UiSelector" VARCHAR(400),
"UiSelectorParent" VARCHAR(400),
"IsActive" BOOLEAN DEFAULT true NOT NULL,
"IsDeleted" BOOLEAN DEFAULT false NOT NULL,
"CreatedOn" TIMESTAMP WITH TIME ZONE DEFAULT now() NOT NULL,
"ModifiedOn" TIMESTAMP WITH TIME ZONE,
"DisplayOrder" INTEGER DEFAULT (-1),
"EffectiveFrom" TIMESTAMP WITH TIME ZONE,
"UiPosition" INTEGER,
"CreatedBy" UUID NOT NULL,
"ModifiedBy" UUID,
"IncludeStartTour" BOOLEAN DEFAULT false NOT NULL,
CONSTRAINT "HelpItem_pkey" PRIMARY KEY("HelpItemID"),
CONSTRAINT "HelpItem_fk" FOREIGN KEY ("UiPosition")
REFERENCES public."ClassificationType"("ClassificationTypeID")
ON DELETE NO ACTION
ON UPDATE NO ACTION
NOT DEFERRABLE,
CONSTRAINT "HelpItem_fk1" FOREIGN KEY ("CreatedBy")
REFERENCES public."UserAccountOrganisation"("UserAccountOrganisationID")
ON DELETE NO ACTION
ON UPDATE NO ACTION
NOT DEFERRABLE,
CONSTRAINT "HelpItem_fk2" FOREIGN KEY ("ModifiedBy")
REFERENCES public."UserAccountOrganisation"("UserAccountOrganisationID")
ON DELETE NO ACTION
ON UPDATE NO ACTION
NOT DEFERRABLE,
CONSTRAINT "Help_HelpItem" FOREIGN KEY ("HelpID")
REFERENCES public."Help"("HelpID")
ON DELETE NO ACTION
ON UPDATE NO ACTION
NOT DEFERRABLE
)
WITH (oids = false);
CREATE TABLE public."HelpItemRole" (
"HelpItemID" UUID NOT NULL,
"RoleID" UUID NOT NULL,
CONSTRAINT "HelpItemRole_pkey" PRIMARY KEY("RoleID", "HelpItemID"),
CONSTRAINT "HelpItemRole_fk" FOREIGN KEY ("RoleID")
REFERENCES public."Role"("RoleID")
ON DELETE NO ACTION
ON UPDATE NO ACTION
NOT DEFERRABLE,
CONSTRAINT "HelpItem_HelpItemRole" FOREIGN KEY ("HelpItemID")
REFERENCES public."HelpItem"("HelpItemID")
ON DELETE NO ACTION
ON UPDATE NO ACTION
NOT DEFERRABLE
)
WITH (oids = false);
CREATE TABLE public."HelpRole" (
"HelpRoleID" UUID DEFAULT uuid_generate_v1() NOT NULL,
"RoleID" UUID NOT NULL,
CONSTRAINT "HelpRole_pkey" PRIMARY KEY("HelpRoleID"),
CONSTRAINT "HelpRole_fk" FOREIGN KEY ("RoleID")
REFERENCES public."Role"("RoleID")
ON DELETE NO ACTION
ON UPDATE NO ACTION
NOT DEFERRABLE
)
WITH (oids = false);
CREATE TABLE public."UserAccountOrganisationHelpViewed" (
"UserAccountOrganisationID" UUID NOT NULL,
"HelpItemID" UUID NOT NULL,
"CreatedOn" TIMESTAMP WITH TIME ZONE DEFAULT now() NOT NULL,
CONSTRAINT "pkUserAccountOrganisationHelpViewed" PRIMARY KEY("UserAccountOrganisationID", "HelpItemID"),
CONSTRAINT "HelpItemID_UAOID" FOREIGN KEY ("HelpItemID")
REFERENCES public."HelpItem"("HelpItemID")
ON DELETE NO ACTION
ON UPDATE NO ACTION
NOT DEFERRABLE,
CONSTRAINT "UAO_UaoHelpViewed" FOREIGN KEY ("UserAccountOrganisationID")
REFERENCES public."UserAccountOrganisation"("UserAccountOrganisationID")
ON DELETE NO ACTION
ON UPDATE NO ACTION
NOT DEFERRABLE
)
WITH (oids = false);
-- views
CREATE TABLE public."RoleHierarchy" (
"RoleHierarchyID" UUID DEFAULT uuid_generate_v1() NOT NULL,
"RoleID" UUID NOT NULL,
"ParentRoleID" UUID,
"Level" INTEGER NOT NULL,
CONSTRAINT "pkRoleHierarchy" PRIMARY KEY("RoleID", "RoleHierarchyID", "Level"),
CONSTRAINT "Hierarchy_ParentRoleID" FOREIGN KEY ("ParentRoleID")
REFERENCES public."Role"("RoleID")
ON DELETE NO ACTION
ON UPDATE NO ACTION
NOT DEFERRABLE,
CONSTRAINT "Hierarchy_RoleID" FOREIGN KEY ("RoleID")
REFERENCES public."Role"("RoleID")
ON DELETE NO ACTION
ON UPDATE NO ACTION
NOT DEFERRABLE
)
WITH (oids = false);
CREATE VIEW public."vOrganisationRoleHierarchy" (
"OrganisationRoleID",
"RoleID",
"RoleName",
"ParentRoleID",
"ParentRoleName",
"Level",
"RoleHierarchyID")
AS
SELECT orgr."OrganisationRoleID",
rh."RoleID",
r."RoleName",
rp."RoleID" AS "ParentRoleID",
rp."RoleName" AS "ParentRoleName",
rh."Level",
rh."RoleHierarchyID"
FROM "OrganisationRole" orgr
JOIN "RoleHierarchy" rh ON rh."RoleID" = orgr."ParentID"
JOIN "Role" r ON r."RoleID" = rh."RoleID"
LEFT JOIN "Role" rp ON rp."RoleID" = rh."ParentRoleID";
-- functions
CREATE OR REPLACE FUNCTION public."fn_GetHelpItems" (
"UserAccountOrganisationID" uuid,
"HelpTypeID" integer,
"UiPageUrl" varchar = NULL::character varying
)
RETURNS SETOF public."HelpItem" AS
$body$
select
hipp."HelpItemID",
hipp."HelpID",
hipp."Title",
hipp."Description",
hipp."UiSelector",
hipp."UiSelectorParent",
hipp."IsActive",
hipp."IsDeleted",
hipp."CreatedOn",
hipp."ModifiedOn",
hipp."DisplayOrder",
hipp."EffectiveFrom",
hipp."UiPosition",
hipp."CreatedBy",
hipp."ModifiedBy",
hipp."IncludeStartTour"
from "HelpItem" hipp
left outer join "Help" hel on hel."HelpID" = hipp."HelpID"
where hipp."IsDeleted" = false and hipp."HelpItemID" =
(select hip."HelpItemID"
from "HelpItem" hip
inner join
(
select hir."HelpItemID",
min(vrh."Level") as hiLevel
from "HelpItemRole" hir
inner join "vOrganisationRoleHierarchy" vrh on vrh."RoleID" =
hir."RoleID"
inner join "UserAccountOrganisationRole" uaor on
uaor."OrganisationRoleID" = vrh."OrganisationRoleID"
where uaor."UserAccountOrganisationID" =
$1
group by hir."HelpItemID"
) boo on boo."HelpItemID" = hip."HelpItemID"
where hip."IsDeleted" = false and ((hipp."UiSelector" = hip."UiSelector") or (hipp."UiSelector" is null and hip."UiSelector" is null)) and hel."HelpTypeID" = $2
and case when $3 is not null then (hel."UiPageUrl" = $3) else (hel."UiPageUrl" is null) end
and case when ($2 = (select ct."ClassificationTypeID" from "ClassificationType" ct where ct."Name" = 'Callout' and ct."ClassificationTypeCategoryID" = 91829172))
then ((to_date(cast(hipp."EffectiveFrom" as varchar),'yyyy-MM-dd') <= CURRENT_DATE) and (NOT EXISTS (select 1 from "UserAccountOrganisationHelpViewed" hv where
hv."HelpItemID" = hipp."HelpItemID" and hv."UserAccountOrganisationID" = $1)))
else
1=1
end
order by boo.hilevel asc limit 1);
$body$
LANGUAGE 'sql'
VOLATILE
CALLED ON NULL INPUT
SECURITY INVOKER
COST 100 ROWS 1000;
-- insert HelpRole data
INSERT INTO public."HelpRole"("RoleID")
VALUES ('b56622a0-3cc0-11e4-acf9-bfd11fd091e6');
INSERT INTO public."HelpRole"("RoleID")
VALUES ('b88849b0-3cc0-11e4-95f5-87c1916ab536');
INSERT INTO public."HelpRole"("RoleID")
VALUES ('a1d2bc0c-2139-11e4-9670-47a78b7cc43f');
INSERT INTO public."HelpRole"("RoleID")
VALUES ('b88822a0-3cc0-11e4-acf9-bfd11fd091e6');
INSERT INTO public."HelpRole"("RoleID")
VALUES ('b55522a0-3cc0-11e4-acf9-bfd11fd091e6');
INSERT INTO public."HelpRole"("RoleID")
VALUES ('5a81f120-bdfe-11e5-882f-00155d0ab503');
INSERT INTO public."HelpRole"("RoleID")
VALUES ('5a8453c0-bdfe-11e5-8830-00155d0ab503');
INSERT INTO public."HelpRole"("RoleID")
VALUES ('de08bac2-cc1f-11e5-8067-00155d0ab503');
-- Role Hierarchy Data
INSERT INTO
public."RoleHierarchy"
(
"RoleID",
"ParentRoleID",
"Level"
)
VALUES (
(select "RoleID" from "Role" where "RoleName" = 'User'),
null,
0
);
INSERT INTO
public."RoleHierarchy"
(
"RoleID",
"ParentRoleID",
"Level"
)
VALUES (
(select "RoleID" from "Role" where "RoleName" = 'Temporary User'),
null,
0
);
INSERT INTO
public."RoleHierarchy"
(
"RoleID",
"ParentRoleID",
"Level"
)
VALUES (
(select "RoleID" from "Role" where "RoleName" = 'Administration User'),
null,
0
);
INSERT INTO
public."RoleHierarchy"
(
"RoleID",
"ParentRoleID",
"Level"
)
VALUES (
(select "RoleID" from "Role" where "RoleName" = 'Finance Administrator'),
(select "RoleID" from "Role" where "RoleName" = 'Administration User'),
1
);
INSERT INTO
public."RoleHierarchy"
(
"RoleID",
"ParentRoleID",
"Level"
)
VALUES (
(select "RoleID" from "Role" where "RoleName" = 'Support Administrator'),
(select "RoleID" from "Role" where "RoleName" = 'Administration User'),
1
);
INSERT INTO
public."RoleHierarchy"
(
"RoleID",
"ParentRoleID",
"Level"
)
VALUES (
(select "RoleID" from "Role" where "RoleName" = 'Organisation Administrator'),
null,
0
);
INSERT INTO
public."RoleHierarchy"
(
"RoleID",
"ParentRoleID",
"Level"
)
VALUES (
(select "RoleID" from "Role" where "RoleName" = 'Organisation Employee'),
(select "RoleID" from "Role" where "RoleName" = 'Organisation Administrator'),
1
);
INSERT INTO
public."RoleHierarchy"
(
"RoleID",
"ParentRoleID",
"Level"
)
VALUES (
(select "RoleID" from "Role" where "RoleName" = 'Lender Administrator'),
null,
0
);
INSERT INTO
public."RoleHierarchy"
(
"RoleID",
"ParentRoleID",
"Level"
)
VALUES (
(select "RoleID" from "Role" where "RoleName" = 'Lender Employee'),
(select "RoleID" from "Role" where "RoleName" = 'Lender Administrator'),
1
);
-- GRANTS
GRANT DELETE, INSERT, REFERENCES, SELECT, TRIGGER, TRUNCATE, UPDATE ON Help TO bef; -- Add
GRANT DELETE, INSERT, REFERENCES, SELECT, TRIGGER, TRUNCATE, UPDATE ON HelpItem TO bef; -- Add
GRANT DELETE, INSERT, REFERENCES, SELECT, TRIGGER, TRUNCATE, UPDATE ON HelpItemRole TO bef; -- Add
GRANT DELETE, INSERT, REFERENCES, SELECT, TRIGGER, TRUNCATE, UPDATE ON HelpRole TO bef; -- Add
GRANT DELETE, INSERT, REFERENCES, SELECT, TRIGGER, TRUNCATE, UPDATE ON RoleHierarchy TO bef; -- Add
GRANT DELETE, INSERT, REFERENCES, SELECT, TRIGGER, TRUNCATE, UPDATE ON TempJsonData TO bef; -- Add
GRANT DELETE, INSERT, REFERENCES, SELECT, TRIGGER, TRUNCATE, UPDATE ON UserAccountOrganisationHelpViewed TO bef; -- Add
GRANT DELETE, INSERT, REFERENCES, SELECT, TRIGGER, TRUNCATE, UPDATE ON vOrganisationRoleHierarchy TO bef; -- Add
GRANT EXECUTE ON FUNCTION fn_GetHelpItems(in UserAccountOrganisationID uuid, in HelpTypeID int4, in UiPageUrl varchar) TO postgres;
GRANT EXECUTE ON FUNCTION fn_GetHelpItems(in UserAccountOrganisationID uuid, in HelpTypeID int4, in UiPageUrl varchar) TO bef;
GRANT EXECUTE ON FUNCTION fn_GetHelpItems(in UserAccountOrganisationID uuid, in HelpTypeID int4, in UiPageUrl varchar) TO sg_postgres_developer;
GRANT EXECUTE ON FUNCTION fn_GetHelpItems(in UserAccountOrganisationID uuid, in HelpTypeID int4, in UiPageUrl varchar) TO sg_postgres_application;
|
.headers on
.nullvalue '-null-'
.mode csv
-- -- 01
SELECT count(reading) FROM Survey WHERE quant = 'sal';
|
USE burgers_db;
INSERT INTO burgers (burger_name, devoured) VALUES ('Plain Cheeseburger', false);
INSERT INTO burgers (burger_name, devoured) VALUES ('Turkey Burger', false);
INSERT INTO burgers (burger_name, devoured) VALUES ('Veggie Burger', false);
INSERT INTO burgers (burger_name, devoured) VALUES ('Mushroom & Swiss Burger', true);
INSERT INTO burgers (burger_name, devoured) VALUES ('Angus Burger', true);
INSERT INTO burgers (burger_name, devoured) VALUES ('Impossible Burger', true); |
SELECT TOP 20000 /*p.ProjectName, pl.Name,*/
s0.Title AS MainFolder0_Title, s1.Title AS SubFolder1_Title, s2.Title AS SubFolder2_Title, w.Title AS TestCase_Title
FROM Tfs_ecom.dbo.tbl_Suite s0 WITH (NOLOCK)
LEFT JOIN Tfs_ecom.dbo.tbl_Suite s1
ON s0.SuiteId = s1.ParentSuiteId
LEFT JOIN Tfs_ecom.dbo.tbl_Suite s2 WITH (NOLOCK)
ON s1.SuiteId = s2.ParentSuiteId
LEFT JOIN Tfs_ecom.dbo.tbl_project p WITH (NOLOCK)
ON s0.ProjectId = p.projectid
LEFT JOIN Tfs_ecom.dbo.tbl_Plan pl WITH (NOLOCK)
ON s0.ProjectId = pl.ProjectId AND s0.PlanId = pl.PlanId
LEFT JOIN Tfs_ecom.dbo.tbl_SuiteEntry se WITH (NOLOCK)
ON s0.SuiteId = se.SuiteId
LEFT JOIN Tfs_ecom.dbo.WorkItemsAre w WITH (NOLOCK)
ON se.TestCaseId = w.ID
WHERE 1=1
AND w.State <> 'Closed'
AND s0.planid = 42 --OR s1.PlanId = 42 OR s2.PlanId = 42
AND w.[Work Item Type] = 'Test Case'
AND w.ID IS NOT NULL
ORDER BY s0.Title, s1.title, s2.Title
--
SELECT TOP 5000 i.Iteration, w.*--, .[Created Date], w.[Changed Date], w.[Work Item Type], w.Title, w.State, w.ID
FROM Tfs_ecom.dbo.tbl_Iteration i
JOIN Tfs_ecom.dbo.WorkItemsAre w
ON i.IterationId = w.IterationID
WHERE Iteration LIKE '%Impulse%'
ORDER BY w.ID, i.Iteration |
--
-- Database: `samplevideo_db`
--
-- --------------------------------------------------------
--
-- Table structure for table `user_details`
--
CREATE TABLE IF NOT EXISTS `user_details` (
`user_id` int(11) NOT NULL,
`username` varchar(255) DEFAULT NULL,
`first_name` varchar(50) DEFAULT NULL,
`last_name` varchar(50) DEFAULT NULL,
`gender` varchar(10) DEFAULT NULL,
`password` varchar(50) DEFAULT NULL,
`status` tinyint(10) DEFAULT NULL,
PRIMARY KEY (`user_id`)
);
--
-- Dumping data for table `user_details`
--
INSERT INTO `user_details` (`user_id`, `username`, `first_name`, `last_name`, `gender`, `password`, `status`) VALUES
(1, 'rogers63', 'david', 'john', 'Female', 'e6a33eee180b07e563d74fee8c2c66b8', 1),
(2, 'mike28', 'rogers', 'paul', 'Male', '2e7dc6b8a1598f4f75c3eaa47958ee2f', 1),
(3, 'rivera92', 'david', 'john', 'Male', '1c3a8e03f448d211904161a6f5849b68', 1),
(4, 'ross95', 'maria', 'sanders', 'Male', '62f0a68a4179c5cdd997189760cbcf18', 1),
(5, 'paul85', 'morris', 'miller', 'Female', '61bd060b07bddfecccea56a82b850ecf', 1),
(6, 'smith34', 'daniel', 'michael', 'Female', '7055b3d9f5cb2829c26cd7e0e601cde5', 1),
(7, 'james84', 'sanders', 'paul', 'Female', 'b7f72d6eb92b45458020748c8d1a3573', 1),
(8, 'daniel53', 'mark', 'mike', 'Male', '299cbf7171ad1b2967408ed200b4e26c', 1),
(9, 'brooks80', 'morgan', 'maria', 'Female', 'aa736a35dc15934d67c0a999dccff8f6', 1),
(10, 'morgan65', 'paul', 'miller', 'Female', 'a28dca31f5aa5792e1cefd1dfd098569', 1),
(11, 'sanders84', 'david', 'miller', 'Female', '0629e4f9f0e01e6f20bc2066175e09f7', 1),
(12, 'maria40', 'chrishaydon', 'bell', 'Female', '17f286a78c74db7ee24374c608a2f20c', 1),
(13, 'brown71', 'michael', 'brown', 'Male', 'fa0c46cc4339a8a51a7da1b33e9d2831', 1),
(14, 'james63', 'morgan', 'james', 'Male', 'b945416fa907fac533d94efe1974ec07', 1),
(15, 'jenny0993', 'rogers', 'chrishaydon', 'Female', '388823cb9249d4cebc9d677a99e1d79d', 1),
(16, 'john96', 'morgan', 'wright', 'Male', 'd0bb977705c3cdad1e346c898f32a1b7', 1),
(17, 'miller64', 'morgan', 'wright', 'Male', '58b207ee33794b046511203967c8e0d7', 1),
(18, 'mark46', 'david', 'ross', 'Female', '21cdcb68a932871524e16680fac72e18', 1),
(19, 'jenny0988', 'maria', 'morgan', 'Female', 'ec9ed18ae2a13fef709964af24bb60e6', 1),
(20, 'mark80', 'mike', 'bell', 'Male', '084489b355edd349bca1c798788de19a', 1),
(21, 'morris72', 'miller', 'michael', 'Male', 'bdb047eb9ea511052fc690a8ac72a7d3', 1),
(22, 'wright39', 'ross', 'rogers', 'Female', '1b6859df2da2a416c5b0fa044b1c6a75', 1),
(23, 'paul68', 'brooks', 'mike', 'Male', '12d836bf64839f987338414ccbec657f', 1),
(24, 'smith60', 'miller', 'daniel', 'Male', '494610644518624d05e2bdc8b9df3c36', 1),
(25, 'bell43', 'mike', 'wright', 'Male', '2bd4e16a15f5527cb43282ee0ef94619', 1),
(26, 'rogers79', 'wright', 'smith', 'Female', '4df306580eed9e0758a759e8c54cc0d7', 1),
(27, 'daniel56', 'david', 'morgan', 'Male', 'c374aac91fe75e5ca9d4d46351c90291', 1),
(28, 'brooks85', 'smith', 'bell', 'Female', '5160256831bf840f1d0af550dce108cf', 1),
(29, 'mike30', 'paul', 'wright', 'Female', '44cd7d4f05cd775b99d2f68b169d2764', 1),
(30, 'paul92', 'michael', 'james', 'Female', '06a8728ad70c4ba4d298650d6f68d62c', 1),
(31, 'bell96', 'michael', 'sanders', 'Female', 'da77805fb5b220853e9ee1a888ea4870', 1),
(32, 'john8', 'john', 'rivera', 'Female', '8f4eedbae6486c91521dcc9e2e746978', 1),
(33, 'chrishaydon12', 'paul', 'michael', 'Male', '341f71ff99f299c10b7bd10bb0ffd5c0', 1),
(34, 'morgan13', 'ross', 'mark', 'Female', '8f9ecff6d4562e1f2d344f753c0d540e', 1),
(35, 'james83', 'brooks', 'smith', 'Female', '4180a37ebe6c56665ecc0c09f97749bc', 1),
(36, 'chrishaydon8', 'cooper', 'brown', 'Female', '48655cff7595c40da5309e9ed6c41095', 1),
(37, 'ross85', 'ross', 'daniel', 'Male', 'a2088dbb45598312937f9c2b39d76b6b', 1),
(38, 'ross46', 'cooper', 'miller', 'Male', 'ccbffd8ac04c96f4a19b8987221f389c', 1),
(39, 'smith4', 'jenny09', 'maria', 'Female', '61210cd033e05eefd7904582f42bd9f3', 1),
(40, 'paul4', 'paul', 'rivera', 'Female', '1f76110a33d9fe38bffcbd6d6dd49a29', 1),
(41, 'daniel26', 'maria', 'sanders', 'Male', 'c2b161779bf8f62752b8cdcfeabcb952', 1),
(42, 'chrishaydon2', 'bell', 'david', 'Female', 'aae5b1e30f985f2f6eedc4eec8dd2de8', 1),
(43, 'david82', 'rivera', 'cooper', 'Male', '10752c85ab371579e5744ecce8b8dfc0', 1),
(44, 'john97', 'mark', 'david', 'Female', '8eb2c044f3d3215c910973fded3718f9', 1),
(45, 'david57', 'paul', 'cooper', 'Male', '218a9c83939355cb9b81036857412d7f', 1),
(46, 'rivera100', 'brooks', 'david', 'Male', 'eefc9091a99e39015b020af27c2e80a6', 1),
(47, 'bell13', 'james', 'maria', 'Male', '90687b869096ea955b55a88a55b0b982', 1),
(48, 'brooks65', 'john', 'mark', 'Female', 'ac3a36b10fad8f53b5b0a3d5c4aab9de', 1),
(49, 'daniel40', 'rivera', 'jenny09', 'Female', '25c8261763223229a55949b9cbaac0c6', 1),
(50, 'cooper100', 'chrishaydon', 'sanders', 'Female', '9b86a2c6fa37f5842c75dcb6aa43453d', 1),
(51, 'morris14', 'bell', 'david', 'Female', '1b8e375c5826da045b4b80cbeaffb281', 1),
(52, 'smith82', 'morris', 'brooks', 'Female', '8f9459d4946b4025c0fc92a319f62769', 1),
(53, 'cooper35', 'cooper', 'mark', 'Male', 'b87551b47f0515089a0e6c197a0524c7', 1),
(54, 'morgan94', 'james', 'brooks', 'Male', '6cd7ed7e8f66ed1154abfe390c18b271', 1),
(55, 'michael92', 'brooks', 'morris', 'Male', 'c6e7402e9de6381fd6ee0936ae304bd4', 1),
(56, 'sanders48', 'morgan', 'sanders', 'Female', '1606ebcb8b02982109e5a9ad6817d93c', 1),
(57, 'brown76', 'rivera', 'cooper', 'Female', '45903192c7e1eae93463b4881aaf3d3e', 1),
(58, 'james16', 'bell', 'john', 'Female', '2b3f531f9940613c33217c4756844069', 1),
(59, 'michael26', 'wright', 'brown', 'Male', '3c86daac8f13d18f3da5f0fef72d2d41', 1),
(60, 'wright57', 'wright', 'sanders', 'Male', 'b6b283c151b7c2f8bd6307867fac6207', 1),
(61, 'wright68', 'smith', 'michael', 'Female', 'b6d7044f51097af805a29408ab2aa895', 1),
(62, 'brooks1', 'bell', 'rivera', 'Male', '87037e26aacc077d41d83f8d6c91a95c', 1),
(63, 'bell2', 'rivera', 'david', 'Female', '0479c8271fb4dbe47106570c92abbb74', 1),
(64, 'miller100', 'brooks', 'wright', 'Male', '39e5cddf9d6fe5c39d348b5e2d45c07d', 1),
(65, 'rogers53', 'chrishaydon', 'brown', 'Male', '0377bf6ebd9bacfbe96a492c532f0e3b', 1),
(66, 'mike1', 'michael', 'sanders', 'Male', 'b9ff9aa4450707644faf5cf872a57f41', 1),
(67, 'cooper57', 'daniel', 'mark', 'Female', 'adab67243e70ed8d0938696ba1dfdabe', 1),
(68, 'daniel38', 'bell', 'michael', 'Male', '753bd83042af00c1af6af82ae4236726', 1),
(69, 'mark2', 'brown', 'bell', 'Female', '5160c711eb1a1fb416cb296cfa30d3c6', 1),
(70, 'daniel79', 'rogers', 'john', 'Male', '97dbce061c4488e48613a6d66e57c1e1', 1),
(71, 'wright4', 'paul', 'smith', 'Female', 'be2fb6743dd0c143427d6fdbb61d82ab', 1),
(72, 'brown84', 'john', 'ross', 'Male', '738cb4da81a2790a9a845f902a811ea2', 1),
(73, 'paul41', 'wright', 'brooks', 'Male', '3ce24a34ab204d82e12e60e205ff5ede', 1),
(74, 'mark5', 'brooks', 'brown', 'Male', '751933d2077ded39b30aac68060b71c5', 1),
(75, 'jenny0994', 'brown', 'morgan', 'Male', '59bb0aea62b70ddc63832302636c713c', 1),
(76, 'morris53', 'chrishaydon', 'brown', 'Male', '422bc412471dd80dc4f174c2d9a7e021', 1),
(77, 'paul68', 'mark', 'smith', 'Female', '313afaad7095a093eea942a0da8398ee', 1),
(78, 'brooks86', 'brooks', 'ross', 'Male', '73bbba08c3776debd5837a2c0dfe1e8b', 1),
(79, 'james54', 'jenny09', 'morris', 'Male', '7f686fb7a9ba33dfee86197c127365f5', 1),
(80, 'rogers58', 'morgan', 'maria', 'Female', 'f1b9d20083738141fb8c72c4d3364b4f', 1),
(81, 'maria31', 'rogers', 'brooks', 'Male', '328bb700b7eee8e5cbb15839243d327b', 1),
(82, 'david5', 'rivera', 'brown', 'Male', '14ab3096cfe6e150a56280c789e6e1e1', 1),
(83, 'mark21', 'wright', 'maria', 'Female', '442eff629cdd5657580d8c6205050e19', 1),
(84, 'jenny0932', 'mike', 'brooks', 'Female', 'a45d934a95f56a43ad85752800cfa859', 1),
(85, 'john92', 'sanders', 'mike', 'Male', 'b945d691d0ffe06cb8a6a520119a90ef', 1),
(86, 'rogers98', 'james', 'jenny09', 'Male', '79c89f1132cc08e88456b035f12d0097', 1),
(87, 'rogers95', 'jenny09', 'bell', 'Female', 'f318e4c186ab19e3d3d3591a2e075d03', 1),
(88, 'james50', 'chrishaydon', 'mark', 'Male', 'ef650493f25a16d7f4ef206cd5354f9f', 1),
(89, 'miller80', 'sanders', 'chrishaydon', 'Male', '8d0027ca30d88ad9a9880d35174919d9', 1),
(90, 'mark29', 'bell', 'paul', 'Female', '21698003655695103412c11ffe08a118', 1),
(91, 'cooper77', 'michael', 'maria', 'Male', '101faf06bcf8140ead914fbe116c941a', 1),
(92, 'john24', 'brown', 'paul', 'Male', '93a5fe6210bfcdb573ccd348e19e6a56', 1),
(93, 'chrishaydon32', 'john', 'ross', 'Female', '5c6f05dfb66be73f1a6e8e48fabcfe44', 1),
(94, 'bell41', 'morris', 'chrishaydon', 'Female', 'd5273c01c17187153a1e725d27d51034', 1),
(95, 'ross99', 'wright', 'brown', 'Male', '2b27aec5a1caf4d613a8eb8154560f49', 1),
(96, 'smith9', 'miller', 'morris', 'Male', '97ee0765b9c05d35b53769a3c4133b13', 1),
(97, 'miller73', 'chrishaydon', 'morgan', 'Male', '6c4283471ace6b4af590c180bd13b1bf', 1),
(98, 'michael44', 'cooper', 'maria', 'Female', 'dd4d053a12a3d8450166dba9177bac2c', 1),
(99, 'michael36', 'miller', 'cooper', 'Female', '36ab21ccb2a64acd5351bbb59753df9d', 1),
(100, 'smith93', 'bell', 'mike', 'Female', '8fbfdb81391ef264ae8b0df7e7e91d25', 1),
(101, 'morgan38', 'michael', 'wright', 'Male', '7fe5e229f17d1c7f98af6229bd33549b', 1),
(102, 'brown70', 'brown', 'daniel', 'Male', '80925ec8958ba5847ff2b28ec00daabb', 1),
(103, 'mike14', 'brown', 'jenny09', 'Male', 'a44db187c1c09c5872dc847ffb672e24', 1),
(104, 'daniel72', 'jenny09', 'rogers', 'Female', 'f2e51aec5731a5069e6631ae84bc86de', 1),
(105, 'jenny0974', 'ross', 'mark', 'Male', '997f99ffe068d1e4a1e6afbf872b64af', 1),
(106, 'maria51', 'rogers', 'ross', 'Male', 'ba22dcb1ad6c9240781fc6b29dcf90a8', 1),
(107, 'michael97', 'jenny09', 'morgan', 'Female', 'b3f1d9569d684ad845e82ad322aff039', 1),
(108, 'chrishaydon33', 'cooper', 'brown', 'Male', '6e097d46239427a59e93864cd22651bb', 1),
(109, 'sanders42', 'david', 'david', 'Female', 'c746602f44b9b51f87e8ca6c6ce4d4df', 1),
(110, 'brooks87', 'michael', 'wright', 'Male', '3b3d93f0c198684f4b48c026aeb798c5', 1),
(111, 'bell4', 'smith', 'cooper', 'Male', 'e50e309e6a683b1cbcf31f99b1290a9d', 1),
(112, 'jenny0945', 'bell', 'sanders', 'Male', 'eb04440b1c92d35d4466a2c164fce1fb', 1),
(113, 'james65', 'ross', 'ross', 'Female', 'a6dd8b5321189009e29fb9065371ddd0', 1),
(114, 'john98', 'morris', 'paul', 'Male', 'fe5d5050aefb9bd316b4304df5f5eb2b', 1),
(115, 'paul80', 'morgan', 'david', 'Male', 'e888d54c6981b4e7e92bbd874655a3bf', 1),
(116, 'john92', 'brown', 'jenny09', 'Female', '59624207640e3eb1c3a25caaa0d387c0', 1),
(117, 'wright69', 'david', 'chrishaydon', 'Male', 'b4ceea9331194b6884885396b2fa9ab9', 1),
(118, 'bell68', 'daniel', 'bell', 'Female', '7a47747a891fd8e6cfa1b5e13f6bd305', 1),
(119, 'brooks97', 'maria', 'cooper', 'Male', '59cd3d27cf79ce5d0f0e722e02ababcb', 1),
(120, 'mark14', 'cooper', 'wright', 'Female', '72c558cfdd0b27b021ed0c326655b419', 1),
(121, 'david60', 'john', 'bell', 'Female', 'daf7f99e70cc6bd895635ab8117f906c', 1),
(122, 'rivera68', 'miller', 'brooks', 'Female', '6ce20ee0cd25f2265f9c839747f3f60a', 1),
(123, 'brooks32', 'mark', 'brown', 'Male', '1d3d6cb6ad2d65a22f7202ee48687192', 1),
(124, 'brown15', 'wright', 'michael', 'Female', 'bfec76c4b0f279fb5fa947cdea45634c', 1),
(125, 'bell88', 'ross', 'brooks', 'Male', 'e4e8ae68e6791cce2718301e3e806417', 1),
(126, 'john26', 'brown', 'miller', 'Female', 'af2717f20db66dcc1069529d8470e03c', 1),
(127, 'paul55', 'morris', 'morgan', 'Male', 'f71110684519ea4c9997ee181344ca5b', 1),
(128, 'david59', 'rogers', 'morris', 'Male', '4123d932f75f7093e9f7be9dd4d8531c', 1),
(129, 'morris73', 'sanders', 'david', 'Male', '0955de128fd73fa725f8fb63dddb2b02', 1),
(130, 'michael77', 'john', 'brooks', 'Female', '0a23e450ab5659abde2283c4bbc629b5', 1),
(131, 'mark5', 'james', 'john', 'Male', 'ef5e4a71b458f98799d282a6954c9895', 1),
(132, 'james65', 'smith', 'paul', 'Male', '84bd8c4ac8f11f1fefdf519f372783a4', 1),
(133, 'maria39', 'miller', 'chrishaydon', 'Female', '91f576e83d57c336e54b6fc73ea2bfbf', 1),
(134, 'michael37', 'jenny09', 'rogers', 'Female', '74911c4886c6ad901dd8f3083ea7d008', 1),
(135, 'sanders1', 'morgan', 'maria', 'Female', '186e155dd946be048c37dc8f2e7eed7e', 1),
(136, 'daniel30', 'mike', 'morgan', 'Female', 'e41a85a3b3313519146041378173534e', 1),
(137, 'brown53', 'mike', 'sanders', 'Male', '3a5871a13dc27be7d72e82bed22580b2', 1),
(138, 'john52', 'morgan', 'maria', 'Female', 'bf4c4513b084ba0aa915dc428e2f5aa1', 1),
(139, 'wright73', 'rivera', 'rivera', 'Male', '4ee2e5750afd3933bf890098f6f15778', 1),
(140, 'mark63', 'daniel', 'morgan', 'Female', '3279caba4dbd1aebc014e13103454ad0', 1),
(141, 'james29', 'mark', 'mike', 'Male', '7d5eb23481c4dde548aa4d5b439007b5', 1),
(142, 'mark23', 'cooper', 'sanders', 'Male', '26e4b55f45b1589b8f79d3e207c68b0b', 1),
(143, 'cooper22', 'john', 'brooks', 'Male', 'db4f42f1500cbb9918558d9d7ec02ee7', 1),
(144, 'miller19', 'michael', 'brown', 'Male', 'a88e080d2d0a0caf75fb9df08a09b223', 1),
(145, 'jenny0913', 'brown', 'mark', 'Female', 'edb17fda48abe064968e3823daf2406e', 1),
(146, 'maria100', 'michael', 'james', 'Male', '528b3dcb48d9ade25eead37020925cf7', 1),
(147, 'chrishaydon51', 'daniel', 'morgan', 'Male', '51f2f1f0edfc42ea487cc60c1a8b2235', 1),
(148, 'david9', 'sanders', 'wright', 'Male', '117993f0e0796f188e658c1ae73f54e0', 1),
(149, 'mike52', 'bell', 'mark', 'Male', '049aaf70feca52840f5f645cc392997b', 1),
(150, 'wright5', 'sanders', 'mike', 'Female', '82c719790b9f9265313ca1e5f71be710', 1),
(151, 'brown21', 'bell', 'paul', 'Female', 'a42bd7f0e498cb3fa3fcce569aa72cb2', 1),
(152, 'daniel46', 'wright', 'maria', 'Female', '935dec640caf2b4d58749d288277937b', 1),
(153, 'brown86', 'rivera', 'morgan', 'Female', 'be56de82935f6c8fe2fe3a5fdc7c89d6', 1),
(154, 'chrishaydon85', 'mike', 'brown', 'Male', '3894408d593726ee2ff44b61b678ee68', 1),
(155, 'john41', 'brown', 'james', 'Male', '416e74d1a0155b8027abb780304d418e', 1),
(156, 'mark72', 'brooks', 'maria', 'Female', '6865af4cedf1b219b1f2e65cb4f1b9bf', 1),
(157, 'michael67', 'jenny09', 'rivera', 'Male', '8d10c08cbeefcf018eb92a009ec8aad1', 1),
(158, 'jenny0943', 'john', 'miller', 'Male', 'f919eb50f03a7f34d754291da70276e1', 1),
(159, 'daniel61', 'john', 'ross', 'Male', 'b1b1f0fe2064aa6d5d84498f57ebfccc', 1),
(160, 'morgan34', 'morris', 'john', 'Female', '604faa08103f852cf9d6aaeb98315a23', 1),
(161, 'jenny097', 'jenny09', 'smith', 'Female', '3454a779083ac3cb6aa60350341187f7', 1),
(162, 'miller11', 'jenny09', 'ross', 'Female', '6256f4a433a1073717389415d8722ff6', 1),
(163, 'daniel99', 'bell', 'morris', 'Female', 'e221f8e93dd0b68bfebe9dff53a85b5a', 1),
(164, 'miller20', 'michael', 'wright', 'Male', 'c2b80bc3a042354b4cc3793d6b1c3b3b', 1),
(165, 'sanders29', 'paul', 'michael', 'Female', 'd2950033ad75a63b2aaf909256c9efac', 1),
(166, 'mark43', 'mark', 'john', 'Male', '3f8172ec318a44eb0307e9e45615b579', 1),
(167, 'james86', 'morris', 'paul', 'Male', 'ae34b9c97686915640a636783b6cecea', 1),
(168, 'chrishaydon74', 'john', 'rogers', 'Male', '8c2ea9755dd593fce7d8e241d50bde58', 1),
(169, 'brooks37', 'daniel', 'maria', 'Female', 'd4648e8fa2eef67d21c468d85b061da9', 1),
(170, 'michael78', 'paul', 'cooper', 'Female', '15d36cdc2526c1ed9b64730b640b7d58', 1),
(171, 'paul9', 'mark', 'john', 'Male', '9d8c5d4a08ffd9ef258b086c7ccea3cc', 1),
(172, 'james57', 'cooper', 'morris', 'Female', '6ab6dd47d785163089c40bb9bf7f1564', 1),
(173, 'mark91', 'james', 'smith', 'Male', 'cf0eff977e087b674b8a49c87d14c916', 1),
(174, 'wright30', 'paul', 'rivera', 'Male', 'd5865a905e7e012256d86d12a1d4b023', 1),
(175, 'rogers97', 'brooks', 'ross', 'Male', 'f65862683e163fb7177b2496bd9df34f', 1),
(176, 'daniel8', 'james', 'rivera', 'Male', 'aed8f7681ae44f6aa9898c5716f5bcc9', 1),
(177, 'mark66', 'david', 'jenny09', 'Male', '303dd369979dbcb94fa0cd5783f53e0a', 1),
(178, 'daniel6', 'john', 'mike', 'Male', '958ceedfce1a1abaac93614a33a6ea55', 1),
(179, 'bell72', 'morris', 'jenny09', 'Male', '45c9bd3537ce1e0da7fc2bfe8301d601', 1),
(180, 'morgan77', 'david', 'mark', 'Female', 'ee140015e05be0264b24afedda71ca8b', 1),
(181, 'bell24', 'cooper', 'brooks', 'Male', 'ce1d4ec89996ac1454c4c32e1ea0e8eb', 1),
(182, 'michael31', 'cooper', 'jenny09', 'Female', 'de6eb39870bf46a4630bc3f35de80865', 1),
(183, 'cooper98', 'mike', 'brooks', 'Female', '083e4eb6f1f0afcd0d7b490b6570bbcb', 1),
(184, 'daniel41', 'bell', 'mark', 'Female', '029dbe991eb002148795377a745539a5', 1),
(185, 'michael1', 'bell', 'michael', 'Male', 'ca67281974023f68939bab6fff9c7775', 1),
(186, 'chrishaydon20', 'daniel', 'morris', 'Male', '0d11594096725a315584de6912918368', 1),
(187, 'daniel66', 'david', 'chrishaydon', 'Female', '40eb7d974a510189a9384a7e1878d1a2', 1),
(188, 'cooper52', 'smith', 'wright', 'Male', 'da29e66a9e8c1b89cde015ff151043bb', 1),
(189, 'chrishaydon99', 'ross', 'smith', 'Male', 'c641d1a255542bbcfa30b3daa34d6cda', 1),
(190, 'smith66', 'ross', 'james', 'Female', '1514dce3cead18e9e8784cd2b773feb0', 1),
(191, 'mike48', 'miller', 'chrishaydon', 'Female', '946833a02a91ede4d2e02002131296ab', 1),
(192, 'rivera80', 'michael', 'morris', 'Female', 'b13b2e2b309f5d0142d408bf2df0bd28', 1),
(193, 'morgan35', 'wright', 'brown', 'Female', '4dcd4fc0ab8d58437c6c6b04e054a2e9', 1),
(194, 'brooks16', 'michael', 'paul', 'Male', 'cb7dfca585a7404664aa6b31e9ea2940', 1),
(195, 'mike78', 'morgan', 'wright', 'Male', '17e39e780901de9d84538e7b2f0377a4', 1),
(196, 'michael38', 'david', 'daniel', 'Male', 'f34ab0578614889981fcfba9d8841da9', 1),
(197, 'mark7', 'cooper', 'morgan', 'Female', 'd2695e31deb9f73db3deeb7a2ae4fee8', 1),
(198, 'rogers80', 'mark', 'morgan', 'Male', 'e5f6a02bfd722c079093bdf30229d771', 1),
(199, 'wright81', 'john', 'brown', 'Male', 'e1021d43911ca2c1845910d84f40aeae', 1),
(200, 'michael21', 'wright', 'mark', 'Female', 'f289dc0b3863e4e762ee8b462a4ac20e', 1),
(201, 'daniel56', 'rogers', 'bell', 'Male', '89978e486ff3e020498757df87ecb956', 1),
(202, 'ross3', 'maria', 'morris', 'Female', '06edca508a58f3817a74183dc4fef1c7', 1),
(203, 'chrishaydon72', 'sanders', 'morgan', 'Female', '3a03e0b57f61d84609f777acaac77701', 1),
(204, 'sanders66', 'brooks', 'jenny09', 'Male', '2c0ac07e37743d6b8e8daba5dad9ae06', 1),
(205, 'michael4', 'wright', 'morris', 'Female', 'fb90312df1c22489a6c25b2ab67bf3fc', 1),
(206, 'brown66', 'bell', 'mark', 'Female', '77cb9a330118fa84d027315c0740df1c', 1),
(207, 'wright26', 'morgan', 'cooper', 'Male', 'e8c529514ec002b6bb1ce139adc2eaf8', 1),
(208, 'james81', 'daniel', 'brown', 'Female', '6ce961f58c6f12943531080a444f570d', 1),
(209, 'morris21', 'brooks', 'bell', 'Male', 'cdb7e38db356ab50ea8aafe200cd0546', 1),
(210, 'john30', 'chrishaydon', 'mike', 'Female', 'ae52474ed8e9e1d9e234af0b55060b77', 1),
(211, 'jenny0929', 'james', 'sanders', 'Female', 'a2d20e79c149ce7094f7ca9ee31c0d96', 1),
(212, 'wright91', 'michael', 'wright', 'Female', '87858af2834c88fed342f1860ed5381f', 1),
(213, 'jenny0922', 'miller', 'mike', 'Female', 'a0ee06f687e848307c45b271b56783c1', 1),
(214, 'rivera35', 'david', 'chrishaydon', 'Male', 'df5ff0bd5d70fe4c9efcada4fbbcda6b', 1),
(215, 'rogers53', 'wright', 'david', 'Male', 'a8e7bf81e2bc2a1832617ebaa73df373', 1),
(216, 'ross50', 'brooks', 'miller', 'Female', '8cfc508e7de78fa38ceee7ad63200be6', 1),
(217, 'ross41', 'rivera', 'rivera', 'Female', 'bf8567fb971c2375c10e79d185d8dae9', 1),
(218, 'rivera78', 'maria', 'john', 'Male', '060e5652d07a67751f480b8f221d7a6e', 1),
(219, 'miller43', 'paul', 'michael', 'Male', '9c492d1d3938663f2efbea7d2d865ae0', 1),
(220, 'morgan59', 'brown', 'paul', 'Male', 'a07ba9c1dcd19e02d382aaf90245d111', 1),
(221, 'chrishaydon63', 'mike', 'michael', 'Female', '90f0dd703b569ccb9170b300a3c3cd78', 1),
(222, 'wright93', 'daniel', 'daniel', 'Male', '8099bed8b4ea601446f87cce34bc5d8d', 1),
(223, 'maria62', 'bell', 'sanders', 'Male', 'b1b5dc761bb978100b9eaf043b12d4fc', 1),
(224, 'mark85', 'miller', 'morris', 'Male', '471e4f18cdd74e04e79f9ca51319e4d5', 1),
(225, 'wright3', 'john', 'james', 'Male', '37635df24f31807e825bff951a048a8a', 1),
(226, 'brooks37', 'james', 'wright', 'Female', '6c19e0a4c6303acdf0356cfcc1ba5bba', 1),
(227, 'paul66', 'bell', 'paul', 'Male', 'f182dd452d8dff40f53669fa3a4b2c08', 1),
(228, 'rivera36', 'sanders', 'daniel', 'Female', '5af7933bfe3164ba49ab1cb3350170a9', 1),
(229, 'paul42', 'brown', 'morgan', 'Female', 'd5e50295cc02e37f39533a47aa4a9549', 1),
(230, 'morgan93', 'david', 'miller', 'Female', 'd9843de34cf22245739b7d9bd2afda2a', 1),
(231, 'rivera43', 'paul', 'maria', 'Male', '172911033ad4c363072c04d9fa768083', 1),
(232, 'daniel71', 'bell', 'mike', 'Male', '833a23c4071baf5389549ef117331bf3', 1),
(233, 'mike81', 'bell', 'rivera', 'Male', '8e7991af8afa942dc572950e01177da5', 1),
(234, 'daniel83', 'maria', 'paul', 'Female', '15e474092b5b5a167f65cdd11f29c2b8', 1),
(235, 'smith54', 'cooper', 'john', 'Female', '1845bc6b23e2c86365abae4eec1918bc', 1),
(236, 'sanders38', 'maria', 'miller', 'Female', 'd1d5eb3a1d067c8a11324be711ba87e4', 1),
(237, 'morris63', 'brooks', 'morris', 'Female', '5f185f2923ea5a0f61e29457946a7a01', 1),
(238, 'michael25', 'jenny09', 'morris', 'Male', 'afd4b0886c4743441488580ca8045ad8', 1),
(239, 'smith89', 'brown', 'smith', 'Female', '6af31b2b4f3e2911f6d61f2a4956b4e5', 1),
(240, 'john97', 'rivera', 'chrishaydon', 'Female', '5cd654fddcf0871f8247f277357519d8', 1),
(241, 'jenny0985', 'paul', 'sanders', 'Male', 'daa3a33a6d4d57691cafe0e98a45d8ee', 1),
(242, 'wright84', 'rogers', 'jenny09', 'Female', '497566072da1608bfd0d68391fc73f7b', 1),
(243, 'maria53', 'michael', 'mike', 'Male', '142a614657f247ff87052228c243de8b', 1),
(244, 'brooks72', 'bell', 'maria', 'Male', '024034a33ae2db318180373067df724c', 1),
(245, 'brown61', 'cooper', 'jenny09', 'Female', '0baad3f6549913877c4fda38a600fd6c', 1),
(246, 'paul95', 'rogers', 'ross', 'Male', '78724cdbe5148adbb9027148b7693819', 1),
(247, 'brooks92', 'sanders', 'michael', 'Male', 'fc454c8ba8a709708babbabfff940f58', 1),
(248, 'james44', 'daniel', 'bell', 'Male', 'f9741cab62f038c2b9eb3d1ab67c2de9', 1),
(249, 'chrishaydon100', 'david', 'jenny09', 'Male', 'fab3809c732adbcac197055b0a11d605', 1),
(250, 'mark97', 'maria', 'ross', 'Male', 'b4d612b7a7d52a52aaeda65008541a2b', 1),
(251, 'brooks91', 'daniel', 'daniel', 'Male', '8b48b3ca4e8d5eceaae8e5864b25650f', 1),
(252, 'jenny0929', 'brown', 'paul', 'Female', '1741ae0367e3ddc7115302efbb37c912', 1),
(253, 'morgan37', 'ross', 'wright', 'Female', '4a829ae5dfebde0e47d0de1a584f00da', 1),
(254, 'daniel43', 'miller', 'morris', 'Male', '7d9b72750e15c3bf088f2e116162d29b', 1),
(255, 'mike98', 'cooper', 'rivera', 'Male', 'ce532a517cb81283ad91e75b6084723e', 1),
(256, 'john48', 'michael', 'david', 'Male', '0944506deea6026fd0615cf2eb85bbc1', 1),
(257, 'brooks65', 'paul', 'brooks', 'Female', '3ae19685715d953e6de4a17d8b66aa2a', 1),
(258, 'cooper18', 'jenny09', 'james', 'Female', '85e3c33ad22b3422c31fe8222aed963c', 1),
(259, 'chrishaydon54', 'smith', 'mike', 'Male', 'bf056e85835c5493c6901b3b8f99adb0', 1),
(260, 'john67', 'cooper', 'smith', 'Female', '4cce6f13484f80aae763165ac8b7655a', 1),
(261, 'morris27', 'james', 'paul', 'Female', '5ccbdf7d41c38f76174903522f1e4ced', 1),
(262, 'ross45', 'james', 'wright', 'Male', 'cb304967e6838e2717a0e0dc37839f18', 1),
(263, 'rogers85', 'miller', 'jenny09', 'Male', '361822466c80eee584f15551b3643dc7', 1),
(264, 'sanders96', 'brown', 'james', 'Female', '3a9cca50509f24bab4ce79ce1649fe21', 1),
(265, 'smith70', 'paul', 'morgan', 'Female', '8187e274643712759695cfadf17547c3', 1),
(266, 'wright31', 'rogers', 'michael', 'Female', '6a6e74c5ecbf3d09a4f211eae299ec21', 1),
(267, 'paul10', 'cooper', 'bell', 'Female', '771b3d3eb8d615f8bf90e123ce3510cc', 1),
(268, 'sanders2', 'smith', 'sanders', 'Female', 'f5c16fbe3bdeafdf2a1bd22f49d12ef3', 1),
(269, 'rogers14', 'mike', 'morgan', 'Female', '0285387aff6c1c25f0568f37da220dd0', 1),
(270, 'morgan79', 'smith', 'paul', 'Male', 'a8a42002078806511bc0a781288d634c', 1),
(271, 'morris87', 'david', 'rivera', 'Female', '2f1b7080e2606009563d199177396445', 1),
(272, 'james6', 'morris', 'maria', 'Male', '00ee2ee18c1321879129d05bc645635f', 1),
(273, 'wright33', 'morgan', 'jenny09', 'Female', '966b89773689212bf12ee5a3092468e8', 1),
(274, 'maria85', 'mike', 'brown', 'Male', '84b65a7a7224101a8dd90708d096ed14', 1),
(275, 'ross31', 'bell', 'jenny09', 'Female', '0c2a093206f1d48625ee2f77ac980640', 1),
(276, 'chrishaydon75', 'brown', 'sanders', 'Male', '2a61817d2d231b3f38109ffeb4c48587', 1),
(277, 'david54', 'james', 'maria', 'Female', '12d8835f599ead7c2b8953f3df7a6d0d', 1),
(278, 'chrishaydon50', 'miller', 'cooper', 'Male', 'f7c60cdf9b56ba3763f1a5f8d30f53e6', 1),
(279, 'miller24', 'ross', 'mike', 'Female', '18a819c8f5089f50b781a6a6c3eac64b', 1),
(280, 'maria9', 'rogers', 'morris', 'Male', 'd8a49a1bfb38981c58eb6183d5510f62', 1),
(281, 'smith91', 'james', 'james', 'Female', '6a2318e8ec3438cadd90ec42d0cb4703', 1),
(282, 'rivera11', 'brown', 'brown', 'Female', 'fa0f2f9b1f225e744eac562808504c34', 1),
(283, 'james72', 'morgan', 'sanders', 'Female', 'c9ed041405f719fc15d2166ef16f0781', 1),
(284, 'miller36', 'daniel', 'morgan', 'Female', '9d0759461b13524de71c6c52ffb9d310', 1),
(285, 'jenny0991', 'maria', 'brown', 'Female', 'b21934c32d38d058ecc7fb8b49d66f44', 1),
(286, 'jenny0959', 'david', 'john', 'Female', '84a5dadb9f8ea29a856671627cfecf01', 1),
(287, 'mike41', 'maria', 'mark', 'Female', '06b7476ec66a0df253337fbbbc39f2da', 1),
(288, 'morgan20', 'maria', 'morgan', 'Female', 'cdaeb1282d614772beb1e74c192bebda', 1),
(289, 'miller29', 'ross', 'mike', 'Male', '428a2f9ddfd7b8da02040e5e361ee562', 1),
(290, 'ross56', 'james', 'paul', 'Male', '85e124c6f242f36a3b38162bea2b12e8', 1),
(291, 'chrishaydon63', 'morgan', 'brown', 'Female', '5bc7f7b1c6143326952c6245dad6174e', 1),
(292, 'morris54', 'smith', 'mike', 'Male', 'c4425f268f8c0a0f96365d55ca670d79', 1),
(293, 'bell20', 'wright', 'morris', 'Male', '4d793872148020277e18d11b20f91dd3', 1),
(294, 'paul41', 'brown', 'wright', 'Male', '187799e784d829bd66e407985bf5a2e4', 1),
(295, 'morgan42', 'miller', 'chrishaydon', 'Male', '73956c0eddc01d38778ed80e7072d892', 1),
(296, 'ross100', 'morris', 'morgan', 'Male', '73747165760fc06c584bdb2b3b2ab028', 1),
(297, 'wright1', 'rivera', 'cooper', 'Female', '5893238bf127db5ac06b02079cb7aa7d', 1),
(298, 'jenny0921', 'james', 'brooks', 'Female', 'a1cbbbcf2d9ab6e8b654c684f7505536', 1),
(299, 'paul37', 'wright', 'miller', 'Female', 'e3876b2492dcc5dc68b279cd0022ecbe', 1),
(300, 'michael92', 'miller', 'ross', 'Male', '12991bdfa40c4e43f99a4d69e5b9f2a7', 1),
(301, 'chrishaydon14', 'morris', 'mark', 'Female', '8880ca0deddd14fc387dca5cd9538fa0', 1),
(302, 'miller40', 'daniel', 'sanders', 'Male', '3915cb57ca61e903aa46e17c8f0b0ce5', 1),
(303, 'wright43', 'bell', 'brown', 'Male', '4f1314b8d36b595ce2d3747a11efa043', 1),
(304, 'smith15', 'james', 'morris', 'Female', '8516b2ac05654682cf9f1a47bf797f88', 1),
(305, 'miller49', 'brown', 'brown', 'Female', '5a07cbbd8162a81a0a7e63003d9d7be2', 1),
(306, 'morris21', 'maria', 'paul', 'Male', 'cb53c534867a4ea811befc32fa517869', 1),
(307, 'ross27', 'ross', 'wright', 'Female', 'e32ce865f1b84d056dfcc32580571cf8', 1),
(308, 'rivera16', 'mark', 'michael', 'Male', '843d5972bcea30a9ea03c4de149dcb29', 1),
(309, 'maria73', 'rogers', 'sanders', 'Female', '0c9c0b25bd949503b33d1ea4d42d6b0f', 1),
(310, 'chrishaydon60', 'morris', 'smith', 'Female', '550c9dbf05ab7066ff29c96ae72dfd41', 1),
(311, 'david40', 'daniel', 'brooks', 'Female', 'cead008873bca4b07b2cebf8c0040fe6', 1),
(312, 'michael66', 'james', 'rogers', 'Female', '4d09b6cbca024d3cc29832a89075edda', 1),
(313, 'paul27', 'maria', 'brooks', 'Female', 'cb1c6d1df183681d658aa067ce637c31', 1),
(314, 'jenny0911', 'james', 'michael', 'Male', 'faf20b3d0fb5f8230c5e5a595dada0d8', 1),
(315, 'miller79', 'michael', 'morris', 'Female', '695fa6a9e95355b22788b3414f9ff73a', 1),
(316, 'mark14', 'john', 'ross', 'Female', 'da6abbc6868a4a93657574c13aaadf92', 1),
(317, 'ross87', 'smith', 'chrishaydon', 'Female', 'cfbdd53427adac998e0dd01f9c000b4d', 1),
(318, 'paul47', 'brown', 'morris', 'Female', '55e71b4408e917b9c7bb0df7d0b81af4', 1),
(319, 'sanders61', 'david', 'smith', 'Female', '17df64814d7c93fefb3c6d52c85b92f4', 1),
(320, 'rivera13', 'morris', 'sanders', 'Female', '0d8635347f039f586f8a7b62cf1540b5', 1),
(321, 'chrishaydon22', 'morris', 'daniel', 'Male', '6d5cf064b603438ab797df0465bb9bf2', 1),
(322, 'sanders42', 'miller', 'rogers', 'Male', '94dd43d6bee1ae1bcf4f754404fcc250', 1),
(323, 'david78', 'miller', 'mark', 'Female', '9629b9949b6ff7e3b4381aea26921077', 1),
(324, 'ross60', 'brown', 'wright', 'Male', '1447db202fdc45f3e7572e6c89b28fda', 1),
(325, 'morris24', 'paul', 'john', 'Male', '9c3e20114fe0cf8c66743542a29b8b25', 1),
(326, 'jenny0952', 'mike', 'smith', 'Male', '02893b6f931ebe1f44cd9ee3029ca080', 1),
(327, 'rogers72', 'rogers', 'brooks', 'Male', '5d0dfd7af5a17c3028fc17a74a27bdbb', 1),
(328, 'daniel70', 'rivera', 'rogers', 'Female', 'dfac65053b8c4b264c8a485fbcd0af82', 1),
(329, 'cooper76', 'miller', 'cooper', 'Female', '0f93c7bdbca2662e97fa967c86c036d5', 1),
(330, 'jenny0942', 'rogers', 'jenny09', 'Female', 'bc623024e7ee04b6eeee4b54764e634a', 1),
(331, 'daniel39', 'john', 'miller', 'Male', '1c34790dc216b192e2c31080c0c7e1ea', 1),
(332, 'morris59', 'morris', 'rogers', 'Male', '747f59a350044d27d42098554f78d986', 1),
(333, 'mike70', 'chrishaydon', 'james', 'Female', '5581a29b180f00da20fe744c6743b59b', 1),
(334, 'rogers20', 'john', 'morris', 'Male', '61b5c68987f9713756fcddf407618e52', 1),
(335, 'david33', 'john', 'michael', 'Male', '5ca8db0f7654b6c59c50567815892ccc', 1),
(336, 'morris65', 'michael', 'daniel', 'Male', '8386d7dcfe2fb76eb5f5e99b93f8dd23', 1),
(337, 'michael23', 'sanders', 'bell', 'Female', '2e1cb161a9938603d8f19991f8a59040', 1),
(338, 'john96', 'maria', 'brooks', 'Female', '4cb454ec7c724ee6bfc62e0a692e983a', 1),
(339, 'wright64', 'sanders', 'miller', 'Male', 'a87e4c3d1fc75d29546b3535c25e44ec', 1),
(340, 'david91', 'cooper', 'brooks', 'Male', '689df1dc4f2f5f09e9e6630ed7499b24', 1),
(341, 'daniel87', 'rivera', 'cooper', 'Female', '6f91e3e5afce8f38cf4c5f502fbf0a6a', 1),
(342, 'ross60', 'michael', 'morris', 'Female', 'f19a3fda06930339554d054f1699d136', 1),
(343, 'morris60', 'sanders', 'wright', 'Male', 'd84a4a0e185d2087a29db23bb936debb', 1),
(344, 'rivera50', 'morris', 'mark', 'Female', '447419171ae53caf38ab2b44554a141e', 1),
(345, 'maria77', 'mark', 'rogers', 'Female', '01918ce06c72b244e53a3fd232e7d082', 1),
(346, 'morgan64', 'smith', 'mark', 'Male', 'a726cbe5c21aa9a7c047096978fe8ae5', 1),
(347, 'miller41', 'cooper', 'mike', 'Female', 'e6122f875dfc38e49d05e5f50d292496', 1),
(348, 'david65', 'rogers', 'morris', 'Male', 'fa412f065944a1a182c42f10ace27744', 1),
(349, 'morgan96', 'paul', 'daniel', 'Male', '5328393f2b30aa145a4e6c248a9a8026', 1),
(350, 'ross73', 'david', 'miller', 'Female', '73e1af72752365d637bccb8a4e494c9a', 1),
(351, 'brooks95', 'brown', 'rogers', 'Female', '2d8728af45d61e98e419cdcbf61d8895', 1),
(352, 'sanders92', 'miller', 'sanders', 'Female', 'dd3c0fa847c90cc326ae1131946f7ca0', 1),
(353, 'cooper53', 'wright', 'james', 'Female', 'a321c57d32f66b1c969ac31bf8308777', 1),
(354, 'ross100', 'chrishaydon', 'rogers', 'Male', '3b95a878e7e99d5933f0abd36ca835fa', 1),
(355, 'michael91', 'wright', 'daniel', 'Female', '28d6abf291fdd1f27f7c5f75efc4ffb9', 1),
(356, 'brooks51', 'sanders', 'james', 'Female', '2a2b24197c68a7ce96e1fcd9e5cca0a8', 1),
(357, 'ross26', 'daniel', 'brown', 'Male', '4e1fca34cbfde3c501d854ddbcf0fc2e', 1),
(358, 'morris58', 'mark', 'miller', 'Female', '2cea5f10095a7daa81eeb626852b7e20', 1),
(359, 'morris58', 'mark', 'rogers', 'Female', '0e93754aeafd6e07fc3a821829330e96', 1),
(360, 'ross12', 'brooks', 'chrishaydon', 'Female', '4bbf7effaef3991e6707c7efa3ce5510', 1),
(361, 'brooks60', 'sanders', 'sanders', 'Female', '438f54f8c5a3a6f58ce5a69d37294fe9', 1),
(362, 'mark29', 'rivera', 'daniel', 'Male', 'cba8e1ca4c1c625ac80696ae492d69a0', 1),
(363, 'john14', 'sanders', 'paul', 'Female', '1fa1221343986bab24531bca16125e23', 1),
(364, 'rivera26', 'jenny09', 'chrishaydon', 'Male', '21354e8024a4260d693a0c258fb366d8', 1),
(365, 'jenny0949', 'ross', 'john', 'Male', '249c74900ff11712eb74680d0aa6b26f', 1),
(366, 'rogers96', 'morgan', 'daniel', 'Female', '1921493b5362e63fbe8983f4bd54157d', 1),
(367, 'david55', 'mike', 'wright', 'Male', 'a52dafd8f39429e36ccc056f1332486f', 1),
(368, 'chrishaydon3', 'rivera', 'cooper', 'Male', '51ae01270114b24c78d7f0ae5cd11974', 1),
(369, 'ross81', 'smith', 'paul', 'Male', 'c1df6d2d52d83a47d910954514d4536c', 1),
(370, 'john70', 'michael', 'mike', 'Female', '665ed5c13c53d667fed8c3b0123e67f5', 1),
(371, 'miller34', 'smith', 'cooper', 'Female', 'f122887c953d5850a07fb7773c9e75ca', 1),
(372, 'bell26', 'daniel', 'wright', 'Female', '808f48ff0a413346671a4cfd4939021e', 1),
(373, 'ross92', 'paul', 'wright', 'Female', 'e19deafc191fbda7a93c0f2edfd32fb6', 1),
(374, 'rogers34', 'james', 'michael', 'Female', '3519dedd9a7bbbe17921c43930ac301f', 1),
(375, 'james51', 'morris', 'morgan', 'Female', 'daa400d87736ccc7338f523a5222b0fc', 1),
(376, 'ross54', 'sanders', 'brooks', 'Male', 'c5cdc4d688579fade63d6541ef54cda9', 1),
(377, 'brown59', 'michael', 'bell', 'Male', '96f19a1544538c7a48eb5b32b1457e52', 1),
(378, 'michael83', 'michael', 'smith', 'Male', 'a8ef9d7aaeb65983d0830becadea8b3a', 1),
(379, 'miller10', 'bell', 'rivera', 'Female', '4d2fa82e354bb910a16701942e8939d2', 1),
(380, 'jenny0939', 'james', 'bell', 'Male', '798bcaf88bfbb1c606ce7d7e2afaee61', 1),
(381, 'paul100', 'wright', 'brooks', 'Female', '2d5c6b13e164fc9d89a995916c43487b', 1),
(382, 'smith82', 'brown', 'rivera', 'Male', '06456c89b038bbf183378ea26db3a536', 1),
(383, 'morris6', 'cooper', 'ross', 'Female', 'cf371f603fce7d593c97bc1326c353d7', 1),
(384, 'paul76', 'rogers', 'james', 'Female', '13ec70c64e9b3d24301393db75f6dc12', 1),
(385, 'mark97', 'miller', 'maria', 'Male', '5c6e3f71776551a20136b8bf5ce78a1b', 1),
(386, 'john74', 'david', 'brown', 'Male', 'f6cadb74de89fe47811ab4ca8b6b74b7', 1),
(387, 'miller78', 'miller', 'morgan', 'Male', '0bacfe7f9320e3f5d184522557531c0c', 1),
(388, 'miller54', 'sanders', 'morgan', 'Female', '603e79b8c114007e77226cb705e3c701', 1),
(389, 'chrishaydon9', 'maria', 'michael', 'Female', 'fc0e6a0d253365cc4d6ab3ec91402048', 1),
(390, 'daniel4', 'john', 'rogers', 'Male', '0bc20329e781207cb0532acc8aa39727', 1),
(391, 'john24', 'michael', 'miller', 'Male', 'c8053892fcccdbc4af2a7330b1d9a9c1', 1),
(392, 'smith31', 'james', 'rogers', 'Female', '19eb304f76c430ffb3a715144ac078d3', 1),
(393, 'smith77', 'jenny09', 'smith', 'Male', '82054797739059e5e0d8edfb419f5395', 1),
(394, 'maria29', 'paul', 'wright', 'Female', '50f6d8d0c381cb2a5b20a9b5247c29af', 1),
(395, 'michael76', 'jenny09', 'brooks', 'Male', '16b9af517ef844fdca5f1a70f4a3a5db', 1),
(396, 'mark64', 'david', 'brooks', 'Female', '62e04e5699fa010471f5135cc5697a1f', 1),
(397, 'morris5', 'brooks', 'chrishaydon', 'Female', 'd207678f6407819552de1a052f26a501', 1),
(398, 'brown69', 'mark', 'mike', 'Male', '2d7775e05708bd9916cd5ad97bb02cf8', 1),
(399, 'miller53', 'paul', 'jenny09', 'Female', '362bdce9582c044efc529ac17fb314da', 1),
(400, 'wright94', 'maria', 'john', 'Female', '1fa405a56ca82c8296c7081cf69627b3', 1),
(401, 'rogers26', 'miller', 'daniel', 'Female', 'f8d92a8069500fb16fceb6b1e620c55c', 1),
(402, 'jenny0977', 'maria', 'rogers', 'Female', '3d16cc235e35b948fd2829c3438d76f3', 1),
(403, 'daniel23', 'maria', 'morgan', 'Male', 'd23ebd9f25b327bd8c10bdf95a6f5be8', 1),
(404, 'cooper66', 'miller', 'rivera', 'Female', '5e7855afb47310c2866bf653bbff1e85', 1),
(405, 'chrishaydon61', 'smith', 'maria', 'Male', '0c2ee9227e7805666dcd29f63747ac69', 1),
(406, 'maria95', 'smith', 'jenny09', 'Female', 'f16e92c1f4d059673b429000700a4fe0', 1),
(407, 'james17', 'bell', 'james', 'Female', '3808d372a53eb62e5932d1ac01af621e', 1),
(408, 'james18', 'morgan', 'brooks', 'Female', 'b70a909b7a355517683ac8e8f0a3a446', 1),
(409, 'mike47', 'rivera', 'jenny09', 'Female', 'fd1e0eee0938a765c884fdf91beb02e9', 1),
(410, 'john57', 'miller', 'mike', 'Male', '3d2b771a9696b6cc498eea73a2564abe', 1),
(411, 'mark54', 'rogers', 'miller', 'Male', '974d7becbb896578952d22df5b4df72d', 1),
(412, 'bell38', 'daniel', 'john', 'Male', 'fad308492fe3d604fb9896e59d4b33ca', 1),
(413, 'morgan31', 'ross', 'chrishaydon', 'Male', '2ec91a5d75e13f8d81c9232d30aca589', 1),
(414, 'miller16', 'brown', 'james', 'Female', '1ce1959c06025096b040d6a29369bbcf', 1),
(415, 'rivera14', 'michael', 'chrishaydon', 'Female', '1672dd29743d34dde83b0de3a268dc4f', 1),
(416, 'rogers22', 'sanders', 'rogers', 'Male', '484115f76a79fce89dc652d146d793ac', 1),
(417, 'jenny0963', 'sanders', 'chrishaydon', 'Female', 'b3d29210f2029e12b37b9a9ab1e282a1', 1),
(418, 'mark42', 'sanders', 'michael', 'Female', '0d659ddc03566cb9c55c9ccf0eb2f1bb', 1),
(419, 'mark7', 'morris', 'morris', 'Female', '3a677cd8a58d34cd3eb0e01c9fd9c0d4', 1),
(420, 'john1', 'cooper', 'david', 'Female', '4584c38c736edc902f9e1ec6e57e60c2', 1),
(421, 'chrishaydon3', 'rogers', 'brown', 'Female', '0d0750f3076764c254b83fd9e6934ff4', 1),
(422, 'smith11', 'bell', 'sanders', 'Male', 'a753933332887a8e39679d733e595105', 1),
(423, 'john22', 'smith', 'mark', 'Female', '7527936a18d0303cd196c7290698b583', 1),
(424, 'rivera23', 'paul', 'david', 'Male', '9884c479cff91d0024d9ab7e95e3993e', 1),
(425, 'james32', 'ross', 'paul', 'Male', '759d1538832687bc89adb1696d0a7682', 1),
(426, 'daniel58', 'maria', 'john', 'Female', '83040a278811ebec6b1ae529da424bcd', 1),
(427, 'james18', 'miller', 'rogers', 'Male', '34e44c5db8a0296243376f72bcc922a7', 1),
(428, 'brown93', 'miller', 'sanders', 'Male', '12c2ea5790f39267caf0dcc0e56149fa', 1),
(429, 'bell89', 'morgan', 'john', 'Female', 'ef7ea08d5e8ef9223be624f955f742e7', 1),
(430, 'miller82', 'morgan', 'brown', 'Male', 'e6acd2b471521e86ab2e8a740b42696e', 1),
(431, 'paul21', 'cooper', 'james', 'Female', '476cc20df2c1d5555b011737e87450ba', 1),
(432, 'chrishaydon88', 'bell', 'ross', 'Male', '261bc89527e8c6c258df758daedcdc58', 1),
(433, 'rivera44', 'wright', 'brown', 'Male', 'cafd1208837e606d6e7bbc575fff8cd2', 1),
(434, 'bell89', 'cooper', 'rivera', 'Male', '9e72fbc60ffc66df2073d9af9a139365', 1),
(435, 'bell66', 'bell', 'miller', 'Male', '5f2fceaa5a602fead16179655d750f25', 1),
(436, 'rogers31', 'wright', 'paul', 'Female', 'b3a3e7554cdc27277dccd5fa99a5b870', 1),
(437, 'bell47', 'brown', 'mark', 'Female', '4c149290eb01d142fb72e8d667b7e35c', 1),
(438, 'sanders58', 'rivera', 'daniel', 'Female', '39674983390b393b9d4d93717bcfd758', 1),
(439, 'mark26', 'mark', 'chrishaydon', 'Male', 'edd4380771e20faad5020900d337a18f', 1),
(440, 'miller22', 'paul', 'wright', 'Male', '4d0b33b5012968d7184664859cf30a80', 1),
(441, 'daniel46', 'maria', 'sanders', 'Female', '46dccd259f8bcc5bd768f9961ccd7dd7', 1),
(442, 'morgan100', 'daniel', 'michael', 'Male', 'dfb7acb95bc071ce5fe5bd5fbd4a9313', 1),
(443, 'ross75', 'cooper', 'brown', 'Male', '136b86487c3a27486eb579415f1a0afe', 1),
(444, 'david68', 'bell', 'mark', 'Female', '2b2a54df255a79171cf908772b1ff1e1', 1),
(445, 'rivera35', 'bell', 'wright', 'Male', '87e8b4b7718ffaa536003a9e7ac1f469', 1),
(446, 'daniel63', 'james', 'brooks', 'Female', '5831d06a0d574cc478cde2bb60cbccb0', 1),
(447, 'ross37', 'bell', 'brooks', 'Female', '80624be7b6a1b4072632b34e0ee85750', 1),
(448, 'michael23', 'mike', 'morgan', 'Male', '61c7e71d2397dd17b9936d6df1289cb9', 1),
(449, 'mike48', 'mike', 'david', 'Male', '4782c7ad3418491a6a3827a716c1ace1', 1),
(450, 'david57', 'mike', 'sanders', 'Male', '6af7f1260da41de43f3687d23de782b9', 1),
(451, 'morris67', 'david', 'bell', 'Female', '88e98e6e9ee4f5142f346872e51321f5', 1),
(452, 'rogers49', 'jenny09', 'bell', 'Female', '89d590df89e99a0e503c6ff81f11b22a', 1),
(453, 'morris14', 'mark', 'rivera', 'Female', '530ec73ac444d117a754cf40fccf0cc5', 1),
(454, 'brooks74', 'mark', 'miller', 'Female', 'b7d7bd8ad5a68a5b4f1f24b87c12a0f2', 1),
(455, 'mike71', 'brown', 'brown', 'Female', '80f467ed9579d12835eeeb5166ac9028', 1),
(456, 'mark18', 'miller', 'cooper', 'Female', 'b5ea87043f0c8767e9137efedff4f91d', 1),
(457, 'mark9', 'ross', 'miller', 'Male', '50d5d07be6e93b6538c5de35a1294a7c', 1),
(458, 'brooks21', 'john', 'jenny09', 'Male', '7eaedec3a9c322efbc5e67ee6c957e15', 1),
(459, 'bell4', 'michael', 'miller', 'Male', '40e90db13ab31c7efd64228034182c2e', 1),
(460, 'brown17', 'chrishaydon', 'mike', 'Male', '0d50375f8eb5062f4cef8ff30fe63a54', 1),
(461, 'jenny0923', 'rivera', 'jenny09', 'Male', 'fb288e6d2aaef08984cd2af4d4947f3e', 1),
(462, 'smith66', 'chrishaydon', 'wright', 'Female', '18398d8917734ce9a9c229b4ecddb4bd', 1),
(463, 'daniel53', 'chrishaydon', 'wright', 'Female', 'a3e19210d31e89afc1cafaa28526db0e', 1),
(464, 'brown33', 'ross', 'james', 'Female', '27885060fe068e5fc308ffa950124b30', 1),
(465, 'mark55', 'jenny09', 'paul', 'Male', '586775ba800ef95305c96e8b27b30fc5', 1),
(466, 'rivera83', 'rivera', 'maria', 'Female', '7b0500141adcc0d9410f8ee9b71912d7', 1),
(467, 'paul72', 'mark', 'bell', 'Male', '3ff72807f3d8f043dc18e0025fd613ac', 1),
(468, 'david25', 'mike', 'james', 'Male', 'bfbe6d150fa8823ce636f4a8785a56ec', 1),
(469, 'paul47', 'rivera', 'morgan', 'Female', 'c20cfc9aacc3c9f0dbb4229323c98e09', 1),
(470, 'james61', 'miller', 'daniel', 'Female', '4ffa6908c18b5d24361c350898dad220', 1),
(471, 'paul90', 'michael', 'paul', 'Female', '81049ddd3be9e09d2decd132fc473804', 1),
(472, 'david95', 'cooper', 'wright', 'Male', 'c1866265f95fdebc1ffd591906cc2ce1', 1),
(473, 'paul52', 'smith', 'paul', 'Female', '794c1003106a8102bf7f06c1e68e9c3a', 1),
(474, 'wright82', 'paul', 'michael', 'Female', '6db28b6d5c5dc094e59ca7cc5dba81e8', 1),
(475, 'james61', 'miller', 'mark', 'Male', '99143ad0480bdbf2cbf1f0ef5d339c1e', 1),
(476, 'michael89', 'rogers', 'morgan', 'Male', '5b2652097a888a148b1c61b4a1e1230b', 1),
(477, 'wright44', 'mark', 'ross', 'Male', 'c364c77fb34fccd09c5aa76e797c9bf3', 1),
(478, 'chrishaydon60', 'jenny09', 'wright', 'Female', 'ff2a5c75e135814a8729a179349b5d0b', 1),
(479, 'john30', 'ross', 'morgan', 'Male', '93ccc2579e526596814fa3a33be4887e', 1),
(480, 'rivera2', 'morris', 'ross', 'Male', '79b14af58600b268c15ab4b8e85c3dcd', 1),
(481, 'wright17', 'maria', 'jenny09', 'Male', '0333dc1686f348ac6a361c367c83d0fa', 1),
(482, 'rivera30', 'miller', 'morgan', 'Female', 'eb2864111a083cca837b5301a98455ca', 1),
(483, 'daniel63', 'maria', 'brooks', 'Male', 'd9941265e1be2b87b39c86bde28c4bee', 1),
(484, 'brooks56', 'morgan', 'david', 'Male', 'fe4db4d3555edd58a6c7893c8cc9b4a8', 1),
(485, 'wright29', 'paul', 'mike', 'Female', '075cff39301c13a4628e738796211158', 1),
(486, 'morris52', 'bell', 'morgan', 'Female', '50acf2e83352b4c56de36b8b9ebfd5b7', 1),
(487, 'morgan10', 'morris', 'sanders', 'Male', '31335280ee2f7e3a6539c14c3ac1e5b2', 1),
(488, 'sanders55', 'john', 'bell', 'Female', '9914952845dec193e38253f74ea92ac5', 1),
(489, 'mike9', 'smith', 'daniel', 'Male', '4e93d36e6cb1abc458b10f484cdd3457', 1),
(490, 'michael69', 'rivera', 'sanders', 'Male', 'ed0eebbaa23beae2d9fcb2fd70cd6feb', 1),
(491, 'david18', 'rivera', 'bell', 'Female', '8f4d3d3cbeb704d0a8a48a19a3d96ef3', 1),
(492, 'daniel41', 'sanders', 'sanders', 'Female', 'daf67ee2be3d31563a6bf3e421448f76', 1),
(493, 'david59', 'brooks', 'mark', 'Male', 'b9a460fcae3ca69706c8e2e3383b9698', 1),
(494, 'daniel17', 'mike', 'jenny09', 'Female', '70cd9422c699a9c4c004eeded78d714e', 1),
(495, 'john45', 'brooks', 'brooks', 'Male', '83a42afe88473678096d1aa1da108f6d', 1),
(496, 'morgan17', 'david', 'rogers', 'Female', 'd531b52298110e9eed0738383c936399', 1),
(497, 'john42', 'brooks', 'cooper', 'Female', '5468389cbe236356bdd5b20c131eaf46', 1),
(498, 'rogers50', 'brooks', 'mark', 'Male', '6a4d6e1fc2c1cc17dd36b58678028351', 1),
(499, 'smith35', 'maria', 'james', 'Female', '7a4d7539aefae273af01d796e839bd16', 1),
(500, 'mark56', 'david', 'maria', 'Female', 'e19b2741c831b005970dbfd73923ec4a', 1),
(501, 'chrishaydon12', 'michael', 'brown', 'Male', 'f50c76cea17e3c675b01f051022a4cd9', 1),
(502, 'mark90', 'maria', 'daniel', 'Female', 'faa56a69c6898f2b12e6f50b679012c9', 1),
(503, 'maria85', 'brown', 'mike', 'Male', 'e71f1b32b8f3bf6b4eb335ee3517e9b5', 1),
(504, 'rogers42', 'maria', 'jenny09', 'Female', '49067a6d334eac6a782654d96f983ae4', 1),
(505, 'brooks95', 'maria', 'john', 'Female', '7aba8bea5d25213b4ff5ab309306cabf', 1),
(506, 'brooks38', 'james', 'daniel', 'Female', 'a45aeebe3e6f6fe8b9ce4bf7ea5e07ce', 1),
(507, 'morris49', 'brown', 'rogers', 'Female', 'b9a1e95cfd8d0b8eba13321a7ef789e9', 1),
(508, 'david86', 'john', 'chrishaydon', 'Male', '7933b75d6a6cdca9623d1038adc8e74c', 1),
(509, 'wright15', 'sanders', 'james', 'Male', 'e8645f00d43a14455077b8ce9546c3f0', 1),
(510, 'wright75', 'brooks', 'smith', 'Male', 'c7643b7aa037938a8bb8ae6088bdf9fa', 1),
(511, 'sanders78', 'james', 'rivera', 'Male', '4dc78ee9d84aeec573c4179447b5f17c', 1),
(512, 'jenny092', 'sanders', 'brown', 'Female', '64ff17838f80c64258cd790a282dc3f9', 1),
(513, 'cooper68', 'morris', 'mark', 'Male', 'a36fa990b8a15cc92fb780b60fea69b6', 1),
(514, 'paul87', 'bell', 'jenny09', 'Female', '0f56b6e11f8fb3d2c7b9e2b5197ffcbf', 1),
(515, 'brooks59', 'brooks', 'john', 'Female', 'ae166556c18344fbb05b9dedcf3413cc', 1),
(516, 'rivera36', 'rogers', 'rivera', 'Female', 'f1b651f998166553cac2f346d5821afd', 1),
(517, 'cooper25', 'maria', 'mark', 'Male', '6005d945a47f436577e76623a508727d', 1),
(518, 'mike3', 'jenny09', 'chrishaydon', 'Male', 'a997486cbd893417738f730605d99054', 1),
(519, 'rivera24', 'daniel', 'john', 'Female', 'ddeedb5dd430c8eba74f8eb99d9189e7', 1),
(520, 'wright89', 'daniel', 'paul', 'Male', '95168db3c813b2c5d9b854b227805c3e', 1),
(521, 'cooper12', 'john', 'mike', 'Female', 'c7d8d47d7f4958f0ed0b5b2b98909a3a', 1),
(522, 'paul32', 'paul', 'mike', 'Female', '489ab8665febfa2ee11f5fb8b7dbd39f', 1),
(523, 'wright11', 'rogers', 'daniel', 'Male', '6c2940089f8c9eaf6dfb54ababd79bb8', 1),
(524, 'maria51', 'john', 'maria', 'Female', '6340d1a400023f7fccfc9eb26f537575', 1),
(525, 'morris85', 'james', 'sanders', 'Male', 'c22e7b6dca3df44ae65fe9c5e3862352', 1),
(526, 'chrishaydon88', 'morgan', 'sanders', 'Female', 'b29b96b78762d7c4eb6089af70c1ffbf', 1),
(527, 'brown49', 'sanders', 'miller', 'Female', '580ff33d8cf5f43ed1cf9c6d8c0947eb', 1),
(528, 'mike55', 'ross', 'paul', 'Female', '8f395e42956816a5dc052c188c865a4d', 1),
(529, 'paul6', 'cooper', 'morris', 'Male', 'b55fb861684f108efc3d896b8724f00f', 1),
(530, 'james19', 'paul', 'wright', 'Female', '4198673960721d98d5c586b0e4513c70', 1),
(531, 'brown35', 'brooks', 'brown', 'Male', 'd0f13bbe38ff4e16b74e80a6b57c2172', 1),
(532, 'chrishaydon15', 'brooks', 'daniel', 'Male', '18ea27e101b2dbfad66fb53abd9ca48f', 1),
(533, 'jenny0962', 'cooper', 'morris', 'Female', '12113a40d01f2935f595440de44921a5', 1),
(534, 'brooks57', 'brown', 'ross', 'Male', '26ac191493cf6aa18c23295c926ac932', 1),
(535, 'chrishaydon7', 'bell', 'cooper', 'Female', 'dafd3660fc2586fd3c6144dc41f87059', 1),
(536, 'morgan15', 'ross', 'morgan', 'Female', 'd1885da7474cc37a39aff2573d607d75', 1),
(537, 'chrishaydon47', 'chrishaydon', 'morgan', 'Female', '598b2dcf555dceee8ef42d7566061fe2', 1),
(538, 'brooks41', 'david', 'daniel', 'Female', '2cdf58baaa126fcc015735645ab5cc2e', 1),
(539, 'mark61', 'brown', 'morris', 'Female', 'c12c5123fc7f6d7235eaca3950e50d8e', 1),
(540, 'brooks82', 'david', 'jenny09', 'Male', '27eff06e596108f7a9788395cdb06387', 1),
(541, 'maria6', 'david', 'mark', 'Female', 'd2e2db7fd52f7d7e8880ee081f5cd521', 1),
(542, 'brown2', 'miller', 'miller', 'Male', 'e82d49ab38cb8190072101c9671fc785', 1),
(543, 'maria94', 'brown', 'maria', 'Female', '1a45aa98069ff4dcfb86dc42438a746d', 1),
(544, 'smith95', 'daniel', 'smith', 'Female', 'ca88519b1e23347b5433eedf585bbb66', 1),
(545, 'ross3', 'daniel', 'david', 'Male', '50c0b3f1ac2eb7d177e1e7e11c94aeb9', 1),
(546, 'smith24', 'jenny09', 'sanders', 'Female', '37d1ad5adcc0d02ef2de1dd0939078ab', 1),
(547, 'john19', 'cooper', 'brooks', 'Female', '7fba0bcfd7c2bf8945d8af18c610e1a6', 1),
(548, 'michael93', 'chrishaydon', 'morris', 'Male', '29282505fa1675d9c26d7ad4868b8727', 1),
(549, 'bell35', 'morris', 'michael', 'Male', 'f38556efe7320b5ba0b37f1ac082931a', 1),
(550, 'david80', 'ross', 'sanders', 'Male', 'b6846b0186a035fcc76b1b1d26fd42fa', 1),
(551, 'paul3', 'daniel', 'wright', 'Male', 'd7e7f350f8bed24fef4232b75801c067', 1),
(552, 'michael27', 'paul', 'rivera', 'Male', '8f460a5bac166a88975cbed31695024a', 1),
(553, 'smith12', 'sanders', 'brooks', 'Male', '53e826b8f7e331fc4bc43156fa581858', 1),
(554, 'maria61', 'ross', 'michael', 'Male', '8b224ee2ef8e90b58c6940c17b05a5c7', 1),
(555, 'daniel3', 'miller', 'morgan', 'Female', '8af141d3c5a5146a3eac9d166ab4c458', 1),
(556, 'jenny0923', 'michael', 'mike', 'Male', '9865b79316da3dc2aa652a80d6830673', 1),
(557, 'morris5', 'daniel', 'paul', 'Male', '7d72b267afcd1c481b26b2194f23e3c9', 1),
(558, 'ross58', 'bell', 'mark', 'Female', '915cc23196822ac4f811c718bbebedfd', 1),
(559, 'michael48', 'jenny09', 'smith', 'Male', '75fe36d638add8a491fa7d08374b69f5', 1),
(560, 'brown92', 'james', 'david', 'Male', '7f10b80662587c371ab84ee65b0b6970', 1),
(561, 'morgan54', 'michael', 'james', 'Male', '00491bbd246b49579c3c04065163c3cf', 1),
(562, 'sanders87', 'chrishaydon', 'paul', 'Female', 'd42e30876b4c9e31198d241f65909c47', 1),
(563, 'paul54', 'cooper', 'bell', 'Male', 'ed7ec77be8029e30e8532d41448d1c52', 1),
(564, 'cooper59', 'jenny09', 'jenny09', 'Female', '21281109dfa14010fcc23de3c044a3c2', 1),
(565, 'brooks16', 'brooks', 'chrishaydon', 'Male', '2c50541aa6e124562f0793f727bfa711', 1),
(566, 'rivera44', 'john', 'morgan', 'Male', 'd4488acfe72bb3da5a38f7911ad711ad', 1),
(567, 'sanders60', 'john', 'morris', 'Male', 'ed804eac71ba458adc71df7d0c8a5a20', 1),
(568, 'morgan82', 'mark', 'bell', 'Male', '591ac07d8fed3cfdba111575059c3fb3', 1),
(569, 'john69', 'jenny09', 'chrishaydon', 'Female', 'af1aa97926e982a0eb064bc9bb2a7b05', 1),
(570, 'david36', 'rivera', 'sanders', 'Female', 'fcc4033153268829b02d73db357f03ea', 1),
(571, 'mike88', 'smith', 'james', 'Female', 'd4d05c2e262dc1b4f07d7c104c0b0c84', 1),
(572, 'david9', 'jenny09', 'chrishaydon', 'Female', '476fbef792ebde804fb21f546dbc2855', 1),
(573, 'david34', 'james', 'maria', 'Female', '64569f827f8b35a5875a4ccd41940e2d', 1),
(574, 'sanders20', 'wright', 'wright', 'Male', '6ef8878a9493e9e39d19c2ec2dbd003b', 1),
(575, 'mike22', 'ross', 'chrishaydon', 'Female', '4eb71ff2fea572ac4eba36612569bb14', 1),
(576, 'maria63', 'brown', 'morgan', 'Female', '8bae2668d9baa9309af2aa5ae18820db', 1),
(577, 'miller94', 'bell', 'smith', 'Male', 'c202a50838377ce5bb5248d78ad31c58', 1),
(578, 'chrishaydon17', 'john', 'daniel', 'Male', 'aa2750f848efac0a0233a97c28fc9fc5', 1),
(579, 'brooks60', 'mike', 'morris', 'Female', 'b9a7552791e7b0c37e52102056a0fbd2', 1),
(580, 'bell34', 'james', 'ross', 'Female', '156536d9a1f58a32f509b600827563da', 1),
(581, 'chrishaydon65', 'cooper', 'mark', 'Male', 'dc5e16512f553f1626683250cbb7af78', 1),
(582, 'paul70', 'miller', 'brooks', 'Female', '32ce9a21c85fa14b78f39f1f7d82618a', 1),
(583, 'jenny0972', 'morgan', 'chrishaydon', 'Male', 'e71bd18199aa8d0e75a2a0ceb3d369c9', 1),
(584, 'john41', 'bell', 'paul', 'Female', 'c308985c0f1d17f98317e5a96695c26b', 1),
(585, 'smith78', 'brooks', 'cooper', 'Female', 'a07db0ad5002d04602b3f657e05006fb', 1),
(586, 'morgan55', 'maria', 'cooper', 'Female', 'f5951d205429d536ea58d0584296ddc8', 1),
(587, 'smith81', 'maria', 'chrishaydon', 'Male', '17c19ef54ca5ff0f01b6d78d089c3237', 1),
(588, 'jenny0988', 'morgan', 'mike', 'Female', '8a0ab1e3b5f90ac8c677227c63c5b3c4', 1),
(589, 'chrishaydon49', 'david', 'john', 'Male', '2fe59c3c6cde3a53245fe223a3b6a838', 1),
(590, 'morris31', 'brown', 'smith', 'Male', '31eacf1d75af52241c63f0b74d07b8f4', 1),
(591, 'mike15', 'smith', 'sanders', 'Male', '5b57373e8b52f356f6b9b5e067016476', 1),
(592, 'smith61', 'daniel', 'brown', 'Female', '025a87d79c56604f376ed899adac1031', 1),
(593, 'chrishaydon42', 'ross', 'miller', 'Male', '3f7f11fc8d68737ab340dafa8228a8ba', 1),
(594, 'john62', 'morgan', 'bell', 'Male', 'cee38bdf685ff9779ffd7dfa84830914', 1),
(595, 'maria40', 'mike', 'mike', 'Female', '3c44940d53e0cf88126f4f2699275051', 1),
(596, 'james50', 'mark', 'john', 'Male', '3b0b82eb79617a9f8805573b1baec238', 1);
INSERT INTO `user_details` (`user_id`, `username`, `first_name`, `last_name`, `gender`, `password`, `status`) VALUES
(597, 'ross63', 'morgan', 'mike', 'Female', '70d70c6d340b463fc4b3fde8d133de6d', 1),
(598, 'wright56', 'ross', 'chrishaydon', 'Male', '279910d191730d428742ff2b010c30be', 1),
(599, 'brown93', 'wright', 'brown', 'Female', 'cdd6bf95eefe26b43fed49f64e635536', 1),
(600, 'maria85', 'david', 'miller', 'Female', '53a677bd77675fbc69c160f8c01f8c63', 1),
(601, 'miller63', 'morgan', 'morris', 'Female', 'ee33d4596af639660986c67f04e6ff92', 1),
(602, 'smith50', 'brown', 'brown', 'Female', 'bd1e4b23c510e1eae5fa69baa618f3e2', 1),
(603, 'mike83', 'smith', 'cooper', 'Female', '4a3309bacad462ce5af197a808839446', 1),
(604, 'mark90', 'chrishaydon', 'rivera', 'Female', '2572dd23b663effeed3c1cbe4e5e061b', 1),
(605, 'morris71', 'rogers', 'sanders', 'Male', 'a7fd9a391ed17cc9be339bcb87af3451', 1),
(606, 'brown70', 'mark', 'smith', 'Female', '7a7bb74f2a0a42146251f5f83344e9b6', 1),
(607, 'jenny0930', 'bell', 'rivera', 'Female', 'c25f2f612dde293ec2155a5dfe7901f2', 1),
(608, 'smith60', 'brown', 'maria', 'Male', '5e264d9345fda43338b21a91cd7635ff', 1),
(609, 'cooper56', 'ross', 'mike', 'Female', '81b32a932116fed6d09aaa2c2bc522df', 1),
(610, 'chrishaydon67', 'wright', 'mark', 'Female', 'a4808f35e9eca8fd90326ad5632ff220', 1),
(611, 'cooper90', 'ross', 'rivera', 'Male', '077380568f1971f1003978046142baeb', 1),
(612, 'morris82', 'ross', 'miller', 'Female', '8d863a559ac2d9fba0dfa98649e55637', 1),
(613, 'morgan3', 'sanders', 'mark', 'Male', '4d5a20ef5496dae22ea2bbfa40defc12', 1),
(614, 'daniel25', 'michael', 'ross', 'Female', '6794c36a5638c0c0df58155493512e60', 1),
(615, 'rivera64', 'morgan', 'mike', 'Female', '041dcc147d542af1dc6bf50192c1b10f', 1),
(616, 'bell41', 'smith', 'david', 'Female', '51ac771526c1909f0763cae561568011', 1),
(617, 'rivera34', 'bell', 'paul', 'Male', '7d4a65a26f424093d93857b14104585e', 1),
(618, 'chrishaydon22', 'daniel', 'rivera', 'Female', 'a6baf41f2eff1bf85db674924bc6bd59', 1),
(619, 'miller53', 'chrishaydon', 'ross', 'Male', '66dd352fd071e1e6f62d5dcc49733bb8', 1),
(620, 'miller58', 'sanders', 'paul', 'Male', '3fa66dc95e8f6e524cd5afbf4abfebdf', 1),
(621, 'wright41', 'smith', 'sanders', 'Female', '7ba55de0a483cd485e1629176c9fa5ac', 1),
(622, 'john69', 'rivera', 'mark', 'Female', 'c7d56827d1e68c192e6536dfa6d3277f', 1),
(623, 'smith6', 'smith', 'paul', 'Female', '69b7b0f8981d3f462bddcd10e83d73b8', 1),
(624, 'rogers88', 'miller', 'rivera', 'Male', '18b2b0e6b66ce69949cfd500bdbd547b', 1),
(625, 'john98', 'paul', 'mike', 'Male', 'c28c9df8f6748527700855dfd42526fe', 1),
(626, 'paul69', 'john', 'morgan', 'Male', '98bdeac0dbd9377cd342ab3e2ed67002', 1),
(627, 'morris55', 'wright', 'brown', 'Male', 'e808e39b0369890ca613a24d1bdbe80e', 1),
(628, 'paul3', 'rogers', 'mike', 'Female', 'd3c4d55d22641d9ba073fe8bfa9afdf7', 1),
(629, 'rogers28', 'brown', 'brown', 'Male', 'cb1b08d86f6053ce02919717671bd81f', 1),
(630, 'brown16', 'james', 'chrishaydon', 'Female', 'ef70b7e590eb6ef3d09bdb05084610e4', 1),
(631, 'david68', 'maria', 'mike', 'Male', '07a09583bb41fc5bb599299eca9a2fac', 1),
(632, 'michael8', 'paul', 'morgan', 'Female', '6691fbe0b3d4d260b0ada3cd9c0b78f5', 1),
(633, 'sanders67', 'brooks', 'paul', 'Male', 'ddf8e1b6ed97cdf30cb35d0f9e47517b', 1),
(634, 'rivera75', 'brooks', 'brooks', 'Male', 'fb77723ac6a75b2dfa7636213fc12803', 1),
(635, 'miller81', 'ross', 'david', 'Female', 'e5e1fa5d4c971a980e6d087016507eb7', 1),
(636, 'jenny0952', 'john', 'james', 'Male', '9f2040c62794e66ad032f119ff5d7ea7', 1),
(637, 'rivera53', 'bell', 'smith', 'Female', '1e3e64c56121038797a7e50b655464c6', 1),
(638, 'morgan33', 'wright', 'brown', 'Male', '8e5a808681a0070beaf455c2cabb782b', 1),
(639, 'ross27', 'james', 'john', 'Male', 'e1a8a0870aa50a2b1b0bdaa89af2ce82', 1),
(640, 'miller94', 'ross', 'morris', 'Female', 'c486388be0e406cf7629842e6739edf1', 1),
(641, 'michael14', 'paul', 'sanders', 'Female', '9462cebb50643d2a7731b89c5b1b8fe3', 1),
(642, 'rogers60', 'mark', 'smith', 'Male', 'bef7a008c13dcc9dd7947e5f248a1cfd', 1),
(643, 'maria50', 'rivera', 'miller', 'Male', '64b7a989ccd1e83d881215cddbeafb72', 1),
(644, 'morgan96', 'jenny09', 'mike', 'Male', '037e1ffb2901a910fe15ab0996acfe69', 1),
(645, 'ross49', 'sanders', 'jenny09', 'Female', '53083ad87812f62ccd391f01069e77b5', 1),
(646, 'wright37', 'miller', 'chrishaydon', 'Male', '0f8b225730e5be91f0f4cbb29156cf44', 1),
(647, 'brown38', 'ross', 'morgan', 'Male', '07a841d9d548265d67ac8897f60f1b06', 1),
(648, 'michael50', 'mike', 'rogers', 'Female', 'a366cae9b72e785998b0ce78a2284bdb', 1),
(649, 'wright93', 'morris', 'miller', 'Male', '811453fc8bf155d36303f9786f5509bf', 1),
(650, 'miller91', 'mike', 'chrishaydon', 'Male', 'edb8e845ed0dc8c888f7225fa43eb2a6', 1),
(651, 'daniel21', 'cooper', 'sanders', 'Female', 'df3e462d93781ea422c125a4c2b5566a', 1),
(652, 'bell44', 'ross', 'smith', 'Male', 'a49601f3e6a85c0387539bba4bcdbe6c', 1),
(653, 'brooks58', 'ross', 'john', 'Male', '6e5b2a0375b4d4d500ee07e62cad6d6c', 1),
(654, 'chrishaydon86', 'sanders', 'david', 'Female', 'c3bf2214f10104ec078bed756539f9af', 1),
(655, 'jenny0910', 'paul', 'smith', 'Male', '58eea070ea61891bfea5954c38cb9336', 1),
(656, 'rivera53', 'rogers', 'sanders', 'Female', 'ded6dcf5db7b79b5a94f17741a66b784', 1),
(657, 'brown75', 'sanders', 'rivera', 'Female', '7c5cef8a2e387abe6908ee2f3fbc534a', 1),
(658, 'maria40', 'james', 'rivera', 'Female', 'b34d0b57f3616ffebd3d38d5e8ebe129', 1),
(659, 'john12', 'sanders', 'sanders', 'Male', 'cba0f422fbd342f81feb1dd78a43cad6', 1),
(660, 'sanders88', 'paul', 'miller', 'Male', 'b6153be014b1af1811c85aa770c4cc46', 1),
(661, 'morris98', 'morgan', 'brooks', 'Female', 'd793df005919fa5c4f45a61a7f9f8e87', 1),
(662, 'miller17', 'daniel', 'brown', 'Female', 'a11bf4bd7d2f8c8162d97c7447ab07f8', 1),
(663, 'cooper84', 'miller', 'miller', 'Male', '941752ab63605763d87142453aa35988', 1),
(664, 'ross49', 'james', 'david', 'Male', '69a7777261dc890a0f976f902fdd2733', 1),
(665, 'morgan54', 'rivera', 'john', 'Female', '9e96760c00dea107bb73d28be3e9d145', 1),
(666, 'chrishaydon29', 'wright', 'cooper', 'Female', 'b6ed3804fd6ad8ccd1c85c0a7deda4e3', 1),
(667, 'paul3', 'wright', 'sanders', 'Female', 'ba55eb1bbb84696302c2029e411cb8ce', 1),
(668, 'morris98', 'brooks', 'mark', 'Female', '8aa647cb40624f377f4f1acef7b8c0e0', 1),
(669, 'cooper55', 'mark', 'ross', 'Female', '6c794b04248c5d6120dd84b8e94967a7', 1),
(670, 'rivera85', 'brown', 'brooks', 'Female', '0ca4d10e4c787cc061e18feb815f747b', 1),
(671, 'rogers43', 'jenny09', 'mike', 'Female', 'aa98ad5a318401147dc9580a9e134a7e', 1),
(672, 'ross42', 'mark', 'michael', 'Female', '1507a0565d69991ff963cd3489b1c491', 1),
(673, 'james29', 'john', 'maria', 'Female', '13b7b7adbcbc7c3ca5c0a75c2df6672e', 1),
(674, 'chrishaydon20', 'david', 'mike', 'Female', '46201dc2e9a3039d2d4edd12392d3e56', 1),
(675, 'wright68', 'rivera', 'morgan', 'Male', '3f781c34c198414b5d4758460caa481e', 1),
(676, 'cooper47', 'ross', 'paul', 'Male', '524f2968fabb85f0fdb2fa63110f6690', 1),
(677, 'morgan73', 'chrishaydon', 'cooper', 'Male', '33b7c4b03c90ac30be52d86c3229577b', 1),
(678, 'maria82', 'daniel', 'daniel', 'Male', '9a83d41058fafd2a50b9fcce02811361', 1),
(679, 'john8', 'brown', 'miller', 'Male', '43e1ed4b5c293a5f00ccd16017fc5bcb', 1),
(680, 'miller63', 'smith', 'chrishaydon', 'Female', '5b0dacd32827f2e1a7775b031a981ece', 1),
(681, 'morgan26', 'michael', 'rogers', 'Male', 'e4a653c83b7fa702099b4c780e5fa68d', 1),
(682, 'rivera69', 'brown', 'david', 'Female', 'b58472e08b58b46875487093c2867ec6', 1),
(683, 'daniel31', 'john', 'rogers', 'Male', '9d84f6219123fb1920cf2e7494a44d77', 1),
(684, 'sanders100', 'michael', 'john', 'Male', '349fda3c9d90de7e62c9ada6c0550a8b', 1),
(685, 'mark84', 'morris', 'chrishaydon', 'Female', '8f9307568ba555323b0599ce0c715b1a', 1),
(686, 'smith56', 'david', 'paul', 'Male', 'baaf6963e059f92921d196b5fef6669d', 1),
(687, 'morris93', 'chrishaydon', 'james', 'Female', 'dba13ee70b381ea5b9ceac0ece3d850f', 1),
(688, 'michael45', 'michael', 'paul', 'Female', 'd9f0344646b6ba7f224d9d3a0986cc7e', 1),
(689, 'mike88', 'daniel', 'morris', 'Female', 'b301535af6fdd8c35e49e6a740e7c647', 1),
(690, 'morgan96', 'brown', 'brooks', 'Female', 'e6ae2ac29778633f57dd2b2e131aefe2', 1),
(691, 'james5', 'brooks', 'mike', 'Female', 'ac332ec30f36d30d5bf9221fe1b32bf0', 1),
(692, 'morris83', 'sanders', 'maria', 'Male', 'fcb81feea910ea24117d4f26171991f8', 1),
(693, 'rivera19', 'rivera', 'bell', 'Female', '0ba1e8782ffcf3e71c079e1e54c0a41c', 1),
(694, 'daniel57', 'paul', 'bell', 'Female', '62d04b1633be93a4b4f93256a56e28d0', 1),
(695, 'maria10', 'wright', 'sanders', 'Female', '9c8c23c03a74a7a320d742aa95cf08e3', 1),
(696, 'david71', 'jenny09', 'david', 'Male', '16a061f8fdf5c93e9e77631dfb7d471a', 1),
(697, 'sanders88', 'jenny09', 'rivera', 'Male', 'e45df09552a41cfbba27c834c797792e', 1),
(698, 'rogers37', 'chrishaydon', 'brown', 'Male', '822141a673303a54b9387d8fc6a0c425', 1),
(699, 'chrishaydon10', 'chrishaydon', 'john', 'Male', '1b7d631cf551c86b671fd6bc2ec9d0dc', 1),
(700, 'sanders27', 'bell', 'morris', 'Male', '576352444376fe3069d256ded463666f', 1),
(701, 'brown17', 'daniel', 'ross', 'Female', '62db5968dbc97952709f7c45328a5acb', 1),
(702, 'morris86', 'rogers', 'ross', 'Male', '896b690b9566f53a875e03a3a324c091', 1),
(703, 'mark79', 'bell', 'sanders', 'Male', 'cee8dbd9130bccbe4d945c9cfc41f330', 1),
(704, 'david58', 'david', 'morgan', 'Female', 'ca391efb9f114371dced52c8eb18a412', 1),
(705, 'daniel95', 'wright', 'ross', 'Male', '4458808784017babe1bb3ed79c61f0f7', 1),
(706, 'brooks49', 'sanders', 'morgan', 'Female', 'dbd61cc2c16fa763662c8a29d63215e0', 1),
(707, 'jenny0926', 'wright', 'david', 'Female', 'd2d4451b918dbb9730bb7e010a50ab60', 1),
(708, 'bell37', 'morgan', 'john', 'Female', '9019a44759e7bdece498cc5dce570446', 1),
(709, 'john46', 'miller', 'john', 'Female', 'c618d2bfb0bf88f1de98313820f226a8', 1),
(710, 'chrishaydon43', 'miller', 'chrishaydon', 'Female', 'e63ca65668b82c9fd07eef6b719ad4aa', 1),
(711, 'rogers19', 'mike', 'john', 'Male', '59843bfb2ca080a23bcbbc5278fa6982', 1),
(712, 'brooks29', 'rivera', 'rivera', 'Female', 'f151014abd62636e598dbad4a5b43aa3', 1),
(713, 'chrishaydon74', 'morgan', 'mike', 'Female', '51d098dcc39f68b26feb79e6dfff6eec', 1),
(714, 'brooks43', 'morgan', 'cooper', 'Male', '669e54b4368a4a99595fe4a56b9bf6ff', 1),
(715, 'ross44', 'morgan', 'smith', 'Female', 'a84cf2d984ed2eb7948b9fda85275a7f', 1),
(716, 'bell63', 'chrishaydon', 'james', 'Male', '863d1292a4a36cdc9134a7f84e8070c9', 1),
(717, 'rivera41', 'maria', 'mark', 'Male', 'a9dd9815cf33560650fc661a97f41547', 1),
(718, 'wright17', 'smith', 'wright', 'Female', 'dbda8f25d0b2e3b1d3712ac08963fadb', 1),
(719, 'michael15', 'david', 'mark', 'Female', 'a167a5d9cf8157d98d45c1d0e32b72f4', 1),
(720, 'ross53', 'morris', 'daniel', 'Female', 'b4a6baa51bd47cf407213f6ba9254f71', 1),
(721, 'cooper65', 'brooks', 'mark', 'Female', '26f039d32dad1e54e8f74b015ea9ec68', 1),
(722, 'rivera2', 'sanders', 'ross', 'Male', 'e05e1e9bcf08d91b18aad54fd807fdf9', 1),
(723, 'james32', 'mark', 'rogers', 'Female', '3dd6cfec510eae9cb9951c5099c97701', 1),
(724, 'mark97', 'mike', 'paul', 'Female', '5b6f24c9e1e6cbd55c1e60863efdf263', 1),
(725, 'smith93', 'chrishaydon', 'mark', 'Female', 'efe02c4fc3cfeb4b883d2836de89927e', 1),
(726, 'chrishaydon84', 'james', 'brown', 'Male', '5957038b6a3f0a0f305123af998bc437', 1),
(727, 'smith30', 'maria', 'wright', 'Male', '62d191a19bda44ba011ebd37976b5a23', 1),
(728, 'maria51', 'wright', 'morgan', 'Male', '7d6cbe2c2340af8e492647890dbbe2cc', 1),
(729, 'rivera52', 'cooper', 'michael', 'Male', 'c15a7058e0c14b26f6863fbd7549a1e7', 1),
(730, 'chrishaydon48', 'david', 'cooper', 'Female', 'e51d84e0afa82e704755b26fe59f566e', 1),
(731, 'morgan90', 'mike', 'maria', 'Female', 'e78f1e49da6ebf2fe756ec38b646ba36', 1),
(732, 'sanders53', 'bell', 'mark', 'Female', '15d2a8035ab8f89a8d2388049cdb1ee9', 1),
(733, 'john47', 'sanders', 'sanders', 'Female', 'd3945958288a3f00f1d5fe7230670061', 1),
(734, 'daniel100', 'paul', 'cooper', 'Male', '1ca7a74ac2257ad3c0f5885cb90099f2', 1),
(735, 'wright13', 'brown', 'mark', 'Male', '35e1bd4961d74f12ed2e2399f219aaa9', 1),
(736, 'morgan86', 'brown', 'daniel', 'Female', 'ba7d8e424270cfe9f48eb09c99ff68a1', 1),
(737, 'wright17', 'james', 'rogers', 'Female', '3dc5cc06467053d6dfc1e4003741d47c', 1),
(738, 'morris93', 'john', 'john', 'Female', '88e44c67c9e05074cdfbf7fd5b51a0fa', 1),
(739, 'james40', 'rogers', 'rogers', 'Male', 'b44bc9d82406f9a445889a66b255f271', 1),
(740, 'ross47', 'sanders', 'chrishaydon', 'Male', '4592e91917d68abf8835aeae27f38cfc', 1),
(741, 'wright8', 'bell', 'cooper', 'Male', 'e30161a98a0e9e3933dbb856e6af4719', 1),
(742, 'ross83', 'morris', 'sanders', 'Female', '2ec9470fb5a92621648ad5c708b050f8', 1),
(743, 'ross9', 'bell', 'sanders', 'Female', '85b8a1781fe0eda5fcdb86d950c2e239', 1),
(744, 'miller47', 'morris', 'david', 'Female', '2fb2bd61613de4adc3ab2fc7fc05fe88', 1),
(745, 'smith28', 'brown', 'john', 'Female', '2e3a6218c8c4652563470fd23b5c9004', 1),
(746, 'morris2', 'bell', 'jenny09', 'Male', '9248ee5ee8d1ff997d0009348e2ea662', 1),
(747, 'morris4', 'rogers', 'brooks', 'Male', 'd9290c1d84c18de491112fab16fc0172', 1),
(748, 'jenny0926', 'rogers', 'john', 'Male', '3f95015a079c4d7d56054cd34942e8af', 1),
(749, 'morgan21', 'john', 'cooper', 'Male', 'c1c1328643f85dca460e8ead1600c650', 1),
(750, 'david3', 'michael', 'miller', 'Male', '6c5c00ec2728ed2459e821dce4a85349', 1),
(751, 'ross58', 'michael', 'wright', 'Male', '781cc5259d185a84cf5d480903aa448a', 1),
(752, 'jenny0949', 'david', 'mark', 'Male', '4c4caf98369d8e9a144a5621415d911b', 1),
(753, 'john96', 'mark', 'david', 'Male', '139cba23ae7508b3b61869bda95f0886', 1),
(754, 'paul5', 'rivera', 'ross', 'Male', '13a3756c2cb7b486e32054a08271d3f1', 1),
(755, 'sanders80', 'michael', 'james', 'Female', '73f63edc5f6f3b571886fbb1316c43bc', 1),
(756, 'smith65', 'brooks', 'bell', 'Male', '7ba86a4101f3074f458df9a6e43e3f5a', 1),
(757, 'rogers26', 'cooper', 'sanders', 'Female', '39ad9a9ee4d57a2d150f8b7b2b058bba', 1),
(758, 'maria43', 'miller', 'bell', 'Male', '0c879f0908f637ebe8cc0db994ae0832', 1),
(759, 'david99', 'maria', 'jenny09', 'Female', 'b38a8c25edada7483420c20a76b9d4b0', 1),
(760, 'wright20', 'smith', 'rogers', 'Female', 'e11d269be9b74106223b357b06f2da33', 1),
(761, 'brooks87', 'mark', 'maria', 'Male', '39048e4bf8923b66c03e9f38c6e4cf0a', 1),
(762, 'mike43', 'morgan', 'ross', 'Male', '024142778439c88b675219780cf1c578', 1),
(763, 'ross30', 'mark', 'david', 'Male', 'c5fb92d8af4e45581d8bb7c71a5c0a1c', 1),
(764, 'jenny0981', 'morgan', 'brooks', 'Female', '34ae1e72198b2ccb37610a3269368fa7', 1),
(765, 'cooper11', 'james', 'james', 'Female', '243cffae81569cca39840aec1e9e2852', 1),
(766, 'rogers97', 'rivera', 'cooper', 'Female', '2c1b0008658b163a08e7392d26f15241', 1),
(767, 'wright84', 'james', 'morgan', 'Female', '161471c50b1c2a75957ba66acf8da9f5', 1),
(768, 'jenny0932', 'paul', 'morgan', 'Male', '50285433069b9faf53c900cd2642fa9d', 1),
(769, 'sanders40', 'paul', 'sanders', 'Female', 'be92492fa64d6126726a71584a75a878', 1),
(770, 'john80', 'daniel', 'ross', 'Female', '8a608ab5ea3865ae688ac2f8b1cc3b61', 1),
(771, 'brooks58', 'david', 'chrishaydon', 'Male', 'abcac734158a5d228b0597afccc907a3', 1),
(772, 'miller37', 'brooks', 'bell', 'Female', '62c1ace1a0aa8e798169f547586457c8', 1),
(773, 'james93', 'chrishaydon', 'james', 'Male', '7ef00ef6e7f47472db040222dae2dc8e', 1),
(774, 'bell16', 'bell', 'james', 'Male', '0d5e1a6eab996a7d1d32a0e2ed22ff2a', 1),
(775, 'smith96', 'mike', 'bell', 'Female', '68f2fb17fd3f13d8a0a394de396ce447', 1),
(776, 'ross94', 'david', 'bell', 'Male', '84c62bc5b6f1dab11a1ca3d8d7a5e29e', 1),
(777, 'ross95', 'jenny09', 'sanders', 'Female', 'ce0ea990586cc636eac7051b80d52eae', 1),
(778, 'chrishaydon82', 'jenny09', 'maria', 'Female', '8093f823794b8fa03c379c035300fd0b', 1),
(779, 'michael3', 'mike', 'jenny09', 'Male', 'fc13f6e30b38a8529a57add8a59b5ec0', 1),
(780, 'jenny0918', 'rogers', 'brown', 'Male', '8b9e34ac36a2fd947614e2616f3d6826', 1),
(781, 'rogers43', 'james', 'brown', 'Female', '0ed13b523813a089363aa1eb5e86fe46', 1),
(782, 'morris91', 'paul', 'rivera', 'Male', '613be5cffa8a578c1816a1baf6bb8501', 1),
(783, 'john4', 'james', 'rivera', 'Female', '76ebe07cd3c27e769f71251f294d4c94', 1),
(784, 'cooper5', 'wright', 'morris', 'Male', '8105c71bb32ba7bf731c4162ff9c1f21', 1),
(785, 'chrishaydon20', 'rogers', 'wright', 'Male', '107d0e7f6bde9964ed99fff7b38df718', 1),
(786, 'chrishaydon44', 'mark', 'smith', 'Female', 'a54db1865fb0fa3a66861d93e037741d', 1),
(787, 'daniel13', 'brooks', 'brown', 'Female', '91270e97491a918496e6569c9fcff808', 1),
(788, 'chrishaydon37', 'brown', 'mark', 'Male', 'a3efe2fadf9e33423b80532af0f95c33', 1),
(789, 'david31', 'wright', 'paul', 'Female', 'b8e0691f01b08a810fade049028d9c3e', 1),
(790, 'mark21', 'daniel', 'smith', 'Male', 'edb756698a3383f440dc36d2a412d864', 1),
(791, 'wright81', 'mike', 'maria', 'Male', '9e24be3c24ab1a4617986bce579f04f2', 1),
(792, 'michael13', 'morris', 'cooper', 'Female', '9d450e0529ca7328d07679163206f732', 1),
(793, 'rogers63', 'david', 'john', 'Female', 'e6a33eee180b07e563d74fee8c2c66b8', 1),
(794, 'mike28', 'rogers', 'paul', 'Male', '2e7dc6b8a1598f4f75c3eaa47958ee2f', 1),
(795, 'rivera92', 'david', 'john', 'Male', '1c3a8e03f448d211904161a6f5849b68', 1),
(796, 'ross95', 'maria', 'sanders', 'Male', '62f0a68a4179c5cdd997189760cbcf18', 1),
(797, 'paul85', 'morris', 'miller', 'Female', '61bd060b07bddfecccea56a82b850ecf', 1),
(798, 'smith34', 'daniel', 'michael', 'Female', '7055b3d9f5cb2829c26cd7e0e601cde5', 1),
(799, 'james84', 'sanders', 'paul', 'Female', 'b7f72d6eb92b45458020748c8d1a3573', 1),
(800, 'daniel53', 'mark', 'mike', 'Male', '299cbf7171ad1b2967408ed200b4e26c', 1),
(801, 'brooks80', 'morgan', 'maria', 'Female', 'aa736a35dc15934d67c0a999dccff8f6', 1),
(802, 'morgan65', 'paul', 'miller', 'Female', 'a28dca31f5aa5792e1cefd1dfd098569', 1),
(803, 'sanders84', 'david', 'miller', 'Female', '0629e4f9f0e01e6f20bc2066175e09f7', 1),
(804, 'maria40', 'chrishaydon', 'bell', 'Female', '17f286a78c74db7ee24374c608a2f20c', 1),
(805, 'brown71', 'michael', 'brown', 'Male', 'fa0c46cc4339a8a51a7da1b33e9d2831', 1),
(806, 'james63', 'morgan', 'james', 'Male', 'b945416fa907fac533d94efe1974ec07', 1),
(807, 'jenny0993', 'rogers', 'chrishaydon', 'Female', '388823cb9249d4cebc9d677a99e1d79d', 1),
(808, 'john96', 'morgan', 'wright', 'Male', 'd0bb977705c3cdad1e346c898f32a1b7', 1),
(809, 'miller64', 'morgan', 'wright', 'Male', '58b207ee33794b046511203967c8e0d7', 1),
(810, 'mark46', 'david', 'ross', 'Female', '21cdcb68a932871524e16680fac72e18', 1),
(811, 'jenny0988', 'maria', 'morgan', 'Female', 'ec9ed18ae2a13fef709964af24bb60e6', 1),
(812, 'mark80', 'mike', 'bell', 'Male', '084489b355edd349bca1c798788de19a', 1),
(813, 'morris72', 'miller', 'michael', 'Male', 'bdb047eb9ea511052fc690a8ac72a7d3', 1),
(814, 'wright39', 'ross', 'rogers', 'Female', '1b6859df2da2a416c5b0fa044b1c6a75', 1),
(815, 'paul68', 'brooks', 'mike', 'Male', '12d836bf64839f987338414ccbec657f', 1),
(816, 'smith60', 'miller', 'daniel', 'Male', '494610644518624d05e2bdc8b9df3c36', 1),
(817, 'bell43', 'mike', 'wright', 'Male', '2bd4e16a15f5527cb43282ee0ef94619', 1),
(818, 'rogers79', 'wright', 'smith', 'Female', '4df306580eed9e0758a759e8c54cc0d7', 1),
(819, 'daniel56', 'david', 'morgan', 'Male', 'c374aac91fe75e5ca9d4d46351c90291', 1),
(820, 'brooks85', 'smith', 'bell', 'Female', '5160256831bf840f1d0af550dce108cf', 1),
(821, 'mike30', 'paul', 'wright', 'Female', '44cd7d4f05cd775b99d2f68b169d2764', 1),
(822, 'paul92', 'michael', 'james', 'Female', '06a8728ad70c4ba4d298650d6f68d62c', 1),
(823, 'bell96', 'michael', 'sanders', 'Female', 'da77805fb5b220853e9ee1a888ea4870', 1),
(824, 'john8', 'john', 'rivera', 'Female', '8f4eedbae6486c91521dcc9e2e746978', 1),
(825, 'chrishaydon12', 'paul', 'michael', 'Male', '341f71ff99f299c10b7bd10bb0ffd5c0', 1),
(826, 'morgan13', 'ross', 'mark', 'Female', '8f9ecff6d4562e1f2d344f753c0d540e', 1),
(827, 'james83', 'brooks', 'smith', 'Female', '4180a37ebe6c56665ecc0c09f97749bc', 1),
(828, 'chrishaydon8', 'cooper', 'brown', 'Female', '48655cff7595c40da5309e9ed6c41095', 1),
(829, 'ross85', 'ross', 'daniel', 'Male', 'a2088dbb45598312937f9c2b39d76b6b', 1),
(830, 'ross46', 'cooper', 'miller', 'Male', 'ccbffd8ac04c96f4a19b8987221f389c', 1),
(831, 'smith4', 'jenny09', 'maria', 'Female', '61210cd033e05eefd7904582f42bd9f3', 1),
(832, 'paul4', 'paul', 'rivera', 'Female', '1f76110a33d9fe38bffcbd6d6dd49a29', 1),
(833, 'daniel26', 'maria', 'sanders', 'Male', 'c2b161779bf8f62752b8cdcfeabcb952', 1),
(834, 'chrishaydon2', 'bell', 'david', 'Female', 'aae5b1e30f985f2f6eedc4eec8dd2de8', 1),
(835, 'david82', 'rivera', 'cooper', 'Male', '10752c85ab371579e5744ecce8b8dfc0', 1),
(836, 'john97', 'mark', 'david', 'Female', '8eb2c044f3d3215c910973fded3718f9', 1),
(837, 'david57', 'paul', 'cooper', 'Male', '218a9c83939355cb9b81036857412d7f', 1),
(838, 'rivera100', 'brooks', 'david', 'Male', 'eefc9091a99e39015b020af27c2e80a6', 1),
(839, 'bell13', 'james', 'maria', 'Male', '90687b869096ea955b55a88a55b0b982', 1),
(840, 'brooks65', 'john', 'mark', 'Female', 'ac3a36b10fad8f53b5b0a3d5c4aab9de', 1),
(841, 'daniel40', 'rivera', 'jenny09', 'Female', '25c8261763223229a55949b9cbaac0c6', 1),
(842, 'cooper100', 'chrishaydon', 'sanders', 'Female', '9b86a2c6fa37f5842c75dcb6aa43453d', 1),
(843, 'morris14', 'bell', 'david', 'Female', '1b8e375c5826da045b4b80cbeaffb281', 1),
(844, 'smith82', 'morris', 'brooks', 'Female', '8f9459d4946b4025c0fc92a319f62769', 1),
(845, 'cooper35', 'cooper', 'mark', 'Male', 'b87551b47f0515089a0e6c197a0524c7', 1),
(846, 'morgan94', 'james', 'brooks', 'Male', '6cd7ed7e8f66ed1154abfe390c18b271', 1),
(847, 'michael92', 'brooks', 'morris', 'Male', 'c6e7402e9de6381fd6ee0936ae304bd4', 1),
(848, 'sanders48', 'morgan', 'sanders', 'Female', '1606ebcb8b02982109e5a9ad6817d93c', 1),
(849, 'brown76', 'rivera', 'cooper', 'Female', '45903192c7e1eae93463b4881aaf3d3e', 1),
(850, 'james16', 'bell', 'john', 'Female', '2b3f531f9940613c33217c4756844069', 1),
(851, 'michael26', 'wright', 'brown', 'Male', '3c86daac8f13d18f3da5f0fef72d2d41', 1),
(852, 'wright57', 'wright', 'sanders', 'Male', 'b6b283c151b7c2f8bd6307867fac6207', 1),
(853, 'wright68', 'smith', 'michael', 'Female', 'b6d7044f51097af805a29408ab2aa895', 1),
(854, 'brooks1', 'bell', 'rivera', 'Male', '87037e26aacc077d41d83f8d6c91a95c', 1),
(855, 'bell2', 'rivera', 'david', 'Female', '0479c8271fb4dbe47106570c92abbb74', 1),
(856, 'miller100', 'brooks', 'wright', 'Male', '39e5cddf9d6fe5c39d348b5e2d45c07d', 1),
(857, 'rogers53', 'chrishaydon', 'brown', 'Male', '0377bf6ebd9bacfbe96a492c532f0e3b', 1),
(858, 'mike1', 'michael', 'sanders', 'Male', 'b9ff9aa4450707644faf5cf872a57f41', 1),
(859, 'cooper57', 'daniel', 'mark', 'Female', 'adab67243e70ed8d0938696ba1dfdabe', 1),
(860, 'daniel38', 'bell', 'michael', 'Male', '753bd83042af00c1af6af82ae4236726', 1),
(861, 'mark2', 'brown', 'bell', 'Female', '5160c711eb1a1fb416cb296cfa30d3c6', 1),
(862, 'daniel79', 'rogers', 'john', 'Male', '97dbce061c4488e48613a6d66e57c1e1', 1),
(863, 'wright4', 'paul', 'smith', 'Female', 'be2fb6743dd0c143427d6fdbb61d82ab', 1),
(864, 'brown84', 'john', 'ross', 'Male', '738cb4da81a2790a9a845f902a811ea2', 1),
(865, 'paul41', 'wright', 'brooks', 'Male', '3ce24a34ab204d82e12e60e205ff5ede', 1),
(866, 'mark5', 'brooks', 'brown', 'Male', '751933d2077ded39b30aac68060b71c5', 1),
(867, 'jenny0994', 'brown', 'morgan', 'Male', '59bb0aea62b70ddc63832302636c713c', 1),
(868, 'morris53', 'chrishaydon', 'brown', 'Male', '422bc412471dd80dc4f174c2d9a7e021', 1),
(869, 'paul68', 'mark', 'smith', 'Female', '313afaad7095a093eea942a0da8398ee', 1),
(870, 'brooks86', 'brooks', 'ross', 'Male', '73bbba08c3776debd5837a2c0dfe1e8b', 1),
(871, 'james54', 'jenny09', 'morris', 'Male', '7f686fb7a9ba33dfee86197c127365f5', 1),
(872, 'rogers58', 'morgan', 'maria', 'Female', 'f1b9d20083738141fb8c72c4d3364b4f', 1),
(873, 'maria31', 'rogers', 'brooks', 'Male', '328bb700b7eee8e5cbb15839243d327b', 1),
(874, 'david5', 'rivera', 'brown', 'Male', '14ab3096cfe6e150a56280c789e6e1e1', 1),
(875, 'mark21', 'wright', 'maria', 'Female', '442eff629cdd5657580d8c6205050e19', 1),
(876, 'jenny0932', 'mike', 'brooks', 'Female', 'a45d934a95f56a43ad85752800cfa859', 1),
(877, 'john92', 'sanders', 'mike', 'Male', 'b945d691d0ffe06cb8a6a520119a90ef', 1),
(878, 'rogers98', 'james', 'jenny09', 'Male', '79c89f1132cc08e88456b035f12d0097', 1),
(879, 'rogers95', 'jenny09', 'bell', 'Female', 'f318e4c186ab19e3d3d3591a2e075d03', 1),
(880, 'james50', 'chrishaydon', 'mark', 'Male', 'ef650493f25a16d7f4ef206cd5354f9f', 1),
(881, 'miller80', 'sanders', 'chrishaydon', 'Male', '8d0027ca30d88ad9a9880d35174919d9', 1),
(882, 'mark29', 'bell', 'paul', 'Female', '21698003655695103412c11ffe08a118', 1),
(883, 'cooper77', 'michael', 'maria', 'Male', '101faf06bcf8140ead914fbe116c941a', 1),
(884, 'john24', 'brown', 'paul', 'Male', '93a5fe6210bfcdb573ccd348e19e6a56', 1),
(885, 'chrishaydon32', 'john', 'ross', 'Female', '5c6f05dfb66be73f1a6e8e48fabcfe44', 1),
(886, 'bell41', 'morris', 'chrishaydon', 'Female', 'd5273c01c17187153a1e725d27d51034', 1),
(887, 'ross99', 'wright', 'brown', 'Male', '2b27aec5a1caf4d613a8eb8154560f49', 1),
(888, 'smith9', 'miller', 'morris', 'Male', '97ee0765b9c05d35b53769a3c4133b13', 1),
(889, 'miller73', 'chrishaydon', 'morgan', 'Male', '6c4283471ace6b4af590c180bd13b1bf', 1),
(890, 'michael44', 'cooper', 'maria', 'Female', 'dd4d053a12a3d8450166dba9177bac2c', 1),
(891, 'michael36', 'miller', 'cooper', 'Female', '36ab21ccb2a64acd5351bbb59753df9d', 1),
(892, 'smith93', 'bell', 'mike', 'Female', '8fbfdb81391ef264ae8b0df7e7e91d25', 1),
(893, 'morgan38', 'michael', 'wright', 'Male', '7fe5e229f17d1c7f98af6229bd33549b', 1),
(894, 'brown70', 'brown', 'daniel', 'Male', '80925ec8958ba5847ff2b28ec00daabb', 1),
(895, 'mike14', 'brown', 'jenny09', 'Male', 'a44db187c1c09c5872dc847ffb672e24', 1),
(896, 'daniel72', 'jenny09', 'rogers', 'Female', 'f2e51aec5731a5069e6631ae84bc86de', 1),
(897, 'jenny0974', 'ross', 'mark', 'Male', '997f99ffe068d1e4a1e6afbf872b64af', 1),
(898, 'maria51', 'rogers', 'ross', 'Male', 'ba22dcb1ad6c9240781fc6b29dcf90a8', 1),
(899, 'michael97', 'jenny09', 'morgan', 'Female', 'b3f1d9569d684ad845e82ad322aff039', 1),
(900, 'chrishaydon33', 'cooper', 'brown', 'Male', '6e097d46239427a59e93864cd22651bb', 1),
(901, 'sanders42', 'david', 'david', 'Female', 'c746602f44b9b51f87e8ca6c6ce4d4df', 1),
(902, 'brooks87', 'michael', 'wright', 'Male', '3b3d93f0c198684f4b48c026aeb798c5', 1),
(903, 'bell4', 'smith', 'cooper', 'Male', 'e50e309e6a683b1cbcf31f99b1290a9d', 1),
(904, 'jenny0945', 'bell', 'sanders', 'Male', 'eb04440b1c92d35d4466a2c164fce1fb', 1),
(905, 'james65', 'ross', 'ross', 'Female', 'a6dd8b5321189009e29fb9065371ddd0', 1),
(906, 'john98', 'morris', 'paul', 'Male', 'fe5d5050aefb9bd316b4304df5f5eb2b', 1),
(907, 'paul80', 'morgan', 'david', 'Male', 'e888d54c6981b4e7e92bbd874655a3bf', 1),
(908, 'john92', 'brown', 'jenny09', 'Female', '59624207640e3eb1c3a25caaa0d387c0', 1),
(909, 'wright69', 'david', 'chrishaydon', 'Male', 'b4ceea9331194b6884885396b2fa9ab9', 1),
(910, 'bell68', 'daniel', 'bell', 'Female', '7a47747a891fd8e6cfa1b5e13f6bd305', 1),
(911, 'brooks97', 'maria', 'cooper', 'Male', '59cd3d27cf79ce5d0f0e722e02ababcb', 1),
(912, 'mark14', 'cooper', 'wright', 'Female', '72c558cfdd0b27b021ed0c326655b419', 1),
(913, 'david60', 'john', 'bell', 'Female', 'daf7f99e70cc6bd895635ab8117f906c', 1),
(914, 'rivera68', 'miller', 'brooks', 'Female', '6ce20ee0cd25f2265f9c839747f3f60a', 1),
(915, 'brooks32', 'mark', 'brown', 'Male', '1d3d6cb6ad2d65a22f7202ee48687192', 1),
(916, 'brown15', 'wright', 'michael', 'Female', 'bfec76c4b0f279fb5fa947cdea45634c', 1),
(917, 'bell88', 'ross', 'brooks', 'Male', 'e4e8ae68e6791cce2718301e3e806417', 1),
(918, 'john26', 'brown', 'miller', 'Female', 'af2717f20db66dcc1069529d8470e03c', 1),
(919, 'paul55', 'morris', 'morgan', 'Male', 'f71110684519ea4c9997ee181344ca5b', 1),
(920, 'david59', 'rogers', 'morris', 'Male', '4123d932f75f7093e9f7be9dd4d8531c', 1),
(921, 'morris73', 'sanders', 'david', 'Male', '0955de128fd73fa725f8fb63dddb2b02', 1),
(922, 'michael77', 'john', 'brooks', 'Female', '0a23e450ab5659abde2283c4bbc629b5', 1),
(923, 'mark5', 'james', 'john', 'Male', 'ef5e4a71b458f98799d282a6954c9895', 1),
(924, 'james65', 'smith', 'paul', 'Male', '84bd8c4ac8f11f1fefdf519f372783a4', 1),
(925, 'maria39', 'miller', 'chrishaydon', 'Female', '91f576e83d57c336e54b6fc73ea2bfbf', 1),
(926, 'michael37', 'jenny09', 'rogers', 'Female', '74911c4886c6ad901dd8f3083ea7d008', 1),
(927, 'sanders1', 'morgan', 'maria', 'Female', '186e155dd946be048c37dc8f2e7eed7e', 1),
(928, 'daniel30', 'mike', 'morgan', 'Female', 'e41a85a3b3313519146041378173534e', 1),
(929, 'brown53', 'mike', 'sanders', 'Male', '3a5871a13dc27be7d72e82bed22580b2', 1),
(930, 'john52', 'morgan', 'maria', 'Female', 'bf4c4513b084ba0aa915dc428e2f5aa1', 1),
(931, 'wright73', 'rivera', 'rivera', 'Male', '4ee2e5750afd3933bf890098f6f15778', 1),
(932, 'mark63', 'daniel', 'morgan', 'Female', '3279caba4dbd1aebc014e13103454ad0', 1),
(933, 'james29', 'mark', 'mike', 'Male', '7d5eb23481c4dde548aa4d5b439007b5', 1),
(934, 'mark23', 'cooper', 'sanders', 'Male', '26e4b55f45b1589b8f79d3e207c68b0b', 1),
(935, 'cooper22', 'john', 'brooks', 'Male', 'db4f42f1500cbb9918558d9d7ec02ee7', 1),
(936, 'miller19', 'michael', 'brown', 'Male', 'a88e080d2d0a0caf75fb9df08a09b223', 1),
(937, 'jenny0913', 'brown', 'mark', 'Female', 'edb17fda48abe064968e3823daf2406e', 1),
(938, 'maria100', 'michael', 'james', 'Male', '528b3dcb48d9ade25eead37020925cf7', 1),
(939, 'chrishaydon51', 'daniel', 'morgan', 'Male', '51f2f1f0edfc42ea487cc60c1a8b2235', 1),
(940, 'david9', 'sanders', 'wright', 'Male', '117993f0e0796f188e658c1ae73f54e0', 1),
(941, 'mike52', 'bell', 'mark', 'Male', '049aaf70feca52840f5f645cc392997b', 1),
(942, 'wright5', 'sanders', 'mike', 'Female', '82c719790b9f9265313ca1e5f71be710', 1),
(943, 'brown21', 'bell', 'paul', 'Female', 'a42bd7f0e498cb3fa3fcce569aa72cb2', 1),
(944, 'daniel46', 'wright', 'maria', 'Female', '935dec640caf2b4d58749d288277937b', 1),
(945, 'brown86', 'rivera', 'morgan', 'Female', 'be56de82935f6c8fe2fe3a5fdc7c89d6', 1),
(946, 'chrishaydon85', 'mike', 'brown', 'Male', '3894408d593726ee2ff44b61b678ee68', 1),
(947, 'john41', 'brown', 'james', 'Male', '416e74d1a0155b8027abb780304d418e', 1),
(948, 'mark72', 'brooks', 'maria', 'Female', '6865af4cedf1b219b1f2e65cb4f1b9bf', 1),
(949, 'michael67', 'jenny09', 'rivera', 'Male', '8d10c08cbeefcf018eb92a009ec8aad1', 1),
(950, 'jenny0943', 'john', 'miller', 'Male', 'f919eb50f03a7f34d754291da70276e1', 1),
(951, 'daniel61', 'john', 'ross', 'Male', 'b1b1f0fe2064aa6d5d84498f57ebfccc', 1),
(952, 'morgan34', 'morris', 'john', 'Female', '604faa08103f852cf9d6aaeb98315a23', 1),
(953, 'jenny097', 'jenny09', 'smith', 'Female', '3454a779083ac3cb6aa60350341187f7', 1),
(954, 'miller11', 'jenny09', 'ross', 'Female', '6256f4a433a1073717389415d8722ff6', 1),
(955, 'daniel99', 'bell', 'morris', 'Female', 'e221f8e93dd0b68bfebe9dff53a85b5a', 1),
(956, 'miller20', 'michael', 'wright', 'Male', 'c2b80bc3a042354b4cc3793d6b1c3b3b', 1),
(957, 'sanders29', 'paul', 'michael', 'Female', 'd2950033ad75a63b2aaf909256c9efac', 1),
(958, 'mark43', 'mark', 'john', 'Male', '3f8172ec318a44eb0307e9e45615b579', 1),
(959, 'james86', 'morris', 'paul', 'Male', 'ae34b9c97686915640a636783b6cecea', 1),
(960, 'chrishaydon74', 'john', 'rogers', 'Male', '8c2ea9755dd593fce7d8e241d50bde58', 1),
(961, 'brooks37', 'daniel', 'maria', 'Female', 'd4648e8fa2eef67d21c468d85b061da9', 1),
(962, 'michael78', 'paul', 'cooper', 'Female', '15d36cdc2526c1ed9b64730b640b7d58', 1),
(963, 'paul9', 'mark', 'john', 'Male', '9d8c5d4a08ffd9ef258b086c7ccea3cc', 1),
(964, 'james57', 'cooper', 'morris', 'Female', '6ab6dd47d785163089c40bb9bf7f1564', 1),
(965, 'mark91', 'james', 'smith', 'Male', 'cf0eff977e087b674b8a49c87d14c916', 1),
(966, 'wright30', 'paul', 'rivera', 'Male', 'd5865a905e7e012256d86d12a1d4b023', 1),
(967, 'rogers97', 'brooks', 'ross', 'Male', 'f65862683e163fb7177b2496bd9df34f', 1),
(968, 'daniel8', 'james', 'rivera', 'Male', 'aed8f7681ae44f6aa9898c5716f5bcc9', 1),
(969, 'mark66', 'david', 'jenny09', 'Male', '303dd369979dbcb94fa0cd5783f53e0a', 1),
(970, 'daniel6', 'john', 'mike', 'Male', '958ceedfce1a1abaac93614a33a6ea55', 1),
(971, 'bell72', 'morris', 'jenny09', 'Male', '45c9bd3537ce1e0da7fc2bfe8301d601', 1),
(972, 'morgan77', 'david', 'mark', 'Female', 'ee140015e05be0264b24afedda71ca8b', 1),
(973, 'bell24', 'cooper', 'brooks', 'Male', 'ce1d4ec89996ac1454c4c32e1ea0e8eb', 1),
(974, 'michael31', 'cooper', 'jenny09', 'Female', 'de6eb39870bf46a4630bc3f35de80865', 1),
(975, 'cooper98', 'mike', 'brooks', 'Female', '083e4eb6f1f0afcd0d7b490b6570bbcb', 1),
(976, 'daniel41', 'bell', 'mark', 'Female', '029dbe991eb002148795377a745539a5', 1),
(977, 'michael1', 'bell', 'michael', 'Male', 'ca67281974023f68939bab6fff9c7775', 1),
(978, 'chrishaydon20', 'daniel', 'morris', 'Male', '0d11594096725a315584de6912918368', 1),
(979, 'daniel66', 'david', 'chrishaydon', 'Female', '40eb7d974a510189a9384a7e1878d1a2', 1),
(980, 'cooper52', 'smith', 'wright', 'Male', 'da29e66a9e8c1b89cde015ff151043bb', 1),
(981, 'chrishaydon99', 'ross', 'smith', 'Male', 'c641d1a255542bbcfa30b3daa34d6cda', 1),
(982, 'smith66', 'ross', 'james', 'Female', '1514dce3cead18e9e8784cd2b773feb0', 1),
(983, 'mike48', 'miller', 'chrishaydon', 'Female', '946833a02a91ede4d2e02002131296ab', 1),
(984, 'rivera80', 'michael', 'morris', 'Female', 'b13b2e2b309f5d0142d408bf2df0bd28', 1),
(985, 'morgan35', 'wright', 'brown', 'Female', '4dcd4fc0ab8d58437c6c6b04e054a2e9', 1),
(986, 'brooks16', 'michael', 'paul', 'Male', 'cb7dfca585a7404664aa6b31e9ea2940', 1),
(987, 'mike78', 'morgan', 'wright', 'Male', '17e39e780901de9d84538e7b2f0377a4', 1),
(988, 'michael38', 'david', 'daniel', 'Male', 'f34ab0578614889981fcfba9d8841da9', 1),
(989, 'mark7', 'cooper', 'morgan', 'Female', 'd2695e31deb9f73db3deeb7a2ae4fee8', 1),
(990, 'rogers80', 'mark', 'morgan', 'Male', 'e5f6a02bfd722c079093bdf30229d771', 1),
(991, 'wright81', 'john', 'brown', 'Male', 'e1021d43911ca2c1845910d84f40aeae', 1),
(992, 'michael21', 'wright', 'mark', 'Female', 'f289dc0b3863e4e762ee8b462a4ac20e', 1),
(993, 'daniel56', 'rogers', 'bell', 'Male', '89978e486ff3e020498757df87ecb956', 1),
(994, 'ross3', 'maria', 'morris', 'Female', '06edca508a58f3817a74183dc4fef1c7', 1),
(995, 'chrishaydon72', 'sanders', 'morgan', 'Female', '3a03e0b57f61d84609f777acaac77701', 1),
(996, 'sanders66', 'brooks', 'jenny09', 'Male', '2c0ac07e37743d6b8e8daba5dad9ae06', 1),
(997, 'michael4', 'wright', 'morris', 'Female', 'fb90312df1c22489a6c25b2ab67bf3fc', 1),
(998, 'brown66', 'bell', 'mark', 'Female', '77cb9a330118fa84d027315c0740df1c', 1),
(999, 'wright26', 'morgan', 'cooper', 'Male', 'e8c529514ec002b6bb1ce139adc2eaf8', 1),
(1000, 'james81', 'daniel', 'brown', 'Female', '6ce961f58c6f12943531080a444f570d', 1);
|
/*
Navicat Premium Data Transfer
Source Server : root
Source Server Type : MySQL
Source Server Version : 80021
Source Host : localhost:3306
Source Schema : zktrbook
Target Server Type : MySQL
Target Server Version : 80021
File Encoding : 65001
Date: 24/09/2020 23:11:30
*/
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for book
-- ----------------------------
DROP TABLE IF EXISTS `book`;
CREATE TABLE `book` (
`Bookid` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '图书编号',
`Bookname` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '图书名字',
`total` int(0) NULL DEFAULT NULL COMMENT '总数量',
`already` int(0) NULL DEFAULT NULL COMMENT '已借数量',
`remain` int(0) NOT NULL,
PRIMARY KEY (`Bookid`) USING BTREE,
INDEX `Bookid`(`Bookid`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of book
-- ----------------------------
INSERT INTO `book` VALUES ('book00001', '天龙八部2', 10, 1, 9);
INSERT INTO `book` VALUES ('book00002', '盗墓笔记', 10, 0, 10);
INSERT INTO `book` VALUES ('book00003', 'xu1', 6, 0, 6);
-- ----------------------------
-- Table structure for computer
-- ----------------------------
DROP TABLE IF EXISTS `computer`;
CREATE TABLE `computer` (
`cptid` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,
`state` int(0) NOT NULL,
PRIMARY KEY (`cptid`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of computer
-- ----------------------------
INSERT INTO `computer` VALUES ('cpt01', 1);
INSERT INTO `computer` VALUES ('cpt02', 1);
INSERT INTO `computer` VALUES ('cpt03', 1);
INSERT INTO `computer` VALUES ('cpt04', 0);
INSERT INTO `computer` VALUES ('cpt05', 1);
INSERT INTO `computer` VALUES ('cpt06', 1);
INSERT INTO `computer` VALUES ('cpt07', 0);
INSERT INTO `computer` VALUES ('cpt08', 0);
-- ----------------------------
-- Table structure for employee
-- ----------------------------
DROP TABLE IF EXISTS `employee`;
CREATE TABLE `employee` (
`Empid` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '员工编号',
`empname` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '员工姓名',
`emppass` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '员工密码',
`state` enum('2','1','3') CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '员工状态',
PRIMARY KEY (`Empid`) USING BTREE,
INDEX `Empid`(`Empid`) USING BTREE,
INDEX `Empid_2`(`Empid`) USING BTREE,
INDEX `Empid_3`(`Empid`) USING BTREE,
INDEX `Empid_4`(`Empid`) USING BTREE,
INDEX `Empid_5`(`Empid`) USING BTREE,
INDEX `Empid_6`(`Empid`) USING BTREE,
INDEX `Empid_7`(`Empid`) USING BTREE,
INDEX `Empid_8`(`Empid`) USING BTREE,
INDEX `Empid_9`(`Empid`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of employee
-- ----------------------------
INSERT INTO `employee` VALUES ('emp2017001', '许仙', '123456', '2');
INSERT INTO `employee` VALUES ('emp2019003', '小秋', '123456', '2');
INSERT INTO `employee` VALUES ('emp2020001', '啊三', '123456', '2');
INSERT INTO `employee` VALUES ('emp2020002', 'xu', '123456', '2');
-- ----------------------------
-- Table structure for lease
-- ----------------------------
DROP TABLE IF EXISTS `lease`;
CREATE TABLE `lease` (
`leaseid` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '借阅编号',
`Cardid` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '借书证编号',
`bookid` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '图书编号',
`borrowdate` datetime(0) NOT NULL COMMENT '借阅时间',
`returndate` datetime(0) NULL DEFAULT NULL COMMENT '归还时间',
`Empid1` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '借书员工编号',
`Empid2` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '归还员工编号',
PRIMARY KEY (`leaseid`) USING BTREE,
INDEX `fk_Cardid`(`Cardid`) USING BTREE,
INDEX `fk_bookid`(`bookid`) USING BTREE,
INDEX `fk_empid1`(`Empid1`) USING BTREE,
INDEX `fk_empid2`(`Empid2`) USING BTREE,
CONSTRAINT `fk_bookid` FOREIGN KEY (`bookid`) REFERENCES `book` (`Bookid`) ON DELETE RESTRICT ON UPDATE RESTRICT,
CONSTRAINT `fk_Cardid` FOREIGN KEY (`Cardid`) REFERENCES `librarycard` (`Cardid`) ON DELETE RESTRICT ON UPDATE RESTRICT,
CONSTRAINT `fk_empid1` FOREIGN KEY (`Empid1`) REFERENCES `employee` (`Empid`) ON DELETE RESTRICT ON UPDATE RESTRICT,
CONSTRAINT `fk_empid2` FOREIGN KEY (`Empid2`) REFERENCES `employee` (`Empid`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of lease
-- ----------------------------
INSERT INTO `lease` VALUES ('lease202080001', 'card00003', 'book00001', '2020-08-16 17:02:39', '2020-08-16 17:16:53', 'emp2020001', 'emp2017001');
INSERT INTO `lease` VALUES ('lease202080002', 'card00001', 'book00001', '2020-08-16 17:22:46', NULL, 'emp2017001', NULL);
-- ----------------------------
-- Table structure for librarycard
-- ----------------------------
DROP TABLE IF EXISTS `librarycard`;
CREATE TABLE `librarycard` (
`Cardid` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '借书证编号',
`name` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '读者姓名',
`state` int(0) NULL DEFAULT NULL COMMENT '借书证状态',
`number` int(0) NULL DEFAULT NULL COMMENT '已借书的数量',
`totalNumber` int(0) NULL DEFAULT 3,
PRIMARY KEY (`Cardid`) USING BTREE,
INDEX `Cardid`(`Cardid`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of librarycard
-- ----------------------------
INSERT INTO `librarycard` VALUES ('card00001', '许仙', 1, 1, 1);
INSERT INTO `librarycard` VALUES ('card00002', '小秋', 1, 0, 3);
INSERT INTO `librarycard` VALUES ('card00003', 'a', 2, 0, 3);
INSERT INTO `librarycard` VALUES ('card00004', 'a', 2, 0, 3);
INSERT INTO `librarycard` VALUES ('card00005', 'a', 1, 0, 3);
-- ----------------------------
-- Table structure for member
-- ----------------------------
DROP TABLE IF EXISTS `member`;
CREATE TABLE `member` (
`memid` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,
`memname` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,
`state` int(0) NOT NULL,
`grade` int(0) NOT NULL,
PRIMARY KEY (`memid`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of member
-- ----------------------------
INSERT INTO `member` VALUES ('id00001', '许仙', 1, 1);
INSERT INTO `member` VALUES ('id00002', 'aa', 1, 3);
INSERT INTO `member` VALUES ('id00003', '0', 2, 1);
INSERT INTO `member` VALUES ('id00004', '00', 1, 1);
INSERT INTO `member` VALUES ('id00005', 'xu', 1, 1);
INSERT INTO `member` VALUES ('id00006', '小秋', 1, 1);
INSERT INTO `member` VALUES ('id00007', 'q', 1, 2);
-- ----------------------------
-- Table structure for question_info
-- ----------------------------
DROP TABLE IF EXISTS `question_info`;
CREATE TABLE `question_info` (
`questionId` int(0) NOT NULL COMMENT '主键,试题编号',
`question` varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '题干',
`optionA` varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '选项A',
`optionB` varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '选项B',
`optionC` varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '选项C',
`optionD` varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '选项D',
`subject` int(0) NOT NULL COMMENT '科目(1代表java,2代表C#,3代表JSP)',
`answer` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '正确答案',
PRIMARY KEY (`questionId`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of question_info
-- ----------------------------
INSERT INTO `question_info` VALUES (1, '2', '1', '1', '1', '1', 0, 'a');
INSERT INTO `question_info` VALUES (2, 'java是什么', 'java', '咖啡', '语言', '掉头发', 1, 'D');
INSERT INTO `question_info` VALUES (3, 'jsp由什么构成', 'jsp是一个单词', 'jsp是由J、S、P组成的', 'jsp就是jsp', 'jsp是底层网页语言', 3, 'B');
-- ----------------------------
-- Table structure for upanddown
-- ----------------------------
DROP TABLE IF EXISTS `upanddown`;
CREATE TABLE `upanddown` (
`udid` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '上下机编号',
`memid` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '会员编号',
`cptid` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '电脑编号',
`update` datetime(0) NOT NULL COMMENT '上机时间',
`downdate` datetime(0) NULL DEFAULT NULL COMMENT '下机时间',
`money` decimal(6, 2) NULL DEFAULT NULL COMMENT '上网金额',
`empid1` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT ' 员工编号(办理上机ID)',
`empid2` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '员工编号(办理下机ID)',
PRIMARY KEY (`udid`) USING BTREE,
INDEX `FK_memid`(`memid`) USING BTREE,
INDEX `FK_cptid`(`cptid`) USING BTREE,
INDEX `FK_empid11`(`empid1`) USING BTREE,
INDEX `FK_empid12`(`empid2`) USING BTREE,
CONSTRAINT `FK_cptid` FOREIGN KEY (`cptid`) REFERENCES `computer` (`cptid`) ON DELETE RESTRICT ON UPDATE RESTRICT,
CONSTRAINT `FK_empid11` FOREIGN KEY (`empid1`) REFERENCES `employee` (`Empid`) ON DELETE RESTRICT ON UPDATE RESTRICT,
CONSTRAINT `FK_empid12` FOREIGN KEY (`empid2`) REFERENCES `employee` (`Empid`) ON DELETE RESTRICT ON UPDATE RESTRICT,
CONSTRAINT `FK_memid` FOREIGN KEY (`memid`) REFERENCES `member` (`memid`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of upanddown
-- ----------------------------
INSERT INTO `upanddown` VALUES ('emp', 'id00001', 'cpt04', '2020-08-16 19:30:00', '2020-08-17 23:56:54', 50.00, 'emp2017001', 'emp2020001');
INSERT INTO `upanddown` VALUES ('ud2020081001', 'id00005', 'cpt03', '2020-08-17 22:19:52', '2020-08-18 00:00:29', 0.00, 'emp2020001', 'emp2020002');
INSERT INTO `upanddown` VALUES ('ud2020081002', 'id00001', 'cpt03', '2020-08-17 22:23:42', '2020-08-17 23:57:39', 50.00, 'emp2017001', 'emp2020001');
INSERT INTO `upanddown` VALUES ('ud2020082001', 'id00005', 'cpt03', '2020-08-18 00:02:26', '2020-08-18 15:10:52', 30.27, 'emp2020002', 'emp2020002');
INSERT INTO `upanddown` VALUES ('ud2020082002', 'id00005', 'cpt02', '2020-08-18 15:11:44', '2020-08-18 15:11:46', 0.00, 'emp2020002', 'emp2020002');
INSERT INTO `upanddown` VALUES ('ud2020082003', 'id00005', 'cpt01', '2020-08-18 15:40:00', '2020-08-18 15:51:27', 0.37, 'emp2020002', 'emp2020002');
INSERT INTO `upanddown` VALUES ('ud2020082004', 'id00001', 'cpt02', '2020-08-18 15:51:38', '2020-08-18 15:51:45', 0.00, 'emp2020002', 'emp2020002');
INSERT INTO `upanddown` VALUES ('ud2020082005', 'id00001', 'cpt03', '2020-08-18 15:52:13', '2020-08-18 17:02:57', 2.33, 'emp2017001', 'emp2020002');
INSERT INTO `upanddown` VALUES ('ud2020083001', 'id00005', 'cpt02', '2020-08-19 08:44:50', '2020-08-19 08:46:16', 0.03, 'emp2020002', 'emp2020002');
INSERT INTO `upanddown` VALUES ('ud2020083002', 'id00005', 'cpt02', '2020-08-19 08:46:54', NULL, NULL, 'emp2020002', NULL);
INSERT INTO `upanddown` VALUES ('ud2020083003', 'id00001', 'cpt05', '2020-08-19 08:47:45', NULL, NULL, 'emp2020002', NULL);
INSERT INTO `upanddown` VALUES ('ud2020083004', 'id00004', 'cpt01', '2020-08-19 08:50:50', NULL, NULL, 'emp2020002', NULL);
INSERT INTO `upanddown` VALUES ('ud2020083005', 'id00002', 'cpt06', '2020-08-19 08:51:17', NULL, NULL, 'emp2020002', NULL);
INSERT INTO `upanddown` VALUES ('ud2020083006', 'id00006', 'cpt03', '2020-08-19 11:11:56', NULL, NULL, 'emp2020002', NULL);
SET FOREIGN_KEY_CHECKS = 1;
|
ALTER TABLE dbo.TblOfferline ADD IsOrdered bit DEFAULT ((0)); |
DROP DATABASE IF EXISTS bamazon;
CREATE DATABASE bamazon;
use bamazon;
-- DROP TABLE IF EXISTS products;
CREATE TABLE products (
item_id INT NOT NULL UNIQUE AUTO_INCREMENT,
product_name VARCHAR(100) NOT NULL,
department_name VARCHAR(100) NOT NULL,
price DECIMAL(8,2) NOT NULL,
stock_quantity INT NOT NULL,
product_sales DECIMAL(16,2) DEFAULT 0,
PRIMARY KEY(item_id)
);
-- DROP TABLE IF EXISTS departments;
CREATE TABLE departments (
id INT NOT NULL UNIQUE AUTO_INCREMENT,
name VARCHAR(100) NOT NULL,
over_head_costs DECIMAL(10,2) NOT NULL,
PRIMARY KEY(id)
); |
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 24, 2021 at 09:25 PM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.2.29
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
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: `web2021`
--
-- --------------------------------------------------------
--
-- Table structure for table `headers`
--
CREATE TABLE `headers` (
`startedDateTime` timestamp NULL DEFAULT NULL,
`contenttype` varchar(255) DEFAULT NULL,
`cachecontrol` varchar(255) DEFAULT NULL,
`pragma` varchar(255) DEFAULT NULL,
`expires` timestamp NULL DEFAULT NULL,
`age` int(11) DEFAULT NULL,
`lastmodified` timestamp NULL DEFAULT NULL,
`wait` float DEFAULT NULL,
`method` varchar(255) DEFAULT NULL,
`isp` varchar(255) DEFAULT NULL,
`req_contenttype` varchar(255) DEFAULT NULL,
`req_cachecontrol` varchar(255) DEFAULT NULL,
`req_pragma` varchar(255) DEFAULT NULL,
`req_age` int(11) DEFAULT NULL,
`req_host` varchar(255) DEFAULT NULL,
`server_lat` float DEFAULT NULL,
`server_lon` float DEFAULT NULL,
`latitude` float DEFAULT NULL,
`longitude` float DEFAULT NULL,
`headers_id` int(11) NOT NULL,
`userid` int(11) NOT NULL,
`a_inc` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- --------------------------------------------------------
--
-- Table structure for table `userdata`
--
CREATE TABLE `userdata` (
`serverIPAddress` varchar(255) DEFAULT NULL,
`url` varchar(255) DEFAULT NULL,
`status` varchar(255) DEFAULT NULL,
`statusText` varchar(255) DEFAULT NULL,
`userid` int(11) DEFAULT NULL,
`headers_id` int(11) NOT NULL,
`a_inc` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- --------------------------------------------------------
--
-- Table structure for table `users`
--
CREATE TABLE `users` (
`id` int(11) NOT NULL,
`username` varchar(255) NOT NULL,
`email` varchar(255) NOT NULL,
`password` varchar(255) NOT NULL,
`last_upload` date DEFAULT NULL,
`admin` int(11) NOT NULL DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Indexes for dumped tables
--
--
-- Indexes for table `headers`
--
ALTER TABLE `headers`
ADD PRIMARY KEY (`a_inc`),
ADD KEY `userid` (`userid`),
ADD KEY `headers_id` (`headers_id`) USING BTREE;
--
-- Indexes for table `userdata`
--
ALTER TABLE `userdata`
ADD PRIMARY KEY (`a_inc`),
ADD KEY `headers_id` (`headers_id`) USING BTREE,
ADD KEY `userid` (`userid`);
--
-- Indexes for table `users`
--
ALTER TABLE `users`
ADD PRIMARY KEY (`id`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `headers`
--
ALTER TABLE `headers`
MODIFY `a_inc` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `userdata`
--
ALTER TABLE `userdata`
MODIFY `a_inc` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `users`
--
ALTER TABLE `users`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- Constraints for dumped tables
--
--
-- Constraints for table `headers`
--
ALTER TABLE `headers`
ADD CONSTRAINT `headers_ibfk_2` FOREIGN KEY (`headers_id`) REFERENCES `userdata` (`headers_id`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `headers_ibfk_3` FOREIGN KEY (`userid`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Constraints for table `userdata`
--
ALTER TABLE `userdata`
ADD CONSTRAINT `userdata_ibfk_1` FOREIGN KEY (`userid`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
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 */;
|
spool acertos.log
set echo on
create user APP_DBA identified by values '6E4702300F3B63DE' default tablespace USER_DATA temporary tablespace TEMP;
create user DB_ONLINE identified by values 'D15FAE9257A53E4C' default tablespace USER_DATA temporary tablespace TEMP;
create user DB_OPERATOR identified by values 'A003FD1888C46F03' default tablespace USER_DATA temporary tablespace TEMP;
create user OPERADOR identified by values '33867263782462E8' default tablespace USER_DATA temporary tablespace TEMP;
create user FINPAC_CP identified by values '8DE8FBA773DFD0BE' default tablespace USER_DATA temporary tablespace TEMP;
create user BCSCADASTRO identified by values '5B83847A82CD2AAE' default tablespace USER_DATA temporary tablespace TEMP;
create user VBUAS identified by values 'E83712833DE383FC' default tablespace USER_DATA temporary tablespace TEMP;
create user LVLIMA identified by values 'EA57C54B4A4C4C60' default tablespace USER_DATA temporary tablespace TEMP;
--create user COMISSAO2 identified by values C0M1SSA02 default tablespace USER_DATA temporary tablespace TEMP;
spool off |
/*
Navicat MySQL Data Transfer
Source Server : Eric
Source Server Version : 50552
Source Host : localhost:3306
Source Database : shopping
Target Server Type : MYSQL
Target Server Version : 50552
File Encoding : 65001
Date: 2017-06-02 23:01:35
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for goods
-- ----------------------------
DROP TABLE IF EXISTS `goods`;
CREATE TABLE `goods` (
`goodsId` int(11) NOT NULL AUTO_INCREMENT,
`goodsName` varchar(20) NOT NULL,
`goodsPrice` double NOT NULL,
`goodsStock` int(11) NOT NULL,
`goodsDesc` text,
`goodsShelfTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`goodsHits` bigint(20) NOT NULL,
`goodsSales` bigint(20) NOT NULL,
`goodsPic` text NOT NULL,
PRIMARY KEY (`goodsId`)
) ENGINE=InnoDB AUTO_INCREMENT=4032 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of goods
-- ----------------------------
INSERT INTO `goods` VALUES ('1001', '苹果', '10', '1000', '洛川苹果 陕西红富士苹果 约14.5斤 40枚', '2017-05-25 10:58:07', '0', '2', 'image/fruit/apple.jpg');
INSERT INTO `goods` VALUES ('1002', '梨子', '11', '1000', '新疆库尔勒精选香梨1kg', '2017-05-15 20:30:40', '0', '1', 'image/fruit/pear.jpg');
INSERT INTO `goods` VALUES ('1003', '奇异果', '12', '1000', 'Zespri佳沛新西兰阳光金奇异果6个', '2017-05-15 20:30:47', '0', '0', 'image/fruit/kiwi.jpg');
INSERT INTO `goods` VALUES ('1004', '柠檬', '13', '1000', '四川优选黄柠檬4个约80g/个', '2017-05-15 20:30:53', '0', '0', 'image/fruit/lemon.jpg');
INSERT INTO `goods` VALUES ('1005', '橙', '14', '1000', '湖北伦晚脐橙1kg约140g/个橙子', '2017-05-15 20:31:03', '0', '0', 'image/fruit/orange.jpg');
INSERT INTO `goods` VALUES ('1006', '芒果', '15', '1000', '海南小台农芒果1kg 新鲜水果', '2017-05-15 20:31:10', '0', '0', 'image/fruit/mango.jpg');
INSERT INTO `goods` VALUES ('2001', '曲奇', '80', '1000', '卜珂蔓越莓黄油曲奇饼干200g*5美食糕点心零食', '2017-05-15 20:33:17', '0', '0', 'image/snacks/cookies.jpg');
INSERT INTO `goods` VALUES ('2002', '核桃', '24', '1000', '西域美农新疆薄皮核桃250g非纸皮核桃坚果炒货', '2017-05-15 20:33:26', '0', '0', 'image/snacks/nut.jpg');
INSERT INTO `goods` VALUES ('2003', '豆干', '75', '1000', '徽家铺子素肉豆干三明治麻辣味超值组合装750g', '2017-05-15 20:59:55', '0', '0', 'image/snacks/tufo.jpg');
INSERT INTO `goods` VALUES ('2004', '核桃', '23', '1000', '新疆薄皮核桃250g非纸皮核桃坚果炒货', '2017-05-21 14:24:54', '0', '0', 'image/snacks/nut.jpg');
INSERT INTO `goods` VALUES ('2005', '棒棒糖', '25', '1000', '不二家果味棒棒糖 儿童糖果零食喜糖', '2017-05-25 12:52:59', '0', '0', 'image/snacks/lollipop.jpg');
INSERT INTO `goods` VALUES ('2006', '大白兔原味奶糖', '27', '1000', '大白兔 原味奶糖454g/袋 童年的味道', '2017-05-23 22:25:37', '0', '0', 'image/snacks/rabbit.jpg');
INSERT INTO `goods` VALUES ('3001', '牛排', '40', '1000', '澳洲小公牛嫩肩牛排200g(2片) 原切牛排', '2017-05-15 21:08:31', '0', '0', 'image/meat/steak.jpg');
INSERT INTO `goods` VALUES ('3002', '牛腩', '40', '1000', '澳洲精选S级牛腩块500g', '2017-05-23 22:24:15', '0', '0', 'image/meat/sirloin.jpg');
INSERT INTO `goods` VALUES ('3003', '牛腩1', '40', '1000', '澳洲精选S级牛腩块500g', '2017-05-23 22:24:19', '0', '0', 'image/meat/sirloin.jpg');
INSERT INTO `goods` VALUES ('3004', '牛排', '44', '1000', '澳洲小公牛嫩肩牛排200g(2片) 原切牛排', '2017-05-15 22:40:56', '0', '0', 'image/meat/steak.jpg');
INSERT INTO `goods` VALUES ('3005', '肥牛', '39', '1000', '澳洲肥牛卷350g 火锅食材', '2017-05-21 14:21:28', '0', '0', 'image/meat/beefFat.jpg');
INSERT INTO `goods` VALUES ('3006', '肥牛1', '38', '1000', '澳洲肥牛卷350g 火锅食材', '2017-05-21 14:23:47', '0', '0', 'image/meat/beefFat.jpg');
INSERT INTO `goods` VALUES ('3007', '猪脊骨', '10', '1000', '丹麦皇冠猪净脊骨段400g', '2017-05-21 14:29:51', '0', '0', 'image/meat/bone.jpg');
INSERT INTO `goods` VALUES ('3008', '牛肉片', '25', '1000', '科尔沁澳洲牛肉片150g', '2017-05-21 14:32:04', '0', '0', 'image/meat/slices.jpg');
INSERT INTO `goods` VALUES ('3009', '牛肋骨', '35', '1000', '伊赛西门塔尔牛肋排段500g牛肉', '2017-05-21 14:35:07', '0', '0', 'image/meat/cattleBone.jpg');
INSERT INTO `goods` VALUES ('4001', '从你的全世界路过', '25', '200', '从你的全世界路过 作者张嘉佳 青春励志文学畅销书籍', '2017-05-25 12:51:53', '0', '0', 'image/book/book1.jpg');
INSERT INTO `goods` VALUES ('4002', '解忧杂货店', '27', '100', '解忧杂货店 文学救赎励志心理学读物', '2017-05-25 12:51:04', '0', '0', 'image/book/book2.jpg');
INSERT INTO `goods` VALUES ('4003', '小王子', '16', '100', '小王子 中文版 外国小说', '2017-05-25 12:50:41', '0', '0', 'image/book/book3.jpg');
INSERT INTO `goods` VALUES ('4004', '摆渡人', '17', '100', '摆渡人 现代当代外国读物散文随笔畅销书', '2017-05-25 12:53:34', '0', '0', 'image/book/book4.jpg');
INSERT INTO `goods` VALUES ('4005', '给孩子读诗', '40', '100', '给孩子读诗 《朗读者读给孩子的诗散文', '2017-05-25 12:49:34', '0', '0', 'image/book/book5.jpg');
INSERT INTO `goods` VALUES ('4007', '洗衣液', '89', '1000', '蓝月亮洗衣液 自然清香 深层洁净衣物护理 1kg/瓶装', '2017-05-21 14:21:28', '1', '1', 'image/clean/blueMoon.jpg');
INSERT INTO `goods` VALUES ('4008', '洗洁精', '11', '1000', '立白柠檬去油洗洁精1.5kg瓶装不伤手食品用蔬果净', '2017-05-21 14:21:28', '1', '1', 'image/clean/libai.jpg');
INSERT INTO `goods` VALUES ('4009', '百洁布', '11', '1000', '海绵百洁擦抹布洗碗布 8片特惠装 油污专用吸水', '2017-05-21 14:21:28', '1', '1', 'image/clean/miaojie.jpg');
INSERT INTO `goods` VALUES ('4010', '蚊香', '11', '1000', '榄菊 无烟型蚊香40盘/盒送蚊香座 盘香防蚊驱蚊', '2017-05-21 14:21:28', '1', '1', 'image/clean/wenxiang.jpg');
INSERT INTO `goods` VALUES ('4011', '洗衣皂液', '29', '1000', '妈妈壹选 一次漂清洗护合一天然洗衣皂液倍柔清香1kg', '2017-05-25 10:40:36', '1', '1', 'image/clean/soap.jpg');
INSERT INTO `goods` VALUES ('4012', '消毒液', '66', '1000', '威露士衣物家居除菌消毒液3x1L送3支60ml合计3.18L', '2017-05-25 10:40:49', '1', '1', 'image/clean/disinfectant.jpg');
INSERT INTO `goods` VALUES ('4013', '软包抽纸', '15', '1000', '维达超韧系列软包抽纸3层130抽6包面巾纸 小幅纸巾', '2017-05-25 11:12:28', '1', '1', 'image/paper/weida.jpg');
INSERT INTO `goods` VALUES ('4014', '芯卷纸', '51', '1000', '维达蓝色经典系列卫生纸巾3层140g27卷有芯卷纸 箱装', '2017-05-25 11:12:31', '1', '1', 'image/paper/weida2.jpg');
INSERT INTO `goods` VALUES ('4015', '手帕纸', '28', '1000', '维达 超韧系列手帕纸 4层8张60包纸巾(无香型)', '2017-05-25 11:12:34', '1', '1', 'image/paper/weida3.jpg');
INSERT INTO `goods` VALUES ('4016', '手帕纸', '27', '1000', '得宝手帕纸4层加厚7张36包 天然无香 无纸屑有品位', '2017-05-25 11:12:38', '1', '1', 'image/paper/tempo.jpg');
INSERT INTO `goods` VALUES ('4017', '抽纸', '59.9', '1000', '清风抽纸 原木金装3层140抽*24包中规面纸巾整箱', '2017-05-25 11:12:41', '1', '1', 'image/paper/qingfeng.jpg');
INSERT INTO `goods` VALUES ('4018', '湿厕纸', '38.9', '1000', '维达湿厕纸40片/包*3包 无纺布可冲入马桶 杀菌洁肤', '2017-05-25 11:17:48', '1', '1', 'image/clean/toiletPaper.jpg');
INSERT INTO `goods` VALUES ('4019', '厨房纸巾', '12.9', '1000', '五月花厨房纸巾3卷*120张 厨房专用 吸油吸水超值', '2017-05-25 11:17:53', '1', '1', 'image/clean/paper.jpg');
INSERT INTO `goods` VALUES ('4020', '厨房纸巾', '16.9', '1000', '洁柔厨房用纸 天然无香吸油吸水料理纸巾2层2卷纸巾', '2017-05-25 12:28:31', '1', '1', 'image/clean/paper2.jpg');
INSERT INTO `goods` VALUES ('4021', '洁面乳', '78.9', '1000', '加拿大进口Cetaphil/丝塔芙洁面乳473ml洗面奶家庭装', '2017-05-25 12:29:34', '1', '1', 'image/facial/cetaphil.jpg');
INSERT INTO `goods` VALUES ('4022', '黑人牙膏', '13.8', '1000', '黑人牙膏双重薄荷225g去口臭清新口气防蛀天然正品', '2017-05-21 14:21:28', '1', '1', 'image/paper/toothpaste1.jpg');
INSERT INTO `goods` VALUES ('4023', '儿童牙膏', '10.9', '1000', '德国进口el-c儿童牙膏6-12岁换牙期防蛀低泡75ml90克', '2017-05-25 21:16:38', '1', '1', 'image/paper/toothpaste2.jpg');
INSERT INTO `goods` VALUES ('4024', '佳洁士牙膏', '11.9', '1000', '佳洁士牙膏 3D炫白去牙渍美白晨露荷香清新口气180g', '2017-05-21 14:21:28', '1', '1', 'image/paper/toothpaste3.jpg');
INSERT INTO `goods` VALUES ('4025', '黑人牙膏', '13.9', '1000', '黑人牙膏茶倍健190g持久清新口气固齿防蛀去除牙菌斑', '2017-05-21 14:21:28', '1', '1', 'image/paper/toothpaste4.jpg');
INSERT INTO `goods` VALUES ('4026', '纯棉毛巾', '49', '1000', '孚日洁玉纯棉毛巾4条装成人洗脸全棉柔软吸水面巾', '2017-05-21 14:21:28', '1', '1', 'image/paper/towel1.jpg');
INSERT INTO `goods` VALUES ('4027', '毛巾', '10.9', '1000', '金号毛巾 纯棉无捻纱条纹情侣 加厚柔软面巾一条装', '2017-05-25 12:37:13', '1', '1', 'image/paper/towel2.jpg');
INSERT INTO `goods` VALUES ('4028', '儿童毛巾', '7.9', '1000', '洁丽雅纯棉可爱小熊儿童毛巾1条 健康童巾毛巾', '2017-05-25 12:38:03', '1', '1', 'image/paper/towel3.jpg');
INSERT INTO `goods` VALUES ('4029', '测试6', '1022', '222', '测试55', '2017-05-21 14:21:28', '1', '1', '1000');
INSERT INTO `goods` VALUES ('4030', 'test', '59.9', '1000', 'tes', '2017-05-21 14:21:28', '1', '1', 'image/clean/qingfeng.jpg');
INSERT INTO `goods` VALUES ('4031', 'test', '59.9', '1000', 'tes', '2017-05-26 14:21:28', '1', '1', 'image/clean/qingfeng.jpg');
|
DROP TABLE IF EXISTS users;
CREATE TABLE users
(
userId VARCHAR(64) PRIMARY KEY,
email VARCHAR(64) NOT NULL,
firstName VARCHAR(64) NOT NULL,
lastName VARCHAR(64) NOT NULL,
studentId INTEGER,
isEmailVerified BOOL NOT NULL
); |
-- MySQL dump 10.13 Distrib 8.0.26, for Win64 (x86_64)
--
-- Host: localhost Database: northwind
-- ------------------------------------------------------
-- Server version 8.0.26
/*!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 `shippers`
--
DROP TABLE IF EXISTS `shippers`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `shippers` (
`ShipperID` int NOT NULL AUTO_INCREMENT,
`CompanyName` varchar(40) NOT NULL,
`Phone` varchar(24) DEFAULT NULL,
PRIMARY KEY (`ShipperID`)
) 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 `shippers`
--
LOCK TABLES `shippers` WRITE;
/*!40000 ALTER TABLE `shippers` DISABLE KEYS */;
INSERT INTO `shippers` VALUES (1,'Speedy Express','(503) 555-9831'),(2,'United Package','(503) 555-3199'),(3,'Federal Shipping','(503) 555-9931');
/*!40000 ALTER TABLE `shippers` 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 2021-08-31 12:53:54
|
DROP DATABASE IF EXISTS taskbar_db;
CREATE DATABASE taskbar_db;
USE taskbar_db;
CREATE TABLE taskbar
(
id int NOT NULL,
AUTO_INCREMENT INTEGER,
task varchar
(255) NOT NULL,
done BOOLEAN DEFAULT false,
PRIMARY KEY
(id)
);
|
CREATE DATABASE IF NOT EXISTS `restaurant` /*!40100 DEFAULT CHARACTER SET utf8 */;
USE `restaurant`;
-- MySQL dump 10.13 Distrib 5.6.23, for Win64 (x86_64)
--
-- Host: 127.0.0.1 Database: restaurant
-- ------------------------------------------------------
-- Server version 5.5.5-10.1.26-MariaDB
/*!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 `food`
--
DROP TABLE IF EXISTS `food`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `food` (
`food_id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(45) NOT NULL,
`type` int(11) NOT NULL,
`price` decimal(7,2) NOT NULL,
`photo` varchar(255) DEFAULT NULL,
PRIMARY KEY (`food_id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `ingredient`
--
DROP TABLE IF EXISTS `ingredient`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ingredient` (
`ingredient_id` int(11) NOT NULL AUTO_INCREMENT,
`food_id` int(11) NOT NULL,
`item_id` int(11) NOT NULL,
`quantity` int(11) NOT NULL,
PRIMARY KEY (`ingredient_id`),
KEY `FK_ingredient_food_id_idx` (`food_id`),
KEY `FK_ingredient_item_id_idx` (`item_id`),
CONSTRAINT `FK_ingredient_food_id` FOREIGN KEY (`food_id`) REFERENCES `food` (`food_id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `FK_ingredient_item_id` FOREIGN KEY (`item_id`) REFERENCES `inventory` (`item_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `inventory`
--
DROP TABLE IF EXISTS `inventory`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `inventory` (
`item_id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(45) NOT NULL,
`quantity` int(11) NOT NULL,
PRIMARY KEY (`item_id`),
UNIQUE KEY `name_UNIQUE` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `order`
--
DROP TABLE IF EXISTS `order`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `order` (
`order_id` int(11) NOT NULL AUTO_INCREMENT,
`table_id` int(11) NOT NULL,
`food_id` int(11) NOT NULL,
`quantity` int(11) NOT NULL,
`prepared` tinyint(1) NOT NULL DEFAULT '0',
`order_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`paid_at` datetime DEFAULT NULL,
PRIMARY KEY (`order_id`),
KEY `FK_order_food_id_idx` (`food_id`),
KEY `FK_order_table_id_idx` (`table_id`),
CONSTRAINT `FK_order_food_id` FOREIGN KEY (`food_id`) REFERENCES `food` (`food_id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `FK_order_table_id` FOREIGN KEY (`table_id`) REFERENCES `table` (`table_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `reservation`
--
DROP TABLE IF EXISTS `reservation`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `reservation` (
`reserve_id` int(11) NOT NULL AUTO_INCREMENT,
`firstname` varchar(45) NOT NULL,
`phone` char(8) NOT NULL,
`customer` int(11) NOT NULL,
`reserved_date` datetime NOT NULL,
`reserve_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`lat` decimal(10,8) NOT NULL,
`lng` decimal(11,8) NOT NULL,
PRIMARY KEY (`reserve_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `table`
--
DROP TABLE IF EXISTS `table`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `table` (
`table_id` int(11) NOT NULL AUTO_INCREMENT,
`table_num` char(3) NOT NULL,
`customer` int(11) NOT NULL,
`using` tinyint(1) NOT NULL DEFAULT '1',
PRIMARY KEY (`table_id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 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` (
`user_id` int(11) NOT NULL AUTO_INCREMENT,
`username` varchar(45) NOT NULL,
`password` char(64) NOT NULL,
`salt` char(16) NOT NULL,
`name` varchar(45) NOT NULL,
`privilege` int(11) NOT NULL,
`locked` tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`user_id`),
UNIQUE KEY `username_UNIQUE` (`username`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping routines for database 'restaurant'
--
/*!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 2018-05-11 2:55:09
|
-- Add Current Month Data
INSERT INTO `current_month_data` (`id`, `monthly_amount_spent`,`monthly_frequency`) VALUES (1, 1000, 4);
INSERT INTO `current_month_data` (`id`, `monthly_amount_spent`,`monthly_frequency`) VALUES (2, 2000, 4);
INSERT INTO `current_month_data` (`id`, `monthly_amount_spent`,`monthly_frequency`) VALUES (3, 3000, 20);
INSERT INTO `current_month_data` (`id`, `monthly_amount_spent`,`monthly_frequency`) VALUES (4, 4000, 4);
-- Add Monthly Aggregated Data
INSERT INTO `monthly_aggregated_data` (`id`, `avg_monthly_frequency`,`avg_monthly_spent_amount`) VALUES (1, 40, 2000);
INSERT INTO `monthly_aggregated_data` (`id`, `avg_monthly_frequency`,`avg_monthly_spent_amount`) VALUES (2, 30, 4000);
INSERT INTO `monthly_aggregated_data` (`id`, `avg_monthly_frequency`,`avg_monthly_spent_amount`) VALUES (3, 20, 4330);
INSERT INTO `monthly_aggregated_data` (`id`, `avg_monthly_frequency`,`avg_monthly_spent_amount`) VALUES (4, 40, 4111);
-- Add Customer Data
INSERT INTO `customer` (`customer_id`, `monthly_aggregated_data_id`, `current_month_data_id`, `billing_name`, `daily_spend_limit`, `daily_allowed_frequency`) VALUES (1,1,1,'Customer1', 200, 5);
INSERT INTO `customer` (`customer_id`, `monthly_aggregated_data_id`, `current_month_data_id`, `billing_name`, `daily_spend_limit`, `daily_allowed_frequency`) VALUES (2,2,2,'Customer2', 200, 10);
INSERT INTO `customer` (`customer_id`, `monthly_aggregated_data_id`, `current_month_data_id`, `billing_name`, `daily_spend_limit`, `daily_allowed_frequency`) VALUES (3,3,3,'Customer3', 300, 10);
INSERT INTO `customer` (`customer_id`, `monthly_aggregated_data_id`, `current_month_data_id`, `billing_name`, `daily_spend_limit`, `daily_allowed_frequency`) VALUES (4,4,4,'Customer4', 400, 5);
|
INSERT INTO `pay_the_fees` VALUES (1, 1, '2019-12-22 20:15:52', 300);
INSERT INTO `pay_the_fees` VALUES (2, 2, '2019-11-07 20:16:27', 500);
INSERT INTO `pay_the_fees` VALUES (3, 4, '2019-12-02 20:17:00', 600);
|
CREATE PROCEDURE `createOffice` (IN `office_id` INT(8), IN `office_location` VARCHAR(50), IN `name` VARCHAR(50), IN `address` VARCHAR(50), IN `image` MEDIUMBLOB)
BEGIN
INSERT INTO `office` (`office_id`, `office_location`, `name`, `address`, `office_photo`)
VALUES (`office_id`, `office_location`, `name`, `address`, `image`);
END
CREATE PROCEDURE `deleteOffice` (IN `id` INT(8), IN `location` VARCHAR(50))
BEGIN
DELETE FROM `office` WHERE (`office_location` = `location`) AND (`office_id` = `id`);
END
CREATE PROCEDURE `updateOffice` (IN `id` INT(8), IN `city` VARCHAR(50), IN `newName` VARCHAR(50), IN `newAddress` VARCHAR(50), IN `originalId` INT(8), IN `originalCity` VARCHAR(50), IN `image` MEDIUMBLOB)
BEGIN
UPDATE `office`
SET `office_location` = `city`, `name` = `newName`, `office_id` = `id`, `address` = `newAddress`, `office_photo` = `image`
WHERE `office_id` = `originalId` AND `office_location` = `originalCity`;
END
CREATE PROCEDURE `deleteDesksFloorsOffice`(IN `id` INT(8), IN `location` VARCHAR(50))
BEGIN
DELETE from desk where desk.fk_office_id = `id` AND desk.fk_office_location = `location`;
DELETE from floor where floor.fk_office_id = `id` AND floor.fk_office_location = `location`;
DELETE from office where office.office_id = `id` AND office.office_location = `location`;
END |
CREATE TABLE users (
id UUID PRIMARY KEY,
email VARCHAR NOT NULL,
password_hash VARCHAR NOT NULL,
referral_code VARCHAR DEFAULT NULL,
date_of_birth DATE NOT NULL,
UNIQUE (email)
);
-- insert some data
INSERT INTO users
VALUES ('2f09f05a-4869-4a31-8f99-b83f298c2c94', 'alice@example.com', 'pwdhash', NULL, '1990-05-01');
INSERT INTO users
VALUES ('b6d6b4cd-da9f-4341-87b9-0e1224febb93', 'bob@example.com', 'pwdhash', 'promo123', '2000-11-22');
CREATE TABLE verifications (
id SERIAL PRIMARY KEY,
user_id UUID NOT NULL REFERENCES users (id),
status VARCHAR NOT NULL,
verification_type VARCHAR NOT NULL,
created_at TIMESTAMPTZ NOT NULL
); |
DROP TABLE public.book_book_category; |
CREATE TABLE `comment` (
`id` bigint(255) NOT NULL AUTO_INCREMENT,
`parent_id` bigint(255) NOT NULL COMMENT '这是评论所属的问题id',
`type` int(11) NOT NULL COMMENT '是1级评论还是2级评论',
`content` varchar(1024) NOT NULL,
`commentator` int(11) NOT NULL COMMENT '评论人',
`gmt_create` bigint(255) NOT NULL,
`gmt_modified` bigint(255) NOT NULL,
`like_count` bigint(255) DEFAULT 0,
PRIMARY KEY (`id`)
) ENGINE = InnoDB CHARACTER SET = utf8; |
CREATE TABLE `adimin` (
`admin-id` int(11) NOT NULL AUTO_INCREMENT,
`account` varchar(20) NOT NULL,
`password` varchar(20) NOT NULL,
`name` varchar(20) NOT NULL,
`group` varchar(20) DEFAULT NULL,
PRIMARY KEY (`admin-id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 PACK_KEYS=0;
|
CREATE PROC [ERP].[Usp_Sel_RendirCuenta_By_ID]
@IdRendirCuenta INT
AS
BEGIN
SELECT MRC.ID
,MRC.IdMovimientoTesoreria
,MRC.Orden OrdenRendirCuenta
,MRC.Total
,MRC.ToTalGastado
,MRC.Flag
,MRC.FlagCierre
,MRC.FlagBorrador
,MRC.IdPeriodo
,MRC.IdEmpresa
,MRC.FechaEmision
,MRC.TipoCambio
,MRC.FechaRegistro
,MRC.FechaModificado
,MRC.UsuarioModifico
,MRC.UsuarioRegistro
,MT.Orden OrdenMovimiento
,MT.Nombre NombreMovimiento
,MT.IdCuenta
,C.IdMoneda
,(SELECT [ERP].[ObtenerNombreBancoMonedaTipo_By_IdCuenta](C.ID)) NombreBancoMonedaTipo
FROM ERP.MovimientoRendirCuenta MRC
INNER JOIN ERP.MovimientoTesoreria MT ON MT.ID = MRC.IdMovimientoTesoreria
INNER JOIN ERP.Cuenta C ON C.ID = MT.IdCuenta
WHERE MRC.ID = @IdRendirCuenta
END
|
-- phpMyAdmin SQL Dump
-- version 4.0.4
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: May 16, 2014 at 09:16 PM
-- Server version: 5.6.12-log
-- PHP Version: 5.4.16
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: `user_management`
--
CREATE DATABASE IF NOT EXISTS `user_management` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
USE `user_management`;
-- --------------------------------------------------------
--
-- Table structure for table `um_user`
--
CREATE TABLE IF NOT EXISTS `um_user` (
`user_id` int(11) NOT NULL AUTO_INCREMENT,
`fullname` varchar(100) NOT NULL,
`username` varchar(100) NOT NULL,
`email` varchar(100) NOT NULL,
`password` varchar(100) NOT NULL,
PRIMARY KEY (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=599547 ;
--
-- Dumping data for table `um_user`
--
INSERT INTO `um_user` (`user_id`, `fullname`, `username`, `email`, `password`) VALUES
(1, 'Merritt Floyd', 'Lionel', 'et.euismod.et@purusaccumsaninterdum.org', '7106ZV'),
(2, 'Kermit Roberson', 'Evan', 'magna.Sed@antebibendumullamcorper.co.uk', 'E5T 6E4'),
(3, 'Graiden Yang', 'Magee', 'ornare.lectus.ante@mieleifend.co.uk', '71201'),
(4, 'Colt Sandoval', 'Rigel', 'ipsum.dolor@Proin.ca', '1262'),
(5, 'Zeph Buckner', 'Camden', 'egestas.Sed@aliquam.net', '0646MC'),
(6, 'Nash Franco', 'Colton', 'felis.Nulla@tempusmauris.net', '9874'),
(7, 'Phillip Whitfield', 'Geoffrey', 'dui.Fusce@cubilia.com', '00772'),
(8, 'Kirk Whitfield', 'Randall', 'eu.dui@Maecenasmi.co.uk', '10392'),
(10, 'Chadwick Sampson', 'Vernon', 'mi.felis.adipiscing@etmagnisdis.ca', '12188'),
(11, 'Beck Haley', 'Ralph', 'libero.Morbi.accumsan@liberoestcongue.ca', '81541'),
(12, 'Salvador Austin', 'Alexander', 'pellentesque@Pellentesquehabitantmorbi.com', '97889'),
(13, 'Gannon Skinner', 'Cooper', 'imperdiet.erat@Cum.com', '0085'),
(14, 'Tucker Knowles', 'Hall', 'morbi.tristique.senectus@eratvelpede.edu', 'JK44 4XI'),
(15, 'Ulric Mcconnell', 'Geoffrey', 'metus.Aenean@lacusNulla.ca', '08065'),
(16, 'Harding Coffey', 'Rooney', 'eu@Quisqueliberolacus.edu', '1927'),
(17, 'Kenyon Mclaughlin', 'Amos', 'sociis@ametconsectetueradipiscing.net', '83563'),
(18, 'Ray Goodwin', 'Orson', 'euismod.urna@Duisrisusodio.ca', '20507'),
(19, 'Jerry Ballard', 'Conan', 'cursus@etlacinia.edu', '15876'),
(20, 'Rahim Calhoun', 'Demetrius', 'diam@lacinia.co.uk', '98071-792'),
(21, 'Herman Berg', 'Jonah', 'odio@est.org', '8973'),
(22, 'Reed Pennington', 'Kennan', 'sagittis.felis.Donec@quispedePraesent.com', '21674'),
(23, 'Boris Sellers', 'Phelan', 'Pellentesque.ultricies@neque.ca', 'L7P 6H1'),
(24, 'Talon Gomez', 'Martin', 'Cras.vulputate.velit@tincidunt.edu', '989230'),
(25, 'Judah Norton', 'Wesley', 'eleifend@PhasellusnullaInteger.com', '9247'),
(26, 'Merrill Long', 'Griffith', 'sagittis.felis@ligula.com', '61876-744'),
(27, 'Octavius Meyer', 'Hall', 'Maecenas@lobortisquam.edu', '74511'),
(28, 'Griffith Good', 'Cairo', 'tincidunt.neque.vitae@Aliquamvulputate.co.uk', '33327'),
(29, 'Xavier Parsons', 'Cooper', 'interdum.Sed.auctor@Quisque.net', '5323'),
(30, 'Judah Robertson', 'Jerome', 'nisi@orciluctus.edu', '40809'),
(31, 'Philip Parsons', 'Elton', 'velit.justo@euultrices.net', 'S1 4XD'),
(32, 'Branden Roth', 'Magee', 'ut@fringillaDonec.edu', '78949'),
(33, 'Derek Conner', 'Ryan', 'cursus@Suspendissesagittis.edu', '30311'),
(34, 'Deacon Benson', 'Steel', 'Curabitur.ut@massaVestibulum.edu', '71755-445'),
(35, 'Galvin Olson', 'Steven', 'nonummy.ultricies.ornare@dapibusquamquis.ca', '34485'),
(36, 'Bert Taylor', 'Eric', 'commodo.at.libero@nullaDonecnon.org', '24286'),
(37, 'Octavius Padilla', 'Ivan', 'vitae.orci@Proinvel.net', '21310'),
(38, 'Lance Sherman', 'Aidan', 'iaculis.quis.pede@massanonante.edu', '9447'),
(39, 'Cruz Dalton', 'Silas', 'ultricies@arcuNuncmauris.com', '23094'),
(40, 'Hu Grant', 'Jacob', 'porta.elit@nequevitae.co.uk', 'YA0 4IN'),
(41, 'Josiah Craft', 'Carlos', 'magnis@ultricesposuerecubilia.edu', '681986'),
(42, 'Ezekiel Horne', 'Jared', 'sem@Aliquamrutrum.co.uk', '59249'),
(43, 'Seth James', 'Isaac', 'elementum.purus@ultrices.ca', '9663'),
(44, 'Basil Fields', 'Cyrus', 'eget.venenatis.a@dolor.ca', '3033'),
(45, 'Wyatt Levine', 'Caesar', 'mollis@risus.ca', '25141'),
(46, 'Ross Walter', 'Christian', 'conubia@pedenecante.co.uk', '6900'),
(47, 'Jelani Meyers', 'Denton', 'feugiat.non@aliquet.net', '5886'),
(48, 'Bruno Jensen', 'Keefe', 'Vestibulum@ultriciessem.net', '40704'),
(49, 'Xanthus Vaughn', 'Drake', 'auctor.non@a.edu', '5248'),
(50, 'Yardley Thornton', 'Dante', 'magnis.dis.parturient@semper.net', '71904'),
(51, 'Fletcher Harper', 'Merrill', 'Sed@suscipitest.com', 'M8E 3S0'),
(52, 'Brody Hendrix', 'Oscar', 'Phasellus.dolor@Suspendisseac.com', '91733'),
(53, 'Emerson Estes', 'Zephania', 'malesuada.fames.ac@adipiscing.edu', '7018FR'),
(54, 'Lester Knight', 'Gavin', 'nunc.ac@liberonecligula.edu', '50943'),
(55, 'Adrian Robinson', 'Mohammad', 'Vestibulum.ante@tempus.co.uk', '932957'),
(56, 'Noah Odonnell', 'William', 'consequat.dolor.vitae@aenimSuspendisse.ca', '87376'),
(57, 'Kamal Barron', 'Trevor', 'tincidunt@natoque.net', '20511'),
(58, 'Brody Rodriguez', 'Ezekiel', 'libero.Donec.consectetuer@etcommodoat.ca', '21816'),
(59, 'Aristotle Murray', 'Galvin', 'metus.urna.convallis@pedePraesenteu.org', '76495'),
(60, 'Reuben Clay', 'Elton', 'nibh.sit.amet@eratEtiam.com', '15058-440'),
(61, 'Gregory Velazquez', 'Lester', 'imperdiet.erat@Suspendisse.co.uk', '4818'),
(62, 'August Goodman', 'Kane', 'faucibus.id.libero@pharetrafelis.edu', '4816'),
(63, 'Quamar Sanders', 'Stewart', 'auctor@etlacinia.co.uk', '46905'),
(64, 'Zane Davis', 'Chaim', 'elit.Aliquam@Utsagittislobortis.com', '39600'),
(65, 'Burton Contreras', 'George', 'pretium.aliquet.metus@commodo.ca', '4843'),
(66, 'Allen Clemons', 'Oscar', 'tristique@fringillaornare.net', 'M2S 3W5'),
(67, 'Theodore Olson', 'Nigel', 'urna.nec@risusa.ca', '64997'),
(68, 'Harrison Fitzgerald', 'Chancellor', 'mollis.lectus.pede@aultriciesadipiscing.com', 'E4M 1M0'),
(69, 'Griffith Freeman', 'Mohammad', 'luctus.et@tempor.com', '5506'),
(70, 'Carlos Avery', 'Arsenio', 'magna.Nam.ligula@natoquepenatibus.edu', '13916'),
(71, 'Levi Underwood', 'Justin', 'eu@Inat.net', 'H3C 5VQ'),
(72, 'Ali Austin', 'Hall', 'at.risus@DonectinciduntDonec.net', 'K9B 9Y4'),
(73, 'Berk Hays', 'Kamal', 'euismod.enim@euismodac.ca', '70341'),
(74, 'Garrison Nielsen', 'Keegan', 'vehicula@risus.co.uk', 'AX7 2UT'),
(75, 'Gabriel Rodriguez', 'Brendan', 'luctus.ipsum@apurusDuis.co.uk', '9119RL'),
(76, 'James Shelton', 'Erich', 'vel@molestiesodales.co.uk', '68798'),
(77, 'Rigel Hooper', 'Gareth', 'urna@sapienNuncpulvinar.edu', '11217'),
(78, 'Ezra Grimes', 'Lee', 'luctus.lobortis@eleifendCrassed.co.uk', '6276'),
(79, 'Yuli Hensley', 'Clarke', 'nunc.nulla.vulputate@elementum.net', '70893'),
(80, 'Edan Weber', 'Reese', 'ante.ipsum@aliquetProin.edu', '98775'),
(81, 'Leonard Newton', 'Jason', 'vel.pede@malesuadautsem.co.uk', '74564'),
(82, 'Nigel England', 'Fulton', 'habitant.morbi@taciti.com', 'PT51 7TC'),
(83, 'Isaiah Watkins', 'Matthew', 'Cum.sociis@penatibusetmagnis.org', '39760'),
(84, 'Zeph Russo', 'Zahir', 'mi@tincidunt.com', '29776'),
(85, 'Perry Puckett', 'Elton', 'interdum.enim@augueeutempor.org', '85544'),
(86, 'Theodore Pruitt', 'Graiden', 'Pellentesque.habitant@arcuVestibulumut.edu', '50707'),
(87, 'Brody Gutierrez', 'Zachery', 'venenatis.vel@Donecfeugiat.net', '76990'),
(88, 'Hedley Haney', 'Steven', 'metus.vitae.velit@vitae.net', '9072'),
(89, 'Nero Newton', 'Randall', 'eros.Nam.consequat@enimcommodo.net', '60015'),
(90, 'Keefe Harris', 'Rigel', 'augue@vel.com', 'K4A 2J1'),
(91, 'Steel Blanchard', 'Carlos', 'nibh.Aliquam.ornare@Phaselluselitpede.edu', '2015'),
(92, 'Colton Levy', 'Igor', 'egestas.Aliquam.fringilla@maurisMorbinon.net', '2108MD'),
(93, 'Mark Fuentes', 'Bradley', 'lorem@cursusaenim.com', '86508'),
(94, 'Deacon Valenzuela', 'Timon', 'Cum.sociis@sitamet.com', 'L7A 6Y8'),
(95, 'Derek Graham', 'Timon', 'dapibus@necurna.edu', '3705IS'),
(96, 'Emerson Hopkins', 'Brett', 'semper@justoProin.ca', '7304'),
(97, 'Kibo Oneil', 'Alvin', 'cursus@odio.com', '78882'),
(98, 'Anthony Humphrey', 'Hiram', 'aliquet@nislelementumpurus.org', '37427'),
(99, 'Bradley Hill', 'Declan', 'ut@loremfringilla.edu', '67982'),
(100, 'Calvin Mccarthy', 'Justin', 'quis.diam@luctuset.edu', '67515');
/*!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 */;
|
/*
* View: processlist
*
* A detailed non-blocking processlist view to replace
* [INFORMATION_SCHEMA. | SHOW FULL] PROCESSLIST
*
* mysql> select * from processlist_full where conn_id is not null\G
* ...
* *************************** 8. row ***************************
* thd_id: 12400
* conn_id: 12379
* user: root@localhost
* db: ps_helper
* command: Query
* state: Copying to tmp table
* time: 0
* current_statement: select * from processlist_full where conn_id is not null
* last_statement: NULL
* last_statement_latency: NULL
* lock_latency: 1.00 ms
* rows_examined: 0
* rows_sent: 0
* rows_affected: 0
* tmp_tables: 1
* tmp_disk_tables: 0
* full_scan: YES
* last_wait: wait/synch/mutex/sql/THD::LOCK_thd_data
* last_wait_latency: 62.53 ns
* source: sql_class.h:3843
*
* Versions: 5.6.2+
*
*/
DROP VIEW IF EXISTS processlist;
CREATE SQL SECURITY INVOKER VIEW processlist AS
SELECT pps.thread_id AS thd_id,
pps.processlist_id AS conn_id,
IF(pps.name = 'thread/sql/one_connection',
CONCAT(pps.processlist_user, '@', pps.processlist_host),
REPLACE(pps.name, 'thread/', '')) user,
pps.processlist_db AS db,
pps.processlist_command AS command,
pps.processlist_state AS state,
pps.processlist_time AS time,
format_statement(pps.processlist_info) AS current_statement,
IF(esc.timer_wait IS NOT NULL,
format_statement(esc.sql_text),
NULL) AS last_statement,
IF(esc.timer_wait IS NOT NULL,
format_time(esc.timer_wait),
NULL) as last_statement_latency,
format_time(esc.lock_time) AS lock_latency,
esc.rows_examined,
esc.rows_sent,
esc.rows_affected,
esc.created_tmp_tables AS tmp_tables,
esc.created_tmp_disk_tables as tmp_disk_tables,
IF(esc.no_good_index_used > 0 OR esc.no_index_used > 0,
'YES', 'NO') AS full_scan,
ewc.event_name AS last_wait,
IF(ewc.timer_wait IS NULL AND ewc.event_name IS NOT NULL,
'Still Waiting',
format_time(ewc.timer_wait)) last_wait_latency,
ewc.source
FROM performance_schema.threads AS pps
LEFT JOIN performance_schema.events_waits_current AS ewc USING (thread_id)
LEFT JOIN performance_schema.events_statements_current as esc USING (thread_id)
ORDER BY pps.processlist_time DESC, last_wait_latency DESC;
/*
* View: processlist_raw
*
* A detailed non-blocking processlist view to replace
* [INFORMATION_SCHEMA. | SHOW FULL] PROCESSLIST
*
* mysql> select * from processlist_full where conn_id is not null\G
* *************************** 1. row ***************************
* thd_id: 25
* conn_id: 6
* user: root@localhost
* db: ps_helper
* command: Query
* state: Sending data
* time: 0
* current_statement: select * from processlist_full where conn_id is not null
* last_statement: NULL
* last_statement_latency: NULL
* lock_latency: 741.00 us
* rows_examined: 0
* rows_sent: 0
* rows_affected: 0
* tmp_tables: 1
* tmp_disk_tables: 0
* full_scan: YES
* last_wait: wait/synch/mutex/sql/THD::LOCK_query_plan
* last_wait_latency: 196.04 ns
* source: sql_optimizer.cc:1075
* 1 row in set (0.00 sec)
*
* Versions: 5.6.2+
*
*/
DROP VIEW IF EXISTS processlist_raw;
CREATE SQL SECURITY INVOKER VIEW processlist_raw AS
SELECT pps.thread_id AS thd_id,
pps.processlist_id AS conn_id,
IF(pps.name = 'thread/sql/one_connection',
CONCAT(pps.processlist_user, '@', pps.processlist_host),
REPLACE(pps.name, 'thread/', '')) user,
pps.processlist_db AS db,
pps.processlist_command AS command,
pps.processlist_state AS state,
pps.processlist_time AS time,
pps.processlist_info AS current_statement,
IF(esc.timer_wait IS NOT NULL,
esc.sql_text,
NULL) AS last_statement,
IF(esc.timer_wait IS NOT NULL,
esc.timer_wait,
NULL) as last_statement_latency,
esc.lock_time AS lock_latency,
esc.rows_examined,
esc.rows_sent,
esc.rows_affected,
esc.created_tmp_tables AS tmp_tables,
esc.created_tmp_disk_tables as tmp_disk_tables,
IF(esc.no_good_index_used > 0 OR esc.no_index_used > 0,
'YES', 'NO') AS full_scan,
ewc.event_name AS last_wait,
IF(ewc.timer_wait IS NULL AND ewc.event_name IS NOT NULL,
'Still Waiting',
ewc.timer_wait) last_wait_latency,
ewc.source
FROM performance_schema.threads AS pps
LEFT JOIN performance_schema.events_waits_current AS ewc USING (thread_id)
LEFT JOIN performance_schema.events_statements_current as esc USING (thread_id)
ORDER BY pps.processlist_time DESC, last_wait_latency DESC; |
create table producto(
id int primary key auto_increment,
nombre varchar(50),
apellido varchar(50),
descripcion varchar(50),
codigo varchar (50),
valorunitario bigint
);
insert int usuario (nombre,apellido,documento,fecha_nacimiento) values ("Carlos","Lopez","79221828","25-04-2008");
|
-- Add migration script here
CREATE TABLE image (
id INTEGER PRIMARY KEY,
title varchar(50) NOT NULL,
description varchar(150) NOT NULL,
image_url varchar(512) NOT NULL,
preview_url varchar(512) NOT NULL
); |
DROP DATABASE IF EXISTS foodherodb;
CREATE DATABASE foodherodb
|
ALTER TABLE posts.posts ADD COLUMN readonly boolean NOT NULL DEFAULT false;
UPDATE posts.posts SET readonly = TRUE WHERE tags @> ARRAY['readonly']::text[] and created > timestamp '2015-11-02 00:00:00'; |
--その他入金情報を抽出
SELECT
--全項目
*
FROM
--その他入金情報(A)
OTHER_WITHDRAW_INFO
WHERE
--A.物件明細番号 IN 物件明細番号リスト
SUPPLIES_NO IN /*suppliesNoList*/()
--AND A.入金小分類=引数.入金小分類
AND WITHDRAW_TYPE_DETAIL = /*withdrawTypeDetail*/ |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.