text stringlengths 6 9.38M |
|---|
SELECT
title AS "Title",
summary AS "Summary",
prod_year
FROM
film
INNER JOIN genre ON genre.id_genre = film.id_genre
WHERE
genre.name = 'erotic'
ORDER BY
prod_year
DESC
; |
{{
config(
materialized='incremental',
unique_key='n_nationkey',
tags=['rpt', 'dim']
)
}}
select
n_nationkey,
n_name,
n_regionkey,
n_comment
from {{ ref('stg_nation') }} |
-- Dumping database structure for inven3s
CREATE DATABASE IF NOT EXISTS `inven3s` /*!40100 DEFAULT CHARACTER SET latin1 */;
USE `inven3s`;
-- Dumping structure for table inven3s.logsapi
CREATE TABLE IF NOT EXISTS `logsapi` (
`endpoint` varchar(100) NOT NULL,
`clientip` varchar(100) NOT NULL,
`eventdate` datetime NOT NULL,
`browser` varchar(250) DEFAULT NULL,
`platform` varchar(250) DEFAULT NULL,
`language` varchar(250) DEFAULT NULL,
`referrer` varchar(250) DEFAULT NULL,
`email` varchar(100) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- Dumping structure for table inven3s.brands
CREATE TABLE IF NOT EXISTS `brands` (
`brandid` varchar(10) NOT NULL,
`brandname` varchar(255) NOT NULL,
`brandimage` varchar(255) DEFAULT NULL,
`brandurl` varchar(255) DEFAULT NULL,
`brandowner` varchar(255) DEFAULT NULL,
PRIMARY KEY (`brandid`),
FULLTEXT KEY `FULLTEXT` (`brandname`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- Dumping structure for table inven3s.cities
CREATE TABLE IF NOT EXISTS `cities` (
`cityid` int(11) NOT NULL AUTO_INCREMENT,
`cityname` char(35) NOT NULL DEFAULT '',
`countrycode` char(3) NOT NULL DEFAULT '',
`district` char(20) NOT NULL DEFAULT '',
`population` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`cityid`),
KEY `CountryCode` (`countrycode`),
CONSTRAINT `cities_ibfk_1` FOREIGN KEY (`countrycode`) REFERENCES `countries` (`countrycode`)
) ENGINE=InnoDB AUTO_INCREMENT=4085 DEFAULT CHARSET=latin1;
-- Dumping structure for table inven3s.countries
CREATE TABLE IF NOT EXISTS `countries` (
`countrycode` char(3) NOT NULL DEFAULT '',
`countryname` char(52) NOT NULL DEFAULT '',
`continent` enum('Asia','Europe','North America','Africa','Oceania','Antarctica','South America','Unavailable') NOT NULL DEFAULT 'Asia',
`region` char(26) NOT NULL DEFAULT '',
`surfacearea` float(10,2) NOT NULL DEFAULT '0.00',
`indyear` smallint(6) DEFAULT NULL,
`population` int(11) NOT NULL DEFAULT '0',
`lifeexp` float(3,1) DEFAULT NULL,
`gnp` float(10,2) DEFAULT NULL,
`gnpold` float(10,2) DEFAULT NULL,
`localname` char(45) NOT NULL DEFAULT '',
`govform` char(45) NOT NULL DEFAULT '',
`headofstate` char(60) DEFAULT NULL,
`capital` int(11) DEFAULT NULL,
`code2` char(2) NOT NULL DEFAULT '',
PRIMARY KEY (`countrycode`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- Dumping structure for table inven3s.inventories
CREATE TABLE IF NOT EXISTS `inventories` (
`entryid` int(11) NOT NULL AUTO_INCREMENT,
`userid` varchar(50) NOT NULL,
`gtin` varchar(20) NOT NULL,
`retailerid` varchar(50) NOT NULL,
`dateentry` datetime NOT NULL,
`itemstatus` varchar(5) NOT NULL DEFAULT 'IN',
`dateexpiry` date NOT NULL DEFAULT '0000-00-00',
`quantity` float NOT NULL DEFAULT '1',
`receiptno` varchar(150) DEFAULT NULL,
PRIMARY KEY (`entryid`) USING BTREE,
KEY `FK_inventory_products` (`gtin`),
KEY `FK_inventory_retailers` (`retailerid`),
KEY `FK_inventory_users` (`userid`) USING BTREE,
CONSTRAINT `FK_inventories_products` FOREIGN KEY (`gtin`) REFERENCES `products` (`gtin`),
CONSTRAINT `FK_inventories_retailers` FOREIGN KEY (`retailerid`) REFERENCES `retailers` (`retailerid`),
CONSTRAINT `FK_inventories_users` FOREIGN KEY (`userid`) REFERENCES `users` (`userid`)
) ENGINE=InnoDB AUTO_INCREMENT=446905 DEFAULT CHARSET=utf8mb4;
-- Dumping structure for table inven3s.products
CREATE TABLE IF NOT EXISTS `products` (
`gtin` varchar(20) NOT NULL,
`productname` varchar(255) NOT NULL,
`productimage` varchar(255) DEFAULT NULL,
`brandid` varchar(10) NOT NULL,
`isperishable` int(11) NOT NULL DEFAULT '0',
`isedible` int(11) NOT NULL DEFAULT '1',
PRIMARY KEY (`gtin`),
KEY `FK_products_brands` (`brandid`),
FULLTEXT KEY `FULLTEXT` (`gtin`,`productname`),
CONSTRAINT `FK_products_brands` FOREIGN KEY (`brandid`) REFERENCES `brands` (`brandid`) ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- Dumping structure for table inven3s.productscandidate
CREATE TABLE IF NOT EXISTS `productscandidate` (
`gtin` varchar(20) NOT NULL,
`source` varchar(20) NOT NULL,
`candidateid` varchar(50) NOT NULL,
`candidatetitle` varchar(255) NOT NULL,
`candidateurl` text NOT NULL,
`candidaterank` int(11) NOT NULL,
`type` varchar(20) NOT NULL,
`timestamp` datetime DEFAULT NULL,
PRIMARY KEY (`gtin`,`candidateid`,`source`),
FULLTEXT KEY `FULLTEXT` (`candidatetitle`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- Dumping structure for table inven3s.productscategory
CREATE TABLE IF NOT EXISTS `productscategory` (
`gtin` varchar(20) CHARACTER SET utf8mb4 NOT NULL,
`category` varchar(200) CHARACTER SET utf8mb4 NOT NULL,
`confidence` float NOT NULL,
`status` varchar(10) CHARACTER SET utf8mb4 NOT NULL,
PRIMARY KEY (`gtin`,`category`),
CONSTRAINT `FK_productscategory_products` FOREIGN KEY (`gtin`) REFERENCES `products` (`gtin`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- Dumping structure for table inven3s.productscategory_top
CREATE TABLE IF NOT EXISTS `productscategory_top` (
`category` varchar(200) CHARACTER SET utf8mb4 NOT NULL,
`subcategorycnt` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- Dumping structure for table inven3s.productscategory_transpose
CREATE TABLE IF NOT EXISTS `productscategory_transpose` (
`gtin` varchar(20) CHARACTER SET utf8mb4 NOT NULL,
`productname` varchar(255) CHARACTER SET utf8mb4 NOT NULL,
`category1` varchar(200) CHARACTER SET utf8mb4 NOT NULL,
`category2` varchar(200) CHARACTER SET utf8mb4 DEFAULT NULL,
PRIMARY KEY (`gtin`),
CONSTRAINT `FK_productscategory_transpose_products` FOREIGN KEY (`gtin`) REFERENCES `products` (`gtin`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- Dumping structure for table inven3s.productsfavourite
CREATE TABLE IF NOT EXISTS `productsfavourite` (
`gtin` varchar(20) CHARACTER SET utf8mb4 NOT NULL,
`userid` varchar(50) CHARACTER SET utf8mb4 NOT NULL,
`favourite` int(11) DEFAULT '0',
PRIMARY KEY (`gtin`,`userid`),
CONSTRAINT `FK_productsfavourite_products` FOREIGN KEY (`gtin`) REFERENCES `products` (`gtin`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- Dumping structure for table inven3s.productsprice
CREATE TABLE IF NOT EXISTS `productsprice` (
`gtin` varchar(20) CHARACTER SET utf8mb4 NOT NULL,
`price` float NOT NULL,
`timestamp` datetime NOT NULL,
`date` date NOT NULL,
`retailer` varchar(100) CHARACTER SET utf8mb4 NOT NULL,
PRIMARY KEY (`gtin`,`date`,`retailer`),
CONSTRAINT `FK_productsprice_products` FOREIGN KEY (`gtin`) REFERENCES `products` (`gtin`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- Dumping structure for table inven3s.retailers
CREATE TABLE IF NOT EXISTS `retailers` (
`retailerid` varchar(50) NOT NULL,
`retailername` varchar(255) NOT NULL,
`retailercity` int(11) NOT NULL,
PRIMARY KEY (`retailerid`),
KEY `FK_retailers_cities` (`retailercity`),
FULLTEXT KEY `FULLTEXT` (`retailername`),
CONSTRAINT `FK_retailers_cities` FOREIGN KEY (`retailercity`) REFERENCES `cities` (`cityid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- Dumping structure for table inven3s.users
CREATE TABLE IF NOT EXISTS `users` (
`userid` varchar(50) NOT NULL,
`fullname` varchar(250) NOT NULL,
`email` varchar(100) NOT NULL,
`passwordhashed` varchar(250) NOT NULL,
PRIMARY KEY (`userid`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; |
col udate new_value udate noprint
define logext='.log'
set echo off feed off
select to_char(sysdate,'yyyy-mm-dd_hh24-mi-ss') udate from dual;
set feed on
set feed on echo on pagesize 0
-- trimspool for older versions - <= 9i I think
set linesize 200 trimspool on
spool spool_example_&udate.&logext
alter session set nls_date_format='yyyy-mm-dd hh24:mi:ss';
select sysdate from dual;
spool off
set echo off pagesize 60
|
SELECT products.name, products.price, users.name, users.email FROM `products`
INNER JOIN `users`
ON products.user_id = users.id
WHERE products.id = 4
SELECT products.name, products.price, users.name, users.email FROM `products`
INNER JOIN `users`
ON products.user_id = users.id
WHERE users.name LIKE "%Khan"
-- %khan ends with word `khan`
-- khan% starts with word `khan`
-- %khan% word `khan` exists in between |
/*
SQLyog Ultimate v10.00 Beta1
MySQL - 8.0.22 : Database - sccdrrmo
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!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 */;
CREATE DATABASE /*!32312 IF NOT EXISTS*/`sccdrrmo` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci */ /*!80016 DEFAULT ENCRYPTION='N' */;
USE `sccdrrmo`;
/*Table structure for table `tbl_gender` */
DROP TABLE IF EXISTS `tbl_gender`;
CREATE TABLE `tbl_gender` (
`idno` varchar(10) COLLATE utf8mb4_general_ci DEFAULT NULL,
`name_gender` varchar(20) COLLATE utf8mb4_general_ci DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*Data for the table `tbl_gender` */
insert into `tbl_gender`(`idno`,`name_gender`) values ('01','Female'),('02','Male'),('03','Not to disclose');
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
DROP DATABASE IF EXISTS bamazon;
CREATE database bamazon;
USE bamazon;
CREATE TABLE products (
item_id INT NOT NULL AUTO_INCREMENT,
product_name VARCHAR(100) NULL,
department_name VARCHAR(100) NULL,
price DECIMAL(10,4) NULL,
stock_quantity DECIMAL(10,4) NULL,
PRIMARY KEY (item_id)
);
INSERT INTO (product_name, department_name, price, stock_quantity)
VALUES
("al merrick 9", "sports", 119.99, 2),
("rusty 8", "sports", 189.99, 1),
("hobie 12", "sports", 179.99, 10),
("yeti", "sports", 159.99, 6),
("flashlight", "camping", 8.99, 50),
("tent", "camping", 58.79, 10),
("tent spikes", "camping", 1.99, 191),
("tire", "auto", 254.09, 8),
("gas", "auto", 3.99, 69) |
-- MySQL Script generated by MySQL Workbench
-- Mon Nov 4 20:49:08 2019
-- Model: New Model Version: 1.0
-- MySQL Workbench Forward Engineering
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION';
-- -----------------------------------------------------
-- Schema mydb
-- -----------------------------------------------------
-- -----------------------------------------------------
-- Schema ventas
-- -----------------------------------------------------
-- -----------------------------------------------------
-- Schema ventas
-- -----------------------------------------------------
CREATE SCHEMA IF NOT EXISTS `ventas` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_spanish_ci ;
USE `ventas` ;
-- -----------------------------------------------------
-- Table `ventas`.`articulos`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `ventas`.`articulos` (
`id_producto` INT(11) NOT NULL AUTO_INCREMENT,
`id_categoria` INT(11) NOT NULL,
`id_imagen` INT(11) NOT NULL,
`id_usuario` INT(11) NOT NULL,
`nombre` VARCHAR(50) NULL DEFAULT NULL,
`descripcion` VARCHAR(500) NULL DEFAULT NULL,
`cantidad` INT(11) NULL DEFAULT NULL,
`precio` FLOAT NULL DEFAULT NULL,
`fechaCaptura` DATE NULL DEFAULT NULL,
PRIMARY KEY (`id_producto`))
ENGINE = InnoDB
DEFAULT CHARACTER SET = utf8mb4
COLLATE = utf8mb4_spanish_ci;
-- -----------------------------------------------------
-- Table `ventas`.`categorias`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `ventas`.`categorias` (
`id_categoria` INT(11) NOT NULL AUTO_INCREMENT,
`id_usuario` INT(11) NOT NULL,
`nombreCategoria` VARCHAR(150) NULL DEFAULT NULL,
`fechaCaptura` DATE NULL DEFAULT NULL,
PRIMARY KEY (`id_categoria`))
ENGINE = InnoDB
DEFAULT CHARACTER SET = utf8mb4
COLLATE = utf8mb4_spanish_ci;
-- -----------------------------------------------------
-- Table `ventas`.`clientes`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `ventas`.`clientes` (
`id_cliente` INT(11) NOT NULL AUTO_INCREMENT,
`id_usuario` INT(11) NOT NULL,
`nombre` VARCHAR(200) NULL DEFAULT NULL,
`apellido` VARCHAR(200) NULL DEFAULT NULL,
`direccion` VARCHAR(200) NULL DEFAULT NULL,
`email` VARCHAR(200) NULL DEFAULT NULL,
`telefono` VARCHAR(200) NULL DEFAULT NULL,
`rfc` VARCHAR(200) NULL DEFAULT NULL,
PRIMARY KEY (`id_cliente`))
ENGINE = InnoDB
DEFAULT CHARACTER SET = utf8mb4
COLLATE = utf8mb4_spanish_ci;
-- -----------------------------------------------------
-- Table `ventas`.`imagenes`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `ventas`.`imagenes` (
`id_imagen` INT(11) NOT NULL AUTO_INCREMENT,
`id_categoria` INT(11) NOT NULL,
`nombre` VARCHAR(500) NULL DEFAULT NULL,
`ruta` VARCHAR(500) NULL DEFAULT NULL,
`fechaSubida` DATE NULL DEFAULT NULL,
PRIMARY KEY (`id_imagen`))
ENGINE = InnoDB
DEFAULT CHARACTER SET = utf8mb4
COLLATE = utf8mb4_spanish_ci;
-- -----------------------------------------------------
-- Table `ventas`.`usuarios`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `ventas`.`usuarios` (
`id_usuario` INT(11) NOT NULL AUTO_INCREMENT,
`nombre` VARCHAR(50) NULL DEFAULT NULL,
`apellido` VARCHAR(50) NULL DEFAULT NULL,
`email` VARCHAR(50) NULL DEFAULT NULL,
`password` TEXT NULL DEFAULT NULL,
`fechaCaptura` DATE NULL DEFAULT NULL,
PRIMARY KEY (`id_usuario`))
ENGINE = InnoDB
AUTO_INCREMENT = 3
DEFAULT CHARACTER SET = utf8mb4
COLLATE = utf8mb4_spanish_ci;
-- -----------------------------------------------------
-- Table `ventas`.`ventas`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `ventas`.`ventas` (
`id_venta` INT(11) NOT NULL,
`id_cliente` INT(11) NULL DEFAULT NULL,
`id_producto` INT(11) NULL DEFAULT NULL,
`id_usuario` INT(11) NULL DEFAULT NULL,
`precio` FLOAT NULL DEFAULT NULL,
`fechaCompra` DATE NULL DEFAULT NULL)
ENGINE = InnoDB
DEFAULT CHARACTER SET = utf8mb4
COLLATE = utf8mb4_spanish_ci;
SET SQL_MODE=@OLD_SQL_MODE;
SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS;
SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS;
|
SET IDENTITY_INSERT CareersHistoryTypes ON
INSERT INTO CareersHistoryTypes(CareerHistoryTypeID, CareerHistoryTypeName) VALUES (4, N'Private Promotion')
SET IDENTITY_INSERT CareersHistoryTypes OFF
|
CREATE TABLE IF NOT EXISTS 'person' ('id'INTEGER PRIMARY KEY AUTOINCREMENT ,'lname' VARCHAR,'fname' VARCHAR ,'postal_code' SMALLINT(6),'food_id' SMALLINT,'bank_id' SMALLINT);
INSERT INTO `person` VALUES (1,'Johnson','Steven',793116005,NULL,NULL);
INSERT INTO `person` VALUES (2,'Einstein','Nick',69645122,NULL,NULL);
INSERT INTO `person` VALUES (3,'Nickolson','John',300462009,NULL,NULL);
INSERT INTO `person` VALUES (4,'Johnson','Nick',110675345,NULL,NULL);
INSERT INTO `person` VALUES (5,'Potter','Nick',645672200,NULL,NULL);
INSERT INTO `person` VALUES (6,'Ivanov','Mike',483944006,NULL,NULL);
INSERT INTO `person` VALUES (7,'Nickolson','Jack',89911738,NULL,NULL);
INSERT INTO `person` VALUES (8,'Ivanov','Mike',730052423,NULL,NULL);
INSERT INTO `person` VALUES (9,'Johnson','Jack',731019538,NULL,NULL);
INSERT INTO `person` VALUES (10,'Nickolson','Nick',991677069,NULL,NULL);
CREATE TABLE IF NOT EXISTS'favourite_food'('person_id' INTEGER ,'name' VARCHAR ,CONSTRAINT pk_ff PRIMARY KEY(person_id,name)CONSTRAINT fk_ff FOREIGN KEY (person_id) REFERENCES person(person_id));
INSERT INTO `favourite_food` VALUES (1,'cake');
INSERT INTO `favourite_food` VALUES (1,'borch');
INSERT INTO `favourite_food` VALUES (2,'borch');
INSERT INTO `favourite_food` VALUES (2,'chicken');
INSERT INTO `favourite_food` VALUES (3,'borch');
INSERT INTO `favourite_food` VALUES (3,'potato');
INSERT INTO `favourite_food` VALUES (3,'cheese');
INSERT INTO `favourite_food` VALUES (4,'potato');
INSERT INTO `favourite_food` VALUES (5,'chicken');
INSERT INTO `favourite_food` VALUES (6,'chicken');
INSERT INTO `favourite_food` VALUES (6,'cheese');
INSERT INTO `favourite_food` VALUES (6,'potato');
INSERT INTO `favourite_food` VALUES (7,'borch');
INSERT INTO `favourite_food` VALUES (7,'cheese');
INSERT INTO `favourite_food` VALUES (8,'cheese');
INSERT INTO `favourite_food` VALUES (8,'chicken');
INSERT INTO `favourite_food` VALUES (8,'potato');
INSERT INTO `favourite_food` VALUES (9,'chicken');
INSERT INTO `favourite_food` VALUES (9,'cheese');
INSERT INTO `favourite_food` VALUES (9,'cake');
INSERT INTO `favourite_food` VALUES (9,'potato');
INSERT INTO `favourite_food` VALUES (10,'borch');
INSERT INTO `favourite_food` VALUES (10,'cheese'); |
DROP TABLE IF EXISTS repository_view
|
create view train.EvaluationResults as
select top 10000000 cast(CourseDate as datetime) CourseDate, AMPM, Name, JobTitle, CourseTitle, Trainer, Department,
case OverallQuality when 1 then 'Poor' when 2 then 'Fair' when 3 then 'Good' when 4 then 'Excellent' end [Overall Quality of Session],
case StateObjectives when 1 then 'Poor' when 2 then 'Fair' when 3 then 'Good' when 4 then 'Excellent' end [How Well Trainer Stated Objectives],
case AliveInteresting when 1 then 'Poor' when 2 then 'Fair' when 3 then 'Good' when 4 then 'Excellent' end [Trainer Keep Session Alive & Interesting],
case TrainerOverall when 1 then 'Poor' when 2 then 'Fair' when 3 then 'Good' when 4 then 'Excellent' end [Overall Rating of Trainer],
case AccommodateNeeds when 1 then 'Poor' when 2 then 'Fair' when 3 then 'Good' when 4 then 'Excellent' end [Course Accomodate Needs],
case ConvenientLocation when 1 then 'Poor' when 2 then 'Fair' when 3 then 'Good' when 4 then 'Excellent' end [Convenient Location],
q1.Answer [Most relevant thing learnt], q2.Answer [Length of Presentation Sufficent], q3.Answer [Made the Session more Effective],
case UsefulInMyJob when 0 then 'No' when 1 then 'Yes' end [Useful in my Job], q4.Answer [Implement when return to work],
q5.Answer [Additional Comments], EnteredOn [Date Completed]
from train.eval
left join train.evalComments q1 on eval.ID = q1.EvalID and q1.QuestionID = 1
left join train.evalComments q2 on eval.ID = q2.EvalID and q2.QuestionID = 2
left join train.evalComments q3 on eval.ID = q3.EvalID and q3.QuestionID = 3
left join train.evalComments q4 on eval.ID = q4.EvalID and q4.QuestionID = 4
left join train.evalComments q5 on eval.ID = q5.EvalID and q5.QuestionID = 5
order by CourseDate, AMPM, CourseTitle, Department, EnteredBy, EnteredOn |
CREATE TABLE `permission` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`permission_name` varchar(45) NOT NULL,
`uri` varchar(200) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=100 DEFAULT CHARSET=utf8;
CREATE TABLE `role` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`role_name` varchar(45) NOT NULL,
`permission_ids` text NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
CREATE TABLE `user_info` (
`id` bigint(20) NOT NULL,
`username` varchar(45) NOT NULL,
`password` varchar(45) NOT NULL,
`role_id` bigint(20) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
INSERT INTO `user_info` (`id`,`username`,`password`,`role_id`) VALUES (1,'刘骏','a51f972a0a2addaf99045b70e3a4e268',1);
INSERT INTO `role` (`id`,`role_name`,`permission_ids`) VALUES (1,'系统管理员','99');
INSERT INTO `permission` (`id`,`permission_name`,`uri`) VALUES (99,'admin','/admin');
|
SELECT
V6PART,
V6PLNT,
V6STAT,
V6RPLN,
COALESCE(AVGLED, AWGLED) GLED,
COALESCE(CGSTCS, CHSTCS, Y0STCS) AS CURCOST,
COALESCE(CNSTCS, COSTCS, Y3STCS) AS FUTCOST,
COALESCE(CNSTCS, COSTCS, Y3STCS) - COALESCE(CGSTCS, CHSTCS, Y0STCS) DIFF
FROM
LGDAT.STKA
LEFT OUTER JOIN LGDAT.STKMM ON
AVPART = V6PART
LEFT OUTER JOIN LGDAT.STKMP ON
AWPART = V6PART
LEFT OUTER JOIN LGDAT.ICSTP ON
CHPART = V6PART AND
CHPLNT = V6PLNT
LEFT OUTER JOIN LGDAT.ICSTM ON
CGPART = V6PART AND
CGPLNT = V6PLNT
LEFT OUTER JOIN LGDAT.ICSTR ON
Y0PART = V6PART AND
Y0PLNT = V6PLNT
LEFT OUTER JOIN LGDAT.FTCSTP ON
COPART = V6PART AND
COPLNT = V6PLNT
LEFT OUTER JOIN LGDAT.FTCSTM ON
CNPART = V6PART AND
CNPLNT = V6PLNT
LEFT OUTER JOIN LGDAT.FTCSTR ON
Y3PART = V6PART AND
Y3PLNT = V6PLNT
WHERE
ABS(COALESCE(CNSTCS, COSTCS, Y3STCS) - COALESCE(CGSTCS, CHSTCS, Y0STCS)) > .00001
|
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Máy chủ: localhost
-- Thời gian đã tạo: Th3 14, 2021 lúc 06:22 AM
-- Phiên bản máy phục vụ: 8.0.13-4
-- Phiên bản PHP: 7.2.24-0ubuntu0.18.04.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Cơ sở dữ liệu: `7zeE9DbecU`
--
-- --------------------------------------------------------
--
-- Cấu trúc bảng cho bảng `danhmuc`
--
CREATE TABLE `danhmuc` (
`id` int(12) NOT NULL,
`name` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
`img` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
`anhien` tinyint(1) NOT NULL DEFAULT '1'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
--
-- Đang đổ dữ liệu cho bảng `danhmuc`
--
INSERT INTO `danhmuc` (`id`, `name`, `img`, `anhien`) VALUES
(8, 'nhân', '1.png', 1),
(9, 'Loa Tròn', 'imgspeaker1.jpg', 1),
(10, 'Loa Kẹo Kéo', 'imgspeaker2.jpg', 1),
(11, 'Loa Để Bàn', 'imgspeaker3.jpg', 1),
(13, 'Loa Mini', 'imgspeaker4.jpg', 1);
-- --------------------------------------------------------
--
-- Cấu trúc bảng cho bảng `khachhang`
--
CREATE TABLE `khachhang` (
`id` int(12) NOT NULL,
`user` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
`role` tinyint(1) NOT NULL DEFAULT '0',
`pass` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
`kichhoat` tinyint(1) NOT NULL DEFAULT '0',
`email` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
`sodienthoai` varchar(11) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
`diachi` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
`thanhpho` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
`quocgia` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
`randomkey` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
--
-- Đang đổ dữ liệu cho bảng `khachhang`
--
INSERT INTO `khachhang` (`id`, `user`, `role`, `pass`, `kichhoat`, `email`, `sodienthoai`, `diachi`, `thanhpho`, `quocgia`, `randomkey`) VALUES
(1, 'admin', 1, '111111', 1, NULL, NULL, NULL, NULL, NULL, NULL),
(2, 'user', 0, '222222', 1, NULL, NULL, NULL, NULL, NULL, NULL),
(13, 'user123', 1, '123456', 1, 'tranquangnhan1606@gmail.com', NULL, NULL, NULL, NULL, '910664f59b1cb9fe35343e6d3dddb508');
-- --------------------------------------------------------
--
-- Cấu trúc bảng cho bảng `sanpham`
--
CREATE TABLE `sanpham` (
`id` int(12) NOT NULL,
`name` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
`slug` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
`img` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
`iddm` int(12) NOT NULL,
`gia` float(10,2) NOT NULL,
`luotxem` int(12) NOT NULL,
`mota` text CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
`anhien` tinyint(1) NOT NULL DEFAULT '1'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
--
-- Đang đổ dữ liệu cho bảng `sanpham`
--
INSERT INTO `sanpham` (`id`, `name`, `slug`, `img`, `iddm`, `gia`, `luotxem`, `mota`, `anhien`) VALUES
(9, 'Loa Tròn', 'loa-tron', 'imgspeaker1.jpg', 13, 500.00, 6000, '<p>Robusta </p>\r\n\r\n<table border=\"1\" cellpadding=\"1\" cellspacing=\"1\" style=\"width:100%\">\r\n <tbody>\r\n <tr>\r\n <td>3</td>\r\n <td>3</td>\r\n </tr>\r\n <tr>\r\n <td> </td>\r\n <td> </td>\r\n </tr>\r\n <tr>\r\n <td> </td>\r\n <td> </td>\r\n </tr>\r\n </tbody>\r\n</table>\r\n\r\n<p> </p>\r\n', 1),
(10, 'Loa To Để Bàn', 'loa-to-de-ban', 'imgspeaker5.jpg', 11, 80.00, 560000, '<p>Loa To Để Bàn </p>\r\n', 0),
(11, 'Loa Kẹo Kéo', 'loa-keo-keo', 'imgspeaker6.jpg', 10, 400.00, 60000, '<p>Loa Kẹo Kéo</p>\r\n', 1),
(12, 'Loa Xịn', 'loa-xin', 'imgspeaker7.jpg', 11, 500000.00, 52452, '<p>Loa Xịn</p>\r\n', 1);
--
-- Chỉ mục cho các bảng đã đổ
--
--
-- Chỉ mục cho bảng `danhmuc`
--
ALTER TABLE `danhmuc`
ADD PRIMARY KEY (`id`);
--
-- Chỉ mục cho bảng `sanpham`
--
ALTER TABLE `sanpham`
ADD PRIMARY KEY (`id`),
ADD KEY `fk_sp_dm` (`iddm`);
--
-- AUTO_INCREMENT cho các bảng đã đổ
--
--
-- AUTO_INCREMENT cho bảng `danhmuc`
--
ALTER TABLE `danhmuc`
MODIFY `id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=14;
--
-- AUTO_INCREMENT cho bảng `sanpham`
--
ALTER TABLE `sanpham`
MODIFY `id` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=16;
--
-- Các ràng buộc cho các bảng đã đổ
--
--
-- Các ràng buộc cho bảng `sanpham`
--
ALTER TABLE `sanpham`
ADD CONSTRAINT `fk_sp_dm` FOREIGN KEY (`iddm`) REFERENCES `danhmuc` (`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 */;
|
use student_manager;
# hien thi so luong hoc vien tai casc tinh
select address_address as diachi,count(student_id) as soluong
from address
inner join students s on address.address_id = s.address_id
group by address_address
order by address.address_id asc ;
# hien thi so hoc vien trong cac lop
select class_name as class_name,count(student_id) as soluong
from class
inner join students s on class.class_id = s.class_id
group by class_name
order by class.class_id asc ;
# hien thi gia tri trung binh casc mon hoc
select c.course_language as monhoc, avg(p.point)
from
point as p
inner join course c on p.course_id = c.course_id
group by c.course_language
order by c.course_id asc ;
# hien thi mon hoc co diem trung binh cao nhat
# select c.course_language, avg(p.point)
# from
# course as c
# inner join point p on c.course_id = p.course_id
# group by c.course_language
# order by c.course_id asc
# limit 1;
#
select course.course_language, Max(avg_point)
from
course,
(select avg(p.point) as avg_point
from point p inner join course c on p.course_id = c.course_id
group by c.course_id )as nap;
#
# select c.course_language, AVG(p.point)
# FROM course c join point as p on c.course_id = p.point_id
# GROUP BY c.course_id
# HAVING AVG(p.point) >= all(SELECT distinct AVG(p2.point) FROM point as p2 GROUP BY p2.point_id); |
/*
Navicat MySQL Data Transfer
Source Server : 172.30.61.11
Source Server Version : 50721
Source Host : 172.30.61.11:3306
Source Database : gyweixin
Target Server Type : MYSQL
Target Server Version : 50721
File Encoding : 65001
Date: 2018-04-09 09:23:24
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for sys_config
-- ----------------------------
DROP TABLE IF EXISTS `sys_config`;
CREATE TABLE `sys_config` (
`CONFIG_ID` int(11) NOT NULL AUTO_INCREMENT,
`CONFIG_KEY` varchar(64) NOT NULL COMMENT '配置key',
`CONFIG_VALUE` varchar(256) NOT NULL COMMENT '配置value',
`CONFIG_DESC` varchar(256) DEFAULT NULL COMMENT '配置描述',
`PROJECT_ID` int(11) DEFAULT NULL COMMENT '工程id',
`PROJECT_NAME` varchar(255) NOT NULL,
`MODULE_ID` int(11) DEFAULT NULL COMMENT '模块id',
`MODULE_NAME` varchar(255) DEFAULT NULL,
`CONFIG_SWITCH` int(1) DEFAULT '0' COMMENT '配置开关,默认为0-开启,1-关闭',
`OPT_USER` varchar(32) DEFAULT 'administrator',
`INSERT_TIME` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '入库时间',
`UPDATE_TIME` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
PRIMARY KEY (`CONFIG_ID`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;
|
alter table build_items drop column qty;
alter table build_items add column runs bigint; |
--EMPRESA tiene que existir en la tabla ciudad.empresa_t
WITH naportetarjeta (NRO,CODIGO_T,TITULAR,F_VENCIMIENTO,EMPRESA) AS (
VALUES
(10224,603,'Juan',DATE '2016-05-24','Naranja'),
(20342,203,'Pepe',DATE '2017-05-22','Naranja')
),
--actualizados contiene las tablas actualizadas con new_debitos
--aquellos valores que aun no estan en la tabla son omitidos
actualizados as (
UPDATE ciudad.tcredito tc
SET
NRO = nt.NRO,
CODIGO_T = nt.CODIGO_T,
TITULAR = nt.TITULAR,
F_VENCIMIENTO = nt.F_VENCIMIENTO,
EMPRESA = nt.EMPRESA
FROM naportetarjeta nt
WHERE tc.NRO = nt.NRO
RETURNING tc.*
)
--inserta solo los que su NRO no estan en la tabla de actualizados
INSERT INTO ciudad.tcredito (NRO,CODIGO_T,TITULAR,F_VENCIMIENTO,EMPRESA)
SELECT *
FROM naportetarjeta
WHERE NOT EXISTS (SELECT 1
FROM actualizados dtn
WHERE dtn.NRO = naportetarjeta.NRO);
select * from ciudad.tcredito;
|
-- 20110927字典表更新
update ykt_cur.T_DICTIONARY set DICTCAPTION='体锻-起点' where DICTTYPE = '81' and DICTVAL = '1005';
insert into ykt_cur.T_DICTIONARY (DICTTYPE, DICTTYPENAME, DICTVAL, DICTCAPTION)
values (81, '设备用途', '1006', '体锻-终点');
commit;
|
SELECT count(1)
FROM persona
WHERE username = :username and id <> :id; |
-- 表的数据: xt_form_class --
INSERT INTO `xt_form_class` VALUES ('1','新闻公告','0');-- <fen> --
|
select
startype_1,
startype_2,
startype_3,
count(distinct room_id) as dis_room
from
douyu.feature_table
group by
startype_1,
startype_2,
startype_3 |
--Parametros
INSERT INTO Parametros(NomParam,Valor) --Dias de Presstamos permitidos
Values ('DiasPrest',5);
INSERT INTO Parametros(NomParam,Valor)--Los dias de tolerancia despues de vencido el prestamo
Values ('DiasTole',2);
INSERT INTO Parametros(NomParam,Valor)--Dias de alerta despues de los dias de tolerancia
Values ('DiasAlert',1);
INSERT INTO Parametros(NomParam,Valor)--Top de libros mas prestados
Values ('TOP',10);
INSERT INTO Parametros(NomParam,Valor)--Libros prestados N veces en M meses
Values ('N',3);
INSERT INTO Parametros(NomParam,Valor)--Libros prestados N veces en M meses
Values ('M',6);
--Catalogo Telefono
INSERT INTO CatTel(TipTel,Codigo)--Codigo de tipo de telefono casa
Values ('Casa',0);
INSERT INTO CatTel(TipTel,Codigo)--Codigo de tipo de telefono Celular
Values ('Celular',1);
--Catalogo Persona
INSERT INTO CatTipoPer(TipPer,Codigo)--Codigo de tipo de persona Estudiante
Values ('Estudiante',0);
INSERT INTO CatTipoPer(TipPer,Codigo)--Codigo de tipo de persona Colega
Values ('Colega',1);
INSERT INTO CatTipoPer(TipPer,Codigo)--Codigo de tipo de persona Familiar
Values ('Familiar',2);
--Catalogo Articulo CatTipoArt
INSERT INTO CatTipoArt(TipArt,Codigo)--Codigo de tipo de persona Libro
Values ('Libro',0);
INSERT INTO CatTipoArt(TipArt,Codigo)--Codigo de tipo de persona Pelicula
Values ('Pelicula',1);
INSERT INTO CatTipoArt(TipArt,Codigo)--Codigo de tipo de persona Revista
Values ('Revista',2); |
CREATE OR REPLACE PUBLIC SYNONYM fire_insurance_pkg FOR orient.fire_insurance_pkg; |
INSERT INTO users (email, login)
VALUES ('dev@backoffice.fr', 'dev');
|
SELECT n.patient_id, n.note_id, n.age_at_note_date_in_days as age, n.note_year, t.terms
FROM stride6.notes n
JOIN
(SELECT nid, group_concat(case when negated=0 then tid else concat('N', tid) end separator " ") as terms
FROM stride6.term_mentions
WHERE familyHistory = 0
GROUP BY nid) as t
ON n.note_id = t.nid;
|
DROP TABLE person IF EXISTS;
CREATE TABLE `person` (
`person_id` bigint(20) NOT NULL,
`first_name` varchar(20) DEFAULT NULL,
`last_name` varchar(20) DEFAULT NULL,
`status` varchar(20) DEFAULT 'UNPROCESSED',
`data` JSON DEFAULT NULL,
PRIMARY KEY (`person_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
-- Create a materialized view use of wood for cooking. This is a join between the table "energy-for-cooking", sub_place
-- and wbr aoi.
CREATE MATERIALIZED VIEW public.mv_use_of_wood_for_cooking
AS
WITH limpopo_subplace AS (
SELECT a_1.*,
b_1.geom
FROM "energy-for-cooking" a_1
JOIN sub_place b_1 ON a_1.sp_code = b_1.sp_code
WHERE a_1.pr_name::text = 'Limpopo'::text
)
SELECT a.id,a.sal_code,a.sp_code,a.sp_name,a.mp_code,a.mp_name,a.mn_mdb_c,a.mn_code,
a.mn_name,a.dc_mdb_c,a.dc_code,a.dc_name,a.pr_code,a.pr_name,a.electricity,
a.gas,a.paraffin,a.wood,a.coal,a.animal_dung,a.solar,a.other,a.nothing,a.unspecified,a.not_applicable,
st_transform(st_intersection(a.geom,b.geom),32735) AS geom
FROM limpopo_subplace a
JOIN aoi_wbr b ON st_intersects(b.geom, a.geom);
-- Create a layer with statistics for the wood_for_cooking index
CREATE MATERIALIZED VIEW public.mv_use_of_wood_for_cooking_index AS
WITH sample AS (
SELECT a.id,a.sal_code,a.sp_code,a.sp_name,a.mp_code,
a.mp_name,a.mn_mdb_c,a.mn_code,a.mn_name,a.dc_mdb_c,a.dc_code,a.dc_name,a.pr_code,
a.pr_name,a.electricity,a.gas,a.paraffin,a.wood,a.coal,a.animal_dung,
a.solar,a.other,a.nothing,a.unspecified,a.not_applicable,
a.wood::double precision / st_area(a.geom) * 1000000::double precision AS wood_density,
a.geom
FROM mv_use_of_wood_for_cooking as a
)
SELECT sample.id,
sample.sp_code,
sample.sp_name,
CASE
WHEN (10::double precision * (sample.wood_density / (( SELECT percentile_cont(0.9::double precision)
WITHIN GROUP (ORDER BY sample_1.wood_density) AS percentile_cont
FROM sample sample_1)))) > 10::double precision THEN 10::double precision
ELSE 10::double precision * (sample.wood_density / (( SELECT percentile_cont(0.9::double precision)
WITHIN GROUP (ORDER BY sample_1.wood_density) AS percentile_cont
FROM sample sample_1)))
END AS index,
sample.geom
FROM sample
WITH DATA;
-- Create a materialized view use of wood for heating. This is a join between the table "energy-for-heating", sub_place
-- and wbr aoi.
CREATE MATERIALIZED VIEW public.mv_use_of_wood_for_heating
AS
WITH limpopo_subplace AS (
SELECT a_1.*,
b_1.geom
FROM "energy-for-heating" a_1
JOIN sub_place b_1 ON a_1.sp_code = b_1.sp_code
WHERE a_1.pr_name::text = 'Limpopo'::text
)
SELECT a.id, a.sal_code, a.sp_code, a.sp_name, a.mp_code, a.mp_name, a.mn_mdb_c, a.mn_code,
a.mn_name, a.dc_mdb_c, a.dc_code, a.dc_name, a.pr_code, a.pr_name, a.electricity, a.gas,
a.paraffin, a.wood, a.coal, a.animal_dung, a.solar, a.other, a.nothing, a.unspecified, a.not_applicable,
st_transform(st_intersection(a.geom,b.geom),32735) AS geom
FROM limpopo_subplace a
JOIN aoi_wbr b ON st_intersects(b.geom, a.geom);
-- Create a layer with statistics for the wood_for_heating index
CREATE MATERIALIZED VIEW public.mv_use_of_wood_for_heating_index AS
WITH sample AS (
SELECT a.id, a.sal_code, a.sp_code, a.sp_name, a.mp_code, a.mp_name, a.mn_mdb_c, a.mn_code, a.mn_name, a.dc_mdb_c, a.dc_code,
a.dc_name, a.pr_code, a.pr_name, a.electricity, a.gas, a.paraffin,
a.wood::double precision / st_area(a.geom) * 1000000::double precision AS wood_density, a.coal, a.animal_dung, a.solar, a.other,
a.nothing, a.unspecified, a.not_applicable, a.geom
FROM public.mv_use_of_wood_for_heating as a
)
SELECT sample.id,
sample.sp_code,
sample.sp_name,
CASE
WHEN (10::double precision * (sample.wood_density / (( SELECT percentile_cont(0.9::double precision)
WITHIN GROUP (ORDER BY sample_1.wood_density) AS percentile_cont
FROM sample sample_1)))) > 10::double precision THEN 10::double precision
ELSE 10::double precision * (sample.wood_density / (( SELECT percentile_cont(0.9::double precision)
WITHIN GROUP (ORDER BY sample_1.wood_density) AS percentile_cont
FROM sample sample_1)))
END AS index,
sample.geom
FROM sample
WITH DATA;
-- Create a materialized view supply of building materials. This is a join between the table "type-of-main-dwelling", sub_place
-- and wbr aoi.
CREATE MATERIALIZED VIEW public.mv_supply_of_building_materials
AS
WITH limpopo_subplace AS (
SELECT a_1.*,
b_1.geom
FROM "type-of-main-dwelling" a_1
JOIN sub_place b_1 ON a_1.sp_code = b_1.sp_code
WHERE a_1.pr_name::text = 'Limpopo'::text
)
SELECT a.id, a.sal_code, a.sp_code, a.sp_name, a.mp_code, a.mp_name, a.mn_mdb_c,
a.mn_code, a.mn_name, a.dc_mdb_c, a.dc_code, a.dc_name, a.pr_code, a.pr_name, a.brick_concrete,
a.traditional_dwelling, a.flat_apartment, a.cluster_house, a.townhouse, a.semi_detached_house,
a.house_flat_room_in_backyard, a.informal_dwelling, a.informal_dwelling_shack, a.room_flatlet, a.caravan_tent,
a.other, a.unspecified, a.not_applicable,
st_transform(st_intersection(a.geom,b.geom),32735) AS geom
FROM limpopo_subplace a
JOIN aoi_wbr b ON st_intersects(b.geom, a.geom);
-- Create a layer with statistics for the supply of building materials index
CREATE MATERIALIZED VIEW public.mv_supply_of_building_materials_index AS
WITH sample AS (
SELECT a.id, a.sal_code, a.sp_code, a.sp_name, a.mp_code, a.mp_name, a.mn_mdb_c, a.mn_code, a.mn_name,
a.dc_mdb_c, a.dc_code, a.dc_name, a.pr_code, a.pr_name, a.brick_concrete,
a.traditional_dwelling::double precision / st_area(a.geom) * 1000000::double precision AS dwelling_density,
a.flat_apartment, a.cluster_house, a.townhouse, a.semi_detached_house, a.house_flat_room_in_backyard,
a.informal_dwelling, a.informal_dwelling_shack, a.room_flatlet, a.caravan_tent, a.other, a.unspecified,
a.not_applicable, a.geom
FROM public.mv_supply_of_building_materials as a
)
SELECT sample.id,
sample.sp_code,
sample.sp_name,
CASE
WHEN (10::double precision * (sample.dwelling_density / (( SELECT percentile_cont(0.9::double precision)
WITHIN GROUP (ORDER BY sample_1.dwelling_density) AS percentile_cont
FROM sample sample_1)))) > 10::double precision THEN 10::double precision
ELSE 10::double precision * (sample.dwelling_density / (( SELECT percentile_cont(0.9::double precision)
WITHIN GROUP (ORDER BY sample_1.dwelling_density) AS percentile_cont
FROM sample sample_1)))
END AS index,
sample.geom
FROM sample
WITH DATA;
-- Create a materialized view supply of building materials. This is a join between the table "source-of-water", sub_place
-- and wbr aoi.
CREATE MATERIALIZED VIEW public.mv_direct_supply_of_water_from_the_environment
AS
WITH limpopo_subplace AS (
SELECT a_1.*,
b_1.geom
FROM "source-of-water" a_1
JOIN sub_place b_1 ON a_1.sp_code = b_1.sp_code
WHERE a_1.pr_name::text = 'Limpopo'::text
)
SELECT a.id, a.sal_code, a.sp_code, a.sp_name, a.mp_code, a.mp_name,
a.mn_mdb_c, a.mn_code, a.mn_name, a.dc_mdb_c, a.dc_code, a.dc_name, a.pr_code,
a.pr_name, a.regional_local_water_source, a.borehole, a.spring, a.rain_water,
a.dam_pool_stagnant_water, a.river_stream, a.water_vendor, a.water_tanker, a.other, a.not_applicable,
st_transform(st_intersection(a.geom,b.geom),32735) AS geom
FROM limpopo_subplace a
JOIN aoi_wbr b ON st_intersects(b.geom, a.geom);
-- Create a layer with statistics for direct supply of water from the environment index
CREATE MATERIALIZED VIEW public.mv_direct_supply_of_water_from_the_environment_index AS
WITH sample AS (
SELECT a.id, a.sp_code, a.sp_name,sum(a.borehole + a.spring + a.rain_water +a.dam_pool_stagnant_water
+ a.river_stream + a.water_tanker ) / st_area(a.geom) * 1000000::double precision AS water_density ,
a.geom
FROM public.mv_direct_supply_of_water_from_the_environment as a
group by (a.id,a.sp_code,a.sp_name, a.geom)
)
SELECT sample.id,
sample.sp_code,
sample.sp_name,
CASE
WHEN (10::double precision * (sample.water_density / (( SELECT percentile_cont(0.9::double precision)
WITHIN GROUP (ORDER BY sample_1.water_density) AS percentile_cont
FROM sample sample_1)))) > 10::double precision THEN 10::double precision
ELSE 10::double precision * (sample.water_density / (( SELECT percentile_cont(0.9::double precision)
WITHIN GROUP (ORDER BY sample_1.water_density) AS percentile_cont
FROM sample sample_1)))
END AS index,
sample.geom
FROM sample
WITH DATA;
-- Poverty Index Calculations
-- Create a materialized view dependency ratio . This is a join between the table "employment-status-hhold-head", sub_place
-- and wbr aoi.
CREATE MATERIALIZED VIEW public.mv_dependency_ratio
AS
WITH limpopo_subplace AS (
SELECT a_1.*,
b_1.geom
FROM "employment-status-hhold-head" a_1
JOIN sub_place b_1 ON a_1.sp_code = b_1.sp_code
WHERE a_1.pr_name::text = 'Limpopo'::text
)
SELECT a.id, a.sal_code, a.sp_code, a.sp_name, a.mp_code, a.mp_name,
a.mn_mdb_c, a.mn_code, a.mn_name, a.dc_mdb_c, a.dc_code, a.dc_name, a.pr_code, a.pr_name, a.employed,
a.unemployed, a.dosicoraged_worker_seeker, a.not_economically_active, a.less_than_15,
st_transform(st_intersection(a.geom,b.geom),32735) AS geom
FROM limpopo_subplace a
JOIN aoi_wbr b ON st_intersects(b.geom, a.geom);
-- Create a layer with statistics for dependency ratio index
CREATE MATERIALIZED VIEW public.mv_dependency_ratio_index AS
SELECT id, sp_code, sp_name,
case when employed = 0 then
0 else
round((100 - ((sum(unemployed::decimal + dosicoraged_worker_seeker::decimal
+ not_economically_active::decimal + less_than_15::decimal) / employed::decimal)/100))/10,4)
end AS "index",geom
FROM public.mv_dependency_ratio
group by (id,sp_code,sp_name,geom,employed,unemployed,dosicoraged_worker_seeker,not_economically_active,less_than_15) ;
-- Create a materialized view proportion of low-income households .
-- This is a join between the table "annual-household-income", sub_place
-- and wbr aoi.
CREATE MATERIALIZED VIEW public.mv_proportion_of_low_income_households
AS
WITH limpopo_subplace AS (
SELECT a_1.*,
b_1.geom
FROM "annual-household-income" a_1
JOIN sub_place b_1 ON a_1.sp_code = b_1.sp_code
WHERE a_1.pr_name::text = 'Limpopo'::text
)
SELECT a.id, a.sal_code, a.sp_code, a.sp_name, a.mp_code, a.mp_name,
a.mn_mdb_c, a.mn_code, a.mn_name, a.dc_mdb_c, a.dc_code, a.dc_name, a.pr_code,
a.pr_name, a.no_income, a."1-4800k", a."4801-9600", a."9601-19600", a."19601-38200",
a."38201-76400", a."76401-153800", a."153801-307600", a."307601-614400",
a."614001-1228800", a."1228801-2457600", a."greater than 24576001", a.unspecified,
st_transform(st_intersection(a.geom,b.geom),32735) AS geom
FROM limpopo_subplace a
JOIN aoi_wbr b ON st_intersects(b.geom, a.geom);
-- Create a layer with statistics for dependency ratio index
CREATE MATERIALIZED VIEW public.proportion_of_low_income_households_index AS
WITH sample AS (
SELECT a.id, a.sp_code, sum(a.no_income + a."1-4800k" + a."4801-9600") / st_area(a.geom) * 1000000::decimal
as income_density, geom
FROM public.mv_proportion_of_low_income_households as a
group by (a.id, a.sp_code,geom)
)
SELECT sample.id,
sample.sp_code,
CASE WHEN
(sample.income_density / (( SELECT percentile_cont(0.9::decimal)
WITHIN GROUP (ORDER BY sample_1.income_density) AS percentile_cont
FROM sample sample_1))) > 10 THEN 10
ELSE
(sample.income_density / (( SELECT percentile_cont(0.9::decimal)
WITHIN GROUP (ORDER BY sample_1.income_density) AS percentile_cont
FROM sample sample_1)))
END AS "index" ,sample.geom
FROM sample; |
DROP TABLE IF EXISTS friendships CASCADE;
CREATE TABLE friendships(
id SERIAL PRIMARY KEY,
sender_id INTEGER REFERENCES users(id) NOT NULL,
receiver_id INTEGER REFERENCES users(id) NOT NULL,
accepted BOOLEAN DEFAULT FALSE NOT NULL
);
|
SELECT world.country.Continent, count(world.country.Continent)
FROM world.country
GROUP BY world.country.Continent
ORDER BY world.country.Continent ASC;
|
select consultas.votante
, count(consultas.idconsulta)
from consultas
where consultas.votante not in
(
select votantes.dni
from votantes
where votantes.fechanacimiento =
(
select min(votantes.fechanacimiento)
from votantes
where votantes.fechanacimiento > (
select min(votantes.fechanacimiento)
from votantes
)
)
)
group by consultas.votante
order by count(consultas.idconsulta) desc; |
REPLACE INTO `roles` VALUES (1,'ADMIN');
REPLACE INTO `roles` VALUES (2,'USER');
REPLACE INTO `roles` VALUES (3,'USER');
REPLACE INTO `roles` VALUES (4,'USER');
REPLACE INTO `roles` VALUES (5,'USER');
REPLACE INTO `roles` VALUES (6,'USER'); |
#DROP TABLE IF EXISTS `idx_weight`;
CREATE TABLE `idx_weight` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`trade_date` char(8) NOT NULL COMMENT '交易日期',
`index_code` varchar(20) NOT NULL COMMENT '指数代码',
`con_code` varchar(20) NOT NULL COMMENT '成分代码',
`weight` float DEFAULT NULL COMMENT '权重',
PRIMARY KEY (`id`),
UNIQUE KEY `idwt_tdiccc` (`trade_date`,`index_code`,`con_code`) USING BTREE,
KEY `idwt_tdicc_n` (`trade_date`,`index_code`),
KEY `idx_wht_ic` (`index_code`)
) ENGINE=InnoDB; |
-- create database for stanford course
create database stanford_course_db
/**
delete an existing database
*/
--drop database test_db
--backup database : create a full back up of an existing sql database
/**
backup database stanford_course_db
to disk = 'F:\programming music\stanford_course_buckup_db';
*/
-- backup only the different between the last backup and the current version of the db
/**
backup database stanford_course_db
to disk = 'F:\programming music\stanford_course_buckup_db'
with DIFFERENTIAL;
*/
--create student table
/*
create table Student(
ID int,
name varchar(50),
GPA int,
photo varbinary(8000)
);
**/
--create faculty table
/*
create table Faculty(
name varchar(50),
state char(2),
enrollment int
);
**/ |
delete from `{prefix}ix_files_types` where extension = 'dvi'; |
-- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Tempo de geração: 22-Maio-2021 às 22:27
-- Versão do servidor: 10.4.18-MariaDB
-- versão do PHP: 7.3.27
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 */;
--
-- Banco de dados: `cambio`
--
-- --------------------------------------------------------
--
-- Estrutura da tabela `operacoes`
--
CREATE TABLE `operacoes` (
`idNome` int(11) NOT NULL,
`cliente` varchar(255) NOT NULL,
`moedaOrigem` varchar(3) NOT NULL,
`moedaDestino` varchar(3) NOT NULL,
`dataOperacao` date NOT NULL,
`valorOriginal` float NOT NULL,
`valorConvertido` float NOT NULL,
`taxaCobrada` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Extraindo dados da tabela `operacoes`
--
INSERT INTO `operacoes` (`idNome`, `cliente`, `moedaOrigem`, `moedaDestino`, `dataOperacao`, `valorOriginal`, `valorConvertido`, `taxaCobrada`) VALUES
(368, 'Ralf Lima', 'USD', 'BRL', '2021-05-21', 5000, 26720, 2672),
(369, 'Marcelo Bernart Schmidt', 'EUR', 'BRL', '2021-05-21', 750, 4880.25, 488),
(372, 'Marcio Michelluzzi', 'USD', 'Sel', '2021-05-21', 1500, 8016, 802);
--
-- Índices para tabelas despejadas
--
--
-- Índices para tabela `operacoes`
--
ALTER TABLE `operacoes`
ADD PRIMARY KEY (`idNome`);
--
-- AUTO_INCREMENT de tabelas despejadas
--
--
-- AUTO_INCREMENT de tabela `operacoes`
--
ALTER TABLE `operacoes`
MODIFY `idNome` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=383;
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 */;
|
SELECT
t_device_measurement.channel,
t_device_measurement.pedestal,
t_device_measurement.sigma_raw,
t_device_measurement.sigma,
t_device_measurement.bad_channel,
current_device.device_kind,
current_device.location_code,
current_device.device_type,
current_device.device_code,
current_device.connector,
current_device.test_kind,
current_device.test_date
FROM t_device_measurement INNER JOIN
(SELECT
t_device.kind AS device_kind,
t_device.code AS device_code,
t_device.type AS device_type,
t_device.connector AS connector,
t_location.code AS location_code,
current_device_test.kind AS test_kind,
current_device_test.date AS test_date,
current_device_test.device_fk,
current_device_test.device_test_pk AS device_test_pk
FROM t_device LEFT JOIN
(SELECT
device_test_pk,
kind,
date,
device_fk
FROM t_device_test AS device_test WHERE
(date = (select MAX(date) FROM t_device_test WHERE
(kind = device_test.kind) AND
(device_fk = device_test.device_fk)))) AS current_device_test
ON (t_device.device_pk = current_device_test.device_fk) LEFT JOIN t_location
ON (t_device.location_fk = t_location.location_pk)) AS current_device
ON (t_device_measurement.device_test_fk = current_device.device_test_pk);
|
UPDATE rmgc20zly.students
SET
name ='Lisa-Jimmy',
sex = 1,
birthday = '2006/3/29'
WHERE id = 2;
|
# Modelo entidad relacion (MER) de la base de datos (DB-RDM/MER-BD)
# Crear la base de datos
create database if not exists blog default character set utf8 collate utf8_general_ci;
# Usar la base de datos blog
use blog;
# Crea tabla usuarios
create table if not exists users(
# Define campos, dimensiones, tipos
id int( 255 ) auto_increment not null,
name varchar( 255 ),
surname varchar( 255 ),
email varchar( 255 ),
password varchar( 255 ),
role varchar( 20 ),
image varchar( 255 ),
# Define restricciones
constraint pk_users primary key( id )
) engine = innodb;
# Crea tabla categorias
create table if not exists categories(
# Define campos, dimensiones, tipos
id int( 255 ) auto_increment not null,
name varchar( 255 ),
description text,
# Define restricciones
constraint pk_categories primary key( id )
) engine = innodb;
# Crea tabla de entradas
create table if not exists entries(
# Define campos, dimensiones, tipos
id int( 255 ) auto_increment not null,
user_id int( 255 ) not null,
category_id int( 255 ) not null,
title varchar( 255 ),
content text,
status varchar( 20 ),
image varchar( 255 ),
# Define restricciones
constraint pk_entries primary key( id ),
constraint fk_entries_users foreign key( user_id ) references users( id ),
constraint fk_entries_categories foreign key( category_id ) references categories( id )
) engine = innodb;
# Crea tabla de Tags
create table if not exists tags(
# Define campos, dimensiones, tipos
id int( 255 ) auto_increment not null,
name varchar( 255 ),
description text,
# Define restricciones
constraint pk_tags primary key( id )
) engine = innodb;
# Tabla pivote entre las tablas entries y tags
create table if not exists entry_tag(
# Define campos, dimensiones, tipos
id int( 255 ) auto_increment not null,
entry_id int( 255 ) not null,
tag_id int( 255 ) not null,
# Define restricciones
constraint pk_entry_tag primary key( id ),
constraint fk_entry_tag_entries foreign key( entry_id ) references entries( id ),
constraint fk_entry_tag_tags foreign key( tag_id ) references tags( id )
) engine = innodb;
|
CREATE TABLE "comment" (
rate int DEFAULT 0,
user_comment varchar(1024) DEFAULT NULL,
username varchar(50),
movie_id int,
PRIMARY KEY (username, movie_id),
FOREIGN KEY (username) REFERENCES "user" (username) ON DELETE CASCADE,
FOREIGN KEY (movie_id) REFERENCES "movie" (movie_id) ON DELETE CASCADE,
CHECK (rate IN (0, 1, 2, 3, 4, 5))
); |
/*
Navicat MySQL Data Transfer
Source Server : wchm-website-test
Source Server Version : 50557
Source Host : 120.25.124.62:3306
Source Database : website
Target Server Type : MYSQL
Target Server Version : 50557
File Encoding : 65001
Date: 2018-12-14 15:20:10
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for eacoo_users
-- ----------------------------
DROP TABLE IF EXISTS `eacoo_users`;
CREATE TABLE `eacoo_users` (
`uid` int(11) unsigned NOT NULL AUTO_INCREMENT,
`username` varchar(32) NOT NULL DEFAULT '' COMMENT '用户名',
`number` char(10) DEFAULT '' COMMENT '会员编号',
`password` char(32) NOT NULL DEFAULT '' COMMENT '登录密码',
`nickname` varchar(60) NOT NULL DEFAULT '' COMMENT '用户昵称',
`email` varchar(100) NOT NULL DEFAULT '' COMMENT '登录邮箱',
`githob_token` varchar(255) NOT NULL DEFAULT '',
`token` varchar(255) DEFAULT NULL COMMENT '用户中心',
`mobile` varchar(20) DEFAULT '' COMMENT '手机号',
`avatar` varchar(150) DEFAULT '' COMMENT '用户头像,相对于uploads/avatar目录',
`sex` smallint(1) unsigned DEFAULT '0' COMMENT '性别;0:保密,1:男;2:女',
`birthday` date DEFAULT NULL COMMENT '生日',
`description` varchar(200) DEFAULT '' COMMENT '个人描述',
`register_ip` varchar(16) DEFAULT '' COMMENT '注册IP',
`login_num` tinyint(1) unsigned DEFAULT '0' COMMENT '登录次数',
`last_login_ip` varchar(16) DEFAULT '' COMMENT '最后登录ip',
`last_login_time` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '最后登录时间',
`activation_auth_sign` varchar(60) DEFAULT '' COMMENT '激活码',
`url` varchar(100) DEFAULT '' COMMENT '用户个人网站',
`score` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '用户积分',
`money` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '金额',
`freeze_money` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '冻结金额,和金币相同换算',
`pay_pwd` char(32) DEFAULT '' COMMENT '支付密码',
`reg_from` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '注册来源。1PC端,2WAP端,3微信端,4APP端,5后台添加',
`reg_method` varchar(30) NOT NULL DEFAULT '' COMMENT '注册方式。wechat,sina,等',
`level` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '等级',
`p_uid` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '推荐人会员ID',
`allow_admin` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '允许后台。0不允许,1允许',
`reg_time` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '注册时间',
`status` tinyint(1) unsigned NOT NULL DEFAULT '2' COMMENT '用户状态 0:禁用; 1:正常 ;2:待验证',
`email_state` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '邮箱状态 0:带验证; 1:正常',
`lng` varchar(10) DEFAULT NULL COMMENT '语言',
`interest` tinyint(1) DEFAULT '0' COMMENT '兴趣爱好',
`lock_status` tinyint(1) DEFAULT '0' COMMENT '锁仓状态:0没有锁仓 1锁仓',
`address` varchar(255) DEFAULT '''''' COMMENT '以太坊钱包地址',
`realname` varchar(20) DEFAULT '''''' COMMENT '真实姓名',
`idcard` varchar(32) DEFAULT '''''' COMMENT '身份证号码',
PRIMARY KEY (`uid`) USING BTREE,
UNIQUE KEY `uniq_number` (`number`) USING BTREE,
KEY `idx_username` (`username`) USING BTREE,
KEY `idx_email` (`email`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=145 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='用户表';
-- ----------------------------
-- Records of eacoo_users
-- ----------------------------
INSERT INTO `eacoo_users` VALUES ('1', 'admin', '', '031c9ffc4b280d3e78c750163d07d275', '创始人', '846852421@qq.com', '', 'f4c32b66093465603f2d0b10223dd9babfd22fa3', '15013695114', '/static/assets/img/avatar-man.png', '0', '0000-00-00', '', '', '0', '113.116.114.123', '1542001928', '6fb948d4e599f5f556e1638c057f95d08273c643', '', '0', '0.00', '0.00', '', '0', '', '0', '0', '1', '1537424284', '2', '1', 'cn', '0', '1', '111', '郑创城', '2222');
INSERT INTO `eacoo_users` VALUES ('3', 'U1471610993', '9948511005', '031c9ffc4b280d3e78c750163d07d275', '陈婧', '', '', '', '', '/static/assets/img/avatar-woman.png', '2', null, '', null, '0', null, '1473755335', 'a525c9259ff2e51af1b6e629dd47766f99f26c69', null, '0', '2.00', '0.00', '', '0', '', '0', '0', '0', '1518696015', '1', '0', null, '0', '0', '\'\'', '\'\'', '\'\'');
INSERT INTO `eacoo_users` VALUES ('4', 'U1472438063', '9752985498', '031c9ffc4b280d3e78c750163d07d275', '妍冰', '', '', '', '', '/static/assets/img/avatar-woman.png', '2', null, '承接大型商业演出和传统文化学习班', null, '0', null, '1472438634', 'ed587cf103c3f100be20f7b8fdc7b5a8e2fda264', null, '0', '0.00', '0.00', '', '0', '', '0', '0', '0', '1518696015', '1', '0', null, '0', '0', '\'\'', '\'\'', '\'\'');
INSERT INTO `eacoo_users` VALUES ('5', 'U1472522409', '9849571025', '031c9ffc4b280d3e78c750163d07d275', '久柳', '', '', '', '', '/static/assets/img/avatar-man.png', '1', null, '', null, '0', null, '1472522621', '5e542dc0c77b3749f2270cb3ec1d91acc895edc8', null, '0', '0.00', '0.00', '', '0', '', '0', '0', '0', '1518696015', '2', '0', 'en', '0', '0', '\'\'', '\'\'', '\'\'');
INSERT INTO `eacoo_users` VALUES ('6', 'U1472739566', '5051101100', '031c9ffc4b280d3e78c750163d07d275', 'Ray', '', '', '', '', '/uploads/avatar/6/5a8ada8f72ac0.jpg', '1', null, '', null, '0', null, '1472739567', '6321b4d8ecb1ce1049eab2be70c44335856c840d', null, '0', '0.00', '0.00', '', '0', '', '0', '0', '1', '1518696015', '1', '0', null, '0', '0', '\'\'', '\'\'', '\'\'');
INSERT INTO `eacoo_users` VALUES ('8', 'U1472877421', '5497481009', '031c9ffc4b280d3e78c750163d07d275', '印文博律师', '', '', '', '', '/static/assets/img/avatar-man.png', '1', null, '', null, '0', null, '1473494692', 'e99521af40a282e84718f759ab6b1b4a989d8eb1', null, '0', '0.00', '0.00', '', '0', '', '0', '0', '0', '1518696015', '1', '0', null, '0', '0', '\'\'', '\'\'', '\'\'');
INSERT INTO `eacoo_users` VALUES ('9', 'U1472966655', '1004810149', '031c9ffc4b280d3e78c750163d07d275', '嘉伟', '', '', '', '', '/static/assets/img/avatar-man.png', '1', null, '', null, '0', null, '1473397571', 'f1075223be5f53b9c2c1abea8288258545365d96', null, '0', '0.00', '0.00', '', '0', '', '0', '0', '0', '1518696015', '1', '0', null, '0', '0', '\'\'', '\'\'', '\'\'');
INSERT INTO `eacoo_users` VALUES ('10', 'U1473304718', '9852101101', '031c9ffc4b280d3e78c750163d07d275', '鬼谷学猛虎流', '', '', '', '15801182191', '/static/assets/img/avatar-man.png', '1', null, '', null, '0', null, '1473399843', '039fc7a3f9366adf55ee9e707c371a2459c17bd7', null, '0', '0.00', '0.00', '', '0', '', '0', '0', '0', '1518696015', '1', '0', null, '0', '0', '\'\'', '\'\'', '\'\'');
INSERT INTO `eacoo_users` VALUES ('11', 'U1473391063', '1004810150', '031c9ffc4b280d3e78c750163d07d275', '@Gyb.', '', '', '', '', '/uploads/avatar/11/59e32aa3a75a2.jpg', '1', null, '', null, '0', null, '1473391063', '70d80a9f7599c81270a986abaea73e63101b3ecb', null, '0', '0.00', '0.00', '', '0', '', '0', '0', '0', '1518696015', '1', '0', null, '0', '0', '\'\'', '\'\'', '\'\'');
INSERT INTO `eacoo_users` VALUES ('12', 'U1473396778', '5310148501', '031c9ffc4b280d3e78c750163d07d275', '董超楠', '', '', '', '', '/static/assets/img/avatar-woman.png', '2', null, '', null, '0', null, '1473396778', '8bbf5242300e5e8e4917b287a31efcb0c9feedfd', null, '0', '0.00', '0.00', '', '0', '', '0', '0', '0', '1518696015', '1', '0', null, '0', '0', '\'\'', '\'\'', '\'\'');
INSERT INTO `eacoo_users` VALUES ('14', 'U1473396839', '4853979757', '031c9ffc4b280d3e78c750163d07d275', '求真实者', '', '', '', '', '/static/assets/img/default-avatar.png', '0', null, '', null, '0', null, '1473396839', '8f7579a85981e1c1f726704b0865320dfadbef2e', null, '0', '0.00', '0.00', '', '0', '', '0', '0', '0', '1518696015', '1', '0', null, '0', '0', '\'\'', '\'\'', '\'\'');
INSERT INTO `eacoo_users` VALUES ('15', 'U1473397391', '9810148101', '031c9ffc4b280d3e78c750163d07d275', 'peter', '', '', '', '', '/uploads/avatar/15/5a9d1473d4c91.png', '2', null, '', null, '0', null, '1473397391', 'c66d3a0e16a81a13173756a2832ba424b34a095c', null, '0', '0.00', '0.00', '', '0', '', '0', '0', '0', '1518696015', '1', '0', null, '0', '0', '\'\'', '\'\'', '\'\'');
INSERT INTO `eacoo_users` VALUES ('16', 'U1473397426', '1015057995', '031c9ffc4b280d3e78c750163d07d275', '随风而去的心情', '', '', '', '15801182190', '/static/assets/img/avatar-man.png', '1', null, '大师傅', null, '0', null, '1473397426', '14855b00775de46b451c8255e6a73a5c044fc188', null, '0', '0.00', '0.00', '', '0', '', '0', '0', '0', '1518696015', '1', '0', null, '0', '0', '\'\'', '\'\'', '\'\'');
INSERT INTO `eacoo_users` VALUES ('17', 'U1474181145', '5551564851', '031c9ffc4b280d3e78c750163d07d275', '班鱼先生', '', '', '', '', '/static/assets/img/avatar-man.png', '1', null, '', null, '0', null, '1474181146', '86d19a7b1f15db4fd25e0b64bfc17870a70f67e2', null, '0', '0.00', '0.00', '', '0', '', '0', '0', '0', '1518696015', '1', '0', null, '0', '0', '\'\'', '\'\'', '\'\'');
INSERT INTO `eacoo_users` VALUES ('60', 'suannai123', '1029998505', '031c9ffc4b280d3e78c750163d07d275', '1234', '846952421@qq.com', '', '4b9584aecff39cc966ce88d622da0ec66040cb83', '', '', '0', '0000-00-00', '', '116.25.96.26', '0', '116.25.96.26', '1540805999', 'a28cc727e8d99cd67c275c5ec59e7a4b5b2ce843', '', '0', '0.00', '0.00', '', '0', '', '0', '0', '0', '1540805999', '2', '0', 'en', '2', '0', '\'\'', '\'\'', '\'\'');
INSERT INTO `eacoo_users` VALUES ('93', 'liukai', '1025455101', '6b438622d475b03086a530439f559d9b', 'aaaa', '790369221@qq.com', '', '90407e56b72bd1141826396c719d696f76ccbfcc', '', '', '0', '0000-00-00', '', '116.25.96.26', '0', null, '1540889135', '9f7da8fd30da833e5321db98e8fe8f367521fbb8', '', '0', '0.00', '0.00', '', '0', '', '0', '0', '0', '1540889135', '2', '0', 'en', '1', '0', '\'\'', '\'\'', '\'\'');
INSERT INTO `eacoo_users` VALUES ('96', 'liudehua', '9753505710', '031c9ffc4b280d3e78c750163d07d275', '刘德华', '2562526879@qq.com', '', '1be05c642443906bba39a0920b6b592c8275317a', '', '', '0', '0000-00-00', '', '116.25.96.26', '0', '116.25.96.26', '1540891354', 'b9f4e1c325dd8f8d011bb748e961e7ce8eb667d9', '', '0', '0.00', '0.00', '', '0', '', '0', '0', '0', '1540891354', '2', '0', 'cn', '2', '0', '\'\'', '\'\'', '\'\'');
INSERT INTO `eacoo_users` VALUES ('113', '惠鹏曦', '9749101575', '031c9ffc4b280d3e78c750163d07d275', '陈俊鹏', '1659253001@qq.com', '', 'b4626dd35092eedabbc8f69acae6e4d9024d4bd6', '13543986022', '', '0', '0000-00-00', '', '113.116.113.148', '0', '116.25.98.9', '1542333119', '20763cd8ed8d3ee204111052633e34b05f4ecc6a', '', '0', '0.00', '0.00', '', '0', '', '0', '0', '0', '1541040778', '2', '1', 'en', '0', '1', 'asdasdasdassxasx1321321321', 'cjp', '44522419916033132');
INSERT INTO `eacoo_users` VALUES ('115', '惠鹏曦', '4810148485', '031c9ffc4b280d3e78c750163d07d275', '123456', '1659253001@qq.com', '', 'ae92105e3f5672ae92d3085557a5f98fb83db829', '', '', '0', null, '', '116.25.97.88', '0', '116.25.97.88', '1541130769', 'd12af98f65a1c96a5b606526eb80ec43d1262fa4', '', '0', '0.00', '0.00', '', '0', '', '0', '0', '0', '1541130768', '1', '1', 'en', '0', '0', '\'\'', '\'\'', '\'\'');
INSERT INTO `eacoo_users` VALUES ('116', 'Roger', '1005555545', 'e5e0eb77dfe15cbb21013089f9e8ad0b', 'ZhangQi', '644915228@qq.com', '', 'c1c9288ee633a8e66599ff8e59e7647ef7d80ade', '', '', '0', null, '', '42.200.172.158', '0', '42.200.172.158', '1541419878', '17185422f564a6619068bc3968e03636b523a623', '', '0', '0.00', '0.00', '', '0', '', '0', '0', '0', '1541419629', '2', '1', 'cn', '0', '0', '\'\'', '\'\'', '\'\'');
INSERT INTO `eacoo_users` VALUES ('117', '创城', '9849974810', '031c9ffc4b280d3e78c750163d07d275', '郑创城', '15013695114@163.com', '', '94b3d41a2d5178402b7e7958d63130727178b04c', '13750467531', '', '0', null, '', '116.25.99.101', '0', '42.200.104.153', '1541485086', 'e60c99944533f2a7fa39376447f3f040dd435d28', '', '0', '0.00', '0.00', '', '0', '', '0', '0', '0', '1541420523', '2', '1', 'cn', '0', '1', 'sadasdasd asdasd as', '郑传承', '4555421564879831321');
INSERT INTO `eacoo_users` VALUES ('128', 'HAO', '1019852551', '005d9956b0ad6eaaeb5b902a8dc8f4a9', 'pop3213', 'sam771195@yahoo.com.tw', '', '49af784b412a4ec9be8136c08d54235ce2367213', '', '', '0', null, '', '36.238.90.118', '0', '36.238.90.118', '1541528656', '45fed9e24176f859ed58976182419d21e376c20e', '', '0', '0.00', '0.00', '', '0', '', '0', '0', '0', '1541528542', '2', '0', 'cn', '3', '0', '\'\'', '\'\'', '\'\'');
INSERT INTO `eacoo_users` VALUES ('129', 'kk0820', '5098525257', '10d62083b1d7bb1d124418e470daf64b', 'jamie', '3550433496@qq.com', '', '3831feacd9b3dc0fbd1abc9530e92f371957a04f', '', '', '0', null, '', '183.11.203.155', '0', '113.116.114.123', '1542010519', 'c42d67f751c574c9038fc6b063ff25d71750a87e', '', '0', '0.00', '0.00', '', '0', '', '0', '0', '0', '1541554402', '2', '1', 'cn', '4', '0', '\'\'', '\'\'', '\'\'');
INSERT INTO `eacoo_users` VALUES ('131', '15575117391', '9710055544', '1c465657e9a23f7c370ee48740b52d7a', '谭祥永', '348273997@qq.com', '', '77eb497475ddddbea3cdda136e8c445f2c43c8e4', '', '', '0', null, '', '175.10.36.18', '0', '220.202.232.189', '1542467457', '5b2e8a33d9b636b5ef3f9ef723392e1d9b1ef12d', '', '0', '0.00', '0.00', '', '0', '', '0', '0', '0', '1541584170', '2', '1', 'cn', '3', '0', '\'\'', '\'\'', '\'\'');
INSERT INTO `eacoo_users` VALUES ('132', '630014047', '1005498565', '1a83a82e51e1d989846292d36cd0cdcf', '陈俊兆', '630014047@qq.com', '', '5294fc23c38d2dcf07a4dea493afabfb4602b1a4', '', '', '0', null, '', '121.31.246.103', '0', '121.31.246.103', '1541639716', 'ba89ee59a198f59931827b20e46849cc7693332b', '', '0', '0.00', '0.00', '', '0', '', '0', '0', '0', '1541639613', '2', '1', 'cn', '4', '0', '\'\'', '\'\'', '\'\'');
INSERT INTO `eacoo_users` VALUES ('133', '13577705372', '9798100102', '4006b8e03ed16ee0ae7bcf07feed7cdb', '胡万权', '836907835@qq.com', '', '095ad485c5b43c076c0ef2317a8fbf8f5de1e063', '13602594636', '', '0', null, '', '182.246.167.94', '0', '182.246.167.94', '1541641384', '6895b6741929836e64f5a7f1501e556abee4cfd7', '', '0', '0.00', '0.00', '', '0', '', '0', '0', '0', '1541641002', '2', '1', 'cn', '3', '1', '0xA13FEDE3DdbB23623F9AA6E3d72Cd445755C3958', '胡万权', '530402199611140678');
-- ----------------------------
-- Table structure for website_admin
-- ----------------------------
DROP TABLE IF EXISTS `website_admin`;
CREATE TABLE `website_admin` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`username` varchar(16) DEFAULT '' COMMENT '用户名',
`password` varchar(50) DEFAULT NULL COMMENT '密码',
`mobile` varchar(11) NOT NULL COMMENT '移动电话',
`state` int(1) NOT NULL DEFAULT '1' COMMENT '启用:1,禁用:0',
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='后台管理账户';
-- ----------------------------
-- Records of website_admin
-- ----------------------------
INSERT INTO `website_admin` VALUES ('11', 'zhanglixiang', 'e10adc3949ba59abbe56e057f20f883e', '13317071015', '1', '2018-10-29 16:36:00');
INSERT INTO `website_admin` VALUES ('12', 'wchm', '6b6108df345c69c198df0603aabc023a', '15648754451', '1', '2018-10-19 16:14:43');
INSERT INTO `website_admin` VALUES ('13', 'jiangwenjian', '96e79218965eb72c92a549dd5a330112', '13537559068', '1', '2018-10-31 09:52:36');
INSERT INTO `website_admin` VALUES ('14', '1111', '96e79218965eb72c92a549dd5a330112', '15111111111', '0', '2018-11-01 14:28:43');
-- ----------------------------
-- Table structure for website_admin_role
-- ----------------------------
DROP TABLE IF EXISTS `website_admin_role`;
CREATE TABLE `website_admin_role` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uid` int(11) NOT NULL COMMENT 'website_admin表id',
`rid` int(11) NOT NULL COMMENT 'website_role表id',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='用户-角色表';
-- ----------------------------
-- Records of website_admin_role
-- ----------------------------
INSERT INTO `website_admin_role` VALUES ('1', '12', '1');
INSERT INTO `website_admin_role` VALUES ('2', '12', '2');
INSERT INTO `website_admin_role` VALUES ('12', '11', '2');
INSERT INTO `website_admin_role` VALUES ('13', '13', '3');
INSERT INTO `website_admin_role` VALUES ('14', '14', '3');
-- ----------------------------
-- Table structure for website_advance_booking
-- ----------------------------
DROP TABLE IF EXISTS `website_advance_booking`;
CREATE TABLE `website_advance_booking` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
`user_name` varchar(50) NOT NULL COMMENT '名字',
`sur_name` varchar(50) DEFAULT NULL COMMENT '姓氏',
`mobile` varchar(20) NOT NULL COMMENT '手机号码',
`email` varchar(50) NOT NULL COMMENT '邮箱',
`address` varchar(100) NOT NULL COMMENT '钱包地址',
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
`investment` varchar(200) DEFAULT NULL COMMENT '1.个人投资/2.基金投资',
`dollar` varchar(500) DEFAULT NULL COMMENT '预售投资金额',
`currency` varchar(200) DEFAULT NULL COMMENT '投资货币(1.BTC 2.ETH 3.TUSD)',
`account` varchar(255) DEFAULT NULL COMMENT '电脑账号',
`country` varchar(255) DEFAULT NULL COMMENT '所在国家',
`park_eco` varchar(200) DEFAULT NULL COMMENT 'parkEco(1.口口相传2.电报 3.媒体出版物 4.互联网 5.一次会议 6.我们目前投资者之一 7.其他) ',
`feedback` varchar(500) DEFAULT NULL COMMENT '反馈意见',
`state` int(1) DEFAULT '1' COMMENT '是否有效(1有效,0无效)',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=22 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='预售信息表';
-- ----------------------------
-- Records of website_advance_booking
-- ----------------------------
INSERT INTO `website_advance_booking` VALUES ('1', '小白', '张', '13317071014', 'zlx_ooo@126.com', '0x5A0b54D5dc17e0AadC383d2db43B0a0D3E029c4c', '2018-10-10 15:07:12', '2', '1000000', '1', 'administrator', '中国', '4', '没有可反馈的意见', '1');
INSERT INTO `website_advance_booking` VALUES ('2', '子龙', '赵', '0755', '1185223710@qq.com', '深圳', '2018-10-19 06:00:48', '1', '1000000', '1', '112', '中国', '6', '投资有风险,入市需谨慎!', '1');
INSERT INTO `website_advance_booking` VALUES ('3', '1', '2', '2', '2', '2', '2018-09-25 00:00:00', '2', '2', '2', '2', '2', '2', '2', '1');
INSERT INTO `website_advance_booking` VALUES ('4', 'a', 'a', 'a', 'zlx_ooo@126.com', 'sdfsafasdfsafsdfsdfasf', '2018-09-25 00:00:00', '2', 'sadfas', '2', 'asfd', 'sadf', '1', 'asdf', '1');
INSERT INTO `website_advance_booking` VALUES ('5', '阿斯蒂芬', 'sfd', 'sf', 'wchm@wchm88.com', 'adsgrhgfgdfdfsdf', '2018-09-25 00:00:00', '1', '23412', '2', 'zhanglixiang', 'wfsd', '6', 'sdf', null);
INSERT INTO `website_advance_booking` VALUES ('6', '冯', '提莫', '0755', '7220354', '深圳', '2018-10-26 16:58:47', '1', '10000', '1', '112', '中国', '6', '投资有风险,入市需谨慎!', '1');
INSERT INTO `website_advance_booking` VALUES ('7', '测试', '测试', '13537550000', '测试@qq.com', '513', '2018-11-01 16:21:59', 'Individual', '1000005', 'ETH', '1', 'CN', 'Media publication', 'W', '1');
INSERT INTO `website_advance_booking` VALUES ('8', '测试', '测试', '13537550000', '测试@qq.com', '513', '2018-11-01 16:22:52', 'Individual', '1000005', 'ETH', '1', 'CN', 'Media publication', 'W', '1');
INSERT INTO `website_advance_booking` VALUES ('9', '测试', '测试', '13537550000', '测试@qq.com', '513', '2018-11-01 16:29:15', 'Fund', '1000005', 'ETH', '1', 'CN', 'word of mouth', 'W', '1');
INSERT INTO `website_advance_booking` VALUES ('10', '测试', '测试', '13537550000', '测试@qq.com', '513', '2018-11-01 16:30:05', 'Fund', '1000005', 'ETH', '1', 'CN', 'Telegram', 'W', '1');
INSERT INTO `website_advance_booking` VALUES ('11', '测试', '测试', '13537550000', '测试@qq.com', '513', '2018-11-01 16:30:08', 'Fund', '1000005', 'ETH', '1', 'CN', 'Internet', 'W', '1');
INSERT INTO `website_advance_booking` VALUES ('12', '测试', '测试', '13537550000', '测试@qq.com', '513', '2018-11-01 16:30:11', 'Fund', '1000005', 'ETH', '1', 'CN', 'A conference', 'W', '1');
INSERT INTO `website_advance_booking` VALUES ('13', '测试', '测试', '13537550000', '测试@qq.com', '513', '2018-11-01 16:30:13', 'Fund', '1000005', 'ETH', '1', 'CN', 'One of current investors', 'W', '1');
INSERT INTO `website_advance_booking` VALUES ('14', '测试', '测试', '13537550000', '测试@qq.com', '513', '2018-11-01 16:30:15', 'Fund', '1000005', 'ETH', '1', 'CN', 'others', 'W', '1');
INSERT INTO `website_advance_booking` VALUES ('15', '陈', '123', '13543986022', '1659253001', '12123123', '2018-11-01 18:11:34', 'Fund', '100000', 'BTC', '', '', '', '阿萨德', '1');
INSERT INTO `website_advance_booking` VALUES ('16', '陈', '123', '13543986022', '1659253001', '12123123', '2018-11-01 18:13:25', 'Fund', '100000', '', '', '', '', '阿萨德', '1');
INSERT INTO `website_advance_booking` VALUES ('17', '123 ', '123', '13549836554', '1659253001', '123131', '2018-11-01 18:15:00', 'Individual', '123123', 'BTC', '', '', '', '', '1');
INSERT INTO `website_advance_booking` VALUES ('18', '1', '1', '1', '1', '1', '2018-11-01 19:06:42', 'Individual', '1', 'BTC', '1', '1', 'others', '1', '1');
INSERT INTO `website_advance_booking` VALUES ('19', '1', '1', '1', '1', '1', '2018-11-01 19:17:18', 'Individual', '1', 'BTC', '1', '1', 'One of current investors', '1', '1');
INSERT INTO `website_advance_booking` VALUES ('20', '1', '1', '1', '1', '1', '2018-11-01 19:17:32', 'Fund', '1', 'BTC', '1', '1', 'One of current investors', '1', '1');
INSERT INTO `website_advance_booking` VALUES ('21', '111', '111', '11', '111', '111', '2018-11-01 19:47:39', 'Fund', '111', 'BTC', '11', '111', 'One of current investors', null, '1');
-- ----------------------------
-- Table structure for website_community_follow_count
-- ----------------------------
DROP TABLE IF EXISTS `website_community_follow_count`;
CREATE TABLE `website_community_follow_count` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键id',
`english_name` varchar(255) DEFAULT '0' COMMENT '英文名',
`description` varchar(500) DEFAULT NULL COMMENT '中文描述',
`link` varchar(500) DEFAULT NULL COMMENT '链接',
`follow_number` int(20) DEFAULT NULL COMMENT '关注数量',
`state` int(255) DEFAULT NULL COMMENT '是否展示(1.展示 2.隐藏)',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=29 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='官网展示社区关注人数';
-- ----------------------------
-- Records of website_community_follow_count
-- ----------------------------
INSERT INTO `website_community_follow_count` VALUES ('1', '101', '22', '33', '44', '1');
INSERT INTO `website_community_follow_count` VALUES ('28', '6849', '546', '69469', '9846', '1');
-- ----------------------------
-- Table structure for website_currency_pool
-- ----------------------------
DROP TABLE IF EXISTS `website_currency_pool`;
CREATE TABLE `website_currency_pool` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
`user_name` varchar(255) NOT NULL COMMENT '姓名',
`mobile` varchar(255) NOT NULL COMMENT '客户手机号码',
`address` varchar(255) DEFAULT NULL COMMENT '用户钱包地址',
`count` decimal(20,4) DEFAULT NULL COMMENT '用户代币总额',
`currency` decimal(20,4) DEFAULT NULL COMMENT '代币总额减去剩余总额',
`surplus` decimal(20,4) DEFAULT NULL COMMENT '用户剩余代币总额',
`lock_describe` varchar(1000) DEFAULT NULL COMMENT '锁仓描述',
`lock_describe_en` varchar(255) DEFAULT NULL COMMENT '锁仓描述英文',
`proportion` int(3) DEFAULT '100' COMMENT '每期解仓比例如: 20就是代表20%',
`lock_begin_time` datetime DEFAULT NULL COMMENT '锁仓开始时间',
`lock_end_time` datetime DEFAULT NULL COMMENT '锁仓结束时间',
`last_unlock_time` datetime DEFAULT NULL COMMENT '上一次解仓时间',
`remarks` varchar(255) DEFAULT NULL COMMENT '用户代币备注',
`state` int(1) DEFAULT '1' COMMENT '是否有效 1有效 0无效',
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
`type` int(2) DEFAULT '1' COMMENT '1:基石轮,2:A轮',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=446 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='用户代币池表,记录了用户的账户有多少代币,用户通过钱包地址关联';
-- ----------------------------
-- Records of website_currency_pool
-- ----------------------------
INSERT INTO `website_currency_pool` VALUES ('419', '林莉', '15857131221', '', '99034.9750', '99034.9750', '0.0000', '私募完成后,A 轮用户解锁锁钩 PCT 的 50%,剩余部分在 PCT 上线交易所后 6个月解锁。', 'Private clients lock up their positions for six months ', '100', '2018-11-18 00:00:00', '2019-05-17 00:00:00', null, '私募客户', '1', '2018-11-23 11:13:26', '2');
INSERT INTO `website_currency_pool` VALUES ('420', '宁琼', '13556045327', '', '18455.5000', '18455.5000', '0.0000', '私募完成后,A 轮用户解锁锁钩 PCT 的 50%,剩余部分在 PCT 上线交易所后 6个月解锁。', 'Private clients lock up their positions for six months ', '100', '2018-11-18 00:00:00', '2019-05-17 00:00:00', null, '私募客户', '1', '2018-11-23 11:13:26', '2');
INSERT INTO `website_currency_pool` VALUES ('421', '彭永取', '13712128938', '', '352962.5000', '352962.5000', '0.0000', '私募完成后,A 轮用户解锁锁钩 PCT 的 50%,剩余部分在 PCT 上线交易所后 6个月解锁。', 'Private clients lock up their positions for six months ', '100', '2018-11-18 00:00:00', '2019-05-17 00:00:00', null, '私募客户', '1', '2018-11-23 11:13:26', '2');
INSERT INTO `website_currency_pool` VALUES ('422', '徐建平', '13750876845', '', '149242.1050', '149242.1050', '0.0000', '私募完成后,A 轮用户解锁锁钩 PCT 的 50%,剩余部分在 PCT 上线交易所后 6个月解锁。', 'Private clients lock up their positions for six months ', '100', '2018-11-18 00:00:00', '2019-05-17 00:00:00', null, '私募客户', '1', '2018-11-23 11:13:26', '2');
INSERT INTO `website_currency_pool` VALUES ('423', '张长青', '18240932899', '', '43143.0000', '43143.0000', '0.0000', '私募完成后,A 轮用户解锁锁钩 PCT 的 50%,剩余部分在 PCT 上线交易所后 6个月解锁。', 'Private clients lock up their positions for six months ', '100', '2018-11-18 00:00:00', '2019-05-17 00:00:00', null, '私募客户', '1', '2018-11-23 11:13:26', '2');
INSERT INTO `website_currency_pool` VALUES ('424', '王治斌', '13509200906', '', '4211.6200', '4211.6200', '0.0000', '私募完成后,A 轮用户解锁所购 PCT 的 50%,剩余部分在 PCT 上线交易所后 6个月解锁。', 'Private clients lock up their positions for six months ', '100', '2018-11-18 00:00:00', '2019-05-17 00:00:00', null, '私募客户', '1', '2018-11-23 11:13:26', '2');
INSERT INTO `website_currency_pool` VALUES ('425', '罗巧玲', '13686671388', '', '10371.0750', '10371.0750', '0.0000', '私募完成后,A 轮用户解锁所购 PCT 的 50%,剩余部分在 PCT 上线交易所后 6个月解锁。', 'Private clients lock up their positions for six months ', '100', '2018-11-18 00:00:00', '2019-05-17 00:00:00', null, '私募客户', '1', '2018-11-23 11:13:26', '2');
INSERT INTO `website_currency_pool` VALUES ('426', '黎高学', '13568532222', '', '256644.5000', '256644.5000', '0.0000', '私募完成后,A 轮用户解锁所购 PCT 的 50%,剩余部分在 PCT 上线交易所后 6个月解锁。', 'Private clients lock up their positions for six months ', '100', '2018-11-18 00:00:00', '2019-05-17 00:00:00', null, '私募客户', '1', '2018-11-23 11:13:26', '2');
INSERT INTO `website_currency_pool` VALUES ('427', '陈树桥', '15344235554', '', '233277.0000', '233277.0000', '0.0000', '私募完成后,A 轮用户解锁所购 PCT 的 50%,剩余部分在 PCT 上线交易所后 6个月解锁。', 'Private clients lock up their positions for six months ', '100', '2018-11-18 00:00:00', '2019-05-17 00:00:00', null, '私募客户', '1', '2018-11-23 11:13:26', '2');
INSERT INTO `website_currency_pool` VALUES ('428', '金志明', '15057981749', '', '70047.8750', '70047.8750', '0.0000', '私募完成后,A 轮用户解锁所购 PCT 的 50%,剩余部分在 PCT 上线交易所后 6个月解锁。', 'Private clients lock up their positions for six months ', '100', '2018-11-18 00:00:00', '2019-05-17 00:00:00', null, '私募客户', '1', '2018-11-23 11:13:26', '2');
INSERT INTO `website_currency_pool` VALUES ('429', '周芳芳', '13867426736', '', '117869.0570', '117869.0570', '0.0000', '私募完成后,A 轮用户解锁所购 PCT 的 50%,剩余部分在 PCT 上线交易所后 6个月解锁。', 'Private clients lock up their positions for six months ', '100', '2018-11-18 00:00:00', '2019-05-17 00:00:00', null, '私募客户', '1', '2018-11-23 11:13:26', '2');
INSERT INTO `website_currency_pool` VALUES ('430', '张铁英', '13867446436', '', '353626.7857', '353626.7857', '0.0000', '私募完成后,A 轮用户解锁所购 PCT 的 50%,剩余部分在 PCT 上线交易所后 6个月解锁。', 'Private clients lock up their positions for six months ', '100', '2018-11-18 00:00:00', '2019-05-17 00:00:00', null, '私募客户', '1', '2018-11-23 11:13:26', '2');
INSERT INTO `website_currency_pool` VALUES ('431', '张兰英', '13805745617', '', '285570.6000', '285570.6000', '0.0000', '私募完成后,A 轮用户解锁所购 PCT 的 50%,剩余部分在 PCT 上线交易所后 6个月解锁。', 'Private clients lock up their positions for six months ', '100', '2018-11-18 00:00:00', '2019-05-17 00:00:00', null, '私募客户', '1', '2018-11-23 11:13:27', '2');
INSERT INTO `website_currency_pool` VALUES ('432', '张克群', '13606643846', '', '239215.5500', '239215.5500', '0.0000', '私募完成后,A 轮用户解锁所购 PCT 的 50%,剩余部分在 PCT 上线交易所后 6个月解锁。', 'Private clients lock up their positions for six months ', '100', '2018-11-18 00:00:00', '2019-05-17 00:00:00', null, '私募客户', '1', '2018-11-23 11:13:27', '2');
INSERT INTO `website_currency_pool` VALUES ('433', '吴传玲', '18697940681', '', '46841.6900', '46841.6900', '0.0000', '私募完成后,A 轮用户解锁所购 PCT 的 50%,剩余部分在 PCT 上线交易所后 6个月解锁。', 'Private clients lock up their positions for six months ', '100', '2018-11-18 00:00:00', '2019-05-17 00:00:00', null, '私募客户', '1', '2018-11-23 11:13:27', '2');
INSERT INTO `website_currency_pool` VALUES ('434', '罗国忠', '13926848668', '', '25000.0000', '25000.0000', '0.0000', '私募完成后,A 轮用户解锁所购 PCT 的 50%,剩余部分在 PCT 上线交易所后 6个月解锁。', 'Private clients lock up their positions for six months ', '100', '2018-11-18 00:00:00', '2019-05-17 00:00:00', null, '私募客户', '1', '2018-11-23 11:13:27', '2');
INSERT INTO `website_currency_pool` VALUES ('435', '周肖杰', '13925544253', '', '17698.0000', '17698.0000', '0.0000', '私募完成后,A 轮用户解锁所购 PCT 的 50%,剩余部分在 PCT 上线交易所后 6个月解锁。', 'Private clients lock up their positions for six months ', '100', '2018-11-18 00:00:00', '2019-05-17 00:00:00', null, '员工', '1', '2018-11-23 11:13:27', '2');
INSERT INTO `website_currency_pool` VALUES ('436', '兰媛媛', '13574106417', '', '2222.7300', '2222.7300', '0.0000', '私募完成后,A 轮用户解锁所购 PCT 的 50%,剩余部分在 PCT 上线交易所后 6个月解锁。', 'Private clients lock up their positions for six months ', '100', '2018-11-18 00:00:00', '2019-05-17 00:00:00', null, '员工', '1', '2018-11-23 11:13:27', '2');
INSERT INTO `website_currency_pool` VALUES ('437', '王国栋', '13418450285', '', '2250.0000', '2250.0000', '0.0000', '私募完成后,A 轮用户解锁所购 PCT 的 50%,剩余部分在 PCT 上线交易所后 6个月解锁。', 'Private clients lock up their positions for six months ', '100', '2018-11-18 00:00:00', '2019-05-17 00:00:00', null, '员工', '1', '2018-11-23 11:13:27', '2');
INSERT INTO `website_currency_pool` VALUES ('438', '张立享', '13317071014', '', '1500.0000', '1500.0000', '0.0000', '私募完成后,A 轮用户解锁所购 PCT 的 50%,剩余部分在 PCT 上线交易所后 6个月解锁。', 'Private clients lock up their positions for six months ', '100', '2018-11-18 00:00:00', '2019-05-17 00:00:00', null, '员工', '1', '2018-11-23 11:13:27', '2');
INSERT INTO `website_currency_pool` VALUES ('439', '麦健添', '13030211870', '', '3409.0900', '3409.0900', '0.0000', '私募完成后,A 轮用户解锁所购 PCT 的 50%,剩余部分在 PCT 上线交易所后 6个月解锁。', 'Private clients lock up their positions for six months ', '100', '2018-11-18 00:00:00', '2019-05-17 00:00:00', null, '员工', '1', '2018-11-23 11:13:27', '2');
INSERT INTO `website_currency_pool` VALUES ('440', '郭海蛟', '15588765398', '', '3181.8200', '3181.8200', '0.0000', '私募完成后,A 轮用户解锁所购 PCT 的 50%,剩余部分在 PCT 上线交易所后 6个月解锁。', 'Private clients lock up their positions for six months ', '100', '2018-11-18 00:00:00', '2019-05-17 00:00:00', null, '员工', '1', '2018-11-23 11:13:27', '2');
INSERT INTO `website_currency_pool` VALUES ('441', '任雪', '17620494928', '', '1909.0900', '1909.0900', '0.0000', '私募完成后,A 轮用户解锁所购 PCT 的 50%,剩余部分在 PCT 上线交易所后 6个月解锁。', 'Private clients lock up their positions for six months ', '100', '2018-11-18 00:00:00', '2019-05-17 00:00:00', null, '员工', '1', '2018-11-23 11:13:27', '2');
INSERT INTO `website_currency_pool` VALUES ('442', '罗礼旺', '13129524650', '', '1181.8200', '1181.8200', '0.0000', '私募完成后,A 轮用户解锁所购 PCT 的 50%,剩余部分在 PCT 上线交易所后 6个月解锁。', 'Private clients lock up their positions for six months ', '100', '2018-11-18 00:00:00', '2019-05-17 00:00:00', null, '员工', '1', '2018-11-23 11:13:27', '2');
INSERT INTO `website_currency_pool` VALUES ('443', '张琪', '15989409982', '', '3130.4348', '3130.4348', '0.0000', '私募完成后,A 轮用户解锁所购 PCT 的 50%,剩余部分在 PCT 上线交易所后 6个月解锁。', 'Private clients lock up their positions for six months ', '100', '2018-11-18 00:00:00', '2019-05-17 00:00:00', null, '员工', '1', '2018-11-23 11:13:27', '2');
INSERT INTO `website_currency_pool` VALUES ('444', '田军文', '13268122469', '', '1630.4348', '1630.4348', '0.0000', '私募完成后,A 轮用户解锁所购 PCT 的 50%,剩余部分在 PCT 上线交易所后 6个月解锁。', 'Private clients lock up their positions for six months ', '100', '2018-11-18 00:00:00', '2019-05-17 00:00:00', null, '员工', '1', '2018-11-23 11:13:27', '2');
INSERT INTO `website_currency_pool` VALUES ('445', '郭思思', '13602594636', '', '30000.0000', '30000.0000', '0.0000', '私募完成后,A 轮用户解锁所购 PCT 的 50%,剩余部分在 PCT 上线交易所后 6个月解锁。', 'Private clients lock up their positions for six months ', '100', '2018-11-18 00:00:00', '2018-09-17 00:00:00', null, '员工', '1', '2018-11-23 11:13:27', '2');
-- ----------------------------
-- Table structure for website_currency_pool_record
-- ----------------------------
DROP TABLE IF EXISTS `website_currency_pool_record`;
CREATE TABLE `website_currency_pool_record` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
`pool_id` bigint(20) NOT NULL COMMENT '带币池表id,关联外键',
`from` varchar(255) NOT NULL COMMENT '支出账户地址',
`to` varchar(255) NOT NULL COMMENT '收入账户地址',
`tx_address` varchar(255) NOT NULL COMMENT '交易地址',
`currency` decimal(20,5) NOT NULL COMMENT '交易代币金额',
`periods` int(10) NOT NULL COMMENT '期数,从第1期开始增加',
`state` int(1) NOT NULL DEFAULT '1' COMMENT '交易状态 1:成功,0:失败',
`describe` varchar(255) NOT NULL COMMENT '交易描述,如失败写交易失败原因',
`admin` varchar(255) NOT NULL COMMENT '转账操作人',
`time` datetime NOT NULL COMMENT '转账时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=231 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='用户代币池表资金记录表,记录了给用户转账代币的信息。';
-- ----------------------------
-- Records of website_currency_pool_record
-- ----------------------------
-- ----------------------------
-- Table structure for website_extract_applyfor
-- ----------------------------
DROP TABLE IF EXISTS `website_extract_applyfor`;
CREATE TABLE `website_extract_applyfor` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`uid` bigint(20) NOT NULL COMMENT 'eacoo_users表用户uid',
`address` varchar(255) NOT NULL COMMENT '提现钱包地址',
`money` decimal(20,4) DEFAULT NULL COMMENT '提现PCT数额,系统计算出来的提现代币',
`currency` decimal(20,4) DEFAULT NULL COMMENT '用户剩余代币总额,取currency字段值',
`confirm_time` datetime DEFAULT NULL COMMENT '管理员确认提现时间',
`time` datetime NOT NULL COMMENT '提现申请时间',
`state` int(1) NOT NULL DEFAULT '0' COMMENT '状态:0:申请提现中,1:提现成功',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of website_extract_applyfor
-- ----------------------------
-- ----------------------------
-- Table structure for website_message
-- ----------------------------
DROP TABLE IF EXISTS `website_message`;
CREATE TABLE `website_message` (
`id` bigint(10) NOT NULL AUTO_INCREMENT COMMENT '主键',
`title` varchar(255) DEFAULT NULL COMMENT '标题',
`content` varchar(255) DEFAULT NULL COMMENT '内容',
`create_time` datetime DEFAULT NULL COMMENT '时间',
`state` varchar(255) DEFAULT NULL COMMENT '状态',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='APP消息中心';
-- ----------------------------
-- Records of website_message
-- ----------------------------
INSERT INTO `website_message` VALUES ('4', '3333', '3333', '2018-10-18 00:00:00', '1');
INSERT INTO `website_message` VALUES ('5', '2223', '2223', '2018-10-24 00:00:00', '1');
INSERT INTO `website_message` VALUES ('6', '998', '9999', '2018-10-25 00:00:00', '1');
INSERT INTO `website_message` VALUES ('7', '46456', '68498', '2018-10-27 00:00:00', '1');
-- ----------------------------
-- Table structure for website_news
-- ----------------------------
DROP TABLE IF EXISTS `website_news`;
CREATE TABLE `website_news` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键id',
`title` varchar(200) DEFAULT NULL COMMENT '新闻标题',
`content` varchar(500) DEFAULT NULL COMMENT '新闻简要说明',
`time` datetime DEFAULT NULL COMMENT '新闻时间',
`icon` varchar(300) DEFAULT NULL COMMENT '新闻icon',
`url` varchar(300) DEFAULT NULL COMMENT '新闻原文链接',
`create_time` datetime DEFAULT NULL COMMENT '新闻采集时间',
`state` int(1) DEFAULT '0' COMMENT '是否有效(1有效,0无效)',
`lang` int(1) DEFAULT NULL COMMENT '语言(1:英文,0:中文)',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=84 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='官网新闻表';
-- ----------------------------
-- Records of website_news
-- ----------------------------
INSERT INTO `website_news` VALUES ('51', '全球首例车位链(ParkECO)——引领区块链4.0时代落实到实体经济应用中', '2018年是区块链应用的元年,随着区块链受到市场及投资机构的高度关注,国内第一份官方区块链产业白皮书---《2018中国区块链产业白皮书》在五月由工信部信息中心发布,白皮书重点指出---区块链未来三年将在实体经济广泛落地。\r\n\r\n \r\n\r\n区块链是分布式数据存储、点对点传输、共识机制、加密算法等计算机技术的新型应用模式,从诞生之日起就被很多大机构看好,能在很多领域得到应用。IBM、百度、腾讯、阿里巴巴等巨头公司都在投入研发与应用,然而由于区块链技术在国内起步不久,很多人对区块链不是真正的了解,再加上行业中有一些人急功近利,导致这个行业刚起步就乱象丛生。', '2018-09-07 00:00:00', 'https://mmbiz.qpic.cn/mmbiz_jpg/8TK75T2PI4iaPo7BYibibU3g0XPyxBvlCicDUjvibs5zDIoo2Kia1ib8nqPia6B9jyAQDtKs7UW662SKTUpRM9gG3O8fYw/640?wx_fmt=jpeg&tp=webp&wxfrom=5&wx_lazy=1&wx_co=1', 'https://mp.weixin.qq.com/s/jl6y3flazOfDv5TQdakv2g', '2018-10-30 00:00:00', '1', '0');
INSERT INTO `website_news` VALUES ('56', '车位链(ParkECO)——应用ERC721标准,引领区块链应用新时代', '去年年末,来自以太坊的加密猫游戏”以太猫”特别火爆,一时间币圈大大小小的人都在撸猫。这是一款基于以太坊智能合约的游戏,需要你领养一只猫,然后进行配种,最后则可以拍卖。\r\n\r\n\r\n\r\n在这个游戏中,每只猫都拥有不一样基因的猫, 归根到底也就是拥有不一样属性的Token。通过智能合约记录一个代币的所有权,然后在新的不可置换代币基础上,添加猫的毛色、眼色、斑纹等属性,最后将以太猫显示在网页上。其中拍卖价值最贵的一只猫,成交价格为246.95个以太币,约合人民币77万元。', '2018-09-26 00:00:00', 'https://mmbiz.qpic.cn/mmbiz_png/8TK75T2PI4hGibcU4zs2hI5EBtQhzn22907icVSvENKIO9zyNzp7Ho0Q2Tj2mMAUhQ4P2n1WUVQ2icnfYA1BILWgw/640?wx_fmt=png&tp=webp&wxfrom=5&wx_lazy=1&wx_co=1', 'https://mp.weixin.qq.com/s/-FUP_pvVHQwywb-Cz21LWw', '2018-10-30 00:00:00', '1', '0');
INSERT INTO `website_news` VALUES ('68', '解读ParkECO | Token经济模型的设计与资产锚定', '在区块链中,Token通常是指“通证”或“代币”。在以太坊订立ERC20标准之后,Token被人们广泛认识。\r\n\r\n\r\n\r\nToken对于社区而言是一种经济激励的工具,可以促进社区内生态圈的形成。所有区块链项目核心都是有一套能让社区良好运转的Token经济模型。', '2018-09-30 00:00:00', 'https://mmbiz.qpic.cn/mmbiz_jpg/8TK75T2PI4jEfht1H2vqicLMTWp2hNvcAk6Uy3NwGx4ABogibV7ibdiaU4T55kWqJ6PfuwibqgicYQvklqjyIZiavt9cw/640?wx_fmt=jpeg&tp=webp&wxfrom=5&wx_lazy=1&wx_co=1', 'https://mp.weixin.qq.com/s/W5XoxFN-u3QT4X2tiwbpmA', '2018-10-30 00:00:00', '1', '0');
INSERT INTO `website_news` VALUES ('70', '车位权属难!如何让停车位流通变得更简单?', '现如今,买车容易,买车位难。很多人在购房时也会考虑花高价购买一个停车位,但由于车位产权这块存在一定程度上的法律空白,很多人高价从开发商那里购买的停车位产权却不够清晰明确。一般来说,只有带有产权的车位才能进行交易以及登记,无产权的车位一般只有20年使用权并且无法交易,就算拥有买卖合同也没有办法办理停车位产权登记,只能出让使用权。', '2018-10-10 00:00:00', 'https://mmbiz.qpic.cn/mmbiz_jpg/8TK75T2PI4iaxqiba1FCQIiasWqd6cntdHJuYyDx1iaWC2VNvHLFHN7ibPAMo7L18ya3j1rQhUQsdLjHSLBkucSBY7A/640?wx_fmt=jpeg&tp=webp&wxfrom=5&wx_lazy=1&wx_co=1', 'https://mp.weixin.qq.com/s/2Sh6IdxV8377KF7ByF0pow', '2018-10-30 00:00:00', '1', '0');
-- ----------------------------
-- Table structure for website_notice
-- ----------------------------
DROP TABLE IF EXISTS `website_notice`;
CREATE TABLE `website_notice` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键id',
`title` varchar(200) DEFAULT NULL COMMENT '公告标题',
`description` varchar(500) DEFAULT NULL COMMENT '公告描述',
`content` text COMMENT '公告内容',
`time` datetime DEFAULT NULL COMMENT '公告时间',
`create_time` datetime DEFAULT NULL COMMENT '公告创建时间',
`state` int(1) DEFAULT '0' COMMENT '是否有效(1有效,0无效)',
`lang` int(10) DEFAULT NULL COMMENT '语言(1:英文,0:中文)',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=64 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='官网公告表';
-- ----------------------------
-- Records of website_notice
-- ----------------------------
INSERT INTO `website_notice` VALUES ('54', '89567', '4646', '4646', '2018-10-25 08:00:00', '2018-10-25 16:00:31', '1', '1');
INSERT INTO `website_notice` VALUES ('55', '63456', '54656', '546', '2018-09-29 08:00:00', '2018-10-25 16:01:41', '1', '1');
INSERT INTO `website_notice` VALUES ('56', '测试', '测试', '测试', '2018-10-31 08:00:00', '2018-10-31 10:00:34', '1', '0');
INSERT INTO `website_notice` VALUES ('57', '43', '5643', '3654356', '2018-11-19 08:00:00', '2018-11-19 18:05:23', '1', '1');
INSERT INTO `website_notice` VALUES ('62', '110', '', '110', '2018-11-20 08:00:00', '2018-11-20 09:15:11', '1', '1');
INSERT INTO `website_notice` VALUES ('63', '88888', '', '8888', '2018-11-20 08:00:00', '2018-11-20 09:15:36', '1', '1');
-- ----------------------------
-- Table structure for website_operation_log
-- ----------------------------
DROP TABLE IF EXISTS `website_operation_log`;
CREATE TABLE `website_operation_log` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT ' 管理员ID',
`admin_name` varchar(255) DEFAULT NULL COMMENT '管理员名称',
`operation_type` varchar(255) DEFAULT NULL COMMENT '\r\n操作类型(1登录|2退出|3导入数据|4转账|5确认转账)\r\n\n',
`money` varchar(255) DEFAULT NULL COMMENT '金额',
`address` varchar(255) DEFAULT NULL COMMENT '用户钱包地址\r\n\n',
`create_time` datetime DEFAULT NULL COMMENT '操作时间\n',
`state` int(10) DEFAULT NULL COMMENT '状态(1.成功|2.失败)',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=434 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='操作日志表';
-- ----------------------------
-- Records of website_operation_log
-- ----------------------------
INSERT INTO `website_operation_log` VALUES ('1', '马老板', '5', '100000', '深圳', '2018-10-16 10:54:07', '1');
INSERT INTO `website_operation_log` VALUES ('2', '老王', '5', '10000', '上海', '2018-10-16 10:54:07', '1');
INSERT INTO `website_operation_log` VALUES ('6', 'zlx', '3', '889555', null, '2018-10-17 09:05:37', '1');
INSERT INTO `website_operation_log` VALUES ('7', 'zlx', '3', '66456', null, '2018-10-17 09:37:36', '1');
INSERT INTO `website_operation_log` VALUES ('8', 'zlx', '1', '6546', null, '2018-10-17 09:41:39', '1');
INSERT INTO `website_operation_log` VALUES ('9', 'zlx', '1', '343334', null, '2018-10-17 09:50:21', '1');
INSERT INTO `website_operation_log` VALUES ('10', 'zlx', '1', null, null, '2018-10-17 11:03:59', '1');
INSERT INTO `website_operation_log` VALUES ('11', 'zlx', '1', null, null, '2018-10-17 11:04:42', '1');
INSERT INTO `website_operation_log` VALUES ('12', 'zlx', '1', null, null, '2018-10-17 11:05:12', '1');
INSERT INTO `website_operation_log` VALUES ('13', 'zlx', '1', null, null, '2018-10-17 11:19:22', '1');
INSERT INTO `website_operation_log` VALUES ('14', 'zlx', '2', null, null, '2018-10-17 11:19:28', '1');
INSERT INTO `website_operation_log` VALUES ('15', 'zlx', '1', null, null, '2018-10-17 11:19:34', '1');
INSERT INTO `website_operation_log` VALUES ('16', 'zlx', '2', null, '', '2018-10-17 11:25:59', '1');
INSERT INTO `website_operation_log` VALUES ('17', 'zlx', '1', null, '', '2018-10-17 11:26:03', '1');
INSERT INTO `website_operation_log` VALUES ('18', 'zlx', '1', null, null, '2018-10-17 11:39:02', '1');
INSERT INTO `website_operation_log` VALUES ('19', 'zlx', '4', '1', '3', '2018-10-17 11:39:32', '1');
INSERT INTO `website_operation_log` VALUES ('20', 'zlx', '2', '', '', '2018-10-17 11:47:51', '1');
INSERT INTO `website_operation_log` VALUES ('21', 'zlx', '1', '', '', '2018-10-17 11:48:00', '1');
INSERT INTO `website_operation_log` VALUES ('22', 'zlx', '1', '', '', '2018-10-17 11:49:12', '1');
INSERT INTO `website_operation_log` VALUES ('23', 'zlx', '1', '', '', '2018-10-17 11:49:45', '1');
INSERT INTO `website_operation_log` VALUES ('24', 'zlx', '4', '1', '3', '2018-10-17 13:47:38', '1');
INSERT INTO `website_operation_log` VALUES ('25', 'zlx', '4', '0.1', '3', '2018-10-17 13:48:41', '1');
INSERT INTO `website_operation_log` VALUES ('26', 'zlx', '4', '0.01', '3', '2018-10-17 13:53:04', '1');
INSERT INTO `website_operation_log` VALUES ('27', 'zlx', '4', '0.0001', '3', '2018-10-17 14:12:31', '1');
INSERT INTO `website_operation_log` VALUES ('28', 'zlx', '1', null, null, '2018-10-17 14:13:05', '1');
INSERT INTO `website_operation_log` VALUES ('29', 'zlx', '4', '0.01', '3', '2018-10-17 14:13:26', '1');
INSERT INTO `website_operation_log` VALUES ('30', 'zlx', '4', '0.2', '3', '2018-10-17 14:13:44', '1');
INSERT INTO `website_operation_log` VALUES ('31', 'zlx', '4', '0.001', '3', '2018-10-17 14:13:52', '1');
INSERT INTO `website_operation_log` VALUES ('32', 'zlx', '4', '0.003', '3', '2018-10-17 14:14:01', '1');
INSERT INTO `website_operation_log` VALUES ('33', 'zlx', '4', '0.0009', '3', '2018-10-17 14:14:17', '1');
INSERT INTO `website_operation_log` VALUES ('34', 'zlx', '1', '', '', '2018-10-17 15:33:10', '1');
INSERT INTO `website_operation_log` VALUES ('35', 'zlx', '2', '', '', '2018-10-17 16:52:12', '1');
INSERT INTO `website_operation_log` VALUES ('36', 'zlx', '1', '', '', '2018-10-17 16:52:21', '1');
INSERT INTO `website_operation_log` VALUES ('37', 'zlx', '4', '10000', '0x890eea26c6a972360a9c63db6bab7a3240e7fda2', '2018-10-17 17:55:09', '1');
INSERT INTO `website_operation_log` VALUES ('38', 'zlx', '4', '9000', '0x9e50efaf878503797c70eb1c57e28ec2abea2a22', '2018-10-17 17:55:30', '1');
INSERT INTO `website_operation_log` VALUES ('39', 'zlx', '1', '', '', '2018-10-18 09:07:18', '1');
INSERT INTO `website_operation_log` VALUES ('40', 'zlx', '1', '', '', '2018-10-18 13:47:53', '1');
INSERT INTO `website_operation_log` VALUES ('41', 'zlx', '1', '', '', '2018-10-18 17:20:19', '1');
INSERT INTO `website_operation_log` VALUES ('42', 'zlx', '1', '', '', '2018-10-19 09:15:25', '1');
INSERT INTO `website_operation_log` VALUES ('43', 'wchm', '1', '', '', '2018-10-19 11:54:48', '1');
INSERT INTO `website_operation_log` VALUES ('44', 'wchm', '1', '', '', '2018-10-19 11:57:38', '1');
INSERT INTO `website_operation_log` VALUES ('45', 'wchm', '1', '', '', '2018-10-19 16:32:18', '1');
INSERT INTO `website_operation_log` VALUES ('46', 'wchm', '1', '', '', '2018-10-20 13:53:51', '1');
INSERT INTO `website_operation_log` VALUES ('47', 'wchm', '1', '', '', '2018-10-20 14:21:43', '1');
INSERT INTO `website_operation_log` VALUES ('48', 'wchm', '1', '', '', '2018-10-20 16:12:08', '1');
INSERT INTO `website_operation_log` VALUES ('49', 'wchm', '1', '', '', '2018-10-20 17:02:40', '1');
INSERT INTO `website_operation_log` VALUES ('50', 'wchm', '1', '', '', '2018-10-20 17:23:59', '1');
INSERT INTO `website_operation_log` VALUES ('51', 'wchm', '1', '', '', '2018-10-20 17:50:16', '1');
INSERT INTO `website_operation_log` VALUES ('52', 'wchm', '1', '', '', '2018-10-22 09:26:06', '1');
INSERT INTO `website_operation_log` VALUES ('53', 'wchm', '1', '', '', '2018-10-22 09:53:31', '1');
INSERT INTO `website_operation_log` VALUES ('54', 'wchm', '1', '', '', '2018-10-22 11:48:45', '1');
INSERT INTO `website_operation_log` VALUES ('55', 'wchm', '1', '', '', '2018-10-22 11:52:11', '1');
INSERT INTO `website_operation_log` VALUES ('56', 'wchm', '1', '', '', '2018-10-22 13:53:52', '1');
INSERT INTO `website_operation_log` VALUES ('57', 'wchm', '1', '', '', '2018-10-22 13:53:52', '1');
INSERT INTO `website_operation_log` VALUES ('58', 'wchm', '1', '', '', '2018-10-22 16:56:03', '1');
INSERT INTO `website_operation_log` VALUES ('59', 'wchm', '1', '', '', '2018-10-22 17:06:56', '1');
INSERT INTO `website_operation_log` VALUES ('60', 'wchm', '1', '', '', '2018-10-23 09:04:56', '1');
INSERT INTO `website_operation_log` VALUES ('61', 'wchm', '1', '', '', '2018-10-23 10:49:30', '1');
INSERT INTO `website_operation_log` VALUES ('62', 'wchm', '1', '', '', '2018-10-23 13:53:02', '1');
INSERT INTO `website_operation_log` VALUES ('63', 'wchm', '1', '', '', '2018-10-23 14:52:03', '1');
INSERT INTO `website_operation_log` VALUES ('64', 'wchm', '4', '10', '0x9e50efaf878503797c70eb1c57e28ec2abea2a22', '2018-10-23 15:28:47', '0');
INSERT INTO `website_operation_log` VALUES ('65', 'wchm', '4', '10', '0x9e50efaf878503797c70eb1c57e28ec2abea2a22', '2018-10-23 15:29:06', '0');
INSERT INTO `website_operation_log` VALUES ('66', 'wchm', '4', '10', '0x9e50efaf878503797c70eb1c57e28ec2abea2a22', '2018-10-23 15:29:08', '0');
INSERT INTO `website_operation_log` VALUES ('67', 'wchm', '4', '0.0001', '0x9e50efaf878503797c70eb1c57e28ec2abea2a22', '2018-10-23 15:34:33', '0');
INSERT INTO `website_operation_log` VALUES ('68', 'wchm', '4', '0.000000', '0x9e50efaf878503797c70eb1c57e28ec2abea2a22', '2018-10-23 15:35:10', '0');
INSERT INTO `website_operation_log` VALUES ('69', 'wchm', '4', '0.000000', '0x9e50efaf878503797c70eb1c57e28ec2abea2a22', '2018-10-23 15:35:12', '0');
INSERT INTO `website_operation_log` VALUES ('70', 'wchm', '1', '', '', '2018-10-23 15:41:40', '1');
INSERT INTO `website_operation_log` VALUES ('71', 'wchm', '4', '0.01', '0x9e50efaf878503797c70eb1c57e28ec2abea2a22', '2018-10-23 15:41:49', '0');
INSERT INTO `website_operation_log` VALUES ('72', 'wchm', '4', '0.01', '0x9e50efaf878503797c70eb1c57e28ec2abea2a22', '2018-10-23 15:41:57', '0');
INSERT INTO `website_operation_log` VALUES ('73', 'wchm', '4', '0.01', '0x9e50efaf878503797c70eb1c57e28ec2abea2a22', '2018-10-23 15:41:59', '0');
INSERT INTO `website_operation_log` VALUES ('74', 'wchm', '4', '0.01', '0x9e50efaf878503797c70eb1c57e28ec2abea2a22', '2018-10-23 15:42:01', '0');
INSERT INTO `website_operation_log` VALUES ('75', 'wchm', '4', '0.01', '0x9e50efaf878503797c70eb1c57e28ec2abea2a22', '2018-10-23 15:42:03', '0');
INSERT INTO `website_operation_log` VALUES ('76', 'wchm', '4', '0.01', '0x9e50efaf878503797c70eb1c57e28ec2abea2a22', '2018-10-23 15:42:05', '0');
INSERT INTO `website_operation_log` VALUES ('77', 'wchm', '4', '0.01', '0x9e50efaf878503797c70eb1c57e28ec2abea2a22', '2018-10-23 15:42:07', '0');
INSERT INTO `website_operation_log` VALUES ('78', 'wchm', '4', '0.01', '0x9e50efaf878503797c70eb1c57e28ec2abea2a22', '2018-10-23 15:42:08', '0');
INSERT INTO `website_operation_log` VALUES ('79', 'wchm', '4', '0.01', '0x9e50efaf878503797c70eb1c57e28ec2abea2a22', '2018-10-23 15:42:11', '0');
INSERT INTO `website_operation_log` VALUES ('80', 'wchm', '1', '', '', '2018-10-23 15:45:58', '1');
INSERT INTO `website_operation_log` VALUES ('81', 'wchm', '4', '0.00000001', '0x9e50efaf878503797c70eb1c57e28ec2abea2a22', '2018-10-23 15:46:09', '0');
INSERT INTO `website_operation_log` VALUES ('82', 'wchm', '4', '0.00000001', '0x9e50efaf878503797c70eb1c57e28ec2abea2a22', '2018-10-23 15:46:17', '0');
INSERT INTO `website_operation_log` VALUES ('83', 'wchm', '4', '0.000000000000001', '0x9e50efaf878503797c70eb1c57e28ec2abea2a22', '2018-10-23 15:55:26', '0');
INSERT INTO `website_operation_log` VALUES ('84', 'wchm', '4', '0.000000001', '0x9e50efaf878503797c70eb1c57e28ec2abea2a22', '2018-10-23 15:59:23', '0');
INSERT INTO `website_operation_log` VALUES ('85', 'wchm', '4', '0.0000001', '0x9e50efaf878503797c70eb1c57e28ec2abea2a22', '2018-10-23 16:00:12', '0');
INSERT INTO `website_operation_log` VALUES ('86', 'wchm', '4', '0.00001', '0x9e50efaf878503797c70eb1c57e28ec2abea2a22', '2018-10-23 16:01:02', '0');
INSERT INTO `website_operation_log` VALUES ('87', 'wchm', '4', '0.000000001', '0x9e50efaf878503797c70eb1c57e28ec2abea2a22', '2018-10-23 16:25:12', '0');
INSERT INTO `website_operation_log` VALUES ('88', 'wchm', '4', '0.000000001', '0x9e50efaf878503797c70eb1c57e28ec2abea2a22', '2018-10-23 16:26:44', '0');
INSERT INTO `website_operation_log` VALUES ('89', 'wchm', '4', '0.000000000001', '0x9e50efaf878503797c70eb1c57e28ec2abea2a22', '2018-10-23 16:35:52', '0');
INSERT INTO `website_operation_log` VALUES ('90', 'wchm', '4', '0.000001', '0x9e50efaf878503797c70eb1c57e28ec2abea2a22', '2018-10-23 16:51:41', '0');
INSERT INTO `website_operation_log` VALUES ('91', 'wchm', '4', '0.000001', '0x9e50efaf878503797c70eb1c57e28ec2abea2a22', '2018-10-23 16:59:43', '0');
INSERT INTO `website_operation_log` VALUES ('92', 'wchm', '4', '0.000001', '0x9e50efaf878503797c70eb1c57e28ec2abea2a22', '2018-10-23 17:01:24', '0');
INSERT INTO `website_operation_log` VALUES ('93', 'wchm', '1', '', '', '2018-10-23 17:17:49', '1');
INSERT INTO `website_operation_log` VALUES ('94', 'wchm', '1', '', '', '2018-10-23 17:28:15', '1');
INSERT INTO `website_operation_log` VALUES ('95', 'wchm', '1', '', '', '2018-10-23 18:08:27', '1');
INSERT INTO `website_operation_log` VALUES ('96', 'wchm', '1', '', '', '2018-10-24 09:34:00', '1');
INSERT INTO `website_operation_log` VALUES ('97', 'wchm', '1', '', '', '2018-10-24 09:41:28', '1');
INSERT INTO `website_operation_log` VALUES ('98', 'wchm', '1', '', '', '2018-10-24 13:45:23', '1');
INSERT INTO `website_operation_log` VALUES ('99', 'wchm', '1', '', '', '2018-10-24 14:44:49', '1');
INSERT INTO `website_operation_log` VALUES ('100', 'wchm', '1', '', '', '2018-10-24 16:16:15', '1');
INSERT INTO `website_operation_log` VALUES ('101', 'wchm', '1', '', '', '2018-10-24 16:30:59', '1');
INSERT INTO `website_operation_log` VALUES ('102', 'wchm', '1', '', '', '2018-10-24 16:31:16', '1');
INSERT INTO `website_operation_log` VALUES ('103', 'wchm', '1', '', '', '2018-10-24 16:41:27', '1');
INSERT INTO `website_operation_log` VALUES ('104', 'wchm', '1', '', '', '2018-10-24 16:50:05', '1');
INSERT INTO `website_operation_log` VALUES ('105', 'wchm', '1', '', '', '2018-10-24 16:50:17', '1');
INSERT INTO `website_operation_log` VALUES ('106', 'wchm', '1', '', '', '2018-10-24 17:37:41', '1');
INSERT INTO `website_operation_log` VALUES ('107', 'wchm', '1', '', '', '2018-10-25 09:25:30', '1');
INSERT INTO `website_operation_log` VALUES ('108', 'wchm', '1', '', '', '2018-10-25 13:53:48', '1');
INSERT INTO `website_operation_log` VALUES ('109', 'wchm', '2', '', '', '2018-10-25 14:17:51', '1');
INSERT INTO `website_operation_log` VALUES ('110', 'wchm', '1', '', '', '2018-10-25 14:25:07', '1');
INSERT INTO `website_operation_log` VALUES ('111', 'wchm', '1', '', '', '2018-10-25 14:46:16', '1');
INSERT INTO `website_operation_log` VALUES ('112', 'wchm', '1', '', '', '2018-10-25 14:59:04', '1');
INSERT INTO `website_operation_log` VALUES ('113', 'wchm', '1', '', '', '2018-10-25 15:42:20', '1');
INSERT INTO `website_operation_log` VALUES ('114', 'wchm', '1', '', '', '2018-10-25 15:43:02', '1');
INSERT INTO `website_operation_log` VALUES ('115', 'wchm', '1', '', '', '2018-10-26 09:00:08', '1');
INSERT INTO `website_operation_log` VALUES ('116', 'wchm', '1', '', '', '2018-10-26 09:51:39', '1');
INSERT INTO `website_operation_log` VALUES ('117', 'wchm', '1', '', '', '2018-10-26 10:07:07', '1');
INSERT INTO `website_operation_log` VALUES ('118', 'wchm', '1', '', '', '2018-10-26 10:08:19', '1');
INSERT INTO `website_operation_log` VALUES ('119', 'wchm', '1', '', '', '2018-10-26 15:03:53', '1');
INSERT INTO `website_operation_log` VALUES ('120', 'wchm', '1', '', '', '2018-10-28 21:57:27', '1');
INSERT INTO `website_operation_log` VALUES ('121', 'wchm', '1', '', '', '2018-10-28 22:01:04', '1');
INSERT INTO `website_operation_log` VALUES ('122', 'wchm', '1', '', '', '2018-10-29 09:26:42', '1');
INSERT INTO `website_operation_log` VALUES ('123', 'wchm', '1', '', '', '2018-10-29 09:42:24', '1');
INSERT INTO `website_operation_log` VALUES ('124', 'wchm', '1', '', '', '2018-10-29 10:13:23', '1');
INSERT INTO `website_operation_log` VALUES ('125', 'wchm', '2', '', '', '2018-10-29 10:18:39', '1');
INSERT INTO `website_operation_log` VALUES ('126', 'wchm', '1', '', '', '2018-10-29 10:18:45', '1');
INSERT INTO `website_operation_log` VALUES ('127', 'wchm', '1', '', '', '2018-10-29 10:50:38', '1');
INSERT INTO `website_operation_log` VALUES ('128', 'wchm', '1', '', '', '2018-10-29 10:58:43', '1');
INSERT INTO `website_operation_log` VALUES ('129', 'wchm', '1', '', '', '2018-10-29 11:03:06', '1');
INSERT INTO `website_operation_log` VALUES ('130', 'wchm', '2', '', '', '2018-10-29 11:05:44', '1');
INSERT INTO `website_operation_log` VALUES ('131', 'wchm', '1', '', '', '2018-10-29 11:05:49', '1');
INSERT INTO `website_operation_log` VALUES ('132', 'wchm', '1', '', '', '2018-10-29 11:06:51', '1');
INSERT INTO `website_operation_log` VALUES ('133', 'wchm', '1', '', '', '2018-10-29 11:08:30', '1');
INSERT INTO `website_operation_log` VALUES ('134', 'wchm', '1', '', '', '2018-10-29 11:10:13', '1');
INSERT INTO `website_operation_log` VALUES ('135', 'wchm', '1', '', '', '2018-10-29 11:17:46', '1');
INSERT INTO `website_operation_log` VALUES ('136', 'wchm', '1', '', '', '2018-10-29 11:20:32', '1');
INSERT INTO `website_operation_log` VALUES ('137', 'wchm', '1', '', '', '2018-10-29 11:21:48', '1');
INSERT INTO `website_operation_log` VALUES ('138', 'wchm', '1', '', '', '2018-10-29 11:32:34', '1');
INSERT INTO `website_operation_log` VALUES ('139', 'wchm', '1', '', '', '2018-10-29 12:01:51', '1');
INSERT INTO `website_operation_log` VALUES ('140', 'wchm', '1', '', '', '2018-10-29 12:02:56', '1');
INSERT INTO `website_operation_log` VALUES ('141', 'wchm', '1', '', '', '2018-10-29 12:04:11', '1');
INSERT INTO `website_operation_log` VALUES ('142', 'wchm', '1', '', '', '2018-10-29 12:06:59', '1');
INSERT INTO `website_operation_log` VALUES ('143', 'wchm', '1', '', '', '2018-10-29 14:31:40', '1');
INSERT INTO `website_operation_log` VALUES ('144', 'wchm', '1', '', '', '2018-10-29 14:31:46', '1');
INSERT INTO `website_operation_log` VALUES ('145', 'wchm', '1', '', '', '2018-10-29 14:31:50', '1');
INSERT INTO `website_operation_log` VALUES ('146', 'wchm', '1', '', '', '2018-10-29 14:32:13', '1');
INSERT INTO `website_operation_log` VALUES ('147', 'wchm', '1', '', '', '2018-10-29 14:33:58', '1');
INSERT INTO `website_operation_log` VALUES ('148', 'wchm', '1', '', '', '2018-10-29 14:34:58', '1');
INSERT INTO `website_operation_log` VALUES ('149', 'wchm', '1', '', '', '2018-10-29 15:21:22', '1');
INSERT INTO `website_operation_log` VALUES ('150', 'wchm', '2', '', '', '2018-10-29 17:31:42', '1');
INSERT INTO `website_operation_log` VALUES ('151', 'zhanglixiang', '1', '', '', '2018-10-29 17:31:50', '1');
INSERT INTO `website_operation_log` VALUES ('152', 'wchm', '1', '', '', '2018-10-29 17:38:50', '1');
INSERT INTO `website_operation_log` VALUES ('153', 'wchm', '2', '', '', '2018-10-29 18:13:00', '1');
INSERT INTO `website_operation_log` VALUES ('154', 'zhanglixiang', '1', '', '', '2018-10-29 18:13:11', '1');
INSERT INTO `website_operation_log` VALUES ('155', 'zhanglixiang', '2', '', '', '2018-10-29 18:13:34', '1');
INSERT INTO `website_operation_log` VALUES ('156', 'zhanglixiang', '1', '', '', '2018-10-29 18:13:39', '1');
INSERT INTO `website_operation_log` VALUES ('157', 'zhanglixiang', '2', '', '', '2018-10-29 18:17:23', '1');
INSERT INTO `website_operation_log` VALUES ('158', 'zhanglixiang', '1', '', '', '2018-10-29 18:17:30', '1');
INSERT INTO `website_operation_log` VALUES ('159', 'wchm', '1', '', '', '2018-10-29 18:18:19', '1');
INSERT INTO `website_operation_log` VALUES ('160', 'zhanglixiang', '2', '', '', '2018-10-29 18:20:12', '1');
INSERT INTO `website_operation_log` VALUES ('161', 'zhanglixiang', '1', '', '', '2018-10-29 18:20:17', '1');
INSERT INTO `website_operation_log` VALUES ('162', 'zhanglixiang', '2', '', '', '2018-10-29 18:20:50', '1');
INSERT INTO `website_operation_log` VALUES ('163', 'wchm', '1', '', '', '2018-10-29 18:20:54', '1');
INSERT INTO `website_operation_log` VALUES ('164', 'wchm', '登入', '', '', '2018-10-31 09:37:05', '1');
INSERT INTO `website_operation_log` VALUES ('165', 'wchm', '登入', '', '', '2018-10-31 09:37:22', '1');
INSERT INTO `website_operation_log` VALUES ('166', 'wchm', '退出', '', '', '2018-10-31 09:38:29', '1');
INSERT INTO `website_operation_log` VALUES ('167', 'wchm', '登入', '', '', '2018-10-31 09:38:35', '1');
INSERT INTO `website_operation_log` VALUES ('168', 'wchm', '退出', '', '', '2018-10-31 09:38:41', '1');
INSERT INTO `website_operation_log` VALUES ('169', 'zhanglixiang', '登入', '', '', '2018-10-31 09:38:48', '1');
INSERT INTO `website_operation_log` VALUES ('170', 'zhanglixiang', '退出', '', '', '2018-10-31 09:39:32', '1');
INSERT INTO `website_operation_log` VALUES ('171', 'wchm', '登入', '', '', '2018-10-31 09:39:39', '1');
INSERT INTO `website_operation_log` VALUES ('172', 'wchm', '登入', '', '', '2018-10-31 09:49:16', '1');
INSERT INTO `website_operation_log` VALUES ('173', 'wchm', '登入', '', '', '2018-10-31 10:24:46', '1');
INSERT INTO `website_operation_log` VALUES ('174', 'wchm', '登入', '', '', '2018-10-31 14:19:34', '1');
INSERT INTO `website_operation_log` VALUES ('175', 'wchm', '退出', '', '', '2018-10-31 14:22:50', '1');
INSERT INTO `website_operation_log` VALUES ('176', 'wchm', '登入', '', '', '2018-10-31 14:23:38', '1');
INSERT INTO `website_operation_log` VALUES ('177', 'wchm', '登入', '', '', '2018-10-31 15:44:47', '1');
INSERT INTO `website_operation_log` VALUES ('178', 'wchm', '登入', '', '', '2018-10-31 16:43:29', '1');
INSERT INTO `website_operation_log` VALUES ('179', 'wchm', '登入', '', '', '2018-11-01 10:35:53', '1');
INSERT INTO `website_operation_log` VALUES ('180', 'wchm', '登入', '', '', '2018-11-01 11:43:31', '1');
INSERT INTO `website_operation_log` VALUES ('181', 'jiangwenjian', '登入', '', '', '2018-11-01 14:19:43', '1');
INSERT INTO `website_operation_log` VALUES ('182', 'jiangwenjian', '退出', '', '', '2018-11-01 14:21:19', '1');
INSERT INTO `website_operation_log` VALUES ('183', 'wchm', '登入', '', '', '2018-11-01 14:21:34', '1');
INSERT INTO `website_operation_log` VALUES ('184', 'wchm', '退出', '', '', '2018-11-01 14:29:19', '1');
INSERT INTO `website_operation_log` VALUES ('185', '1111', '登入', '', '', '2018-11-01 14:29:23', '1');
INSERT INTO `website_operation_log` VALUES ('186', '1111', '退出', '', '', '2018-11-01 14:33:27', '1');
INSERT INTO `website_operation_log` VALUES ('187', '1111', '登入', '', '', '2018-11-01 14:33:33', '1');
INSERT INTO `website_operation_log` VALUES ('188', '1111', '退出', '', '', '2018-11-01 14:35:52', '1');
INSERT INTO `website_operation_log` VALUES ('189', 'wchm', '登入', '', '', '2018-11-01 14:36:10', '1');
INSERT INTO `website_operation_log` VALUES ('190', 'wchm', '登入', '', '', '2018-11-01 15:44:54', '1');
INSERT INTO `website_operation_log` VALUES ('191', 'wchm', '登入', '', '', '2018-11-01 16:16:22', '1');
INSERT INTO `website_operation_log` VALUES ('192', 'wchm', '登入', '', '', '2018-11-01 17:10:02', '1');
INSERT INTO `website_operation_log` VALUES ('193', 'wchm', '登入', '', '', '2018-11-01 17:24:50', '1');
INSERT INTO `website_operation_log` VALUES ('194', 'wchm', '登入', '', '', '2018-11-01 18:14:12', '1');
INSERT INTO `website_operation_log` VALUES ('195', 'wchm', '登入', '', '', '2018-11-01 19:06:58', '1');
INSERT INTO `website_operation_log` VALUES ('196', 'wchm', '登入', '', '', '2018-11-02 10:35:32', '1');
INSERT INTO `website_operation_log` VALUES ('197', 'wchm', '登入', '', '', '2018-11-02 11:56:12', '1');
INSERT INTO `website_operation_log` VALUES ('198', 'wchm', '登入', '', '', '2018-11-02 12:45:02', '1');
INSERT INTO `website_operation_log` VALUES ('199', 'wchm', '登入', '', '', '2018-11-13 21:40:34', '1');
INSERT INTO `website_operation_log` VALUES ('200', 'wchm', '登入', '', '', '2018-11-14 15:31:57', '1');
INSERT INTO `website_operation_log` VALUES ('201', 'wchm', '登入', '', '', '2018-11-14 15:37:02', '1');
INSERT INTO `website_operation_log` VALUES ('202', 'wchm', '登入', '', '', '2018-11-14 16:43:50', '1');
INSERT INTO `website_operation_log` VALUES ('203', 'wchm', '登入', '', '', '2018-11-14 17:16:51', '1');
INSERT INTO `website_operation_log` VALUES ('204', 'wchm', '登入', '', '', '2018-11-15 13:46:05', '1');
INSERT INTO `website_operation_log` VALUES ('205', 'wchm', '登入', '', '', '2018-11-15 14:52:43', '1');
INSERT INTO `website_operation_log` VALUES ('206', 'wchm', '登入', '', '', '2018-11-15 16:15:54', '1');
INSERT INTO `website_operation_log` VALUES ('207', 'wchm', '登入', '', '', '2018-11-15 16:48:21', '1');
INSERT INTO `website_operation_log` VALUES ('208', 'wchm', '登入', '', '', '2018-11-15 17:09:03', '1');
INSERT INTO `website_operation_log` VALUES ('209', 'wchm', '登入', '', '', '2018-11-15 17:14:23', '1');
INSERT INTO `website_operation_log` VALUES ('210', 'wchm', '登入', '', '', '2018-11-15 17:16:10', '1');
INSERT INTO `website_operation_log` VALUES ('211', 'wchm', '登入', '', '', '2018-11-15 17:16:31', '1');
INSERT INTO `website_operation_log` VALUES ('212', 'wchm', '登入', '', '', '2018-11-15 17:20:31', '1');
INSERT INTO `website_operation_log` VALUES ('213', 'wchm', '登入', '', '', '2018-11-15 17:25:27', '1');
INSERT INTO `website_operation_log` VALUES ('214', 'wchm', '登入', '', '', '2018-11-15 17:27:01', '1');
INSERT INTO `website_operation_log` VALUES ('215', 'wchm', '登入', '', '', '2018-11-15 17:32:17', '1');
INSERT INTO `website_operation_log` VALUES ('216', 'wchm', '登入', '', '', '2018-11-15 17:36:48', '1');
INSERT INTO `website_operation_log` VALUES ('217', 'wchm', '登入', '', '', '2018-11-15 17:40:42', '1');
INSERT INTO `website_operation_log` VALUES ('218', 'wchm', '登入', '', '', '2018-11-15 17:41:24', '1');
INSERT INTO `website_operation_log` VALUES ('219', 'wchm', '登入', '', '', '2018-11-15 17:43:34', '1');
INSERT INTO `website_operation_log` VALUES ('220', 'wchm', '登入', '', '', '2018-11-15 17:49:40', '1');
INSERT INTO `website_operation_log` VALUES ('221', 'wchm', '登入', '', '', '2018-11-15 17:51:35', '1');
INSERT INTO `website_operation_log` VALUES ('222', 'wchm', '登入', '', '', '2018-11-15 17:52:38', '1');
INSERT INTO `website_operation_log` VALUES ('223', 'wchm', '登入', '', '', '2018-11-15 17:53:28', '1');
INSERT INTO `website_operation_log` VALUES ('224', 'wchm', '登入', '', '', '2018-11-15 17:55:35', '1');
INSERT INTO `website_operation_log` VALUES ('225', 'wchm', '代币池用户导入A轮', '', '', '2018-11-15 17:55:46', '1');
INSERT INTO `website_operation_log` VALUES ('226', 'wchm', '代币池用户导入A轮', '', '', '2018-11-15 17:56:13', '1');
INSERT INTO `website_operation_log` VALUES ('227', 'wchm', '登入', '', '', '2018-11-15 17:57:43', '1');
INSERT INTO `website_operation_log` VALUES ('228', 'wchm', '代币池用户导入A轮', '', '', '2018-11-15 17:57:52', '1');
INSERT INTO `website_operation_log` VALUES ('229', 'wchm', '登入', '', '', '2018-11-15 18:00:15', '1');
INSERT INTO `website_operation_log` VALUES ('230', 'wchm', '登入', '', '', '2018-11-15 18:06:50', '1');
INSERT INTO `website_operation_log` VALUES ('231', 'wchm', '登入', '', '', '2018-11-15 22:21:39', '1');
INSERT INTO `website_operation_log` VALUES ('232', 'wchm', '登入', '', '', '2018-11-15 22:41:34', '1');
INSERT INTO `website_operation_log` VALUES ('233', 'wchm', '登入', '', '', '2018-11-15 22:44:22', '1');
INSERT INTO `website_operation_log` VALUES ('234', 'wchm', '登入', '', '', '2018-11-15 22:59:50', '1');
INSERT INTO `website_operation_log` VALUES ('235', 'wchm', '登入', '', '', '2018-11-16 08:59:14', '1');
INSERT INTO `website_operation_log` VALUES ('236', 'wchm', '登入', '', '', '2018-11-16 10:43:20', '1');
INSERT INTO `website_operation_log` VALUES ('237', 'wchm', '导出预售表单', '', '', '2018-11-16 10:43:27', '1');
INSERT INTO `website_operation_log` VALUES ('238', 'wchm', '登入', '', '', '2018-11-16 11:19:39', '1');
INSERT INTO `website_operation_log` VALUES ('239', 'wchm', '登入', '', '', '2018-11-16 11:29:43', '1');
INSERT INTO `website_operation_log` VALUES ('240', 'wchm', '导出预售表单', '', '', '2018-11-16 11:29:50', '1');
INSERT INTO `website_operation_log` VALUES ('241', 'wchm', '导出预售表单', '', '', '2018-11-16 11:31:17', '1');
INSERT INTO `website_operation_log` VALUES ('242', 'wchm', '导出预售表单', '', '', '2018-11-16 11:31:46', '1');
INSERT INTO `website_operation_log` VALUES ('243', 'wchm', '导出预售表单', '', '', '2018-11-16 11:32:53', '1');
INSERT INTO `website_operation_log` VALUES ('244', 'wchm', '登入', '', '', '2018-11-19 09:17:15', '1');
INSERT INTO `website_operation_log` VALUES ('245', 'wchm', '登入', '', '', '2018-11-19 09:17:22', '1');
INSERT INTO `website_operation_log` VALUES ('246', 'wchm', '登入', '', '', '2018-11-19 09:17:26', '1');
INSERT INTO `website_operation_log` VALUES ('247', 'wchm', '登入', '', '', '2018-11-19 09:17:27', '1');
INSERT INTO `website_operation_log` VALUES ('248', 'wchm', '登入', '', '', '2018-11-19 09:17:28', '1');
INSERT INTO `website_operation_log` VALUES ('249', 'wchm', '登入', '', '', '2018-11-19 09:17:52', '1');
INSERT INTO `website_operation_log` VALUES ('250', 'wchm', '登入', '', '', '2018-11-19 09:19:03', '1');
INSERT INTO `website_operation_log` VALUES ('251', 'wchm', '登入', '', '', '2018-11-19 10:11:27', '1');
INSERT INTO `website_operation_log` VALUES ('252', 'wchm', '登入', '', '', '2018-11-19 16:31:13', '1');
INSERT INTO `website_operation_log` VALUES ('253', 'wchm', '登入', '', '', '2018-11-19 16:31:14', '1');
INSERT INTO `website_operation_log` VALUES ('254', 'wchm', '登入', '', '', '2018-11-19 16:31:30', '1');
INSERT INTO `website_operation_log` VALUES ('255', 'wchm', '登入', '', '', '2018-11-19 18:01:13', '1');
INSERT INTO `website_operation_log` VALUES ('256', 'wchm', '登入', '', '', '2018-11-19 18:02:20', '1');
INSERT INTO `website_operation_log` VALUES ('257', 'wchm', '登入', '', '', '2018-11-19 18:03:50', '1');
INSERT INTO `website_operation_log` VALUES ('258', 'wchm', '添加公告', '', '', '2018-11-19 18:04:00', '1');
INSERT INTO `website_operation_log` VALUES ('259', 'wchm', '添加公告', '', '', '2018-11-19 18:04:02', '1');
INSERT INTO `website_operation_log` VALUES ('260', 'wchm', '添加公告', '', '', '2018-11-19 18:04:04', '1');
INSERT INTO `website_operation_log` VALUES ('261', 'wchm', '登入', '', '', '2018-11-19 18:05:09', '1');
INSERT INTO `website_operation_log` VALUES ('262', 'wchm', '添加公告', '', '', '2018-11-19 18:05:24', '1');
INSERT INTO `website_operation_log` VALUES ('263', 'wchm', '添加公告', '', '', '2018-11-19 18:05:43', '1');
INSERT INTO `website_operation_log` VALUES ('264', 'wchm', '登入', '', '', '2018-11-19 18:08:19', '1');
INSERT INTO `website_operation_log` VALUES ('265', 'wchm', '登入', '', '', '2018-11-19 18:09:27', '1');
INSERT INTO `website_operation_log` VALUES ('266', 'wchm', '添加公告', '', '', '2018-11-19 18:10:34', '1');
INSERT INTO `website_operation_log` VALUES ('267', 'wchm', '登入', '', '', '2018-11-19 18:11:08', '1');
INSERT INTO `website_operation_log` VALUES ('268', 'wchm', '添加公告', '', '', '2018-11-19 18:11:21', '1');
INSERT INTO `website_operation_log` VALUES ('269', 'wchm', '登入', '', '', '2018-11-19 18:13:43', '1');
INSERT INTO `website_operation_log` VALUES ('270', 'wchm', '登入', '', '', '2018-11-19 18:13:43', '1');
INSERT INTO `website_operation_log` VALUES ('271', 'wchm', '登入', '', '', '2018-11-19 18:14:30', '1');
INSERT INTO `website_operation_log` VALUES ('272', 'wchm', '添加公告', '', '', '2018-11-19 18:14:49', '1');
INSERT INTO `website_operation_log` VALUES ('273', 'wchm', '登入', '', '', '2018-11-20 09:13:59', '1');
INSERT INTO `website_operation_log` VALUES ('274', 'wchm', '删除公告', '', '', '2018-11-20 09:14:05', '1');
INSERT INTO `website_operation_log` VALUES ('275', 'wchm', '删除公告', '', '', '2018-11-20 09:14:37', '1');
INSERT INTO `website_operation_log` VALUES ('276', 'wchm', '删除公告', '', '', '2018-11-20 09:14:39', '1');
INSERT INTO `website_operation_log` VALUES ('277', 'wchm', '添加公告', '', '', '2018-11-20 09:14:40', '0');
INSERT INTO `website_operation_log` VALUES ('278', 'wchm', '删除公告', '', '', '2018-11-20 09:14:41', '1');
INSERT INTO `website_operation_log` VALUES ('279', 'wchm', '删除公告', '', '', '2018-11-20 09:14:45', '1');
INSERT INTO `website_operation_log` VALUES ('280', 'wchm', '删除公告', '', '', '2018-11-20 09:14:48', '1');
INSERT INTO `website_operation_log` VALUES ('281', 'wchm', '删除公告', '', '', '2018-11-20 09:14:50', '1');
INSERT INTO `website_operation_log` VALUES ('282', 'wchm', '删除公告', '', '', '2018-11-20 09:14:54', '1');
INSERT INTO `website_operation_log` VALUES ('283', 'wchm', '删除公告', '', '', '2018-11-20 09:14:57', '1');
INSERT INTO `website_operation_log` VALUES ('284', 'wchm', '添加公告', '', '', '2018-11-20 09:15:12', '1');
INSERT INTO `website_operation_log` VALUES ('285', 'wchm', '修改公告', '', '', '2018-11-20 09:15:25', '1');
INSERT INTO `website_operation_log` VALUES ('286', 'wchm', '添加公告', '', '', '2018-11-20 09:15:37', '1');
INSERT INTO `website_operation_log` VALUES ('287', 'wchm', '登入', '', '', '2018-11-20 17:12:19', '1');
INSERT INTO `website_operation_log` VALUES ('288', 'wchm', '登入', '', '', '2018-11-21 10:19:25', '1');
INSERT INTO `website_operation_log` VALUES ('289', 'wchm', '登入', '', '', '2018-11-21 10:26:38', '1');
INSERT INTO `website_operation_log` VALUES ('290', 'wchm', '登入', '', '', '2018-11-21 10:27:48', '1');
INSERT INTO `website_operation_log` VALUES ('291', 'wchm', '登入', '', '', '2018-11-21 10:35:31', '1');
INSERT INTO `website_operation_log` VALUES ('292', 'wchm', '代币池用户导入', '', '', '2018-11-21 10:35:40', '1');
INSERT INTO `website_operation_log` VALUES ('293', 'wchm', '登入', '', '', '2018-11-21 13:39:36', '1');
INSERT INTO `website_operation_log` VALUES ('294', 'wchm', '登入', '', '', '2018-11-21 14:02:15', '1');
INSERT INTO `website_operation_log` VALUES ('295', 'wchm', '登入', '', '', '2018-11-21 14:31:24', '1');
INSERT INTO `website_operation_log` VALUES ('296', 'wchm', '登入', '', '', '2018-11-21 14:45:42', '1');
INSERT INTO `website_operation_log` VALUES ('297', 'wchm', '登入', '', '', '2018-11-21 14:51:45', '1');
INSERT INTO `website_operation_log` VALUES ('298', 'wchm', '登入', '', '', '2018-11-21 14:55:40', '1');
INSERT INTO `website_operation_log` VALUES ('299', 'wchm', '登入', '', '', '2018-11-21 14:56:41', '1');
INSERT INTO `website_operation_log` VALUES ('300', 'wchm', '登入', '', '', '2018-11-21 15:01:51', '1');
INSERT INTO `website_operation_log` VALUES ('301', 'wchm', '登入', '', '', '2018-11-21 15:02:49', '1');
INSERT INTO `website_operation_log` VALUES ('302', 'wchm', '登入', '', '', '2018-11-21 15:33:58', '1');
INSERT INTO `website_operation_log` VALUES ('303', 'wchm', '登入', '', '', '2018-11-21 16:12:31', '1');
INSERT INTO `website_operation_log` VALUES ('304', 'wchm', '代币池用户导入', '', '', '2018-11-21 16:13:10', '1');
INSERT INTO `website_operation_log` VALUES ('305', 'wchm', '登入', '', '', '2018-11-21 16:14:15', '1');
INSERT INTO `website_operation_log` VALUES ('306', 'wchm', '登入', '', '', '2018-11-21 16:16:54', '1');
INSERT INTO `website_operation_log` VALUES ('307', 'wchm', '代币池用户导入', '', '', '2018-11-21 16:20:29', '1');
INSERT INTO `website_operation_log` VALUES ('308', 'wchm', '登入', '', '', '2018-11-21 16:21:23', '1');
INSERT INTO `website_operation_log` VALUES ('309', 'wchm', '登入', '', '', '2018-11-21 16:23:26', '1');
INSERT INTO `website_operation_log` VALUES ('310', 'wchm', '登入', '', '', '2018-11-21 16:26:17', '1');
INSERT INTO `website_operation_log` VALUES ('311', 'wchm', '代币池用户导入', '', '', '2018-11-21 16:27:00', '1');
INSERT INTO `website_operation_log` VALUES ('312', 'wchm', '登入', '', '', '2018-11-21 16:49:58', '1');
INSERT INTO `website_operation_log` VALUES ('313', 'wchm', '代币池用户导入', '', '', '2018-11-21 16:50:23', '1');
INSERT INTO `website_operation_log` VALUES ('314', 'wchm', '登入', '', '', '2018-11-21 16:54:18', '1');
INSERT INTO `website_operation_log` VALUES ('315', 'wchm', '代币池用户导入', '', '', '2018-11-21 16:55:23', '1');
INSERT INTO `website_operation_log` VALUES ('316', 'wchm', '登入', '', '', '2018-11-21 16:59:00', '1');
INSERT INTO `website_operation_log` VALUES ('317', 'wchm', '代币池用户导入', '', '', '2018-11-21 16:59:12', '1');
INSERT INTO `website_operation_log` VALUES ('318', 'wchm', '代币池用户导入', '', '', '2018-11-21 17:00:34', '1');
INSERT INTO `website_operation_log` VALUES ('319', 'wchm', '代币池用户导入', '', '', '2018-11-21 17:00:51', '1');
INSERT INTO `website_operation_log` VALUES ('320', 'wchm', '代币池用户导入', '', '', '2018-11-21 17:09:44', '0');
INSERT INTO `website_operation_log` VALUES ('321', 'wchm', '登入', '', '', '2018-11-21 17:14:25', '1');
INSERT INTO `website_operation_log` VALUES ('322', 'wchm', '登入', '', '', '2018-11-21 17:43:03', '1');
INSERT INTO `website_operation_log` VALUES ('323', 'wchm', '登入', '', '', '2018-11-21 17:44:23', '1');
INSERT INTO `website_operation_log` VALUES ('324', 'wchm', '登入', '', '', '2018-11-21 17:45:06', '1');
INSERT INTO `website_operation_log` VALUES ('325', 'wchm', '登入', '', '', '2018-11-21 17:46:10', '1');
INSERT INTO `website_operation_log` VALUES ('326', 'wchm', '登入', '', '', '2018-11-21 17:48:22', '1');
INSERT INTO `website_operation_log` VALUES ('327', 'wchm', '登入', '', '', '2018-11-21 17:48:58', '1');
INSERT INTO `website_operation_log` VALUES ('328', 'wchm', '登入', '', '', '2018-11-21 17:49:56', '1');
INSERT INTO `website_operation_log` VALUES ('329', 'wchm', '登入', '', '', '2018-11-21 18:04:11', '1');
INSERT INTO `website_operation_log` VALUES ('330', 'wchm', '登入', '', '', '2018-11-22 09:11:36', '1');
INSERT INTO `website_operation_log` VALUES ('331', 'wchm', '登入', '', '', '2018-11-22 09:27:15', '1');
INSERT INTO `website_operation_log` VALUES ('332', 'wchm', '登入', '', '', '2018-11-22 09:34:48', '1');
INSERT INTO `website_operation_log` VALUES ('333', 'wchm', '登入', '', '', '2018-11-22 09:36:54', '1');
INSERT INTO `website_operation_log` VALUES ('334', 'wchm', '登入', '', '', '2018-11-22 09:38:54', '1');
INSERT INTO `website_operation_log` VALUES ('335', 'wchm', '登入', '', '', '2018-11-22 09:41:24', '1');
INSERT INTO `website_operation_log` VALUES ('336', 'wchm', '登入', '', '', '2018-11-22 09:42:23', '1');
INSERT INTO `website_operation_log` VALUES ('337', 'wchm', '登入', '', '', '2018-11-22 09:44:46', '1');
INSERT INTO `website_operation_log` VALUES ('338', 'wchm', '登入', '', '', '2018-11-22 09:45:26', '1');
INSERT INTO `website_operation_log` VALUES ('339', 'wchm', '登入', '', '', '2018-11-22 09:46:23', '1');
INSERT INTO `website_operation_log` VALUES ('340', 'wchm', '登入', '', '', '2018-11-22 09:47:06', '1');
INSERT INTO `website_operation_log` VALUES ('341', 'wchm', '登入', '', '', '2018-11-22 09:47:17', '1');
INSERT INTO `website_operation_log` VALUES ('342', 'wchm', '登入', '', '', '2018-11-22 09:48:24', '1');
INSERT INTO `website_operation_log` VALUES ('343', 'wchm', '登入', '', '', '2018-11-22 09:49:39', '1');
INSERT INTO `website_operation_log` VALUES ('344', 'wchm', '登入', '', '', '2018-11-22 09:52:46', '1');
INSERT INTO `website_operation_log` VALUES ('345', 'wchm', '代币池用户导入', '', '', '2018-11-22 09:54:09', '1');
INSERT INTO `website_operation_log` VALUES ('346', 'wchm', '登入', '', '', '2018-11-22 09:55:17', '1');
INSERT INTO `website_operation_log` VALUES ('347', 'wchm', '代币池用户导入', '', '', '2018-11-22 09:55:28', '1');
INSERT INTO `website_operation_log` VALUES ('348', 'wchm', '代币池用户导入', '', '', '2018-11-22 09:55:51', '1');
INSERT INTO `website_operation_log` VALUES ('349', 'wchm', '登入', '', '', '2018-11-22 10:00:15', '1');
INSERT INTO `website_operation_log` VALUES ('350', 'wchm', '登入', '', '', '2018-11-22 10:02:39', '1');
INSERT INTO `website_operation_log` VALUES ('351', 'wchm', '登入', '', '', '2018-11-22 10:05:25', '1');
INSERT INTO `website_operation_log` VALUES ('352', 'wchm', '登入', '', '', '2018-11-22 10:06:05', '1');
INSERT INTO `website_operation_log` VALUES ('353', 'wchm', '登入', '', '', '2018-11-22 10:07:37', '1');
INSERT INTO `website_operation_log` VALUES ('354', 'wchm', '登入', '', '', '2018-11-22 10:08:45', '1');
INSERT INTO `website_operation_log` VALUES ('355', 'wchm', '登入', '', '', '2018-11-22 10:09:24', '1');
INSERT INTO `website_operation_log` VALUES ('356', 'wchm', '登入', '', '', '2018-11-22 10:10:54', '1');
INSERT INTO `website_operation_log` VALUES ('357', 'wchm', '登入', '', '', '2018-11-22 10:12:27', '1');
INSERT INTO `website_operation_log` VALUES ('358', 'wchm', '登入', '', '', '2018-11-22 10:13:31', '1');
INSERT INTO `website_operation_log` VALUES ('359', 'wchm', '登入', '', '', '2018-11-22 10:16:23', '1');
INSERT INTO `website_operation_log` VALUES ('360', 'wchm', '代币池用户导入', '', '', '2018-11-22 10:31:59', '1');
INSERT INTO `website_operation_log` VALUES ('361', 'wchm', '登入', '', '', '2018-11-22 10:32:41', '1');
INSERT INTO `website_operation_log` VALUES ('362', 'wchm', '登入', '', '', '2018-11-22 10:33:05', '1');
INSERT INTO `website_operation_log` VALUES ('363', 'wchm', '代币池用户导入', '', '', '2018-11-22 10:33:10', '1');
INSERT INTO `website_operation_log` VALUES ('364', 'wchm', '登入', '', '', '2018-11-22 10:34:17', '1');
INSERT INTO `website_operation_log` VALUES ('365', 'wchm', '登入', '', '', '2018-11-22 10:34:48', '1');
INSERT INTO `website_operation_log` VALUES ('366', 'wchm', '代币池用户导入', '', '', '2018-11-22 10:34:52', '1');
INSERT INTO `website_operation_log` VALUES ('367', 'wchm', '登入', '', '', '2018-11-22 10:36:17', '1');
INSERT INTO `website_operation_log` VALUES ('368', 'wchm', '代币池用户导入', '', '', '2018-11-22 10:36:31', '1');
INSERT INTO `website_operation_log` VALUES ('369', 'wchm', '登入', '', '', '2018-11-22 10:39:18', '1');
INSERT INTO `website_operation_log` VALUES ('370', 'wchm', '代币池用户导入', '', '', '2018-11-22 10:41:18', '1');
INSERT INTO `website_operation_log` VALUES ('371', 'wchm', '登入', '', '', '2018-11-22 10:41:53', '1');
INSERT INTO `website_operation_log` VALUES ('372', 'wchm', '代币池用户导入', '', '', '2018-11-22 10:42:17', '1');
INSERT INTO `website_operation_log` VALUES ('373', 'wchm', '登入', '', '', '2018-11-22 10:44:44', '1');
INSERT INTO `website_operation_log` VALUES ('374', 'wchm', '登入', '', '', '2018-11-22 10:45:38', '1');
INSERT INTO `website_operation_log` VALUES ('375', 'wchm', '代币池用户导入', '', '', '2018-11-22 10:46:05', '1');
INSERT INTO `website_operation_log` VALUES ('376', 'wchm', '代币池用户导入', '', '', '2018-11-22 10:46:12', '1');
INSERT INTO `website_operation_log` VALUES ('377', 'wchm', '代币池用户导入', '', '', '2018-11-22 10:46:19', '1');
INSERT INTO `website_operation_log` VALUES ('378', 'wchm', '代币池用户导入', '', '', '2018-11-22 10:46:29', '1');
INSERT INTO `website_operation_log` VALUES ('379', 'wchm', '代币池用户导入', '', '', '2018-11-22 10:54:31', '1');
INSERT INTO `website_operation_log` VALUES ('380', 'wchm', '代币池用户导入', '', '', '2018-11-22 11:16:00', '0');
INSERT INTO `website_operation_log` VALUES ('381', 'wchm', '登入', '', '', '2018-11-22 11:47:53', '1');
INSERT INTO `website_operation_log` VALUES ('382', 'wchm', '代币池用户导入', '', '', '2018-11-22 11:48:35', '1');
INSERT INTO `website_operation_log` VALUES ('383', 'wchm', '登入', '', '', '2018-11-22 11:50:03', '1');
INSERT INTO `website_operation_log` VALUES ('384', 'wchm', '代币池用户导入', '', '', '2018-11-22 11:50:10', '1');
INSERT INTO `website_operation_log` VALUES ('385', 'wchm', '代币池用户导入', '', '', '2018-11-22 11:51:17', '1');
INSERT INTO `website_operation_log` VALUES ('386', 'wchm', '代币池用户导入', '', '', '2018-11-22 11:51:29', '0');
INSERT INTO `website_operation_log` VALUES ('387', 'wchm', '代币池用户导入', '', '', '2018-11-22 11:52:10', '1');
INSERT INTO `website_operation_log` VALUES ('388', 'wchm', '代币池用户导入', '', '', '2018-11-22 11:52:26', '1');
INSERT INTO `website_operation_log` VALUES ('389', 'wchm', '代币池用户导入', '', '', '2018-11-22 11:57:16', '1');
INSERT INTO `website_operation_log` VALUES ('390', 'wchm', '代币池用户导入', '', '', '2018-11-22 11:57:19', '1');
INSERT INTO `website_operation_log` VALUES ('391', 'wchm', '代币池用户导入', '', '', '2018-11-22 11:57:21', '0');
INSERT INTO `website_operation_log` VALUES ('392', 'wchm', '登入', '', '', '2018-11-22 13:57:35', '1');
INSERT INTO `website_operation_log` VALUES ('393', 'wchm', '代币池用户导入', '', '', '2018-11-22 13:57:47', '1');
INSERT INTO `website_operation_log` VALUES ('394', 'wchm', '代币池用户导入', '', '', '2018-11-22 13:58:42', '1');
INSERT INTO `website_operation_log` VALUES ('395', 'wchm', '登入', '', '', '2018-11-22 13:59:45', '1');
INSERT INTO `website_operation_log` VALUES ('396', 'wchm', '代币池用户导入', '', '', '2018-11-22 14:00:00', '1');
INSERT INTO `website_operation_log` VALUES ('397', 'wchm', '登入', '', '', '2018-11-22 14:06:06', '1');
INSERT INTO `website_operation_log` VALUES ('398', 'wchm', '登入', '', '', '2018-11-22 14:06:41', '1');
INSERT INTO `website_operation_log` VALUES ('399', 'wchm', '登入', '', '', '2018-11-22 14:10:15', '1');
INSERT INTO `website_operation_log` VALUES ('400', 'wchm', '登入', '', '', '2018-11-22 14:11:58', '1');
INSERT INTO `website_operation_log` VALUES ('401', 'wchm', '删除新闻', '', '', '2018-11-22 14:30:32', '1');
INSERT INTO `website_operation_log` VALUES ('402', 'wchm', '删除新闻', '', '', '2018-11-22 14:30:34', '1');
INSERT INTO `website_operation_log` VALUES ('403', 'wchm', '删除新闻', '', '', '2018-11-22 14:30:37', '1');
INSERT INTO `website_operation_log` VALUES ('404', 'wchm', '登入', '', '', '2018-11-22 14:44:13', '1');
INSERT INTO `website_operation_log` VALUES ('405', 'wchm', '登入', '', '', '2018-11-23 09:47:15', '1');
INSERT INTO `website_operation_log` VALUES ('406', 'wchm', '导出预售表单', '', '', '2018-11-23 09:47:40', '1');
INSERT INTO `website_operation_log` VALUES ('407', 'wchm', '登入', '', '', '2018-11-23 10:18:44', '1');
INSERT INTO `website_operation_log` VALUES ('408', 'wchm', '代币池用户导入', '', '', '2018-11-23 10:18:57', '1');
INSERT INTO `website_operation_log` VALUES ('409', 'wchm', '代币池用户导入', '', '', '2018-11-23 10:21:00', '1');
INSERT INTO `website_operation_log` VALUES ('410', 'wchm', '登入', '', '', '2018-11-23 10:21:33', '1');
INSERT INTO `website_operation_log` VALUES ('411', 'wchm', '代币池用户导入', '', '', '2018-11-23 10:21:55', '1');
INSERT INTO `website_operation_log` VALUES ('412', 'wchm', '代币池用户导入', '', '', '2018-11-23 10:23:01', '1');
INSERT INTO `website_operation_log` VALUES ('413', 'wchm', '登入', '', '', '2018-11-23 10:24:49', '1');
INSERT INTO `website_operation_log` VALUES ('414', 'wchm', '代币池用户导入', '', '', '2018-11-23 10:25:18', '1');
INSERT INTO `website_operation_log` VALUES ('415', 'wchm', '登入', '', '', '2018-11-23 10:32:59', '1');
INSERT INTO `website_operation_log` VALUES ('416', 'wchm', '登入', '', '', '2018-11-23 10:39:52', '1');
INSERT INTO `website_operation_log` VALUES ('417', 'wchm', '登入', '', '', '2018-11-23 11:03:22', '1');
INSERT INTO `website_operation_log` VALUES ('418', 'wchm', '登入', '', '', '2018-11-23 11:10:01', '1');
INSERT INTO `website_operation_log` VALUES ('419', 'wchm', '代币池用户导入', '', '', '2018-11-23 11:10:18', '1');
INSERT INTO `website_operation_log` VALUES ('420', 'wchm', '登入', '', '', '2018-11-23 11:11:50', '1');
INSERT INTO `website_operation_log` VALUES ('421', 'wchm', '代币池用户导入', '', '', '2018-11-23 11:12:02', '1');
INSERT INTO `website_operation_log` VALUES ('422', 'wchm', '代币池用户导入', '', '', '2018-11-23 11:13:24', '1');
INSERT INTO `website_operation_log` VALUES ('423', 'wchm', '登入', '', '', '2018-11-23 11:17:07', '1');
INSERT INTO `website_operation_log` VALUES ('424', 'wchm', '登入', '', '', '2018-11-26 09:22:13', '1');
INSERT INTO `website_operation_log` VALUES ('425', 'wchm', '登入', '', '', '2018-11-26 09:22:16', '1');
INSERT INTO `website_operation_log` VALUES ('426', 'wchm', '登入', '', '', '2018-11-26 09:22:17', '1');
INSERT INTO `website_operation_log` VALUES ('427', 'wchm', '登入', '', '', '2018-11-26 09:22:20', '1');
INSERT INTO `website_operation_log` VALUES ('428', 'wchm', '登入', '', '', '2018-11-26 09:22:21', '1');
INSERT INTO `website_operation_log` VALUES ('429', 'wchm', '登入', '', '', '2018-11-26 09:22:21', '1');
INSERT INTO `website_operation_log` VALUES ('430', 'wchm', '登入', '', '', '2018-11-26 09:22:23', '1');
INSERT INTO `website_operation_log` VALUES ('431', 'wchm', '登入', '', '', '2018-11-26 09:22:51', '1');
INSERT INTO `website_operation_log` VALUES ('432', 'wchm', '登入', '', '', '2018-12-13 10:30:38', '1');
INSERT INTO `website_operation_log` VALUES ('433', 'wchm', '登入', '', '', '2018-12-14 13:59:05', '1');
-- ----------------------------
-- Table structure for website_partner
-- ----------------------------
DROP TABLE IF EXISTS `website_partner`;
CREATE TABLE `website_partner` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
`partner_name` varchar(255) DEFAULT NULL COMMENT '合作伙伴名称',
`number` varchar(255) DEFAULT NULL COMMENT '序号',
`picture` varchar(500) DEFAULT NULL COMMENT '图片',
`link` varchar(255) DEFAULT NULL COMMENT '链接',
`state` int(255) DEFAULT NULL COMMENT '是否展示(默认展示1、不展示0)',
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='合作伙伴表';
-- ----------------------------
-- Records of website_partner
-- ----------------------------
INSERT INTO `website_partner` VALUES ('5', '1', '1', '/upload/images/partner/20181031/20181031094639_922.jps', '1', '1', '2018-09-26 00:00:00');
-- ----------------------------
-- Table structure for website_permission
-- ----------------------------
DROP TABLE IF EXISTS `website_permission`;
CREATE TABLE `website_permission` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`modelname` varchar(20) NOT NULL COMMENT '功能名称',
`permission` varchar(20) NOT NULL COMMENT '权限',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='权限表';
-- ----------------------------
-- Records of website_permission
-- ----------------------------
INSERT INTO `website_permission` VALUES ('1', 'index', 'index:add');
INSERT INTO `website_permission` VALUES ('2', 'index', 'index:update');
-- ----------------------------
-- Table structure for website_role
-- ----------------------------
DROP TABLE IF EXISTS `website_role`;
CREATE TABLE `website_role` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`rolename` varchar(20) NOT NULL COMMENT '角色名称',
`roledesc` varchar(20) DEFAULT NULL COMMENT '角色描述',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='角色表';
-- ----------------------------
-- Records of website_role
-- ----------------------------
INSERT INTO `website_role` VALUES ('1', 'admin', '管理员');
INSERT INTO `website_role` VALUES ('2', 'user', '普通用户');
INSERT INTO `website_role` VALUES ('3', '测试', '测试');
-- ----------------------------
-- Table structure for website_role_permission
-- ----------------------------
DROP TABLE IF EXISTS `website_role_permission`;
CREATE TABLE `website_role_permission` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`rid` int(11) NOT NULL COMMENT 'website_role表id',
`pid` int(11) NOT NULL COMMENT 'website_permission表id',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='角色-权限关联表';
-- ----------------------------
-- Records of website_role_permission
-- ----------------------------
INSERT INTO `website_role_permission` VALUES ('1', '1', '1');
INSERT INTO `website_role_permission` VALUES ('2', '1', '2');
-- ----------------------------
-- Table structure for website_team
-- ----------------------------
DROP TABLE IF EXISTS `website_team`;
CREATE TABLE `website_team` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
`number` varchar(50) NOT NULL COMMENT '序号',
`team_name` varchar(255) DEFAULT NULL COMMENT '团队成员名称',
`description` varchar(500) DEFAULT NULL COMMENT '描述',
`head` varchar(255) DEFAULT NULL COMMENT '头像(保存图片路径)',
`state` int(10) DEFAULT '1' COMMENT '是否展示(默认展示1、不展示0)',
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='团队成员表';
-- ----------------------------
-- Records of website_team
-- ----------------------------
INSERT INTO `website_team` VALUES ('12', '1', '测试', '测试测试', '/upload/images/team/20181031/20181031094142_51.jps', '1', '2018-10-31 00:00:00');
|
-- phpMyAdmin SQL Dump
-- version 4.6.5.2
-- https://www.phpmyadmin.net/
--
-- Host: localhost:8889
-- Generation Time: Nov 15, 2017 at 07:49 PM
-- Server version: 5.6.35
-- PHP Version: 7.1.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: `honeycakes`
--
-- --------------------------------------------------------
--
-- Table structure for table `items`
--
CREATE TABLE `items` (
`item_id` int(11) NOT NULL,
`item_code` varchar(10) NOT NULL,
`item_name` varchar(50) NOT NULL,
`item_category` varchar(50) NOT NULL,
`item_price` varchar(10) NOT NULL,
`qty_slab` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT;
--
-- Dumping data for table `items`
--
INSERT INTO `items` (`item_id`, `item_code`, `item_name`, `item_category`, `item_price`, `qty_slab`) VALUES
(1, 'IT001', 'Blackforest', '1', '850', 1),
(2, 'IT002', 'Whiteforest', '1', '850', 1),
(3, 'IT003', 'Chocotruffle', '1', '700', 1),
(4, 'IT004', 'Jelly Cake', '1', '900', 1),
(5, 'IT005', 'Strawberry', '1', '750', 1),
(6, 'IT006', 'Butterscotch', '1', '750', 1),
(7, 'IT007', 'Vanilla', '1', '700', 1),
(8, 'PARTY01', 'Party Hat', '2', '10', 1),
(9, 'PARTY02', 'Snow Spray', '2', '60', 1),
(10, 'PARTY03', 'Poppers', '2', '100', 1),
(11, 'PARTY04', 'Fancy Candle', '2', '5', 1);
-- --------------------------------------------------------
--
-- Table structure for table `locations`
--
CREATE TABLE `locations` (
`location_id` int(11) NOT NULL,
`location_code` varchar(10) NOT NULL,
`location_name` varchar(100) NOT NULL,
`delivery_vendor` varchar(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `locations`
--
INSERT INTO `locations` (`location_id`, `location_code`, `location_name`, `delivery_vendor`) VALUES
(1, 'LN001', 'Thiruvanmiyur', 'VN004'),
(2, 'LN002', 'Perungudi', 'VN003'),
(3, 'LN003', 'Thoraipakkam', 'VN003'),
(4, 'LN004', 'Karapakkam', 'VN001'),
(5, 'LN005', 'Sholinganallur', 'VN001'),
(6, 'LN006', 'Chemmancherry', 'VN002'),
(7, 'LN007', 'Navallur', 'VN002'),
(8, 'LN008', 'SRP Tools', 'VN004');
-- --------------------------------------------------------
--
-- Table structure for table `orders`
--
CREATE TABLE `orders` (
`order_number` int(11) NOT NULL,
`user_id` int(11) NOT NULL,
`vendor_code` varchar(10) NOT NULL,
`deliver_to` varchar(200) NOT NULL COMMENT 'complete delivery address will be added up here for all historical references',
`timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`total_amount` varchar(10) NOT NULL,
`status` int(1) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `order_feedback`
--
CREATE TABLE `order_feedback` (
`order_feedback_id` int(11) NOT NULL,
`order_number` int(11) NOT NULL,
`rating` int(1) NOT NULL,
`remarks` varchar(500) NOT NULL,
`timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `order_items`
--
CREATE TABLE `order_items` (
`order_item_id` int(11) NOT NULL,
`order_number` int(11) NOT NULL,
`item_code` varchar(10) NOT NULL,
`qty` varchar(10) NOT NULL,
`price` varchar(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `tokens`
--
CREATE TABLE `tokens` (
`token_id` int(11) NOT NULL,
`user_id` int(11) NOT NULL,
`generated_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`token` varchar(200) NOT NULL,
`valid_till` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `tokens`
--
INSERT INTO `tokens` (`token_id`, `user_id`, `generated_time`, `token`, `valid_till`) VALUES
(1, 1, '2017-08-30 22:10:10', 'OTc0YTY3NzdkNTg1ODJhZmRiYWRkYWVkNzMyMjhkMjk=MGQ4ZjQyOTMwZDFmMTYyOTdlOTQ2MDZmODhlMmU2ZGI=NGU2NTAzZmExNWQ3MDUwZDJmODYzNDI4M2JiZmY3MWY=', '0000-00-00 00:00:00'),
(2, 1, '2017-08-30 22:13:11', 'YTFhZTMyZTNiMDNiNDk5ZmJhNDg1ODNmZTY2YWUxY2M=MGQ4ZjQyOTMwZDFmMTYyOTdlOTQ2MDZmODhlMmU2ZGI=YzczZjQ2YmVmY2UxYjY2ZGEyNzdkNjBkMTAzNmNiM2M=', '0000-00-00 00:00:00'),
(3, 1, '2017-08-30 22:17:10', 'M2FlMTE2ZjA3NThjYThkYTA2NzY4NTc0YThhZmU1ZmM=MGQ4ZjQyOTMwZDFmMTYyOTdlOTQ2MDZmODhlMmU2ZGI=OWZhYzg0ZGIzMjM3ODViNjZkNjA5NTlkYWQ4OGZiMjY=', '0000-00-00 00:00:00'),
(4, 1, '2017-08-30 22:17:16', 'NGRjMzdmOGEzODYxNDY3YmYzNGQyMzVlMWZkYzU5ZjQ=MGQ4ZjQyOTMwZDFmMTYyOTdlOTQ2MDZmODhlMmU2ZGI=NjcyMGEwYTA4MDEwOWRiZmI0MTAyOTkyMDA3ZWMyNzM=', '0000-00-00 00:00:00'),
(5, 1, '2017-08-30 22:17:17', 'ZTI1YTQ5Y2UzMWYyODNlNzA4NmY2ZDdkZmNhNGRiYTY=MGQ4ZjQyOTMwZDFmMTYyOTdlOTQ2MDZmODhlMmU2ZGI=OGJjZTJkMjI2NDQ5M2UxZGUwODIxMjIyYmNkYmYwZjA=', '0000-00-00 00:00:00'),
(6, 1, '2017-08-30 22:17:18', 'Y2FiYzdjZWI3MjBlOGI0NTg2YjY3Y2M4NTFjZjJhOTM=MGQ4ZjQyOTMwZDFmMTYyOTdlOTQ2MDZmODhlMmU2ZGI=NWVlYTNlMDMzMThhNTYzYjI0M2FiOGYyNjA1MGEyNjY=', '0000-00-00 00:00:00'),
(7, 1, '2017-08-30 22:17:19', 'MTMxNGEyNzJhYWE0OWY2MjNjY2MzY2IxMmQ1MTM1Mzk=MGQ4ZjQyOTMwZDFmMTYyOTdlOTQ2MDZmODhlMmU2ZGI=OWM4NmRiZTAxMmQwNDRmMDAyY2Y4MGZjYzE3MzRiNjM=', '0000-00-00 00:00:00'),
(8, 1, '2017-08-30 22:56:07', 'NzFiM2RiZmQwYTQ2NzJkOTZiMDBlZmNhYzlmMzExNjc=MGQ4ZjQyOTMwZDFmMTYyOTdlOTQ2MDZmODhlMmU2ZGI=YjYwYjZmZTNkMWZkY2I5MzZjNDI2MDJmOTEyMjNhY2Y=', '0000-00-00 00:00:00'),
(9, 1, '2017-08-30 22:56:19', 'MjAyMjQyOWRiMTE5MTFlMTNiMTExYzY3MzQ4YWQ0Mzc=MGQ4ZjQyOTMwZDFmMTYyOTdlOTQ2MDZmODhlMmU2ZGI=NzFjOWFmYmMyZjljY2JjOGVkNjI3NWJiNTc4ZWFmNDA=', '0000-00-00 00:00:00'),
(10, 1, '2017-08-30 22:56:20', 'MzYxY2M1YTA5NTZiOTUzZTZmNjNhMzRhYzU4ZDg5NDY=MGQ4ZjQyOTMwZDFmMTYyOTdlOTQ2MDZmODhlMmU2ZGI=NTU1Y2E2YTMwMzA2ZjNhODY3ZWZlNGIwZDUzMmVkNDM=', '0000-00-00 00:00:00'),
(11, 1, '2017-08-30 22:56:21', 'YTk3ZDdlMTBhMzk2NTUwYmJiNTc2NGQxMDMzMzA0N2Q=MGQ4ZjQyOTMwZDFmMTYyOTdlOTQ2MDZmODhlMmU2ZGI=ZGE1ZmI1ZDU4ZDY1YTgzYjUzMWFjMzczNjU5ZjRkNGY=', '0000-00-00 00:00:00'),
(12, 1, '2017-08-31 15:42:20', 'NzhlZGMyZDRkZGU1YWQwNzk0M2U5NDU1ZjhjZGY4YjY=MGQ4ZjQyOTMwZDFmMTYyOTdlOTQ2MDZmODhlMmU2ZGI=NzI3ZjcxOWFhMTYyYjg4OTYxNzliMDE4Nzc1YTk0MGI=', '2017-09-02 17:42:20'),
(13, 1, '2017-08-31 15:48:40', 'ZDNhOGFiY2NmYzY1OTUzODM4NTYxNjVkY2QzY2NkYTU=MGQ4ZjQyOTMwZDFmMTYyOTdlOTQ2MDZmODhlMmU2ZGI=OTM1NjAyM2NjYmJiNjUyYmE3YzI1MzljNTEwZDg5YTA=', '2017-09-02 21:18:40'),
(14, 1, '2017-08-31 15:57:30', 'NjcxZTRhYzcxNTlmOTE4NjVjNDQ5Zjk3YjUzZjRlOTU=MGQ4ZjQyOTMwZDFmMTYyOTdlOTQ2MDZmODhlMmU2ZGI=NzEzYmQ0YzVkNmU2YTk3MzQ5MTEzNGYyNzdhNTg5YTU=', '2017-09-02 21:27:30'),
(15, 1, '2017-08-31 19:37:17', 'MTFkY2Y1NGU0MWQ5ODQ1NjE1NzdkM2ExNjQxYmIyOWM=MGQ4ZjQyOTMwZDFmMTYyOTdlOTQ2MDZmODhlMmU2ZGI=MjUyNmRlMzNkZTBjZjMxOTdiYWJhMWZhNTcyZjViYzc=', '2017-08-31 21:27:59'),
(16, 1, '2017-08-31 18:27:42', 'NmYyYmVlMzgxMjQ3NmY3NDUyMDk1YTA1OTA5N2Y5YzU=MGQ4ZjQyOTMwZDFmMTYyOTdlOTQ2MDZmODhlMmU2ZGI=ZTdiNDFiOGY0MDZiMjkxOTJjMjc4NDE3NjEyNTg2ZGQ=', '2017-08-31 22:35:41'),
(17, 1, '2017-08-31 18:38:22', 'NzJhMjQzNWVkZDVlYWYwMWEwMzdiM2M5ZmU2YWVlN2Q=MGQ4ZjQyOTMwZDFmMTYyOTdlOTQ2MDZmODhlMmU2ZGI=ZGRmZDYyZWEyNTNkOGQwNzhlNjlhYzViZWQxMmQ1YzU=', '2017-09-03 00:08:22'),
(18, 1, '2017-08-31 18:39:30', 'OTA2YWQyZDkxZGMwNmE4YmRmNmJlMjFkNjY3OTgzNGI=MGQ4ZjQyOTMwZDFmMTYyOTdlOTQ2MDZmODhlMmU2ZGI=NWU1NThmN2RlZjdkOWEyZGIwMWUyOTQ3ZmY1ZjEyMjU=', '2017-09-03 00:09:30'),
(19, 1, '2017-08-31 18:40:10', 'NzAwMGUyNjAyYzI0OTZiMGNkMTViYTE4MTA5Y2QyOGI=MGQ4ZjQyOTMwZDFmMTYyOTdlOTQ2MDZmODhlMmU2ZGI=MDY0NTI1YjBlNjMwMTY4NWJiZGFiMWY2NjE0NWYxNmI=', '2017-09-03 00:10:10'),
(20, 1, '2017-08-31 18:41:00', 'ZjI0ZWFiODg1MzI1ZTVkZDViNjE3MThhYTU2YzUxMDU=MGQ4ZjQyOTMwZDFmMTYyOTdlOTQ2MDZmODhlMmU2ZGI=MTdmYjUyNjIxZWVkNTI1N2Y4Mjk5YjE0NzI0NDZkZTY=', '2017-09-03 00:11:00'),
(21, 1, '2017-08-31 18:53:58', 'ZjAxMGQ2YTc2OTJjZDg2Y2FjM2YyNDM5NzQ0ZjY1NGE=MGQ4ZjQyOTMwZDFmMTYyOTdlOTQ2MDZmODhlMmU2ZGI=MTQyMGM4ZWRhM2Y3ZDg3OTEwMDcwZWVmYzBlMDQyNzA=', '2017-09-01 00:22:44'),
(22, 1, '2017-08-31 18:59:30', 'Y2E1OTczOTE0MmFhYzYxZTU3ZjEzZDFiYjU4MjkwZDU=MGQ4ZjQyOTMwZDFmMTYyOTdlOTQ2MDZmODhlMmU2ZGI=MzMwOWQ3Y2U1YTk4YTg4M2RjZTY5ZDQ2NjNiY2Y1ODg=', '2017-09-03 00:29:30'),
(23, 1, '2017-09-02 03:15:55', 'NTA4NWNjMDI4MDEzOWMyNTE1NzQ2OGFkYmYyZTMxNzE=MGQ4ZjQyOTMwZDFmMTYyOTdlOTQ2MDZmODhlMmU2ZGI=NWQ1MjNhOWZkZjI3NDRmOGIwNDI4NTVjODc0ODk1ZjE=', '2017-09-04 08:45:55'),
(24, 1, '2017-10-22 17:34:18', 'NWYxMzA2ZmYzYzNkODExYmY3MjgwOTQyN2QwYTZjNjI=MGQ4ZjQyOTMwZDFmMTYyOTdlOTQ2MDZmODhlMmU2ZGI=ZmU0MzQzOTliMzhhNTY5Y2M0MDBlZGE2YWM1YjVmNzA=', '2017-10-24 23:04:18'),
(25, 1, '2017-10-24 17:41:29', 'ZjJmZGFhODg2MDE4ODUwZDI2YjI4M2RkMzAwZjA4MDQ=MGQ4ZjQyOTMwZDFmMTYyOTdlOTQ2MDZmODhlMmU2ZGI=NWIxMjkwMjY1NzRlYzlmZTZkNjg3YzEwYzE1YzY2N2U=', '2017-10-26 23:11:29'),
(26, 1, '2017-10-25 02:39:03', 'YTlkYWU1N2EzODRmMjU3Yzk3ZTBlNDFmOWRkOTg3NmE=MGQ4ZjQyOTMwZDFmMTYyOTdlOTQ2MDZmODhlMmU2ZGI=NWRmMDQyYmNjM2IwMTA5NWY1MDcwMjZkOTQ5ZTk2NjY=', '2017-10-27 08:09:03'),
(27, 1, '2017-11-03 07:35:52', 'NmQ0M2YzZTg2YjkyZmI1ZGI5ODc3NzdlN2MwMzExNDk=MGQ4ZjQyOTMwZDFmMTYyOTdlOTQ2MDZmODhlMmU2ZGI=NjQ5MGZmN2Q3ZjJjYjljZGE0ODExOWMzMDljNmE3NTI=', '2017-11-05 13:05:52'),
(28, 1, '2017-11-03 07:37:43', 'YzZhODVhNjk0YTZmMGRjNTc2NjYxNmUzNGFmNDY5MDA_MGQ4ZjQyOTMwZDFmMTYyOTdlOTQ2MDZmODhlMmU2ZGI_Y2ExNTFjZTkxMGViZWY5OWE4OTYwOWY3MmM3ZDZiOTk_', '2017-11-05 13:07:43'),
(29, 1, '2017-11-03 13:26:12', 'MThmYWYyYjVmNmRkMTI4NGIxMGU4ZDI0MzgyNGZkNTA_MGQ4ZjQyOTMwZDFmMTYyOTdlOTQ2MDZmODhlMmU2ZGI_YTYzOTNlYjExYTE5M2RmYzFjYmEwM2EwMjI1YmNjMmQ_', '2017-11-05 18:56:12'),
(30, 1, '2017-11-05 15:54:44', 'MDcxY2Y0ZTMxYmYxNWVjZGRmMjliZDZiN2IwN2NhNmU_MGQ4ZjQyOTMwZDFmMTYyOTdlOTQ2MDZmODhlMmU2ZGI_MjYzMjM4YmI3YzY1YzEyN2UxZjc3MWI1M2JkOGYzMWQ_', '2017-11-07 21:24:44'),
(31, 1, '2017-11-07 15:59:45', 'YmQ0ZWNjY2EwYjhhNzc0Mzc5MzQzY2RhMDY1MGU0ZDE_MGQ4ZjQyOTMwZDFmMTYyOTdlOTQ2MDZmODhlMmU2ZGI_NDlmMDVlNWM2ZGI5MWZmNTMzZTliOTU2NGY4MmU2ZTc_', '2017-11-09 21:29:45'),
(32, 1, '2017-11-09 19:16:49', 'MDgwZDQxZGMyYjVjMDdjNTczNTlhOTlhM2E4MjIyMzQ_MGQ4ZjQyOTMwZDFmMTYyOTdlOTQ2MDZmODhlMmU2ZGI_NDEwN2QyOWY0NDMwMGIyZjAzNTI2OTMzZTZkMDNlNmU_', '2017-11-12 00:46:49'),
(33, 1, '2017-11-12 01:45:20', 'ZWI0NjY3ZmYzOTM3OWEzZjJhZGM2MTQzMDA4YjkxNGM_MGQ4ZjQyOTMwZDFmMTYyOTdlOTQ2MDZmODhlMmU2ZGI_YTZlMjdmNmM1Y2VlN2I5Mzk0ZDViMTc2Njk3NWQ5MzI_', '2017-11-14 07:15:20'),
(34, 1, '2017-11-12 11:54:39', 'MzE1NTJlMGNlNTEwYTlmM2IxYzU2YzRmOTUzNGI0YWY_MGQ4ZjQyOTMwZDFmMTYyOTdlOTQ2MDZmODhlMmU2ZGI_MmMyNTU4MTczNTUzYjFmNDYyYzY4NTZmMGVhMThiY2I_', '2017-11-14 17:24:39'),
(35, 1, '2017-11-12 13:47:55', 'Mzc1MTkwMzQwNGRhNjgyZmI0NGJjMjRlNWM3MzBhNWQ_MGQ4ZjQyOTMwZDFmMTYyOTdlOTQ2MDZmODhlMmU2ZGI_MmQ4MmQwZjQwYzg3ZTA5OTRjOWQ0OTQ5MmVhM2MyMGI_', '2017-11-14 19:17:55'),
(36, 1, '2017-11-13 15:09:17', 'ZGRkMDBjYzhkY2RjYTAwZGJiZTJiMGI3NDc2OWQyYzE_MGQ4ZjQyOTMwZDFmMTYyOTdlOTQ2MDZmODhlMmU2ZGI_ZDY0YmUwYTk1OGQ4ODYxMTFjZTQ5YTk2ODk3NWNlNDc_', '2017-11-15 20:39:17'),
(37, 1, '2017-11-13 15:21:41', 'OWU4NzA0MTQ1NzY1NDcxMjNkMzYzZmU4MDQ1YzU0ZmU_MGQ4ZjQyOTMwZDFmMTYyOTdlOTQ2MDZmODhlMmU2ZGI_ZjJhZTFhM2JhMTNlZTFjY2JlMzhkMGEwOTQzMmUzYjM_', '2017-11-15 20:51:41'),
(38, 1, '2017-11-13 15:43:47', 'ZmM1NzY2MzExYjY2ODEwYjU5NzQwMDNmOGZmZTU1ZGI_MGQ4ZjQyOTMwZDFmMTYyOTdlOTQ2MDZmODhlMmU2ZGI_YzEwYTU4ZDdjYzFkOTg3NmZmZWNkMDc4ZTExMTdlMDQ_', '2017-11-15 21:13:47'),
(39, 1, '2017-11-13 16:05:01', 'YWU2OWZkZDBkYWM2OTE1ODUwMWVmM2U2YzA0YjViOGE_MGQ4ZjQyOTMwZDFmMTYyOTdlOTQ2MDZmODhlMmU2ZGI_NmI0NzhkNzFmM2ZjODM5Njk2ZDgwOTc0YzIwNmU4YmI_', '2017-11-15 21:35:01'),
(40, 1, '2017-11-13 16:07:32', 'NTljMGJlODIzMTEyZmJiMzlkMjhhNTg2Y2MzOWJmMjM_MGQ4ZjQyOTMwZDFmMTYyOTdlOTQ2MDZmODhlMmU2ZGI_N2Y3MGIwNTg2MWQ5MWI5NTFhNjk4NGJlOTdiNjA5ZjQ_', '2017-11-15 21:37:32'),
(41, 1, '2017-11-13 16:26:51', 'MzBjZDk1YzdiNWYyMGU4MjI4OTExYTE5MjkwNDRlMjY_MGQ4ZjQyOTMwZDFmMTYyOTdlOTQ2MDZmODhlMmU2ZGI_MjllNWM1OGYxMDIwNWJlYzMzMjgxMGRmYWZlOWVlZjY_', '2017-11-15 21:56:51'),
(42, 1, '2017-11-13 16:44:06', 'ZmVhYjcxN2U3NGIxNTE2OTAwZDY3NTBlMTgyYTRkMWI_MGQ4ZjQyOTMwZDFmMTYyOTdlOTQ2MDZmODhlMmU2ZGI_ZjU0ZTBmMjAxY2JmZTI0ZWVkNzY4Y2I2ZTMzN2Y5NmM_', '2017-11-15 22:14:06'),
(43, 1, '2017-11-13 16:44:51', 'N2U2MzgxYmVkNTMzZTE3NDJlOWIzZmYxMzcyZjM4NmU_MGQ4ZjQyOTMwZDFmMTYyOTdlOTQ2MDZmODhlMmU2ZGI_YmRmYzI3ZjVjMDYzYjY0ZDYxOWQxY2EyMzZiNWUxYTA_', '2017-11-15 22:14:51'),
(44, 1, '2017-11-13 16:58:31', 'Y2UxMDM1M2MyMmQyMzRiYjlmNmM5ZDdmOTZmZTk0ZTI_MGQ4ZjQyOTMwZDFmMTYyOTdlOTQ2MDZmODhlMmU2ZGI_ZjNjYmQwNjhiMDliNWYwNGNlZjJmYmIzODgxOWFjMTc_', '2017-11-15 22:28:31'),
(45, 1, '2017-11-13 17:20:58', 'ZmNiYmJjNGMzMzdhZjI4NjVhOWZjNWQyOGNjODY3NGM_MGQ4ZjQyOTMwZDFmMTYyOTdlOTQ2MDZmODhlMmU2ZGI_ZDYxMTQwMzVmNjhhMzJmMmU2OTg1NWE5N2QyOWQ2NWI_', '2018-11-13 22:50:58'),
(46, 1, '2017-11-13 17:40:10', 'OWQyZTBjNGY2MmM2NzI2MWMxZDI1YTYxZmZkZTNjNGY_MGQ4ZjQyOTMwZDFmMTYyOTdlOTQ2MDZmODhlMmU2ZGI_NjgwYjkxYmIyZDQ2MzE3ZjY2YmM1ZThkMzkyMjY2ZTU_', '2018-11-13 23:10:10'),
(47, 1, '2017-11-13 17:40:26', 'ZDY2MjQxMmM5MjMxZjIyMGE2NDkwMzkxYTE5NTM1Njk_MGQ4ZjQyOTMwZDFmMTYyOTdlOTQ2MDZmODhlMmU2ZGI_NDYyNGM1NjQwNTcyNDY5ZTA5N2Q4MDZhMWNlZTdkZTI_', '2018-11-13 23:10:26'),
(48, 1, '2017-11-13 17:42:28', 'ZGIzNThjMjI5OGFkYjhlZmI0NzViYjZmYTBiYTQ0NzM_MGQ4ZjQyOTMwZDFmMTYyOTdlOTQ2MDZmODhlMmU2ZGI_YTMxMmFiYTdiNDYwMThjYTlkMGUyZTdmNzM2M2EzNjg_', '2018-11-13 23:12:28'),
(49, 1, '2017-11-13 17:57:07', 'NzMwOTBiOTA4MGIzNDk5ZjNhYzUwNDJlNmU1NmJmMGM_MGQ4ZjQyOTMwZDFmMTYyOTdlOTQ2MDZmODhlMmU2ZGI_NjQ2NmY0YzI3NDhjYTk4ZTZiZGZkNmRmZmIwNGI2ZWM_', '2018-11-13 23:27:07'),
(50, 1, '2017-11-14 01:59:18', 'NmVmYjQ3MTMyYWY1N2NlMDk5NDk4YjhiNDFlNTE3YjI_MGQ4ZjQyOTMwZDFmMTYyOTdlOTQ2MDZmODhlMmU2ZGI_NGQ4YmQ0MTUwN2I2ZjY2OTYzN2ZjNDAwY2FmOGI5Njk_', '2018-11-14 07:29:18'),
(51, 1, '2017-11-14 02:20:09', 'YjY0ZjU5ZTYwZWRkNjRjOGNlNTdiZGNmZTc3NzljMjc_MGQ4ZjQyOTMwZDFmMTYyOTdlOTQ2MDZmODhlMmU2ZGI_MzYyZWZjMTk3YTU5OTZkNzkwZTJjNjdlNDA5NGM3Mzg_', '2018-11-14 07:50:09'),
(52, 1, '2017-11-14 02:46:05', 'OWU1ODYxODZkNGJmNDJjZjQ0NWM2ZGYxOTA3ZjdkOTc_MGQ4ZjQyOTMwZDFmMTYyOTdlOTQ2MDZmODhlMmU2ZGI_ZmU3YTkxYTlhNTA4YWUzNDVmMWQwZDQ3MzkzNmZjYzc_', '2018-11-14 08:16:05'),
(53, 1, '2017-11-14 16:54:04', 'MThmMjY1YzRjNWRiNzAwN2ZjNjdhNzEwYTkzNGJlNzU_MGQ4ZjQyOTMwZDFmMTYyOTdlOTQ2MDZmODhlMmU2ZGI_OThmZGNjZjc4NmUzNWU4NmQ1N2ZkNGM0M2NkMThmODE_', '2018-11-14 22:24:04'),
(54, 1, '2017-11-14 18:18:21', 'MzIyMzg4MzVkZjJmYmYzM2E5MWQ2NjYwMjAxZDU1Zjc_MGQ4ZjQyOTMwZDFmMTYyOTdlOTQ2MDZmODhlMmU2ZGI_MDE4MGJiYTBkYzlhMWViZjkxZjgzMDAyNWJlNjczYmM_', '2018-11-14 23:48:21'),
(55, 1, '2017-11-14 18:49:04', 'N2FmMDBlMjNiNTY2YWQ3MzM2Yjc5YWI1YzFiYjAxZjk_MGQ4ZjQyOTMwZDFmMTYyOTdlOTQ2MDZmODhlMmU2ZGI_ZDZkNTM0ZTE5ZjUzOWUxYTBjYjdkNTMyNDIxNGU1Njg_', '2018-11-15 00:19:04'),
(56, 32, '2017-11-15 14:26:41', 'NzNlMTg4YzI1Mzg0YzJmOTE3MWYzZDE1ZWMyNTFhNzI_NmRiMDhkZmJlMDYyMDg3ZDVjNGFlYzRmMDBhOTJiM2M_YWI1MjE1NGJhZjQ5ZGRjYWM0NTNkMjVhYWVmNTQ5MzQ_', '2018-11-15 19:56:41'),
(57, 49, '2017-11-15 18:32:31', 'Yzg1ZjY3MTFiMmY2ODBhOTBmMDk4ODE0OTczN2UxOWQ_ZWM1YmFkNzQzYTY3ODkxZjhhODI5Y2VhZjA0NDEzYjI_NmM1ZjZjODMwZWM4MGI2NDY0ODE2N2IzMWM4OWE2NTM_', '2018-11-16 00:02:31'),
(58, 49, '2017-11-15 18:32:53', 'MWRjYTg0Y2FkOWE3NjUyYWM4N2JmMmFkOTM1N2NlZWM_ZWM1YmFkNzQzYTY3ODkxZjhhODI5Y2VhZjA0NDEzYjI_OGJjNmRiZTQxOTgzZWIzZWNmNWE0ZGZjZjcxZTFiYTU_', '2018-11-16 00:02:53'),
(59, 54, '2017-11-15 18:47:42', 'NGFmMmRkMjM1N2QzZDAyMDI5YTgxNGZiOWY3NzU3NDY_Y2I0MjdkYmY2MjQ3NmM4ZGU3NTllOWZiZTgzYTUwOGU_Yzk5ZTdlMTM4ODc4MDc5YTRjNTI2OWM3ZDYyMDI3OGI_', '2018-11-16 00:17:42');
-- --------------------------------------------------------
--
-- Table structure for table `users`
--
CREATE TABLE `users` (
`user_id` int(11) NOT NULL,
`first_name` varchar(200) NOT NULL,
`last_name` varchar(200) NOT NULL,
`email` varchar(200) NOT NULL,
`mobile` varchar(10) NOT NULL,
`date_of_birth` date NOT NULL,
`email_status` varchar(50) NOT NULL DEFAULT 'NOT_VERIFIED',
`mobile_status` varchar(50) NOT NULL DEFAULT 'NOT_VERIFIED',
`created_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `users`
--
INSERT INTO `users` (`user_id`, `first_name`, `last_name`, `email`, `mobile`, `date_of_birth`, `email_status`, `mobile_status`, `created_time`) VALUES
(1, 'Ramu', 'Ramasamy', 'rram.ramasamy@gmail.com', '9894130821', '1993-09-02', 'NOT_VERIFIED', 'NOT_VERIFIED', '2017-08-31 15:33:16'),
(2, 'Rakshana', 'Ravichandran', 'rakshanakr@gmail.com', '8190912853', '1995-06-10', 'NOT_VERIFIED', 'NOT_VERIFIED', '2017-08-31 15:33:16'),
(20, 'ramu', 'rama', 'ramu.rulez@gmail.com', '9894130822', '1993-09-02', 'NOT_VERIFIED', 'NOT_VERIFIED', '2017-08-31 18:23:51'),
(32, 'Ramu', 'Ramasamy', 'r@ymail.com', '9789413082', '0000-00-00', 'NOT_VERIFIED', 'NOT_VERIFIED', '2017-11-15 14:24:39'),
(38, 'rams', 'rams', 'hr@honeycakes.in', '9894130825', '0000-00-00', 'NOT_VERIFIED', 'NOT_VERIFIED', '2017-11-15 14:54:16'),
(46, 'Ramu', 'Ramasamy', 'rr@ymail.com', '9789413089', '0000-00-00', 'VERIFIED', 'VERIFIED', '2017-11-15 18:20:54'),
(49, 'qwert', 'asddf', 'q@q.com', '789123456', '0000-00-00', 'NOT_VERIFIED', 'VERIFIED', '2017-11-15 18:31:49'),
(54, 'q', 'q', 'q@w.com', '9894130820', '0000-00-00', 'NOT_VERIFIED', 'VERIFIED', '2017-11-15 18:47:30');
-- --------------------------------------------------------
--
-- Table structure for table `user_address`
--
CREATE TABLE `user_address` (
`user_address_id` int(11) NOT NULL,
`user_id` int(11) NOT NULL,
`home` varchar(200) DEFAULT NULL,
`office` varchar(200) DEFAULT NULL,
`other` varchar(200) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `user_address`
--
INSERT INTO `user_address` (`user_address_id`, `user_id`, `home`, `office`, `other`) VALUES
(1, 1, 'D411, Vaikund Sundaram, Vendarasi Amman kovil stree, Karapakkam, Chennai - 97.', 'IVTL Infoview Technologies, Melaram Towers, Karapakkam, Chennai - 97.', '');
-- --------------------------------------------------------
--
-- Table structure for table `user_credentials`
--
CREATE TABLE `user_credentials` (
`user_login_id` int(11) NOT NULL,
`user_id` int(11) NOT NULL,
`password` varchar(500) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `user_credentials`
--
INSERT INTO `user_credentials` (`user_login_id`, `user_id`, `password`) VALUES
(1, 1, '$2a$07$DvIszgECG3eQZfctfVd32O1gefPvmZb3ZKiNXC5amJIthjo5hlaeC'),
(2, 2, '$2a$07$DvIszgECG3eQZfctfVd32O1gefPvmZb3ZKiNXC5amJIthjo5hlaeC'),
(4, 32, '$2y$10$3Vzs1tGS4xy6dzqq8EqbxOVaHFnaGOg8ltX8/JDg2w5UVmV4bqe7O'),
(8, 46, '$2y$10$NRPw/cNXu0L2V2WThe1Fj.8Che7hv5bpHDLNd7At8DkwYSJmcC3u.'),
(9, 49, '$2y$10$GkOHxEJ2bIfuDT4012e21OOWzdEXYLDXwgBMqC8L8tbJgT/1rmJAq'),
(10, 54, '$2y$10$baxvdSefai91Lxp6EuX6nOYfdf1szKhHdQ.IX8/p3PP909P31k/Iy');
-- --------------------------------------------------------
--
-- Table structure for table `user_otp`
--
CREATE TABLE `user_otp` (
`otp_id` int(11) NOT NULL,
`user_id` int(11) NOT NULL,
`otp_for` varchar(6) NOT NULL,
`otp_value` varchar(6) NOT NULL,
`generated_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT;
--
-- Dumping data for table `user_otp`
--
INSERT INTO `user_otp` (`otp_id`, `user_id`, `otp_for`, `otp_value`, `generated_time`) VALUES
(7, 46, 'email', '177904', '2017-11-15 16:30:44'),
(8, 46, 'mobile', '345321', '2017-11-15 16:30:44'),
(9, 49, 'email', '111934', '2017-11-15 18:31:05'),
(10, 49, 'mobile', '278767', '2017-11-15 18:31:05'),
(11, 54, 'email', '406884', '2017-11-15 18:47:09'),
(12, 54, 'mobile', '100007', '2017-11-15 18:47:09');
-- --------------------------------------------------------
--
-- Table structure for table `vendors`
--
CREATE TABLE `vendors` (
`vendor_id` int(11) NOT NULL,
`vendor_code` varchar(10) NOT NULL,
`vendor_name` varchar(100) NOT NULL,
`address` varchar(100) NOT NULL,
`contact_mobile` varchar(10) NOT NULL,
`contact_email` varchar(50) NOT NULL,
`location_code` varchar(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `vendors`
--
INSERT INTO `vendors` (`vendor_id`, `vendor_code`, `vendor_name`, `address`, `contact_mobile`, `contact_email`, `location_code`) VALUES
(1, 'VN001', 'FB Cakes', 'Karapakkam', '9876543210', '123@gmail.com', 'LN004'),
(2, 'VN002', 'Cake House', 'Navallur', '1234567890', '234@gmail.com', 'LN007'),
(3, 'VN003', 'Yum Cakes', 'Thoraipakkam', '8765432190', '789@gmail.com', 'LN003'),
(4, 'VN004', 'Bakers Code', 'Thiruvanmyur', '765421098', '667@gmail.com', 'LN002');
-- --------------------------------------------------------
--
-- Table structure for table `vendor_items`
--
CREATE TABLE `vendor_items` (
`vendor_item_id` int(11) NOT NULL,
`vendor_code` varchar(10) NOT NULL,
`item_code` varchar(10) NOT NULL,
`status` int(1) NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `vendor_items`
--
INSERT INTO `vendor_items` (`vendor_item_id`, `vendor_code`, `item_code`, `status`) VALUES
(1, 'VN001', 'IT001', 1),
(2, 'VN001', 'IT002', 1),
(3, 'VN001', 'IT003', 0),
(4, 'VN001', 'IT004', 1),
(5, 'VN001', 'IT005', 0),
(6, 'VN001', 'IT006', 1),
(7, 'VN001', 'IT007', 1),
(8, 'VN002', 'IT001', 1),
(9, 'VN002', 'IT002', 1),
(10, 'VN002', 'IT003', 1),
(11, 'VN002', 'IT004', 1),
(12, 'VN002', 'IT005', 1),
(13, 'VN002', 'IT006', 1),
(14, 'VN002', 'IT007', 1),
(15, 'VN003', 'IT001', 1),
(16, 'VN003', 'IT002', 1),
(17, 'VN003', 'IT003', 0),
(18, 'VN003', 'IT004', 1),
(19, 'VN003', 'IT005', 1),
(20, 'VN003', 'IT006', 1),
(21, 'VN003', 'IT007', 1),
(22, 'VN004', 'IT001', 1),
(23, 'VN004', 'IT002', 1),
(24, 'VN004', 'IT003', 1),
(25, 'VN004', 'IT004', 1),
(26, 'VN004', 'IT005', 0),
(27, 'VN004', 'IT006', 1),
(28, 'VN004', 'IT007', 1),
(29, 'VN001', 'PARTY01', 1),
(30, 'VN001', 'PARTY02', 1),
(31, 'VN001', 'PARTY03', 1),
(32, 'VN001', 'PARTY04', 0),
(33, 'VN002', 'PARTY01', 1),
(34, 'VN002', 'PARTY02', 1),
(35, 'VN002', 'PARTY03', 1),
(36, 'VN002', 'PARTY04', 1),
(37, 'VN003', 'PARTY01', 1),
(38, 'VN003', 'PARTY02', 1),
(39, 'VN003', 'PARTY03', 1),
(40, 'VN003', 'PARTY04', 1),
(41, 'VN004', 'PARTY01', 0),
(42, 'VN004', 'PARTY02', 1),
(43, 'VN004', 'PARTY03', 1),
(44, 'VN004', 'PARTY04', 1);
-- --------------------------------------------------------
--
-- Stand-in structure for view `vendor_items_view`
-- (See below for the actual view)
--
CREATE TABLE `vendor_items_view` (
`item_code` varchar(10)
,`item_name` varchar(50)
,`item_category` varchar(50)
,`item_price` varchar(10)
,`qty_slab` int(11)
,`location_code` varchar(10)
,`vendor_code` varchar(10)
,`status` int(1)
);
-- --------------------------------------------------------
--
-- Structure for view `vendor_items_view`
--
DROP TABLE IF EXISTS `vendor_items_view`;
CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vendor_items_view` AS select `item`.`item_code` AS `item_code`,`item`.`item_name` AS `item_name`,`item`.`item_category` AS `item_category`,`item`.`item_price` AS `item_price`,`item`.`qty_slab` AS `qty_slab`,`vendor`.`location_code` AS `location_code`,`vendor`.`vendor_code` AS `vendor_code`,`vendor_item`.`status` AS `status` from ((`items` `item` join `vendors` `vendor`) join `vendor_items` `vendor_item`) where ((`item`.`item_code` = `vendor_item`.`item_code`) and (`vendor`.`vendor_code` = `vendor_item`.`vendor_code`)) order by `item`.`item_code`,`vendor`.`vendor_code` ;
--
-- Indexes for dumped tables
--
--
-- Indexes for table `items`
--
ALTER TABLE `items`
ADD PRIMARY KEY (`item_id`),
ADD UNIQUE KEY `item_code` (`item_code`);
--
-- Indexes for table `locations`
--
ALTER TABLE `locations`
ADD PRIMARY KEY (`location_id`),
ADD UNIQUE KEY `location_code` (`location_code`);
--
-- Indexes for table `orders`
--
ALTER TABLE `orders`
ADD PRIMARY KEY (`order_number`),
ADD KEY `orders_users` (`user_id`),
ADD KEY `orders_vendors` (`vendor_code`);
--
-- Indexes for table `order_feedback`
--
ALTER TABLE `order_feedback`
ADD PRIMARY KEY (`order_feedback_id`),
ADD KEY `order_num_feedback` (`order_number`);
--
-- Indexes for table `order_items`
--
ALTER TABLE `order_items`
ADD PRIMARY KEY (`order_item_id`),
ADD KEY `order_num_items` (`order_number`),
ADD KEY `order_item_code` (`item_code`);
--
-- Indexes for table `tokens`
--
ALTER TABLE `tokens`
ADD PRIMARY KEY (`token_id`),
ADD UNIQUE KEY `token` (`token`),
ADD KEY `user_id` (`user_id`);
--
-- Indexes for table `users`
--
ALTER TABLE `users`
ADD PRIMARY KEY (`user_id`),
ADD UNIQUE KEY `email` (`email`),
ADD UNIQUE KEY `mobile` (`mobile`);
--
-- Indexes for table `user_address`
--
ALTER TABLE `user_address`
ADD PRIMARY KEY (`user_address_id`),
ADD KEY `user_id` (`user_id`);
--
-- Indexes for table `user_credentials`
--
ALTER TABLE `user_credentials`
ADD PRIMARY KEY (`user_login_id`),
ADD KEY `user_id` (`user_id`);
--
-- Indexes for table `user_otp`
--
ALTER TABLE `user_otp`
ADD PRIMARY KEY (`otp_id`),
ADD KEY `user_otp_id` (`user_id`);
--
-- Indexes for table `vendors`
--
ALTER TABLE `vendors`
ADD PRIMARY KEY (`vendor_id`),
ADD UNIQUE KEY `vendor_code` (`vendor_code`),
ADD KEY `vendor_location_1` (`location_code`);
--
-- Indexes for table `vendor_items`
--
ALTER TABLE `vendor_items`
ADD PRIMARY KEY (`vendor_item_id`),
ADD KEY `vendor_item_status_1` (`vendor_code`),
ADD KEY `vendor_item_status_2` (`item_code`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `items`
--
ALTER TABLE `items`
MODIFY `item_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=12;
--
-- AUTO_INCREMENT for table `locations`
--
ALTER TABLE `locations`
MODIFY `location_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;
--
-- AUTO_INCREMENT for table `orders`
--
ALTER TABLE `orders`
MODIFY `order_number` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `order_feedback`
--
ALTER TABLE `order_feedback`
MODIFY `order_feedback_id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `order_items`
--
ALTER TABLE `order_items`
MODIFY `order_item_id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `tokens`
--
ALTER TABLE `tokens`
MODIFY `token_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=60;
--
-- AUTO_INCREMENT for table `users`
--
ALTER TABLE `users`
MODIFY `user_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=55;
--
-- AUTO_INCREMENT for table `user_address`
--
ALTER TABLE `user_address`
MODIFY `user_address_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT for table `user_credentials`
--
ALTER TABLE `user_credentials`
MODIFY `user_login_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11;
--
-- AUTO_INCREMENT for table `user_otp`
--
ALTER TABLE `user_otp`
MODIFY `otp_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13;
--
-- AUTO_INCREMENT for table `vendors`
--
ALTER TABLE `vendors`
MODIFY `vendor_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
--
-- AUTO_INCREMENT for table `vendor_items`
--
ALTER TABLE `vendor_items`
MODIFY `vendor_item_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=45;
--
-- Constraints for dumped tables
--
--
-- Constraints for table `orders`
--
ALTER TABLE `orders`
ADD CONSTRAINT `orders_users` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`),
ADD CONSTRAINT `orders_vendors` FOREIGN KEY (`vendor_code`) REFERENCES `vendors` (`vendor_code`);
--
-- Constraints for table `order_feedback`
--
ALTER TABLE `order_feedback`
ADD CONSTRAINT `order_num_feedback` FOREIGN KEY (`order_number`) REFERENCES `orders` (`order_number`);
--
-- Constraints for table `order_items`
--
ALTER TABLE `order_items`
ADD CONSTRAINT `order_item_code` FOREIGN KEY (`item_code`) REFERENCES `Items` (`item_code`),
ADD CONSTRAINT `order_num_items` FOREIGN KEY (`order_number`) REFERENCES `orders` (`order_number`);
--
-- Constraints for table `tokens`
--
ALTER TABLE `tokens`
ADD CONSTRAINT `tokens_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`);
--
-- Constraints for table `user_address`
--
ALTER TABLE `user_address`
ADD CONSTRAINT `user_address_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`);
--
-- Constraints for table `user_credentials`
--
ALTER TABLE `user_credentials`
ADD CONSTRAINT `user_credentials_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`);
--
-- Constraints for table `user_otp`
--
ALTER TABLE `user_otp`
ADD CONSTRAINT `user_otp_id` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`);
--
-- Constraints for table `vendors`
--
ALTER TABLE `vendors`
ADD CONSTRAINT `vendor_location_1` FOREIGN KEY (`location_code`) REFERENCES `locations` (`location_code`);
--
-- Constraints for table `vendor_items`
--
ALTER TABLE `vendor_items`
ADD CONSTRAINT `vendor_item_status_1` FOREIGN KEY (`vendor_code`) REFERENCES `vendors` (`vendor_code`),
ADD CONSTRAINT `vendor_item_status_2` FOREIGN KEY (`item_code`) REFERENCES `Items` (`item_code`);
/*!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 */;
|
SELECT * FROM trips
WHERE profile_id = $1 |
select * from Timestamp_test_from;
|
--CREATE AND USE DATABASE
CREATE DATABASE burgers_db;
USE burgers_db;
--CREATE TABLE
CREATE TABLE restaurant_burger(
id INT AUTO_INCREMENT NOT NULL,
burger_name VARCHAR(30) NOT NULL,
is_favorite BOOLEAN,
createdAt TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY(id)
);
|
CREATE procedure sp_acc_list_AmendFAPayments(@PartyID Int, @PaymentID Int)
as
Select "Document ID" = (VoucherPrefix.Prefix + cast(DocumentID as nvarchar)),
"Document Date" = DocumentDate, NoteValue, Balance, CreditID, "Type" = 2 , 'Credit Note',
0, DocRef,Memo from CreditNote, VoucherPrefix where Others = @PartyID and Balance > 0 and
VoucherPrefix.TranID = N'CREDIT NOTE' and
CreditID Not in (Select DocumentID From PaymentDetail
Where PaymentID = @PaymentID And DocumentType = 2)
Union All
Select "Document ID" = FullDocID, "Document Date" = DocumentDate, Value,Balance, DocumentID,
"Type" = 3,'Payments', Null,DocRef,Narration from Payments where Balance > 0 and
Others = @PartyID and (IsNull(Status, 0) & 192) = 0 and
DocumentID Not in (Select DocumentID From PaymentDetail
Where PaymentID = @PaymentID And DocumentType = 3)And
DocumentID Not In (@PaymentID)
Union All
Select "Document ID" = VoucherPrefix.Prefix + CAST(APVID as nvarchar),
"Document Date" = APVDate, AmountApproved,Balance, DocumentID, "Type" = 4,'APV',
0,"Remarks"=BillNo,APVRemarks
from APVAbstract, VoucherPrefix where IsNull(Status, 0) & 128 = 0 and
PartyAccountID = @PartyID and ISNULL(Balance, 0) > 0 and
VoucherPrefix.TranID = N'Accounts Payable Voucher' and
DocumentID Not in (Select DocumentID From PaymentDetail
Where PaymentID = @PaymentID And DocumentType = 4)
Union All
Select "Document ID" = VoucherPrefix.Prefix + CAST(ARVID as nvarchar),
"Document Date" = ARVDate, Amount,Balance, DocumentID, "Type" = 6,'ARV',
0,"Remarks"=DocRef,ARVRemarks
from ARVAbstract, VoucherPrefix where IsNull(Status, 0) & 128 = 0 and
PartyAccountID = @PartyID and ISNULL(Balance, 0) > 0 and
VoucherPrefix.TranID = N'Accounts Receivable Voucher' and
DocumentID Not in (Select DocumentID From PaymentDetail
Where PaymentID = @PaymentID And DocumentType = 6)
Union All
Select "Document ID" = (cast(VoucherPrefix.Prefix as nvarchar) + cast(DocumentID as nvarchar)),
"DocumentDate" = DocumentDate, NoteValue,
Balance, DebitID, "Type" = 5,
case Flag
when 0 then
'Debit Note'
when 1 then
'Bank Charges'
when 2 then
'Bounced'
end, 0, DocRef,Memo
from DebitNote, VoucherPrefix
where Balance > 0 and
Others = @PartyID and
VoucherPrefix.TranID = N'DEBIT NOTE' and
DebitID Not in (Select DocumentID From PaymentDetail
Where PaymentID = @PaymentID And DocumentType = 5)
Union All
Select "Document ID" = FullDocID, "Document Date" = DocumentDate, Value, Balance, DocumentID,
"Type" = 7, 'Collections',Null,DocReference,Narration from Collections where Balance > 0 and
Others = @PartyID and (IsNull(Status, 0) & 192) = 0 and
DocumentID Not in (Select DocumentID From PaymentDetail
Where PaymentID = @PaymentID And DocumentType = 7)
Union All
Select 'DocumentID' = (VoucherPrefix.Prefix + Cast(DocumentID as nvarchar)),
DocumentDate,Amount,Balance,NewRefID,'DocType'=Case When PrefixType=1 Then 8 Else 9 End,'Manual Journal - New Reference',
Null,ReferenceNo,Remarks from ManualJournal,VoucherPrefix where AccountID = @PartyID And isnull(Status,0) <> 192 and isnull(Status,0) <> 128
and isnull(Balance ,0) <> 0 And VoucherPrefix.Prefix = N'MANUAL JOURNAL' And NewRefID Not In (Select DocumentID from PaymentDetail
Where PaymentID = @PaymentID And DocumentType In (8,9))
|
insert into person (name, password, right) values ('zolee','zolee', 'admin')
insert into person (name, password, right) values ('leezo','leezo', 'user') |
/*
CORRECTIONS
longitude
latitude
geom
*/
DROP TABLE IF EXISTS corrections_geom;
/*
Create corrections_geom
- Translate old and new lat/lon into geometries
- Using these geoms calculate boolean corrections criteria:
- Distance between old and new geoms is < 10m AND
- Old geom is not within a lot OR old geom is in water
*/
WITH
LONLAT_corrections as (
SELECT
a.job_number,
coalesce(a.reason, b.reason) as reason,
ST_SetSRID(ST_MakePoint(a.old_lon, b.old_lat), 4326) as old_geom,
ST_SetSRID(ST_MakePoint(a.new_lon, b.new_lat), 4326) as new_geom,
a.old_lon, a.new_lon,
b.old_lat, b.new_lat
FROM (
SELECT
job_number,
reason,
old_value::double precision as old_lon,
new_value::double precision as new_lon
FROM _manual_corrections
WHERE field = 'longitude'
) a LEFT JOIN (
SELECT
job_number,
reason,
old_value::double precision as old_lat,
new_value::double precision as new_lat
FROM _manual_corrections
WHERE field = 'latitude'
) b ON a.job_number = b.job_number
),
GEOM_corrections as (
SELECT
a.job_number,
a.old_geom,
a.new_geom,
a.reason,
a.new_lat,
a.old_lat,
a.new_lon,
a.old_lon,
b.latitude as current_latitude,
b.longitude as current_longitude,
(COALESCE(st_distance(a.new_geom, b.geom), 0) < 10) as distance,
(get_bbl(b.geom) IS NULL) as null_bbl,
in_water(b.geom) as in_water
FROM LONLAT_corrections a
LEFT JOIN GEO_devdb b
ON a.job_number = b.job_number
)
SELECT
a.job_number,
a.field,
b.old_geom,
b.new_geom,
b.new_lat,
b.old_lat,
b.new_lon,
b.old_lon,
b.current_latitude,
b.current_longitude,
b.distance,
b.null_bbl,
b.in_water,
b.reason,
(b.distance AND (b.null_bbl OR b.in_water)) as applicable
INTO corrections_geom
FROM _manual_corrections a
LEFT JOIN GEOM_corrections b
ON a.job_number = b.job_number
WHERE a.field IN ('latitude', 'longitude');
/*
If old geom is NULL or old geom is in water and
new geom is within 10m of old geom, insert
correction into the corrections_applied table.
Append details of distance and spatial join checks to reason.
*/
INSERT INTO corrections_applied
SELECT
job_number,
field,
(CASE
WHEN field = 'latitude' THEN current_latitude
WHEN field = 'longitude' THEN current_longitude
END) as current_value,
(CASE
WHEN field = 'latitude' THEN old_lat
WHEN field = 'longitude' THEN old_lon
END) as old_value,
(CASE
WHEN field = 'latitude' THEN new_lat
WHEN field = 'longitude' THEN new_lon
END) as new_value,
reason||' / in 10m of old geom / bbl null or in water' as reason
FROM corrections_geom a
WHERE applicable
AND job_number IN (SELECT b.job_number FROM GEO_devdb b);
/*
For all records from corrections_geom that did not
get added to corrections_applied, identify why
they didn't qualify as applicable corrections and
add them to the corrections_not_applied table.
Append disqulification criteria to reason.
*/
INSERT INTO corrections_not_applied
SELECT
job_number,
field,
(CASE
WHEN field = 'latitude' THEN current_latitude
WHEN field = 'longitude' THEN current_longitude
END) as current_value,
(CASE
WHEN field = 'latitude' THEN old_lat
WHEN field = 'longitude' THEN old_lon
END) as old_value,
(CASE
WHEN field = 'latitude' THEN new_lat
WHEN field = 'longitude' THEN new_lon
END) as new_value,
(CASE
WHEN NOT distance AND NOT (null_bbl OR in_water)
THEN reason||' / more than 10m of old geom / bbl not null and not in water'
WHEN NOT distance
THEN reason||' / more than 10m of old geom'
WHEN NOT (null_bbl OR in_water)
THEN reason||' / bbl not null and not in water'
ELSE reason
END) as reason
FROM corrections_geom
WHERE NOT applicable;
/*
Apply corrections where applicable
*/
UPDATE GEO_devdb a
SET latitude = ST_Y(b.new_geom),
longitude = ST_X(b.new_geom),
geom = b.new_geom,
geomsource = 'Lat/Lon DCP'
FROM corrections_geom b
WHERE a.job_number=b.job_number
AND b.applicable; |
ALTER TABLE andel_tilkjent_ytelse
ADD COLUMN kilde_behandling_id BIGINT REFERENCES behandling (id);
UPDATE andel_tilkjent_ytelse
SET kilde_behandling_id = andelMedKildeBehandling.kilde_behandling_id
FROM (
WITH andelMedFagsak AS (SELECT andel_tilkjent_ytelse.id AS andelId,
andel_tilkjent_ytelse.periode_offset AS andelPeriodeId,
behandling.fk_fagsak_id AS fagsakId
FROM andel_tilkjent_ytelse,
behandling
WHERE andel_tilkjent_ytelse.fk_behandling_id = behandling.id),
kildeBehandling AS (SELECT behandling.fk_fagsak_id AS fagsakId,
andel_tilkjent_ytelse.periode_offset AS fagsakPeriodeId,
min(behandling.id) AS kilde_behandling_id
FROM behandling
INNER JOIN andel_tilkjent_ytelse
ON behandling.id = andel_tilkjent_ytelse.fk_behandling_id
GROUP BY fagsakId, fagsakPeriodeId)
SELECT andelMedFagsak.andelId,
kildeBehandling.kilde_behandling_id
FROM andelMedFagsak
INNER JOIN kildeBehandling ON andelMedFagsak.andelPeriodeId = kildeBehandling.fagsakPeriodeId AND
andelMedFagsak.fagsakId = kildeBehandling.fagsakId) AS andelMedKildeBehandling
WHERE andel_tilkjent_ytelse.id = andelMedKildeBehandling.andelId; |
INSERT INTO purchases (
stream_id,
user_id,
streamer_id,
purchase_price,
purchase_timestamp
)
VALUES (
$1, $2, $3, $4, current_timestamp
);
UPDATE streams
SET purchase_id = 1
WHERE stream_id = $1;
|
/*
Para la implementación del proceso de análisis de los antibióticos a usar en el tratamiento de cada una de las familias de bacterias
se requiere de la siguientes estructuras de información sobre la base de datos Biograma, la cual residirá sobre cada dispositivo
donde se ejecuete la aplicación móvil.
/*
/*
Bacterias: Entidad maestra donde se almacenan las bacterias configuradas a las que se les podra realizar el análisis GRAM.
*/
DROP TABLE IF EXISTS Bacterias;
CREATE TABLE Bacterias (
id INTEGER PRIMARY KEY,
nombre VARCHAR(100) NOT NULL,
tipoGRAM CHAR(1) DEFAULT ('+') CHECK (tipoGRAM = '+' OR tipoGRAM = '-') NOT NULL
);
/*
Antibioticos: Entidad maestra donde se guardan los antibióticos usados para el análisis GRAM de las bacterias configuradas.
*/
DROP TABLE IF EXISTS Antibioticos;
CREATE TABLE Antibioticos (
id INTEGER PRIMARY KEY,
nombre VARCHAR(100) NOT NULL
);
/*
Pruebas: Entidad maestra que almacena los tipos de pruebas requeridas para evaluar la sensibilidad y/o resistencia de un antibiótico.
*/
DROP TABLE IF EXISTS Pruebas;
CREATE TABLE Pruebas (
id INTEGER PRIMARY KEY,
nombre VARCHAR(100) NOT NULL
);
/*
PartesDelCuerpo: Entidad maestra donde se persiste las partes del cuerpo que pueden verse afectadas por las diferentes bacterias
configuradas .
*/
DROP TABLE IF EXISTS PartesDelCuerpo;
CREATE TABLE PartesDelCuerpo (
id INTEGER PRIMARY KEY,
nombre VARCHAR(50) NOT NULL
);
/*
Asignaciones: Entidad maestra donde se guardan las diversas asiganciones de antibióticos y comentarios generados durante la ejecución
de la segunda etapa del análisis GRAM.
*/
DROP TABLE IF EXISTS Asignaciones;
CREATE TABLE Asignaciones (
id INTEGER PRIMARY KEY,
comentariosTratamiento VARCHAR2(250) NOT NULL,
orden INTEGER default 100
);
/*
Entidad usada para almacenar la combinación de los antibioticos y pruebas que pueden usarse para el tratamiento de cada una de las
bacterias configuradas. Importante anotar que los datos almacenados en esta entidad serán usados para la visualización y
diligeniciamiento de los valores de referencia de cada antibiotico.
*/
DROP TABLE IF EXISTS CBxA;
CREATE TABLE CBxA (
id INTEGER PRIMARY KEY AUTOINCREMENT,
idBacteria INTEGER NOT NULL,
idAntibiotico INTEGER NOT NULL,
idPrueba INTEGER NOT NULL,
tipoControl VARCHAR(20) NOT NULL,
tipoGRAM CHAR(1) CHECK (tipoGRAM = '+' OR tipoGRAM = '-') NOT NULL,
FOREIGN KEY(idBacteria) REFERENCES Bacterias(id)
FOREIGN KEY(idAntibiotico) REFERENCES Antibioticos(id)
FOREIGN KEY(idPrueba) REFERENCES Pruebas(id)
);
CREATE INDEX IF NOT EXISTS IDX_CBxA_idBacteria_idAntibiotico ON CBxA (idBacteria,idAntibiotico);
/*
Entidad usada para almacenar la información básica del paciente en evaluación.
*/
DROP TABLE IF EXISTS DatosDelPaciente;
CREATE TABLE DatosDelPaciente (
id INTEGER PRIMARY KEY AUTOINCREMENT,
idParteDelCuerpo INTEGER,
fechaRegistro DATETIME DEFAULT (DATETIME('now')),
genero CHAR(1) CHECK (genero = 'F' OR genero = 'M') NOT NULL,
edad INTEGER CHECK (edad > 0 AND edad < 140) NOT NULL,
peso REAL,
creatinina REAL,
esAlergicoAPenicilina BOOLEAN,
requiereHemodialisis BOOLEAN,
CAPD BOOLEAN,
CRRT BOOLEAN,
depuracionCreatinina DECIMAL(10,2) DEFAULT (0.0),
FOREIGN KEY(idParteDelCuerpo) REFERENCES PartesDelCuerpo(id)
);
/*
Entidad usada para almacenar la combinación de los antibioticos y pruebas que pueden usarse para el tratamiento de cada una de las
bacterias configuradas. Importante anotar que los datos almacenados en esta entidad serán usados para la visualización y
diligenciamiento de los valores de referencia GRAM para cada antibiótico asociado a la bacteria en proceso.
*/
DROP TABLE IF EXISTS GRAM;
CREATE TABLE GRAM (
id INTEGER PRIMARY KEY AUTOINCREMENT,
idBacteria INTEGER NOT NULL,
idAntibiotico INTEGER NOT NULL,
idPrueba INTEGER NOT NULL,
operador VARCHAR(2),
valor DECIMAL(10,5),
tipoGRAM CHAR(1) CHECK(tipoGRAM = "+" OR tipoGRAM = "-") NOT NULL,
FOREIGN KEY(idBacteria) REFERENCES Bacterias(id)
FOREIGN KEY(idAntibiotico) REFERENCES Antibioticos(id)
FOREIGN KEY(idPrueba) REFERENCES Pruebas(id)
);
CREATE INDEX IF NOT EXISTS IDX_GRAM_tipoGRAM ON GRAM( tipoGRAM );
CREATE INDEX IF NOT EXISTS IDX_GRAM_operador ON GRAM( operador );
CREATE INDEX IF NOT EXISTS IDX_GRAM_idBacteria_idPrueba ON GRAM( idBacteria, idPrueba );
CREATE INDEX IF NOT EXISTS IDX_GRAM_idBacteria_idAntibiotico_operador ON GRAM( idBacteria, idAntibiotico, operador );
DROP TABLE IF EXISTS TMP_GRAM;
CREATE TABLE TMP_GRAM (
id INTEGER,
idBacteria INTEGER,
idAntibiotico INTEGER,
idPrueba INTEGER,
operador VARCHAR(2),
valor DECIMAL(10,5),
tipoGRAM CHAR(1)
);
CREATE INDEX IF NOT EXISTS IDX_TMP_GRAM_tipoGRAM ON TMP_GRAM( tipoGRAM );
CREATE INDEX IF NOT EXISTS IDX_TMP_GRAM_operador ON TMP_GRAM( operador );
CREATE INDEX IF NOT EXISTS IDX_TMP_GRAM_idBacteria_idPrueba ON TMP_GRAM( idBacteria, idPrueba );
CREATE INDEX IF NOT EXISTS IDX_TMP_GRAM_idBacteria_idAntibiotico_operador ON TMP_GRAM( idBacteria, idAntibiotico, operador );
/*
Entidad donde se persiste los resultados generados en la 1era. etapa del análisis GRAM (interpretación de los valores de referencia
y generación de mensajes).
*/
DROP TABLE IF EXISTS InterpretacionGRAMEtapa1;
CREATE TABLE InterpretacionGRAMEtapa1 (
id INTEGER PRIMARY KEY AUTOINCREMENT,
idParteDelCuerpo INTEGER NOT NULL,
idBacteria INTEGER NOT NULL,
idAntibiotico INTEGER NOT NULL,
mensaje VARCHAR2(250) NOT NULL,
FOREIGN KEY(idParteDelCuerpo) REFERENCES PartesDelCuerpo(id)
FOREIGN KEY(idAntibiotico) REFERENCES Antibioticos(id)
FOREIGN KEY(idBacteria) REFERENCES Bacterias(id)
);
DROP TABLE IF EXISTS TMP_InterpretacionGRAMEtapa1;
CREATE TABLE TMP_InterpretacionGRAMEtapa1 (
id INTEGER PRIMARY KEY,
idParteDelCuerpo INTEGER NOT NULL,
idBacteria INTEGER NOT NULL,
idAntibiotico INTEGER NOT NULL,
mensaje VARCHAR2(250) NOT NULL
);
/*
Entidad donde se persiste los resultados generados en la 2da. etapa del análisis GRAM (asignación de medicamentos ARk).
*/
DROP TABLE IF EXISTS InterpretacionGRAMEtapa2;
CREATE TABLE InterpretacionGRAMEtapa2 (
id INTEGER PRIMARY KEY AUTOINCREMENT,
idParteDelCuerpo INTEGER NOT NULL,
idBacteria INTEGER NOT NULL,
idAntibiotico INTEGER NOT NULL,
idAsignacion INTEGER NOT NULL,
mensaje VARCHAR2(250) NOT NULL,
orden INTEGER DEFAULT 100,
FOREIGN KEY(idParteDelCuerpo) REFERENCES PartesDelCuerpo(id)
FOREIGN KEY(idAntibiotico) REFERENCES Antibioticos(id)
FOREIGN KEY(idAsignacion) REFERENCES Asignaciones(id)
FOREIGN KEY(idBacteria) REFERENCES Bacterias(id)
);
DROP TABLE IF EXISTS TMP_InterpretacionGRAMEtapa2;
CREATE TABLE TMP_InterpretacionGRAMEtapa2 (
id INTEGER PRIMARY KEY,
idParteDelCuerpo INTEGER NOT NULL,
idBacteria INTEGER NOT NULL,
idAntibiotico INTEGER NOT NULL,
idAsignacion INTEGER NOT NULL,
mensaje VARCHAR2(250) NOT NULL,
orden INTEGER DEFAULT 100
);
/*
Entidad donde se persiste los resultados generados en la 3da. etapa del analisis GRAM.
*/
DROP TABLE IF EXISTS InterpretacionGRAMEtapa3;
CREATE TABLE InterpretacionGRAMEtapa3 (
id INTEGER PRIMARY KEY AUTOINCREMENT,
idAsignacion INTEGER NOT NULL,
mensaje VARCHAR2(250) NOT NULL,
orden INTEGER DEFAULT 100,
FOREIGN KEY(idAsignacion) REFERENCES Asignaciones(id)
);
DROP TABLE IF EXISTS TMP_InterpretacionGRAMEtapa3;
CREATE TABLE TMP_InterpretacionGRAMEtapa3 (
id INTEGER PRIMARY KEY,
idAsignacion INTEGER NOT NULL,
mensaje VARCHAR2(250) NOT NULL,
orden INTEGER DEFAULT 100,
FOREIGN KEY(idAsignacion) REFERENCES Asignaciones(id)
);
/*
Entidad NUEVA donde se relacionan las asignaciones con los Antibioticos que se ingresan
*/
DROP TABLE IF EXISTS asignacionAntibiotico;
CREATE TABLE asignacionAntibiotico (
id INTEGER PRIMARY KEY AUTOINCREMENT,
idAsignacion INTEGER NOT NULL,
idAntibiotico INTEGER NOT NULL
);
CREATE INDEX IF NOT EXISTS IDX_ASIGNACIONANTIBIOTICO_Antib ON asignacionAntibiotico( idAntibiotico );
CREATE INDEX IF NOT EXISTS IDX_ASIGNACIONANTIBIOTICO_Asig_Antib ON asignacionAntibiotico( idAsignacion, idAntibiotico );
/*
Entidad donde se almacena el token otorgado para el acceder a la funciones expuestas por la APP.
*/
DROP TABLE IF EXISTS TokenSeguridad;
CREATE TABLE TokenSeguridad (
id INTEGER PRIMARY KEY AUTOINCREMENT,
fechaRegistro DATETIME NOT NULL,
dias INTEGER NOT NULL
);
/*
Entidad donde se almacena los eventos generados duraante la ejecución de algunas de las funcionalidades
provistas por la APP.
*/
DROP TABLE IF EXISTS BitacoraEventos;
CREATE TABLE BitacoraEventos (
id INTEGER PRIMARY KEY AUTOINCREMENT,
fechaRegistro DATETIME DEFAULT (DATETIME('now')),
tipoEvento VARCHAR(100),
detalleEvento TEXT NOT NULL
);
DROP VIEW IF EXISTS AntibioticosPruebas;
CREATE VIEW AntibioticosPruebas AS
SELECT Antibioticos.id, idBacteria, idAntibiotico,
idPrueba, tipoControl, tipoGRAM, Antibioticos.nombre
FROM CBxA INNER JOIN Antibioticos ON CBxA.idAntibiotico = Antibioticos.id
WHERE idPrueba = 1
UNION ALL
SELECT Pruebas.id, idBacteria, idAntibiotico,
idPrueba, tipoControl, tipoGRAM, Pruebas.nombre
FROM CBxA INNER JOIN Pruebas ON CBxA.idPrueba = Pruebas.id
WHERE idPrueba <> 1;
DROP VIEW IF EXISTS EtapaUnoyEtapaDos;
CREATE VIEW EtapaUnoyEtapaDos AS
SELECT idParteDelCuerpo, idBacteria, idAntibiotico, NULL as idAsignacion, mensaje
FROM InterpretacionGRAMEtapa1
/* UNION ALL
SELECT idParteDelCuerpo, idBacteria, idAntibiotico, idAsignacion, mensaje
FROM InterpretacionGRAMEtapa2*/;
DROP VIEW IF EXISTS validarTestMsg;
CREATE VIEW validarTestMsg AS
SELECT COUNT(1) as total
FROM InterpretacionGRAMEtapa1
WHERE mensaje like '%Realizar D-test%' OR mensaje like '%Realizar test%';
/* Lista base de bacterias habilitados para el funcionamiento de la aplicación. */
DELETE FROM BitacoraEventos;
DELETE FROM Bacterias;
INSERT INTO Bacterias(id, nombre, tipoGRAM) VALUES (1, 'NA', '+');
INSERT INTO Bacterias(id, nombre, tipoGRAM) VALUES (2, 'Staphylococcus aureus', '+');
INSERT INTO Bacterias(id, nombre, tipoGRAM) VALUES (3, 'Staphylococcus epidermidis', '+');
INSERT INTO Bacterias(id, nombre, tipoGRAM) VALUES (4, 'Staphylococcus haemolyticus', '+');
INSERT INTO Bacterias(id, nombre, tipoGRAM) VALUES (5, 'Staphylococcus warneri', '+');
INSERT INTO Bacterias(id, nombre, tipoGRAM) VALUES (6, 'Staphylococcus lugdunensis', '+');
INSERT INTO Bacterias(id, nombre, tipoGRAM) VALUES (7, 'Enterococcus faecalis', '+');
INSERT INTO Bacterias(id, nombre, tipoGRAM) VALUES (8, 'Enterococcus faecium', '+');
INSERT INTO Bacterias(id, nombre, tipoGRAM) VALUES (9, 'Enterococcus gallinarum', '+');
INSERT INTO Bacterias(id, nombre, tipoGRAM) VALUES (10, 'Enterococcus casseliflavus', '+');
INSERT INTO Bacterias(id, nombre, tipoGRAM) VALUES (11, 'Streptococcus viridans', '+');
INSERT INTO Bacterias(id, nombre, tipoGRAM) VALUES (12, 'Streptococcus mitis', '+');
INSERT INTO Bacterias(id, nombre, tipoGRAM) VALUES (13, 'Streptococcus mutans', '+');
INSERT INTO Bacterias(id, nombre, tipoGRAM) VALUES (14, 'Streptococcus salivarius', '+');
INSERT INTO Bacterias(id, nombre, tipoGRAM) VALUES (15, 'Streptococcus pyogenes', '+');
INSERT INTO Bacterias(id, nombre, tipoGRAM) VALUES (16, 'Streptococcus agalactiae', '+');
INSERT INTO Bacterias(id, nombre, tipoGRAM) VALUES (17, 'Streptococcus dysgalactiae', '+');
INSERT INTO Bacterias(id, nombre, tipoGRAM) VALUES (18, 'Streptococcus pneumoniae', '+');
INSERT INTO Bacterias(id, nombre, tipoGRAM) VALUES (19, 'Escherichia Coli', '-');
INSERT INTO Bacterias(id, nombre, tipoGRAM) VALUES (20, 'Klebsiella', '-');
INSERT INTO Bacterias(id, nombre, tipoGRAM) VALUES (21, 'Serratia', '-');
INSERT INTO Bacterias(id, nombre, tipoGRAM) VALUES (22, 'Enterobacter', '-');
INSERT INTO Bacterias(id, nombre, tipoGRAM) VALUES (23, 'Pseudomonas', '-');
INSERT INTO Bacterias(id, nombre, tipoGRAM) VALUES (24, 'Citrobacter', '-');
INSERT INTO Bacterias(id, nombre, tipoGRAM) VALUES (25, 'Aeromonas', '-');
INSERT INTO Bacterias(id, nombre, tipoGRAM) VALUES (26, 'Morganella', '-');
INSERT INTO Bacterias(id, nombre, tipoGRAM) VALUES (27, 'Stenotrophomonas maltophilia', '-');
INSERT INTO Bacterias(id, nombre, tipoGRAM) VALUES (28, 'Acinetobacter', '-');
INSERT INTO Bacterias(id, nombre, tipoGRAM) VALUES (29, 'Proteus mirabilis', '-');
INSERT INTO Bacterias(id, nombre, tipoGRAM) VALUES (30, 'Proteus vulgaris', '-');
INSERT INTO Bacterias(id, nombre, tipoGRAM) VALUES (31, 'Proteus penneri', '-');
INSERT INTO Bacterias(id, nombre, tipoGRAM) VALUES (32, 'Salmonella', '-');
INSERT INTO Bacterias(id, nombre, tipoGRAM) VALUES (33, 'Shigella', '-');
INSERT INTO Bacterias(id, nombre, tipoGRAM) VALUES (34, 'Providencia', '-');
/* Lista base de antibióticos habilitados para el funcionamiento de la aplicación. */
DELETE FROM Antibioticos;
INSERT INTO Antibioticos(id, nombre) VALUES (1, 'NA');
INSERT INTO Antibioticos(id, nombre) VALUES (2, 'Clindamycin');
INSERT INTO Antibioticos(id, nombre) VALUES (3, 'Erythromycin');
INSERT INTO Antibioticos(id, nombre) VALUES (4, 'Gentamicin');
INSERT INTO Antibioticos(id, nombre) VALUES (5, 'Linezolid');
INSERT INTO Antibioticos(id, nombre) VALUES (6, 'Oxacillin');
INSERT INTO Antibioticos(id, nombre) VALUES (7, 'Rifampicin');
INSERT INTO Antibioticos(id, nombre) VALUES (8, 'Tetracycline');
INSERT INTO Antibioticos(id, nombre) VALUES (9, 'Trimethoprim/Sulfa');
INSERT INTO Antibioticos(id, nombre) VALUES (10, 'Vancomycin');
INSERT INTO Antibioticos(id, nombre) VALUES (11, 'Nitrofurantoin');
INSERT INTO Antibioticos(id, nombre) VALUES (12, 'Daptomycin');
INSERT INTO Antibioticos(id, nombre) VALUES (13, 'Ampicillin');
INSERT INTO Antibioticos(id, nombre) VALUES (14, 'Penicillin');
INSERT INTO Antibioticos(id, nombre) VALUES (15, 'Cefotaxima');
INSERT INTO Antibioticos(id, nombre) VALUES (16, 'Ceftriaxone');
INSERT INTO Antibioticos(id, nombre) VALUES (17, 'Penicillin meningitis');
INSERT INTO Antibioticos(id, nombre) VALUES (18, 'Penicillin otros');
INSERT INTO Antibioticos(id, nombre) VALUES (19, 'Cefotaxima meningitis');
INSERT INTO Antibioticos(id, nombre) VALUES (20, 'Cefotaxima otros');
INSERT INTO Antibioticos(id, nombre) VALUES (21, 'Amikacin');
INSERT INTO Antibioticos(id, nombre) VALUES (22, 'Aztreonam');
INSERT INTO Antibioticos(id, nombre) VALUES (23, 'Cefazolin');
INSERT INTO Antibioticos(id, nombre) VALUES (24, 'Cefepime');
INSERT INTO Antibioticos(id, nombre) VALUES (25, 'Ceftazidime');
INSERT INTO Antibioticos(id, nombre) VALUES (26, 'Cefotaxime');
INSERT INTO Antibioticos(id, nombre) VALUES (27, 'Ciprofloxacin');
INSERT INTO Antibioticos(id, nombre) VALUES (28, 'Ertapenem');
INSERT INTO Antibioticos(id, nombre) VALUES (29, 'Colistin');
INSERT INTO Antibioticos(id, nombre) VALUES (30, 'Imipenem');
INSERT INTO Antibioticos(id, nombre) VALUES (31, 'Meropenem');
INSERT INTO Antibioticos(id, nombre) VALUES (32, 'Doripenem');
INSERT INTO Antibioticos(id, nombre) VALUES (33, 'Piperacillin / Tazobactam');
INSERT INTO Antibioticos(id, nombre) VALUES (34, 'Tigecycline');
INSERT INTO Antibioticos(id, nombre) VALUES (35, 'Ampicillin / Sulbactam');
INSERT INTO Antibioticos(id, nombre) VALUES (36, 'Moxifloxacin');
/* Lista base de pruebas habilitados para el funcionamiento de la aplicación. */
DELETE FROM Pruebas;
INSERT INTO Pruebas(id, nombre) VALUES (1, 'NA');
INSERT INTO Pruebas(id, nombre) VALUES (2, 'Resistencia inducible a Clindamycin');
INSERT INTO Pruebas(id, nombre) VALUES (3, 'Cefoxitin Screen');
INSERT INTO Pruebas(id, nombre) VALUES (4, 'ESBL / BLEE');
/* Lista de partes del cuerpo habilitados para el funcionamiento de la aplicación. */
DELETE FROM PartesDelCuerpo;
INSERT INTO PartesDelCuerpo(id,nombre) VALUES (0, 'Sistema nervioso central');
INSERT INTO PartesDelCuerpo(id,nombre) VALUES (1, 'Boca, senos paranasales y cuello');
INSERT INTO PartesDelCuerpo(id,nombre) VALUES (2, 'Pulmones y vía aérea');
INSERT INTO PartesDelCuerpo(id,nombre) VALUES (3, 'Abdomen');
INSERT INTO PartesDelCuerpo(id,nombre) VALUES (4, 'Tracto genito urinario');
INSERT INTO PartesDelCuerpo(id,nombre) VALUES (5, 'Huesos');
INSERT INTO PartesDelCuerpo(id,nombre) VALUES (6, 'Prostata');
INSERT INTO PartesDelCuerpo(id,nombre) VALUES (7, 'Tejidos blandos');
INSERT INTO PartesDelCuerpo(id,nombre) VALUES (8, 'Sangre');
/*
Lista de las combinaciones de antibioticos y pruebas que pueden usarse para el tratamiento de cada una de las
Lista de las combinaciones de antibioticos y pruebas que pueden usarse para el diligenciamiento de los valores
de referencia obtenidos durante un estudio infeccioso de un paciente. Importante anotar que a través de este
almacenamiento se identitica el tipo de control grpafico (INPUT TEXT y/o RADIO BUTTON) que deberá presentarse
sobre el formulario GRAM para su gestión.
*/
DELETE FROM CBxA;
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (2, 2, 1,'INPUT TEXT','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (2, 3, 1,'INPUT TEXT','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (2, 4, 1,'INPUT TEXT','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (2, 5, 1,'INPUT TEXT','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (2, 6, 1,'INPUT TEXT','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (2, 7, 1,'INPUT TEXT','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (2, 8, 1,'INPUT TEXT','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (2, 9, 1,'INPUT TEXT','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (2, 10, 1,'INPUT TEXT','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (2, 11, 1,'INPUT TEXT','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (2, 12, 1,'INPUT TEXT','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (2, 1, 2,'RADIO BUTTON','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (2, 1, 3,'RADIO BUTTON','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (3, 2, 1,'INPUT TEXT','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (3, 3, 1,'INPUT TEXT','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (3, 4, 1,'INPUT TEXT','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (3, 5, 1,'INPUT TEXT','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (3, 6, 1,'INPUT TEXT','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (3, 7, 1,'INPUT TEXT','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (3, 8, 1,'INPUT TEXT','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (3, 9, 1,'INPUT TEXT','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (3, 10, 1,'INPUT TEXT','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (3, 11, 1,'INPUT TEXT','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (3, 12, 1,'INPUT TEXT','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (3, 1, 2,'RADIO BUTTON','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (3, 1, 3,'RADIO BUTTON','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (4, 2, 1,'INPUT TEXT','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (4, 3, 1,'INPUT TEXT','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (4, 4, 1,'INPUT TEXT','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (4, 5, 1,'INPUT TEXT','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (4, 6, 1,'INPUT TEXT','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (4, 7, 1,'INPUT TEXT','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (4, 8, 1,'INPUT TEXT','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (4, 9, 1,'INPUT TEXT','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (4, 10, 1,'INPUT TEXT','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (4, 11, 1,'INPUT TEXT','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (4, 12, 1,'INPUT TEXT','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (4, 1, 2,'RADIO BUTTON','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (4, 1, 3,'RADIO BUTTON','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (5, 2, 1,'INPUT TEXT','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (5, 3, 1,'INPUT TEXT','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (5, 4, 1,'INPUT TEXT','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (5, 5, 1,'INPUT TEXT','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (5, 6, 1,'INPUT TEXT','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (5, 7, 1,'INPUT TEXT','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (5, 8, 1,'INPUT TEXT','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (5, 9, 1,'INPUT TEXT','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (5, 10, 1,'INPUT TEXT','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (5, 11, 1,'INPUT TEXT','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (5, 12, 1,'INPUT TEXT','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (5, 1, 2,'RADIO BUTTON','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (5, 1, 3,'RADIO BUTTON','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (6, 2, 1,'INPUT TEXT','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (6, 3, 1,'INPUT TEXT','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (6, 4, 1,'INPUT TEXT','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (6, 5, 1,'INPUT TEXT','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (6, 6, 1,'INPUT TEXT','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (6, 7, 1,'INPUT TEXT','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (6, 8, 1,'INPUT TEXT','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (6, 9, 1,'INPUT TEXT','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (6, 10, 1,'INPUT TEXT','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (6, 11, 1,'INPUT TEXT','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (6, 12, 1,'INPUT TEXT','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (6, 1, 2,'RADIO BUTTON','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (6, 1, 3,'RADIO BUTTON','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (7, 13, 1,'INPUT TEXT','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (7, 5, 1,'INPUT TEXT','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (7, 8, 1,'INPUT TEXT','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (7, 10, 1,'INPUT TEXT','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (7, 11, 1,'INPUT TEXT','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (7, 12, 1,'INPUT TEXT','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (8, 13, 1,'INPUT TEXT','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (8, 5, 1,'INPUT TEXT','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (8, 8, 1,'INPUT TEXT','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (8, 10, 1,'INPUT TEXT','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (8, 11, 1,'INPUT TEXT','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (8, 12, 1,'INPUT TEXT','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (9, 13, 1,'INPUT TEXT','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (9, 5, 1,'INPUT TEXT','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (9, 8, 1,'INPUT TEXT','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (9, 10, 1,'INPUT TEXT','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (9, 11, 1,'INPUT TEXT','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (9, 12, 1,'INPUT TEXT','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (10, 13, 1,'INPUT TEXT','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (10, 5, 1,'INPUT TEXT','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (10, 8, 1,'INPUT TEXT','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (10, 10, 1,'INPUT TEXT','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (10, 11, 1,'INPUT TEXT','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (10, 12, 1,'INPUT TEXT','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (11, 14, 1,'INPUT TEXT','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (11, 15, 1,'INPUT TEXT','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (11, 16, 1,'INPUT TEXT','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (11, 2, 1,'INPUT TEXT','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (12, 14, 1,'INPUT TEXT','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (12, 15, 1,'INPUT TEXT','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (12, 16, 1,'INPUT TEXT','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (12, 2, 1,'INPUT TEXT','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (13, 14, 1,'INPUT TEXT','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (13, 15, 1,'INPUT TEXT','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (13, 16, 1,'INPUT TEXT','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (13, 2, 1,'INPUT TEXT','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (14, 14, 1,'INPUT TEXT','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (14, 15, 1,'INPUT TEXT','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (14, 16, 1,'INPUT TEXT','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (14, 2, 1,'INPUT TEXT','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (15, 14, 1,'INPUT TEXT','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (15, 15, 1,'INPUT TEXT','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (15, 16, 1,'INPUT TEXT','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (15, 2, 1,'INPUT TEXT','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (16, 14, 1,'INPUT TEXT','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (16, 15, 1,'INPUT TEXT','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (16, 16, 1,'INPUT TEXT','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (16, 2, 1,'INPUT TEXT','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (17, 14, 1,'INPUT TEXT','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (17, 15, 1,'INPUT TEXT','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (17, 16, 1,'INPUT TEXT','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (17, 2, 1,'INPUT TEXT','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (18, 17, 1,'INPUT TEXT','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (18, 18, 1,'INPUT TEXT','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (18, 19, 1,'INPUT TEXT','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (18, 20, 1,'INPUT TEXT','+');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (19, 21, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (19, 13, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (19, 35, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (19, 22, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (19, 23, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (19, 24, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (19, 25, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (19, 16, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (19, 27, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (19, 28, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (19, 29, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (19, 4, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (19, 30, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (19, 31, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (19, 32, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (19, 33, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (19, 9, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (19, 34, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (19, 11, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (19, 1, 4,'RADIO BUTTON','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (20, 35, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (20, 21, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (20, 22, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (20, 23, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (20, 24, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (20, 25, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (20, 16, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (20, 27, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (20, 28, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (20, 29, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (20, 4, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (20, 30, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (20, 31, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (20, 32, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (20, 33, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (20, 9, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (20, 34, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (20, 11, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (20, 1, 4,'RADIO BUTTON','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (21, 21, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (21, 27, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (21, 28, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (21, 4, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (21, 30, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (21, 31, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (21, 32, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (21, 9, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (21, 34, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (21, 24, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (21, 25, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (21, 16, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (21, 35, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (22, 21, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (22, 27, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (22, 28, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (22, 29, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (22, 4, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (22, 30, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (22, 31, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (22, 32, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (22, 9, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (22, 34, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (22, 24, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (22, 25, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (22, 16, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (22, 35, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (23, 21, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (23, 24, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (23, 25, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (23, 27, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (23, 29, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (23, 4, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (23, 30, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (23, 33, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (23, 31, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (23, 32, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (24, 21, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (24, 27, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (24, 28, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (24, 29, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (24, 4, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (24, 30, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (24, 31, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (24, 32, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (24, 9, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (24, 34, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (24, 24, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (24, 25, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (24, 16, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (24, 35, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (25, 21, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (25, 27, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (25, 28, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (25, 29, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (25, 4, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (25, 30, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (25, 31, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (25, 32, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (25, 9, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (25, 34, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (25, 24, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (25, 25, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (25, 16, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (25, 35, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (26, 21, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (26, 35, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (26, 24, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (26, 25, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (26, 16, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (26, 27, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (26, 28, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (26, 4, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (26, 31, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (26, 32, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (26, 9, 1,'INPUT TEXT','-');
/*INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (27, 36, 1,'INPUT TEXT','-');*/
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (27, 9, 1,'INPUT TEXT','-');
/*INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (27, 34, 1,'INPUT TEXT','-');*/
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (28, 21, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (28, 27, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (28, 28, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (28, 29, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (28, 4, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (28, 30, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (28, 31, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (28, 32, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (28, 9, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (28, 34, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (28, 24, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (28, 25, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (28, 16, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (28, 35, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (29, 21, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (29, 13, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (29, 35, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (29, 22, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (29, 23, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (29, 24, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (29, 25, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (29, 16, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (29, 27, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (29, 28, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (29, 4, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (29, 31, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (29, 32, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (29, 33, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (29, 9, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (29, 1, 4,'RADIO BUTTON','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (30, 21, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (30, 35, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (30, 24, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (30, 25, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (30, 16, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (30, 27, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (30, 28, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (30, 4, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (30, 31, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (30, 32, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (30, 9, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (31, 21, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (31, 35, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (31, 24, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (31, 25, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (31, 16, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (31, 27, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (31, 28, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (31, 4, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (31, 31, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (31, 32, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (31, 9, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (32, 27, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (32, 25, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (33, 27, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (33, 25, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (34, 21, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (34, 35, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (34, 24, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (34, 25, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (34, 16, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (34, 27, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (34, 28, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (34, 4, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (34, 31, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (34, 32, 1,'INPUT TEXT','-');
INSERT INTO CBxA(idBacteria,idAntibiotico,idPrueba,tipoControl,tipoGRAM) VALUES (34, 9, 1,'INPUT TEXT','-');
/*
Lista con la combinación de la partes del cuerpo, los antibióticos, el estado de sensibilidad, resistencia o
Lista de los antibióticos y/o comentarios usada para la configuración de las combinaciones posibles para la
asignación de los medicamentos requeridos en el tratamiento de un paciente.
*/
DELETE FROM Asignaciones;
INSERT INTO Asignaciones(id,comentariosTratamiento,orden) VALUES ( 1, 'Oxacilina',7);
INSERT INTO Asignaciones(id,comentariosTratamiento,orden) VALUES ( 2, 'Ceftriaxona (si Albumina > 3.5)',21);
INSERT INTO Asignaciones(id,comentariosTratamiento,orden) VALUES ( 3, 'Cefotaxime (si Albumina < 3.5)',21);
INSERT INTO Asignaciones(id,comentariosTratamiento,orden) VALUES ( 4, 'Ampicilina / sulbactam',12);
INSERT INTO Asignaciones(id,comentariosTratamiento,orden) VALUES ( 5, 'Ampicilina / sulbactam (si sospecha broncoaspiración)',12);
INSERT INTO Asignaciones(id,comentariosTratamiento,orden) VALUES ( 6, 'Ampicilina / sulbactam (si hay tejido necrótico o sospecha presencia de anaerobios)',12);
INSERT INTO Asignaciones(id,comentariosTratamiento,orden) VALUES ( 7, 'Rifampicina o Minociclina (si hay material de osteosíntesis o prótesis)',100);
INSERT INTO Asignaciones(id,comentariosTratamiento,orden) VALUES ( 8, 'Descartar bacteriemia o contaminación',3);
INSERT INTO Asignaciones(id,comentariosTratamiento,orden) VALUES ( 9, 'Cefazolina', 11);
INSERT INTO Asignaciones(id,comentariosTratamiento,orden) VALUES (10, 'Daptomicina',14);
INSERT INTO Asignaciones(id,comentariosTratamiento,orden) VALUES (11, 'Linezolide',15);
INSERT INTO Asignaciones(id,comentariosTratamiento,orden) VALUES (12, 'Clindamicina', 8);
INSERT INTO Asignaciones(id,comentariosTratamiento,orden) VALUES (13, 'Vancomicina',13);
INSERT INTO Asignaciones(id,comentariosTratamiento,orden) VALUES (14, 'Ceftaroline',16);
INSERT INTO Asignaciones(id,comentariosTratamiento,orden) VALUES (15, 'Clindamicina (si hay tejido necrótico o sospecha presencia de anaerobios)',8);
INSERT INTO Asignaciones(id,comentariosTratamiento,orden) VALUES (16, 'Tigeciclina', 25);
INSERT INTO Asignaciones(id,comentariosTratamiento,orden) VALUES (17, 'Ampicilina (dosis meníngeas)',6);
INSERT INTO Asignaciones(id,comentariosTratamiento,orden) VALUES (18, 'Fosfomycin (pielonefritis: 3gm cada 3 dias por 7 dosis y cistitis 3 gm dosis unica)',23);
INSERT INTO Asignaciones(id,comentariosTratamiento,orden) VALUES (19, 'En caso de endocarditis adicionar: Ceftriaxona (si Albumina > 3.5) o Cefotaxima (si Albumina < 3.5)',21);
INSERT INTO Asignaciones(id,comentariosTratamiento,orden) VALUES (20, 'Ampicilina',5);
INSERT INTO Asignaciones(id,comentariosTratamiento,orden) VALUES (21, 'Nitrofurantoin (solo cistitis)', 1);
INSERT INTO Asignaciones(id,comentariosTratamiento,orden) VALUES (22, 'Fosfomycin', 23);
INSERT INTO Asignaciones(id,comentariosTratamiento,orden) VALUES (23, 'Penicilina (dosis de meníngeas)',5);
INSERT INTO Asignaciones(id,comentariosTratamiento,orden) VALUES (24, 'Penicilina',5);
INSERT INTO Asignaciones(id,comentariosTratamiento,orden) VALUES (25, 'Rifampicina o Minociclina (si hay material de osteosíntesis o prótesis, pero no combinar con Clindamicina)',100);
INSERT INTO Asignaciones(id,comentariosTratamiento,orden) VALUES (26, 'Confirmar con un laboratorio de referencia',4);
INSERT INTO Asignaciones(id,comentariosTratamiento,orden) VALUES (27, 'Descartar bacteriemia',4);
INSERT INTO Asignaciones(id,comentariosTratamiento,orden) VALUES (28, 'Gentamicina',31);
INSERT INTO Asignaciones(id,comentariosTratamiento,orden) VALUES (29, 'Tetracycline (Minociclina)',100);
INSERT INTO Asignaciones(id,comentariosTratamiento,orden) VALUES (30, 'Trimethoprim / Sulfa', 26);
INSERT INTO Asignaciones(id,comentariosTratamiento,orden) VALUES (31, 'Amikacin',32);
INSERT INTO Asignaciones(id,comentariosTratamiento,orden) VALUES (32, 'Aztreonam',4);
INSERT INTO Asignaciones(id,comentariosTratamiento,orden) VALUES (33, 'Cefepime', 19);
INSERT INTO Asignaciones(id,comentariosTratamiento,orden) VALUES (34, 'Ceftazidime',20);
INSERT INTO Asignaciones(id,comentariosTratamiento,orden) VALUES (35, 'Ceftriaxone', 21);
INSERT INTO Asignaciones(id,comentariosTratamiento,orden) VALUES (36, 'Ciprofloxacin', 16);
INSERT INTO Asignaciones(id,comentariosTratamiento,orden) VALUES (37, 'Ertapenem (si Albumina > 3.5)', 24);
INSERT INTO Asignaciones(id,comentariosTratamiento,orden) VALUES (38, 'Colistin',29);
INSERT INTO Asignaciones(id,comentariosTratamiento,orden) VALUES (39, 'Imipenem', 27);
INSERT INTO Asignaciones(id,comentariosTratamiento,orden) VALUES (40, 'Meropenem', 28);
INSERT INTO Asignaciones(id,comentariosTratamiento,orden) VALUES (41, 'Doripenem',30);
INSERT INTO Asignaciones(id,comentariosTratamiento,orden) VALUES (42, 'Piperacillin / Tazobactam', 13);
INSERT INTO Asignaciones(id,comentariosTratamiento,orden) VALUES (43, 'Piperacillin / Tazobactam (si sospecha broncoaspiración)', 13);
INSERT INTO Asignaciones(id,comentariosTratamiento,orden) VALUES (44, 'Piperacilina / tazobactam (si hay tejido necrótico o sospecha presencia de anaerobios)', 14);
INSERT INTO Asignaciones(id,comentariosTratamiento,orden) VALUES (45, 'Piperacilina/tazobactam (si se sospecha origen en abdomen)', 15);
INSERT INTO Asignaciones(id,comentariosTratamiento,orden) VALUES (46, 'Considerar adicionar Metronidazol para cubrir anaerobios', 18);
INSERT INTO Asignaciones(id,comentariosTratamiento,orden) VALUES (47, 'Ciprofloxacin (considerar adicionar Metronidazol para cubrir anaerobios)', 17);
INSERT INTO Asignaciones(id,comentariosTratamiento,orden) VALUES (48, 'Ciprofloxacin (considerar adicionar Amikacina durante 3 dias si la función renal lo permite y es sensible)', 18);
INSERT INTO Asignaciones(id,comentariosTratamiento,orden) VALUES (49, 'Rifampicina o Minociclina (si hay material de osteosíntesis o prótesis, y se demuestra sensibilidad a estos antibioticos)',100);
INSERT INTO Asignaciones(id,comentariosTratamiento,orden) VALUES (50, 'Cefepime (considerar adicionar Metronidazol para cubrir anaerobios)', 25);
INSERT INTO Asignaciones(id,comentariosTratamiento,orden) VALUES (51, 'Ampicilina / sulbactam (si hay tejido necrótico o sospecha presencia de anaerobios)',10);
INSERT INTO Asignaciones(id,comentariosTratamiento,orden) VALUES (52, 'Germen multidrogo-resistente, consultar con infectología el esquema de tratamiento',2);
INSERT INTO Asignaciones(id,comentariosTratamiento,orden) VALUES (53, 'Tamizar Ceftazidime/Avibactam, Fosfomycin y Ceftolozano/Tazobactam',3);
INSERT INTO Asignaciones(id,comentariosTratamiento,orden) VALUES (54, 'Consultar con infectología el esquema de tratamiento, tamizar Moxifloxacin y Tigecycline',1);
/*INSERT INTO Asignaciones(id,comentariosTratamiento,orden) VALUES (55, 'Germen resistente a Trimethoprim/Sulfa, consultar con infectología el esquema de tratamiento y tamizar Moxifloxacin y Tigecycline');*/
INSERT INTO asignacionAntibiotico (idAntibiotico, idAsignacion) VALUES (6,1);
INSERT INTO asignacionAntibiotico (idAntibiotico, idAsignacion) VALUES (16,2);
INSERT INTO asignacionAntibiotico (idAntibiotico, idAsignacion) VALUES (26,3);
INSERT INTO asignacionAntibiotico (idAntibiotico, idAsignacion) VALUES (35,4);
INSERT INTO asignacionAntibiotico (idAntibiotico, idAsignacion) VALUES (35,5);
INSERT INTO asignacionAntibiotico (idAntibiotico, idAsignacion) VALUES (35,6);
INSERT INTO asignacionAntibiotico (idAntibiotico, idAsignacion) VALUES (7,7);
INSERT INTO asignacionAntibiotico (idAntibiotico, idAsignacion) VALUES (1,8);
INSERT INTO asignacionAntibiotico (idAntibiotico, idAsignacion) VALUES (23,9);
INSERT INTO asignacionAntibiotico (idAntibiotico, idAsignacion) VALUES (12,10);
INSERT INTO asignacionAntibiotico (idAntibiotico, idAsignacion) VALUES (5,11);
INSERT INTO asignacionAntibiotico (idAntibiotico, idAsignacion) VALUES (2,12);
INSERT INTO asignacionAntibiotico (idAntibiotico, idAsignacion) VALUES (10,13);
INSERT INTO asignacionAntibiotico (idAntibiotico, idAsignacion) VALUES (1,14);
INSERT INTO asignacionAntibiotico (idAntibiotico, idAsignacion) VALUES (2,15);
INSERT INTO asignacionAntibiotico (idAntibiotico, idAsignacion) VALUES (34,16);
INSERT INTO asignacionAntibiotico (idAntibiotico, idAsignacion) VALUES (13,17);
INSERT INTO asignacionAntibiotico (idAntibiotico, idAsignacion) VALUES (1,18);
INSERT INTO asignacionAntibiotico (idAntibiotico, idAsignacion) VALUES (16,19);
INSERT INTO asignacionAntibiotico (idAntibiotico, idAsignacion) VALUES (13,20);
INSERT INTO asignacionAntibiotico (idAntibiotico, idAsignacion) VALUES (11,21);
INSERT INTO asignacionAntibiotico (idAntibiotico, idAsignacion) VALUES (1,22);
INSERT INTO asignacionAntibiotico (idAntibiotico, idAsignacion) VALUES (14,23);
INSERT INTO asignacionAntibiotico (idAntibiotico, idAsignacion) VALUES (14,24);
INSERT INTO asignacionAntibiotico (idAntibiotico, idAsignacion) VALUES (17,23);
INSERT INTO asignacionAntibiotico (idAntibiotico, idAsignacion) VALUES (17,24);
INSERT INTO asignacionAntibiotico (idAntibiotico, idAsignacion) VALUES (18,23);
INSERT INTO asignacionAntibiotico (idAntibiotico, idAsignacion) VALUES (18,24);
INSERT INTO asignacionAntibiotico (idAntibiotico, idAsignacion) VALUES (7,25);
INSERT INTO asignacionAntibiotico (idAntibiotico, idAsignacion) VALUES (1,26);
INSERT INTO asignacionAntibiotico (idAntibiotico, idAsignacion) VALUES (1,27);
INSERT INTO asignacionAntibiotico (idAntibiotico, idAsignacion) VALUES (4,28);
INSERT INTO asignacionAntibiotico (idAntibiotico, idAsignacion) VALUES (8,29);
INSERT INTO asignacionAntibiotico (idAntibiotico, idAsignacion) VALUES (9,30);
INSERT INTO asignacionAntibiotico (idAntibiotico, idAsignacion) VALUES (21,31);
INSERT INTO asignacionAntibiotico (idAntibiotico, idAsignacion) VALUES (22,32);
INSERT INTO asignacionAntibiotico (idAntibiotico, idAsignacion) VALUES (24,33);
INSERT INTO asignacionAntibiotico (idAntibiotico, idAsignacion) VALUES (25,34);
INSERT INTO asignacionAntibiotico (idAntibiotico, idAsignacion) VALUES (16,35);
INSERT INTO asignacionAntibiotico (idAntibiotico, idAsignacion) VALUES (27,36);
INSERT INTO asignacionAntibiotico (idAntibiotico, idAsignacion) VALUES (28,37);
INSERT INTO asignacionAntibiotico (idAntibiotico, idAsignacion) VALUES (29,38);
INSERT INTO asignacionAntibiotico (idAntibiotico, idAsignacion) VALUES (30,39);
INSERT INTO asignacionAntibiotico (idAntibiotico, idAsignacion) VALUES (31,40);
INSERT INTO asignacionAntibiotico (idAntibiotico, idAsignacion) VALUES (32,41);
INSERT INTO asignacionAntibiotico (idAntibiotico, idAsignacion) VALUES (33,42);
INSERT INTO asignacionAntibiotico (idAntibiotico, idAsignacion) VALUES (33,43);
INSERT INTO asignacionAntibiotico (idAntibiotico, idAsignacion) VALUES (33,44);
INSERT INTO asignacionAntibiotico (idAntibiotico, idAsignacion) VALUES (33,45);
INSERT INTO asignacionAntibiotico (idAntibiotico, idAsignacion) VALUES (1,46);
INSERT INTO asignacionAntibiotico (idAntibiotico, idAsignacion) VALUES (27,47);
INSERT INTO asignacionAntibiotico (idAntibiotico, idAsignacion) VALUES (27,48);
INSERT INTO asignacionAntibiotico (idAntibiotico, idAsignacion) VALUES (7,49);
INSERT INTO asignacionAntibiotico (idAntibiotico, idAsignacion) VALUES (24,50);
INSERT INTO asignacionAntibiotico (idAntibiotico, idAsignacion) VALUES (35,51);
INSERT INTO asignacionAntibiotico (idAntibiotico, idAsignacion) VALUES (33,32);
INSERT INTO asignacionAntibiotico (idAntibiotico, idAsignacion) VALUES (1,52);
INSERT INTO asignacionAntibiotico (idAntibiotico, idAsignacion) VALUES (1,53);
/*INSERT INTO asignacionAntibiotico (idAntibiotico, idAsignacion) VALUES (33,9);*/
INSERT INTO asignacionAntibiotico (idAntibiotico, idAsignacion) VALUES (30,37);
INSERT INTO asignacionAntibiotico (idAntibiotico, idAsignacion) VALUES (31,37);
|
-- phpMyAdmin SQL Dump
-- version 4.6.6deb5
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Sep 08, 2018 at 03:24 PM
-- Server version: 5.7.23-0ubuntu0.18.04.1
-- PHP Version: 7.1.20-1+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: `insly2`
--
-- --------------------------------------------------------
--
-- Table structure for table `employeeInfo`
--
CREATE TABLE `employeeInfo` (
`ssnID` int(11) NOT NULL,
`name` text NOT NULL,
`birthdate` text NOT NULL,
`isEmployee` enum('Yes','NO') NOT NULL,
`email` text NOT NULL,
`phone` text NOT NULL,
`address` text NOT NULL,
`intro` text NOT NULL,
`prevExprience` text NOT NULL,
`educationInfo` text NOT NULL,
`createdBy` text NOT NULL,
`updatedBy` text NOT NULL,
`createdAt` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updatedAt` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `employeeInfo`
--
INSERT INTO `employeeInfo` (`ssnID`, `name`, `birthdate`, `isEmployee`, `email`, `phone`, `address`, `intro`, `prevExprience`, `educationInfo`, `createdBy`, `updatedBy`, `createdAt`, `updatedAt`) VALUES
(1, 'Tom Bill', '30-08-1990', 'Yes', 'tom.bill@info.com', '7078345690', 'Lootsa,Tallinn Estonia', 'I am Tom having 10 years of exprience in Administration.', 'I have 2 years exprience working with XYZ Firm', 'Bachelors in IT', 'Admin', '', '2018-09-08 09:34:04', '');
-- --------------------------------------------------------
--
-- Table structure for table `employeeLanguages`
--
CREATE TABLE `employeeLanguages` (
`id` int(11) NOT NULL,
`ssnID` int(11) DEFAULT NULL,
`languageId` int(11) DEFAULT NULL,
`intro` text NOT NULL,
`prevExprience` text,
`educationInfo` text
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `employeeLanguages`
--
INSERT INTO `employeeLanguages` (`id`, `ssnID`, `languageId`, `intro`, `prevExprience`, `educationInfo`) VALUES
(1, 1, 2, 'Soy Tom con 10 años de experiencia en administración.', 'Tengo 2 años de experiencia trabajando con XYZ Firm', 'Solteros en TI'),
(2, 1, 3, 'Je suis Tom ayant 10 ans d\'expérience en administration.', 'J\'ai 2 ans d\'expérience avec XYZ Firm', 'Baccalauréat en informatique');
-- --------------------------------------------------------
--
-- Table structure for table `langauges`
--
CREATE TABLE `langauges` (
`languageId` int(11) NOT NULL,
`name` varchar(100) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `langauges`
--
INSERT INTO `langauges` (`languageId`, `name`) VALUES
(1, 'en'),
(2, 'es'),
(3, 'fr');
--
-- Indexes for dumped tables
--
--
-- Indexes for table `employeeInfo`
--
ALTER TABLE `employeeInfo`
ADD PRIMARY KEY (`ssnID`);
--
-- Indexes for table `employeeLanguages`
--
ALTER TABLE `employeeLanguages`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `langauges`
--
ALTER TABLE `langauges`
ADD PRIMARY KEY (`languageId`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `employeeInfo`
--
ALTER TABLE `employeeInfo`
MODIFY `ssnID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT for table `langauges`
--
ALTER TABLE `langauges`
MODIFY `languageId` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
/*!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 */;
|
Use [001]
SELECT ord_no, MAX(A4GLIdentity) AS A4GLIdentity, MAX(carrier_cd) AS Expr2, MAX(hand_chg) AS Expr3, MAX(ship_dt) AS Expr1, filler_0001, extra_1
FROM dbo.ARSHTTBL
WHERE (void_fg IS NULL) AND (NOT (ord_no = '' OR
ord_no IS NULL)) AND (NOT (filler_0001 = '' OR
filler_0001 IS NULL)) AND (NOT (tracking_no = '' OR
tracking_no IS NULL)) AND (NOT (carrier_cd IS NULL OR
carrier_cd = '')) AND (NOT (extra_1 IS NULL OR
extra_1 = '')) AND ORD_NO in (651621)
GROUP BY ord_no, ship_dt, A4glidentity, filler_0001, extra_1
ORDER BY MAX(Ship_dt), MAX(A4GLIDENTITY) |
-----Éó¼ÆÊ¹ÓÃÊÓͼ
create or replace view v1_zfednzjymxb_sj as
select jyid,
jymxid,
hdde147 edh,
jsde940 bz,
de042 dwid,
jsde955 dwdm,
de084 kmdm,
jsde702 kmjjdm,
jsde802 xmdm,
jsde821 xmmc,
hdde998 zffs,
de200 zxbz ,
czde951 lydm,
jsde107 zbid ,
zbde151 ZBBH,
ytsm,
xmmx,
lylx,
jhid,
hzid1,
hzid2,
hzid3,
zxgl,
snbz,ywlb,
pdid1,
kjpdh1,
pdid2,
kjpdh2,
dwywgje,
a.dwhfsyje,
a.dwbyje1,
a.dwbyje2,
a.dwbyje3,
a.dwbyje4,
KSYWGJE,
KSHZGKJE,
KSHZCZZHJE,
KSHZQTZJJE,
KSSHHFSYJY,
KSDHFJY,
KSBYJE1,
KSBYJE2,
KSBYJE3,
KSBYJE4,
KSBYJE5,
KSBYJE6,
BZ1,
bz2,
bz3,
bz4,
de001 rq,
jsde999 gxrq,
djbz,
a.bnote1,
a.bnote2,
a.bnote3,
de062 bmid,
SHRID1,
SHRID2,
SHRID3,
SHRID4,
JYJE,
GKRQ,
ksrq
From zfednzjymxb a;
|
/* Create table for Representation objects */
CREATE TABLE ABSTRACT_USER_REPRESENTATION (
SOURCE varchar(1024),
USER_KEY varchar(1024),
REPRESENTATION_TYPE varchar(255),
USER_FK varchar(32),
UUID varchar(32) not null unique,
CREATED_DATE timestamp,
DELETED varchar(32),
DTYPE varchar(32),
ENTITY_TAG VARCHAR(32),
IS_DISABLED BIT,
IS_OUT_OF_SYNC BIT,
LOCKED BIT,
MODIFIED_DATE timestamp,
VERSION_NUMBER BIGINT,
primary key (UUID)
);
|
ALTER TABLE Proposal ADD SESSION_ID BIGINT;
ALTER TABLE Proposal ADD FOREIGN KEY (SESSION_ID) REFERENCES Session (ID);
|
/* 使用NOT IN
select Name as Customers from Customers where Id not in (select distinct(CustomerId) from Orders)
*/
/*
使用 NOT EXISTS
*/
select c.Name as Customers from Customers as c where NOT EXISTS ( select CustomerId from Orders where c.Id = CustomerId ) |
select 'info from cgm';
select min(date_time), max(date_time) from cgm;
select count(*) from cgm;
select 'info from cgm_1';
select min(date_time), max(date_time) from cgm_1;
select count(*) from cgm_1;
select 'info from cgm_2';
select min(date_time), max(date_time) from cgm_2;
select count(*) from cgm_2;
|
create table TRANSFER (ID bigint identity primary key,
SENDER_ACCOUNT_ID bigint,
RECEIVER_ACCOUNT_ID bigint,
AMOUNT NUMERIC(19,2),
DATE TIMESTAMP);
|
create table if not exists Login(
correo varchar(20) not null primary key,
contrasena varchar(300) not null
);
create table if not exists Usuarios(
carnet int not null primary key,
nobre varchar(15) not null,
apellido varchar not null,
carrera varchar(16)not null,
correo varchar(20)not null
);
create table if not exists Recursos(
identificador int primary key,
nombre varchar(15)not null,
ubicacion varchar(15)not null,
tipo varchar(10)not null,
capacidad int,
horario_disponibilidad date,
diponibilidad varchar(1) not null
);
--create table if not exists multas(
-- id int not null primary key,
-- carnet int(20)not null,
-- valor int(32)not null,
-- fecha date not null
--);
drop table Usuarios;
drop table login;
|
--Primero se deben borrar todas las tablas (de detalle a maestro) y lugo anyadirlas (de maestro a detalle)
--(en este caso en cada una de las aplicaciones (tkrun y descuento) se usa solo una tabla, por lo que no hace falta)
--Para giis.demo.tkrun:
drop table Producto;
drop table Pedido;
drop table Trozo;
drop table Incidencia;
drop table OrdenTrabajo;
drop table Estado;
drop table Almacenero;
drop table Paquete;
drop table Usuario;
drop table Venta;
drop table Categoria;
drop table Subcategoria;
drop table PerteneceSubcategoria;
drop table PerteneceCategoria;
drop table Contiene;
create table Producto (id int primary key not null, nombre varchar(32) not null, descripcion varchar(32), precioNormal decimal(5,2), precioEmpresa decimal(5,2), pasillo int, estanteria int, altura int, stock int, stockMin int, stockReposicion int, IVA int);
create table Pedido (id int primary key not null, fecha varchar(32) not null, tamaño int,idUsuario varchar(5) not null, productos varchar(8000), FOREIGN KEY (idUsuario) REFERENCES Usuario(codigoUsauario));
create table Trozo (id varchar(32) primary key not null, tamaño int, productos varchar(8000));
create table Incidencia (idPedido int not null, descripcion varchar(1000),FOREIGN KEY (idPedido) REFERENCES Pedido(id));
create table Almacenero(idalmacenero int primary key not null);
create table OrdenTrabajo (idot int primary key not null, estado varchar(20), idalmacenero int not null, fecha varchar(32) not null, idpedido varchar(1000) not null , capacidad int, FOREIGN KEY (idalmacenero) REFERENCES Almacenero(idalmacenero), FOREIGN KEY (idpedido) REFERENCES Pedido(id));
create table Estado (idot int not null, terminado varchar(100),posibleEmpaquetado varchar(100),maps varchar(8000),nProductos int not null,FOREIGN KEY (idot) REFERENCES OrdenTrabajo(idot));
create table Paquete (idPaquete varchar(5) primary key not null, idPedido int not null, fecha varchar(32) not null,idAlmacenero int not null,direccion varchar(20) not null,uds int not null,estado varchar(32) ,FOREIGN KEY (idPedido) REFERENCES Pedido(id));
create table Usuario (idUsuario varchar(10) primary key not null, tipo varchar(10) not null, direccion varchar(20) not null);
create table Venta (fecha varchar(32) not null,tipoPago varchar(32),tipoUsuario varchar(32),empresa varchar(32) ,importe decimal(11,2));
create table Categoria (nombreCategoria varchar(20) primary key not null);
create table Subcategoria (nombreSubcategoria varchar(20) primary key not null, nombreCategoria not null, FOREIGN KEY (nombreCategoria) REFERENCES Categoria(nombreCategoria));
create table PerteneceSubcategoria (idProducto int not null, nombreSubcategoria varchar(20) not null, FOREIGN KEY (idProducto) REFERENCES Producto(id), FOREIGN KEY (nombreSubcategoria) REFERENCES Subcategoria(nombreSubcategoria));
create table PerteneceCategoria (idProducto int not null, nombreCategoria varchar(20) not null, FOREIGN KEY (idProducto) REFERENCES Producto(id), FOREIGN KEY (nombreCategoria) REFERENCES Categoria(nombreCategoria));
create table Contiene (nombreSubcategoriaOrigen varchar(20) not null, nombreSubcategoriaContenida varchar(20) not null, FOREIGN KEY (nombreSubcategoriaOrigen) REFERENCES Subcategoria(nombreSubcategoria),FOREIGN KEY (nombreSubcategoriaContenida) REFERENCES Subcategoria(nombreSubcategoria));
|
create or replace view v1_zbgw as
select id as id,
swtime,
lwh,
lwdw,
title,
issw,
nf,
ngbm,
'收文' as lb,
1 as lbid
from oa_fip_gw_sw union
select id,
swtime,
swh as lwh,
lwdw,
lwtitle as title,
iszbw as issw,
nf,
ngbm,
'办文' as lb,
2 as lbid
from oa_fip_gw_bw union
select id,
cwtime as swtime,
wh as lwh,
zs as lwdw,
title,
iszbw as issw,
nf,
ngbm,
'发文' as lb,
3 as lbid
from oa_fip_gw_fw;
|
insert into Clientes (id, nombre, apellidos, telefono)
values('109899', 'Juan', 'Pérez Gómez', 3023345664);
insert into Clientes (id, nombre, apellidos, telefono)
values('104695', 'José', 'López Ariza', 3123675774);
insert into FormaDePago (id, nombre)
values(1, 'Tarjeta de crédito');
insert into FormaDePago (id, nombre)
values(2, 'Tarjeta dédito');
insert into FormaDePago (id, nombre)
values(3, 'Efectivo');
insert into Producto (id, nombre, precio, existencia)
values('99', 'Mouse', 25000, 64);
insert into Producto (id, nombre, precio, existencia)
values('104', 'Teclado', '48000', 77);
insert into Producto (id, nombre, precio, existencia)
values('47', 'Monitor', '368000', 23);
insert into Pedido (id, id_cliente, fecha, id_forma_pago)
values(1008, 109899, '6/12/20', 2);
insert into Pedido (id, id_cliente, fecha, id_forma_pago)
values(1009, 109899, '23/11/20', 3);
insert into Pedido (id, id_cliente, fecha, id_forma_pago)
values(1018, 104695, '1/12/20', 2);
insert into DetallePedido (sec, id_pedido, id_producto, precio, cantidad)
values(1, 1008, 104, 48000, 2);
insert into DetallePedido (sec, id_pedido, id_producto, precio, cantidad)
values(2, 1018, 104, 48000, 4);
insert into DetallePedido (sec, id_pedido, id_producto, precio, cantidad)
values(3, 1009, 47, 368000, 1);
|
SELECT COUNT(*) AS num_cust
FROM Customers; |
create table books(
id serial primary key,
title text,
author text,
img text,
instock boolean,
description text,
shelfid int references users(id)
) |
DROP TABLE TBL_PRODUCT_ORDER;
DROP TABLE TBL_PRODUCT_LIST;
DROP TABLE TBL_CATEGORY;
DROP TABLE TBL_USER;
CREATE TABLE TBL_USER(
U_ID VARCHAR(20) PRIMARY KEY,
U_PASS VARCHAR(20) NOT NULL,
U_NAME VARCHAR(20) NOT NULL,
U_ADDR VARCHAR(100) NOT NULL,
U_PHONE VARCHAR(20) NOT NULL,
U_EMAIL VARCHAR(20) NOT NULL,
U_GENDER VARCHAR(2) NOT NULL,
U_POINT INTEGER NOT NULL
)
INSERT INTO TBL_USER VALUES ('shin', '1234', '신동민', '서울', '010-3577-3342', 'teasdm@naver.com', '남',0);
INSERT INTO TBL_USER VALUES ('hong', '1234', '홍길동', '인천', '010-1234-5677', 'hong@naver.com', '여',0);
CREATE TABLE TBL_CATEGORY(
C_CODE VARCHAR(20) PRIMARY KEY,
C_NAME VARCHAR(50) NOT NULL,
C_COUNT INTEGER NOT NULL
)
INSERT INTO TBL_CATEGORY VALUES ('C001', 'CASIO', 0);
INSERT INTO TBL_CATEGORY VALUES ('C002', 'TIME', 1);
INSERT INTO TBL_CATEGORY VALUES ('C003', 'TISSOT', 2);
INSERT INTO TBL_CATEGORY VALUES ('C004', 'D&G', 3);
INSERT INTO TBL_CATEGORY VALUES ('C005', 'DKNY', 4);
INSERT INTO TBL_CATEGORY VALUES ('C006', 'ROLEX', 5);
INSERT INTO TBL_CATEGORY VALUES ('C007', 'OMEGA', 6);
INSERT INTO TBL_CATEGORY VALUES ('C008', 'ALBA', 7);
INSERT INTO TBL_CATEGORY VALUES ('C009', '기타', 8);
CREATE TABLE TBL_PRODUCT_LIST(
P_CODE INTEGER AUTO_INCREMENT PRIMARY KEY,
P_S_UID VARCHAR(20) NOT NULL,
P_B_UID VARCHAR(20),
P_CATEGORY VARCHAR(20) NOT NULL,
P_SNUMBER VARCHAR(50) NOT NULL,
P_INSTANT_PRICE INTEGER,
P_PRIMARY_PRICE INTEGER NOT NULL,
P_CURRENT_PRICE INTEGER,
P_CONTENT VARCHAR(100) NOT NULL,
P_TITLE VARCHAR(50) NOT NULL,
P_DATE VARCHAR(20) NOT NULL,
P_DATE2 VARCHAR(20) NOT NULL,
CONSTRAINT S_UID FOREIGN KEY (P_S_UID) REFERENCES TBL_USER(U_ID),
CONSTRAINT B_UID FOREIGN KEY (P_B_UID) REFERENCES TBL_USER(U_ID),
CONSTRAINT P_CATEGORY FOREIGN KEY (P_CATEGORY) REFERENCES TBL_CATEGORY(C_CODE)
)
CREATE TABLE TBL_PRODUCT_ORDER(
O_CODE INTEGER AUTO_INCREMENT PRIMARY KEY,
O_S_UID VARCHAR(20) NOT NULL,
O_B_UID VARCHAR(20) NOT NULL,
O_SNUMBER VARCHAR(50) NOT NULL,
O_SELL_PRICE INTEGER NOT NULL,
O_DATE VARCHAR(20) NOT NULL,
CONSTRAINT BUY_S_UID FOREIGN KEY (O_S_UID) REFERENCES TBL_USER(U_ID),
CONSTRAINT BUY_B_UID FOREIGN KEY (O_B_UID) REFERENCES TBL_USER(U_ID)
)
ALTER TABLE TBL_PRODUCT_ORDER DROP X;
ALTER TABLE TBL_PRODUCT_ORDER DROP Y;
ALTER TABLE TBL_PRODUCT_LIST DROP X;
ALTER TABLE TBL_PRODUCT_LIST DROP Y;
ALTER TABLE TBL_PRODUCT_ORDER ADD X DOUBLE;
ALTER TABLE TBL_PRODUCT_ORDER ADD Y DOUBLE;
ALTER TABLE TBL_PRODUCT_LIST ADD X DOUBLE;
ALTER TABLE TBL_PRODUCT_LIST ADD Y DOUBLE;
|
INSERT INTO users (username, email, profile_img, password, ranked30, ranked10, casual) VALUES (
'alvin', 'alvin@gmail.com','https://www.w3schools.com/w3images/avatar2.png', '$2a$10$FB/BOAVhpuLvpOREQVmvmezD4ED/.JBIDRh70tGevYzYzQgFId2u.', 1900, 1200, 1700
);
INSERT INTO users (username, email, password, ranked30, ranked10, casual) VALUES (
'thomas', 'thomas@gmail.com', '$2a$10$FB/BOAVhpuLvpOREQVmvmezD4ED/.JBIDRh70tGevYzYzQgFId2u.', 900, 1200, 1800
);
INSERT INTO users (username, email, password, ranked30, ranked10, casual) VALUES (
'haopeng', 'haopeng@gmail.com', '$2a$10$FB/BOAVhpuLvpOREQVmvmezD4ED/.JBIDRh70tGevYzYzQgFId2u.', 2300, 1200, 900
);
INSERT INTO users (username, email, password, ranked30, ranked10, casual) VALUES (
'user4', 'user4@gmail.com', '$2a$10$FB/BOAVhpuLvpOREQVmvmezD4ED/.JBIDRh70tGevYzYzQgFId2u.', 1500, 1600, 1700
);
INSERT INTO users (username, email, password, ranked30, ranked10, casual) VALUES (
'user5', 'user5@gmail.com', '$2a$10$FB/BOAVhpuLvpOREQVmvmezD4ED/.JBIDRh70tGevYzYzQgFId2u.', 3000, 3100, 3200
);
INSERT INTO users (username, email, password, ranked30, ranked10, casual) VALUES (
'user6', 'user6@gmail.com', '$2a$10$FB/BOAVhpuLvpOREQVmvmezD4ED/.JBIDRh70tGevYzYzQgFId2u.', 50, 20, 15
);
-- casual/ranked/ai
-- matches
INSERT INTO matches (type, user1_id, user2_id, winner, loser, white, black, start_time, end_time) VALUES (
'CASUAL', 1, 2, 1, 2, 1, 2, '2000-11-13 12:12:12', '2000-11-13 12:12:13'
);
INSERT INTO matches (type, user1_id, user2_id, winner, loser, white, black, start_time, end_time) VALUES (
'AI', 1, null, 1, null, 1, null, '2000-11-13 12:12:12', '2000-11-13 12:13:12'
);
INSERT INTO matches (type, user1_id, user2_id, winner, loser, white, black, start_time, end_time) VALUES (
'RANKED', 3, 2, 2, 3, 2, 3, '2000-11-13 11:12:12', '2000-11-13 12:12:12'
);
INSERT INTO matches (type, user1_id, user2_id, winner, loser, white, black, start_time, end_time) VALUES (
'CASUAL', 1, 3, 1, 3, 3, 1, '2000-11-13 10:12:12', '2000-11-13 12:12:12'
);
-- chat logs
-- YYYY-MM-DD HH:MI:SS
INSERT INTO chat_logs (user_id, match_id, created_at, message) VALUES (
1, 1, '2000-11-13 12:12:12', 'hi'
);
INSERT INTO chat_logs (user_id, match_id, created_at, message) VALUES (
2, 1, '2000-11-13 12:25:13', 'bye'
);
INSERT INTO chat_logs (user_id, match_id, created_at, message) VALUES (
3, 2, '2001-11-13 11:25:13', 'ur good!'
);
INSERT INTO chat_logs (user_id, match_id, created_at, message) VALUES (
2, 2, '2001-11-13 11:31:12', 'ur bad!'
);
INSERT INTO chat_logs (user_id, match_id, created_at, message) VALUES (
3, 3, '2001-11-13 12:25:13', 'gg ez'
);
INSERT INTO chat_logs (user_id, match_id, created_at, message) VALUES (
2, 3, '2001-11-13 12:45:20', 'stfu'
);
-- action logs
-- '{"piece" : "pawn", "from" : "a2", "to" : "a4"}'
INSERT INTO action_logs (user_id, match_id, created_at, action) VALUES (
1, 1, '2001-11-13 12:45:20', '{"piece" : "pawn", "from" : "a2", "to" : "a4"}'
);
INSERT INTO action_logs (user_id, match_id, created_at, action) VALUES (
2, 1, '2001-11-13 12:46:20', '{"piece" : "pawn", "from" : "a7", "to" : "a5"}'
);
INSERT INTO action_logs (user_id, match_id, created_at, action) VALUES (
1, 2, '2001-11-13 12:45:20', '{"piece" : "knight", "from" : "b1, "to" : "a3"}'
);
INSERT INTO action_logs (user_id, match_id, created_at, action) VALUES (
null, 2, '2001-11-13 12:45:21', '{"piece" : "knight", "from" : "b8, "to" : "a6"}'
);
INSERT INTO action_logs (user_id, match_id, created_at, action) VALUES (
3, 3, '2001-11-13 12:45:20', '{"piece" : "knight", "from" : "b1, "to" : "a3"}'
);
INSERT INTO action_logs (user_id, match_id, created_at, action) VALUES (
2, 3, '2001-11-13 12:46:00', '{"piece" : "knight", "from" : "b1, "to" : "a3"}'
);
-- friends
INSERT INTO friends (user1_id, user2_id, created_at) VALUES (
1, 2, '2001-11-13 12:46:20'
);
INSERT INTO friends (user1_id, user2_id, created_at) VALUES (
2, 1, '2001-11-13 12:46:20'
);
INSERT INTO friends (user1_id, user2_id, created_at) VALUES (
3, 2, '2001-11-13 12:46:20'
);
INSERT INTO friends (user1_id, user2_id, created_at) VALUES (
2, 3, '2001-11-13 12:46:20'
);
INSERT INTO friends (user1_id, user2_id, created_at) VALUES (
1, 3, '2001-11-13 12:46:20'
);
INSERT INTO friends (user1_id, user2_id, created_at) VALUES (
3, 1, '2001-11-13 12:46:20'
);
INSERT INTO friends (user1_id, user2_id, created_at) VALUES (
3, 4, '2001-11-13 12:46:20'
);
INSERT INTO friends (user1_id, user2_id, created_at) VALUES (
4, 5, '2001-11-13 12:46:20'
);
INSERT INTO friends (user1_id, user2_id, created_at) VALUES (
1, 6, '2001-11-13 12:46:20'
);
INSERT INTO friends (user1_id, user2_id, created_at) VALUES (
6, 2, '2001-11-13 12:46:20'
);
INSERT INTO friends (user1_id, user2_id, created_at) VALUES (
1, 5, '2001-11-13 12:46:20'
);
INSERT INTO friends (user1_id, user2_id, created_at) VALUES (
1, 4, '2001-11-13 12:46:20'
);
INSERT INTO friends (user1_id, user2_id, created_at) VALUES (
5, 2, '2001-11-13 12:46:20'
);
INSERT INTO friends (user1_id, user2_id, created_at) VALUES (
4, 2, '2001-11-13 12:46:20'
);
|
■問題
社員テーブル(employee)からそれぞれの社員氏名と上司氏名を、社員コードについて昇順に取り出してみましょう。
なお、取り出す列には別名として「社員氏名」「上司氏名」とし、上司がいない社員についても情報は取り出すことにします。
■実行文
# 社員氏名と上司氏名を社員コードについて昇順で取得
SELECT
es.s_id AS 社員コード,
CONCAT(es.l_name, es.f_name) AS 社員氏名,
CONCAT(eb.l_name, eb.f_name) AS 上司氏名
# 社員テーブルを社員コードと上司コードで自己結合した値から出力
FROM
employee AS es
LEFT OUTER JOIN
employee AS eb
ON
es.b_id = eb.s_id
# 社員コードについて昇順で取得
ORDER BY
es.s_id
;
■返却値
mysql> SELECT
-> es.s_id AS 社員コード,
-> CONCAT(es.l_name, es.f_name) AS 社員氏名,
-> CONCAT(eb.l_name, eb.f_name) AS 上司氏名
-> FROM
-> employee AS es
-> LEFT OUTER JOIN
-> employee AS eb
-> ON
-> es.b_id = eb.s_id
-> ORDER BY
-> es.s_id
-> ;
+------------+------------+------------+
| 社員コード | 社員氏名 | 上司氏名 |
+------------+------------+------------+
| AI00001 | 相沢聡 | NULL |
| DA00001 | 大門一郎 | 相沢聡 |
| FU00001 | 藤井雄太 | 妹尾春樹 |
| FU00002 | 藤岡幸太郎 | 藤井雄太 |
| HA0001 | 速水和幸 | NULL |
| HA0002 | 葉山俊輔 | 藤岡幸太郎 |
| KA00001 | 川口裕子 | NULL |
| KA00002 | 加藤昭雄 | NULL |
| KA00003 | 神田佐知子 | 神田佐知子 |
| KI00001 | 木村一郎 | 田中真由子 |
| NA00001 | 中澤康代 | 戸川よしみ |
| NI00001 | 西雄一 | NULL |
| NI00002 | 新渡戸康治 | NULL |
| NO00001 | 野上利江 | 戸川よしみ |
| SA00001 | 佐藤智子 | NULL |
| SE00001 | 妹尾春樹 | 寺岡陽一 |
| SI00001 | 清水春子 | 清水春子 |
| TA00001 | 田中真由子 | 山田奈美 |
| TA00002 | 田辺正一 | 葉山俊輔 |
| TE00001 | 寺岡陽一 | 速水和幸 |
| TI00001 | 近田晃子 | 相沢聡 |
| TO00001 | 遠山真一 | 上田一也 |
| TO00002 | 戸川よしみ | 津村知美 |
| TU00001 | 津村知美 | 近田晃子 |
| UE00001 | 上田一也 | NULL |
| YA00001 | 山田奈美 | 佐藤智子 |
+------------+------------+------------+
26 rows in set (0.03 sec) |
-- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 16-07-2021 a las 05:05:51
-- Versión del servidor: 10.4.18-MariaDB
-- Versión de PHP: 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 */;
--
-- Base de datos: `dbmvc`
--
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `usuarios`
--
CREATE TABLE `usuarios` (
`id` int(11) NOT NULL,
`nombre` varchar(20) NOT NULL,
`apellido` varchar(20) NOT NULL,
`email` varchar(30) NOT NULL,
`clave` int(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Volcado de datos para la tabla `usuarios`
--
INSERT INTO `usuarios` (`id`, `nombre`, `apellido`, `email`, `clave`) VALUES
(1, 'Roberto', 'Vargas', 'jrobertova98@gmail.com', 1),
(2, 'Jose', 'Vargas A', 'jroberto_98@hotmail.com', 0),
(3, 'Carlos', 'Vargas', 'carlos@correo.com', 3),
(4, 'SOFI', 'R', 'SOFI@CORREO.COM', 34),
(5, 'Sofia', 'Robertos', 'sofirobertos@gmail.com', 5),
(6, 'Valentina', 'Vargas', 'vale@correo.com', 12),
(7, 'Isabel', 'Arano', 'isabel@correo.com', 9999);
--
-- Índices para tablas volcadas
--
--
-- Indices de la tabla `usuarios`
--
ALTER TABLE `usuarios`
ADD PRIMARY KEY (`id`);
--
-- AUTO_INCREMENT de las tablas volcadas
--
--
-- AUTO_INCREMENT de la tabla `usuarios`
--
ALTER TABLE `usuarios`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;
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 */;
|
-- phpMyAdmin SQL Dump
-- version 4.1.14
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Jul 27, 2016 at 03:21 PM
-- Server version: 5.6.17
-- PHP Version: 5.5.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
--
-- Database: `shopgiay`
--
-- --------------------------------------------------------
--
-- Table structure for table `loaigiay`
--
CREATE TABLE IF NOT EXISTS `loaigiay` (
`idloai` int(11) NOT NULL AUTO_INCREMENT,
`tenloai` varchar(255) NOT NULL,
`gioitinh` tinyint(4) NOT NULL,
`anhien` tinyint(4) NOT NULL,
PRIMARY KEY (`idloai`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=3 ;
--
-- Dumping data for table `loaigiay`
--
INSERT INTO `loaigiay` (`idloai`, `tenloai`, `gioitinh`, `anhien`) VALUES
(1, 'Running', 0, 1),
(2, 'Basketball', 0, 1);
-- --------------------------------------------------------
--
-- Table structure for table `sanpham`
--
CREATE TABLE IF NOT EXISTS `sanpham` (
`idsp` int(11) NOT NULL AUTO_INCREMENT,
`idloai` int(11) NOT NULL,
`tensp` varchar(255) NOT NULL,
`gia` bigint(20) NOT NULL,
`urlhinh` varchar(255) NOT NULL,
`soluong` int(11) NOT NULL,
`danhgia` int(11) NOT NULL,
`anhien` int(11) NOT NULL,
`mota` text NOT NULL,
`kichthuoc` tinyint(4) NOT NULL,
`mausac` varchar(50) NOT NULL,
PRIMARY KEY (`idsp`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 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 */;
|
-- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Nov 28, 2017 at 04:05 PM
-- Server version: 10.1.26-MariaDB
-- PHP Version: 7.1.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Database: `login`
--
-- --------------------------------------------------------
--
-- Table structure for table `onsell`
--
CREATE TABLE `onsell` (
`id` int(11) NOT NULL,
`onsell_name` varchar(128) NOT NULL,
`onsell_description` varchar(500) NOT NULL,
`onsell_price` int(11) NOT NULL,
`onsell_pic` varchar(128) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `onsell`
--
INSERT INTO `onsell` (`id`, `onsell_name`, `onsell_description`, `onsell_price`, `onsell_pic`) VALUES
(2, 'Rolls Royce Silver Cloud', 'The Rolls-Royce Silver Cloud is an automobile produced by Rolls-Royce Limited from April 1955 to March 1966.', 1000, 'car1.jpg'),
(3, 'Porsche 911', 'The original Porsche 911 was a luxury sports car made by Porsche AG of Stuttgart, Germany. The famous, distinctive, and durable design was introduced in autumn 1963 and built through 1989.', 900, 'car2.jpg'),
(4, 'Ford Mustang', 'The Ford Mustang is an American car manufactured by Ford. It was originally based on the platform of the second generation North American Ford Falcon, a compact car.', 3000, 'car3.jpg'),
(5, 'Fiat Gamine Vinagle', 'The Vignale Gamine is a small rear-engined car produced by Carrozzeria Vignale from 1967 to 1971, based on the Fiat 500, also known as Nuova 500.', 1000, 'car4.jpg'),
(6, 'Porsche 356', 'The 356 has always been popular with the motor press. It remains a highly regarded collector car. The limited production Carrera Speedster.', 1200, 'car5.jpg'),
(7, 'Porche 911', 'The original Porsche 911 was a luxury sports car made by Porsche AG of Stuttgart, Germany. The famous, distinctive, and durable design was introduced in autumn 1963 and built through 1989.', 4000, 'car6.jpg'),
(8, 'Jaguar F-TYPE', 'The Jaguar F-Type is a two-door, two-seater sports car (S-segment in Continental Europe), based on a shortened platform of the XK convertible, manufactured by the British car manufacturer Jaguar from 2013.', 3000, 'car7.jpg'),
(9, 'Mecedes-Benz 300sl Roadster', 'The Mercedes-Benz 300 SL (W198) was the first iteration of the SL-Class grand tourer and fastest production car of its day. Introduced in 1954 as a two-seat coupé with distinctive gull-wing doors, it was later offered as an open roadster.', 2500, 'car8.jpg'),
(15, 'testing1', 'tesing1', 500, '1cb909f0.jpg');
-- --------------------------------------------------------
--
-- Table structure for table `users`
--
CREATE TABLE `users` (
`id` int(11) NOT NULL,
`email` varchar(128) NOT NULL,
`password` varchar(15) NOT NULL,
`confirmpassword` varchar(15) NOT NULL,
`role` varchar(128) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `users`
--
INSERT INTO `users` (`id`, `email`, `password`, `confirmpassword`, `role`) VALUES
(15, 'aaa@hotmail.com', '123', '123', 'admin'),
(24, 'ccc@hotmail.com', '123', '123', ''),
(25, 'bbb@gmail.com', '123', '123', '');
--
-- Indexes for dumped tables
--
--
-- Indexes for table `onsell`
--
ALTER TABLE `onsell`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `users`
--
ALTER TABLE `users`
ADD PRIMARY KEY (`id`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `onsell`
--
ALTER TABLE `onsell`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=16;
--
-- AUTO_INCREMENT for table `users`
--
ALTER TABLE `users`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=26;
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 */;
|
-- phpMyAdmin SQL Dump
-- version 5.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 15 Apr 2020 pada 17.59
-- Versi server: 10.4.11-MariaDB
-- Versi PHP: 7.4.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: `tubes_193040065`
--
-- --------------------------------------------------------
--
-- Struktur dari tabel `pakaian`
--
CREATE TABLE `pakaian` (
`id` int(11) NOT NULL,
`gambar` varchar(20) NOT NULL,
`jenis` varchar(20) NOT NULL,
`merk` varchar(20) NOT NULL,
`price` varchar(20) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data untuk tabel `pakaian`
--
INSERT INTO `pakaian` (`id`, `gambar`, `jenis`, `merk`, `price`) VALUES
(1, 'gambar.png', 'Hoodie', 'bape', 'Rp: 3.500.000'),
(2, 'gambar1.png', 'Shirt V-neck', 'Under Armour', 'Rp: 1.500.000'),
(3, 'gambar2.png', 'T-Shirt', 'Supreme', 'Rp: 2.000.000'),
(4, 'gambar3.png', 'T-Shirt', 'Blood4Mercy', 'Rp: 1.520.000'),
(5, 'gambar4.png', 'Kemeja', 'Pull n\' Bear', 'Rp: 760.000'),
(6, 'gambar5.png', 'Denim', 'Moofeat', 'Rp: 340.000'),
(7, 'gambar6.png', 'Kemeja', 'Levi\'s', 'Rp: 690.000'),
(8, 'gambar7.png', 'Gamis', 'H&M', 'Rp: 420.000'),
(9, 'gambar8.png', 'Sweater', 'Chill Bro', 'Rp: 370.000'),
(10, 'gambar9.png', 'Hoodie', 'AHHA', 'Rp: 600.000');
--
-- Indexes for dumped tables
--
--
-- Indeks untuk tabel `pakaian`
--
ALTER TABLE `pakaian`
ADD PRIMARY KEY (`id`);
--
-- AUTO_INCREMENT untuk tabel yang dibuang
--
--
-- AUTO_INCREMENT untuk tabel `pakaian`
--
ALTER TABLE `pakaian`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11;
COMMIT;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
DROP TABLE IF EXISTS CourseOfferings CASCADE;
CREATE TABLE CourseOfferings (
offering_launch_date DATE NOT NULL, /* Courses have unique launch date */
offering_fees DEC(64,2) NOT NULL,
offering_registration_deadline DATE NOT NULL,
offering_num_target_registration INTEGER NOT NULL,
offering_seating_capacity INTEGER NOT NULL,
course_id INTEGER NOT NULL,
admin_id INTEGER NOT NULL,
offering_start_date DATE NOT NULL,
offering_end_date DATE NOT NULL,
CHECK(offering_start_date <= offering_end_date),
CHECK(offering_launch_date < offering_registration_deadline),
CHECK(offering_seating_capacity >= offering_num_target_registration),
CHECK(offering_num_target_registration >= 0),
CHECK(offering_fees >= 0),
CHECK(offering_start_date >= offering_registration_deadline + INTEGER '10'),
PRIMARY KEY(offering_launch_date, course_id),
FOREIGN KEY(course_id) REFERENCES Courses ON DELETE CASCADE,
FOREIGN KEY(admin_id) REFERENCES Administrators ON UPDATE CASCADE
);
|
DROP TABLE IF EXISTS `Employee`;
CREATE TABLE `Employee` (
`employeeId` int(6) NOT NULL,
`employeeFirstName` varchar (20) NOT NULL,
`employeeLastName` varchar (20) NOT NULL,
`employeeEmail` varchar (20) NOT NULL,
`employeePhone` varchar (10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
INSERT INTO Employee (employeeId,employeeFirstName,employeeLastName,employeeEmail,employeePhone)
VALUES (1,'Adarsh','kumar','adarsh@kumar','99999999')
, (2,'Amit','kumar','amit@kumar','888888888')
, (3,'Radha','Singh','radha@singh','7777777'); |
CREATE SCHEMA report;
CREATE EXTENSION dblink;
CREATE TABLE report.purchase (
id int,
order_date timestamp,
order_status varchar(20),
customer_id int,
product varchar(50),
quantity int,
total_price int
);
COPY report.purchase(id,order_date,order_status,customer_id,product,quantity,total_price)
FROM '/input_data/dummydata.csv' DELIMITER ',' CSV HEADER;
|
/**
*
* @manual
* @author Alexey
* @name set_service_in_flat
* @public
* @rolesAllowed admin operator buh
*/
update lc_flat_services
set services_id = :new_Service
Where :flatid = lc_id
and :service_id = services_id |
-- set search_path=phalconphpschema;
-- delete from core_plugin_param_value where fkplugin in (select id from core_plugin where mykatastima='krestena' and pluginname='datatablesv11010_inner_home_erp_paralaves');
INSERT INTO core_plugin_param_value(
mykatastima,fkplugin, paramname, paramvalue)
VALUES
('krestena',(select id from core_plugin where mykatastima='krestena' and pluginname='datatablesv11010_inner_home_erp_paralaves'),
'trans_table_title','Paralaves'
),
('krestena',(select id from core_plugin where mykatastima='krestena' and pluginname='datatablesv11010_inner_home_erp_paralaves'),
'portlet_class','portlet box green portlet-fit portlet-datatable bordered'
),
('krestena',(select id from core_plugin where mykatastima='krestena' and pluginname='datatablesv11010_inner_home_erp_paralaves'),
'async_req_data_param+extrasearch',''
),
('krestena',(select id from core_plugin where mykatastima='krestena' and pluginname='datatablesv11010_inner_home_erp_paralaves'),
'async_req_data_param+col','3'
),
('krestena',(select id from core_plugin where mykatastima='krestena' and pluginname='datatablesv11010_inner_home_erp_paralaves'),
'async_req_data_param+sort','asc'
),
('krestena',(select id from core_plugin where mykatastima='krestena' and pluginname='datatablesv11010_inner_home_erp_paralaves'),
'async_req_data_param+pagelength','20'
),
('krestena',(select id from core_plugin where mykatastima='krestena' and pluginname='datatablesv11010_inner_home_erp_paralaves'),
'async_req_data_param+lengthmenukeys','10,20,50,100,150,250,500,-1'
),
('krestena',(select id from core_plugin where mykatastima='krestena' and pluginname='datatablesv11010_inner_home_erp_paralaves'),
'async_req_data_param+lengthmenuvalues','10,20,50,100,150,250,500,All'
),
('krestena',(select id from core_plugin where mykatastima='krestena' and pluginname='datatablesv11010_inner_home_erp_paralaves'),
'Actions_Tools+blshow','1'
),
('krestena',(select id from core_plugin where mykatastima='krestena' and pluginname='datatablesv11010_inner_home_erp_paralaves'),
'Button_New+blshow','1'
),
('krestena',(select id from core_plugin where mykatastima='krestena' and pluginname='datatablesv11010_inner_home_erp_paralaves'),
'Button_New+title','New Customer'
),
('krestena',(select id from core_plugin where mykatastima='krestena' and pluginname='datatablesv11010_inner_home_erp_paralaves'),
'Table_Cols+blshow','1'
),
('krestena',(select id from core_plugin where pluginname='datatablesv11010_inner_home_erp_paralaves'),
'cols+idseq','1'
),
-- ('krestena',(select id from core_plugin where pluginname='datatablesv11010_inner_home_erp_paralaves'),
-- 'cols+expandedit','1'
-- ),
('krestena',(select id from core_plugin where pluginname='datatablesv11010_inner_home_erp_paralaves'),
'translates+trans_successmessage','successmessage'
),
('krestena',(select id from core_plugin where pluginname='datatablesv11010_inner_home_erp_paralaves'),
'translates+trans_youhaverequestedtoview','youhaverequestedtoview'
),
('krestena',(select id from core_plugin where pluginname='datatablesv11010_inner_home_erp_paralaves'),
'translates+trans_recordsbutduethelimitationreturnedonly','recordsbutduethelimitationreturnedonly'
),
('krestena',(select id from core_plugin where pluginname='datatablesv11010_inner_home_erp_paralaves'),
'translates+trans_querytook','querytook'
),
('krestena',(select id from core_plugin where pluginname='datatablesv11010_inner_home_erp_paralaves'),
'datasource+readtblname','Vferpparalaveskrestenam'
),
('krestena',(select id from core_plugin where pluginname='datatablesv11010_inner_home_erp_paralaves'),
'datasource+writetblname','Coreerpitems'
),
('krestena',(select id from core_plugin where pluginname='datatablesv11010_inner_home_erp_paralaves'),
'datasource+readpk','fkcoreerpitemsid'
),
('krestena',(select id from core_plugin where pluginname='datatablesv11010_inner_home_erp_paralaves'),
'datasource+writepk','id'
),
('krestena',(select id from core_plugin where pluginname='datatablesv11010_inner_home_erp_paralaves'),
'datasource+extrasearch+fklng+value','current'
),
('krestena',(select id from core_plugin where pluginname='datatablesv11010_inner_home_erp_paralaves'),
'datasource+extrasearch+fklng+searchmethod','Exact'
),
('krestena',(select id from core_plugin where mykatastima='krestena' and pluginname='datatablesv11010_inner_home_erp_paralaves'),
'cols+myyear+heading+trans_title','Year'
),
('krestena',(select id from core_plugin where mykatastima='krestena' and pluginname='datatablesv11010_inner_home_erp_paralaves'),
'cols+myyear+heading+width','5%'
),
('krestena',(select id from core_plugin where mykatastima='krestena' and pluginname='datatablesv11010_inner_home_erp_paralaves'),
'cols+myyear+heading+sortable','true'
),
('krestena',(select id from core_plugin where mykatastima='krestena' and pluginname='datatablesv11010_inner_home_erp_paralaves'),
'cols+myyear+filter+type','input'
),
('krestena',(select id from core_plugin where mykatastima='krestena' and pluginname='datatablesv11010_inner_home_erp_paralaves'),
'cols+myyear+filter+searchmethod','Like'
)
,
('krestena',(select id from core_plugin where mykatastima='krestena' and pluginname='datatablesv11010_inner_home_erp_paralaves'),
'cols+myyear+cells+class','hleft'
),
('krestena',(select id from core_plugin where mykatastima='krestena' and pluginname='datatablesv11010_inner_home_erp_paralaves'),
'cols+mydateparalavis+heading+trans_title','mydateparalavis'
),
('krestena',(select id from core_plugin where mykatastima='krestena' and pluginname='datatablesv11010_inner_home_erp_paralaves'),
'cols+mydateparalavis+heading+width','5%'
),
('krestena',(select id from core_plugin where mykatastima='krestena' and pluginname='datatablesv11010_inner_home_erp_paralaves'),
'cols+mydateparalavis+heading+sortable','true'
),
('krestena',(select id from core_plugin where mykatastima='krestena' and pluginname='datatablesv11010_inner_home_erp_paralaves'),
'cols+mydateparalavis+filter+type','input'
),
('krestena',(select id from core_plugin where mykatastima='krestena' and pluginname='datatablesv11010_inner_home_erp_paralaves'),
'cols+mydateparalavis+filter+searchmethod','Like'
)
,
('krestena',(select id from core_plugin where mykatastima='krestena' and pluginname='datatablesv11010_inner_home_erp_paralaves'),
'cols+mydateparalavis+cells+class','hleft'
),
('krestena',(select id from core_plugin where mykatastima='krestena' and pluginname='datatablesv11010_inner_home_erp_paralaves'),
'cols+mymasteritem+heading+trans_title','MasterItem'
),
('krestena',(select id from core_plugin where mykatastima='krestena' and pluginname='datatablesv11010_inner_home_erp_paralaves'),
'cols+mymasteritem+heading+width','5%'
),
('krestena',(select id from core_plugin where mykatastima='krestena' and pluginname='datatablesv11010_inner_home_erp_paralaves'),
'cols+mymasteritem+heading+sortable','true'
),
('krestena',(select id from core_plugin where mykatastima='krestena' and pluginname='datatablesv11010_inner_home_erp_paralaves'),
'cols+mymasteritem+filter+type','input'
),
('krestena',(select id from core_plugin where mykatastima='krestena' and pluginname='datatablesv11010_inner_home_erp_paralaves'),
'cols+mymasteritem+filter+searchmethod','Like'
)
,
('krestena',(select id from core_plugin where mykatastima='krestena' and pluginname='datatablesv11010_inner_home_erp_paralaves'),
'cols+mymasteritem+cells+class','hleft'
),
('krestena',(select id from core_plugin where mykatastima='krestena' and pluginname='datatablesv11010_inner_home_erp_paralaves'),
'cols+mybarcodes+heading+trans_title','Barcode'
),
('krestena',(select id from core_plugin where mykatastima='krestena' and pluginname='datatablesv11010_inner_home_erp_paralaves'),
'cols+mybarcodes+heading+width','5%'
),
('krestena',(select id from core_plugin where mykatastima='krestena' and pluginname='datatablesv11010_inner_home_erp_paralaves'),
'cols+mybarcodes+heading+sortable','true'
),
('krestena',(select id from core_plugin where mykatastima='krestena' and pluginname='datatablesv11010_inner_home_erp_paralaves'),
'cols+mybarcodes+filter+type','input'
),
('krestena',(select id from core_plugin where mykatastima='krestena' and pluginname='datatablesv11010_inner_home_erp_paralaves'),
'cols+mybarcodes+filter+searchmethod','Like'
)
,
('krestena',(select id from core_plugin where mykatastima='krestena' and pluginname='datatablesv11010_inner_home_erp_paralaves'),
'cols+mybarcodes+cells+class','hleft'
),
('krestena',(select id from core_plugin where mykatastima='krestena' and pluginname='datatablesv11010_inner_home_erp_paralaves'),
'cols+mydescription+heading+trans_title','Description'
),
('krestena',(select id from core_plugin where mykatastima='krestena' and pluginname='datatablesv11010_inner_home_erp_paralaves'),
'cols+mydescription+heading+width','5%'
),
('krestena',(select id from core_plugin where mykatastima='krestena' and pluginname='datatablesv11010_inner_home_erp_paralaves'),
'cols+mydescription+heading+sortable','true'
),
('krestena',(select id from core_plugin where mykatastima='krestena' and pluginname='datatablesv11010_inner_home_erp_paralaves'),
'cols+mydescription+filter+type','input'
),
('krestena',(select id from core_plugin where mykatastima='krestena' and pluginname='datatablesv11010_inner_home_erp_paralaves'),
'cols+mydescription+filter+searchmethod','Like'
)
,
('krestena',(select id from core_plugin where mykatastima='krestena' and pluginname='datatablesv11010_inner_home_erp_paralaves'),
'cols+mydescription+cells+class','hleft'
),
('krestena',(select id from core_plugin where mykatastima='krestena' and pluginname='datatablesv11010_inner_home_erp_paralaves'),
'cols+mydocumenttype+heading+trans_title','ppmydoctype'
),
('krestena',(select id from core_plugin where mykatastima='krestena' and pluginname='datatablesv11010_inner_home_erp_paralaves'),
'cols+mydocumenttype+heading+width','5%'
),
('krestena',(select id from core_plugin where mykatastima='krestena' and pluginname='datatablesv11010_inner_home_erp_paralaves'),
'cols+mydocumenttype+heading+sortable','true'
),
('krestena',(select id from core_plugin where mykatastima='krestena' and pluginname='datatablesv11010_inner_home_erp_paralaves'),
'cols+mydocumenttype+filter+type','input'
),
('krestena',(select id from core_plugin where mykatastima='krestena' and pluginname='datatablesv11010_inner_home_erp_paralaves'),
'cols+mydocumenttype+filter+searchmethod','Like'
)
,
('krestena',(select id from core_plugin where mykatastima='krestena' and pluginname='datatablesv11010_inner_home_erp_paralaves'),
'cols+mydocumenttype+cells+class','hleft'
),
('krestena',(select id from core_plugin where mykatastima='krestena' and pluginname='datatablesv11010_inner_home_erp_paralaves'),
'cols+titlemydocumenttype+heading+trans_title','pptitlemydoctype'
),
('krestena',(select id from core_plugin where mykatastima='krestena' and pluginname='datatablesv11010_inner_home_erp_paralaves'),
'cols+titlemydocumenttype+heading+width','5%'
),
('krestena',(select id from core_plugin where mykatastima='krestena' and pluginname='datatablesv11010_inner_home_erp_paralaves'),
'cols+titlemydocumenttype+heading+sortable','true'
),
('krestena',(select id from core_plugin where mykatastima='krestena' and pluginname='datatablesv11010_inner_home_erp_paralaves'),
'cols+titlemydocumenttype+filter+type','input'
),
('krestena',(select id from core_plugin where mykatastima='krestena' and pluginname='datatablesv11010_inner_home_erp_paralaves'),
'cols+titlemydocumenttype+filter+searchmethod','Like'
)
,
('krestena',(select id from core_plugin where mykatastima='krestena' and pluginname='datatablesv11010_inner_home_erp_paralaves'),
'cols+titlemydocumenttype+cells+class','hleft'
),
('krestena',(select id from core_plugin where mykatastima='krestena' and pluginname='datatablesv11010_inner_home_erp_paralaves'),
'cols+mydocumentnumber+heading+trans_title','ppmydocnum'
),
('krestena',(select id from core_plugin where mykatastima='krestena' and pluginname='datatablesv11010_inner_home_erp_paralaves'),
'cols+mydocumentnumber+heading+width','5%'
),
('krestena',(select id from core_plugin where mykatastima='krestena' and pluginname='datatablesv11010_inner_home_erp_paralaves'),
'cols+mydocumentnumber+heading+sortable','true'
),
('krestena',(select id from core_plugin where mykatastima='krestena' and pluginname='datatablesv11010_inner_home_erp_paralaves'),
'cols+mydocumentnumber+filter+type','input'
),
('krestena',(select id from core_plugin where mykatastima='krestena' and pluginname='datatablesv11010_inner_home_erp_paralaves'),
'cols+mydocumentnumber+filter+searchmethod','Like'
)
,
('krestena',(select id from core_plugin where mykatastima='krestena' and pluginname='datatablesv11010_inner_home_erp_paralaves'),
'cols+mydocumentnumber+cells+class','hleft'
),
('krestena',(select id from core_plugin where mykatastima='krestena' and pluginname='datatablesv11010_inner_home_erp_paralaves'),
'cols+myrefnumber+heading+trans_title','ppmyrefnumber'
),
('krestena',(select id from core_plugin where mykatastima='krestena' and pluginname='datatablesv11010_inner_home_erp_paralaves'),
'cols+myrefnumber+heading+width','5%'
),
('krestena',(select id from core_plugin where mykatastima='krestena' and pluginname='datatablesv11010_inner_home_erp_paralaves'),
'cols+myrefnumber+heading+sortable','true'
),
('krestena',(select id from core_plugin where mykatastima='krestena' and pluginname='datatablesv11010_inner_home_erp_paralaves'),
'cols+myrefnumber+filter+type','input'
),
('krestena',(select id from core_plugin where mykatastima='krestena' and pluginname='datatablesv11010_inner_home_erp_paralaves'),
'cols+myrefnumber+filter+searchmethod','Like'
)
,
('krestena',(select id from core_plugin where mykatastima='krestena' and pluginname='datatablesv11010_inner_home_erp_paralaves'),
'cols+myrefnumber+cells+class','hleft'
),
('krestena',(select id from core_plugin where mykatastima='krestena' and pluginname='datatablesv11010_inner_home_erp_paralaves'),
'cols+myvatcode+heading+trans_title','CategoryFpa'
),
('krestena',(select id from core_plugin where mykatastima='krestena' and pluginname='datatablesv11010_inner_home_erp_paralaves'),
'cols+myvatcode+heading+width','1%'
),
('krestena',(select id from core_plugin where mykatastima='krestena' and pluginname='datatablesv11010_inner_home_erp_paralaves'),
'cols+myvatcode+heading+sortable','true'
),
('krestena',(select id from core_plugin where mykatastima='krestena' and pluginname='datatablesv11010_inner_home_erp_paralaves'),
'cols+myvatcode+filter+type','select'
),
('krestena',(select id from core_plugin where mykatastima='krestena' and pluginname='datatablesv11010_inner_home_erp_paralaves'),
'cols+myvatcode+filter+searchmethod','Exact'
),
('krestena',(select id from core_plugin where mykatastima='krestena' and pluginname='datatablesv11010_inner_home_erp_paralaves'),
'cols+myvatcode+filter+searchkey','myvatcode'
),
('krestena',(select id from core_plugin where mykatastima='krestena' and pluginname='datatablesv11010_inner_home_erp_paralaves'),
'cols+myvatcode+filter+values+datasource+tblname','vferplmyvatcodekrestenam'
),
('krestena',(select id from core_plugin where mykatastima='krestena' and pluginname='datatablesv11010_inner_home_erp_paralaves'),
'cols+myvatcode+filter+values+datasource+kind','production'
),
('krestena',(select id from core_plugin where mykatastima='krestena' and pluginname='datatablesv11010_inner_home_erp_paralaves'),
'cols+myvatcode+filter+values+datasource+keyval','myvatcode'
),
('krestena',(select id from core_plugin where mykatastima='krestena' and pluginname='datatablesv11010_inner_home_erp_paralaves'),
'cols+myvatcode+filter+values+datasource+showval','myvatcode'
),
('krestena',(select id from core_plugin where mykatastima='krestena' and pluginname='datatablesv11010_inner_home_erp_paralaves'),
'cols+myvatcode+filter+values+datasource+params+fklng','current'
),
('krestena',(select id from core_plugin where mykatastima='krestena' and pluginname='datatablesv11010_inner_home_erp_paralaves'),
'cols+myvatcode+filter+values+datasource+params+mykatastima','krestena'
),
('krestena',(select id from core_plugin where mykatastima='krestena' and pluginname='datatablesv11010_inner_home_erp_paralaves'),
'cols+myvatcode+filter+values+datasource+params+bldeleted','0'
),
('krestena',(select id from core_plugin where mykatastima='krestena' and pluginname='datatablesv11010_inner_home_erp_paralaves'),
'cols+myvatcode+filter+values+datasource+params+blpublished','1'
),
('krestena',(select id from core_plugin where mykatastima='krestena' and pluginname='datatablesv11010_inner_home_erp_paralaves'),
'cols+myvatcode+filter+values+datasource+params+bldisabled','0'
),
('krestena',(select id from core_plugin where mykatastima='krestena' and pluginname='datatablesv11010_inner_home_erp_paralaves'),
'cols+myvatcode+cells+class','hleft'
),
('krestena',(select id from core_plugin where mykatastima='krestena' and pluginname='datatablesv11010_inner_home_erp_paralaves'),
'cols+myunitofmeasure+heading+trans_title','MonadaPolisis'
),
('krestena',(select id from core_plugin where mykatastima='krestena' and pluginname='datatablesv11010_inner_home_erp_paralaves'),
'cols+myunitofmeasure+heading+width','1%'
),
('krestena',(select id from core_plugin where mykatastima='krestena' and pluginname='datatablesv11010_inner_home_erp_paralaves'),
'cols+myunitofmeasure+heading+sortable','true'
),
('krestena',(select id from core_plugin where mykatastima='krestena' and pluginname='datatablesv11010_inner_home_erp_paralaves'),
'cols+myunitofmeasure+filter+type','select'
),
('krestena',(select id from core_plugin where mykatastima='krestena' and pluginname='datatablesv11010_inner_home_erp_paralaves'),
'cols+myunitofmeasure+filter+searchmethod','Exact'
),
('krestena',(select id from core_plugin where mykatastima='krestena' and pluginname='datatablesv11010_inner_home_erp_paralaves'),
'cols+myunitofmeasure+filter+searchkey','myunitofmeasure'
),
('krestena',(select id from core_plugin where mykatastima='krestena' and pluginname='datatablesv11010_inner_home_erp_paralaves'),
'cols+myunitofmeasure+filter+values+datasource+tblname','vferplmyunitofmeasurekrestenam'
),
('krestena',(select id from core_plugin where mykatastima='krestena' and pluginname='datatablesv11010_inner_home_erp_paralaves'),
'cols+myunitofmeasure+filter+values+datasource+kind','production'
),
('krestena',(select id from core_plugin where mykatastima='krestena' and pluginname='datatablesv11010_inner_home_erp_paralaves'),
'cols+myunitofmeasure+filter+values+datasource+keyval','myunitofmeasure'
),
('krestena',(select id from core_plugin where mykatastima='krestena' and pluginname='datatablesv11010_inner_home_erp_paralaves'),
'cols+myunitofmeasure+filter+values+datasource+showval','myunitofmeasure'
),
('krestena',(select id from core_plugin where mykatastima='krestena' and pluginname='datatablesv11010_inner_home_erp_paralaves'),
'cols+myunitofmeasure+filter+values+datasource+params+fklng','current'
),
('krestena',(select id from core_plugin where mykatastima='krestena' and pluginname='datatablesv11010_inner_home_erp_paralaves'),
'cols+myunitofmeasure+filter+values+datasource+params+bldeleted','0'
),
('krestena',(select id from core_plugin where mykatastima='krestena' and pluginname='datatablesv11010_inner_home_erp_paralaves'),
'cols+myunitofmeasure+filter+values+datasource+params+blpublished','1'
),
('krestena',(select id from core_plugin where mykatastima='krestena' and pluginname='datatablesv11010_inner_home_erp_paralaves'),
'cols+myunitofmeasure+filter+values+datasource+params+bldisabled','0'
),
('krestena',(select id from core_plugin where mykatastima='krestena' and pluginname='datatablesv11010_inner_home_erp_paralaves'),
'cols+myunitofmeasure+cells+class','hleft'
),
('krestena',(select id from core_plugin where mykatastima='krestena' and pluginname='datatablesv11010_inner_home_erp_paralaves'),
'cols+myinvoiceqty+heading+trans_title','myinvoiceqty'
),
('krestena',(select id from core_plugin where mykatastima='krestena' and pluginname='datatablesv11010_inner_home_erp_paralaves'),
'cols+myinvoiceqty+heading+width','5%'
),
('krestena',(select id from core_plugin where mykatastima='krestena' and pluginname='datatablesv11010_inner_home_erp_paralaves'),
'cols+myinvoiceqty+heading+sortable','true'
),
('krestena',(select id from core_plugin where mykatastima='krestena' and pluginname='datatablesv11010_inner_home_erp_paralaves'),
'cols+myinvoiceqty+filter+type','input'
),
('krestena',(select id from core_plugin where mykatastima='krestena' and pluginname='datatablesv11010_inner_home_erp_paralaves'),
'cols+myinvoiceqty+filter+searchmethod','Like'
),
('krestena',(select id from core_plugin where mykatastima='krestena' and pluginname='datatablesv11010_inner_home_erp_paralaves'),
'cols+myinvoiceqty+cells+class','hleft'
),
('krestena',(select id from core_plugin where mykatastima='krestena' and pluginname='datatablesv11010_inner_home_erp_paralaves'),
'cols+myinvoiceqty+group','sum'
),
('krestena',(select id from core_plugin where mykatastima='krestena' and pluginname='datatablesv11010_inner_home_erp_paralaves'),
'cols+mynetvalue+heading+trans_title','TimiPolisis'
),
('krestena',(select id from core_plugin where mykatastima='krestena' and pluginname='datatablesv11010_inner_home_erp_paralaves'),
'cols+mynetvalue+heading+width','5%'
),
('krestena',(select id from core_plugin where mykatastima='krestena' and pluginname='datatablesv11010_inner_home_erp_paralaves'),
'cols+mynetvalue+heading+sortable','true'
),
('krestena',(select id from core_plugin where mykatastima='krestena' and pluginname='datatablesv11010_inner_home_erp_paralaves'),
'cols+mynetvalue+filter+type','input'
),
('krestena',(select id from core_plugin where mykatastima='krestena' and pluginname='datatablesv11010_inner_home_erp_paralaves'),
'cols+mynetvalue+filter+searchmethod','Like'
)
,
('krestena',(select id from core_plugin where mykatastima='krestena' and pluginname='datatablesv11010_inner_home_erp_paralaves'),
'cols+mynetvalue+cells+class','hleft'
),
('krestena',(select id from core_plugin where mykatastima='krestena' and pluginname='datatablesv11010_inner_home_erp_paralaves'),
'cols+mynetvalue+group','sum'
),
('krestena',(select id from core_plugin where mykatastima='krestena' and pluginname='datatablesv11010_inner_home_erp_paralaves'),
'cols+myvatvalue+heading+trans_title','vatvalue'
),
('krestena',(select id from core_plugin where mykatastima='krestena' and pluginname='datatablesv11010_inner_home_erp_paralaves'),
'cols+myvatvalue+heading+width','5%'
),
('krestena',(select id from core_plugin where mykatastima='krestena' and pluginname='datatablesv11010_inner_home_erp_paralaves'),
'cols+myvatvalue+heading+sortable','true'
),
('krestena',(select id from core_plugin where mykatastima='krestena' and pluginname='datatablesv11010_inner_home_erp_paralaves'),
'cols+myvatvalue+filter+type','input'
),
('krestena',(select id from core_plugin where mykatastima='krestena' and pluginname='datatablesv11010_inner_home_erp_paralaves'),
'cols+myvatvalue+filter+searchmethod','Like'
)
,
('krestena',(select id from core_plugin where mykatastima='krestena' and pluginname='datatablesv11010_inner_home_erp_paralaves'),
'cols+myvatvalue+cells+class','hleft'
);
select mvupdatedependends((select schemaname from aab2badmin_basesettings),'core_plugin_param_value'); |
insert into todos.Todo (id, name, description, priority, status) values
(1, 'todo1', 'fancy todo', 0, 0),
(2, 'todo2', 'fancy todo', 2, 1),
(3, 'todo3', 'todo', 2, 0),
(4, 'todo4', 'to fancy do', 2, 0) |
INSERT INTO tipo_item VALUES (1,'Espada');
INSERT INTO tipo_item VALUES (2,'Clava');
INSERT INTO tipo_item VALUES (3,'Bastão');
INSERT INTO tipo_item VALUES (4,'Arco');
INSERT INTO tipo_item VALUES (5,'Balestra');
INSERT INTO tipo_item VALUES (6,'Lança');
INSERT INTO tipo_item VALUES (7,'Espada Longa');
INSERT INTO tipo_item VALUES (8,'Escudo');
INSERT INTO tipo_item VALUES (9,'Chave');
INSERT INTO tipo_item VALUES (10,'Consumível');
INSERT INTO tipo_habilidade VALUES (1,'Dano em área');
INSERT INTO tipo_habilidade VALUES (2,'Cura');
INSERT INTO tipo_habilidade VALUES (3,'Maldição');
INSERT INTO tipo_habilidade VALUES (4,'Cura em área');
INSERT INTO tipo_habilidade VALUES (5,'Física');
INSERT INTO tipo_habilidade VALUES (6,'Mágica');
INSERT INTO tipo_habilidade VALUES (7,'Ativo');
INSERT INTO tipo_habilidade VALUES (8,'Passivo');
INSERT INTO tipo_habilidade VALUES (9,'Invocação');
INSERT INTO tipo_habilidade VALUES (10,'Ressureição');
INSERT INTO tipo_quest VALUES (1,'Tarefa diaria');
INSERT INTO tipo_quest VALUES (2,'Quest Experiencia');
INSERT INTO tipo_quest VALUES (3,'Quest Item');
INSERT INTO tipo_quest VALUES (4,'Quest Especial');
INSERT INTO tipo_quest VALUES (5,'Quest Evento');
INSERT INTO tipo_quest VALUES (6,'Quest Semanal');
INSERT INTO tipo_quest VALUES (7,'Quest Tutorial');
INSERT INTO tipo_quest VALUES (8,'Quest Mensal');
INSERT INTO tipo_quest VALUES (9,'Quest Anual');
INSERT INTO tipo_quest VALUES (10,'Quest Habilidade');
INSERT INTO tipo_personagem VALUES (1,'Jogador');
INSERT INTO tipo_personagem VALUES (2,'NPC Neutro');
INSERT INTO tipo_personagem VALUES (3,'Monstro Neutro');
INSERT INTO tipo_personagem VALUES (4,'Animal');
INSERT INTO tipo_personagem VALUES (5,'NPC Aliado');
INSERT INTO tipo_personagem VALUES (6,'Monstro Aliado');
INSERT INTO tipo_personagem VALUES (7,'Monstro Inimigo');
INSERT INTO tipo_personagem VALUES (8,'NPC Inimigo');
INSERT INTO tipo_personagem VALUES (9,'Montaria');
INSERT INTO usuario VALUES (1,'Marcao','1234','Marcos','14/10/1993','marcos@marcos.com','Nome mãe','Vanessa','27/06/2018','',1);
INSERT INTO usuario VALUES (2,'Diegao','4321','Diego','09/09/1993','diego@diego.com','Nome cachorro','Rex','27/06/2018','',1);
INSERT INTO usuario VALUES (3,'Rodolfao','5678','Rodolfo','12/12/1992','rodolfo@rodolfo.com','Profissão','Programador','27/06/2018','',1);
INSERT INTO usuario VALUES (4,'Marquinhos','1234','Marcos D','12/10/1993','marcosd@marcos.com','Nome mãe','Maria','27/06/2018','',1);
INSERT INTO usuario VALUES (5,'Dieguinho','4321','Diego D','19/09/1993','diegod@diego.com','Nome cachorro','Rex','27/06/2018','',1);
INSERT INTO usuario VALUES (6,'Rodolfinho','5678','Rodolfo D','12/02/1999','rodolfod@rodolfo.com','Profissão','Professor','27/06/2018','',0);
INSERT INTO usuario VALUES (7,'Marcones','1234','Marcos M','14/10/1983','marcosm@marcos.com','Nome da vó','Vanessa','27/06/2018','',1);
INSERT INTO usuario VALUES (8,'Diegones','4321','Diego M','09/10/1993','diegom@diego.com','Nome gato','Rex','27/06/2018','',1);
INSERT INTO usuario VALUES (9,'Rodolfones','5678','Rodolfo M','22/12/1992','rodolfom@rodolfo.com','Profissão','Jogador de Tibia','27/06/2018','',1);
INSERT INTO usuario VALUES (10,'Madiro','5678','Rodolfo R','22/12/1997','rodolfor@rodolfo.com','Profissão','Programador','27/06/2018','',0);
INSERT INTO raca VALUES (1,'Humano','Raça fragil/sortuda',5,5,20,10,10,10,10,50,1);
INSERT INTO raca VALUES (2,'Orc','Raça resistente/lenta',20,5,3,15,5,3,3,10,1);
INSERT INTO raca VALUES (3,'Elfo','Raça inteligente/agil',12,12,7,10,30,20,30,10,1);
INSERT INTO raca VALUES (4,'Humano da Serra','Raça fragil/sortuda',5,5,20,10,10,10,10,50,1);
INSERT INTO raca VALUES (5,'Anão','Raça resistente/agil',20,5,3,15,5,3,3,10,1);
INSERT INTO raca VALUES (6,'Elfo da Neve','Raça inteligente/lenta',12,12,7,10,30,20,30,10,1);
INSERT INTO raca VALUES (7,'Elfo da Floresta','Raça forte/sortuda',5,5,20,10,10,10,10,50,1);
INSERT INTO raca VALUES (8,'Orc da Praia','Raça inteligente/lenta',20,5,3,15,5,3,3,10,1);
INSERT INTO raca VALUES (9,'Elfo do Deserto','Raça inteligente/agil',12,12,7,10,30,20,30,10,1);
INSERT INTO raca VALUES (10,'Humano da Favela','Raça inteligente/agil',12,12,7,10,30,20,30,10,1);
INSERT INTO classe VALUES (1,2,7,7,10,10,'Guerreiro','Classe guerreiro/Melee',15,1);
INSERT INTO classe VALUES (2,3,5,5,15,15,'Paladino','Classe Paladino/Ranged',10,1);
INSERT INTO classe VALUES (3,1,3,20,7,7,'Mago','Classe Mago/Ranged',15,1);
INSERT INTO classe VALUES (4,2,7,7,10,10,'Assassino','Classe Assassino/Melee',15,1);
INSERT INTO classe VALUES (5,6,5,5,15,15,'Lanceiro','Classe Lanceiro/Melee',10,1);
INSERT INTO classe VALUES (6,6,3,20,7,7,'Clérigo','Classe Clérigo/Ranged',1,1);
INSERT INTO classe VALUES (7,7,7,7,10,10,'Bardo','Classe Bardo/Melee',15,1);
INSERT INTO classe VALUES (8,8,5,5,15,15,'Ladrão','Classe Ladrão/Melee',1,1);
INSERT INTO classe VALUES (9,9,3,20,7,7,'Mago Negro','Classe Mago Negro/Ranged',15,1);
INSERT INTO classe VALUES (10,9,3,20,7,7,'Noviço','Classe Noviço/Ranged',15,1);
INSERT INTO habilidade VALUES (1,3,2,1,10,50,15,20,1,'Exori','Dano fisico');
INSERT INTO habilidade VALUES (2,1,3,2,15,30,20,15,1,'Exevo','Dano mistico');
INSERT INTO habilidade VALUES (3,2,1,3,70,40,25,45,1,'exura','Cura');
INSERT INTO habilidade VALUES (4,3,2,1,10,50,15,20,1,'Utevo','Dano mágico');
INSERT INTO habilidade VALUES (5,1,3,2,15,30,20,15,1,'Utevo Lux','Cria luz');
INSERT INTO habilidade VALUES (6,2,1,3,70,40,25,45,1,'Utani','Aumenta Vida');
INSERT INTO habilidade VALUES (7,3,2,1,10,50,15,20,1,'Utani Hur','Aumenta Stamina');
INSERT INTO habilidade VALUES (8,1,3,2,15,30,20,15,1,'Utani Gran Hur','Diminui Agilidade');
INSERT INTO habilidade VALUES (9,2,1,3,70,40,25,45,1,'Exevo Gran','Roubo de Vida');
INSERT INTO habilidade VALUES (10,2,1,3,70,40,25,45,1,'Exeta','Atira Fogo');
INSERT INTO personagem VALUES (1,2,1,'Diegao','M','27/06/2018',500,1,200,100,150,300,'',2,1);
INSERT INTO personagem VALUES (2,1,2,'Marcao','M','27/06/2018',500,1,200,100,150,300,'',3,2);
INSERT INTO personagem VALUES (3,3,3,'Rodolfao','M','27/06/2018',500,1,200,100,150,300,'',1,3);
INSERT INTO personagem VALUES (4,4,4,'Rashid','M','27/06/2018',500,1,200,100,150,300,'',2,1);
INSERT INTO personagem VALUES (5,4,5,'Caudados','F','27/06/2018',500,1,200,100,150,300,'',3,2);
INSERT INTO personagem VALUES (6,6,6,'Demonho','M','27/06/2018',500,1,200,100,150,300,'',1,4);
INSERT INTO personagem VALUES (7,7,8,'Pirata','M','27/06/2018',500,1,200,100,150,300,'',2,4);
INSERT INTO personagem VALUES (8,8,9,'Monk','F','27/06/2018',500,1,200,100,150,300,'',3,5);
INSERT INTO personagem VALUES (9,2,2,'Minotauro','M','27/06/2018',500,1,200,100,150,300,'',1,6);
INSERT INTO personagem VALUES (10,5,3,'Djinn','M','27/06/2018',500,1,200,100,150,300,'',1,10);
INSERT INTO Quest VALUES (1,2,1,'Quest do dragao','Quest media',300,50,1,35,'','27/07/2018');
INSERT INTO Quest VALUES (2,1,3,'Quest dos elfos','Quest dificil',300,50,1,35,'','12/07/2018');
INSERT INTO Quest VALUES (3,3,2,'Quest dos orcs','Quest facil',300,50,1,35,'','09/09/2018');
INSERT INTO Quest VALUES (4,2,1,'Quest do humano','Quest media',100,50,1,35,'','');
INSERT INTO Quest VALUES (5,1,3,'Quest da Praia','Quest dificil',200,50,1,35,'','');
INSERT INTO Quest VALUES (6,3,2,'Quest da Floresta','Quest facil',250,50,1,35,'','09/09/2018');
INSERT INTO Quest VALUES (7,2,1,'Quest da Batata','Quest media',400,50,1,35,'','');
INSERT INTO Quest VALUES (8,1,3,'Quest do Infinito','Quest dificil',500,50,1,35,'','12/07/2018');
INSERT INTO Quest VALUES (9,3,2,'Quest do Mago','Quest media',500,50,1,35,'','09/09/2018');
INSERT INTO Quest VALUES (10,3,2,'Quest do BOH','Quest dificil',500,50,1,35,'','09/09/2018');
INSERT INTO Item VALUES (1,2,1,3,1,'Espada trovao','Item herança',300,500,10,35,300,10);
INSERT INTO Item VALUES (2,1,3,2,3,'Bastão das eras','Item lendario',300,500,10,35,250,1);
INSERT INTO Item VALUES (3,3,2,1,2,'Clava de azazel','Item pesado',300,500,10,35,150,5);
INSERT INTO Item VALUES (4,4,'',3,1,'Carlin Sword','Item herança',300,500,10,35,450,15);
INSERT INTO Item VALUES (5,4,'',2,1,'Berserker','Item lendario',300,500,10,35,50,20);
INSERT INTO Item VALUES (6,5,2,1,1,'Dagger','Item pesado',300,500,10,35,950,10);
INSERT INTO Item VALUES (7,6,8,3,1,'Fire Sword','Item herança',300,500,10,35,650,10);
INSERT INTO Item VALUES (8,7,10,2,4,'Falcon Bow','Item lendario',300,500,10,35,550,1);
INSERT INTO Item VALUES (9,8,'',1,8,'Blessed Shield','Item pesado',300,500,10,35,250,10);
INSERT INTO Item VALUES (10,10,'',1,10,'Poçao','Item pesado',300,500,10,35,150,50);
|
-- Processors.States
MERGE Processors.States AS trg
USING
(
VALUES
(N'New')
,(N'Await')
,(N'InWork')
,(N'Done')
,(N'Error')
) AS src (Name)
ON trg.Name = src.Name
WHEN MATCHED THEN
UPDATE SET Name = src.Name
WHEN NOT MATCHED BY TARGET THEN
INSERT (Name)
VALUES (Name)
WHEN NOT MATCHED BY SOURCE THEN
DELETE
;
|
select * from payments order by amount desc limit 0,3;
select amount from payments o where 1 = (select count(*) from payments p where o.amount < p.amount); |
CREATE OR REPLACE PUBLIC SYNONYM work_claim_pkg FOR orient.work_claim_pkg; |
# renaming unclaimed_job_count to ready_job_count and adding semaphored_job_count:
ALTER TABLE analysis_stats CHANGE COLUMN unclaimed_job_count ready_job_count int(10) DEFAULT 0 NOT NULL;
ALTER TABLE analysis_stats_monitor CHANGE COLUMN unclaimed_job_count ready_job_count int(10) DEFAULT 0 NOT NULL;
ALTER TABLE analysis_stats ADD COLUMN semaphored_job_count int(10) DEFAULT 0 NOT NULL;
ALTER TABLE analysis_stats_monitor ADD COLUMN semaphored_job_count int(10) DEFAULT 0 NOT NULL;
|
INSERT INTO users (name,surname,password,username,description,secretquestion,secretanswer,registrationdate) VALUES('german','romarion','passpass1','gerchux','soy gerchux','quien soy?','gerchux reloaded','2013-07-17 00:00:00');
INSERT INTO users (name,surname,password,username,description,secretquestion,secretanswer,registrationdate) VALUES('florencia','besteiro','passpass2','florchax','soy florchax','quien soy?','florchax reloaded','2013-07-17 00:00:01');
INSERT INTO users (name,surname,password,username,description,secretquestion,secretanswer,registrationdate) VALUES('gabriel','zanzotti','passpass3','gabox','soy gabox','quien soy?','gabox reloaded','2013-07-17 00:00:02');
INSERT INTO comments (username,date,comment) VALUES('gerchux','2013-08-01 00:00:23','Este comment no tiene hashtags');
INSERT INTO comments (username,date,comment) VALUES('gerchux','2013-08-04 00:00:23','Este comment tiene 2 hashtags: #a y #b');
INSERT INTO comments (username,date,comment) VALUES('gerchux','2013-08-25 00:00:23','Este comment tiene 1 hashtag: #prueba');
INSERT INTO comments (username,date,comment) VALUES('florchax','2013-08-26 00:00:23','Este comment tiene 3 hashtags: #prueba, #c y #d');
INSERT INTO comments (username,date,comment) VALUES('florchax','2013-08-30 00:00:23','Este comment tiene 1 hashtag: #d');
INSERT INTO comments (username,date,comment) VALUES('florchax','2013-08-31 00:00:23','Este comment tiene 3 hashtags: #prueba,#e y #f');
INSERT INTO comments (username,date,comment) VALUES('gabox','2013-08-27 00:00:23','Este comment tiene 2 hashtags: #d y #f');
INSERT INTO comments (username,date,comment) VALUES('gabox','2013-09-17 00:00:23','Este comment tiene 3 hashtags: #prueba, #e y #g');
INSERT INTO comments (username,date,comment) VALUES('gerchux','2013-09-16 00:00:23','Este comment tiene 4 hashtags: #prueba,#d,#h e #i');
INSERT INTO comments (username,date,comment) VALUES('gerchux','2013-09-18 00:00:23','Este comment tiene 2 hashtags: #f y #g');
INSERT INTO comments (username,date,comment) VALUES('florchax','2013-09-18 00:10:23','Este comment tiene 3 hashtags: #prueba y #h');
INSERT INTO comments (username,date,comment) VALUES('florchax','2013-09-05 00:00:23','Este comment tiene 5 hashtags: #f, #j , #k, #l y #m');
INSERT INTO comments (username,date,comment) VALUES('gabox','2013-09-19 00:00:23','Este comment tiene 4 hashtags: #f, #d, #m y #g');
INSERT INTO hashtags (hashtag,creator,date) VALUES('a','gerchux','2013-08-04 00:00:23');
INSERT INTO hashtags (hashtag,creator,date) VALUES('b','gerchux','2013-08-04 00:00:23');
INSERT INTO hashtags (hashtag,creator,date) VALUES('prueba','gerchux','2013-08-25 00:00:23');
INSERT INTO hashtags (hashtag,creator,date) VALUES('c','florchax','2013-08-26 00:00:23');
INSERT INTO hashtags (hashtag,creator,date) VALUES('d','florchax','2013-08-26 00:00:23');
INSERT INTO hashtags (hashtag,creator,date) VALUES('e','florchax','2013-08-31 00:00:23');
INSERT INTO hashtags (hashtag,creator,date) VALUES('f','florchax','2013-08-31 00:00:23');
INSERT INTO hashtags (hashtag,creator,date) VALUES('g','gabox','2013-09-17 00:00:23');
INSERT INTO hashtags (hashtag,creator,date) VALUES('h','gerchux','2013-09-16 00:00:23');
INSERT INTO hashtags (hashtag,creator,date) VALUES('i','gerchux','2013-09-16 00:00:23');
INSERT INTO hashtags (hashtag,creator,date) VALUES('j','florchax','2013-09-05 00:00:23');
INSERT INTO hashtags (hashtag,creator,date) VALUES('k','florchax','2013-09-05 00:00:23');
INSERT INTO hashtags (hashtag,creator,date) VALUES('l','florchax','2013-09-05 00:00:23');
INSERT INTO hashtags (hashtag,creator,date) VALUES('m','florchax','2013-09-05 00:00:23');
commit;
INSERT INTO hashtagsincomments (commentid,hashtag) VALUES(2,'a');
INSERT INTO hashtagsincomments (commentid,hashtag) VALUES(2,'b');
INSERT INTO hashtagsincomments (commentid,hashtag) VALUES(3,'prueba');
INSERT INTO hashtagsincomments (commentid,hashtag) VALUES(4,'prueba');
INSERT INTO hashtagsincomments (commentid,hashtag) VALUES(4,'c');
INSERT INTO hashtagsincomments (commentid,hashtag) VALUES(4,'d');
INSERT INTO hashtagsincomments (commentid,hashtag) VALUES(5,'d');
INSERT INTO hashtagsincomments (commentid,hashtag) VALUES(6,'prueba');
INSERT INTO hashtagsincomments (commentid,hashtag) VALUES(6,'e');
INSERT INTO hashtagsincomments (commentid,hashtag) VALUES(6,'f');
INSERT INTO hashtagsincomments (commentid,hashtag) VALUES(7,'d');
INSERT INTO hashtagsincomments (commentid,hashtag) VALUES(7,'f');
INSERT INTO hashtagsincomments (commentid,hashtag) VALUES(8,'prueba');
INSERT INTO hashtagsincomments (commentid,hashtag) VALUES(8,'e');
INSERT INTO hashtagsincomments (commentid,hashtag) VALUES(8,'g');
INSERT INTO hashtagsincomments (commentid,hashtag) VALUES(9,'prueba');
INSERT INTO hashtagsincomments (commentid,hashtag) VALUES(9,'d');
INSERT INTO hashtagsincomments (commentid,hashtag) VALUES(9,'h');
INSERT INTO hashtagsincomments (commentid,hashtag) VALUES(9,'i');
INSERT INTO hashtagsincomments (commentid,hashtag) VALUES(10,'f');
INSERT INTO hashtagsincomments (commentid,hashtag) VALUES(10,'g');
INSERT INTO hashtagsincomments (commentid,hashtag) VALUES(11,'prueba');
INSERT INTO hashtagsincomments (commentid,hashtag) VALUES(11,'h');
INSERT INTO hashtagsincomments (commentid,hashtag) VALUES(12,'f');
INSERT INTO hashtagsincomments (commentid,hashtag) VALUES(12,'j');
INSERT INTO hashtagsincomments (commentid,hashtag) VALUES(12,'k');
INSERT INTO hashtagsincomments (commentid,hashtag) VALUES(12,'l');
INSERT INTO hashtagsincomments (commentid,hashtag) VALUES(12,'m');
INSERT INTO hashtagsincomments (commentid,hashtag) VALUES(13,'f');
INSERT INTO hashtagsincomments (commentid,hashtag) VALUES(13,'d');
INSERT INTO hashtagsincomments (commentid,hashtag) VALUES(13,'m');
INSERT INTO hashtagsincomments (commentid,hashtag) VALUES(13,'g'); |
/* Создание просмотра параметров представлений */
CREATE VIEW /*PREFIX*/S_PRESENTATION_PARAMS
AS
SELECT CP.*,
C.NAME AS COLUMN_NAME,
P.NAME AS PARAM_NAME,
P.PARAM_TYPE,
P.MAX_LENGTH,
C.PRESENTATION_ID,
C.NOT_EMPTY,
C.USE_DEPEND
FROM /*PREFIX*/COLUMN_PARAMS CP
JOIN /*PREFIX*/COLUMNS C ON C.COLUMN_ID=CP.COLUMN_ID
JOIN /*PREFIX*/PARAMS P ON P.PARAM_ID=CP.PARAM_ID
ORDER BY C.PRIORITY, CP.PRIORITY
--
|
CREATE TABLE person (
id serial,
email TEXT NOT NULL,
first_name TEXT NOT NULL,
last_name TEXT NOT NULL
);
INSERT INTO person(email, first_name, last_name) VALUES('jim@example.com', 'Jim', 'Brown');
INSERT INTO person(email, first_name, last_name) VALUES('carol@example.com', 'Carol', 'Smith');
INSERT INTO person(email, first_name, last_name) VALUES('sam@example.com', 'Sam', 'Smith');
|
UPDATE AD_Table SET EntityType='D' WHERE AD_Table_ID=53071;
UPDATE AD_Column SET EntityType='D' WHERE AD_Table_ID=53071;
|
/*
Navicat Premium Data Transfer
Source Server : ths
Source Server Type : MySQL
Source Server Version : 50562
Source Host : 49.234.17.206:3306
Source Schema : tcdb
Target Server Type : MySQL
Target Server Version : 50562
File Encoding : 65001
Date: 03/08/2021 22:30:57
*/
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for acl_permission
-- ----------------------------
DROP TABLE IF EXISTS `acl_permission`;
CREATE TABLE `acl_permission` (
`id` char(19) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '编号',
`pid` char(19) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '所属上级',
`name` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '名称',
`type` tinyint(3) NOT NULL DEFAULT 0 COMMENT '类型(1:菜单,2:按钮)',
`permission_value` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '权限值',
`path` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '访问路径',
`component` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '组件路径',
`icon` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '图标',
`status` tinyint(4) NULL DEFAULT NULL COMMENT '状态(0:禁止,1:正常)',
`is_deleted` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '逻辑删除 1(true)已删除, 0(false)未删除',
`gmt_create` datetime NULL DEFAULT NULL COMMENT '创建时间',
`gmt_modified` datetime NULL DEFAULT NULL COMMENT '更新时间',
PRIMARY KEY (`id`) USING BTREE,
INDEX `idx_pid`(`pid`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '权限' ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for acl_role
-- ----------------------------
DROP TABLE IF EXISTS `acl_role`;
CREATE TABLE `acl_role` (
`id` char(19) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '角色id',
`role_name` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '角色名称',
`role_code` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '角色编码',
`remark` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注',
`is_deleted` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '逻辑删除 1(true)已删除, 0(false)未删除',
`gmt_create` datetime NOT NULL COMMENT '创建时间',
`gmt_modified` datetime NOT NULL COMMENT '更新时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for acl_role_permission
-- ----------------------------
DROP TABLE IF EXISTS `acl_role_permission`;
CREATE TABLE `acl_role_permission` (
`id` char(19) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
`role_id` char(19) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
`permission_id` char(19) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
`is_deleted` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '逻辑删除 1(true)已删除, 0(false)未删除',
`gmt_create` datetime NOT NULL COMMENT '创建时间',
`gmt_modified` datetime NOT NULL COMMENT '更新时间',
PRIMARY KEY (`id`) USING BTREE,
INDEX `idx_role_id`(`role_id`) USING BTREE,
INDEX `idx_permission_id`(`permission_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '角色权限' ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for acl_user
-- ----------------------------
DROP TABLE IF EXISTS `acl_user`;
CREATE TABLE `acl_user` (
`id` char(19) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '会员id',
`username` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '微信openid',
`password` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '密码',
`nick_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '昵称',
`salt` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '用户头像',
`token` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '用户签名',
`is_deleted` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '逻辑删除 1(true)已删除, 0(false)未删除',
`gmt_create` datetime NOT NULL COMMENT '创建时间',
`gmt_modified` datetime NOT NULL COMMENT '更新时间',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `uk_username`(`username`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户表' ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for acl_user_role
-- ----------------------------
DROP TABLE IF EXISTS `acl_user_role`;
CREATE TABLE `acl_user_role` (
`id` char(19) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '主键id',
`role_id` char(19) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '0' COMMENT '角色id',
`user_id` char(19) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '0' COMMENT '用户id',
`is_deleted` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '逻辑删除 1(true)已删除, 0(false)未删除',
`gmt_create` datetime NOT NULL COMMENT '创建时间',
`gmt_modified` datetime NOT NULL COMMENT '更新时间',
PRIMARY KEY (`id`) USING BTREE,
INDEX `idx_role_id`(`role_id`) USING BTREE,
INDEX `idx_user_id`(`user_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for crm_banner
-- ----------------------------
DROP TABLE IF EXISTS `crm_banner`;
CREATE TABLE `crm_banner` (
`id` char(19) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT 'ID',
`title` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '标题',
`image_url` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '图片地址',
`link_url` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '链接地址',
`sort` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '排序',
`is_deleted` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '逻辑删除 1(true)已删除, 0(false)未删除',
`gmt_create` datetime NOT NULL COMMENT '创建时间',
`gmt_modified` datetime NOT NULL COMMENT '更新时间',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `uk_name`(`title`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '首页banner表' ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for edu_chapter
-- ----------------------------
DROP TABLE IF EXISTS `edu_chapter`;
CREATE TABLE `edu_chapter` (
`id` char(19) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '章节ID',
`course_id` char(19) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '课程ID',
`title` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '章节名称',
`sort` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '显示排序',
`gmt_create` datetime NOT NULL COMMENT '创建时间',
`gmt_modified` datetime NOT NULL COMMENT '更新时间',
PRIMARY KEY (`id`) USING BTREE,
INDEX `idx_course_id`(`course_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '课程' ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for edu_comment
-- ----------------------------
DROP TABLE IF EXISTS `edu_comment`;
CREATE TABLE `edu_comment` (
`id` char(19) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '讲师ID',
`course_id` varchar(19) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '课程id',
`teacher_id` char(19) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '讲师id',
`member_id` varchar(19) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '会员id',
`nickname` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '会员昵称',
`avatar` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '会员头像',
`content` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '评论内容',
`is_deleted` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '逻辑删除 1(true)已删除, 0(false)未删除',
`gmt_create` datetime NOT NULL COMMENT '创建时间',
`gmt_modified` datetime NOT NULL COMMENT '更新时间',
PRIMARY KEY (`id`) USING BTREE,
INDEX `idx_course_id`(`course_id`) USING BTREE,
INDEX `idx_teacher_id`(`teacher_id`) USING BTREE,
INDEX `idx_member_id`(`member_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '评论' ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for edu_course
-- ----------------------------
DROP TABLE IF EXISTS `edu_course`;
CREATE TABLE `edu_course` (
`id` char(19) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '课程ID',
`teacher_id` char(19) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '课程讲师ID',
`subject_id` char(19) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '课程专业ID',
`subject_parent_id` char(19) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '课程专业父级ID',
`title` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '课程标题',
`price` decimal(10, 2) UNSIGNED NOT NULL COMMENT '课程销售价格,设置为0则可免费观看',
`lesson_num` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '总课时',
`cover` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '课程封面图片路径',
`buy_count` bigint(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '销售数量',
`description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '课程简介',
`view_count` bigint(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '浏览数量',
`version` bigint(20) UNSIGNED NOT NULL DEFAULT 1 COMMENT '乐观锁',
`status` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'Draft' COMMENT '课程状态 Draft未发布 Normal已发布',
`is_deleted` tinyint(3) NULL DEFAULT NULL COMMENT '逻辑删除 1(true)已删除, 0(false)未删除',
`gmt_create` datetime NOT NULL COMMENT '创建时间',
`gmt_modified` datetime NOT NULL COMMENT '更新时间',
PRIMARY KEY (`id`) USING BTREE,
INDEX `idx_title`(`title`) USING BTREE,
INDEX `idx_subject_id`(`subject_id`) USING BTREE,
INDEX `idx_teacher_id`(`teacher_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '课程' ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for edu_course_collect
-- ----------------------------
DROP TABLE IF EXISTS `edu_course_collect`;
CREATE TABLE `edu_course_collect` (
`id` char(19) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '收藏ID',
`course_id` char(19) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '课程讲师ID',
`member_id` char(19) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '课程专业ID',
`is_deleted` tinyint(3) NOT NULL DEFAULT 0 COMMENT '逻辑删除 1(true)已删除, 0(false)未删除',
`gmt_create` datetime NOT NULL COMMENT '创建时间',
`gmt_modified` datetime NOT NULL COMMENT '更新时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '课程收藏' ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for edu_course_description
-- ----------------------------
DROP TABLE IF EXISTS `edu_course_description`;
CREATE TABLE `edu_course_description` (
`id` char(19) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '课程ID',
`description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '课程简介',
`gmt_create` datetime NOT NULL COMMENT '创建时间',
`gmt_modified` datetime NOT NULL COMMENT '更新时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '课程简介' ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for edu_subject
-- ----------------------------
DROP TABLE IF EXISTS `edu_subject`;
CREATE TABLE `edu_subject` (
`id` char(19) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '课程类别ID',
`title` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '类别名称',
`parent_id` char(19) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '0' COMMENT '父ID',
`sort` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '排序字段',
`gmt_create` datetime NOT NULL COMMENT '创建时间',
`gmt_modified` datetime NOT NULL COMMENT '更新时间',
PRIMARY KEY (`id`) USING BTREE,
INDEX `idx_parent_id`(`parent_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '课程科目' ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for edu_teacher
-- ----------------------------
DROP TABLE IF EXISTS `edu_teacher`;
CREATE TABLE `edu_teacher` (
`id` char(19) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '讲师ID',
`name` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '讲师姓名',
`intro` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '讲师简介',
`career` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '讲师资历,一句话说明讲师',
`level` int(10) UNSIGNED NULL DEFAULT NULL COMMENT '头衔 1高级讲师 2首席讲师',
`avatar` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'https://reurl.cc/mLAprV' COMMENT '讲师头像',
`sort` int(10) UNSIGNED NULL DEFAULT 0 COMMENT '排序',
`is_deleted` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '逻辑删除 1(true)已删除, 0(false)未删除',
`gmt_create` datetime NOT NULL COMMENT '创建时间',
`gmt_modified` datetime NOT NULL COMMENT '更新时间',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `uk_name`(`name`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '讲师' ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for edu_video
-- ----------------------------
DROP TABLE IF EXISTS `edu_video`;
CREATE TABLE `edu_video` (
`id` char(19) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '视频ID',
`course_id` char(19) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '课程ID',
`chapter_id` char(19) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '章节ID',
`title` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '节点名称',
`video_source_id` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '云端视频资源',
`video_original_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '原始文件名称',
`sort` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '排序字段',
`play_count` bigint(20) UNSIGNED NOT NULL DEFAULT 0 COMMENT '播放次数',
`is_free` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否可以试听:0收费 1免费',
`duration` float NOT NULL DEFAULT 0 COMMENT '视频时长(秒)',
`status` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'Empty' COMMENT 'Empty未上传 Transcoding转码中 Normal正常',
`size` bigint(20) UNSIGNED NOT NULL DEFAULT 0 COMMENT '视频源文件大小(字节)',
`version` bigint(20) UNSIGNED NOT NULL DEFAULT 1 COMMENT '乐观锁',
`gmt_create` datetime NOT NULL COMMENT '创建时间',
`gmt_modified` datetime NOT NULL COMMENT '更新时间',
PRIMARY KEY (`id`) USING BTREE,
INDEX `idx_course_id`(`course_id`) USING BTREE,
INDEX `idx_chapter_id`(`chapter_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '课程视频' ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for statistics_daily
-- ----------------------------
DROP TABLE IF EXISTS `statistics_daily`;
CREATE TABLE `statistics_daily` (
`id` char(19) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '主键',
`date_calculated` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '统计日期',
`register_num` int(11) NOT NULL DEFAULT 0 COMMENT '注册人数',
`login_num` int(11) NOT NULL DEFAULT 0 COMMENT '登录人数',
`video_view_num` int(11) NOT NULL DEFAULT 0 COMMENT '每日播放视频数',
`course_num` int(11) NOT NULL DEFAULT 0 COMMENT '每日新增课程数',
`gmt_create` datetime NOT NULL COMMENT '创建时间',
`gmt_modified` datetime NOT NULL COMMENT '更新时间',
PRIMARY KEY (`id`) USING BTREE,
INDEX `statistics_day`(`date_calculated`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '网站统计日数据' ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for t_order
-- ----------------------------
DROP TABLE IF EXISTS `t_order`;
CREATE TABLE `t_order` (
`id` char(19) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '',
`order_no` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '订单号',
`course_id` varchar(19) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '课程id',
`course_title` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '课程名称',
`course_cover` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '课程封面',
`teacher_name` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '讲师名称',
`member_id` varchar(19) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '会员id',
`nickname` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '会员昵称',
`mobile` varchar(11) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '会员手机',
`total_fee` decimal(10, 2) NULL DEFAULT 0.01 COMMENT '订单金额(分)',
`pay_type` tinyint(3) NULL DEFAULT NULL COMMENT '支付类型(1:微信 2:支付宝)',
`status` tinyint(3) NULL DEFAULT NULL COMMENT '订单状态(0:未支付 1:已支付)',
`is_deleted` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '逻辑删除 1(true)已删除, 0(false)未删除',
`gmt_create` datetime NOT NULL COMMENT '创建时间',
`gmt_modified` datetime NOT NULL COMMENT '更新时间',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `ux_order_no`(`order_no`) USING BTREE,
INDEX `idx_course_id`(`course_id`) USING BTREE,
INDEX `idx_member_id`(`member_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '订单' ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for t_pay_log
-- ----------------------------
DROP TABLE IF EXISTS `t_pay_log`;
CREATE TABLE `t_pay_log` (
`id` char(19) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '',
`order_no` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '订单号',
`pay_time` datetime NULL DEFAULT NULL COMMENT '支付完成时间',
`total_fee` decimal(10, 2) NULL DEFAULT 0.01 COMMENT '支付金额(分)',
`transaction_id` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '交易流水号',
`trade_state` char(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '交易状态',
`pay_type` tinyint(3) NOT NULL DEFAULT 0 COMMENT '支付类型(1:微信 2:支付宝)',
`attr` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '其他属性',
`is_deleted` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '逻辑删除 1(true)已删除, 0(false)未删除',
`gmt_create` datetime NOT NULL COMMENT '创建时间',
`gmt_modified` datetime NOT NULL COMMENT '更新时间',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `uk_order_no`(`order_no`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '支付日志表' ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for ucenter_member
-- ----------------------------
DROP TABLE IF EXISTS `ucenter_member`;
CREATE TABLE `ucenter_member` (
`id` char(19) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '会员id',
`openid` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '微信openid',
`mobile` varchar(11) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '手机号',
`password` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '密码',
`nickname` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '昵称',
`sex` tinyint(2) UNSIGNED NULL DEFAULT NULL COMMENT '性别 1 女,2 男',
`age` tinyint(3) UNSIGNED NULL DEFAULT NULL COMMENT '年龄',
`avatar` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '用户头像',
`sign` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '用户签名',
`is_disabled` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否禁用 1(true)已禁用, 0(false)未禁用',
`is_deleted` tinyint(1) NOT NULL DEFAULT 0 COMMENT '逻辑删除 1(true)已删除, 0(false)未删除',
`gmt_create` datetime NOT NULL COMMENT '创建时间',
`gmt_modified` datetime NOT NULL COMMENT '更新时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '会员表' ROW_FORMAT = Compact;
SET FOREIGN_KEY_CHECKS = 1;
|
-- MySQL dump 10.13 Distrib 5.7.17, for Win64 (x86_64)
--
-- Host: localhost Database: mydb
-- ------------------------------------------------------
-- Server version 5.7.18-log
/*!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 `companies`
--
DROP TABLE IF EXISTS `companies`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `companies` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(45) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `companies`
--
LOCK TABLES `companies` WRITE;
/*!40000 ALTER TABLE `companies` DISABLE KEYS */;
INSERT INTO `companies` VALUES (1,'company1'),(2,'company2'),(3,'company3');
/*!40000 ALTER TABLE `companies` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `companies_has_projects`
--
DROP TABLE IF EXISTS `companies_has_projects`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `companies_has_projects` (
`companies_id` int(11) NOT NULL,
`projects_id` int(11) NOT NULL,
PRIMARY KEY (`companies_id`,`projects_id`),
KEY `fk_companies_has_projects_projects1_idx` (`projects_id`),
KEY `fk_companies_has_projects_companies1_idx` (`companies_id`),
CONSTRAINT `fk_companies_has_projects_companies1` FOREIGN KEY (`companies_id`) REFERENCES `companies` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
CONSTRAINT `fk_companies_has_projects_projects1` FOREIGN KEY (`projects_id`) REFERENCES `projects` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `companies_has_projects`
--
LOCK TABLES `companies_has_projects` WRITE;
/*!40000 ALTER TABLE `companies_has_projects` DISABLE KEYS */;
INSERT INTO `companies_has_projects` VALUES (1,1),(1,2),(2,3);
/*!40000 ALTER TABLE `companies_has_projects` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `customers`
--
DROP TABLE IF EXISTS `customers`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `customers` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(45) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `customers`
--
LOCK TABLES `customers` WRITE;
/*!40000 ALTER TABLE `customers` DISABLE KEYS */;
INSERT INTO `customers` VALUES (1,'customer1'),(2,'customer2'),(3,'customer3');
/*!40000 ALTER TABLE `customers` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `customers_has_projects`
--
DROP TABLE IF EXISTS `customers_has_projects`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `customers_has_projects` (
`customers_id` int(11) NOT NULL,
`projects_id` int(11) NOT NULL,
PRIMARY KEY (`customers_id`,`projects_id`),
KEY `fk_customers_has_projects_projects1_idx` (`projects_id`),
KEY `fk_customers_has_projects_customers1_idx` (`customers_id`),
CONSTRAINT `fk_customers_has_projects_customers1` FOREIGN KEY (`customers_id`) REFERENCES `customers` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
CONSTRAINT `fk_customers_has_projects_projects1` FOREIGN KEY (`projects_id`) REFERENCES `projects` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `customers_has_projects`
--
LOCK TABLES `customers_has_projects` WRITE;
/*!40000 ALTER TABLE `customers_has_projects` DISABLE KEYS */;
INSERT INTO `customers_has_projects` VALUES (1,1),(2,2),(3,3);
/*!40000 ALTER TABLE `customers_has_projects` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `developers`
--
DROP TABLE IF EXISTS `developers`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `developers` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(45) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `developers`
--
LOCK TABLES `developers` WRITE;
/*!40000 ALTER TABLE `developers` DISABLE KEYS */;
INSERT INTO `developers` VALUES (1,'developer1'),(2,'developer2'),(3,'developer3');
/*!40000 ALTER TABLE `developers` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `projects`
--
DROP TABLE IF EXISTS `projects`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `projects` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(45) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `projects`
--
LOCK TABLES `projects` WRITE;
/*!40000 ALTER TABLE `projects` DISABLE KEYS */;
INSERT INTO `projects` VALUES (1,'project1'),(2,'project2'),(3,'project3');
/*!40000 ALTER TABLE `projects` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `projects_has_developers`
--
DROP TABLE IF EXISTS `projects_has_developers`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `projects_has_developers` (
`projects_id` int(11) NOT NULL,
`developers_id` int(11) NOT NULL,
PRIMARY KEY (`projects_id`,`developers_id`),
KEY `fk_projects_has_developers_developers1_idx` (`developers_id`),
KEY `fk_projects_has_developers_projects1_idx` (`projects_id`),
CONSTRAINT `fk_projects_has_developers_developers1` FOREIGN KEY (`developers_id`) REFERENCES `developers` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
CONSTRAINT `fk_projects_has_developers_projects1` FOREIGN KEY (`projects_id`) REFERENCES `projects` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `projects_has_developers`
--
LOCK TABLES `projects_has_developers` WRITE;
/*!40000 ALTER TABLE `projects_has_developers` DISABLE KEYS */;
INSERT INTO `projects_has_developers` VALUES (1,1),(2,2),(3,3);
/*!40000 ALTER TABLE `projects_has_developers` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `skills`
--
DROP TABLE IF EXISTS `skills`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `skills` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(45) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `skills`
--
LOCK TABLES `skills` WRITE;
/*!40000 ALTER TABLE `skills` DISABLE KEYS */;
INSERT INTO `skills` VALUES (1,'skill1'),(2,'skill2'),(3,'skill3');
/*!40000 ALTER TABLE `skills` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `skills_has_developers`
--
DROP TABLE IF EXISTS `skills_has_developers`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `skills_has_developers` (
`skills_id` int(11) NOT NULL,
`developers_id` int(11) NOT NULL,
PRIMARY KEY (`skills_id`,`developers_id`),
KEY `fk_skills_has_developers_developers1_idx` (`developers_id`),
KEY `fk_skills_has_developers_skills_idx` (`skills_id`),
CONSTRAINT `fk_skills_has_developers_developers1` FOREIGN KEY (`developers_id`) REFERENCES `developers` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
CONSTRAINT `fk_skills_has_developers_skills` FOREIGN KEY (`skills_id`) REFERENCES `skills` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `skills_has_developers`
--
LOCK TABLES `skills_has_developers` WRITE;
/*!40000 ALTER TABLE `skills_has_developers` DISABLE KEYS */;
INSERT INTO `skills_has_developers` VALUES (1,1),(3,1),(1,2),(2,3),(3,3);
/*!40000 ALTER TABLE `skills_has_developers` 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-06-26 22:51:33
|
-- MySQL dump 10.13 Distrib 8.0.16, for Win64 (x86_64)
--
-- Host: localhost Database: marthagoshen
-- ------------------------------------------------------
-- Server version 5.7.24
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
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 `concern`
--
DROP TABLE IF EXISTS `concern`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
SET character_set_client = utf8mb4 ;
CREATE TABLE `concern` (
`concernid` int(10) NOT NULL AUTO_INCREMENT,
`reporteddate` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`description` varchar(70) NOT NULL,
`timeavailable` time NOT NULL DEFAULT '00:00:00',
`status` enum('done','pending','cancelled') NOT NULL,
`dateavailable` date NOT NULL,
`total` int(10) DEFAULT NULL,
`tenantid` int(8) NOT NULL,
`response` varchar(70) DEFAULT NULL,
`feedback` varchar(70) DEFAULT NULL,
`maintenanceid` int(7) DEFAULT NULL,
`prioritylevel` enum('emergency','major concern','minor concern') NOT NULL,
PRIMARY KEY (`concernid`),
KEY `id` (`tenantid`),
KEY `id_2` (`tenantid`),
KEY `maintenanceid_idx` (`maintenanceid`),
CONSTRAINT `maintenanceid` FOREIGN KEY (`maintenanceid`) REFERENCES `employee` (`empid`) ON UPDATE CASCADE,
CONSTRAINT `tenantid` FOREIGN KEY (`tenantid`) REFERENCES `tenant` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `concern`
--
LOCK TABLES `concern` WRITE;
/*!40000 ALTER TABLE `concern` DISABLE KEYS */;
/*!40000 ALTER TABLE `concern` 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 2019-06-18 9:51:31
|
---------------------------------------------------------------------------------------------------------------
------------------------------------- INICIO PRE (dicionário de dados) ----------------------------------------
---------------------------------------------------------------------------------------------------------------
--Inserções da tabela grupotaxadiversos
insert into db_sysarquivo select 3971, 'grupotaxadiversos', 'Agrupa várias taxas para gerar o mesmo débito.', 'y118', '2016-09-22', 'Grupo de Taxas de Diversos', 0, 'f', 'f', 't', 't' from db_sysarquivo where not exists (select 1 from db_sysarquivo where codarq = 3971) limit 1;
delete from db_sysarqmod where codarq = 3971;
insert into db_sysarqmod values (25,3971);
insert into db_syscampo select 22046,'y118_sequencial','int8','Sequencial da tabela','0', 'Sequencial',19,'f','f','f',1,'text','Sequencial' from db_syscampo where not exists (select 1 from db_syscampo where codcam = 22046) limit 1;
insert into db_syscampo select 22047,'y118_descricao','varchar(100)','Descrição do grupo de taxas.','', 'Descrição',100,'f','t','f',0,'text','Descrição' from db_syscampo where not exists (select 1 from db_syscampo where codcam = 22047) limit 1;
insert into db_syscampo select 22048,'y118_inflator','varchar(5)','Código do inflator','', 'Código Inflator',5,'f','t','f',0,'text','Código Inflator' from db_syscampo where not exists (select 1 from db_syscampo where codcam = 22048) limit 1;
insert into db_syscampo select 22050,'y118_procedencia','int4','Procedência do débito','0', 'Procedência',19,'f','f','f',1,'text','Procedência' from db_syscampo where not exists (select 1 from db_syscampo where codcam = 22050) limit 1;
update db_syscampo set nomecam = 'y119_natureza', conteudo = 'text', descricao = 'Natureza da taxa', valorinicial = '', rotulo = 'Natureza', nulo = 'f', tamanho = 100, maiusculo = 't', autocompl = 'f', aceitatipo = 0, tipoobj = 'text', rotulorel = 'Natureza' where codcam = 22053;
delete from db_sysarqcamp where codarq = 3971;
insert into db_sysarqcamp values(3971,22046,1,0);
insert into db_sysarqcamp values(3971,22047,2,0);
insert into db_sysarqcamp values(3971,22048,3,0);
insert into db_sysarqcamp values(3971,22050,5,0);
delete from db_sysprikey where codarq = 3971;
insert into db_sysprikey (codarq,codcam,sequen,camiden) values(3971,22046,1,22046);
delete from db_sysforkey where codarq = 3971;
insert into db_sysforkey values(3971,22048,1,81,0);
insert into db_sysforkey values(3971,22050,1,374,0);
insert into db_sysindices select 4381,'grupotaxadiversos_procedencia_in',3971,'0' from db_sysindices where not exists (select 1 from db_sysindices where codind = 4381) limit 1;
insert into db_sysindices select 4382,'grupotaxadiversos_inflator_in',3971,'0' from db_sysindices where not exists (select 1 from db_sysindices where codind = 4382) limit 1;
delete from db_syscadind where codind IN (4381,4382);
insert into db_syscadind values(4381,22050,1);
insert into db_syscadind values(4382,22048,1);
insert into db_syssequencia select 1000603, 'grupotaxadiversos_y118_sequencial_seq', 1, 1, 9223372036854775807, 1, 1 from db_syssequencia where not exists (select 1 from db_syssequencia where codsequencia = 1000603) limit 1;
update db_sysarqcamp set codsequencia = 1000603 where codarq = 3971 and codcam = 22046;
--Ajuste na chave estrangeira de inflatores
update db_sysindices set nomeind = 'grupotaxadiversos_inflator_in',campounico = '0' where codind = 4382;
delete from db_syscadind where codind = 4382;
insert into db_syscadind values(4382,22048,1);
delete from db_sysforkey where codarq = 3971 and referen = 81;
insert into db_sysforkey values(3971,22048,1,80,0);
delete from db_sysarqcamp where codarq = 3971;
insert into db_sysarqcamp values(3971,22046,1,1000603);
insert into db_sysarqcamp values(3971,22047,2,0);
insert into db_sysarqcamp values(3971,22048,3,0);
insert into db_sysarqcamp values(3971,22050,4,0);
update db_syscampo set nomecam = 'y118_inflator', conteudo = 'varchar(5)', descricao = 'Código do inflator', valorinicial = '', rotulo = 'Código Inflator', nulo = 'f', tamanho = 5, maiusculo = 't', autocompl = 'f', aceitatipo = 0, tipoobj = 'text', rotulorel = 'Código Inflator' where codcam = 22048;
delete from db_syscampodep where codcam = 22048;
delete from db_syscampodef where codcam = 22048;
--Inserções da tabela taxadiversos
insert into db_sysarquivo select 3973, 'taxadiversos', 'Taxas diversas.', 'y119', '2016-09-22', 'Taxas Diversas', 0, 'f', 'f', 't', 't' from db_sysarquivo where not exists (select 1 from db_sysarquivo where codarq = 3973) limit 1;
insert into db_sysarqmod select 25, 3973 from db_sysarqmod where not exists(select 1 from db_sysarqmod where codmod = 25 and codarq = 3973) limit 1;
insert into db_syscampo select 22051,'y119_sequencial','int4','Sequencial da tabela','0', 'Sequencial',19,'f','f','f',1,'text','Sequencial' from db_syscampo where not exists (select 1 from db_syscampo where codcam = 22051) limit 1;
insert into db_syscampo select 22052,'y119_grupotaxadiversos','int4','Grupo de taxas','0', 'Grupo',19,'f','f','f',1,'text','Grupo' from db_syscampo where not exists (select 1 from db_syscampo where codcam = 22052) limit 1;
insert into db_syscampo select 22053,'y119_natureza','text','Natureza da taxa','', 'Natureza',1,'f','t','f',0,'text','Natureza' from db_syscampo where not exists (select 1 from db_syscampo where codcam = 22053) limit 1;
insert into db_syscampo select 22054,'y119_formula','int4','Fórmula da taxa','0', 'Fórmula',19,'f','f','f',1,'text','Fórmula' from db_syscampo where not exists (select 1 from db_syscampo where codcam = 22054) limit 1;
insert into db_syscampo select 22055,'y119_unidade','varchar(50)','Unidade para cálculo da taxa','', 'Unidade',50,'f','t','f',0,'text','Unidade' from db_syscampo where not exists (select 1 from db_syscampo where codcam = 22055) limit 1;
insert into db_syscampo select 22056,'y119_tipo_periodo','char(1)','Tipo do período se aberto, sem data final ou fixo','', 'Tipo de Período',1,'f','t','f',0,'text','Tipo de Período' from db_syscampo where not exists (select 1 from db_syscampo where codcam = 22056) limit 1;
insert into db_syscampo select 22125,'y119_tipo_calculo','char(1)','Tipo de cálculo, Geral ou Único. Se uma taxa geral será recalculada anualmente, se única ser calculada apenas no lançamento.','', 'Tipo de Cálculo',1,'f','t','f',0,'text','Tipo de Cálculo' from db_syscampo where not exists (select 1 from db_syscampo where codcam = 22125) limit 1;
update db_syscampo set nomecam = 'y119_natureza', conteudo = 'text', descricao = 'Natureza da taxa', valorinicial = '', rotulo = 'Natureza', nulo = 'f', tamanho = 100, maiusculo = 't', autocompl = 'f', aceitatipo = 0, tipoobj = 'text', rotulorel = 'Natureza' where codcam = 22053;
delete from db_sysarqcamp where codarq = 3973;
insert into db_sysarqcamp values(3973,22051,1,0);
insert into db_sysarqcamp values(3973,22052,2,0);
insert into db_sysarqcamp values(3973,22053,3,0);
insert into db_sysarqcamp values(3973,22054,4,0);
insert into db_sysarqcamp values(3973,22055,5,0);
insert into db_sysarqcamp values(3973,22056,6,0);
insert into db_sysarqcamp values(3973,22125,7,0);
delete from db_sysprikey where codarq = 3973;
insert into db_sysprikey (codarq,codcam,sequen,camiden) values(3973,22051,1,22051);
delete from db_sysforkey where codarq = 3973;
insert into db_sysforkey values(3973,22052,1,3971,0);
insert into db_sysforkey values(3973,22054,1,3820,0);
insert into db_sysindices select 4383,'taxadiversos_grupotaxadiversos_in',3973,'0' from db_sysindices where not exists (select 1 from db_sysindices where codind = 4383) limit 1;
insert into db_sysindices select 4384,'taxadiversos_formula_in',3973,'0' from db_sysindices where not exists (select 1 from db_sysindices where codind = 4384) limit 1;
delete from db_syscadind where codind IN (4383, 4384);
insert into db_syscadind values(4383,22052,1);
insert into db_syscadind values(4384,22054,1);
insert into db_syssequencia select 1000604, 'taxadiversos_y119_sequencial_seq', 1, 1, 9223372036854775807, 1, 1 from db_syssequencia where not exists (select 1 from db_syssequencia where codsequencia = 1000604) limit 1;
update db_sysarqcamp set codsequencia = 1000604 where codarq = 3973 and codcam = 22051;
--Inserções da tabela lancamentotaxadiversos
insert into db_sysarquivo select 3974, 'lancamentotaxadiversos', 'Tabela para lançamento das taxas', 'y120', '2016-09-23', 'Lançamento de Taxas diversas', 0, 'f', 'f', 't', 't' where not exists (select 1 from db_sysarquivo where codarq = 3974);
insert into db_sysarqmod select 25, 3974 from db_sysarqmod where not exists(select 1 from db_sysarqmod where codmod = 25 and codarq = 3974) limit 1;
insert into db_syscampo select 22057,'y120_sequencial','int4','Sequencial da tabela','0', 'Sequencial',19,'f','f','f',1,'text','Sequencial' where not exists (select 1 from db_syscampo where codcam = 22057);
insert into db_syscampo select 22058,'y120_cgm','int4','Cgm ao qual a taxa será vinculada.','0', 'CGM',19,'f','f','f',1,'text','CGM' where not exists (select 1 from db_syscampo where codcam = 22058);
insert into db_syscampo select 22059,'y120_taxadiversos','int4','Taxa diversa que será calculada','0', 'Taxa',19,'f','f','f',1,'text','Taxa' where not exists (select 1 from db_syscampo where codcam = 22059);
insert into db_syscampo select 22060,'y120_unidade','float8','Quantidade de unidades para ser calculada a taxa','0', 'Unidade',19,'f','f','f',4,'text','Unidade' where not exists (select 1 from db_syscampo where codcam = 22060);
insert into db_syscampo select 22079, 'y120_periodo', 'float8', 'Período para cálculo da taxa', '0', 'Período', 19, 't', 'f', 'f', 4, 'text', 'Período' where not exists (select 1 from db_syscampo where codcam = 22079);
insert into db_syscampo select 22061,'y120_datainicio','date','Data de início','null', 'Data de Início',10,'f','f','f',1,'text','Data de Início' where not exists (select 1 from db_syscampo where codcam = 22061);
insert into db_syscampo select 22062,'y120_datafim','date','Data de fim','null', 'Data de fim',10,'f','f','f',1,'text','Data de fim' where not exists (select 1 from db_syscampo where codcam = 22062);
insert into db_syscampo select 22124,'y120_issbase','int4','Código da Inscrição Municipal do CGM.','0', 'Inscrição Municipal',10,'t','f','f',1,'text','Inscrição Municipal' where not exists (select 1 from db_syscampo where codcam = 22124);
update db_syscampo set nomecam = 'y120_datainicio', conteudo = 'date', descricao = 'Data de início', valorinicial = 'null', rotulo = 'Data de Início', nulo = 't', tamanho = 10, maiusculo = 'f', autocompl = 'f', aceitatipo = 1, tipoobj = 'text', rotulorel = 'Data de Início' where codcam = 22061;
update db_syscampo set nomecam = 'y120_datafim', conteudo = 'date', descricao = 'Data de fim', valorinicial = 'null', rotulo = 'Data de fim', nulo = 't', tamanho = 10, maiusculo = 'f', autocompl = 'f', aceitatipo = 1, tipoobj = 'text', rotulorel = 'Data de fim' where codcam = 22062;
update db_syscampo set nomecam = 'y120_periodo', conteudo = 'float8', descricao = 'Período para cálculo da taxa', valorinicial = '0', rotulo = 'Período', nulo = 't', tamanho = 19, maiusculo = 'f', autocompl = 'f', aceitatipo = 4, tipoobj = 'text', rotulorel = 'Período' where codcam = 22079;
update db_syscampo set nomecam = 'y120_cgm', conteudo = 'int4', descricao = 'Cgm ao qual a taxa será vinculada.', valorinicial = '0', rotulo = 'CGM', nulo = 't', tamanho = 19, maiusculo = 'f', autocompl = 'f', aceitatipo = 1, tipoobj = 'text', rotulorel = 'CGM' where codcam = 22058;
delete from db_sysarqcamp where codarq = 3974;
insert into db_sysarqcamp values(3974,22057,1,1000605);
insert into db_sysarqcamp values(3974,22058,2,0);
insert into db_sysarqcamp values(3974,22059,3,0);
insert into db_sysarqcamp values(3974,22060,4,0);
insert into db_sysarqcamp values(3974,22079,5,0);
insert into db_sysarqcamp values(3974,22061,6,0);
insert into db_sysarqcamp values(3974,22062,7,0);
insert into db_sysarqcamp values(3974,22124,8,0);
delete from db_sysprikey where codarq = 3974;
insert into db_sysprikey (codarq,codcam,sequen,camiden) values(3974,22057,1,22057);
delete from db_sysforkey where codarq = 3974;
insert into db_sysforkey values(3974,22058,1,42,0);
insert into db_sysforkey values(3974,22059,1,3973,0);
insert into db_sysforkey values(3974,22124,1,41,0);
insert into db_sysindices select 4385,'lancamentotaxadiversos_cgm_in',3974,'0' where not exists (select 1 from db_sysindices where codind = 4385);
insert into db_sysindices select 4386,'lancamentotaxadiversos_taxadiversos_in',3974,'0' where not exists (select 1 from db_sysindices where codind = 4386);
insert into db_sysindices select 4389,'lancamentotaxadiversos_issbase_in',3974,'0' where not exists (select 1 from db_sysindices where codind = 4389);
delete from db_syscadind where codind IN (4385,4386,4389);
insert into db_syscadind values(4385,22058,1);
insert into db_syscadind values(4386,22059,1);
insert into db_syscadind values(4389,22124,1);
insert into db_syssequencia select 1000605, 'lancamentotaxadiversos_y120_sequencial_seq', 1, 1, 9223372036854775807, 1, 1 where not exists (select 1 from db_syssequencia where codsequencia = 1000605);
update db_sysarqcamp set codsequencia = 1000605 where codarq = 3974 and codcam = 22057;
--Inserções da tabela taxavaloresreferencia
insert into db_sysarquivo select 3975, 'taxavaloresreferencia', 'Tabela para armazenar os valores de referência das taxas diversas.', 'y121', '2016-09-23', 'Valores de Referência das taxas', 0, 'f', 't', 't', 't' where not exists (select 1 from db_sysarquivo where codarq = 3975);
insert into db_sysarqmod select 25, 3975 from db_sysarqmod where not exists(select 1 from db_sysarqmod where codmod = 25 and codarq = 3975) limit 1;
insert into db_syscampo select 22070,'y121_sequencial','int4','Sequencial da tabela','0', 'Sequencial',19,'f','f','f',1,'text','Sequencial' where not exists (select 1 from db_syscampo where codcam = 22070);
insert into db_syscampo select 22071,'y121_descricao','varchar(100)','Descrição do valor de referência da taxa','', 'Descrição',100,'f','t','f',0,'text','Descrição' where not exists (select 1 from db_syscampo where codcam = 22071);
insert into db_syscampo select 22072,'y121_valor','float8','Valor base de referência para a taxa','0', 'Valor Base',19,'f','f','f',4,'text','Valor Base' where not exists (select 1 from db_syscampo where codcam = 22072);
insert into db_syscampo select 22091,'y121_data_base','date','Data para atualização do valor base das taxas.','','Data Base',10,'false','false','false',1,'text','Data Base' where not exists (select 1 from db_syscampo where codcam = 22091) limit 1;
delete from db_sysarqcamp where codarq = 3975;
insert into db_sysarqcamp values(3975,22070,1,0);
insert into db_sysarqcamp values(3975,22071,2,0);
insert into db_sysarqcamp values(3975,22072,3,0);
insert into db_sysarqcamp values(3975,22091,4,0);
delete from db_sysprikey where codarq = 3975;
insert into db_sysprikey (codarq,codcam,sequen,camiden) values(3975,22070,1,22070);
insert into db_syssequencia select 1000606, 'taxavaloresreferencia_y121_sequencial_seq', 1, 1, 9223372036854775807, 1, 1 where not exists (select 1 from db_syssequencia where codsequencia = 1000606);
update db_sysarqcamp set codsequencia = 1000606 where codarq = 3975 and codcam = 22070;
--Inclusão de menus
insert into db_itensmenu ( id_item ,descricao ,help ,funcao ,itemativo ,manutencao ,desctec ,libcliente ) select 10310 ,'Taxas' ,'Cadastro de Taxas diversas' ,'' ,'1' ,'1' ,'Menu para cadastro de grupo de taxas e de taxas diversas' ,'true' where not exists (select 1 from db_itensmenu where id_item = 10310);
delete from db_menu where id_item_filho = 10310 AND modulo = 277;
insert into db_menu ( id_item ,id_item_filho ,menusequencia ,modulo ) values ( 29 ,10310 ,271 ,277 );
insert into db_itensmenu ( id_item ,descricao ,help ,funcao ,itemativo ,manutencao ,desctec ,libcliente ) select 10311 ,'Grupos' ,'Grupos de Taxas diversas' ,'fis1_grupotaxadiversos001.php' ,'1' ,'1' ,'Menu para agrupamento de taxas diversas' ,'true' where not exists (select 1 from db_itensmenu where id_item = 10311);
delete from db_menu where id_item_filho = 10311 AND modulo = 277;
insert into db_menu ( id_item ,id_item_filho ,menusequencia ,modulo ) values ( 10310 ,10311 ,1 ,277 );
insert into db_itensmenu ( id_item ,descricao ,help ,funcao ,itemativo ,manutencao ,desctec ,libcliente ) select 10312 ,'Natureza' ,'Taxas diversas' ,'fis1_taxadiversos001.php' ,'1' ,'1' ,'Menu para cadastro de taxas diversas' ,'true' where not exists (select 1 from db_itensmenu where id_item = 10312);
delete from db_menu where id_item_filho = 10312 AND modulo = 277;
insert into db_menu ( id_item ,id_item_filho ,menusequencia ,modulo ) values ( 10310 ,10312 ,2 ,277 );
insert into db_itensmenu ( id_item ,descricao ,help ,funcao ,itemativo ,manutencao ,desctec ,libcliente ) select 10313 ,'Taxas' ,'Inclusão e cálculo de taxas' ,'' ,'1' ,'1' ,'Menu para inclusão de uma taxas para um CGM e cálculo geral de taxas' ,'true' where not exists (select 1 from db_itensmenu where id_item = 10313);
delete from db_menu where id_item_filho = 10313 AND modulo = 277;
insert into db_menu ( id_item ,id_item_filho ,menusequencia ,modulo ) values ( 1818 ,10313 ,115 ,277 );
insert into db_itensmenu ( id_item ,descricao ,help ,funcao ,itemativo ,manutencao ,desctec ,libcliente ) select 10314 ,'Lançamento' ,'Lança uma taxa' ,'fis4_lancamentotaxadiversos.php' ,'1' ,'1' ,'Menu para lançar uma taxa para um contribuinte.' ,'true' where not exists (select 1 from db_itensmenu where id_item = 10314);
delete from db_menu where id_item_filho = 10314 AND modulo = 277;
insert into db_menu ( id_item ,id_item_filho ,menusequencia ,modulo ) values ( 10313 ,10314 ,1 ,277 );
insert into db_itensmenu ( id_item ,descricao ,help ,funcao ,itemativo ,manutencao ,desctec ,libcliente ) select 10315 ,'Cálculo Geral' ,'Cálculo geral de taxas' ,'fis4_calculotaxadiversos.php' ,'1' ,'1' ,'Menu para cálculo geral de taxas.' ,'true' where not exists (select 1 from db_itensmenu where id_item = 10315);
delete from db_menu where id_item_filho = 10315 AND modulo = 277;
insert into db_menu ( id_item ,id_item_filho ,menusequencia ,modulo ) values ( 10313 ,10315 ,2 ,277 );
--- diversoslancamentotaxa
insert into db_sysarquivo select 3978, 'diversoslancamentotaxa', 'Guarda os Débitos de Diversos lançados para um Taxa', 'dv14', '2016-10-04', 'Diversos Lançados', 0, 'f', 't', 't', 't' where not exists (select 1 from db_sysarquivo where codarq = 3978) limit 1;
delete from db_sysarqmod where codarq = 3978;
insert into db_sysarqmod values (27,3978);
insert into db_syscampo select 22087, 'dv14_sequencial', 'int4', 'Identificador da Ligação', '', 'Código', 10, 'false', 'false', 'false', 1, 'text', 'Código' where not exists (select 1 from db_syscampo where codcam = 22087) limit 1;
insert into db_syscampo select 22088, 'dv14_diversos', 'int4', 'Código do diversos', '', 'Código do Diverso', 10, 'false', 'false', 'false', 1, 'text', 'Código do Diverso' where not exists (select 1 from db_syscampo where codcam = 22088) limit 1;
insert into db_syscampo select 22089, 'dv14_lancamentotaxadiversos', 'int4', 'Sequencial da tabela.', '', 'Código do Lançamento', 19, 'false', 'false', 'false', 1, 'text', 'Código do Lançamento' where not exists (select 1 from db_syscampo where codcam = 22089) limit 1;
insert into db_syscampo select 22094 ,'dv14_data_calculo' ,'date' ,'Data do Cálculo geral da taxa de diversos.' ,'' ,'Data do Cálculo' ,10 ,'true' ,'false' ,'false' ,1 ,'text' ,'Data do Cálculo' where not exists (select 1 from db_syscampo where codcam = 22094) limit 1;
delete from db_syscampodep where codcam IN (22088, 22089);
insert into db_syscampodep (codcam, codcampai) values (22088, 3470);
insert into db_syscampodep (codcam, codcampai) values (22089, 22057);
delete from db_sysarqcamp where codarq = 3978;
insert into db_sysarqcamp (codarq, codcam, seqarq, codsequencia) values (3978, 22087, 1, 0);
insert into db_sysarqcamp (codarq, codcam, seqarq, codsequencia) values (3978, 22088, 2, 0);
insert into db_sysarqcamp (codarq, codcam, seqarq, codsequencia) values (3978, 22089, 3, 0);
insert into db_sysarqcamp (codarq, codcam, seqarq, codsequencia) values (3978, 22094, 4, 0);
delete from db_sysprikey where codarq = 3978;
insert into db_sysprikey (codarq,codcam,sequen,camiden) values(3978,22087,1,22089);
delete from db_sysforkey where codarq = 3978;
insert into db_sysforkey values(3978, 22088, 1, 372, 0);
insert into db_sysforkey values(3978, 22089, 1, 3974, 0);
insert into db_syssequencia select 1000609, 'diversoslancamentotaxa_dv14_sequencial_seq', 1, 1, 9223372036854775807, 1, 1 where not exists (select 1 from db_syssequencia where codsequencia = 1000609) limit 1;
update db_sysarqcamp set codsequencia = 1000609 where codarq = 3978 and codcam = 22087;
---------------------------------------------------------------------------------------------------------------
---------------------------------------------- INICIO DDL -----------------------------------------------------
---------------------------------------------------------------------------------------------------------------
-- Cria tabela e sequence para tabela grupotaxadiversos
select fc_executa_ddl('
create sequence fiscal.grupotaxadiversos_y118_sequencial_seq
increment 1
minvalue 1
maxvalue 9223372036854775807
start 1
cache 1;
');
CREATE table IF NOT EXISTS fiscal.grupotaxadiversos (
y118_sequencial int4 NOT NULL default nextval('fiscal.grupotaxadiversos_y118_sequencial_seq'),
y118_descricao varchar(100) NOT NULL,
y118_inflator varchar(5) NOT NULL,
y118_procedencia int4 NOT NULL,
CONSTRAINT grupotaxadiversos_sequencial_pk PRIMARY KEY (y118_sequencial),
CONSTRAINT grupotaxadiversos_inflator_fk FOREIGN KEY (y118_inflator) REFERENCES inflatores.inflan,
CONSTRAINT grupotaxadiversos_procedencia_fk FOREIGN KEY (y118_procedencia) REFERENCES diversos.procdiver
);
select fc_executa_ddl('CREATE INDEX grupotaxadiversos_procedencia_in ON fiscal.grupotaxadiversos(y118_procedencia)');
select fc_executa_ddl('CREATE INDEX grupotaxadiversos_inflator_in ON fiscal.grupotaxadiversos(y118_inflator)');
-- Cria tabela e sequence para tabela taxadiversos
select fc_executa_ddl('
create sequence fiscal.taxadiversos_y119_sequencial_seq
increment 1
minvalue 1
maxvalue 9223372036854775807
start 1
cache 1;
') as taxadiversos_y119_sequencial_seq;
CREATE table IF NOT EXISTS fiscal.taxadiversos (
y119_sequencial int4 NOT NULL default nextval('fiscal.taxadiversos_y119_sequencial_seq'),
y119_grupotaxadiversos int4 NOT NULL,
y119_natureza text NOT NULL,
y119_formula int4 NOT NULL,
y119_unidade varchar(50) NOT NULL,
y119_tipo_periodo char(1) NOT NULL,
y119_tipo_calculo char(1) NOT NULL,
CONSTRAINT taxadiversos_sequencial_pk PRIMARY KEY (y119_sequencial),
CONSTRAINT taxadiversos_grupotaxadiversos_fk FOREIGN KEY (y119_grupotaxadiversos) REFERENCES fiscal.grupotaxadiversos,
CONSTRAINT taxadiversos_formula_fk FOREIGN KEY (y119_formula) REFERENCES configuracoes.db_formulas
);
select fc_executa_ddl('CREATE INDEX taxadiversos_grupotaxadiversos_in ON fiscal.taxadiversos(y119_grupotaxadiversos)');
select fc_executa_ddl('CREATE INDEX taxadiversos_formula_in ON fiscal.taxadiversos(y119_formula)');
-- Cria tabela e sequence para tabela lancamentotaxadiversos
select fc_executa_ddl('
create sequence fiscal.lancamentotaxadiversos_y120_sequencial_seq
increment 1
minvalue 1
maxvalue 9223372036854775807
start 1
cache 1;
') as lancamentotaxadiversos_y120_sequencial_seq;
CREATE table IF NOT EXISTS fiscal.lancamentotaxadiversos (
y120_sequencial int4 NOT NULL default nextval('fiscal.lancamentotaxadiversos_y120_sequencial_seq'),
y120_cgm int4,
y120_taxadiversos int4 NOT NULL,
y120_unidade float8 NOT NULL,
y120_periodo float8,
y120_datainicio date,
y120_datafim date,
y120_issbase int4,
CONSTRAINT lancamentotaxadiversos_sequencial_pk PRIMARY KEY (y120_sequencial),
CONSTRAINT lancamentotaxadiversos_cgm_fk FOREIGN KEY (y120_cgm) REFERENCES protocolo.cgm,
CONSTRAINT lancamentotaxadiversos_taxadiversos_fk FOREIGN KEY (y120_taxadiversos) REFERENCES fiscal.taxadiversos,
CONSTRAINT lancamentotaxadiversos_issbase_fk FOREIGN KEY (y120_issbase) REFERENCES issqn.issbase
);
select fc_executa_ddl('CREATE INDEX lancamentotaxadiversos_cgm_in ON fiscal.lancamentotaxadiversos(y120_cgm)');
select fc_executa_ddl('CREATE INDEX lancamentotaxadiversos_taxadiversos_in ON fiscal.lancamentotaxadiversos(y120_taxadiversos)');
select fc_executa_ddl('CREATE INDEX lancamentotaxadiversos_issbase_in ON fiscal.lancamentotaxadiversos(y120_issbase)');
-- Cria tabela e sequence para tabela taxavaloresreferencia
select fc_executa_ddl('
create sequence fiscal.taxavaloresreferencia_y121_sequencial_seq
increment 1
minvalue 1
maxvalue 9223372036854775807
start 1
cache 1;
') as taxavaloresreferencia_y121_sequencial_seq;
CREATE table IF NOT EXISTS fiscal.taxavaloresreferencia (
y121_sequencial int4 NOT NULL default nextval('fiscal.taxavaloresreferencia_y121_sequencial_seq'),
y121_descricao varchar(100) NOT NULL,
y121_valor float8 NOT NULL,
y121_data_base date NOT NULL default current_date,
CONSTRAINT taxavaloresreferencia_sequencial_pk PRIMARY KEY (y121_sequencial)
);
select fc_executa_ddl('CREATE UNIQUE INDEX taxavaloresreferencia_descricao_un ON fiscal.taxavaloresreferencia(y121_descricao)');
SELECT fc_executa_ddl('CREATE SEQUENCE diversos.diversoslancamentotaxa_dv14_sequencial_seq INCREMENT 1 MINVALUE 1 MAXVALUE 9223372036854775807 START 1 CACHE 1;');
CREATE TABLE IF NOT EXISTS diversos.diversoslancamentotaxa(
dv14_sequencial int4 NOT NULL default nextval('diversos.diversoslancamentotaxa_dv14_sequencial_seq'),
dv14_diversos int4 NOT NULL,
dv14_lancamentotaxadiversos int4 NOT NULL,
dv14_data_calculo date,
CONSTRAINT diversoslancamentotaxa_sequ_pk PRIMARY KEY (dv14_sequencial),
CONSTRAINT diversoslancamentotaxa_diversos_fk FOREIGN KEY (dv14_diversos) REFERENCES diversos.diversos,
CONSTRAINT diversoslancamentotaxa_lancamentotaxadiversos_fk FOREIGN KEY (dv14_lancamentotaxadiversos) REFERENCES fiscal.lancamentotaxadiversos
);
---------------------------------------------------------------------------------------------------------------
---------------------------------------- FINAL TRIBUTARIO -----------------------------------------------------
---------------------------------------------------------------------------------------------------------------
|
IF NOT EXISTS (SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'Friends')
BEGIN
CREATE TABLE Friends (
UserOneId UNIQUEIDENTIFIER NOT NULL,
UserTwoId UNIQUEIDENTIFIER NOT NULL,
AcceptedDate DATETIME NOT NULL,
CONSTRAINT PK_Friends PRIMARY KEY (UserOneId, UserTwoId),
CONSTRAINT FK_Friends_UserOneId_Users_Id FOREIGN KEY (UserOneId) REFERENCES Users(Id),
CONSTRAINT FK_Friends_UserTwoId_Users_Id FOREIGN KEY (UserTwoId) REFERENCES Users(Id)
);
END |
#买家
SELECT id,nickname,cash_balance,startup_point,frozen_startup_point,prestore_point,frozen_prestore_point,coupon_value,frozen_coupon_value FROM `t_account` where id IN (1,3,5,7,9);
#卖家
SELECT id,nickname,cash_balance,startup_point,frozen_startup_point,prestore_point,frozen_prestore_point,coupon_value,frozen_coupon_value FROM `t_account` where id IN (2,4,6,8,10); |
-- Coverage
select
count(1) count
from datalab.fos.ks2
select
count(1) count
from datalab.fos.ks4
select
count(1) count
from datalab.fos.special
-- Schools appearing twice
select
laestab,
count(1) count
from datalab.fos.ks2
group by laestab
having count(1)>1
select
laestab,
count(1) count
from datalab.fos.ks4
group by laestab
having count(1)>1
select
laestab,
count(1) count
from datalab.fos.special
group by laestab
having count(1)>1
|
UPDATE fagsak_person
SET arkivert = TRUE
WHERE fk_fagsak_id = 1078652;
UPDATE fagsak
SET arkivert = TRUE
WHERE id = 1078652; |
insert into DB_PROFILE_DATA2.dbo.TB_FILHO
select c.PK_FUN_CODIGO, a.DtNasc, a.Sexo
from TOTAL_DROGASIL.dbo.FuncFilhos a, TOTAL_DROGASIL.dbo.Funcionario b, DB_PROFILE_DATA2.dbo.TB_FUNCIONARIO c
where b.ChaveID = a.ChaveID
and c.FUN_CPF = (b.CPF collate SQL_Latin1_General_CP1_CI_AS)
and c.FUN_PIS = (b.Pis collate SQL_Latin1_General_CP1_CI_AS)
|
CREATE TABLE "todolist" (
"id" SERIAL PRIMARY KEY,
"task" VARCHAR (250) NOT NULL,
"completed" BOOLEAN DEFAULT FALSE
);
INSERT INTO "todolist" ("task", "completed")
VALUES ('Complete assignment', FALSE), ('Make dinner', FALSE), ('Wash Dishes', FALSE); |
--ALTER TABLE XXMKT.XXMKT_SEQUENCES
-- DROP PRIMARY KEY CASCADE;
--
--DROP TABLE XXMKT.XXMKT_SEQUENCES CASCADE CONSTRAINTS;
CREATE TABLE XXMKT.XXMKT_SEQUENCES
(
SEQ_TYPE_ID NUMBER NOT NULL,
APPLICATION_SHORT_NAME VARCHAR2(50 BYTE) NOT NULL,
SEQ_TYPE VARCHAR2(30 BYTE) NOT NULL,
CURRENT_MONTH VARCHAR2(2 BYTE),
CURRENT_YEAR NUMBER,
LAST_VALUE NUMBER,
ENABLED_FLAG VARCHAR2(1 BYTE) DEFAULT 'Y' NOT NULL,
DESCRIPTION VARCHAR2(150 BYTE),
ORG_ID NUMBER NOT NULL,
CURRENT_FULL_DATE DATE,
CREATED_BY NUMBER DEFAULT -1 NOT NULL,
CREATION_DATE DATE DEFAULT SYSDATE NOT NULL,
LAST_UPDATED_BY NUMBER DEFAULT -1 NOT NULL,
LAST_UPDATE_DATE DATE DEFAULT SYSDATE NOT NULL,
LAST_UPDATE_LOGIN NUMBER DEFAULT -1 NOT NULL,
CURRENT_DAY VARCHAR2(2 BYTE)
)
TABLESPACE APPS_TS_TX_DATA
RESULT_CACHE (MODE DEFAULT)
PCTUSED 0
PCTFREE 10
INITRANS 1
MAXTRANS 255
STORAGE (
INITIAL 128K
NEXT 128K
MAXSIZE UNLIMITED
MINEXTENTS 1
MAXEXTENTS UNLIMITED
PCTINCREASE 0
BUFFER_POOL DEFAULT
FLASH_CACHE DEFAULT
CELL_FLASH_CACHE DEFAULT
)
LOGGING
NOCOMPRESS
NOCACHE
NOPARALLEL
MONITORING;
CREATE UNIQUE INDEX XXMKT.XXMKT_SEQUENCES_PK ON XXMKT.XXMKT_SEQUENCES
(SEQ_TYPE_ID)
LOGGING
TABLESPACE XXMKTX
PCTFREE 10
INITRANS 2
MAXTRANS 255
STORAGE (
INITIAL 128K
NEXT 128K
MAXSIZE UNLIMITED
MINEXTENTS 1
MAXEXTENTS UNLIMITED
PCTINCREASE 0
BUFFER_POOL DEFAULT
FLASH_CACHE DEFAULT
CELL_FLASH_CACHE DEFAULT
)
NOPARALLEL;
CREATE UNIQUE INDEX XXMKT.XXMKT_SEQUENCES_U1 ON XXMKT.XXMKT_SEQUENCES
(ORG_ID, ENABLED_FLAG, APPLICATION_SHORT_NAME, SEQ_TYPE, CURRENT_DAY,
CURRENT_MONTH, CURRENT_YEAR, CURRENT_FULL_DATE)
LOGGING
TABLESPACE APPS_TS_TX_DATA
PCTFREE 10
INITRANS 2
MAXTRANS 255
STORAGE (
INITIAL 128K
NEXT 128K
MAXSIZE UNLIMITED
MINEXTENTS 1
MAXEXTENTS UNLIMITED
PCTINCREASE 0
BUFFER_POOL DEFAULT
FLASH_CACHE DEFAULT
CELL_FLASH_CACHE DEFAULT
)
NOPARALLEL;
ALTER TABLE XXMKT.XXMKT_SEQUENCES ADD (
CONSTRAINT XXMKT_SEQUENCES_PK
PRIMARY KEY
(SEQ_TYPE_ID)
USING INDEX XXMKT.XXMKT_SEQUENCES_PK
ENABLE VALIDATE);
GRANT ALTER, DELETE, INDEX, INSERT, REFERENCES, SELECT, UPDATE, ON COMMIT REFRESH, QUERY REWRITE, READ, DEBUG, FLASHBACK ON XXMKT.XXMKT_SEQUENCES TO APPS WITH GRANT OPTION;
|
create or replace view v_jscs011_msgsource as
select a."JSDE948",a."DE011",a."JSDE916",a."DE042",a."JSDE955",a."JSDE915",a."DE194",a."DE193",a."DE195",a."JSDE004",a."CZDE089",a."DE001",a."CZDE090",a."CZDE091",a."JSDE909",a."JSDE901",a."DE022",a."MSGID",
bc_dw.GetDwmcByDm(de011, de022, JSDE955, 2) as DE041,a.czde013,a.de196
from jscs011 a
where nvl(CZDE090, 0) = 0;
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.