text
stringlengths
6
9.38M
ALTER TABLE visit ADD open TINYINT(1) AFTER final_date;
create schema if not exists exceptionmanager; set schema 'exceptionmanager'; create table quarantined_message ( id uuid not null, content_type varchar(255), error_reports jsonb, headers jsonb, message_hash varchar(255), message_payload bytea, queue varchar(255), routing_key varchar(255), service varchar(255), skipped_timestamp timestamp with time zone, primary key (id) );
ALTER TABLE TICKET_CERTS ADD UNIQUE (code);
create index IX_843CB86E on CMP_Computer (uuid_[$COLUMN_LENGTH:75$], companyId); create unique index IX_A0D48270 on CMP_Computer (uuid_[$COLUMN_LENGTH:75$], groupId);
/* Navicat MySQL Data Transfer Source Server : rm-uf6vl7168doce1268do.mysql.rds.aliyuncs.com Source Server Version : 50718 Source Host : rm-uf6vl7168doce1268do.mysql.rds.aliyuncs.com:3306 Source Database : nterp Target Server Type : MYSQL Target Server Version : 50718 File Encoding : 65001 Date: 2018-09-21 21:46:51 */ SET FOREIGN_KEY_CHECKS=0; -- ---------------------------- -- Table structure for chucuohuizong -- ---------------------------- DROP TABLE IF EXISTS `chucuohuizong`; CREATE TABLE `chucuohuizong` ( `uuid` int(11) NOT NULL AUTO_INCREMENT, `orderdate` date DEFAULT NULL, `styleid` varchar(255) DEFAULT NULL, `stylename` varchar(255) DEFAULT NULL, `status` varchar(255) DEFAULT NULL, `number` int(11) unsigned zerofill DEFAULT NULL, PRIMARY KEY (`uuid`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; -- ---------------------------- -- Records of chucuohuizong -- ---------------------------- INSERT INTO `chucuohuizong` VALUES ('1', '2018-09-21', '1', '1', '1', '00000000001');
create table DTJK_FORM_GRID ( ID NUMBER(10) not null, PRONAME VARCHAR2(30) not null, PROTYPE VARCHAR2(30), HIDDENNAME VARCHAR2(30), USEABLE VARCHAR2(1), ISEDIT VARCHAR2(1), ALIGN VARCHAR2(15), FCOLSPAN NUMBER(10) default 1, FROWSPAN NUMBER(10) default 1, EXP VARCHAR2(1000), SORT NUMBER(4,1), DISNAME VARCHAR2(40), LB VARCHAR2(30), ONCHANGE VARCHAR2(2000), ONFOCUS VARCHAR2(2000), WIDTH NUMBER(10), COLSPAN NUMBER(10), ROWSPAN NUMBER(10), MERGE VARCHAR2(1), SORTID NUMBER(18), RWIDTH NUMBER(10), HEIGHT NUMBER(10), RADIOS NUMBER(10), KEYINDEX VARCHAR2(100), VALIDATOR VARCHAR2(100), ONBLUR VARCHAR2(2000), ONKEYPRESS VARCHAR2(2000), ONCLICK VARCHAR2(2000), ONDBLCLICK VARCHAR2(2000), ISEMPTY VARCHAR2(5), ISBPX VARCHAR2(1) )
@clears @columns set pagesize 60 set pause off --spool tbs.lis set line 95 column TABLESPACE format a15 column INIT format 9999,999,999 column "NEXT " format 9999,999,999 column MIN format 999 column MAX format 99999 column PCT format 999 column STATUS format a10 column contents format a4 head 'TYPE' column extent_management format a6 head 'EXTENT|MGT' column segment_space_management format a7 head 'SEGMENT|SPACE|MGT' select substr(tablespace_name,1,20) TABLESPACE, status, substr(contents,1,4) contents, substr(extent_management,1,6) extent_management, segment_space_management, initial_extent INIT, next_extent "NEXT ", min_extents MIN, max_extents MAX, pct_increase PCT from dba_tablespaces order by tablespace_name ; --spool off
-- Desde el departamento de fidelización de clientes de musimundos vamos a sacar al mercado una campaña la cual implica que nuestros clientes van a tener un título que les otorgara beneficios a la hora de realizar compras. Para esto necesitamos crear una nueva tabla en nuestra base de datos. El nombre de la tabla será tipo_cliente y dentro tendrá dos columnas, la primera llamada id_tipo_cliente siendo un int(6) primary key not null. Y el segundo campo llamado titulo sera varchar(20) y not null -- Ingresá la consulta que creaste -- Tip: Escribila en mayúscula CREATE TABLE tipo_cliente{ id_tipo_cliente INT(6) PRIMARY KEY NOT NULL, titulo VARCHAR(20) NOT NULL } -- Al crear la tabla tipo_cliente el equipo de fidelización no tuvo en cuenta que cada tipo de cliente debe tener una cantidad de descuento asignada vos pasas por ahi y te preguntan si sabes algo de mysql. Hagamos una query que altere la tabla tipo_cliente agregando la columna porcentaje_descuento y que sea TINYINT UNSIGNED. --Escribí tu query en mayúscula. ALTER TABLE tipo_cliente{ add column porcentaje_descuento TINYINT UNSIGNED }
-- insert only admin user; INSERT INTO oskari_users(user_name, first_name, last_name, uuid) VALUES('admin', 'Oskari', 'Admin', 'asdf-asdf-asdf-asdf-asdf'); INSERT INTO oskari_role_oskari_user(user_id, role_id) VALUES((SELECT id FROM oskari_users WHERE user_name = 'admin'), (SELECT id FROM oskari_roles WHERE name = 'User')); INSERT INTO oskari_role_oskari_user(user_id, role_id) VALUES((SELECT id FROM oskari_users WHERE user_name = 'admin'), (SELECT id FROM oskari_roles WHERE name = 'Admin')); -- use admin/oskari credentials for admin user (user_name in oskari_users must match login on oskari_jaas_users); INSERT INTO oskari_jaas_users(login, password) VALUES('admin', '$2a$10$sWFKpoLsaOZ1Jo09b7oOe.B6Ndw8jNvmriO4I2GEcRUl9xVJIn496'); -- For selenium tests INSERT INTO oskari_users(user_name, first_name, last_name, uuid) VALUES('testirobot', 'Test', 'Robot', 'beep-bee-boop-pip-doo-weep'); INSERT INTO oskari_role_oskari_user(user_id, role_id) VALUES((SELECT id FROM oskari_users WHERE user_name = 'testirobot'), (SELECT id FROM oskari_roles WHERE name = 'User')); INSERT INTO oskari_jaas_users(login, password) VALUES('testirobot', '$2a$10$0GVF4vyhSqIQyvjLzOHTx.dyf9KkM5xPH2dePGaFkPxNsX2Szu9EC');
-- phpMyAdmin SQL Dump -- version 3.3.9 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Jul 13, 2017 at 07:22 AM -- Server version: 5.5.8 -- PHP Version: 5.3.5 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8 */; -- -- Database: `java` -- -- -------------------------------------------------------- -- -- Table structure for table `1flip1cover1iphone6` -- CREATE TABLE IF NOT EXISTS `1flip1cover1iphone6` ( `Price` varchar(20) DEFAULT NULL, `Description` varchar(40) DEFAULT NULL, `image` varchar(20) DEFAULT NULL, `quantity` varchar(20) DEFAULT NULL, `catagory` varchar(20) DEFAULT NULL, `subcatagory` varchar(20) DEFAULT NULL, `rating1` varchar(10) DEFAULT '130', `rating2` varchar(10) DEFAULT '130', `rating3` varchar(10) DEFAULT '130', `rating4` varchar(10) DEFAULT '130', `rating5` varchar(10) DEFAULT '130' ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `1flip1cover1iphone6` -- INSERT INTO `1flip1cover1iphone6` (`Price`, `Description`, `image`, `quantity`, `catagory`, `subcatagory`, `rating1`, `rating2`, `rating3`, `rating4`, `rating5`) VALUES ('900', 'Material: Artificial Leather', 'Case.jpg', '5', 'Electronics', 'Mobile1Accessories', '130', '130', '130', '130', '130'); -- -------------------------------------------------------- -- -- Table structure for table `a` -- CREATE TABLE IF NOT EXISTS `a` ( `catagories` varchar(20) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `a` -- -- -------------------------------------------------------- -- -- Table structure for table `ab1c` -- CREATE TABLE IF NOT EXISTS `ab1c` ( `username` varchar(30) DEFAULT NULL, `image` varchar(40) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `ab1c` -- -- -------------------------------------------------------- -- -- Table structure for table `abc` -- CREATE TABLE IF NOT EXISTS `abc` ( `name` varchar(20) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `abc` -- -- -------------------------------------------------------- -- -- Table structure for table `abc1` -- CREATE TABLE IF NOT EXISTS `abc1` ( `username` varchar(30) DEFAULT NULL, `image` varchar(40) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `abc1` -- -- -------------------------------------------------------- -- -- Table structure for table `ab_c` -- CREATE TABLE IF NOT EXISTS `ab_c` ( `name` varchar(20) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `ab_c` -- -- -------------------------------------------------------- -- -- Table structure for table `acer1aspire` -- CREATE TABLE IF NOT EXISTS `acer1aspire` ( `Price` varchar(20) DEFAULT NULL, `Description` varchar(40) DEFAULT NULL, `image` varchar(20) DEFAULT NULL, `quantity` varchar(20) DEFAULT NULL, `catagory` varchar(20) DEFAULT NULL, `subcatagory` varchar(20) DEFAULT NULL, `rating1` varchar(10) DEFAULT '130', `rating2` varchar(10) DEFAULT '130', `rating3` varchar(10) DEFAULT '130', `rating4` varchar(10) DEFAULT '130', `rating5` varchar(10) DEFAULT '130' ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `acer1aspire` -- INSERT INTO `acer1aspire` (`Price`, `Description`, `image`, `quantity`, `catagory`, `subcatagory`, `rating1`, `rating2`, `rating3`, `rating4`, `rating5`) VALUES ('24000', 'Quad core,500 GB HDD', 'Acer-Aspire.jpg', '20', 'Electronics', 'Laptops', '130', '130', '130', '131', '130'); -- -------------------------------------------------------- -- -- Table structure for table `acer1one1atom` -- CREATE TABLE IF NOT EXISTS `acer1one1atom` ( `Price` varchar(20) DEFAULT NULL, `Description` varchar(40) DEFAULT NULL, `image` varchar(20) DEFAULT NULL, `quantity` varchar(20) DEFAULT NULL, `catagory` varchar(20) DEFAULT NULL, `subcatagory` varchar(20) DEFAULT NULL, `rating1` varchar(10) DEFAULT '130', `rating2` varchar(10) DEFAULT '130', `rating3` varchar(10) DEFAULT '130', `rating5` varchar(10) DEFAULT '130', `rating4` varchar(10) DEFAULT '130' ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `acer1one1atom` -- INSERT INTO `acer1one1atom` (`Price`, `Description`, `image`, `quantity`, `catagory`, `subcatagory`, `rating1`, `rating2`, `rating3`, `rating5`, `rating4`) VALUES ('23000', 'Quad core-2GB,32Gb SSD', 'Aspire-S13.png', '29', 'Electronics', 'Laptops', '130', '130', '130', '130', '130'); -- -------------------------------------------------------- -- -- Table structure for table `adidas1shoes` -- CREATE TABLE IF NOT EXISTS `adidas1shoes` ( `Price` varchar(20) DEFAULT NULL, `Description` varchar(40) DEFAULT NULL, `image` varchar(20) DEFAULT NULL, `quantity` varchar(20) DEFAULT NULL, `catagory` varchar(20) DEFAULT NULL, `subcatagory` varchar(20) DEFAULT NULL, `rating1` varchar(10) DEFAULT '314', `rating2` varchar(10) DEFAULT '314', `rating3` varchar(10) DEFAULT '14', `rating4` varchar(10) DEFAULT '14', `rating5` varchar(10) DEFAULT '14' ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `adidas1shoes` -- INSERT INTO `adidas1shoes` (`Price`, `Description`, `image`, `quantity`, `catagory`, `subcatagory`, `rating1`, `rating2`, `rating3`, `rating4`, `rating5`) VALUES ('1400', 'Good', 'adida.jpg', '5', 'Footwear', 'Sports1Shoes', '314', '314', '14', '14', '14'); -- -------------------------------------------------------- -- -- Table structure for table `admin` -- CREATE TABLE IF NOT EXISTS `admin` ( `username` varchar(20) DEFAULT NULL, `password` varchar(22) DEFAULT NULL, `catagory` varchar(20) DEFAULT NULL, `subcatagory` varchar(20) DEFAULT NULL, `product` varchar(20) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `admin` -- INSERT INTO `admin` (`username`, `password`, `catagory`, `subcatagory`, `product`) VALUES ('tushar', 'qwerty', 'Clothing', NULL, NULL); -- -------------------------------------------------------- -- -- Table structure for table `akg1k67` -- CREATE TABLE IF NOT EXISTS `akg1k67` ( `Price` varchar(20) DEFAULT NULL, `Description` varchar(180) DEFAULT NULL, `image` varchar(50) DEFAULT NULL, `quantity` varchar(20) DEFAULT NULL, `catagory` varchar(20) DEFAULT NULL, `subcatagory` varchar(20) DEFAULT NULL, `rating1` varchar(10) DEFAULT '120', `rating2` varchar(10) DEFAULT '120', `rating3` varchar(10) DEFAULT '128', `rating4` varchar(10) DEFAULT '128', `rating5` varchar(10) DEFAULT '128' ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `akg1k67` -- INSERT INTO `akg1k67` (`Price`, `Description`, `image`, `quantity`, `catagory`, `subcatagory`, `rating1`, `rating2`, `rating3`, `rating4`, `rating5`) VALUES ('12098', 'Design: Over the Head | Type: Stereo Dynamic headphoneCompatible With: Mobile, Tablet, LaptopBluetooth Support: No | Wired', 'k167_standard_white.jpg', '44', 'Electronics', 'Mobile1Accessories', '120', '120', '128', '128', '128'); -- -------------------------------------------------------- -- -- Table structure for table `apple1imac` -- CREATE TABLE IF NOT EXISTS `apple1imac` ( `Price` varchar(20) DEFAULT NULL, `Description` varchar(180) DEFAULT NULL, `image` varchar(50) DEFAULT NULL, `quantity` varchar(20) DEFAULT NULL, `catagory` varchar(20) DEFAULT NULL, `subcatagory` varchar(20) DEFAULT NULL, `rating1` varchar(10) DEFAULT '130', `rating2` varchar(10) DEFAULT '130', `rating3` varchar(10) DEFAULT '130', `rating4` varchar(10) DEFAULT '130', `rating5` varchar(10) DEFAULT '130' ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `apple1imac` -- INSERT INTO `apple1imac` (`Price`, `Description`, `image`, `quantity`, `catagory`, `subcatagory`, `rating1`, `rating2`, `rating3`, `rating4`, `rating5`) VALUES ('82000', '8 GB RAMMac OS X SierraWhite,21.5 inch Screen', 'apple-imac.jpeg', '34', 'Electronics', 'Laptops', '33', '29', '41', '124', '259'); -- -------------------------------------------------------- -- -- Table structure for table `arrow1sports1men1t2shirt` -- CREATE TABLE IF NOT EXISTS `arrow1sports1men1t2shirt` ( `Price` varchar(20) DEFAULT NULL, `Description` varchar(280) DEFAULT NULL, `image` varchar(150) DEFAULT NULL, `quantity` varchar(20) DEFAULT NULL, `rating1` varchar(10) DEFAULT NULL, `rating2` varchar(10) DEFAULT NULL, `rating3` varchar(10) DEFAULT NULL, `rating4` varchar(10) DEFAULT NULL, `rating5` varchar(10) DEFAULT NULL, `catagory` varchar(20) DEFAULT NULL, `subcatagory` varchar(20) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `arrow1sports1men1t2shirt` -- INSERT INTO `arrow1sports1men1t2shirt` (`Price`, `Description`, `image`, `quantity`, `rating1`, `rating2`, `rating3`, `rating4`, `rating5`, `catagory`, `subcatagory`) VALUES ('999', ' Fabric: Cotton Polyester Blend Regular Fit Round Neck T-shirt Pattern: Solid Half Sleeve', 'arrow.jpg', '34', '9', '3', '45', '67', '0', 'Men', 'T2Shirts'); -- -------------------------------------------------------- -- -- Table structure for table `a_bc` -- CREATE TABLE IF NOT EXISTS `a_bc` ( `name` varchar(20) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `a_bc` -- -- -------------------------------------------------------- -- -- Table structure for table `baby_care` -- CREATE TABLE IF NOT EXISTS `baby_care` ( `products` varchar(100) DEFAULT NULL, `image` varchar(40) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `baby_care` -- -- -------------------------------------------------------- -- -- Table structure for table `baldevjncart` -- CREATE TABLE IF NOT EXISTS `baldevjncart` ( `products` varchar(100) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `baldevjncart` -- INSERT INTO `baldevjncart` (`products`) VALUES ('Peter Sunglasses'); -- -------------------------------------------------------- -- -- Table structure for table `baldevjnorders` -- CREATE TABLE IF NOT EXISTS `baldevjnorders` ( `orders` varchar(100) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `baldevjnorders` -- INSERT INTO `baldevjnorders` (`orders`) VALUES ('LG1241inch'); -- -------------------------------------------------------- -- -- Table structure for table `bangle` -- CREATE TABLE IF NOT EXISTS `bangle` ( `Price` varchar(20) DEFAULT NULL, `Description` varchar(40) DEFAULT NULL, `image` varchar(20) DEFAULT NULL, `quantity` varchar(20) DEFAULT NULL, `catagory` varchar(20) DEFAULT NULL, `subcatagory` varchar(20) DEFAULT NULL, `rating1` varchar(10) DEFAULT '314', `rating2` varchar(10) DEFAULT '31', `rating3` varchar(10) DEFAULT '31', `rating4` varchar(10) DEFAULT '431', `rating5` varchar(10) DEFAULT '31' ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `bangle` -- INSERT INTO `bangle` (`Price`, `Description`, `image`, `quantity`, `catagory`, `subcatagory`, `rating1`, `rating2`, `rating3`, `rating4`, `rating5`) VALUES ('2300', 'Good', 'stud.jpeg', '3', 'Women', 'Jewellery', '314', '31', '31', '431', '31'); -- -------------------------------------------------------- -- -- Table structure for table `benetton1men1red1t2shirt` -- CREATE TABLE IF NOT EXISTS `benetton1men1red1t2shirt` ( `Price` varchar(20) DEFAULT NULL, `Description` varchar(280) DEFAULT NULL, `image` varchar(150) DEFAULT NULL, `quantity` varchar(20) DEFAULT NULL, `rating1` varchar(10) DEFAULT NULL, `rating2` varchar(10) DEFAULT NULL, `rating3` varchar(10) DEFAULT NULL, `rating4` varchar(10) DEFAULT NULL, `rating5` varchar(10) DEFAULT NULL, `catagory` varchar(20) DEFAULT NULL, `subcatagory` varchar(20) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `benetton1men1red1t2shirt` -- INSERT INTO `benetton1men1red1t2shirt` (`Price`, `Description`, `image`, `quantity`, `rating1`, `rating2`, `rating3`, `rating4`, `rating5`, `catagory`, `subcatagory`) VALUES ('848', ' Fabric: Cotton Slim Fit Polo Neck T-shirt Pattern: Printed Short Sleeve', 'united-colors.jpg', '34', '1', '0', '45', '64', '1', 'Men', 'T2Shirts'); -- -------------------------------------------------------- -- -- Table structure for table `benetton1solid1men1black1t2shirt` -- CREATE TABLE IF NOT EXISTS `benetton1solid1men1black1t2shirt` ( `Price` varchar(20) DEFAULT NULL, `Description` varchar(280) DEFAULT NULL, `image` varchar(150) DEFAULT NULL, `quantity` varchar(20) DEFAULT NULL, `rating1` varchar(10) DEFAULT NULL, `rating2` varchar(10) DEFAULT NULL, `rating3` varchar(10) DEFAULT NULL, `rating4` varchar(10) DEFAULT NULL, `rating5` varchar(10) DEFAULT NULL, `catagory` varchar(20) DEFAULT NULL, `subcatagory` varchar(20) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `benetton1solid1men1black1t2shirt` -- INSERT INTO `benetton1solid1men1black1t2shirt` (`Price`, `Description`, `image`, `quantity`, `rating1`, `rating2`, `rating3`, `rating4`, `rating5`, `catagory`, `subcatagory`) VALUES ('877', ' Fabric: Cotton Slim Fit Polo Neck T-shirt Pattern: Solid Short Sleeve', 'UnitedColorsofBenetton.jpg', '34', '1', '1', '48', '64', '1', 'Men', 'T2Shirts'); -- -------------------------------------------------------- -- -- Table structure for table `bjqw` -- CREATE TABLE IF NOT EXISTS `bjqw` ( `Price` varchar(20) DEFAULT NULL, `Description` varchar(180) DEFAULT NULL, `image` varchar(50) DEFAULT NULL, `quantity` varchar(20) DEFAULT NULL, `rating` varchar(20) DEFAULT NULL, `catagory` varchar(20) DEFAULT NULL, `subcatagory` varchar(20) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `bjqw` -- INSERT INTO `bjqw` (`Price`, `Description`, `image`, `quantity`, `rating`, `catagory`, `subcatagory`) VALUES ('xsax', 'xxq', 'samsunglcd.jpg', '2', '4', 'Electronics', 'Televisions'); -- -------------------------------------------------------- -- -- Table structure for table `books` -- CREATE TABLE IF NOT EXISTS `books` ( `subcatagories` varchar(20) DEFAULT NULL, `image` varchar(40) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `books` -- -- -------------------------------------------------------- -- -- Table structure for table `bose1soundtrue1ulta` -- CREATE TABLE IF NOT EXISTS `bose1soundtrue1ulta` ( `Price` varchar(20) DEFAULT NULL, `Description` varchar(180) DEFAULT NULL, `image` varchar(50) DEFAULT NULL, `quantity` varchar(20) DEFAULT NULL, `rating` varchar(20) DEFAULT NULL, `catagory` varchar(20) DEFAULT NULL, `subcatagory` varchar(20) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `bose1soundtrue1ulta` -- INSERT INTO `bose1soundtrue1ulta` (`Price`, `Description`, `image`, `quantity`, `rating`, `catagory`, `subcatagory`) VALUES ('11536', 'Design: Canalphone | Type: in the earCompatible With: Mobile, TabletBluetooth Support: No | Wire', 'bosshead.png', '31', '4.5', 'Electronics', 'Mobile1Accessories'); -- -------------------------------------------------------- -- -- Table structure for table `camara1mini` -- CREATE TABLE IF NOT EXISTS `camara1mini` ( `Price` varchar(20) DEFAULT NULL, `Description` varchar(40) DEFAULT NULL, `image` varchar(20) DEFAULT NULL, `quantity` varchar(20) DEFAULT NULL, `catagory` varchar(20) DEFAULT NULL, `subcatagory` varchar(20) DEFAULT NULL, `rating` int(11) DEFAULT '4' ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `camara1mini` -- INSERT INTO `camara1mini` (`Price`, `Description`, `image`, `quantity`, `catagory`, `subcatagory`, `rating`) VALUES ('2200', 'Good', 'camara.jpg', '64', 'Home1and1Living', 'Home1and1Appliances', 4); -- -------------------------------------------------------- -- -- Table structure for table `cameras` -- CREATE TABLE IF NOT EXISTS `cameras` ( `products` varchar(20) DEFAULT NULL, `image` varchar(40) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `cameras` -- INSERT INTO `cameras` (`products`, `image`) VALUES ('Nikon1DSLR', 'nikon.jpg'), ('Fujifilm1Instax1Wide', 'Fujifilm.jpg'); -- -------------------------------------------------------- -- -- Table structure for table `campus1sutra1solid1men1grey1t2shirt` -- CREATE TABLE IF NOT EXISTS `campus1sutra1solid1men1grey1t2shirt` ( `Price` varchar(20) DEFAULT NULL, `Description` varchar(280) DEFAULT NULL, `image` varchar(150) DEFAULT NULL, `quantity` varchar(20) DEFAULT NULL, `rating1` varchar(10) DEFAULT NULL, `rating2` varchar(10) DEFAULT NULL, `rating3` varchar(10) DEFAULT NULL, `rating4` varchar(10) DEFAULT NULL, `rating5` varchar(10) DEFAULT NULL, `catagory` varchar(20) DEFAULT NULL, `subcatagory` varchar(20) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `campus1sutra1solid1men1grey1t2shirt` -- INSERT INTO `campus1sutra1solid1men1grey1t2shirt` (`Price`, `Description`, `image`, `quantity`, `rating1`, `rating2`, `rating3`, `rating4`, `rating5`, `catagory`, `subcatagory`) VALUES ('807', ' Fabric: Cotton Regular Fit Round Neck T-shirt Pattern: Solid Sleeve Type: Narrow Full Sleeve', 'campus.jpg', '22', '4', '0', '45', '64', '0', 'Men', 'T2Shirts'); -- -------------------------------------------------------- -- -- Table structure for table `caps` -- CREATE TABLE IF NOT EXISTS `caps` ( `products` varchar(20) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `caps` -- -- -------------------------------------------------------- -- -- Table structure for table `casio1enticer1men1analog1watch121for1men` -- CREATE TABLE IF NOT EXISTS `casio1enticer1men1analog1watch121for1men` ( `Price` varchar(20) DEFAULT NULL, `Description` varchar(280) DEFAULT NULL, `image` varchar(150) DEFAULT NULL, `quantity` varchar(20) DEFAULT NULL, `rating1` varchar(10) DEFAULT NULL, `rating2` varchar(10) DEFAULT NULL, `rating3` varchar(10) DEFAULT NULL, `rating4` varchar(10) DEFAULT NULL, `rating5` varchar(10) DEFAULT NULL, `catagory` varchar(20) DEFAULT NULL, `subcatagory` varchar(20) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `casio1enticer1men1analog1watch121for1men` -- INSERT INTO `casio1enticer1men1analog1watch121for1men` (`Price`, `Description`, `image`, `quantity`, `rating1`, `rating2`, `rating3`, `rating4`, `rating5`, `catagory`, `subcatagory`) VALUES ('2234', 'Watch Movement: QuartzWater Resistant (50 m)Display Type: AnalogStrap: Black, Genuine Leather', 'casio2.jpg', '39', '3', '40', '45', '64', '42', 'Men', 'Watches'); -- -------------------------------------------------------- -- -- Table structure for table `casio1youth1series1analog1digital1watch` -- CREATE TABLE IF NOT EXISTS `casio1youth1series1analog1digital1watch` ( `Price` varchar(20) DEFAULT NULL, `Description` varchar(280) DEFAULT NULL, `image` varchar(150) DEFAULT NULL, `quantity` varchar(20) DEFAULT NULL, `rating1` varchar(10) DEFAULT NULL, `rating2` varchar(10) DEFAULT NULL, `rating3` varchar(10) DEFAULT NULL, `rating4` varchar(10) DEFAULT NULL, `rating5` varchar(10) DEFAULT NULL, `catagory` varchar(20) DEFAULT NULL, `subcatagory` varchar(20) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `casio1youth1series1analog1digital1watch` -- INSERT INTO `casio1youth1series1analog1digital1watch` (`Price`, `Description`, `image`, `quantity`, `rating1`, `rating2`, `rating3`, `rating4`, `rating5`, `catagory`, `subcatagory`) VALUES ('2976', 'Watch Movement: QuartzWater Resistant (50 m)Display Type: Analog-DigitalStrap: Black, Resin', 'casio1.jpg', '21', '1', '40', '45', '64', '40', 'Men', 'Watches'); -- -------------------------------------------------------- -- -- Table structure for table `casio1youth1series1analog1digital1watch2for1men` -- CREATE TABLE IF NOT EXISTS `casio1youth1series1analog1digital1watch2for1men` ( `Price` varchar(20) DEFAULT NULL, `Description` varchar(280) DEFAULT NULL, `image` varchar(150) DEFAULT NULL, `quantity` varchar(20) DEFAULT NULL, `rating1` varchar(10) DEFAULT NULL, `rating2` varchar(10) DEFAULT NULL, `rating3` varchar(10) DEFAULT NULL, `rating4` varchar(10) DEFAULT NULL, `rating5` varchar(10) DEFAULT NULL, `catagory` varchar(20) DEFAULT NULL, `subcatagory` varchar(20) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `casio1youth1series1analog1digital1watch2for1men` -- INSERT INTO `casio1youth1series1analog1digital1watch2for1men` (`Price`, `Description`, `image`, `quantity`, `rating1`, `rating2`, `rating3`, `rating4`, `rating5`, `catagory`, `subcatagory`) VALUES ('2960', ' Watch Movement: Quartz Water Resistant (50 m) Display Type: Analog-Digital Strap: Black, Resin Date Display Available', 'casio1.jpg', '29', '1', '40', '45', '64', '40', 'Men', 'Sunglasses'); -- -------------------------------------------------------- -- -- Table structure for table `catagory` -- CREATE TABLE IF NOT EXISTS `catagory` ( `catagories` varchar(20) DEFAULT NULL, `image` varchar(40) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `catagory` -- INSERT INTO `catagory` (`catagories`, `image`) VALUES ('Electronics', 'electronics.jpg'), ('Kids', 'baby.jpg'), ('Men', 'men.jpg'), ('Women', 'women.jpg'), ('Footwear', 'foot.jpg'), ('Books', 'books.jpg'), ('Sports', 'sport.jpg'), ('Gaming', 'gaming.png'), ('Home1and1Living', 'sofa.jpg'); -- -------------------------------------------------------- -- -- Table structure for table `clothing` -- CREATE TABLE IF NOT EXISTS `clothing` ( `subcatagories` varchar(20) DEFAULT NULL, `image` varchar(40) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `clothing` -- INSERT INTO `clothing` (`subcatagories`, `image`) VALUES ('Tshirt', 'cloth_image.jpg'), ('Trousers', 'trouser.jpg'); -- -------------------------------------------------------- -- -- Table structure for table `dell1inspiron` -- CREATE TABLE IF NOT EXISTS `dell1inspiron` ( `Price` varchar(20) DEFAULT NULL, `Description` varchar(40) DEFAULT NULL, `image` varchar(20) DEFAULT NULL, `quantity` varchar(20) DEFAULT NULL, `catagory` varchar(20) DEFAULT NULL, `subcatagory` varchar(20) DEFAULT NULL, `rating1` varchar(10) DEFAULT '130', `rating2` varchar(10) DEFAULT '130', `rating3` varchar(10) DEFAULT '130', `rating4` varchar(10) DEFAULT '130', `rating5` varchar(10) DEFAULT '130' ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `dell1inspiron` -- INSERT INTO `dell1inspiron` (`Price`, `Description`, `image`, `quantity`, `catagory`, `subcatagory`, `rating1`, `rating2`, `rating3`, `rating4`, `rating5`) VALUES ('62000', 'Intel Core i7 Processor', 'dell32.JPG', '3', 'Electronics', 'Laptops', '130', '130', '130', '131', '130'); -- -------------------------------------------------------- -- -- Table structure for table `dell1inspiron1apu` -- CREATE TABLE IF NOT EXISTS `dell1inspiron1apu` ( `Price` varchar(20) DEFAULT NULL, `Description` varchar(40) DEFAULT NULL, `image` varchar(20) DEFAULT NULL, `quantity` varchar(20) DEFAULT NULL, `catagory` varchar(20) DEFAULT NULL, `subcatagory` varchar(20) DEFAULT NULL, `rating1` varchar(10) DEFAULT '130', `rating2` varchar(10) DEFAULT '130', `rating3` varchar(10) DEFAULT '130', `rating4` varchar(10) DEFAULT '130', `rating5` varchar(10) DEFAULT '130' ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `dell1inspiron1apu` -- INSERT INTO `dell1inspiron1apu` (`Price`, `Description`, `image`, `quantity`, `catagory`, `subcatagory`, `rating1`, `rating2`, `rating3`, `rating4`, `rating5`) VALUES ('20000', 'Intel Core i7 Processor8 GB DDR4 RAM', 'dell-2520-core.jpg', '5', 'Electronics', 'Laptops', '130', '130', '130', '130', '130'); -- -------------------------------------------------------- -- -- Table structure for table `electronics` -- CREATE TABLE IF NOT EXISTS `electronics` ( `subcatagories` varchar(20) DEFAULT NULL, `image` varchar(40) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `electronics` -- INSERT INTO `electronics` (`subcatagories`, `image`) VALUES ('Mobiles', 'mobile.jpg'), ('Televisions', 'tv.jpg'), ('Mobile1Accessories', 'mobile_accessories_2.jpg'), ('Laptops', 'laptop1.jpg'), ('Cameras', 'camera.jpg'); -- -------------------------------------------------------- -- -- Table structure for table `fasttrack` -- CREATE TABLE IF NOT EXISTS `fasttrack` ( `Price` varchar(20) DEFAULT NULL, `Description` varchar(40) DEFAULT NULL, `image` varchar(20) DEFAULT NULL, `quantity` varchar(20) DEFAULT NULL, `catagory` varchar(20) DEFAULT NULL, `subcatagory` varchar(20) DEFAULT NULL, `rating1` varchar(10) DEFAULT '314', `rating2` varchar(10) DEFAULT '314', `rating3` varchar(10) DEFAULT '34', `rating4` varchar(10) DEFAULT '354', `rating5` varchar(10) DEFAULT '354' ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `fasttrack` -- INSERT INTO `fasttrack` (`Price`, `Description`, `image`, `quantity`, `catagory`, `subcatagory`, `rating1`, `rating2`, `rating3`, `rating4`, `rating5`) VALUES ('2000', 'Average', 'fastrack.jpeg', '0', 'Men', 'Watches', '314', '314', '34', '354', '354'); -- -------------------------------------------------------- -- -- Table structure for table `flip1cover1iphone5` -- CREATE TABLE IF NOT EXISTS `flip1cover1iphone5` ( `Price` varchar(20) DEFAULT NULL, `Description` varchar(40) DEFAULT NULL, `image` varchar(20) DEFAULT NULL, `quantity` varchar(20) DEFAULT NULL, `catagory` varchar(20) DEFAULT NULL, `subcatagory` varchar(20) DEFAULT NULL, `rating1` varchar(10) DEFAULT '130', `rating2` varchar(10) DEFAULT '130', `rating3` varchar(10) DEFAULT '130', `rating4` varchar(10) DEFAULT '130', `rating5` varchar(10) DEFAULT '130' ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `flip1cover1iphone5` -- INSERT INTO `flip1cover1iphone5` (`Price`, `Description`, `image`, `quantity`, `catagory`, `subcatagory`, `rating1`, `rating2`, `rating3`, `rating4`, `rating5`) VALUES ('500', 'Material: Artificial Leather', 'Cover-Iphone-5.jpg', '3', 'Electronics', 'Mobile1Accessories', '130', '130', '130', '130', '130'); -- -------------------------------------------------------- -- -- Table structure for table `footwear` -- CREATE TABLE IF NOT EXISTS `footwear` ( `subcatagories` varchar(20) DEFAULT NULL, `image` varchar(40) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `footwear` -- INSERT INTO `footwear` (`subcatagories`, `image`) VALUES ('Sports1Shoes', 'sports.jpg'), ('Loafers', 'loafers_1.jpg'); -- -------------------------------------------------------- -- -- Table structure for table `fujifilm1instax1wide` -- CREATE TABLE IF NOT EXISTS `fujifilm1instax1wide` ( `Price` varchar(20) DEFAULT NULL, `Description` varchar(280) DEFAULT NULL, `image` varchar(150) DEFAULT NULL, `quantity` varchar(20) DEFAULT NULL, `rating1` varchar(10) DEFAULT NULL, `rating2` varchar(10) DEFAULT NULL, `rating3` varchar(10) DEFAULT NULL, `rating4` varchar(10) DEFAULT NULL, `rating5` varchar(10) DEFAULT NULL, `catagory` varchar(20) DEFAULT NULL, `subcatagory` varchar(20) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `fujifilm1instax1wide` -- INSERT INTO `fujifilm1instax1wide` (`Price`, `Description`, `image`, `quantity`, `rating1`, `rating2`, `rating3`, `rating4`, `rating5`, `catagory`, `subcatagory`) VALUES ('8999', 'Max Shutter Speed: 1/400', 'Fujifilm.jpg', '56', '1', '0', '45', '64', '0', 'Electronics', 'Cameras'); -- -------------------------------------------------------- -- -- Table structure for table `furniture` -- CREATE TABLE IF NOT EXISTS `furniture` ( `products` varchar(20) DEFAULT NULL, `image` varchar(40) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `furniture` -- -- -------------------------------------------------------- -- -- Table structure for table `gaming` -- CREATE TABLE IF NOT EXISTS `gaming` ( `subcatagories` varchar(20) DEFAULT NULL, `image` varchar(40) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `gaming` -- -- -------------------------------------------------------- -- -- Table structure for table `gas` -- CREATE TABLE IF NOT EXISTS `gas` ( `Price` varchar(20) DEFAULT NULL, `Description` varchar(40) DEFAULT NULL, `image` varchar(20) DEFAULT NULL, `quantity` varchar(20) DEFAULT NULL, `catagory` varchar(20) DEFAULT NULL, `subcatagory` varchar(20) DEFAULT NULL, `rating1` varchar(10) DEFAULT '314', `rating2` varchar(10) DEFAULT '314', `rating3` varchar(10) DEFAULT '314', `rating4` varchar(10) DEFAULT '34', `rating5` varchar(10) DEFAULT '34' ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `gas` -- INSERT INTO `gas` (`Price`, `Description`, `image`, `quantity`, `catagory`, `subcatagory`, `rating1`, `rating2`, `rating3`, `rating4`, `rating5`) VALUES ('2300', 'Good', 'gas.jpg', '3', 'Footwear', 'Sports1Shoes', '314', '314', '314', '34', '34'); -- -------------------------------------------------------- -- -- Table structure for table `google1pixel` -- CREATE TABLE IF NOT EXISTS `google1pixel` ( `Price` varchar(20) DEFAULT NULL, `Description` varchar(40) DEFAULT NULL, `image` varchar(20) DEFAULT NULL, `quantity` varchar(20) DEFAULT NULL, `catagory` varchar(20) DEFAULT NULL, `subcatagory` varchar(20) DEFAULT NULL, `rating1` varchar(10) DEFAULT '130', `rating2` varchar(10) DEFAULT '130', `rating3` varchar(10) DEFAULT '130', `rating4` varchar(10) DEFAULT '130', `rating5` varchar(10) DEFAULT '130', `image2` varchar(60) DEFAULT 'galaxy.jpg' ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `google1pixel` -- INSERT INTO `google1pixel` (`Price`, `Description`, `image`, `quantity`, `catagory`, `subcatagory`, `rating1`, `rating2`, `rating3`, `rating4`, `rating5`, `image2`) VALUES ('57000', '4GB RAM,5 inch display ', 'google.jpg', '2', 'Electronics', 'Mobiles', '130', '130', '130', '130', '130', 'pixel2.jpg'); -- -------------------------------------------------------- -- -- Table structure for table `home1&1living` -- CREATE TABLE IF NOT EXISTS `home1&1living` ( `subcatagories` varchar(20) DEFAULT NULL, `image` varchar(40) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `home1&1living` -- INSERT INTO `home1&1living` (`subcatagories`, `image`) VALUES ('Furniture', 'furniture.jpg'), ('Home1and1Appliances', 'home1.jpg'); -- -------------------------------------------------------- -- -- Table structure for table `home1and1appliances` -- CREATE TABLE IF NOT EXISTS `home1and1appliances` ( `products` varchar(20) DEFAULT NULL, `image` varchar(40) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `home1and1appliances` -- INSERT INTO `home1and1appliances` (`products`, `image`) VALUES ('camara1mini', 'camara.jpg'); -- -------------------------------------------------------- -- -- Table structure for table `home1and1living` -- CREATE TABLE IF NOT EXISTS `home1and1living` ( `subcatagories` varchar(40) DEFAULT NULL, `image` varchar(60) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `home1and1living` -- -- -------------------------------------------------------- -- -- Table structure for table `hp1apu` -- CREATE TABLE IF NOT EXISTS `hp1apu` ( `Price` varchar(20) DEFAULT NULL, `Description` varchar(40) DEFAULT NULL, `image` varchar(20) DEFAULT NULL, `quantity` varchar(20) DEFAULT NULL, `catagory` varchar(20) DEFAULT NULL, `subcatagory` varchar(20) DEFAULT NULL, `rating1` varchar(10) DEFAULT '130', `rating2` varchar(10) DEFAULT '130', `rating3` varchar(10) DEFAULT '130', `rating4` varchar(10) DEFAULT '130', `rating5` varchar(10) DEFAULT '130' ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `hp1apu` -- INSERT INTO `hp1apu` (`Price`, `Description`, `image`, `quantity`, `catagory`, `subcatagory`, `rating1`, `rating2`, `rating3`, `rating4`, `rating5`) VALUES ('30000', '1TB', 'hp.jpeg', '3', 'Electronics', 'Laptops', '130', '130', '130', '130', '139'); -- -------------------------------------------------------- -- -- Table structure for table `hp1omen` -- CREATE TABLE IF NOT EXISTS `hp1omen` ( `Price` varchar(20) DEFAULT NULL, `Description` varchar(40) DEFAULT NULL, `image` varchar(20) DEFAULT NULL, `quantity` varchar(20) DEFAULT NULL, `catagory` varchar(20) DEFAULT NULL, `subcatagory` varchar(20) DEFAULT NULL, `rating1` varchar(10) DEFAULT '130', `rating2` varchar(10) DEFAULT '130', `rating3` varchar(10) DEFAULT '130', `rating4` varchar(10) DEFAULT '130', `rating5` varchar(10) DEFAULT '130' ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `hp1omen` -- INSERT INTO `hp1omen` (`Price`, `Description`, `image`, `quantity`, `catagory`, `subcatagory`, `rating1`, `rating2`, `rating3`, `rating4`, `rating5`) VALUES ('98000', 'NVIDIA GTX Graphics 1050i', 'omen.jpg', '4', 'Electronics', 'Laptops', '130', '0', '0', '0', '0'); -- -------------------------------------------------------- -- -- Table structure for table `hp24inch` -- CREATE TABLE IF NOT EXISTS `hp24inch` ( `Price` varchar(20) DEFAULT NULL, `Description` varchar(40) DEFAULT NULL, `image` varchar(20) DEFAULT NULL, `quantity` varchar(20) DEFAULT NULL, `catagory` varchar(20) DEFAULT NULL, `subcatagory` varchar(20) DEFAULT NULL, `rating1` varchar(10) DEFAULT '130', `rating2` varchar(10) DEFAULT '130', `rating3` varchar(10) DEFAULT '130', `rating4` varchar(10) DEFAULT '130', `rating5` varchar(10) DEFAULT '130' ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `hp24inch` -- INSERT INTO `hp24inch` (`Price`, `Description`, `image`, `quantity`, `catagory`, `subcatagory`, `rating1`, `rating2`, `rating3`, `rating4`, `rating5`) VALUES ('50000', 'good', 'laptop.jpg', '782', 'Electronics', 'Laptops', '130', '130', '130', '130', '131'); -- -------------------------------------------------------- -- -- Table structure for table `hp_core_i5` -- CREATE TABLE IF NOT EXISTS `hp_core_i5` ( `Price` varchar(20) DEFAULT NULL, `Description` varchar(40) DEFAULT NULL, `image` varchar(20) DEFAULT NULL, `quantity` varchar(20) DEFAULT NULL, `catagory` varchar(20) DEFAULT NULL, `subcatagory` varchar(20) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `hp_core_i5` -- -- -------------------------------------------------------- -- -- Table structure for table `hupshy1round1sunglasses` -- CREATE TABLE IF NOT EXISTS `hupshy1round1sunglasses` ( `Price` varchar(20) DEFAULT NULL, `Description` varchar(280) DEFAULT NULL, `image` varchar(150) DEFAULT NULL, `quantity` varchar(20) DEFAULT NULL, `rating1` varchar(10) DEFAULT NULL, `rating2` varchar(10) DEFAULT NULL, `rating3` varchar(10) DEFAULT NULL, `rating4` varchar(10) DEFAULT NULL, `rating5` varchar(10) DEFAULT NULL, `catagory` varchar(20) DEFAULT NULL, `subcatagory` varchar(20) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `hupshy1round1sunglasses` -- INSERT INTO `hupshy1round1sunglasses` (`Price`, `Description`, `image`, `quantity`, `rating1`, `rating2`, `rating3`, `rating4`, `rating5`, `catagory`, `subcatagory`) VALUES ('390', 'Frame Size: M (S: 40-48mm, M: 49-54mm, L: 55 mm)Lens Color: Silver, BlueFeatures: UV Protection, Gradient, MirroredPurpose: Driving, Biking, Eye Protection, ', 'hupshy.jpeg', '19', '6', '42', '47', '64', '40', 'Men', 'Sunglasses'); -- -------------------------------------------------------- -- -- Table structure for table `ipro1powerbank` -- CREATE TABLE IF NOT EXISTS `ipro1powerbank` ( `Price` varchar(20) DEFAULT NULL, `Description` varchar(40) DEFAULT NULL, `image` varchar(20) DEFAULT NULL, `quantity` varchar(20) DEFAULT NULL, `catagory` varchar(20) DEFAULT NULL, `subcatagory` varchar(20) DEFAULT NULL, `rating1` varchar(10) DEFAULT '130', `rating2` varchar(10) DEFAULT '130', `rating3` varchar(10) DEFAULT '130', `rating4` varchar(10) DEFAULT '130', `rating5` varchar(10) DEFAULT '130' ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `ipro1powerbank` -- INSERT INTO `ipro1powerbank` (`Price`, `Description`, `image`, `quantity`, `catagory`, `subcatagory`, `rating1`, `rating2`, `rating3`, `rating4`, `rating5`) VALUES ('600', 'For Mobile', 'powerbank.jpeg', '5', 'Electronics', 'Mobile1Accessories', '130', '130', '130', '130', '130'); -- -------------------------------------------------------- -- -- Table structure for table `jewellery` -- CREATE TABLE IF NOT EXISTS `jewellery` ( `products` varchar(20) DEFAULT NULL, `image` varchar(40) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `jewellery` -- INSERT INTO `jewellery` (`products`, `image`) VALUES ('Stud', 'stud.jpeg'), ('Bangle', 'stud.jpeg'); -- -------------------------------------------------------- -- -- Table structure for table `katso1men1round1neck1black1t2shirt` -- CREATE TABLE IF NOT EXISTS `katso1men1round1neck1black1t2shirt` ( `Price` varchar(20) DEFAULT NULL, `Description` varchar(280) DEFAULT NULL, `image` varchar(150) DEFAULT NULL, `quantity` varchar(20) DEFAULT NULL, `rating1` varchar(10) DEFAULT NULL, `rating2` varchar(10) DEFAULT NULL, `rating3` varchar(10) DEFAULT NULL, `rating4` varchar(10) DEFAULT NULL, `rating5` varchar(10) DEFAULT NULL, `catagory` varchar(20) DEFAULT NULL, `subcatagory` varchar(20) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `katso1men1round1neck1black1t2shirt` -- INSERT INTO `katso1men1round1neck1black1t2shirt` (`Price`, `Description`, `image`, `quantity`, `rating1`, `rating2`, `rating3`, `rating4`, `rating5`, `catagory`, `subcatagory`) VALUES ('341', 'Fabric: CottonSlim Fit Round Neck T-shirtPattern: Solid', 'ckatso.jpg', '31', '1', '40', '45', '64', '40', 'Men', 'T2Shirts'); -- -------------------------------------------------------- -- -- Table structure for table `kids` -- CREATE TABLE IF NOT EXISTS `kids` ( `subcatagories` varchar(20) DEFAULT NULL, `image` varchar(40) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `kids` -- INSERT INTO `kids` (`subcatagories`, `image`) VALUES ('Toys', 'toys.jpg'), ('Baby1Care', 'babycare.jpg'); -- -------------------------------------------------------- -- -- Table structure for table `laptops` -- CREATE TABLE IF NOT EXISTS `laptops` ( `products` varchar(20) DEFAULT NULL, `image` varchar(40) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `laptops` -- INSERT INTO `laptops` (`products`, `image`) VALUES ('HP24inch', 'laptop.jpg'), ('Lenovo1yoga1i3', 'Lenovo.jpg'), ('Acer1Aspire', 'Acer-Aspire.jpg'), ('Acer1one1Atom', 'Aspire-S13.png'), ('HP1APU', 'hp.jpeg'), ('Hp1Omen', 'omen.jpg'), ('Dell1Inspiron', 'dell32.JPG'), ('Dell1Inspiron1APU', 'dell-2520-core.jpg'), ('Apple1iMac', 'apple-imac.jpeg'); -- -------------------------------------------------------- -- -- Table structure for table `lcds` -- CREATE TABLE IF NOT EXISTS `lcds` ( `products` varchar(20) DEFAULT NULL, `image` varchar(40) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `lcds` -- INSERT INTO `lcds` (`products`, `image`) VALUES ('Samsung1LCD', 'samtv.jpg'); -- -------------------------------------------------------- -- -- Table structure for table `leana1hooded1red1black1t2shirt` -- CREATE TABLE IF NOT EXISTS `leana1hooded1red1black1t2shirt` ( `Price` varchar(20) DEFAULT NULL, `Description` varchar(280) DEFAULT NULL, `image` varchar(150) DEFAULT NULL, `quantity` varchar(20) DEFAULT NULL, `rating1` varchar(10) DEFAULT NULL, `rating2` varchar(10) DEFAULT NULL, `rating3` varchar(10) DEFAULT NULL, `rating4` varchar(10) DEFAULT NULL, `rating5` varchar(10) DEFAULT NULL, `catagory` varchar(20) DEFAULT NULL, `subcatagory` varchar(20) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `leana1hooded1red1black1t2shirt` -- INSERT INTO `leana1hooded1red1black1t2shirt` (`Price`, `Description`, `image`, `quantity`, `rating1`, `rating2`, `rating3`, `rating4`, `rating5`, `catagory`, `subcatagory`) VALUES ('350', ' Fabric: Cotton Regular Fit Hooded T-shirt Pattern: Solid Full Sleeve', 'Leana.jpg', '34', '1', '40', '45', '64', '40', 'Men', 'T2Shirts'); -- -------------------------------------------------------- -- -- Table structure for table `lenovo1yoga1i3` -- CREATE TABLE IF NOT EXISTS `lenovo1yoga1i3` ( `Price` varchar(20) DEFAULT NULL, `Description` varchar(40) DEFAULT NULL, `image` varchar(20) DEFAULT NULL, `quantity` varchar(20) DEFAULT NULL, `catagory` varchar(20) DEFAULT NULL, `subcatagory` varchar(20) DEFAULT NULL, `rating1` varchar(10) DEFAULT '130', `rating2` varchar(10) DEFAULT '130', `rating3` varchar(10) DEFAULT '130', `rating4` varchar(10) DEFAULT '130', `rating5` varchar(10) DEFAULT '130' ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `lenovo1yoga1i3` -- INSERT INTO `lenovo1yoga1i3` (`Price`, `Description`, `image`, `quantity`, `catagory`, `subcatagory`, `rating1`, `rating2`, `rating3`, `rating4`, `rating5`) VALUES ('32000', '1TB HDD,Windows 10 Home', 'Lenovo.jpg', '20', 'Electronics', 'Laptops', '130', '130', '130', '130', '130'); -- -------------------------------------------------------- -- -- Table structure for table `lg1241inch` -- CREATE TABLE IF NOT EXISTS `lg1241inch` ( `Price` varchar(20) DEFAULT NULL, `Description` varchar(180) DEFAULT NULL, `image` varchar(50) DEFAULT NULL, `quantity` varchar(20) DEFAULT NULL, `catagory` varchar(20) DEFAULT NULL, `subcatagory` varchar(20) DEFAULT NULL, `rating1` varchar(10) DEFAULT '130', `rating2` varchar(10) DEFAULT '130', `rating3` varchar(10) DEFAULT '130', `rating4` varchar(10) DEFAULT '130', `rating5` varchar(10) DEFAULT '130' ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `lg1241inch` -- INSERT INTO `lg1241inch` (`Price`, `Description`, `image`, `quantity`, `catagory`, `subcatagory`, `rating1`, `rating2`, `rating3`, `rating4`, `rating5`) VALUES ('12500', '1 x HDMI,1 x USBExchange upto Rs4,000-EMI from rs609/month', 'lcd.jpg', '9', 'Electronics', 'Televisions', '130', '130', '130', '131', '130'); -- -------------------------------------------------------- -- -- Table structure for table `loafers` -- CREATE TABLE IF NOT EXISTS `loafers` ( `products` varchar(20) DEFAULT NULL, `image` varchar(40) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `loafers` -- INSERT INTO `loafers` (`products`, `image`) VALUES ('Nubuck1Loafers', 'loafer_navy.jpg'); -- -------------------------------------------------------- -- -- Table structure for table `maniac1grey1tshirt` -- CREATE TABLE IF NOT EXISTS `maniac1grey1tshirt` ( `Price` varchar(20) DEFAULT NULL, `Description` varchar(280) DEFAULT NULL, `image` varchar(150) DEFAULT NULL, `quantity` varchar(20) DEFAULT NULL, `rating1` varchar(10) DEFAULT NULL, `rating2` varchar(10) DEFAULT NULL, `rating3` varchar(10) DEFAULT NULL, `rating4` varchar(10) DEFAULT NULL, `rating5` varchar(10) DEFAULT NULL, `catagory` varchar(20) DEFAULT NULL, `subcatagory` varchar(20) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `maniac1grey1tshirt` -- INSERT INTO `maniac1grey1tshirt` (`Price`, `Description`, `image`, `quantity`, `rating1`, `rating2`, `rating3`, `rating4`, `rating5`, `catagory`, `subcatagory`) VALUES ('878', 'Fabric: CottonSlim Fit Round Neck T-shirt', 'Maniac.jpg', '45', '1', '0', '45', '64', '0', 'Men', 'T2Shirts'); -- -------------------------------------------------------- -- -- Table structure for table `men` -- CREATE TABLE IF NOT EXISTS `men` ( `subcatagories` varchar(20) DEFAULT NULL, `image` varchar(40) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `men` -- INSERT INTO `men` (`subcatagories`, `image`) VALUES ('Watches', 'watch.jpg'), ('Sunglasses', 'sunglass.jpg'), ('T2Shirts', 'tshirt.jpg'), ('Caps', 'caps.jpg'); -- -------------------------------------------------------- -- -- Table structure for table `micromax` -- CREATE TABLE IF NOT EXISTS `micromax` ( `Price` varchar(20) DEFAULT NULL, `Description` varchar(180) DEFAULT NULL, `image` varchar(50) DEFAULT NULL, `quantity` varchar(20) DEFAULT NULL, `rating` varchar(20) DEFAULT NULL, `catagory` varchar(20) DEFAULT NULL, `subcatagory` varchar(20) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `micromax` -- INSERT INTO `micromax` (`Price`, `Description`, `image`, `quantity`, `rating`, `catagory`, `subcatagory`) VALUES ('12000', 'HD Ready', 'micromax-40.jpeg', '2', '4', 'Electronics', 'Televisions'); -- -------------------------------------------------------- -- -- Table structure for table `micromax1lcd` -- CREATE TABLE IF NOT EXISTS `micromax1lcd` ( `Price` varchar(20) DEFAULT NULL, `Description` varchar(180) DEFAULT NULL, `image` varchar(50) DEFAULT NULL, `quantity` varchar(20) DEFAULT NULL, `rating` varchar(20) DEFAULT NULL, `catagory` varchar(20) DEFAULT NULL, `subcatagory` varchar(20) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `micromax1lcd` -- INSERT INTO `micromax1lcd` (`Price`, `Description`, `image`, `quantity`, `rating`, `catagory`, `subcatagory`) VALUES ('13000', 'HD Ready | 1366 x 768 Resolution178 degree Viewing Angle20 W Speaker Output', 'micromax-40.jpeg', '6', '4', 'Electronics', 'Televisions'); -- -------------------------------------------------------- -- -- Table structure for table `micromax1321inch` -- CREATE TABLE IF NOT EXISTS `micromax1321inch` ( `Price` varchar(20) DEFAULT NULL, `Description` varchar(180) DEFAULT NULL, `image` varchar(50) DEFAULT NULL, `quantity` varchar(20) DEFAULT NULL, `catagory` varchar(20) DEFAULT NULL, `subcatagory` varchar(20) DEFAULT NULL, `rating1` varchar(10) DEFAULT '130', `rating2` varchar(10) DEFAULT '130', `rating3` varchar(10) DEFAULT '130', `rating4` varchar(10) DEFAULT '130', `rating5` varchar(10) DEFAULT '130' ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `micromax1321inch` -- INSERT INTO `micromax1321inch` (`Price`, `Description`, `image`, `quantity`, `catagory`, `subcatagory`, `rating1`, `rating2`, `rating3`, `rating4`, `rating5`) VALUES ('13999', 'Exchange upto Rs8,000-EMI from rs679/month', 'micromax-40.jpeg', '3', 'Electronics', 'Televisions', '130', '130', '130', '130', '130'); -- -------------------------------------------------------- -- -- Table structure for table `micromax1431inch` -- CREATE TABLE IF NOT EXISTS `micromax1431inch` ( `Price` varchar(20) DEFAULT NULL, `Description` varchar(180) DEFAULT NULL, `image` varchar(50) DEFAULT NULL, `quantity` varchar(20) DEFAULT NULL, `catagory` varchar(20) DEFAULT NULL, `subcatagory` varchar(20) DEFAULT NULL, `rating1` varchar(10) DEFAULT '130', `rating2` varchar(10) DEFAULT '130', `rating3` varchar(10) DEFAULT '130', `rating4` varchar(10) DEFAULT '130', `rating5` varchar(10) DEFAULT '130' ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `micromax1431inch` -- INSERT INTO `micromax1431inch` (`Price`, `Description`, `image`, `quantity`, `catagory`, `subcatagory`, `rating1`, `rating2`, `rating3`, `rating4`, `rating5`) VALUES ('33999', 'Exchange upto Rs8,000-EMI from Rs679/month', 'Micromax-43.jpg', '13', 'Electronics', 'Televisions', '142', '130', '130', '131', '130'); -- -------------------------------------------------------- -- -- Table structure for table `mittalvikeshorders` -- CREATE TABLE IF NOT EXISTS `mittalvikeshorders` ( `orders` varchar(40) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `mittalvikeshorders` -- -- -------------------------------------------------------- -- -- Table structure for table `mobile1accessories` -- CREATE TABLE IF NOT EXISTS `mobile1accessories` ( `products` varchar(20) DEFAULT NULL, `image` varchar(40) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `mobile1accessories` -- INSERT INTO `mobile1accessories` (`products`, `image`) VALUES ('Tempered1Glass', 'tempered-glass-3.jpg'), ('ipro1powerbank', 'powerbank.jpeg'), ('1Flip1Cover1iphone6', 'Case.jpg'), ('Flip1cover1iphone5', 'Cover-Iphone-5.jpg'), ('AKG1K67', 'k167_standard_white.jpg'), ('Moto1Turbo1charger', 'charger.jpg'), ('Samsung1memory1card', 'Transcend-Memory-Card-PNG-image.png'); -- -------------------------------------------------------- -- -- Table structure for table `mobiles` -- CREATE TABLE IF NOT EXISTS `mobiles` ( `products` varchar(20) DEFAULT NULL, `image` varchar(40) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `mobiles` -- INSERT INTO `mobiles` (`products`, `image`) VALUES ('Samsung1galaxy1S8', 'galaxy.jpg'), ('Samsung1On5', 'galaxyon5.jpg'), ('Moto1X1play', 'motox.jpg'), ('Vivo1V5', 'vivo-v5-lite.jpg'), ('Google1Pixel', 'google.jpg'), ('samsung1galaxy1J7', 'j7.jpg'), ('Redmi13S1Prime', 'prime.jpg'), ('Redmi1Note13', 'redmi_note_3.jpg'), ('Moto1G51Plus', 'moto-g5.jpeg'); -- -------------------------------------------------------- -- -- Table structure for table `moto1g51plus` -- CREATE TABLE IF NOT EXISTS `moto1g51plus` ( `Price` varchar(20) DEFAULT NULL, `Description` varchar(280) DEFAULT NULL, `image` varchar(150) DEFAULT NULL, `quantity` varchar(20) DEFAULT NULL, `rating1` varchar(10) DEFAULT NULL, `rating2` varchar(10) DEFAULT NULL, `rating3` varchar(10) DEFAULT NULL, `rating4` varchar(10) DEFAULT NULL, `rating5` varchar(10) DEFAULT NULL, `catagory` varchar(20) DEFAULT NULL, `subcatagory` varchar(20) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `moto1g51plus` -- INSERT INTO `moto1g51plus` (`Price`, `Description`, `image`, `quantity`, `rating1`, `rating2`, `rating3`, `rating4`, `rating5`, `catagory`, `subcatagory`) VALUES ('16999', '4 GB RAM | 32 GB ROM | Expandable Upto 128 GB5.2 inch Full HD Display12MP Rear Camera | 5MP Front Camera', 'moto-g5.jpeg', '23', '1', '0', '45', '64', '0', 'Electronics', 'Mobiles'); -- -------------------------------------------------------- -- -- Table structure for table `moto1turbo1charger` -- CREATE TABLE IF NOT EXISTS `moto1turbo1charger` ( `Price` varchar(20) DEFAULT NULL, `Description` varchar(180) DEFAULT NULL, `image` varchar(50) DEFAULT NULL, `quantity` varchar(20) DEFAULT NULL, `catagory` varchar(20) DEFAULT NULL, `subcatagory` varchar(20) DEFAULT NULL, `rating1` varchar(10) DEFAULT '120', `rating2` varchar(10) DEFAULT '120', `rating3` varchar(10) DEFAULT '20', `rating4` varchar(10) DEFAULT '720', `rating5` varchar(10) DEFAULT '70' ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `moto1turbo1charger` -- INSERT INTO `moto1turbo1charger` (`Price`, `Description`, `image`, `quantity`, `catagory`, `subcatagory`, `rating1`, `rating2`, `rating3`, `rating4`, `rating5`) VALUES ('949', ' Wall Charger Suitable For: Mobile Universal Voltage', 'charger.jpg', '41', 'Electronics', 'Mobile1Accessories', '120', '120', '20', '721', '71'); -- -------------------------------------------------------- -- -- Table structure for table `moto1x1play` -- CREATE TABLE IF NOT EXISTS `moto1x1play` ( `Price` varchar(20) DEFAULT NULL, `Description` varchar(40) DEFAULT NULL, `image` varchar(20) DEFAULT NULL, `quantity` varchar(20) DEFAULT NULL, `catagory` varchar(20) DEFAULT NULL, `subcatagory` varchar(20) DEFAULT NULL, `rating1` varchar(10) DEFAULT '130', `rating2` varchar(10) DEFAULT '130', `rating3` varchar(10) DEFAULT '130', `rating4` varchar(10) DEFAULT '130', `rating5` varchar(10) DEFAULT '130' ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `moto1x1play` -- INSERT INTO `moto1x1play` (`Price`, `Description`, `image`, `quantity`, `catagory`, `subcatagory`, `rating1`, `rating2`, `rating3`, `rating4`, `rating5`) VALUES ('12000', '2 GB RAM,16 GB ROM', 'motox.jpg', '0', 'Electronics', 'Mobiles', '132', '130', '130', '130', '133'); -- -------------------------------------------------------- -- -- Table structure for table `newport1solid1men1maroon1t2shirt` -- CREATE TABLE IF NOT EXISTS `newport1solid1men1maroon1t2shirt` ( `Price` varchar(20) DEFAULT NULL, `Description` varchar(280) DEFAULT NULL, `image` varchar(150) DEFAULT NULL, `quantity` varchar(20) DEFAULT NULL, `rating1` varchar(10) DEFAULT NULL, `rating2` varchar(10) DEFAULT NULL, `rating3` varchar(10) DEFAULT NULL, `rating4` varchar(10) DEFAULT NULL, `rating5` varchar(10) DEFAULT NULL, `catagory` varchar(20) DEFAULT NULL, `subcatagory` varchar(20) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `newport1solid1men1maroon1t2shirt` -- INSERT INTO `newport1solid1men1maroon1t2shirt` (`Price`, `Description`, `image`, `quantity`, `rating1`, `rating2`, `rating3`, `rating4`, `rating5`, `catagory`, `subcatagory`) VALUES ('677', ' Fabric: Cotton Polyester Blend Regular Fit Round Neck T-shirt Pattern: Solid Half Sleeve', 'Newport1Solid1Men1Maroon1T2Shirt.jpg', '24', '1', '0', '45', '64', '0', 'Men', 'T2Shirts'); -- -------------------------------------------------------- -- -- Table structure for table `nikon_dslr` -- CREATE TABLE IF NOT EXISTS `nikon_dslr` ( `Price` varchar(20) DEFAULT NULL, `Description` varchar(180) DEFAULT NULL, `image` varchar(50) DEFAULT NULL, `quantity` varchar(20) DEFAULT NULL, `catagory` varchar(20) DEFAULT NULL, `subcatagory` varchar(20) DEFAULT NULL, `rating1` varchar(10) DEFAULT NULL, `rating2` varchar(10) DEFAULT NULL, `rating3` varchar(10) DEFAULT NULL, `rating4` varchar(10) DEFAULT NULL, `rating5` varchar(10) DEFAULT NULL, `image2` varchar(60) DEFAULT 'galaxy.jpg' ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `nikon_dslr` -- INSERT INTO `nikon_dslr` (`Price`, `Description`, `image`, `quantity`, `catagory`, `subcatagory`, `rating1`, `rating2`, `rating3`, `rating4`, `rating5`, `image2`) VALUES ('23000', 'BLACK 8-GB CARD,CASE SMP4', 'nikon.jpg', '3', 'Electronics', 'Cameras', '124', '90', '34', '23', '130', 'galaxy.jpg'); -- -------------------------------------------------------- -- -- Table structure for table `nubuck1loafers` -- CREATE TABLE IF NOT EXISTS `nubuck1loafers` ( `Price` varchar(20) DEFAULT NULL, `Description` varchar(180) DEFAULT NULL, `image` varchar(50) DEFAULT NULL, `quantity` varchar(20) DEFAULT NULL, `rating1` varchar(10) DEFAULT NULL, `rating2` varchar(10) DEFAULT NULL, `rating3` varchar(10) DEFAULT NULL, `rating4` varchar(10) DEFAULT NULL, `rating5` varchar(10) DEFAULT NULL, `catagory` varchar(20) DEFAULT NULL, `subcatagory` varchar(20) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `nubuck1loafers` -- INSERT INTO `nubuck1loafers` (`Price`, `Description`, `image`, `quantity`, `rating1`, `rating2`, `rating3`, `rating4`, `rating5`, `catagory`, `subcatagory`) VALUES ('2300', ' Colour: Tan Outer Material: Nubuck Leather Inner Material: Leather', 'loafer_navy.jpg', '34', '1', '0', '0', '0', '0', 'Footwear', 'Loafers'); -- -------------------------------------------------------- -- -- Table structure for table `oakley10oo93693604631sunglasses` -- CREATE TABLE IF NOT EXISTS `oakley10oo93693604631sunglasses` ( `Price` varchar(20) DEFAULT NULL, `Description` varchar(280) DEFAULT NULL, `image` varchar(150) DEFAULT NULL, `quantity` varchar(20) DEFAULT NULL, `rating1` varchar(10) DEFAULT NULL, `rating2` varchar(10) DEFAULT NULL, `rating3` varchar(10) DEFAULT NULL, `rating4` varchar(10) DEFAULT NULL, `rating5` varchar(10) DEFAULT NULL, `catagory` varchar(20) DEFAULT NULL, `subcatagory` varchar(20) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `oakley10oo93693604631sunglasses` -- INSERT INTO `oakley10oo93693604631sunglasses` (`Price`, `Description`, `image`, `quantity`, `rating1`, `rating2`, `rating3`, `rating4`, `rating5`, `catagory`, `subcatagory`) VALUES ('14440', 'Size:The product measurement specified by the Brand is 63 mmModel Name: EyewearIdeal For Men', 'OakleySunglasses.jpg', '11', '1', '40', '45', '64', '41', 'Men', 'Sunglasses'); -- -------------------------------------------------------- -- -- Table structure for table `peter1sunglasses` -- CREATE TABLE IF NOT EXISTS `peter1sunglasses` ( `Price` varchar(20) DEFAULT NULL, `Description` varchar(280) DEFAULT NULL, `image` varchar(150) DEFAULT NULL, `quantity` varchar(20) DEFAULT NULL, `rating1` varchar(10) DEFAULT NULL, `rating2` varchar(10) DEFAULT NULL, `rating3` varchar(10) DEFAULT NULL, `rating4` varchar(10) DEFAULT NULL, `rating5` varchar(10) DEFAULT NULL, `catagory` varchar(20) DEFAULT NULL, `subcatagory` varchar(20) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `peter1sunglasses` -- INSERT INTO `peter1sunglasses` (`Price`, `Description`, `image`, `quantity`, `rating1`, `rating2`, `rating3`, `rating4`, `rating5`, `catagory`, `subcatagory`) VALUES ('644', 'Frame Size: (S: 45-49mm, M: 50-53mm, L: 54 mm)', 'peter.jpeg', '18', '1', '0', '45', '64', '0', 'Men', 'Sunglasses'); -- -------------------------------------------------------- -- -- Table structure for table `pikachu2` -- CREATE TABLE IF NOT EXISTS `pikachu2` ( `Price` varchar(20) DEFAULT NULL, `Description` varchar(40) DEFAULT NULL, `image` varchar(20) DEFAULT NULL, `quantity` varchar(20) DEFAULT NULL, `catagory` varchar(20) DEFAULT NULL, `subcatagory` varchar(20) DEFAULT NULL, `rating1` varchar(10) DEFAULT '314', `rating2` varchar(10) DEFAULT '14', `rating3` varchar(10) DEFAULT '14', `rating4` varchar(10) DEFAULT '14', `rating5` varchar(10) DEFAULT '148' ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `pikachu2` -- INSERT INTO `pikachu2` (`Price`, `Description`, `image`, `quantity`, `catagory`, `subcatagory`, `rating1`, `rating2`, `rating3`, `rating4`, `rating5`) VALUES ('290', 'good', 'pokemon.jpg', '81', 'Kids', 'Toys', '314', '14', '14', '14', '148'); -- -------------------------------------------------------- -- -- Table structure for table `prada17ax0a761rectangular1sunglasses` -- CREATE TABLE IF NOT EXISTS `prada17ax0a761rectangular1sunglasses` ( `Price` varchar(20) DEFAULT NULL, `Description` varchar(280) DEFAULT NULL, `image` varchar(150) DEFAULT NULL, `quantity` varchar(20) DEFAULT NULL, `rating1` varchar(10) DEFAULT NULL, `rating2` varchar(10) DEFAULT NULL, `rating3` varchar(10) DEFAULT NULL, `rating4` varchar(10) DEFAULT NULL, `rating5` varchar(10) DEFAULT NULL, `catagory` varchar(20) DEFAULT NULL, `subcatagory` varchar(20) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `prada17ax0a761rectangular1sunglasses` -- INSERT INTO `prada17ax0a761rectangular1sunglasses` (`Price`, `Description`, `image`, `quantity`, `rating1`, `rating2`, `rating3`, `rating4`, `rating5`, `catagory`, `subcatagory`) VALUES ('13990', ' Frame Size: M (S: 45-55m, M: 56-59mm, L: 60 mm) Lens Color: Green Purpose: Eye Protection Frame Color: Black', 'prada.jpeg', '11', '1', '40', '45', '64', '40', 'Men', 'Sunglasses'); -- -------------------------------------------------------- -- -- Table structure for table `products` -- CREATE TABLE IF NOT EXISTS `products` ( `products` varchar(50) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `products` -- INSERT INTO `products` (`products`) VALUES ('Nikon1DSLR'), ('Samsung1galaxy1S8'), ('Samsung1On5'), ('Moto1X1play'), ('Vivo1V5'), ('Google1Pixel'), ('samsung1galaxy1J7'), ('Redmi13S1Prime'), ('Redmi1Note13'), ('HP24inch'), ('Lenovo1yoga1i3'), ('Acer1Aspire'), ('Acer1one1Atom'), ('HP1APU'), ('Hp1Omen'), ('Dell1Inspiron'), ('Dell1Inspiron1APU'), ('Apple1iMac'), ('Sansui1431inch'), ('Micromax1321inch'), ('Samsung1401inch'), ('Micromax1431inch'), ('Samsung1491inch'), ('LG1241inch'), ('Tempered1Glass'), ('ipro1powerbank'), ('1Flip1Cover1iphone6'), ('Flip1cover1iphone5'), ('Bose1SoundTrue1ulta'), ('AKG1K67'), ('Moto1Turbo1charger'), ('Samsung1memory1card'), ('FastTrack'), ('Pikachu2'), ('abc'), ('Nubuck1Loafers'), ('Nubuck1Loafers'), ('Moto1G51Plus'), ('Moto1G51Plus'), ('Fujifilm1Instax1Wide'), ('av'), ('Fujifilm1Instax1Wide'), ('abc'), ('abc'), ('Maniac11Grey1TShirt1'), ('Maniac1Grey1TShirt'), ('Tshirt'), ('Benetton1Solid1Men1Black1T2Shirt'), ('Benetton1Men1Red1T2Shirt'), ('Newport1Solid1Men1Maroon1T2Shirt'), ('Campus1Sutra1Solid1Men1Grey1T2Shirt'), ('Campus1Sutra1Solid1Men1Grey1T2Shirt'), ('Arrow1Sports1Men1T2Shirt'), ('Shaun1Printed1Grey1T2Shirt'), ('Shaun1Printed1Men1Grey1T2Shirt'), ('Shaun1Printed1Grey1T2Shirt'), ('Shaun1Printed1Men1Grey1T2Shirt'), ('abc'), ('Peter1Sunglasses'), ('Leana1Hooded1Red1Black1T2Shirt'), ('Katso1Men1Round1Neck1Black1T2Shirt'), ('Hupshy1CMBBLSLVR041Round1Sunglasses'), ('Hupshy1CMBBLSLVR041Round1Sunglasses'), ('Hupshy1Round1Sunglasses'), ('Rothco1Goggles1Aviator1Sunglasses'), ('Oakley10OO93693604631Sunglasses'), ('Prada17AX0A761Rectangular1Sunglasses'), ('Casio1Youth1Series1Analog1Digital1Watch2For1Men'), ('Casio1Youth1Series1Analog1Digital1Watch'), ('Casio1Enticer1Men1Analog1Watch121For1Men'), ('Titan1NH64SM01Karishma1Analog1Watch1'), ('Titan1Karishma1Analog1Watch121For1Men'); -- -------------------------------------------------------- -- -- Table structure for table `ray1ban` -- CREATE TABLE IF NOT EXISTS `ray1ban` ( `Price` varchar(20) DEFAULT NULL, `Description` varchar(180) DEFAULT NULL, `image` varchar(50) DEFAULT NULL, `quantity` varchar(20) DEFAULT NULL, `catagory` varchar(20) DEFAULT NULL, `subcatagory` varchar(20) DEFAULT NULL, `rating1` varchar(10) DEFAULT '314', `rating2` varchar(10) DEFAULT '31', `rating3` varchar(10) DEFAULT '931', `rating4` varchar(10) DEFAULT '91', `rating5` varchar(10) DEFAULT '591' ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `ray1ban` -- INSERT INTO `ray1ban` (`Price`, `Description`, `image`, `quantity`, `catagory`, `subcatagory`, `rating1`, `rating2`, `rating3`, `rating4`, `rating5`) VALUES ('22000', 'Good', 'sunglasses.jpg', '23', 'Men', 'Sunglasses', '314', '31', '931', '91', '591'); -- -------------------------------------------------------- -- -- Table structure for table `redmi1note13` -- CREATE TABLE IF NOT EXISTS `redmi1note13` ( `Price` varchar(20) DEFAULT NULL, `Description` varchar(180) DEFAULT NULL, `image` varchar(50) DEFAULT NULL, `quantity` varchar(20) DEFAULT NULL, `catagory` varchar(20) DEFAULT NULL, `subcatagory` varchar(20) DEFAULT NULL, `rating1` varchar(10) DEFAULT '130', `rating2` varchar(10) DEFAULT '130', `rating3` varchar(10) DEFAULT '130', `rating4` varchar(10) DEFAULT '130', `rating5` varchar(10) DEFAULT '130' ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `redmi1note13` -- INSERT INTO `redmi1note13` (`Price`, `Description`, `image`, `quantity`, `catagory`, `subcatagory`, `rating1`, `rating2`, `rating3`, `rating4`, `rating5`) VALUES ('10300', 'EMI from Rs485/monthBlack ,32GB', 'redmi_note_3.jpg', '12', 'Electronics', 'Mobiles', '130', '130', '130', '130', '130'); -- -------------------------------------------------------- -- -- Table structure for table `redmi13s1prime` -- CREATE TABLE IF NOT EXISTS `redmi13s1prime` ( `Price` varchar(20) DEFAULT NULL, `Description` varchar(180) DEFAULT NULL, `image` varchar(50) DEFAULT NULL, `quantity` varchar(20) DEFAULT NULL, `catagory` varchar(20) DEFAULT NULL, `subcatagory` varchar(20) DEFAULT NULL, `rating1` varchar(10) DEFAULT '130', `rating2` varchar(10) DEFAULT '130', `rating3` varchar(10) DEFAULT '130', `rating4` varchar(10) DEFAULT '130', `rating5` varchar(10) DEFAULT '130' ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `redmi13s1prime` -- INSERT INTO `redmi13s1prime` (`Price`, `Description`, `image`, `quantity`, `catagory`, `subcatagory`, `rating1`, `rating2`, `rating3`, `rating4`, `rating5`) VALUES ('9000', 'EMI starts from Rs437/month', 'prime.jpg', '12', 'Electronics', 'Mobiles', '130', '130', '130', '130', '130'); -- -------------------------------------------------------- -- -- Table structure for table `rothco1goggles1aviator1sunglasses` -- CREATE TABLE IF NOT EXISTS `rothco1goggles1aviator1sunglasses` ( `Price` varchar(20) DEFAULT NULL, `Description` varchar(280) DEFAULT NULL, `image` varchar(150) DEFAULT NULL, `quantity` varchar(20) DEFAULT NULL, `rating1` varchar(10) DEFAULT NULL, `rating2` varchar(10) DEFAULT NULL, `rating3` varchar(10) DEFAULT NULL, `rating4` varchar(10) DEFAULT NULL, `rating5` varchar(10) DEFAULT NULL, `catagory` varchar(20) DEFAULT NULL, `subcatagory` varchar(20) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `rothco1goggles1aviator1sunglasses` -- INSERT INTO `rothco1goggles1aviator1sunglasses` (`Price`, `Description`, `image`, `quantity`, `rating1`, `rating2`, `rating3`, `rating4`, `rating5`, `catagory`, `subcatagory`) VALUES ('29990', 'Frame Size: Standard (S: 45-54mm, M: 55-57mm, L: 58 mm)Lens Color: BlackFeatures: Polarized', 'Rothco.jpg', '20', '4', '40', '45', '68', '46', 'Men', 'Sunglasses'); -- -------------------------------------------------------- -- -- Table structure for table `samsung1galaxy1j7` -- CREATE TABLE IF NOT EXISTS `samsung1galaxy1j7` ( `Price` varchar(20) DEFAULT NULL, `Description` varchar(180) DEFAULT NULL, `image` varchar(50) DEFAULT NULL, `quantity` varchar(20) DEFAULT NULL, `catagory` varchar(20) DEFAULT NULL, `subcatagory` varchar(20) DEFAULT NULL, `rating1` varchar(10) DEFAULT '130', `rating2` varchar(10) DEFAULT '130', `rating3` varchar(10) DEFAULT '130', `rating4` varchar(10) DEFAULT '130', `rating5` varchar(10) DEFAULT '130' ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `samsung1galaxy1j7` -- INSERT INTO `samsung1galaxy1j7` (`Price`, `Description`, `image`, `quantity`, `catagory`, `subcatagory`, `rating1`, `rating2`, `rating3`, `rating4`, `rating5`) VALUES ('15900', 'EMI from â?¹771/monthFree Delivery AvailableSpecifications:Gold,16GB', 'j7.jpg', '11', 'Electronics', 'Mobiles', '130', '130', '130', '131', '131'); -- -------------------------------------------------------- -- -- Table structure for table `samsung1galaxy1s8` -- CREATE TABLE IF NOT EXISTS `samsung1galaxy1s8` ( `Price` varchar(20) DEFAULT NULL, `Description` varchar(40) DEFAULT NULL, `image` varchar(20) DEFAULT NULL, `quantity` varchar(20) DEFAULT NULL, `catagory` varchar(20) DEFAULT NULL, `subcatagory` varchar(20) DEFAULT NULL, `rating1` varchar(10) DEFAULT '0', `rating2` varchar(10) DEFAULT '0', `rating3` varchar(10) DEFAULT '0', `rating4` varchar(10) DEFAULT '0', `rating5` varchar(10) DEFAULT '0' ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `samsung1galaxy1s8` -- INSERT INTO `samsung1galaxy1s8` (`Price`, `Description`, `image`, `quantity`, `catagory`, `subcatagory`, `rating1`, `rating2`, `rating3`, `rating4`, `rating5`) VALUES ('56000', 'New Gen Phone', 'galaxy.jpg', '0', 'Electronics', 'Mobiles', '0', '0', '0', '0', '1'); -- -------------------------------------------------------- -- -- Table structure for table `samsung1lcd` -- CREATE TABLE IF NOT EXISTS `samsung1lcd` ( `Price` varchar(20) DEFAULT NULL, `Description` varchar(40) DEFAULT NULL, `image` varchar(20) DEFAULT NULL, `quantity` varchar(20) DEFAULT NULL, `rating` varchar(20) DEFAULT NULL, `catagory` varchar(20) DEFAULT NULL, `subcatagory` varchar(20) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `samsung1lcd` -- INSERT INTO `samsung1lcd` (`Price`, `Description`, `image`, `quantity`, `rating`, `catagory`, `subcatagory`) VALUES ('60000', 'Excellent', 'samtv.jpg', '3', '4.5', 'Televisions', 'LCDs'); -- -------------------------------------------------------- -- -- Table structure for table `samsung1memory1card` -- CREATE TABLE IF NOT EXISTS `samsung1memory1card` ( `Price` varchar(20) DEFAULT NULL, `Description` varchar(180) DEFAULT NULL, `image` varchar(50) DEFAULT NULL, `quantity` varchar(20) DEFAULT NULL, `catagory` varchar(20) DEFAULT NULL, `subcatagory` varchar(20) DEFAULT NULL, `rating1` varchar(10) DEFAULT '170', `rating2` varchar(10) DEFAULT '1', `rating3` varchar(10) DEFAULT '1', `rating4` varchar(10) DEFAULT '14', `rating5` varchar(10) DEFAULT '314' ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `samsung1memory1card` -- INSERT INTO `samsung1memory1card` (`Price`, `Description`, `image`, `quantity`, `catagory`, `subcatagory`, `rating1`, `rating2`, `rating3`, `rating4`, `rating5`) VALUES ('889', '16GB', 'Transcend-Memory-Card-PNG-image.png', '2', 'Electronics', 'Mobile1Accessories', '177', '2', '3', '18', '325'); -- -------------------------------------------------------- -- -- Table structure for table `samsung1on5` -- CREATE TABLE IF NOT EXISTS `samsung1on5` ( `Price` varchar(20) DEFAULT NULL, `Description` varchar(40) DEFAULT NULL, `image` varchar(20) DEFAULT NULL, `quantity` varchar(20) DEFAULT NULL, `catagory` varchar(20) DEFAULT NULL, `subcatagory` varchar(20) DEFAULT NULL, `rating1` varchar(10) DEFAULT '130', `rating2` varchar(10) DEFAULT '130', `rating3` varchar(10) DEFAULT '130', `rating4` varchar(10) DEFAULT '130', `rating5` varchar(10) DEFAULT '130' ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `samsung1on5` -- INSERT INTO `samsung1on5` (`Price`, `Description`, `image`, `quantity`, `catagory`, `subcatagory`, `rating1`, `rating2`, `rating3`, `rating4`, `rating5`) VALUES ('8000', '1 GB RAM', 'galaxyon5.jpg', '4', 'Electronics', 'Mobiles', '131', '130', '130', '131', '133'); -- -------------------------------------------------------- -- -- Table structure for table `samsung132inch` -- CREATE TABLE IF NOT EXISTS `samsung132inch` ( `Price` varchar(20) DEFAULT NULL, `Description` varchar(40) DEFAULT NULL, `image` varchar(20) DEFAULT NULL, `quantity` varchar(20) DEFAULT NULL, `rating` varchar(20) DEFAULT NULL, `catagory` varchar(20) DEFAULT NULL, `subcatagory` varchar(20) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `samsung132inch` -- -- -------------------------------------------------------- -- -- Table structure for table `samsung1401inch` -- CREATE TABLE IF NOT EXISTS `samsung1401inch` ( `Price` varchar(20) DEFAULT NULL, `Description` varchar(180) DEFAULT NULL, `image` varchar(50) DEFAULT NULL, `quantity` varchar(20) DEFAULT NULL, `catagory` varchar(20) DEFAULT NULL, `subcatagory` varchar(20) DEFAULT NULL, `rating1` varchar(10) DEFAULT '130', `rating2` varchar(10) DEFAULT '230', `rating3` varchar(10) DEFAULT '230', `rating4` varchar(10) DEFAULT '7730', `rating5` varchar(10) DEFAULT '730' ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `samsung1401inch` -- INSERT INTO `samsung1401inch` (`Price`, `Description`, `image`, `quantity`, `catagory`, `subcatagory`, `rating1`, `rating2`, `rating3`, `rating4`, `rating5`) VALUES ('32000', 'Exchange upto Rs8,000-EMI from Rs679/month', 'sansui_lcd.jpg', '9', 'Electronics', 'Televisions', '141', '230', '230', '7731', '735'); -- -------------------------------------------------------- -- -- Table structure for table `samsung1491inch` -- CREATE TABLE IF NOT EXISTS `samsung1491inch` ( `Price` varchar(20) DEFAULT NULL, `Description` varchar(180) DEFAULT NULL, `image` varchar(50) DEFAULT NULL, `quantity` varchar(20) DEFAULT NULL, `catagory` varchar(20) DEFAULT NULL, `subcatagory` varchar(20) DEFAULT NULL, `rating1` varchar(10) DEFAULT '130', `rating2` varchar(10) DEFAULT '130', `rating3` varchar(10) DEFAULT '130', `rating4` varchar(10) DEFAULT '130', `rating5` varchar(10) DEFAULT '130' ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `samsung1491inch` -- INSERT INTO `samsung1491inch` (`Price`, `Description`, `image`, `quantity`, `catagory`, `subcatagory`, `rating1`, `rating2`, `rating3`, `rating4`, `rating5`) VALUES ('71339', '2xHDMI,2xUSBExchange upto Rs8,000-EMI from rs779/month', 'samtv.jpg', '3', 'Electronics', 'Televisions', '130', '130', '130', '130', '130'); -- -------------------------------------------------------- -- -- Table structure for table `sansui143inch` -- CREATE TABLE IF NOT EXISTS `sansui143inch` ( `Price` varchar(20) DEFAULT NULL, `Description` varchar(180) DEFAULT NULL, `image` varchar(50) DEFAULT NULL, `quantity` varchar(20) DEFAULT NULL, `rating` varchar(20) DEFAULT NULL, `catagory` varchar(20) DEFAULT NULL, `subcatagory` varchar(20) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `sansui143inch` -- INSERT INTO `sansui143inch` (`Price`, `Description`, `image`, `quantity`, `rating`, `catagory`, `subcatagory`) VALUES ('29999', 'Ultra HD(4k)Smart LED TV3xHDMI,2xUSB', 'sansui_lcd.jpg', '3', '4', 'Electronics', 'Televisions'); -- -------------------------------------------------------- -- -- Table structure for table `sansui1431inch` -- CREATE TABLE IF NOT EXISTS `sansui1431inch` ( `Price` varchar(20) DEFAULT NULL, `Description` varchar(180) DEFAULT NULL, `image` varchar(50) DEFAULT NULL, `quantity` varchar(20) DEFAULT NULL, `catagory` varchar(20) DEFAULT NULL, `subcatagory` varchar(20) DEFAULT NULL, `rating1` varchar(10) DEFAULT '130', `rating2` varchar(10) DEFAULT '130', `rating3` varchar(10) DEFAULT '130', `rating4` varchar(10) DEFAULT '130', `rating5` varchar(10) DEFAULT '130' ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `sansui1431inch` -- INSERT INTO `sansui1431inch` (`Price`, `Description`, `image`, `quantity`, `catagory`, `subcatagory`, `rating1`, `rating2`, `rating3`, `rating4`, `rating5`) VALUES ('29999', 'Ultra HD(4K),Smart LED TV', 'sansui_lcd.jpg', '2', 'Electronics', 'Televisions', '130', '130', '130', '131', '130'); -- -------------------------------------------------------- -- -- Table structure for table `shaun1printed1men1grey1t2shirt` -- CREATE TABLE IF NOT EXISTS `shaun1printed1men1grey1t2shirt` ( `Price` varchar(20) DEFAULT NULL, `Description` varchar(280) DEFAULT NULL, `image` varchar(150) DEFAULT NULL, `quantity` varchar(20) DEFAULT NULL, `rating1` varchar(10) DEFAULT NULL, `rating2` varchar(10) DEFAULT NULL, `rating3` varchar(10) DEFAULT NULL, `rating4` varchar(10) DEFAULT NULL, `rating5` varchar(10) DEFAULT NULL, `catagory` varchar(20) DEFAULT NULL, `subcatagory` varchar(20) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `shaun1printed1men1grey1t2shirt` -- INSERT INTO `shaun1printed1men1grey1t2shirt` (`Price`, `Description`, `image`, `quantity`, `rating1`, `rating2`, `rating3`, `rating4`, `rating5`, `catagory`, `subcatagory`) VALUES ('387', ' Fabric: Cotton Regular Fit Round Neck T-shirt Pattern: Printed Sleeve Type: Narrow Half Sleeve', 'Shaun1Printed1Men1Grey1T2Shirt.jpg', '22', '1', '0', '45', '64', '0', 'Men', 'T2Shirts'); -- -------------------------------------------------------- -- -- Table structure for table `sports` -- CREATE TABLE IF NOT EXISTS `sports` ( `subcatagories` varchar(20) DEFAULT NULL, `image` varchar(40) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `sports` -- -- -------------------------------------------------------- -- -- Table structure for table `sports1shoes` -- CREATE TABLE IF NOT EXISTS `sports1shoes` ( `products` varchar(20) DEFAULT NULL, `image` varchar(40) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `sports1shoes` -- INSERT INTO `sports1shoes` (`products`, `image`) VALUES ('Adidas1Shoes', 'adida.jpg'), ('Adidas1Shoes', 'adida.jpg'), ('Gas', 'gas.jpg'), ('Nubuck1Loafers', 'loafer_navy.jpg'); -- -------------------------------------------------------- -- -- Table structure for table `stud` -- CREATE TABLE IF NOT EXISTS `stud` ( `Price` varchar(20) DEFAULT NULL, `Description` varchar(40) DEFAULT NULL, `image` varchar(20) DEFAULT NULL, `quantity` varchar(20) DEFAULT NULL, `catagory` varchar(20) DEFAULT NULL, `subcatagory` varchar(20) DEFAULT NULL, `rating1` varchar(10) DEFAULT '314', `rating2` varchar(10) DEFAULT '314', `rating3` varchar(10) DEFAULT '314', `rating4` varchar(10) DEFAULT '314', `rating5` varchar(10) DEFAULT '314' ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `stud` -- INSERT INTO `stud` (`Price`, `Description`, `image`, `quantity`, `catagory`, `subcatagory`, `rating1`, `rating2`, `rating3`, `rating4`, `rating5`) VALUES ('200', 'Good', 'stud.jpeg', '194', 'Women', 'Jewellery', '314', '314', '314', '314', '314'); -- -------------------------------------------------------- -- -- Table structure for table `sunglasses` -- CREATE TABLE IF NOT EXISTS `sunglasses` ( `products` varchar(100) DEFAULT NULL, `image` varchar(40) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `sunglasses` -- INSERT INTO `sunglasses` (`products`, `image`) VALUES ('Ray1Ban', 'sunglasses.jpg'), ('Peter1Sunglasses', 'peter.jpeg'), ('Hupshy1Round1Sunglasses', 'hupshy.jpeg'), ('Rothco1Goggles1Aviator1Sunglasses', 'Rothco.jpg'), ('Oakley10OO93693604631Sunglasses', 'OakleySunglasses.jpg'), ('Prada17AX0A761Rectangular1Sunglasses', 'prada.jpeg'); -- -------------------------------------------------------- -- -- Table structure for table `t2shirts` -- CREATE TABLE IF NOT EXISTS `t2shirts` ( `products` varchar(200) DEFAULT NULL, `image` varchar(40) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `t2shirts` -- INSERT INTO `t2shirts` (`products`, `image`) VALUES ('Benetton1Solid1Men1Black1T2Shirt', 'UnitedColorsofBenetton.jpg'), ('Benetton1Men1Red1T2Shirt', 'united-colors.jpg'), ('Newport1Solid1Men1Maroon1T2Shirt', 'Newport1Solid1Men1Maroon1T2Shirt.jpg'), ('Campus1Sutra1Solid1Men1Grey1T2Shirt', 'campus.jpg'), ('Arrow1Sports1Men1T2Shirt', 'arrow.jpg'), ('Shaun1Printed1Men1Grey1T2Shirt', 'Shaun1Printed1Men1Grey1T2Shirt.jpg'), ('Leana1Hooded1Red1Black1T2Shirt', 'Leana.jpg'), ('Katso1Men1Round1Neck1Black1T2Shirt', 'ckatso.jpg'); -- -------------------------------------------------------- -- -- Table structure for table `televisions` -- CREATE TABLE IF NOT EXISTS `televisions` ( `products` varchar(30) DEFAULT NULL, `image` varchar(50) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `televisions` -- INSERT INTO `televisions` (`products`, `image`) VALUES ('Sansui1431inch', 'sansui_lcd.jpg'), ('Micromax1321inch', 'micromax-40.jpeg'), ('Samsung1401inch', 'sansui_lcd.jpg'), ('Micromax1431inch', 'Micromax-43.jpg'), ('Samsung1491inch', 'samtv.jpg'), ('LG1241inch', 'lcd.jpg'); -- -------------------------------------------------------- -- -- Table structure for table `tempered1glass` -- CREATE TABLE IF NOT EXISTS `tempered1glass` ( `Price` varchar(20) DEFAULT NULL, `Description` varchar(40) DEFAULT NULL, `image` varchar(20) DEFAULT NULL, `quantity` varchar(20) DEFAULT NULL, `catagory` varchar(20) DEFAULT NULL, `subcatagory` varchar(20) DEFAULT NULL, `rating1` varchar(10) DEFAULT '130', `rating2` varchar(10) DEFAULT '130', `rating3` varchar(10) DEFAULT '130', `rating4` varchar(10) DEFAULT '130', `rating5` varchar(10) DEFAULT '130' ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `tempered1glass` -- INSERT INTO `tempered1glass` (`Price`, `Description`, `image`, `quantity`, `catagory`, `subcatagory`, `rating1`, `rating2`, `rating3`, `rating4`, `rating5`) VALUES ('300', 'For redmi nore 3', 'tempered-glass-3.jpg', '5', 'Electronics', 'Mobile1Accessories', '130', '130', '130', '131', '130'); -- -------------------------------------------------------- -- -- Table structure for table `titan1karishma1analog1watch121for1men` -- CREATE TABLE IF NOT EXISTS `titan1karishma1analog1watch121for1men` ( `Price` varchar(20) DEFAULT NULL, `Description` varchar(280) DEFAULT NULL, `image` varchar(150) DEFAULT NULL, `quantity` varchar(20) DEFAULT NULL, `rating1` varchar(10) DEFAULT NULL, `rating2` varchar(10) DEFAULT NULL, `rating3` varchar(10) DEFAULT NULL, `rating4` varchar(10) DEFAULT NULL, `rating5` varchar(10) DEFAULT NULL, `catagory` varchar(20) DEFAULT NULL, `subcatagory` varchar(20) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `titan1karishma1analog1watch121for1men` -- INSERT INTO `titan1karishma1analog1watch121for1men` (`Price`, `Description`, `image`, `quantity`, `rating1`, `rating2`, `rating3`, `rating4`, `rating5`, `catagory`, `subcatagory`) VALUES ('2445', 'Watch Movement: QuartzWater Resistant (30 m)Display Type: AnalogWatch Movement: QuartzWater Resistant (30 m)Display Type: Analog', 'titan2.jpg', '29', '1', '40', '45', '64', '40', 'Men', 'Watches'); -- -------------------------------------------------------- -- -- Table structure for table `titan1nh64sm01karishma1analog1watch1` -- CREATE TABLE IF NOT EXISTS `titan1nh64sm01karishma1analog1watch1` ( `Price` varchar(20) DEFAULT NULL, `Description` varchar(280) DEFAULT NULL, `image` varchar(150) DEFAULT NULL, `quantity` varchar(20) DEFAULT NULL, `rating1` varchar(10) DEFAULT NULL, `rating2` varchar(10) DEFAULT NULL, `rating3` varchar(10) DEFAULT NULL, `rating4` varchar(10) DEFAULT NULL, `rating5` varchar(10) DEFAULT NULL, `catagory` varchar(20) DEFAULT NULL, `subcatagory` varchar(20) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `titan1nh64sm01karishma1analog1watch1` -- INSERT INTO `titan1nh64sm01karishma1analog1watch1` (`Price`, `Description`, `image`, `quantity`, `rating1`, `rating2`, `rating3`, `rating4`, `rating5`, `catagory`, `subcatagory`) VALUES ('2196', 'Watch Movement: QuartzWater Resistant (30 m)Display Type: Analog', 'titan1.jpg', '20', '1', '40', '45', '64', '40', 'Men', 'Watches'); -- -------------------------------------------------------- -- -- Table structure for table `toys` -- CREATE TABLE IF NOT EXISTS `toys` ( `products` varchar(20) DEFAULT NULL, `image` varchar(40) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `toys` -- INSERT INTO `toys` (`products`, `image`) VALUES ('Pikachu2', 'pokemon.jpg'); -- -------------------------------------------------------- -- -- Table structure for table `trousers` -- CREATE TABLE IF NOT EXISTS `trousers` ( `products` varchar(20) DEFAULT NULL, `image` varchar(40) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `trousers` -- -- -------------------------------------------------------- -- -- Table structure for table `tuhar` -- CREATE TABLE IF NOT EXISTS `tuhar` ( `name` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `tuhar` -- -- -------------------------------------------------------- -- -- Table structure for table `tusarjncart` -- CREATE TABLE IF NOT EXISTS `tusarjncart` ( `products` varchar(100) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `tusarjncart` -- INSERT INTO `tusarjncart` (`products`) VALUES ('Hupshy Round Sunglasses'), ('NULL'), ('Casio Youth Series Analog Digital Watch'), ('Oakley 0OO9369360463 Sunglasses'), ('NULL'); -- -------------------------------------------------------- -- -- Table structure for table `tusarjnorders` -- CREATE TABLE IF NOT EXISTS `tusarjnorders` ( `orders` varchar(100) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `tusarjnorders` -- INSERT INTO `tusarjnorders` (`orders`) VALUES ('Hupshy1Round1Sunglasses'); -- -------------------------------------------------------- -- -- Table structure for table `tushar_ij` -- CREATE TABLE IF NOT EXISTS `tushar_ij` ( `name` varchar(20) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `tushar_ij` -- -- -------------------------------------------------------- -- -- Table structure for table `user` -- CREATE TABLE IF NOT EXISTS `user` ( `username` varchar(100) DEFAULT NULL, `Firstname` varchar(100) DEFAULT NULL, `LastName` varchar(100) DEFAULT NULL, `password` varchar(100) DEFAULT NULL, `City` varchar(100) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `user` -- INSERT INTO `user` (`username`, `Firstname`, `LastName`, `password`, `City`) VALUES ('tushar', 'tush', 'sharma', '1234', 'patiala'), ('tushar', 'tush', 'sharma', '1234', 'patiala'), ('Aneesh12', 'Aneesh', 'Garg', 'hello', 'patiala'), ('y', 'v', 'bh', '', 'null'), ('y', 'v', '', '', 'null'), ('fg', 'b', 'h', 'k', 'patiala'), ('', '', '', '', 'null'); -- -------------------------------------------------------- -- -- Table structure for table `user1` -- CREATE TABLE IF NOT EXISTS `user1` ( `uname` varchar(100) DEFAULT NULL, `password` varchar(20) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `user1` -- INSERT INTO `user1` (`uname`, `password`) VALUES ('karan', 'bnnbv'), ('tushar', 'sdtyj'), ('tushar', 'sdtyj'), ('tusharhaji', 'dtyj'), ('paru', 'oiuhg'), ('mohan', '456789'), ('tyui', 'asdfghjk'); -- -------------------------------------------------------- -- -- Table structure for table `user2` -- CREATE TABLE IF NOT EXISTS `user2` ( `username` varchar(200) DEFAULT NULL, `Password` varchar(100) DEFAULT NULL, `FirstName` varchar(100) DEFAULT NULL, `LastName` varchar(100) DEFAULT NULL, `Gender` varchar(100) DEFAULT NULL, `DOB` date DEFAULT NULL, `status` varchar(20) DEFAULT 'activated', `logindate` varchar(29) DEFAULT NULL, `logintime` varchar(30) DEFAULT NULL, `activateddate` varchar(30) DEFAULT NULL, `counter` int(11) DEFAULT '0' ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `user2` -- INSERT INTO `user2` (`username`, `Password`, `FirstName`, `LastName`, `Gender`, `DOB`, `status`, `logindate`, `logintime`, `activateddate`, `counter`) VALUES ('tusarjn', 'qwerty', 'Tushar', 'sharma', 'Male', '1996-01-16', 'deactivated', '15/02/17', '16:32:13', '14/02/17', 4), ('karan12', 'qwerty', 'karan', 'sharma', 'Male', '1996-01-16', 'deactivated', '15/02/17', '17:49:19', '15/02/17', 4), ('vipul56', 'qwerty', 'vipul', 'sharma', 'Male', '1996-01-16', 'activated', '19/06/17', '13:07:01', '16/02/17', 0); -- -------------------------------------------------------- -- -- Table structure for table `userinfo` -- CREATE TABLE IF NOT EXISTS `userinfo` ( `username` varchar(50) DEFAULT NULL, `password` varchar(20) DEFAULT NULL, `firstname` varchar(30) DEFAULT NULL, `lastname` varchar(30) DEFAULT NULL, `phone` varchar(30) DEFAULT NULL, `counter` int(11) DEFAULT '0', `status` varchar(20) DEFAULT 'activated', `profilename` varchar(50) DEFAULT 'username' ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `userinfo` -- INSERT INTO `userinfo` (`username`, `password`, `firstname`, `lastname`, `phone`, `counter`, `status`, `profilename`) VALUES ('vashisatv@gmail.com', 'ellymangat', 'Vasu', 'Vashisat', '8427578267', 1, 'activated', 'Vasuvashisat'), ('tusarjn@gmail.com', 'qwerty', 'Tushar', 'sharma', '9988655464', 0, 'activated', 'Tushajn'), ('baldevjn@gmail.com', 'baldev1370', 'Baldev', 'Krishan', '8699033840', 0, 'activated', 'BaldevKrishan12'); -- -------------------------------------------------------- -- -- Table structure for table `vashisatvcart` -- CREATE TABLE IF NOT EXISTS `vashisatvcart` ( `products` varchar(40) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `vashisatvcart` -- -- -------------------------------------------------------- -- -- Table structure for table `vashisatvorders` -- CREATE TABLE IF NOT EXISTS `vashisatvorders` ( `orders` varchar(40) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `vashisatvorders` -- INSERT INTO `vashisatvorders` (`orders`) VALUES ('Hupshy1Round1Sunglasses'), ('Samsung1401inch'); -- -------------------------------------------------------- -- -- Table structure for table `vela` -- CREATE TABLE IF NOT EXISTS `vela` ( `name` int(11) NOT NULL, `class` int(11) NOT NULL, `marks` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `vela` -- -- -------------------------------------------------------- -- -- Table structure for table `vivo1v5` -- CREATE TABLE IF NOT EXISTS `vivo1v5` ( `Price` varchar(20) DEFAULT NULL, `Description` varchar(40) DEFAULT NULL, `image` varchar(20) DEFAULT NULL, `quantity` varchar(20) DEFAULT NULL, `catagory` varchar(20) DEFAULT NULL, `subcatagory` varchar(20) DEFAULT NULL, `rating1` varchar(10) DEFAULT '130', `rating2` varchar(10) DEFAULT '130', `rating3` varchar(10) DEFAULT '130', `rating4` varchar(10) DEFAULT '130', `rating5` varchar(10) DEFAULT '130' ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `vivo1v5` -- INSERT INTO `vivo1v5` (`Price`, `Description`, `image`, `quantity`, `catagory`, `subcatagory`, `rating1`, `rating2`, `rating3`, `rating4`, `rating5`) VALUES ('18000', '3GB RAM,32GB ROM', 'vivo-v5-lite.jpg', '2', 'Electronics', 'Mobiles', '130', '130', '130', '130', '130'); -- -------------------------------------------------------- -- -- Table structure for table `watches` -- CREATE TABLE IF NOT EXISTS `watches` ( `products` varchar(100) DEFAULT NULL, `image` varchar(40) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `watches` -- INSERT INTO `watches` (`products`, `image`) VALUES ('FastTrack', 'fastrack.jpeg'), ('Casio1Youth1Series1Analog1Digital1Watch', 'casio1.jpg'), ('Casio1Enticer1Men1Analog1Watch121For1Men', 'casio2.jpg'), ('Titan1NH64SM01Karishma1Analog1Watch1', 'titan1.jpg'), ('Titan1Karishma1Analog1Watch121For1Men', 'titan2.jpg'); -- -------------------------------------------------------- -- -- Table structure for table `women` -- CREATE TABLE IF NOT EXISTS `women` ( `subcatagories` varchar(20) DEFAULT NULL, `image` varchar(40) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `women` -- INSERT INTO `women` (`subcatagories`, `image`) VALUES ('Jewellery', 'jewellery.jpg'); -- -------------------------------------------------------- -- -- Table structure for table `zara` -- CREATE TABLE IF NOT EXISTS `zara` ( `Price` varchar(20) DEFAULT NULL, `Description` varchar(40) DEFAULT NULL, `image` varchar(20) DEFAULT NULL, `quantity` varchar(20) DEFAULT NULL, `catagory` varchar(20) DEFAULT NULL, `subcatagory` varchar(20) DEFAULT NULL, `rating` int(11) DEFAULT '4' ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `zara` -- INSERT INTO `zara` (`Price`, `Description`, `image`, `quantity`, `catagory`, `subcatagory`, `rating`) VALUES ('2000', 'Good', 'cloth_image.jpg', '0', 'Clothing', 'Tshirt', 4);
SELECT round(MAX(lat_n),4) from station where lat_n < 137.2345 and lat_n >0;
/* View file group of table http://www.jasonstrate.com/2013/01/determining-file-group-for-a-table/ */ -- Listing 1. Query to determine table filegroup by index SELECT OBJECT_SCHEMA_NAME(t.object_id) AS schema_name, t.name AS table_name, i.index_id, i.name AS index_name, ds.name AS filegroup_name, p.rows FROM sys.tables t INNER JOIN sys.indexes i ON t.object_id=i.object_id INNER JOIN sys.filegroups ds ON i.data_space_id=ds.data_space_id INNER JOIN sys.partitions p ON i.object_id=p.object_id AND i.index_id=p.index_id ORDER BY t.name, i.index_id -- Listing 2. Query to determine table filegroup by index and partition SELECT OBJECT_SCHEMA_NAME(t.object_id) AS schema_name, t.name AS table_name, i.index_id, i.name AS index_name, p.partition_number, fg.name AS filegroup_name, p.rows FROM sys.tables t INNER JOIN sys.indexes i ON t.object_id = i.object_id INNER JOIN sys.partitions p ON i.object_id=p.object_id AND i.index_id=p.index_id LEFT OUTER JOIN sys.partition_schemes ps ON i.data_space_id=ps.data_space_id LEFT OUTER JOIN sys.destination_data_spaces dds ON ps.data_space_id=dds.partition_scheme_id AND p.partition_number=dds.destination_id INNER JOIN sys.filegroups fg ON COALESCE(dds.data_space_id, i.data_space_id)=fg.data_space_id
Create Procedure mERP_sp_Get_OutletScopeSchemeChannel(@SchemeID Int, @GroupID Int) As Begin Select Channel from tbl_mERP_SchemeChannel Where SchemeID = @SchemeID And GroupId In( Select SubGroupID From tbl_mERP_SchemeSubGroup Where GroupID = @GroupID And SchemeID = @SchemeID) End
CREATE procedure sp_save_settlement (@ClaimsID int, @SettlementType int, @SettlementDate datetime, @SettlementValue Decimal(18,6), @GSK_Flag Integer = 0, @CreditNoteNo nvarchar(100)= 0) as If @GSK_Flag = 1 Update ClaimsNote Set SettlementType = @SettlementType, SettlementDate = @SettlementDate, SettlementValue = @SettlementValue, Status = IsNull(Status, 0) | 128, CompanyCreditNoteNo = @CreditNoteNo Where ClaimID = @ClaimsID Else Update ClaimsNote Set SettlementType = @SettlementType, SettlementDate = @SettlementDate, SettlementValue = @SettlementValue, Status = IsNull(Status, 0) | 128 Where ClaimID = @ClaimsID
IF EXISTS (SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'Friends') BEGIN DROP TABLE Friends; END
--drop table if exists inqwell.geo_country; create table inqwell.geo_country ( country_name varchar(100), country_iso_2 char(2), country_iso_3 char(3) , country_numeric smallint, constraint pk_geo_country primary key (country_iso_2) ); insert into inqwell.geo_country values ('Afghanistan','AF','AFG',4) ,('Aland Islands','AX','ALA',248) ,('Albania','AL','ALB',8) ,('Algeria','DZ','DZA',12) ,('American Samoa','AS','ASM',16) ,('Andorra','AD','AND',20) ,('Angola','AO','AGO',24) ,('Anguilla','AI','AIA',660) ,('Antarctica','AQ','ATA',10) ,('Antigua and Barbuda','AG','ATG',28) ,('Argentina','AR','ARG',32) ,('Armenia','AM','ARM',51) ,('Aruba','AW','ABW',533) ,('Australia','AU','AUS',36) ,('Austria','AT','AUT',40) ,('Azerbaijan','AZ','AZE',31) ,('Bahamas','BS','BHS',44) ,('Bahrain','BH','BHR',48) ,('Bangladesh','BD','BGD',50) ,('Barbados','BB','BRB',52) ,('Belarus','BY','BLR',112) ,('Belgium','BE','BEL',56) ,('Belize','BZ','BLZ',84) ,('Benin','BJ','BEN',204) ,('Bermuda','BM','BMU',60) ,('Bhutan','BT','BTN',64) ,('Bolivia','BO','BOL',68) ,('Bosnia and Herzegovina','BA','BIH',70) ,('Botswana','BW','BWA',72) ,('Bouvet Island','BV','BVT',74) ,('Brazil','BR','BRA',76) ,('British Virgin Islands','VG','VGB',92) ,('British Indian Ocean Territory','IO','IOT',86) ,('Brunei Darussalam','BN','BRN',96) ,('Bulgaria','BG','BGR',100) ,('Burkina Faso','BF','BFA',854) ,('Burundi','BI','BDI',108) ,('Cambodia','KH','KHM',116) ,('Cameroon','CM','CMR',120) ,('Canada','CA','CAN',124) ,('Cape Verde','CV','CPV',132) ,('Cayman Islands','KY','CYM',136) ,('Central African Republic','CF','CAF',140) ,('Chad','TD','TCD',148) ,('Chile','CL','CHL',152) ,('China','CN','CHN',156) ,('Hong Kong, SAR China','HK','HKG',344) ,('Macao, SAR China','MO','MAC',446) ,('Christmas Island','CX','CXR',162) ,('Cocos (Keeling) Islands','CC','CCK',166) ,('Colombia','CO','COL',170) ,('Comoros','KM','COM',174) ,('Congo (Brazzaville)','CG','COG',178) ,('Congo, (Kinshasa)','CD','COD',180) ,('Cook Islands','CK','COK',184) ,('Costa Rica','CR','CRI',188) ,('Côte d''Ivoire','CI','CIV',384) ,('Croatia','HR','HRV',191) ,('Cuba','CU','CUB',192) ,('Cyprus','CY','CYP',196) ,('Czech Republic','CZ','CZE',203) ,('Denmark','DK','DNK',208) ,('Djibouti','DJ','DJI',262) ,('Dominica','DM','DMA',212) ,('Dominican Republic','DO','DOM',214) ,('Ecuador','EC','ECU',218) ,('Egypt','EG','EGY',818) ,('El Salvador','SV','SLV',222) ,('Equatorial Guinea','GQ','GNQ',226) ,('Eritrea','ER','ERI',232) ,('Estonia','EE','EST',233) ,('Ethiopia','ET','ETH',231) ,('Falkland Islands (Malvinas)','FK','FLK',238) ,('Faroe Islands','FO','FRO',234) ,('Fiji','FJ','FJI',242) ,('Finland','FI','FIN',246) ,('France','FR','FRA',250) ,('French Guiana','GF','GUF',254) ,('French Polynesia','PF','PYF',258) ,('French Southern Territories','TF','ATF',260) ,('Gabon','GA','GAB',266) ,('Gambia','GM','GMB',270) ,('Georgia','GE','GEO',268) ,('Germany','DE','DEU',276) ,('Ghana','GH','GHA',288) ,('Gibraltar','GI','GIB',292) ,('Greece','GR','GRC',300) ,('Greenland','GL','GRL',304) ,('Grenada','GD','GRD',308) ,('Guadeloupe','GP','GLP',312) ,('Guam','GU','GUM',316) ,('Guatemala','GT','GTM',320) ,('Guernsey','GG','GGY',831) ,('Guinea','GN','GIN',324) ,('Guinea-Bissau','GW','GNB',624) ,('Guyana','GY','GUY',328) ,('Haiti','HT','HTI',332) ,('Heard and Mcdonald Islands','HM','HMD',334) ,('Holy See (Vatican City State)','VA','VAT',336) ,('Honduras','HN','HND',340) ,('Hungary','HU','HUN',348) ,('Iceland','IS','ISL',352) ,('India','IN','IND',356) ,('Indonesia','ID','IDN',360) ,('Iran, Islamic Republic of','IR','IRN',364) ,('Iraq','IQ','IRQ',368) ,('Ireland','IE','IRL',372) ,('Isle of Man','IM','IMN',833) ,('Israel','IL','ISR',376) ,('Italy','IT','ITA',380) ,('Jamaica','JM','JAM',388) ,('Japan','JP','JPN',392) ,('Jersey','JE','JEY',832) ,('Jordan','JO','JOR',400) ,('Kazakhstan','KZ','KAZ',398) ,('Kenya','KE','KEN',404) ,('Kiribati','KI','KIR',296) ,('Korea (North)','KP','PRK',408) ,('Korea (South)','KR','KOR',410) ,('Kuwait','KW','KWT',414) ,('Kyrgyzstan','KG','KGZ',417) ,('Lao PDR','LA','LAO',418) ,('Latvia','LV','LVA',428) ,('Lebanon','LB','LBN',422) ,('Lesotho','LS','LSO',426) ,('Liberia','LR','LBR',430) ,('Libya','LY','LBY',434) ,('Liechtenstein','LI','LIE',438) ,('Lithuania','LT','LTU',440) ,('Luxembourg','LU','LUX',442) ,('Macedonia, Republic of','MK','MKD',807) ,('Madagascar','MG','MDG',450) ,('Malawi','MW','MWI',454) ,('Malaysia','MY','MYS',458) ,('Maldives','MV','MDV',462) ,('Mali','ML','MLI',466) ,('Malta','MT','MLT',470) ,('Marshall Islands','MH','MHL',584) ,('Martinique','MQ','MTQ',474) ,('Mauritania','MR','MRT',478) ,('Mauritius','MU','MUS',480) ,('Mayotte','YT','MYT',175) ,('Mexico','MX','MEX',484) ,('Micronesia, Federated States of','FM','FSM',583) ,('Moldova','MD','MDA',498) ,('Monaco','MC','MCO',492) ,('Mongolia','MN','MNG',496) ,('Montenegro','ME','MNE',499) ,('Montserrat','MS','MSR',500) ,('Morocco','MA','MAR',504) ,('Mozambique','MZ','MOZ',508) ,('Myanmar','MM','MMR',104) ,('Namibia','NA','NAM',516) ,('Nauru','NR','NRU',520) ,('Nepal','NP','NPL',524) ,('Netherlands','NL','NLD',528) ,('Netherlands Antilles','AN','ANT',530) ,('New Caledonia','NC','NCL',540) ,('New Zealand','NZ','NZL',554) ,('Nicaragua','NI','NIC',558) ,('Niger','NE','NER',562) ,('Nigeria','NG','NGA',566) ,('Niue','NU','NIU',570) ,('Norfolk Island','NF','NFK',574) ,('Northern Mariana Islands','MP','MNP',580) ,('Norway','NO','NOR',578) ,('Oman','OM','OMN',512) ,('Pakistan','PK','PAK',586) ,('Palau','PW','PLW',585) ,('Palestinian Territory','PS','PSE',275) ,('Panama','PA','PAN',591) ,('Papua New Guinea','PG','PNG',598) ,('Paraguay','PY','PRY',600) ,('Peru','PE','PER',604) ,('Philippines','PH','PHL',608) ,('Pitcairn','PN','PCN',612) ,('Poland','PL','POL',616) ,('Portugal','PT','PRT',620) ,('Puerto Rico','PR','PRI',630) ,('Qatar','QA','QAT',634) ,('Réunion','RE','REU',638) ,('Romania','RO','ROU',642) ,('Russian Federation','RU','RUS',643) ,('Rwanda','RW','RWA',646) ,('Saint-Barthélemy','BL','BLM',652) ,('Saint Helena','SH','SHN',654) ,('Saint Kitts and Nevis','KN','KNA',659) ,('Saint Lucia','LC','LCA',662) ,('Saint-Martin (French part)','MF','MAF',663) ,('Saint Pierre and Miquelon','PM','SPM',666) ,('Saint Vincent and Grenadines','VC','VCT',670) ,('Samoa','WS','WSM',882) ,('San Marino','SM','SMR',674) ,('Sao Tome and Principe','ST','STP',678) ,('Saudi Arabia','SA','SAU',682) ,('Senegal','SN','SEN',686) ,('Serbia','RS','SRB',688) ,('Seychelles','SC','SYC',690) ,('Sierra Leone','SL','SLE',694) ,('Singapore','SG','SGP',702) ,('Slovakia','SK','SVK',703) ,('Slovenia','SI','SVN',705) ,('Solomon Islands','SB','SLB',90) ,('Somalia','SO','SOM',706) ,('South Africa','ZA','ZAF',710) ,('South Georgia and the South Sandwich Islands','GS','SGS',239) ,('South Sudan','SS','SSD',728) ,('Spain','ES','ESP',724) ,('Sri Lanka','LK','LKA',144) ,('Sudan','SD','SDN',736) ,('Suriname','SR','SUR',740) ,('Svalbard and Jan Mayen Islands','SJ','SJM',744) ,('Swaziland','SZ','SWZ',748) ,('Sweden','SE','SWE',752) ,('Switzerland','CH','CHE',756) ,('Syrian Arab Republic (Syria)','SY','SYR',760) ,('Taiwan, Republic of China','TW','TWN',158) ,('Tajikistan','TJ','TJK',762) ,('Tanzania, United Republic of','TZ','TZA',834) ,('Thailand','TH','THA',764) ,('Timor-Leste','TL','TLS',626) ,('Togo','TG','TGO',768) ,('Tokelau','TK','TKL',772) ,('Tonga','TO','TON',776) ,('Trinidad and Tobago','TT','TTO',780) ,('Tunisia','TN','TUN',788) ,('Turkey','TR','TUR',792) ,('Turkmenistan','TM','TKM',795) ,('Turks and Caicos Islands','TC','TCA',796) ,('Tuvalu','TV','TUV',798) ,('Uganda','UG','UGA',800) ,('Ukraine','UA','UKR',804) ,('United Arab Emirates','AE','ARE',784) ,('United Kingdom','GB','GBR',826) ,('United States of America','US','USA',840) ,('US Minor Outlying Islands','UM','UMI',581) ,('Uruguay','UY','URY',858) ,('Uzbekistan','UZ','UZB',860) ,('Vanuatu','VU','VUT',548) ,('Venezuela (Bolivarian Republic)','VE','VEN',862) ,('Viet Nam','VN','VNM',704) ,('Virgin Islands, US','VI','VIR',850) ,('Wallis and Futuna Islands','WF','WLF',876) ,('Western Sahara','EH','ESH',732) ,('Yemen','YE','YEM',887) ,('Zambia','ZM','ZMB',894) ,('Zimbabwe','ZW','ZWE',716) ; --drop table if exists inqwell.geo_country_continent; create table inqwell.geo_country_continent ( country_iso_2 char(2) , continent_iso_3 varchar(4), continent_name varchar(100), constraint pk_geo_country_continent primary key (country_iso_2) ); alter table inqwell.geo_country_continent add constraint fk_country foreign key (country_iso_2) references inqwell.geo_country; insert into inqwell.geo_country_continent values ('AD','EUR','Europe') ,('AE','MEA','Middle East & Africa') ,('AF','MEA','Middle East & Africa') ,('AG','LA','Latin America') ,('AI','LA','Latin America') ,('AL','EUR','Europe') ,('AM','MEA','Middle East & Africa') ,('AN','LA','Latin America') ,('AO','MEA','Middle East & Africa') ,('AR','LA','Latin America') ,('AS','OTH','Other') ,('AT','EUR','Europe') ,('AU','AUS','Aust/NZ') ,('AW','LA','Latin America') ,('AX','EUR','Europe') ,('AZ','ASIA','Europe') ,('BA','EUR','Europe') ,('BB','LA','Latin America') ,('BD','ASIA','Asia') ,('BE','EUR','Europe') ,('BF','MEA','Middle East & Africa') ,('BG','EUR','Europe') ,('BH','MEA','Middle East & Africa') ,('BI','MEA','Middle East & Africa') ,('BJ','MEA','Middle East & Africa') ,('BL','LA','Latin America') ,('BM','LA','Latin America') ,('BN','ASIA','Asia') ,('BO','LA','Latin America') ,('BR','LA','Latin America') ,('BS','LA','Latin America') ,('BT','ASIA','Asia') ,('BV','OTH','Other') ,('BW','MEA','Middle East & Africa') ,('BY','EUR','Europe') ,('BZ','LA','Latin America') ,('CA','USC','Canada') ,('CF','MEA','Middle East & Africa') ,('CG','MEA','Middle East & Africa') ,('CH','EUR','Europe') ,('CI','MEA','Middle East & Africa') ,('CL','LA','Latin America') ,('CM','MEA','Middle East & Africa') ,('CN','CH','Asia') ,('CO','LA','Latin America') ,('CR','LA','Latin America') ,('CU','LA','Latin America') ,('CV','MEA','Middle East & Africa') ,('CY','EUR','Europe') ,('CZ','EUR','Europe') ,('DE','EUR','Europe') ,('DH','MEA','Middle East & Africa') ,('DJ','MEA','Middle East & Africa') ,('DK','EUR','Europe') ,('DM','LA','Latin America') ,('DO','LA','Latin America') ,('DZ','MEA','Middle East & Africa') ,('EC','LA','Latin America') ,('EE','EUR','Europe') ,('EG','MEA','Middle East & Africa') ,('EH','MEA','Middle East & Africa') ,('ER','MEA','Middle East & Africa') ,('ES','EUR','Europe') ,('ET','MEA','Middle East & Africa') ,('FI','EUR','Europe') ,('FJ','OTH','Asia') ,('FK','LA','Latin America') ,('FM','OTH','Other') ,('FO','EUR','Europe') ,('FR','EUR','Europe') ,('GA','MEA','Middle East & Africa') ,('GB','UKI','United Kingdom & Ireland') ,('GD','LA','Latin America') ,('GE','ASIA','Europe') ,('GI','EUR','Europe') ,('GL','OTH','Other') ,('GM','MEA','Middle East & Africa') ,('GN','MEA','Middle East & Africa') ,('GP','LA','Latin America') ,('GR','EUR','Europe') ,('GS','OTH','Other') ,('GT','LA','Latin America') ,('GU','OTH','Asia') ,('GW','MEA','Middle East & Africa') ,('GY','LA','Latin America') ,('HK','HKU','Asia') ,('HM','OTH','Other') ,('HN','LA','Latin America') ,('HR','EUR','Europe') ,('HT','LA','Latin America') ,('HU','EUR','Europe') ,('ID','ASIA','Asia') ,('IE','UKI','United Kingdom & Ireland') ,('IL','MEA','Middle East & Africa') ,('IM','EUR','Europe') ,('IN','ASIA','Asia') ,('IO','ASIA','Asia') ,('IQ','MEA','Middle East & Africa') ,('IR','MEA','Middle East & Africa') ,('IS','EUR','Europe') ,('IT','EUR','Europe') ,('JE','EUR','Europe') ,('JM','LA','Latin America') ,('JO','MEA','Middle East & Africa') ,('JP','JPN','Asia') ,('KE','MEA','Middle East & Africa') ,('KG','MEA','Middle East & Africa') ,('KH','ASIA','Asia') ,('KI','OTH','Other') ,('KM','MEA','Middle East & Africa') ,('KN','LA','Latin America') ,('KP','ASIA','Asia') ,('KR','JPN','Asia') ,('KW','MEA','Middle East & Africa') ,('KY','LA','Latin America') ,('KZ','ASIA','Europe') ,('LA','ASIA','Asia') ,('LB','MEA','Middle East & Africa') ,('LC','LA','Latin America') ,('LI','EUR','Europe') ,('LK','ASIA','Asia') ,('LR','MEA','Middle East & Africa') ,('LS','MEA','Middle East & Africa') ,('LT','EUR','Europe') ,('LU','EUR','Europe') ,('LV','EUR','Europe') ,('LY','MEA','Middle East & Africa') ,('MA','MEA','Middle East & Africa') ,('MC','EUR','Europe') ,('MD','EUR','Europe') ,('ME','EUR','Europe') ,('MF','LA','Latin America') ,('MG','MEA','Middle East & Africa') ,('MH','OTH','Other') ,('MK','EUR','Europe') ,('ML','MEA','Middle East & Africa') ,('MM','ASIA','Asia') ,('MN','ASIA','Asia') ,('MO','ASIA','Asia') ,('MP','OTH','Other') ,('MR','MEA','Middle East & Africa') ,('MS','LA','Latin America') ,('MT','EUR','Europe') ,('MU','MEA','Middle East & Africa') ,('MV','ASIA','Asia') ,('MW','MEA','Middle East & Africa') ,('MX','LA','Latin America') ,('MY','ASIA','Asia') ,('MZ','MEA','Middle East & Africa') ,('NA','MEA','Middle East & Africa') ,('NC','OTH','Europe') ,('NE','MEA','Middle East & Africa') ,('NF','OTH','Other') ,('NG','MEA','Middle East & Africa') ,('NI','LA','Latin America') ,('NL','EUR','Europe') ,('NO','EUR','Europe') ,('NP','ASIA','Asia') ,('NR','OTH','Other') ,('NU','OTH','Other') ,('NZ','AUS','Aust/NZ') ,('OM','MEA','Middle East & Africa') ,('PA','LA','Latin America') ,('PE','LA','Latin America') ,('PF','OTH','Asia') ,('PG','OTH','Asia') ,('PH','ASIA','Asia') ,('PK','MEA','Middle East & Africa') ,('PL','EUR','Europe') ,('PM','OTH','Other') ,('PN','OTH','Other') ,('PR','LA','US') ,('PS','MEA','Middle East & Africa') ,('PT','EUR','Europe') ,('PW','OTH','Other') ,('PY','LA','Latin America') ,('QA','MEA','Middle East & Africa') ,('RE','OTH','Other') ,('RO','EUR','Europe') ,('RS','EUR','Europe') ,('RU','EUR','Europe') ,('RW','MEA','Middle East & Africa') ,('SA','MEA','Middle East & Africa') ,('SB','OTH','Other') ,('SC','MEA','Middle East & Africa') ,('SD','MEA','Middle East & Africa') ,('SE','EUR','Europe') ,('SG','ASIA','Asia') ,('SH','OTH','Other') ,('SI','EUR','Europe') ,('SJ','EUR','Europe') ,('SK','EUR','Europe') ,('SL','MEA','Middle East & Africa') ,('SM','EUR','Europe') ,('SN','MEA','Middle East & Africa') ,('SO','MEA','Middle East & Africa') ,('SR','LA','Latin America') ,('ST','OTH','Other') ,('SV','LA','Latin America') ,('SY','MEA','Middle East & Africa') ,('SZ','MEA','Middle East & Africa') ,('TC','LA','Latin America') ,('TD','MEA','Middle East & Africa') ,('TF','OTH','Other') ,('TG','MEA','Middle East & Africa') ,('TH','ASIA','Asia') ,('TJ','MEA','Middle East & Africa') ,('TK','OTH','Other') ,('TL','ASIA','Asia') ,('TM','MEA','Middle East & Africa') ,('TN','MEA','Middle East & Africa') ,('TO','OTH','Other') ,('TR','MEA','Middle East & Africa') ,('TT','LA','Latin America') ,('TV','OTH','Other') ,('TW','JPN','Asia') ,('TZ','MEA','Middle East & Africa') ,('UA','EUR','Europe') ,('UG','MEA','Middle East & Africa') ,('UM','OTH','Other') ,('US','USC','US') ,('UY','LA','Latin America') ,('UZ','ASIA','Asia') ,('VA','EUR','Europe') ,('VC','LA','Latin America') ,('VE','LA','Latin America') ,('VG','LA','Latin America') ,('VI','LA','Latin America') ,('VN','ASIA','Asia') ,('VU','OTH','Other') ,('WF','OTH','Other') ,('WS','OTH','Other') ,('YE','MEA','Middle East & Africa') ,('YT','MEA','Middle East & Africa') ,('ZA','MEA','Middle East & Africa') ,('ZM','MEA','Middle East & Africa') ,('ZW','MEA','Middle East & Africa') ; --drop table if exists inqwell.geo_region_country; create table inqwell.geo_region_country ( country_iso_2 char(2) , region_iso_3 varchar(3), region_name varchar(100), constraint pk_geo_country primary key (country_iso_2,region_iso_3) ) distributed by (country_iso_2); alter table inqwell.geo_region_country add constraint fk_region_country foreign key (country_iso_2) references inqwell.geo_country; insert into inqwell.geo_region_country values ('AS','AS','AMERICAN SAMOA') ,('AU','ACT','Australian Capital Territory') ,('AU','NSW','New South Wales') ,('AU','NTA','Northern Territory') ,('AU','QLD','Queensland') ,('AU','SA','South Australia') ,('AU','TAS','Tasmania') ,('AU','VIC','Victoria') ,('AU','WAU','Western Australia') ,('CA','AB','ALBERTA') ,('CA','BC','BRITISH COLUMBIA') ,('CA','MB','MANITOBA') ,('CA','NT','N.W. TERRITORIES') ,('CA','NB','NEW BRUNSWICK') ,('CA','NL','NEWFOUNDLAND') ,('CA','NS','NOVA SCOTIA') ,('CA','NU','Nunavut') ,('CA','ON','ONTARIO') ,('CA','PE','PRINCE EDWARD IS.') ,('CA','QC','QUEBEC') ,('CA','SK','SASKATCHEWAN') ,('CA','YT','YUKON TERRITORY') ,('FM','FM','FED STATES OF MICRONESIA') ,('GU','GU','GUAM') ,('MH','MH','MARSHALL ISLANDS') ,('MP','MP','N. MARIANA ISLANDS') ,('PR','PR','PUERTO RICO') ,('PW','PW','PALAU') ,('US','AA','AA GOVERNMENT CODE') ,('US','AE','AE GOVERNMENT CODE') ,('US','AL','ALABAMA') ,('US','AK','ALASKA') ,('US','AP','AP GOVERNMENT CODE') ,('US','AZ','ARIZONA') ,('US','AR','ARKANSAS') ,('US','CA','CALIFORNIA') ,('US','CO','COLORADO') ,('US','CT','CONNECTICUT') ,('US','DE','DELAWARE') ,('US','DC','DISTRICT OF COLUMBIA') ,('US','FL','FLORIDA') ,('US','GA','GEORGIA') ,('US','HI','HAWAII') ,('US','ID','IDAHO') ,('US','IL','ILLINOIS') ,('US','IN','INDIANA') ,('US','IA','IOWA') ,('US','KS','KANSAS') ,('US','KY','KENTUCKY') ,('US','LA','LOUISIANA') ,('US','ME','MAINE') ,('US','MD','MARYLAND') ,('US','MA','MASSACHUSETTS') ,('US','MI','MICHIGAN') ,('US','MN','MINNESOTA') ,('US','MS','MISSISSIPPI') ,('US','MO','MISSOURI') ,('US','MT','MONTANA') ,('US','NE','NEBRASKA') ,('US','NV','NEVADA') ,('US','NH','NEW HAMPSHIRE') ,('US','NJ','NEW JERSEY') ,('US','NM','NEW MEXICO') ,('US','NY','NEW YORK') ,('US','NC','NORTH CAROLINA') ,('US','ND','NORTH DAKOTA') ,('US','OH','OHIO') ,('US','OK','OKLAHOMA') ,('US','OR','OREGON') ,('US','PA','PENNSYLVANIA') ,('US','RI','RHODE ISLAND') ,('US','SC','SOUTH CAROLINA') ,('US','SD','SOUTH DAKOTA') ,('US','TN','TENNESSEE') ,('US','TX','TEXAS') ,('US','UT','UTAH') ,('US','VT','VERMONT') ,('US','VA','VIRGINIA') ,('US','WA','WASHINGTON') ,('US','WV','WEST VIRGINIA') ,('US','WI','WISCONSIN') ,('US','WY','WYOMING') ,('VI','VI','VIRGIN ISLANDS'); analyze inqwell.geo_region_country; alter table inqwell.dim_account add constraint fk_region foreign key (geo_country_id,geo_region_id) references inqwell.geo_region_country(country_iso_2, region_iso_3); alter table inqwell.dim_account add constraint fk_account_country foreign key (geo_country_id) references inqwell.geo_country (country_iso_2); CREATE TABLE inqwell.dim_format ( format_id integer NOT NULL, format_name character varying(400) NOT NULL, journal_flag boolean NOT NULL, book_flag boolean NOT NULL, multimedia_flag boolean NOT NULL, database_flag boolean NOT NULL, debouncing_period smallint, cst_format_code character varying(30), item_flag boolean DEFAULT true ); drop table if exists inqwell.dim_format; INSERT INTO inqwell.dim_format (format_id,format_name,journal_flag,book_flag,multimedia_flag,database_flag,debouncing_period,item_flag) VALUES (0,'Other',false,false,false,false,10,false) ,(1,'Abstract',false,false,false,false,10,true) ,(2,'Citation',false,false,false,false,10,true) ,(3,'Full-text HTML',true,true,false,true,10,true) ,(4,'Full-text PDF',true,true,false,true,30,true) ,(5,'Full-text HTML Mobile',false,true,false,false,10,true) ,(6,'Full-text PDF Mobile',false,true,true,false,10,true) ,(7,'Multimedia',false,false,true,false,10,true) ,(8,'References',false,false,false,true,10,true) ,(9,'Table of Contents',false,false,false,false,10,true) ,(10,'Image',false,false,false,true,10,true) ,(11,'Supplemental',false,false,false,false,10,false) ,(12,'Video',false,false,false,true,10,false); alter table inqwell.dim_format add constraint pk_format primary key (format_id); --Collect statistics on these tables
-- MySQL dump 10.13 Distrib 8.0.16, for Win64 (x86_64) -- -- Host: localhost Database: one_roof -- ------------------------------------------------------ -- Server version 8.0.16 /*!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 `category` -- DROP TABLE IF EXISTS `category`; /*!40101 SET @saved_cs_client = @@character_set_client */; SET character_set_client = utf8mb4 ; CREATE TABLE `category` ( `cat_id` int(11) NOT NULL AUTO_INCREMENT, `cat_name` varchar(100) DEFAULT NULL, `cat_code` varchar(100) DEFAULT NULL, `description` longtext, PRIMARY KEY (`cat_id`) ) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `category` -- LOCK TABLES `category` WRITE; /*!40000 ALTER TABLE `category` DISABLE KEYS */; INSERT INTO `category` VALUES (1,'Pipe','74FF40E9-FB77-4580','GU'),(2,'Cement','A3FD2066-53D9-4243','Loose'),(3,'Mica','8E9678C4-74DE-4A1F','wood'),(4,'MIca g','AEA6DCFE-29CE-4D18','wood'),(5,'dsad','8A2168B6-1954-400B','dsa'),(6,'dfdgdfg','845EE96D-A682-4129','dgdfg'),(7,'sdgd','FDCFFF7A-0BBB-4342','fff'),(8,'dfdsf','AF70476C-C922-487F','dfsdf'),(9,'fsdfsdfgggggg','C8A7C6A9-7153-493B','ffff'); /*!40000 ALTER TABLE `category` ENABLE KEYS */; UNLOCK TABLES; /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; -- Dump completed on 2020-08-19 21:50:00
-- MySQL Script generated by MySQL Workbench -- Tue Dec 4 19:20:12 2018 -- 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 Airline -- ----------------------------------------------------- -- ----------------------------------------------------- -- Schema Airline -- ----------------------------------------------------- CREATE SCHEMA IF NOT EXISTS `Airline` DEFAULT CHARACTER SET utf8 ; USE `Airline` ; -- ----------------------------------------------------- -- Table `Airline`.`Airport` -- ----------------------------------------------------- DROP TABLE IF EXISTS `Airline`.`AIRPORT` ; CREATE TABLE IF NOT EXISTS `Airline`.`AIRPORT` ( `airport_id` INT NOT NULL AUTO_INCREMENT, `name` VARCHAR(100) NOT NULL UNIQUE, `deleted` TINYINT NOT NULL, PRIMARY KEY (`airport_id`)) ENGINE = InnoDB; -- ----------------------------------------------------- -- Table `Airline`.`Flight` -- ----------------------------------------------------- DROP TABLE IF EXISTS `Airline`.`FLIGHT` ; CREATE TABLE IF NOT EXISTS `Airline`.`FLIGHT` ( `flight_id` INT NOT NULL AUTO_INCREMENT, `number` VARCHAR(100) NOT NULL UNIQUE, `departure_date` DATETIME NOT NULL, `arrival_date` DATETIME NOT NULL, `departure_airport_id` INT NOT NULL, `arrival_airport_id` INT NOT NULL, `no_of_seats` INT NOT NULL, `price` DOUBLE NOT NULL, `deleted` TINYINT NOT NULL, PRIMARY KEY (`flight_id`), CONSTRAINT `departure_airport_id` FOREIGN KEY (`departure_airport_id`) REFERENCES `Airline`.`Airport` (`airport_id`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `arrival_airport_id` FOREIGN KEY (`arrival_airport_id`) REFERENCES `Airline`.`Airport` (`airport_id`) ON DELETE NO ACTION ON UPDATE NO ACTION) ENGINE = InnoDB; -- ----------------------------------------------------- -- Table `Airline`.`User` -- ----------------------------------------------------- DROP TABLE IF EXISTS `Airline`.`USER` ; CREATE TABLE IF NOT EXISTS `Airline`.`USER` ( `user_id` INT NOT NULL AUTO_INCREMENT, `user_name` VARCHAR(50) NOT NULL UNIQUE, `password` VARCHAR(50) NOT NULL, `first_name` VARCHAR(45) NOT NULL, `last_name` VARCHAR(45) NOT NULL, `registration_date` DATE NOT NULL, `role` ENUM('REGULAR', 'ADMIN') NOT NULL, `blocked` TINYINT NOT NULL, `deleted` TINYINT NOT NULL, PRIMARY KEY (`user_id`)) ENGINE = InnoDB; -- ----------------------------------------------------- -- Table `Airline`.`Ticket` -- ----------------------------------------------------- DROP TABLE IF EXISTS `Airline`.`TICKET` ; CREATE TABLE IF NOT EXISTS `Airline`.`TICKET` ( `ticket_id` INT NOT NULL AUTO_INCREMENT, `departure_flight_id` INT NOT NULL, `arrival_flight_id` INT NULL, `departure_flight_seat_no` INT NOT NULL, `arrival_flight_seat_no` INT NULL, `reservation_date` DATETIME NULL, `sale_date` DATETIME NULL, `user_id` INT NULL, `deleted` TINYINT NOT NULL, PRIMARY KEY (`ticket_id`), CONSTRAINT `departure_flight_id` FOREIGN KEY (`departure_flight_id`) REFERENCES `Airline`.`Flight` (`flight_id`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `arrival_flight_id` FOREIGN KEY (`arrival_flight_id`) REFERENCES `Airline`.`Flight` (`flight_id`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `user_id` FOREIGN KEY (`user_id`) REFERENCES `Airline`.`User` (`user_id`) ON DELETE NO ACTION ON UPDATE NO ACTION) ENGINE = InnoDB; -- ---------------------------------------------------- -- REPORT VIEWS: CREATE VIEW report_specific_by_airport_all_time AS SELECT a.airport_id, a.name, flight_id, count(ticket_id) as no_of_sold_tickets, price * count(ticket_id) AS total_revenue FROM airport a join flight f on a.airport_id = f.departure_airport_id or a.airport_id = f.arrival_airport_id left outer join ticket t on (f.flight_id = t.departure_flight_id or f.flight_id = t.arrival_flight_id) and t.sale_date IS NOT NULL GROUP BY a.airport_id, a.name, f.price, f.flight_id; -- ---------------------------------------------------- CREATE VIEW total_by_airport_all_time AS SELECT name, count(flight_id) as no_of_flights, sum(no_of_sold_tickets) as total_tickets_sold, sum(total_revenue) as total_revenue FROM report_specific_by_airport_all_time GROUP BY airport_id, name; -- ---------------------------------------------------- CREATE VIEW total_all_time AS SELECT sum(no_of_flights) AS total_flights, sum(total_tickets_sold) as total_tickets, sum(total_revenue) as total FROM total_by_airport_all_time; -- ---------------------------------------------------- SET SQL_MODE=@OLD_SQL_MODE; SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS; SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS;
SELECT * FROM connect.user; SELECT * FROM connect.manage; SELECT * FROM connect.study; SELECT * FROM connect.cafe; SELECT * FROM connect.cron_withdraw; SELECT * FROM connect.cron_deposit; SELECT * FROM manage JOIN study ON manage.study_sId = study.sId WHERE manage.user_uId = '4767'; SELECT * FROM cafe JOIN study ON cafe.cAccount = study.cafe_cAccount WHERE study.cafe_cAccount = '2222-2222'; SELECT * FROM cafe JOIN study ON cafe.cAccount = study.cafe_cAccount WHERE study.cafe_cAccount in ('4444-4444',"2222-2222"); SELECT * FROM manage JOIN study ON manage.study_sId = study.sId WHERE manage.user_uId = 'test1'; SELECT * FROM connect.cron_withdraw c JOIN connect.user u ON u.uId = c.moneyFrom WHERE transfer = 0 AND sDate = '2019-01-01'; SELECT * FROM connect.cron_deposit c JOIN connect.user u ON u.uId = c.moneyFrom WHERE transfer = 0 AND sDate = '2019-02-02'; SELECT * FROM cafe JOIN (study, user) ON cafe.cAccount = study.cafe_cAccount AND user.uId='4767' WHERE study.cafe_cAccount in ('2222-2222');
-- phpMyAdmin SQL Dump -- version 3.4.7.1 -- http://www.phpmyadmin.net -- -- Host: 62.149.150.224 -- Generato il: Mag 18, 2016 alle 09:34 -- Versione del server: 5.5.45 -- Versione PHP: 5.3.8 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8 */; -- -- Database: `Sql801819_1` -- -- -------------------------------------------------------- -- -- Struttura della tabella `download` -- CREATE TABLE IF NOT EXISTS `download` ( `id` tinyint(4) NOT NULL AUTO_INCREMENT, `link` text NOT NULL, `descrizione` longtext NOT NULL, `tipo` tinyint(2) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=41 ; -- -- Dump dei dati per la tabella `download` -- INSERT INTO `download` (`id`, `link`, `descrizione`, `tipo`) VALUES (40, 'x dispensaVELA_1.2.pdf', 'DISPENSA VELA SCUOLA NAUTICA RINALDINI', 1), (37, 'VP2 (VELA PRATICA 2).pdf', 'NOZIONI SECONDA USCITA', 1), (38, 'VP1 (VELA PRATICA 1).pdf', 'NOZIONI PRIMA USCITA', 1); -- -------------------------------------------------------- -- -- Struttura della tabella `news` -- CREATE TABLE IF NOT EXISTS `news` ( `id` tinyint(4) NOT NULL AUTO_INCREMENT, `news` longtext NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=6 ; -- -- Dump dei dati per la tabella `news` -- INSERT INTO `news` (`id`, `news`) VALUES (1, 'NUOVI CORSI PER IL DIPORTO E LA VELA D&#039;ALTURA - ORMEGGIO - STRUMENTI - IMPIANTI'), (5, 'METEO - PERFEZIONAMENTO VELA - GENNAKER - SPINNAKER - CROCIERE DIDATTICHE'), (3, 'Scopri RAIATEA barca scuola e noleggio con skipper'), (4, 'AGOSTO: ARCIPELAGO TOSCANO con base a Punta Ala. POSTI LIMITATI! Richiedi info.'); /*!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 */;
LOAD DATA LOCAL INFILE 'user-data.csv' INTO TABLE Users FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'; LOAD DATA LOCAL INFILE 'item-data.csv' INTO TABLE Items FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'; LOAD DATA LOCAL INFILE 'bid-data.csv' INTO TABLE Bids FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'; LOAD DATA LOCAL INFILE 'category-data.csv' INTO TABLE Categories FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'; LOAD DATA LOCAL INFILE 'location-data.csv' INTO TABLE UserLocation FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"';
-- Lab | SQL Queries 6 -- We are going to do some database maintenance. We have received the film catalog for 2020. -- The catalog is in a CSV file named **films_2020.csv** that can be found at `files_for_lab` folder. USE sakila; -- show variables like 'local_infile'; -- set global local_infile = 1; -- Add the new films to the database. -- We make a table film_2020 to import the csv file. create table film_2020 (title varchar(250), description varchar(3000), release_year int, language_id int, original_language_id tinyint unsigned, rental_duration int, rental_rate decimal(4,2), length int, replacement_cost float, rating varchar(10), special_features varchar(3000)); -- right click film_2020 table - table data import wizard SELECT * FROM sakila.film_2020; SELECT * FROM sakila.film; describe sakila.film; SELECT * FROM sakila.inventory; -- Adding films from film_2020 to film. INSERT INTO sakila.film (title, description, release_year, language_id, original_language_id, rental_duration, rental_rate, length, rating, special_features) SELECT title, description, release_year, language_id, original_language_id, rental_duration, rental_rate, length, rating, special_features FROM sakila.film_2020; SELECT * FROM sakila.film where release_year in (2020); -- Checking additions to film -- Update inventory. -- We have just one item for each film, and all will be placed in store 2. show fields from inventory; show fields from rental; select*from sakila.inventory; Insert into inventory(film_id, store_id) select film_id, 2 from film where release_year = 2020; -- All other movies will be moved to store 1. Insert into inventory(film_id, store_id) select film_id, 1 from film where release_year <> 2020; -- The rental duration will be 3 days, with an offer price of 2.99€ and a replacement cost of 8.99€. update film set rental_duration = 3, rental_rate=2.99, replacement_cost=8.99 where release_year = 2020;
/* SQLyog Enterprise - MySQL GUI v6.5 MySQL - 5.7.14 : Database - sys_bdr ********************************************************************* */ /*!40101 SET NAMES utf8 */; /*!40101 SET SQL_MODE=''*/; /*!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' */; create database if not exists `sys_bdr`; USE `sys_bdr`; /*Table structure for table `users` */ DROP TABLE IF EXISTS `users`; CREATE TABLE `users` ( `id` int(11) NOT NULL AUTO_INCREMENT, `user_fullname` varchar(25) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=latin1 CHECKSUM=1 DELAY_KEY_WRITE=1 ROW_FORMAT=DYNAMIC; /*Data for the table `users` */ insert into `users`(`id`,`user_fullname`) values (1,'Prime'),(6,'Summas Than'); /*Table structure for table `api_cake` */ DROP TABLE IF EXISTS `api_cake`; CREATE TABLE `api_cake` ( `id` int(0) NOT NULL AUTO_INCREMENT, `titulo` varchar(255) NULL, `descricao` text NULL, `prioridade` int(11) NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=latin1 CHECKSUM=1 DELAY_KEY_WRITE=1 ROW_FORMAT=DYNAMIC; /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/* SQLyog 企业版 - MySQL GUI v8.14 MySQL - 5.0.22-community-nt : Database - spider ********************************************************************* */ /*!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*/`spider` /*!40100 DEFAULT CHARACTER SET utf8 */; USE `spider`; /*Table structure for table `item_jd` */ DROP TABLE IF EXISTS `item_jd`; CREATE TABLE `item_jd` ( `item_id` varchar(20) NOT NULL, `item_price` int(20) default NULL, `item_title` varchar(50) default NULL, PRIMARY KEY (`item_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; /*Data for the table `item_jd` */ insert into `item_jd`(`item_id`,`item_price`,`item_title`) values ('1',11,'111'),('11',100,'111'),('14',100,'111'); /*Table structure for table `url_jd` */ DROP TABLE IF EXISTS `url_jd`; CREATE TABLE `url_jd` ( `URL_ID` int(11) NOT NULL auto_increment, `URL_NAME` varchar(50) default NULL, PRIMARY KEY (`URL_ID`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; /*Data for the table `url_jd` */ /*!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 */;
-------------------------------------------------------- -- File created - Wednesday-October-06-2021 -------------------------------------------------------- -------------------------------------------------------- -- DDL for Table GUEST -------------------------------------------------------- CREATE TABLE "K9SYED"."GUEST" ( "GUEST_ID" NUMBER(*,0), "GUEST_NAME" VARCHAR2(255 BYTE), "GUEST_CONTACT_NUMBER" NUMBER(*,0), "GUEST_PAYMENT_INFO" VARCHAR2(225 BYTE) ) SEGMENT CREATION DEFERRED PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING TABLESPACE "DBCOURSE" ; -------------------------------------------------------- -- DDL for Index GUEST_PK -------------------------------------------------------- CREATE UNIQUE INDEX "K9SYED"."GUEST_PK" ON "K9SYED"."GUEST" ("GUEST_ID") PCTFREE 10 INITRANS 2 MAXTRANS 255 NOCOMPRESS LOGGING TABLESPACE "DBCOURSE" ; -------------------------------------------------------- -- Constraints for Table GUEST -------------------------------------------------------- ALTER TABLE "K9SYED"."GUEST" ADD CONSTRAINT "GUEST_PK" PRIMARY KEY ("GUEST_ID") USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 NOCOMPRESS LOGGING TABLESPACE "DBCOURSE" ENABLE; ALTER TABLE "K9SYED"."GUEST" MODIFY ("GUEST_ID" NOT NULL ENABLE); ALTER TABLE "K9SYED"."GUEST" MODIFY ("GUEST_NAME" NOT NULL ENABLE); ALTER TABLE "K9SYED"."GUEST" MODIFY ("GUEST_CONTACT_NUMBER" NOT NULL ENABLE); ALTER TABLE "K9SYED"."GUEST" MODIFY ("GUEST_PAYMENT_INFO" NOT NULL ENABLE);
DROP TABLE car; DROP TABLE engine; DROP TABLE air_intake; DROP TABLE ecu; DROP TABLE engine_pullys; DROP TABLE forced_induction; DROP TABLE suspension; DROP TABLE tires; DROP TABLE wheels; DROP TABLE transmission;
create table categoria ( id bigserial not null, nome varchar(255), primary key (id) ); create table produto ( id bigserial not null, descricao varchar(255), nome_produto varchar(100), preco numeric(19, 2), quantidade int4, url_foto varchar(255), categoria_id int8, primary key (id) ); alter table if exists produto add constraint FKopu9jggwnamfv0c8k2ri3kx0a foreign key (categoria_id) references categoria;
-- phpMyAdmin SQL Dump -- version 4.7.4 -- https://www.phpmyadmin.net/ -- -- Hôte : 127.0.0.1:3306 -- Généré le : jeu. 12 avr. 2018 à 09:57 -- Version du serveur : 5.7.11-log -- Version de PHP : 5.6.31 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8mb4 */; -- -- Base de données : `medfocus_db` -- -- -------------------------------------------------------- -- -- Structure de la table `admin` -- DROP TABLE IF EXISTS `admin`; CREATE TABLE IF NOT EXISTS `admin` ( `id_admin` int(11) NOT NULL AUTO_INCREMENT, `level_admin` int(11) NOT NULL, PRIMARY KEY (`id_admin`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -------------------------------------------------------- -- -- Structure de la table `availability` -- DROP TABLE IF EXISTS `availability`; CREATE TABLE IF NOT EXISTS `availability` ( `id_availability` int(11) NOT NULL AUTO_INCREMENT, `email_pro` varchar(255) NOT NULL, `date` date NOT NULL, `start_hour` time NOT NULL, `end_hour` time NOT NULL, PRIMARY KEY (`id_availability`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -------------------------------------------------------- -- -- Structure de la table `ci_sessions` -- DROP TABLE IF EXISTS `ci_sessions`; CREATE TABLE IF NOT EXISTS `ci_sessions` ( `id` varchar(128) NOT NULL, `ip_address` varchar(45) NOT NULL, `timestamp` int(10) UNSIGNED NOT NULL DEFAULT '0', `data` blob NOT NULL, KEY `ci_sessions_timestamp` (`timestamp`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -- Déchargement des données de la table `ci_sessions` -- INSERT INTO `ci_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES ('i16uvefghshboodj95aofu21j171p4n2', '::1', 1523262754, 0x5f5f63695f6c6173745f726567656e65726174657c693a313532333236323735343b), ('mcqhlomnpu04ai6nh50so6bp0uda0f11', '::1', 1523263247, 0x5f5f63695f6c6173745f726567656e65726174657c693a313532333236333234373b), ('58mglv55f3tk5hvcl04j9a6a96rubpnf', '::1', 1523345556, 0x5f5f63695f6c6173745f726567656e65726174657c693a313532333334353534393b), ('6o36sptqvt6af0rql276u21ak50mrbfv', '::1', 1523365750, 0x5f5f63695f6c6173745f726567656e65726174657c693a313532333336353631363b), ('321l7sqmahua5p0rgaeddp8bq35jpisu', '::1', 1523366143, 0x5f5f63695f6c6173745f726567656e65726174657c693a313532333336363031383b), ('i9a0ipiqpqnguv2stp8vn4nv2knj2mk2', '::1', 1523366673, 0x5f5f63695f6c6173745f726567656e65726174657c693a313532333336363637333b), ('rqp78sv6418nocoimbn85s7btgjrllvo', '::1', 1523370572, 0x5f5f63695f6c6173745f726567656e65726174657c693a313532333337303537323b), ('4i2vdrpka1vvj7ll9o1hiikmt33vlaub', '::1', 1523429709, 0x5f5f63695f6c6173745f726567656e65726174657c693a313532333432393730393b), ('n0c2m88oab8fdg2n8fncajh2oajk3om6', '::1', 1523442071, 0x5f5f63695f6c6173745f726567656e65726174657c693a313532333434313737363b757365726e616d657c733a373a225261706861656c223b656d61696c7c733a32323a227261706861656c616d79636f40676d61696c2e636f6d223b6c6f676765645f696e7c623a313b), ('aoa9r0nm9fp8qb6mc0nn4fc8k8igqf5v', '::1', 1523442137, 0x5f5f63695f6c6173745f726567656e65726174657c693a313532333434323132383b757365726e616d657c733a373a225261706861656c223b656d61696c7c733a32323a227261706861656c616d79636f40676d61696c2e636f6d223b6c6f676765645f696e7c623a313b), ('lqa7hh2t47h2e8e7jvmr0k0mq6k8gojk', '::1', 1523443281, 0x5f5f63695f6c6173745f726567656e65726174657c693a313532333434333236313b757365726e616d657c733a373a225261706861656c223b656d61696c7c733a32323a227261706861656c616d79636f40676d61696c2e636f6d223b6c6f676765645f696e7c623a313b); -- -------------------------------------------------------- -- -- Structure de la table `comments` -- DROP TABLE IF EXISTS `comments`; CREATE TABLE IF NOT EXISTS `comments` ( `id_comment` int(11) NOT NULL AUTO_INCREMENT, `email_user` varchar(255) NOT NULL, `email_pro` varchar(255) NOT NULL, `date` date NOT NULL, `comment` text NOT NULL, `reception` int(1) NOT NULL, `clean_place` int(1) NOT NULL, `feel_good` int(1) NOT NULL, `on_time` int(1) NOT NULL, PRIMARY KEY (`id_comment`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -------------------------------------------------------- -- -- Structure de la table `diplomas` -- DROP TABLE IF EXISTS `diplomas`; CREATE TABLE IF NOT EXISTS `diplomas` ( `id_diploma` int(11) NOT NULL AUTO_INCREMENT, `email_pro` varchar(255) NOT NULL, `year` int(11) NOT NULL, `name` varchar(50) NOT NULL, PRIMARY KEY (`id_diploma`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -------------------------------------------------------- -- -- Structure de la table `pros` -- DROP TABLE IF EXISTS `pros`; CREATE TABLE IF NOT EXISTS `pros` ( `email` varchar(255) NOT NULL, `password` varchar(255) NOT NULL, `name` varchar(45) NOT NULL, `surname` varchar(45) NOT NULL, `bday` date NOT NULL, `gender` varchar(8) NOT NULL, `job` varchar(45) NOT NULL, `speciality` varchar(45) NOT NULL, `experience` text NOT NULL, `languages` varchar(255) NOT NULL, `num_RPPS` int(11) NOT NULL, `AGA` tinyint(1) NOT NULL, `payment` varchar(45) NOT NULL, `carte_vitale` tinyint(1) NOT NULL, `address` varchar(255) NOT NULL, `postal_code` int(11) NOT NULL, `city` varchar(45) NOT NULL, `practical_info` text NOT NULL, `num_tel` int(20) NOT NULL, `premium` tinyint(1) NOT NULL, PRIMARY KEY (`email`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -------------------------------------------------------- -- -- Structure de la table `rendez-vous` -- DROP TABLE IF EXISTS `rendez-vous`; CREATE TABLE IF NOT EXISTS `rendez-vous` ( `id_rdv` int(11) NOT NULL AUTO_INCREMENT, `email_user` varchar(255) NOT NULL, `email_pro` varchar(255) NOT NULL, `date` date NOT NULL, `time` time NOT NULL, `cause` varchar(255) NOT NULL, `id_service` int(11) NOT NULL, PRIMARY KEY (`id_rdv`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -------------------------------------------------------- -- -- Structure de la table `services` -- DROP TABLE IF EXISTS `services`; CREATE TABLE IF NOT EXISTS `services` ( `id_service` int(11) NOT NULL AUTO_INCREMENT, `email_pro` varchar(255) NOT NULL, `name` varchar(50) NOT NULL, `price` int(11) NOT NULL, `length` int(11) NOT NULL, PRIMARY KEY (`id_service`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -------------------------------------------------------- -- -- Structure de la table `users` -- DROP TABLE IF EXISTS `users`; CREATE TABLE IF NOT EXISTS `users` ( `email` varchar(255) NOT NULL, `password` varchar(255) NOT NULL, `name` varchar(45) NOT NULL, `surname` varchar(45) NOT NULL, `bday` date NOT NULL, `gender` varchar(8) NOT NULL, `num_tel` int(20) NOT NULL, `num_secu` int(13) NOT NULL, PRIMARY KEY (`email`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -- Déchargement des données de la table `users` -- INSERT INTO `users` (`email`, `password`, `name`, `surname`, `bday`, `gender`, `num_tel`, `num_secu`) VALUES ('raphaelamyco@gmail.com', '701addd911ff6c2eca01e1b0a1100030', 'Cohen', 'Raphael', '1996-06-24', 'Male', 688383926, 1); 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 */;
CREATE TABLE Student( ID INT NOT NULL AUTO_INCREMENT, NAME VARCHAR(20) NOT NULL, AGE INT NOT NULL, PRIMARY KEY (ID) ); insert into student(NAME, AGE) value ('rajan', '25'),('raj', '30'); CREATE TABLE Marks( SID INT NOT NULL, MARKS INT NOT NULL, YEAR INT NOT NULL );
-- phpMyAdmin SQL Dump -- version 5.1.0 -- https://www.phpmyadmin.net/ -- -- Хост: 127.0.0.1:3306 -- Время создания: Авг 31 2021 г., 15:20 -- Версия сервера: 8.0.24 -- Версия PHP: 7.4.21 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 */; -- -- База данных: `tinystore` -- -- -------------------------------------------------------- -- -- Структура таблицы `category` -- CREATE TABLE `category` ( `id` int NOT NULL, `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -- Дамп данных таблицы `category` -- INSERT INTO `category` (`id`, `name`) VALUES (1, 'Cars'), (2, 'Game Characters'), (3, 'Film Characters'), (4, 'Houses'); -- -------------------------------------------------------- -- -- Структура таблицы `doctrine_migration_versions` -- CREATE TABLE `doctrine_migration_versions` ( `version` varchar(191) COLLATE utf8_unicode_ci NOT NULL, `executed_at` datetime DEFAULT NULL, `execution_time` int DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8_unicode_ci; -- -- Дамп данных таблицы `doctrine_migration_versions` -- INSERT INTO `doctrine_migration_versions` (`version`, `executed_at`, `execution_time`) VALUES ('DoctrineMigrations\\Version20210829131114', '2021-08-29 16:11:53', 3238), ('DoctrineMigrations\\Version20210829153849', '2021-08-29 18:39:05', 2711), ('DoctrineMigrations\\Version20210829160403', '2021-08-29 19:04:14', 4660), ('DoctrineMigrations\\Version20210829160750', '2021-08-29 19:08:02', 217), ('DoctrineMigrations\\Version20210830072004', '2021-08-30 10:20:23', 1105), ('DoctrineMigrations\\Version20210830100449', '2021-08-30 13:05:02', 2048), ('DoctrineMigrations\\Version20210830100702', '2021-08-30 13:07:12', 1207); -- -------------------------------------------------------- -- -- Структура таблицы `good` -- CREATE TABLE `good` ( `id` int NOT NULL, `category_id` int NOT NULL, `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `image` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `price` int NOT NULL, `description` longtext COLLATE utf8mb4_unicode_ci NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -- Дамп данных таблицы `good` -- INSERT INTO `good` (`id`, `category_id`, `name`, `image`, `price`, `description`) VALUES (1, 1, 'Metal 1969 Ford Mustang Diecast Car', NULL, 97999, 'Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry\'s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged.'), (2, 1, 'Fast N Furious1969 Ford Mustang Mk-1', NULL, 96500, 'All the Lorem Ipsum generators on the Internet tend to repeat predefined chunks as necessary, making this the first true generator on the Internet. It uses a dictionary of over 200 Latin words, combined with a handful of model sentence structures, to generate Lorem Ipsum which looks reasonable.'), (3, 2, 'The Witcher 3: Wild Hunt: Geralt', NULL, 149999, 'Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered the undoubtable source.'), (4, 2, 'Naruto Uzumaki', NULL, 50000, 'Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for \'lorem ipsum\' will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like).'), (5, 2, 'Cyberpunk 2077 V', NULL, 85999, 'Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered the undoubtable source.'), (6, 3, 'Ragnarok Loki Figure', NULL, 87950, 'It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.'), (7, 1, 'Golf GTI Model Car Metal', NULL, 111100, 'There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which don\'t look even slightly believable. If you are going to use a passage of Lorem Ipsum, you need to be sure there isn\'t anything embarrassing hidden in the middle of text.'), (8, 4, 'Dollhouse Wooden Miniature', NULL, 49999, 'The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using \'Content here, content here\', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for \'lorem ipsum\' will uncover many web sites still in their infancy.'), (9, 4, 'Big Wooden Dolls House', NULL, 133399, ' It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.'); -- -------------------------------------------------------- -- -- Структура таблицы `good_order` -- CREATE TABLE `good_order` ( `id` int NOT NULL, `amount` int NOT NULL, `good_id` int NOT NULL, `order_id` int NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -- Дамп данных таблицы `good_order` -- INSERT INTO `good_order` (`id`, `amount`, `good_id`, `order_id`) VALUES (1, 2, 0, 0), (2, 2, 0, 0), (15, 1, 0, 0); -- -------------------------------------------------------- -- -- Структура таблицы `order` -- CREATE TABLE `order` ( `id` int NOT NULL, `addingdate` datetime NOT NULL, `buyingdate` datetime DEFAULT NULL, `status` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -- Дамп данных таблицы `order` -- INSERT INTO `order` (`id`, `addingdate`, `buyingdate`, `status`) VALUES (2, '2021-08-30 13:07:24', '2021-08-30 13:33:48', 'cart'), (3, '2021-08-30 13:41:07', '2021-08-30 15:17:00', 'cart'), (4, '2021-08-30 16:57:02', '2021-08-31 15:06:01', 'cart'); -- -------------------------------------------------------- -- -- Структура таблицы `user` -- CREATE TABLE `user` ( `id` int NOT NULL, `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `password` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -- Дамп данных таблицы `user` -- INSERT INTO `user` (`id`, `name`, `email`, `password`) VALUES (1, 'Bohdan', 'bohdan@gmail.com', '12345678'); -- -- Индексы сохранённых таблиц -- -- -- Индексы таблицы `category` -- ALTER TABLE `category` ADD PRIMARY KEY (`id`); -- -- Индексы таблицы `doctrine_migration_versions` -- ALTER TABLE `doctrine_migration_versions` ADD PRIMARY KEY (`version`); -- -- Индексы таблицы `good` -- ALTER TABLE `good` ADD PRIMARY KEY (`id`), ADD KEY `IDX_6C844E9212469DE2` (`category_id`); -- -- Индексы таблицы `good_order` -- ALTER TABLE `good_order` ADD PRIMARY KEY (`id`); -- -- Индексы таблицы `order` -- ALTER TABLE `order` ADD PRIMARY KEY (`id`); -- -- Индексы таблицы `user` -- ALTER TABLE `user` ADD PRIMARY KEY (`id`); -- -- AUTO_INCREMENT для сохранённых таблиц -- -- -- AUTO_INCREMENT для таблицы `category` -- ALTER TABLE `category` MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5; -- -- AUTO_INCREMENT для таблицы `good` -- ALTER TABLE `good` MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10; -- -- AUTO_INCREMENT для таблицы `good_order` -- ALTER TABLE `good_order` MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=17; -- -- AUTO_INCREMENT для таблицы `order` -- ALTER TABLE `order` MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5; -- -- AUTO_INCREMENT для таблицы `user` -- ALTER TABLE `user` MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; -- -- Ограничения внешнего ключа сохраненных таблиц -- -- -- Ограничения внешнего ключа таблицы `good` -- ALTER TABLE `good` ADD CONSTRAINT `FK_6C844E9212469DE2` FOREIGN KEY (`category_id`) REFERENCES `category` (`id`); COMMIT; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
create database Project_Sea; use Project_Sea; create table SEAFOOD( Seafood_id int, Seafood_name varchar(50), Catches int, Economic_value int, primary key(Seafood_id, Seafood_name) ); create table TOURISM( Tourism_id int , Tourism_name varchar(50), Economic_value_id int, Number_of_people int, primary key(Tourism_id, Tourism_name) ); create table MINERAL( Mineral_id int , Mineral_name varchar(50), Reserves int, primary key(Mineral_id, Mineral_name) ); create table REGION( Region_id int primary key, Region_name varchar(50) ); create table COUNTRY( Country_id int primary key, Country_name varchar(45), Region_id int, foreign key(Region_id) references REGION(Region_id) ); create table LOCATION( Location_id int, Country_id int, Ocean varchar(50), Longitude decimal(5,2), Latitude decimal(5,2), primary key(Location_id,Country_id), foreign key(Country_id) references COUNTRY(Country_id) ); create table SEA( Sea_id int primary key, sea_name varchar(50) not null, Location_id int, Square int not null, Deep int, Tourism_id int , Seafood_id int , Mineral_id int, foreign key(Tourism_id) references TOURISM(Tourism_id), foreign key(Seafood_id) references SEAFOOD(Seafood_id), foreign key(Mineral_id) references MINERAL(Mineral_id), foreign key(Location_id) references LOCATION(Location_id) ); insert into SEAFOOD values (1,'Pufferfish', 3658000, '4300'), (1,'Marine Fish', 3105000, '6200'), (2,'Lobster', 1974000, '4300'), (2,'Flying Fish', 1426000, '3600'), (3,'Tuna', 4314000, '7600'), (3,'Squid', 2469000, '4700'), (3,'Grass Carp', 3548000, '4800'), (4,'King Crab', 2053000, '5600'), (4,'Pollock', 2467000, '3400'), (5,'Swordfish', 3572000, '5700'), (5,'Alligators', 2974000, '4600'), (5,'Tarpon', 1973000, '2600'), (6,'Shellfish', 869000, '5000'), (6,'Crab', 1352000, '4600'), (7,'Bivalves', 4053000, '5700'), (7,'Shrimp', 3671000, '3700'), (8,'Starfish', 1436000, '3800'), (8,'Sea Urchins', 1057000, '3100'), (9,'Whale', 3056000, '4900'), (9,'Eel', 3964000, '3800'), (10,'Manta', 2053000, '3500'), (10,'Dugongs', 2058000, '2800'); insert into TOURISM values (1,'Cruise Ships', '2100', 31967000), (1,'Scenic spots', '448', 27536000), (2,'Kayaking', '115', 19789000), (2,'Ecotourism', '414', 25978000), (3,'Cruise Ships', '1900', 28746000), (3,'Underwater Diving', '240', 15976000), (3,'Sport Fishing', '501', 23468000), (4,'Cruise Ships', '600', 10145000), (4,'Sport Fishing', '153', 6645000), (5,'Underwater Diving', '285', 19685000), (5,'Sport Fishing', '305', 13857000), (6,'Cruise Ships', '300', 5846000), (7,'Surfer', '678', 12537000), (7,'Underwater Diving', '255', 16523000), (7,'Parasailing', '512', 13457000), (8,'Sport Fishing', '240', 11625000), (9,'Ecotourism', '299', 18467000), (9,'Scenic spots', '398', 24583000), (10,'Kayaking', '194', 9537000), (10,'Surfer', '521', 10483000); insert into MINERAL values (1,'Petroleum',357000), (1,'Natural gas',27000), (2,'Petroleum',478000), (2,'Natural gas',23000), (3,'Petroleum',20000), (3,'Natural gas',45038), (4,'Petroleum',59000), (4,'Natural gas',400000), (5,'Petroleum',13000), (5,'Natural gas',145000), (6,'Petroleum',40000), (6,'Natural gas',136000), (7,'Petroleum',9000), (7,'Natural gas',17000), (8,'Petroleum',173000), (8,'Natural gas',143000), (9,'Petroleum',41000), (9,'Natural gas',124000), (10,'Petroleum',4500), (10,'Natural gas',43000); insert into REGION values (1,'Asia'), (2,'North America'), (3,'South America'), (4,'Europe'), (5,'Africa'), (6,'Australia'), (7,'Antarctica'); insert into COUNTRY values ( 1, 'Spain',4), ( 2, 'France',4), ( 3, 'Italy', 4), ( 4, 'Turkey', 1), ( 5, 'Egype', 5), ( 6, 'Libya', 5), ( 7, 'Algeria', 5), ( 8, 'Mexico', 2), ( 9, 'Cuba', 2), (10, 'Haiti', 2), (11, 'Panama', 3), (12, 'Colombia', 3), (13, 'Venezuela', 3), (14, 'Vietnam', 1), (15, 'China', 1), (16, 'Philippines', 1), (17, 'Malaysia', 1), (18, 'Brunei', 1), (19, 'Indonesia', 1), (20, 'Russia(As)', 1), (21, 'Alaska', 2), (22, 'USA', 2), (23, 'Japan', 1), (24, 'Korea', 1), (25, 'Canada', 2), (26, 'India', 1), (27, 'Myanmar', 1); insert into LOCATION values (1,1,'Atlantic Ocean',18.04,34.55), (1,2,'Atlantic Ocean',18.04,34.55), (1,3,'Atlantic Ocean',18.04,34.55), (1,4,'Atlantic Ocean',18.04,34.55), (1,5,'Atlantic Ocean',18.04,34.55), (1,6,'Atlantic Ocean',18.04,34.55), (1,7,'Atlantic Ocean',18.04,34.55), (2,8,'Atlantic Ocean',-76.15,15.32), (2,9,'Atlantic Ocean',-76.15,15.32), (2,10,'Atlantic Ocean',-76.15,15.32), (2,11,'Atlantic Ocean',-76.15,15.32), (2,12,'Atlantic Ocean',-76.15,15.32), (2,13,'Atlantic Ocean',-76.15,15.32), (3,14,'Pacific Ocean',104.28,1.37), (3,15,'Pacific Ocean',104.28,1.37), (3,16,'Pacific Ocean',104.28,1.37), (3,17,'Pacific Ocean',104.28,1.37), (3,18,'Pacific Ocean',104.28,1.37), (3,19,'Pacific Ocean',104.28,1.37), (4,20,'Pacific Ocean',178,58.3), (4,21,'Pacific Ocean',178,58.3), (5,8,'Atlantic Ocean',-89.9,25.68), (5,22,'Atlantic Ocean',-89.9,25.68), (5,9,'Atlantic Ocean',-89.9,25.68), (6,20,'Pacific Ocean',54.3,148.55), (6,24,'Pacific Ocean',54.3,148.55), (7,15,'Pacific Ocean',125,30), (7,25,'Pacific Ocean',125,30), (7,24,'Pacific Ocean',125,30), (8,26,'Arctic Ocean',-85,60), (9,24,'Pacific Ocean',134.56,39.57), (9,25,'Pacific Ocean',134.56,39.57), (9,20,'Pacific Ocean',134.56,39.57), (10,26,'Indian Ocean',95.2,5.53), (10,27,'Indian Ocean',95.2,5.53), (10,19,'Indian Ocean',95.2,5.53); insert into SEA values (1,'Mediterranean Sea',1, 1144800, 1429,1,1,1), (2,'Caribbean Sea',2, 1049500, 8685,2,2,2), (3,'The South China Sea',3, 895400, 1652,3,3,3), (4,'Bering Sea',4, 884900, 1547,4,4,4), (5,'The Gulf of Mexico',5, 615000, 1486,5,5,5), (6,'The Sea of Okhotsk',6, 613800, 838,6,6,6), (7,'The East China Sea',7, 482300, 188,7,7,7), (8,'Hudson Bay',8, 475800, 128,8,8,8), (9,'The Sea of Japan',9, 389100, 1350,9,9,9), (10,'Andaman Sea',10, 308000, 870,10,10,10);
/*==============================================================*/ /* DBMS name: MySQL 5.0 */ /* Created on: 2017/12/28 22:20:38 */ /*==============================================================*/ drop table if exists cable_customer; drop table if exists cable_dic; drop table if exists cable_house; drop table if exists cable_info; drop table if exists cable_order; drop table if exists cable_order_item; drop table if exists cable_provider; drop table if exists cable_storage; drop table if exists user_info; /*==============================================================*/ /* Table: cable_customer */ /*==============================================================*/ create table cable_customer ( id int not null auto_increment, customer_user_id int comment '用户id', customer_name varchar(50) comment '客户公司名', customer_contact varchar(50) comment '客户联系人', customer_tele varchar(50) comment '客户联系电话', customer_address varchar(50) comment '客户公司地址', customer_warehouse varchar(50) comment '客户仓库地址', customer_desc varchar(255) comment '描述', primary key (id) ) ENGINE = InnoDB; alter table cable_customer comment '客户信息表 '; /*==============================================================*/ /* Table: cable_dic */ /*==============================================================*/ create table cable_dic ( id int not null auto_increment comment '主键id', cable_dic_ENGINE int comment '字典类型(1:质量 2:计量单位,3:颜色)', cable_dic_name varchar(50) comment '字典值', cable_dic_desc varchar(100) comment '字典值描述', cable_dic_delete int comment '0正常 1已删除', primary key (id) ) ENGINE = InnoDB; alter table cable_dic comment '商城字典表'; /*==============================================================*/ /* Table: cable_house */ /*==============================================================*/ create table cable_house ( id int not null auto_increment comment '主键标识', cable_house_user_id int comment '用户id', cable_house_name varchar(30) comment '仓库名', cable_house_address varchar(100) comment '仓库地址', cable_house_contact varchar(15) comment '仓库管理员', cable_house_tele varchar(30) comment '仓库电话', cable_house_delete int comment '0正常 1已删除', primary key (id) ) ENGINE = InnoDB; alter table cable_house comment '仓库信息表'; /*==============================================================*/ /* Table: cable_info */ /*==============================================================*/ create table cable_info ( id int not null auto_increment, cable_user_id int comment '用户id', cable_model varchar(20) comment '线缆规格', cable_spec varchar(20) comment '线缆型号', cable_desc varchar(255) comment '描述', cable_price decimal(18,2) comment '推荐价格', cable_delete smallint comment '0正常 1已删除', primary key (id) ) ENGINE = InnoDB; alter table cable_info comment '线缆型号'; /*==============================================================*/ /* Table: cable_order */ /*==============================================================*/ create table cable_order ( id int not null auto_increment comment '主键id', order_user_id int comment '用户id', order_other_id int comment '客户id', order_other_name varchar(30) comment '客户公司名', order_other_contact varchar(30) comment '联系人', order_other_tele varchar(30) comment '联系电话', order_other_address varchar(30) comment '公司地址', order_other_house varchar(50) comment '客户仓库地址', order_time datetime comment '订单时间', order_totalprice decimal(18,2) comment '订单总金额', order_desc varchar(255) comment '订单备注', primary key (id) ) ENGINE = InnoDB; alter table cable_order comment '线缆订单表'; /*==============================================================*/ /* Table: cable_order_item */ /*==============================================================*/ create table cable_order_item ( id int not null auto_increment comment '主键id', item_user_id int comment '用户id', item_order_id int comment '订单id', item_model varchar(30) comment '线缆型号', item_spec varchar(30) comment '线缆规格', item_quality varchar(30) comment '线缆质量', item_unit varchar(30) comment '线缆单位', item_color varchar(30) comment '线缆颜色', item_number decimal(18,3) comment '数量', item_price decimal comment '单价', item_discount decimal(18,2) comment '折扣', item_totle_price decimal comment '小计', item_house varchar(30) comment '出库仓库地址', item_delete int comment '0 正常 1已删除', primary key (id) ) ENGINE = InnoDB; alter table cable_order_item comment '订单条目'; /*==============================================================*/ /* Table: cable_provider */ /*==============================================================*/ create table cable_provider ( id int not null auto_increment, provider_user_id int comment '用户id', provider_name varchar(50) comment '供应商公司名', provider_contact varchar(50) comment '联系人', provider_tele varchar(50) comment '联系电话', provider_address varchar(50) comment '公司地址', provider_warehouse varchar(50) comment '仓库地址', provider_desc varchar(255) comment '描述', primary key (id) ) ENGINE = InnoDB; alter table cable_provider comment '供应商信息表'; /*==============================================================*/ /* Table: cable_storage */ /*==============================================================*/ create table cable_storage ( id int not null auto_increment comment '主键id', storage_user_id int comment '用户id', storage_model int comment '线缆型号', storage_spec varchar(20) comment '线缆规格', storage_unit varchar(20) comment '计量单位', storage_number decimal(18,2) comment '数量', storage_quality varchar(20) comment '线缆质量', storage_color varchar(20) comment '线缆颜色', storage_providerid int comment '供应商id', storage_update_time datetime comment '更新时间', storage_houseid int comment '仓库id', storage_desc varchar(255) comment '备注', storage_delete int comment '0 正常 1已删除', primary key (id) ) ENGINE = InnoDB; alter table cable_storage comment '线缆库存表'; /*==============================================================*/ /* Table: user_info */ /*==============================================================*/ create table user_info ( id int(11) not null auto_increment comment '用户id', user_name varchar(20) comment '用户名', user_pass varchar(20) comment '密码', user_delete int comment '0正常 1已删除', primary key (id) ) ENGINE = InnoDB; alter table user_info comment '用户表';
-- SELECT id -- AS last_id -- FROM characters -- ORDER BY id DESC -- LIMIT 1; -- UPDATE characters SET species = "Martians" WHERE id = last_id; UPDATE characters SET species = "Martian" WHERE id = 8;
CREATE OR REPLACE PUBLIC SYNONYM finance_constant_pkg FOR orient.finance_constant_pkg;
SELECT DISTINCT s1.name FROM salesperson s1 WHERE s1.name NOT IN (SELECT DISTINCT s.name FROM salesperson s, company c, orders o WHERE o.com_id=c.com_id AND o.sales_id=s.sales_id AND c.name='RED');
create table tblprefix_category ( category_id integer auto_increment primary key, name varchar(25) not null ) ENGINE=InnoDB; insert into tblprefix_category (name) values ('Other'); insert into tblprefix_category (name) values ('ToDo'); insert into tblprefix_category (name) values ('Work'); insert into tblprefix_category (name) values ('Software Development'); insert into tblprefix_category (name) values ('System Administration'); insert into tblprefix_category (name) values ('Fun and Games'); create table tblprefix_notebook ( note_id integer auto_increment primary key, category_id integer not null, txt text not null, lastchange datetime not null, foreign key fk_notebook_category (category_id) references tblprefix_category (category_id) ) ENGINE=InnoDB;
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 30-03-2016 a las 21:30:28 -- Versión del servidor: 10.1.10-MariaDB -- Versión de PHP: 7.0.2 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 */; -- -- Base de datos: `red` -- -- -------------------------------------------------------- -- -- Estructura de tabla para la tabla `comentarios` -- CREATE TABLE `comentarios` ( `ID` varchar(50) NOT NULL, `COMENTARIO` text NOT NULL, `BORRADO` varchar(2) DEFAULT NULL, `FECHA` date DEFAULT NULL, `ID_USUARIO` bigint(20) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- -- -- Estructura de tabla para la tabla `usuarios` -- CREATE TABLE `usuarios` ( `ID` bigint(20) NOT NULL, `EMAIL` varchar(50) NOT NULL, `NOMBRE` varchar(20) NOT NULL, `APELLIDO` varchar(25) NOT NULL, `CONTRASENA` varchar(50) NOT NULL, `IMAGEN` varchar(30) DEFAULT NULL, `FECHA` date DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Índices para tablas volcadas -- -- -- Indices de la tabla `comentarios` -- ALTER TABLE `comentarios` ADD PRIMARY KEY (`ID`), ADD KEY `FK_ID_USUARIO` (`ID_USUARIO`); -- -- Indices de la tabla `usuarios` -- ALTER TABLE `usuarios` ADD PRIMARY KEY (`ID`), ADD UNIQUE KEY `UK_EMAIL` (`EMAIL`); -- -- Restricciones para tablas volcadas -- -- -- Filtros para la tabla `comentarios` -- ALTER TABLE `comentarios` ADD CONSTRAINT `FK_ID_USUARIO` FOREIGN KEY (`ID_USUARIO`) REFERENCES `usuarios` (`ID`); /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
USE `arenafifadb`; DELIMITER $$ DROP PROCEDURE IF EXISTS `spGetAllPontuacaoCampeonato` $$ CREATE PROCEDURE `spGetAllPontuacaoCampeonato`() Begin SELECT * FROM TB_PONTUACAO_CAMPEONATO ORDER BY SG_TIPO_CAMPEONATO; End$$ DELIMITER ; DELIMITER $$ DROP PROCEDURE IF EXISTS `spGetPontuacaoCampeonatoByTpCamp` $$ CREATE PROCEDURE `spGetPontuacaoCampeonatoByTpCamp`(pSgCamp VARCHAR(5)) Begin SELECT * FROM TB_PONTUACAO_CAMPEONATO WHERE SG_TIPO_CAMPEONATO = pSgCamp; End$$ DELIMITER ;
select ca.texto1 as "ID Cliente EC (K1)", c.numero as "ID Contrato", cat.texto1 as "ID Divida" from clientes as cli join ca_clientes as ca on ca.cod_pai = cli.cod_cliente join contratos as c on c.cod_cliente = cli.cod_cliente join titulos as t on t.cod_contrato = c.cod_contrato join ca_titulos as cat on cat.cod_pai = t.cod_titulo where cli.cod_convenio = '1139' and c.cod_campanha = 285 and c.status_pagamento in (1,2)
delete from core_plugin where mykatastima=:mykatastima; INSERT INTO core_plugin( mykatastima,fkavailableplugin,blenabled,pluginname,pluginfirstkey) VALUES ( :mykatastima,(select id from core_available_plugin where pluginaliasname='datatablesv11010'), 1, 'datatablesv11010_inner_home_crm_event_modal_add_members','DataTableAjax' ), ( :mykatastima,(select id from core_available_plugin where pluginaliasname='modalgeneralv100'), 1, 'modalgeneralv100_inner_home_crm_event_modal_quick_tpls','CreateEventQuickTpls' ), ( :mykatastima,(select id from core_available_plugin where pluginaliasname='datatablesv11010'), 1, 'datatablesv11010_inner_home_crm_trainers','DataTableAjax'), ( :mykatastima,(select id from core_available_plugin where pluginaliasname='pageheaderv100'), 1, 'pageheaderv100_inner_home_crm_members','PageHelperHeader' ), ( :mykatastima,(select id from core_available_plugin where pluginaliasname='pageheaderv100'), 1, 'pageheaderv100_inner_home_crm_members_contracts_all','PageHelperHeader' ), ( :mykatastima,(select id from core_available_plugin where pluginaliasname='pageheaderv100'), 1, 'pageheaderv100_inner_home_crm_members_energa','PageHelperHeader' ), ( :mykatastima,(select id from core_available_plugin where pluginaliasname='pageheaderv100'), 1, 'pageheaderv100_inner_home_crm_members_ipoloipo','PageHelperHeader' ), ( :mykatastima,(select id from core_available_plugin where pluginaliasname='pageheaderv100'), 1, 'pageheaderv100_inner_home_crm_members_scexpireinmonth','PageHelperHeader' ), ( :mykatastima,(select id from core_available_plugin where pluginaliasname='pageheaderv100'), 1, 'pageheaderv100_inner_home_crm_calendar','PageHelperHeader' ), ( :mykatastima,(select id from core_available_plugin where pluginaliasname='datatablesv11010'), 1, 'datatablesv11010_inner_home_crm_members','DataTableAjax' ), ( :mykatastima,(select id from core_available_plugin where pluginaliasname='datatablesv11010'), 1, 'datatablesv11010_inner_home_crm_members_energa','DataTableAjax' ), ( :mykatastima,(select id from core_available_plugin where pluginaliasname='datatablesv11010'), 1, 'datatablesv11010_inner_home_crm_members_ipoloipo','DataTableAjax' ), ( :mykatastima,(select id from core_available_plugin where pluginaliasname='datatablesv11010'), 1, 'datatablesv11010_inner_home_crm_members_scexpireinmonth','DataTableAjax' ), ( :mykatastima,(select id from core_available_plugin where pluginaliasname='datatablesv11010'), 1, 'datatablesv11010_inner_home_crm_members_contracts','DataTableAjax2' ), ( :mykatastima,(select id from core_available_plugin where pluginaliasname='datatablesv11010'), 1, 'datatablesv11010_inner_home_crm_members_contracts_all','DataTableAjax' ), ( :mykatastima,(select id from core_available_plugin where pluginaliasname='datatablesv11010'), 1, 'datatablesv11010_inner_home_crm_members_contracts_payments','DataTableAjax2' ), ( :mykatastima,(select id from core_available_plugin where pluginaliasname='datatablesdetailstablev100'), 1, 'datatablesdetailstable_inner_home_crm_members_details','Row_Details_HtmlTable' ), ( :mykatastima,(select id from core_available_plugin where pluginaliasname='datatablesdetailstablev100'), 1, 'datatablesdetailstable_inner_home_crm_members_energa_details','Row_Details_HtmlTable' ), ( :mykatastima,(select id from core_available_plugin where pluginaliasname='datatablesdetailstablev100'), 1, 'datatablesdetailstable_inner_home_crm_members_ipoloipo_details','Row_Details_HtmlTable' ), ( :mykatastima,(select id from core_available_plugin where pluginaliasname='datatablesdetailstablev100'), 1, 'datatablesdetailstable_inner_home_crm_members_scexpireinmonth_details','Row_Details_HtmlTable' ), ( :mykatastima,(select id from core_available_plugin where pluginaliasname='pageheaderv100'), 1, 'pageheaderv100_inner_home_index','PageHelperHeader' ), ( :mykatastima,(SELECT id FROM core_available_plugin where pluginaliasname='fullcalendarv261'), 1, 'fullcalendarv261','Full_Calendar' ), -- DLS20161015 ( :mykatastima,(select id from core_available_plugin where pluginaliasname='newrecordv100'), 1, 'newrecordv100_inner_home_crm_service_contracts_new','New_Record' ), ( :mykatastima,(select id from core_available_plugin where pluginaliasname='newrecordv100'), 1, 'newrecordv100_inner_home_crm_members_new','New_Record' ), -- DLS20161031 ( :mykatastima,(select id from core_available_plugin where pluginaliasname='datatablesv11010'), 1, 'datatablesv11010_inner_home_crm_packets','DataTableAjax' ), ( :mykatastima,(select id from core_available_plugin where pluginaliasname='newrecordv100'), 1, 'newrecordv100_inner_home_crm_packets_new','New_Record' ), -- DLE20161031 ( :mykatastima,(select id from core_available_plugin where pluginaliasname='pageheaderv100'), 1, 'pageheaderv100_inner_home_crm_members_contracts_energa_all','PageHelperHeader' ), ( :mykatastima,(select id from core_available_plugin where pluginaliasname='datatablesv11010'), 1, 'datatablesv11010_inner_home_crm_members_contracts_energa_all','DataTableAjax' ), ( :mykatastima,(select id from core_available_plugin where pluginaliasname='pageheaderv100'), 1, 'pageheaderv100_inner_home_crm_members_contracts_energa_visits_open_all','PageHelperHeader' ), ( :mykatastima,(select id from core_available_plugin where pluginaliasname='datatablesv11010'), 1, 'datatablesv11010_inner_home_crm_members_contracts_energa_visits_open_all','DataTableAjax' ), ( :mykatastima,(select id from core_available_plugin where pluginaliasname='pageheaderv100'), 1, 'pageheaderv100_inner_home_crm_members_contracts_visits_done_all','PageHelperHeader' ), ( :mykatastima,(select id from core_available_plugin where pluginaliasname='datatablesv11010'), 1, 'datatablesv11010_inner_home_crm_members_contracts_visists_done_all','DataTableAjax' ), -- DLS20161107 ( :mykatastima,(select id from core_available_plugin where pluginaliasname='datatablesv11010'), 1, 'datatablesv11010_inner_home_crm_services','DataTableAjax' ), ( :mykatastima,(select id from core_available_plugin where pluginaliasname='datatablesv11010'), 1, 'datatablesv11010_inner_home_crm_receipts','DataTableAjax' ), ( :mykatastima,(select id from core_available_plugin where pluginaliasname='datatablesv11010'), 1, 'datatablesv11010_inner_home_crm_income_expenses','DataTableAjax' ), ( :mykatastima,(select id from core_available_plugin where pluginaliasname='newrecordv100'), 1, 'newrecordv100_inner_home_crm_income_expenses_new','New_Record' ), ( :mykatastima,(select id from core_available_plugin where pluginaliasname='newrecordv100'), 1, 'newrecordv100_inner_home_crm_services_new','New_Record' ), ( :mykatastima,(select id from core_available_plugin where pluginaliasname='newrecordv100'), 1, 'newrecordv100_inner_home_crm_members_contracts_new','New_Record' ), ( :mykatastima,(select id from core_available_plugin where pluginaliasname='newrecordv100'), 1, 'newrecordv100_inner_home_crm_members_contracts_payments_new','New_Record' ), ( :mykatastima,(select id from core_available_plugin where pluginaliasname='pdfprintv100'), 1, 'printpdfv100_inner_home_crm_pdf','Print_PDF' ), -- DLE20161107 ( :mykatastima,(select id from core_available_plugin where pluginaliasname='datatablesv11010'), 1, 'datatablesv11010_inner_home_crm_members_ipoloipa','DataTableAjax' ), ( :mykatastima,(select id from core_available_plugin where pluginaliasname='datatablesv11010'), 1, 'pageheaderv100_inner_home_crm_members_ipoloipa','PageHelperHeader' ), ( :mykatastima,(select id from core_available_plugin where pluginaliasname='datatablesv11010'), 1, 'datatablesv11010_inner_home_crm_members_lixiprothesma','DataTableAjax' ), ( :mykatastima,(select id from core_available_plugin where pluginaliasname='datatablesv11010'), 1, 'pageheaderv100_inner_home_crm_members_lixiprothesma','PageHelperHeader' ), -- DLS20161111 ( :mykatastima,(SELECT id FROM core_available_plugin where pluginaliasname='fullcalendarv261'), 1, 'fullcalendarv261_inner_home_crm_event_modal_contents_edit','Full_Calendar' ), -- DLE ( :mykatastima,(select id from core_available_plugin where pluginaliasname='datatablesdetailstablev100'), 1, 'datatablesdetailstable_inner_home_crm_trainers_details','Row_Details_HtmlTable' );
/* VARIABLES ORACLE */ SET SERVEROUTPUT ON; --Permitir salidas por consola ESTANDAR -- varia su asignación DECLARE --Definición de funciones y variables salario number := 2500; -- Almacena numeros = inicializamos el valor nombreEmpleado nvarchar2(100); -- Almacena texto (longitud del texto) activo boolean; -- Almacena un boleano fecha date; -- Almacena una fecha fecha2 date; BEGIN --Inicio de una sentencia nombreEmpleado := 'Alejandro Hernández'; activo := true; fecha := sysdate; -- Toma la fecha de la base de datos - sistema fecha2 := '19-OCT-21'; dbms_output.put_line('Nombre: ' || nombreEmpleado); --Imprimir por consola dbms_output.put_line('Salario: ' || salario); dbms_output.put_line('Fecha: ' || fecha); dbms_output.put_line('Fecha: ' || fecha2); dbms_output.put_line('Activo: ' || case when activo then 'si' else 'no' end ); -- CONDICIÓN IF ELSE END; -- Final de una sentencia /
-- phpMyAdmin SQL Dump -- version 4.7.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Feb 10, 2018 at 06:39 PM -- Server version: 10.1.30-MariaDB -- PHP Version: 7.2.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8mb4 */; -- -- Database: `atik` -- -- -------------------------------------------------------- -- -- Table structure for table `userinfo` -- CREATE TABLE `userinfo` ( `sl` int(10) NOT NULL, `name` varchar(40) NOT NULL, `mail` varchar(50) NOT NULL, `pass1` varchar(32) NOT NULL, `pass2` varchar(32) NOT NULL, `image` longblob NOT NULL, `workplace` varchar(50) NOT NULL, `address` varchar(200) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `userinfo` -- INSERT INTO `userinfo` (`sl`, `name`, `mail`, `pass1`, `pass2`, `image`, `workplace`, `address`) VALUES (1, 'adil reza khan khan', 'adilreza043@gmail.com', '123', '123', 0x32303136303433305f3130343030312e6a7067, 'rajshai University Of Engineering and tech', 'Kushtia, Bhereamara , goloapnagor'), (2, 'Atiqur Rahman', 'atiqurrahman7465@gmail.com', '102030', '102030', 0x46425f494d475f313530363432323135313333362e6a7067, '', ''), (3, 'Tasfin jayed', 'jayed@gmail.com', '12345', '12345', 0x33392e6a7067, '', ''); -- -------------------------------------------------------- -- -- Table structure for table `userpost` -- CREATE TABLE `userpost` ( `sln` int(12) NOT NULL, `bname` varchar(250) NOT NULL, `booktype` varchar(40) NOT NULL, `bookex` varchar(50) NOT NULL, `image` longblob NOT NULL, `sell` varchar(34) NOT NULL, `message` text NOT NULL, `price` int(32) NOT NULL, `usermail` varchar(120) NOT NULL, `exchange` varchar(40) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `userpost` -- INSERT INTO `userpost` (`sln`, `bname`, `booktype`, `bookex`, `image`, `sell`, `message`, `price`, `usermail`, `exchange`) VALUES (1, 'programming language', 'TEXT BOOK', 'bookl', 0x362e6a7067, 'booksell', 'Hei, I would like to sell this book or like to exchange with other books if any one interested to buy or exchange this book please contact me..', 120, 'adilreza043@gmail.com', ''), (2, 'differential calculas', 'HORROR FICTION', 'bookh', 0x32322e6a7067, 'booksell', 'Hei this is about to sell this book of thoidas dfsdfj askdfja sdfkjhas kdfjas dkjf sdf sdf ksjdfh skdjf sdfjfh ksdfjf skdfj skd fsjdhfsk djs dfkjashdf kasjdkjsdf ksdjf skjdf sjdf ksjdf s sjdhf skdjf sdffsf', 550, 'atiqurrahman7465@gmail.com', ''), (3, 'statistics', 'TRAGICOMEDY', 'bookd', 0x31322e6a7067, 'booksell', 'Hei do u seek this kind of book of hooor fiction I am interedte to excahnage this book with you ifyou want please contact me', 2342, 'adilreza043@gmail.com', ''), (4, 'sdjkfsdfasdf', 'COMEDY', 'exchange', 0x362e6a7067, 'booksell', 'ertertertwertegbwr', 34534, 'adilreza043@gmail.com', 'LITERARY REALISM'), (5, 'thi is shdf askjdfask dfas', 'DRAMA', 'exchange', 0x382e6a7067, '', 'Hei do u seek this kind of book of hooor fiction I am interedte to excahnage this book with you ifyou want please contact me', 3453, 'adilreza043@gmail.com', 'DRAMA'), (6, 'sdsdfs', 'SATIRE', 'exchange', 0x31352e6a7067, 'booksell', 'Hei do u seek this kind of book of hooor fiction I am interedte to excahnage this book with you ifyou want please contact me', 34534, 'atiqurrahman7465@gmail.com', 'ROMANCE'), (7, 'differential calculas', 'TEXT BOOK', 'exchange', 0x32372e6a7067, 'booksell', 'Hei do u seek this kind of book of hooor fiction I am interedte to excahnage this book with you ifyou want please contact me', 123456, 'atiqurrahman7465@gmail.com', 'ROMANCE'), (8, 'Helllo tafsin', 'MYTHOLOGY', 'exchange', 0x32392e6a7067, 'booksell', 'egdf gdg gd', 12313, 'jayed@gmail.com', 'HORROR FICTION'), (9, 'weasrdtyhijo', 'TEXT BOOK', 'exchange', 0x31332e6a706567, 'booksell', 'asdfgvhbjsdfghjk asdfghjkl sdfghjkl sdfghjk dfghj dfghjk dfghjk dfghjk dfghj ', 12345, 'atiqurrahman7465@gmail.com', 'DRAMA'), (10, 'Computer Programming', 'COMEDY', 'exchange', 0x6c6f676f2e6a7067, '', 'Hello this is another testing for all the book and the exchanging book, this is the final testing for the bbokk concept and it will be the same', 223, 'atiqurrahman7465@gmail.com', 'HORROR FICTION'); -- -- Indexes for dumped tables -- -- -- Indexes for table `userinfo` -- ALTER TABLE `userinfo` ADD PRIMARY KEY (`sl`), ADD UNIQUE KEY `mail` (`mail`); -- -- Indexes for table `userpost` -- ALTER TABLE `userpost` ADD PRIMARY KEY (`sln`); 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.4.10 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: 20-Ago-2015 às 05:11 -- Versão do servidor: 5.6.24 -- PHP Version: 5.6.8 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8mb4 */; -- -- Database: `ahnt` -- -- -------------------------------------------------------- -- -- Estrutura da tabela `bairros` -- CREATE TABLE IF NOT EXISTS `bairros` ( `id` int(3) NOT NULL, `bairro` varchar(120) COLLATE utf8_unicode_ci NOT NULL, `regiao` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL ) ENGINE=InnoDB AUTO_INCREMENT=121 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Extraindo dados da tabela `bairros` -- INSERT INTO `bairros` (`id`, `bairro`, `regiao`) VALUES (1, 'Centro', 'Região I'), (2, 'Esplanada', 'Região I'), (3, 'São Tarcísio', 'Região I'), (4, 'Capim', 'Região II'), (5, 'Cardo', 'Região II'), (6, 'Sir', 'Região II'), (7, 'Floresta', 'Região II'), (8, 'Interlagos', 'Região II'), (9, 'Sion', 'Região II'), (10, 'Recanto das Garças', 'Região II'), (11, 'Alto Esplanada', 'Região II'), (12, 'Belvedere', 'Região II'), (13, 'São Pedro', 'Região II'), (14, 'Universitário', 'Região II'), (15, 'Santos Dumont', 'Região II'), (16, 'Santos Dumont II', 'Região II'), (17, 'Chácaras Braúnas', 'Região II'), (18, 'Jother Peres', 'Região II'), (19, 'Sítio das Flores', 'Região II'), (20, 'Conjunto Sotero Inácio Ramos (SIR)', 'Região II'), (21, 'Vila Mariquita', 'Região II'), (22, 'Santa Helena', 'Região III'), (23, 'Cidade Nova', 'Região IV'), (24, 'Lagoa Santa', 'Região IV'), (25, 'Maria Eugênia', 'Região IV'), (26, 'Santa Rosa de Lima', 'Região IV'), (27, 'Esperança', 'Região IV'), (28, 'Morada do Vale', 'Região IV'), (29, 'Morada do Vale II', 'Região IV'), (30, 'Morada do Vale III', 'Região IV'), (31, 'Grã-Duquesa', 'Região IV'), (32, 'Santo Agostinho', 'Região IV'), (33, 'Vale Verde', 'Região IV'), (34, 'Carapina', 'Região V'), (35, 'Nossa Senhora das Graças', 'Região V'), (36, 'Santa Efigênia', 'Região V'), (37, 'Querosene', 'Região V'), (38, 'Ilha dos Araújos', 'Região VII'), (39, 'Lourdes', 'Região VIII'), (40, 'Santa Terezinha', 'Região VIII'), (41, 'Acampamento', 'Região IX'), (42, 'Vila Mariana', 'Região IX'), (43, 'São Geraldo', 'Região IX'), (44, 'Altinópolis', 'Região X'), (45, 'Mãe de Deus', 'Região X'), (46, 'São Braz', 'Região X'), (47, 'Santo Antônio', 'Região X'), (48, 'Planalto', 'Região X'), (49, 'Borges', 'Região X'), (50, 'Jardim do Trevo', 'Região XI'), (51, 'Santa Paula', 'Região XI'), (52, 'Jardim Primavera', 'Região XII'), (53, 'Vila Parque Ibituruna', 'Região XII'), (54, 'Vila Parque São João', 'Região XII'), (55, 'Recanto das Cachoeiras', 'Região XII'), (56, 'São Paulo', 'Região XIII'), (57, 'Vila Bretas', 'Região XIV'), (58, 'São Raimundo', 'Região XV'), (59, 'Vila Isa', 'Região XV'), (60, 'Jardim Ipê', 'Região XV'), (61, 'Vera Cruz', 'Região XV'), (62, 'Jardim Atalaia', 'Região XV'), (63, 'Asteca', 'Região XV'), (64, 'Jardim Alvorada', 'Região XV'), (65, 'Vale Primavera', 'Região XV'), (66, 'Betel', 'Região XVI'), (67, 'Distrito Industrial', 'Região XVI'), (68, 'Vale Pastoril II', 'Região XVI'), (69, 'Castanheiras', 'Região XVI'), (70, 'Jardim Alice', 'Região XVI'), (71, 'JK I', 'Região XVI'), (72, 'JK II', 'Região XVI'), (73, 'JK III', 'Região XVI'), (74, 'Santa Rita', 'Região XVI'), (75, 'Nova Santa Rita', 'Região XVI'), (76, 'Canaã', 'Região XVI'), (77, 'Vale Pastoril', 'Região XVI'), (78, 'Turmalina', 'Região XVII'), (79, 'Sagrada Família', 'Região XVII'), (80, 'Vila União', 'Região XVII'), (81, 'Jardim da Penha', 'Região XVII'), (82, 'Novo Horizonte', 'Região XVII'), (83, 'Vila Império', 'Região XVII'), (84, 'São Cristóvão', 'Região XVII'), (85, 'Nossa Senhora de Fátima', 'Região XVII'), (86, 'Vila Ozanan', 'Região XVII'), (87, 'Palmeiras', 'Região XVII'), (88, 'Redenção', 'Região XVII'), (89, 'Nova Vila Bretas', 'Região XVII'), (90, 'Bela Vista', 'Região XVII'), (91, 'Retiro dos Lagos', 'Região XVII'), (92, 'Kennedy', 'Região XVII'), (93, 'Jardim Pérola', 'Região XVII'), (94, 'Fraternidade', 'Região XVII'), (95, 'Vila Rica', 'Região XVII'), (96, 'São José', 'Região XVII'), (97, 'Caravelas', 'Região XVII'), (98, 'Tiradentes', 'Região XVII'), (99, 'Vitória', 'Região XVII'), (100, 'Cidade Jardim', 'Região XVIII'), (101, 'Conquista', 'Região XVIII'), (102, 'Vila do Sol', 'Região XVIII'), (103, 'Vila do Sol II', 'Região XVIII'), (104, 'Vila dos Montes', 'Região XVIII'), (105, 'Elvamar', 'Região XIX'), (106, 'Vilagge da Serra', 'Região XIX'), (107, 'Parque das Aroeiras', 'Região XIX'), (108, 'Encosta do Sol', 'Região XIX'), (109, 'Alto de Santa Helena', 'Distrito Municipal'), (110, 'Baguari', 'Distrito Municipal'), (111, 'Brejaubinha', 'Distrito Municipal'), (112, 'Chonin', 'Distrito Municipal'), (113, 'Chonin de Baixo', 'Distrito Municipal'), (114, 'Goiabal', 'Distrito Municipal'), (115, 'Derribadinha', 'Distrito Municipal'), (116, 'Penha do Cassiano', 'Distrito Municipal'), (117, 'Santo Antônio do Pontal', 'Distrito Municipal'), (118, 'São José do Itapinoã', 'Distrito Municipal'), (119, 'São Vítor', 'Distrito Municipal'), (120, 'Vila Nova Floresta', 'Distrito Municipal'); -- -------------------------------------------------------- -- -- Estrutura da tabela `comentarios` -- CREATE TABLE IF NOT EXISTS `comentarios` ( `id` int(9) NOT NULL, `tipo` int(2) NOT NULL, `data` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, `nome` varchar(120) COLLATE utf8_unicode_ci NOT NULL, `contato` varchar(100) COLLATE utf8_unicode_ci NOT NULL, `comentario` text COLLATE utf8_unicode_ci NOT NULL, `aceito` varchar(3) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'não' ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Estrutura da tabela `login` -- CREATE TABLE IF NOT EXISTS `login` ( `id` int(11) NOT NULL COMMENT 'ID de login do usuário', `login` varchar(20) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Nome de usuário do usuário', `senha` varchar(25) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Senha de acesso do usuário', `privilegios` varchar(5) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'comum' ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Ficam armazenados aqui o login e a senha de tais usuários.'; -- -- Extraindo dados da tabela `login` -- INSERT INTO `login` (`id`, `login`, `senha`, `privilegios`) VALUES (1, 'geilson', 'geilson', 'admin'); -- -------------------------------------------------------- -- -- Estrutura da tabela `postagens` -- CREATE TABLE IF NOT EXISTS `postagens` ( `id` int(11) NOT NULL, `data` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, `titulo` varchar(140) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Título da publicação', `materia` text COLLATE utf8_unicode_ci NOT NULL COMMENT 'A publicação em si', `autor` int(11) NOT NULL COMMENT 'Chave estrangeira que liga o autor à sua tabela em usuarios' ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Tabela onde as postagens [tipo blog] serão armazenadas'; -- -------------------------------------------------------- -- -- Estrutura da tabela `resenhas` -- CREATE TABLE IF NOT EXISTS `resenhas` ( `id` int(11) NOT NULL, `id_post` int(11) NOT NULL COMMENT 'Chave estrangeira para ligação entre à tabela postagens e resenhas', `data` datetime DEFAULT NULL, `nome` int(11) NOT NULL COMMENT 'Nome do autor do comentário (tabela usuarios)', `comentario` text COLLATE utf8_unicode_ci NOT NULL COMMENT 'Comentário referente ao id_post' ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='As resenhas se referem aos comentários feitos nas publicações (tabelas postagens)'; -- -------------------------------------------------------- -- -- Estrutura da tabela `respostas` -- CREATE TABLE IF NOT EXISTS `respostas` ( `id` int(11) NOT NULL, `id_comentario` int(11) NOT NULL COMMENT 'Chave estrangeira para ligação à tabela comentarios', `data` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, `nome` int(11) NOT NULL COMMENT 'Nome (coluna id da tabela usuario) do usuário que deu a resposta', `resposta` text COLLATE utf8_unicode_ci NOT NULL COMMENT 'Resposta feita pelo usuário (coluna nome desta tabela)' ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Tabela onde é armazenados as respostas feita aos comentários (tabela comentarios) realizados pelos os associados'; -- -------------------------------------------------------- -- -- Estrutura da tabela `respostas_forum` -- CREATE TABLE IF NOT EXISTS `respostas_forum` ( `idresposta` int(11) NOT NULL, `id_topico` int(11) NOT NULL, `data` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, `autor` int(6) NOT NULL, `resposta` text COLLATE utf8_unicode_ci NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Estrutura da tabela `topicos_forum` -- CREATE TABLE IF NOT EXISTS `topicos_forum` ( `idtopico` int(11) NOT NULL, `topico` varchar(128) COLLATE utf8_unicode_ci NOT NULL, `data` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, `autor` int(6) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Estrutura da tabela `usuarios` -- CREATE TABLE IF NOT EXISTS `usuarios` ( `id` int(11) NOT NULL COMMENT 'identificador do usuário', `id_login` int(6) NOT NULL COMMENT 'Chave estrangeira referenciada à tabela login', `id_bairro` int(11) NOT NULL COMMENT 'Chave estrangeira à tabela bairros', `nome` varchar(90) COLLATE utf8_unicode_ci NOT NULL COMMENT 'nome do usuário', `sobrenome` varchar(120) COLLATE utf8_unicode_ci NOT NULL COMMENT 'sobrenome do usuário', `sexo` varchar(9) COLLATE utf8_unicode_ci NOT NULL COMMENT 'sexo do usuário', `dt_nasc` date NOT NULL COMMENT 'senha do usuário', `email` varchar(120) COLLATE utf8_unicode_ci DEFAULT NULL, `telefone` int(11) DEFAULT NULL, `celular` int(11) DEFAULT NULL, `img` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `sobre` text COLLATE utf8_unicode_ci ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Registro de descrição de usuários'; -- -- Extraindo dados da tabela `usuarios` -- INSERT INTO `usuarios` (`id`, `id_login`, `id_bairro`, `nome`, `sobrenome`, `sexo`, `dt_nasc`, `email`, `telefone`, `celular`, `img`, `sobre`) VALUES (1, 1, 27, 'Geilson', 'Batista', 'Masculino', '2001-09-11', 'geilson@mail.ru', 40028922, NULL, 'img_200815000756.jpg', 'Sobre mim...'); -- -- Indexes for dumped tables -- -- -- Indexes for table `bairros` -- ALTER TABLE `bairros` ADD PRIMARY KEY (`id`); -- -- Indexes for table `comentarios` -- ALTER TABLE `comentarios` ADD PRIMARY KEY (`id`); -- -- Indexes for table `login` -- ALTER TABLE `login` ADD PRIMARY KEY (`id`); -- -- Indexes for table `postagens` -- ALTER TABLE `postagens` ADD PRIMARY KEY (`id`), ADD KEY `fk_usuario_idx` (`autor`); -- -- Indexes for table `resenhas` -- ALTER TABLE `resenhas` ADD PRIMARY KEY (`id`), ADD KEY `fk_postagem_idx` (`id_post`); -- -- Indexes for table `respostas` -- ALTER TABLE `respostas` ADD PRIMARY KEY (`id`), ADD KEY `fk_usuario_idx` (`nome`), ADD KEY `fk_comentario_idx` (`id_comentario`); -- -- Indexes for table `respostas_forum` -- ALTER TABLE `respostas_forum` ADD PRIMARY KEY (`idresposta`), ADD KEY `fk_topico_res_idx` (`id_topico`), ADD KEY `fk_resposta_usr_idx` (`autor`); -- -- Indexes for table `topicos_forum` -- ALTER TABLE `topicos_forum` ADD PRIMARY KEY (`idtopico`), ADD KEY `fk_topico_usr_idx` (`autor`); -- -- Indexes for table `usuarios` -- ALTER TABLE `usuarios` ADD PRIMARY KEY (`id`), ADD KEY `fk_login_id_idx` (`id_login`,`id`), ADD KEY `fk_bairro_idx` (`id_bairro`) COMMENT 'Interligação entre as tabelas bairros e usuario onde não sendo possível exclusão e/ou alteração nos registros da tabela bairro'; -- -- AUTO_INCREMENT for dumped tables -- -- -- AUTO_INCREMENT for table `bairros` -- ALTER TABLE `bairros` MODIFY `id` int(3) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=121; -- -- AUTO_INCREMENT for table `comentarios` -- ALTER TABLE `comentarios` MODIFY `id` int(9) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `login` -- ALTER TABLE `login` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID de login do usuário',AUTO_INCREMENT=2; -- -- AUTO_INCREMENT for table `postagens` -- ALTER TABLE `postagens` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `resenhas` -- ALTER TABLE `resenhas` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `respostas` -- ALTER TABLE `respostas` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `respostas_forum` -- ALTER TABLE `respostas_forum` MODIFY `idresposta` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `topicos_forum` -- ALTER TABLE `topicos_forum` MODIFY `idtopico` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `usuarios` -- ALTER TABLE `usuarios` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'identificador do usuário',AUTO_INCREMENT=2; -- -- Constraints for dumped tables -- -- -- Limitadores para a tabela `postagens` -- ALTER TABLE `postagens` ADD CONSTRAINT `fk_post-usuario` FOREIGN KEY (`autor`) REFERENCES `usuarios` (`id_login`) ON DELETE CASCADE ON UPDATE CASCADE; -- -- Limitadores para a tabela `resenhas` -- ALTER TABLE `resenhas` ADD CONSTRAINT `fk_postagem` FOREIGN KEY (`id_post`) REFERENCES `postagens` (`id`) ON DELETE CASCADE ON UPDATE CASCADE; -- -- Limitadores para a tabela `respostas` -- ALTER TABLE `respostas` ADD CONSTRAINT `fk_comentario` FOREIGN KEY (`id_comentario`) REFERENCES `comentarios` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, ADD CONSTRAINT `fk_usuario` FOREIGN KEY (`nome`) REFERENCES `usuarios` (`id_login`) ON DELETE CASCADE ON UPDATE CASCADE; -- -- Limitadores para a tabela `respostas_forum` -- ALTER TABLE `respostas_forum` ADD CONSTRAINT `fk_resposta_usr` FOREIGN KEY (`autor`) REFERENCES `usuarios` (`id_login`) ON DELETE CASCADE ON UPDATE CASCADE, ADD CONSTRAINT `fk_topico_res` FOREIGN KEY (`id_topico`) REFERENCES `topicos_forum` (`idtopico`) ON DELETE CASCADE ON UPDATE CASCADE; -- -- Limitadores para a tabela `topicos_forum` -- ALTER TABLE `topicos_forum` ADD CONSTRAINT `fk_topico_usr` FOREIGN KEY (`autor`) REFERENCES `usuarios` (`id_login`) ON DELETE CASCADE ON UPDATE CASCADE; -- -- Limitadores para a tabela `usuarios` -- ALTER TABLE `usuarios` ADD CONSTRAINT `fk_bairro` FOREIGN KEY (`id_bairro`) REFERENCES `bairros` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION, ADD CONSTRAINT `fk_login` FOREIGN KEY (`id_login`) REFERENCES `login` (`id`) ON DELETE CASCADE ON UPDATE CASCADE; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
CREATE TABLE expense ( id INTEGER PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY, expense DECIMAL(10, 2) NOT NULL, user_id INTEGER REFERENCES users(id) ON DELETE CASCADE, description TEXT, date_created TIMESTAMP NOT NULL DEFAULT now() ); INSERT INTO expense (expense, user_id, description) VALUES (2.95, 1, 'coffee'),(14, 1, 'tea'),(1.99, 1, 'groceries'),(12.99, 1, 'video games'),(5.99, 1, 'milk'),(100, 1, 'movie tickets'),(20.99, 1, 'dog food'), (2.95, 2, 'coffee'),(14, 2, 'tea'),(1.99, 2, 'groceries'),(12.99, 2, 'video games'),(5.99, 2, 'milk'),(100, 2, 'movie tickets'),(20.99, 2, 'dog food'),(2.95, 3, 'coffee'),(14, 3, 'tea'),(1.99, 3, 'groceries'),(12.99, 3, 'video games'),(5.99, 3, 'milk'),(100, 3, 'movie tickets'),(20.99, 3, 'dog food'),(2.95, 4, 'coffee'),(14, 4, 'tea'),(1.99, 4, 'groceries'),(12.99, 4, 'video games'),(5.99, 4, 'milk'),(100, 4, 'movie tickets'),(20.99, 4, 'dog food'),(2.95, 5, 'coffee'),(14, 5, 'tea'),(1.99, 5, 'groceries'),(12.99, 5, 'video games'),(5.99, 5, 'milk'),(100, 5, 'movie tickets'),(20.99, 5, 'dog food') ;
Select * from [part 3].dbo.NashvilleHousing -- sale date Select SaleDate from [part 3].dbo.NashvilleHousing Select Saledatecoverted, CONVERT(Date, Saledate) from [part 3].dbo.NashvilleHousing Update NashvilleHousing set Saledate = CONVERT(Date, Saledate) Alter table NashvilleHousing add Saledatecoverted Date; Update NashvilleHousing set Saledatecoverted = CONVERT(Date, Saledate) -- Property address Select PropertyAddress from [part 3].dbo.NashvilleHousing where PropertyAddress is null Select * from [part 3].dbo.NashvilleHousing where PropertyAddress is null Select * from [part 3].dbo.NashvilleHousing --where PropertyAddress is null order by ParcelID Select a.ParcelID, a.PropertyAddress, b.ParcelID, b.PropertyAddress, ISNULL(a.PropertyAddress,b.PropertyAddress) from [part 3].dbo.NashvilleHousing a join [part 3].dbo.NashvilleHousing b on a.ParcelID = b.ParcelID and a.[UniqueID ] <> b.[UniqueID ] where a.PropertyAddress is null Update a set PropertyAddress = ISNULL(a.PropertyAddress,b.PropertyAddress) from [part 3].dbo.NashvilleHousing a join [part 3].dbo.NashvilleHousing b on a.ParcelID = b.ParcelID and a.[UniqueID ] <> b.[UniqueID ] where a.PropertyAddress is null -- breaking address Select PropertyAddress from [part 3].dbo.NashvilleHousing --where PropertyAddress is null --order by ParcelID Select Substring(PropertyAddress, 1 ,CHARINDEX(',', PropertyAddress)-1) as address , Substring(PropertyAddress, CHARINDEX(',', PropertyAddress)+1 , Len(PropertyAddress)) as address from [part 3].dbo.NashvilleHousing Alter table NashvilleHousing add Propertysplitaddress nvarchar(255); Update NashvilleHousing set Propertysplitaddress = Substring(PropertyAddress, 1 ,CHARINDEX(',', PropertyAddress)-1) Alter table NashvilleHousing add Propertysplitcity nvarchar(255); Update NashvilleHousing set Propertysplitcity = Substring(PropertyAddress, CHARINDEX(',', PropertyAddress)+1 , Len(PropertyAddress)) Select * from [part 3].dbo.NashvilleHousing -- owner address Select OwnerAddress from [part 3].dbo.NashvilleHousing Select PARSENAME(replace(Owneraddress, ',' , '.'), 3) ,PARSENAME(replace(Owneraddress, ',' , '.'), 2) ,PARSENAME(replace(Owneraddress, ',' , '.'), 1) from [part 3].dbo.NashvilleHousing Alter table NashvilleHousing add ownersplitaddress nvarchar(255); Update NashvilleHousing set ownersplitaddress = PARSENAME(replace(Owneraddress, ',' , '.'), 3) Alter table NashvilleHousing add ownersplitcity nvarchar(255); Update NashvilleHousing set ownersplitcity = PARSENAME(replace(Owneraddress, ',' , '.'), 2) Alter table NashvilleHousing add ownersplitstate nvarchar(255); Update NashvilleHousing set ownersplitstate = PARSENAME(replace(Owneraddress, ',' , '.'), 1) Select * from [part 3].dbo.NashvilleHousing -- change y and n to yes and no in sold vacant select Distinct (SoldAsVacant), Count(SoldAsVacant) from [part 3].dbo.NashvilleHousing group by SoldAsVacant order by 2 select SoldAsVacant , Case When SoldAsVacant = 'Y' Then 'Yes' When SoldAsVacant = 'N' Then 'No' else SoldAsVacant End from [part 3].dbo.NashvilleHousing Update NashvilleHousing set SoldAsVacant = Case When SoldAsVacant = 'Y' Then 'Yes' When SoldAsVacant = 'N' Then 'No' else SoldAsVacant End -- remove duplicates With RownumCTE AS( select *, ROW_NUMBER() Over ( Partition by ParcelID, PropertyAddress, SalePrice, SaleDate, LegalReference Order by UniqueId ) Row_num from [part 3].dbo.NashvilleHousing ) --Order by ParcelID Select * from RownumCTE where Row_num > 1 order by PropertyAddress --Delete With RownumCTE AS( select *, ROW_NUMBER() Over ( Partition by ParcelID, PropertyAddress, SalePrice, SaleDate, LegalReference Order by UniqueId ) Row_num from [part 3].dbo.NashvilleHousing ) --Order by ParcelID Delete from RownumCTE where Row_num > 1 --order by PropertyAddress -- delete columns Select * from [part 3].dbo.NashvilleHousing --Alter table NashvilleHousing --Drop Column Owneraddress, taxedistrict, Propertyaddress,saledate
-- History table duplicates: create temporary table korjattavat on commit drop as (select * from valinnantilat_history as vh1 where exists ( select 1 from valinnantilat_history as vh2 where vh1.valintatapajono_oid = vh2.valintatapajono_oid and vh1.hakemus_oid = vh2.hakemus_oid and vh1.transaction_id <> vh2.transaction_id and vh1.tila = vh2.tila and upper(vh1.system_time) = lower(vh2.system_time)) order by valintatapajono_oid, hakemus_oid, system_time); with later_duplicate as ( select * from valinnantilat_history vh3 where exists( select 1 from korjattavat where korjattavat.valintatapajono_oid = vh3.valintatapajono_oid and korjattavat.hakemus_oid = vh3.hakemus_oid and korjattavat.tila = vh3.tila and upper(korjattavat.system_time) = lower(vh3.system_time) ) ) update valinnantilat_history vh1 set system_time = tstzrange(lower(vh1.system_time), (select upper(system_time) from later_duplicate where later_duplicate.valintatapajono_oid = vh1.valintatapajono_oid and later_duplicate.hakemus_oid = vh1.hakemus_oid and later_duplicate.tila = vh1.tila and upper(vh1.system_time) = lower(later_duplicate.system_time)), '[)') where exists ( select 1 from korjattavat where korjattavat.valintatapajono_oid = vh1.valintatapajono_oid and korjattavat.hakemus_oid = vh1.hakemus_oid and korjattavat.tila = vh1.tila and korjattavat.system_time = vh1.system_time); delete from valinnantilat_history v_h where exists( select 1 from valinnantilat_history vh_korjattu where vh_korjattu.valintatapajono_oid = v_h.valintatapajono_oid and vh_korjattu.hakemus_oid = v_h.hakemus_oid and vh_korjattu.tila = v_h.tila and vh_korjattu.tilan_viimeisin_muutos = v_h.tilan_viimeisin_muutos and vh_korjattu.transaction_id < v_h.transaction_id and upper(vh_korjattu.system_time) = upper(v_h.system_time) ); -- Live + History duplicates: create temporary table historiaduplikaatit on commit drop as (select * from valinnantilat_history as vh where exists ( select 1 from valinnantilat v where vh.valintatapajono_oid = v.valintatapajono_oid and vh.hakemus_oid = v.hakemus_oid and vh.tila = v.tila and vh.tilan_viimeisin_muutos = v.tilan_viimeisin_muutos and lower(v.system_time) = upper(vh.system_time) )); create index historiaduplikaatit_pkey on historiaduplikaatit (valintatapajono_oid, hakemus_oid, tila, tilan_viimeisin_muutos); alter table valinnantilat disable trigger set_system_time_on_valinnantilat_on_update; alter table valinnantilat disable trigger delete_valinnantilat_history; alter table valinnantilat disable trigger set_system_time_on_valinnantilat_on_insert; alter table valinnantilat disable trigger update_valinnantilat_history; update valinnantilat v set system_time = TSTZRANGE( (select lower(system_time) from historiaduplikaatit d where d.valintatapajono_oid = v.valintatapajono_oid and d.hakemus_oid = v.hakemus_oid and d.tila = v.tila and d.tilan_viimeisin_muutos = v.tilan_viimeisin_muutos), upper(v.system_time), '[)' ) where exists ( select 1 from historiaduplikaatit d2 where d2.valintatapajono_oid = v.valintatapajono_oid and d2.hakemus_oid = v.hakemus_oid and d2.tila = v.tila and d2.tilan_viimeisin_muutos = v.tilan_viimeisin_muutos); delete from valinnantilat_history vh where exists ( select 1 from valinnantilat v where vh.valintatapajono_oid = v.valintatapajono_oid and vh.hakemus_oid = v.hakemus_oid and vh.tila = v.tila and vh.tilan_viimeisin_muutos = v.tilan_viimeisin_muutos and lower(v.system_time) = lower(vh.system_time) ); alter table valinnantilat enable trigger set_system_time_on_valinnantilat_on_update; alter table valinnantilat enable trigger delete_valinnantilat_history; alter table valinnantilat enable trigger set_system_time_on_valinnantilat_on_insert; alter table valinnantilat enable trigger update_valinnantilat_history;
-- -------------------------------------------------------- -- Host: 127.0.0.1 -- Server version: 10.1.31-MariaDB - mariadb.org binary distribution -- Server OS: Win32 -- HeidiSQL Version: 10.2.0.5766 -- -------------------------------------------------------- /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET NAMES utf8 */; /*!50503 SET NAMES utf8mb4 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; -- Dumping database structure for chat CREATE DATABASE IF NOT EXISTS `chat` /*!40100 DEFAULT CHARACTER SET latin1 */; USE `chat`; -- Dumping structure for table chat.chat CREATE TABLE IF NOT EXISTS `chat` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `message` text NOT NULL, `from` varchar(50) NOT NULL, `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, KEY `Index 1` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=81 DEFAULT CHARSET=latin1; -- Dumping data for table chat.chat: ~0 rows (approximately) /*!40000 ALTER TABLE `chat` DISABLE KEYS */; INSERT INTO `chat` (`id`, `message`, `from`, `created`) VALUES (1, 'test', 'farhan', '2020-10-20 00:07:12'), (2, 'fffff', 'hhjhjhj', '2020-10-20 00:29:04'), (3, 'fffffff', 'hhjhjhj', '2020-10-20 00:29:07'), (4, 'tttttttt', 'hhjhjhj', '2020-10-20 00:29:12'), (5, 'Hai', 'Farhan', '2020-10-20 00:38:32'), (6, 'Apa?', 'Tamam', '2020-10-20 00:38:36'), (7, 'Berapa ?', 'Farhan', '2020-10-20 00:38:50'), (8, 'Kenapa?', 'Tamam', '2020-10-20 00:38:55'), (9, 'hahahaha', 'Farhan', '2020-10-20 00:41:00'), (10, 'hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh', 'Farhan', '2020-10-20 00:41:05'), (11, 'Noooooooooooooooooooooooooooooooooooooooooo', 'Tamam', '2020-10-20 00:41:10'), (12, 'nnnnn', 'Farhan', '2020-10-20 00:43:02'), (13, 'scroll', 'Farhan', '2020-10-20 00:45:18'), (14, 'farhan', 'farhan', '2020-10-20 00:45:26'), (15, 'gigilo', 'farhan', '2020-10-20 00:45:29'), (16, 'haiiii', 'farhan', '2020-10-20 00:45:51'), (17, 'nnnnn', 'farhan', '2020-10-20 00:51:49'), (18, 'hei', 'Pak Ivan', '2020-10-20 00:57:07'), (19, 'hei', 'Pak Ivan', '2020-10-20 00:57:09'), (20, 'hei', 'Yudi', '2020-10-20 00:58:25'), (21, 'Apa', 'Gntur', '2020-10-20 00:58:28'), (22, 'Kamu Siapa?', 'Yudi', '2020-10-20 00:58:33'), (23, 'Aku dimana?', 'Gntur', '2020-10-20 00:58:39'), (24, 'Test', 'Rajab', '2020-10-20 01:01:21'), (25, 'Siapa', 'Agil', '2020-10-20 01:01:25'), (26, 'asdsadad', 'adasdsadsad', '2020-10-20 01:02:28'), (27, 'asdadad', 'Agil', '2020-10-20 01:03:10'), (28, 'assad', 'Agil', '2020-10-20 01:03:12'), (29, 'sdfsfsdf', 'Agil', '2020-10-20 01:03:21'), (30, 'lolololo', 'kkkk', '2020-10-20 01:03:39'), (31, 'hhhhhhhhhhhhhhhhhhhh', 'Agil', '2020-10-20 01:03:44'), (32, 'tessssttt', 'Agil', '2020-10-20 01:05:16'), (33, 'hhhhhhh', 'Agil', '2020-10-20 01:05:28'), (34, 'hjjjjjjj', 'kkkk', '2020-10-20 01:05:32'), (35, 'wkwkwkwkw', 'Yuniar', '2020-10-20 01:07:27'), (36, 'haiiiii', 'Saraswati', '2020-10-20 01:07:31'), (37, 'bro', 'tester', '2020-10-20 01:08:21'), (38, 'kodiamna', 'tester 2', '2020-10-20 01:08:24'), (39, 'Hai', 'Agrian', '2020-10-20 01:11:56'), (40, 'Hai', 'Agrian', '2020-10-20 01:12:01'), (41, 'APa', 'Rajabu', '2020-10-20 01:12:03'), (42, 'asdasdasd', 'Agrian', '2020-10-20 01:12:09'), (43, 'asdsad', 'adaasd', '2020-10-20 01:12:30'), (44, 'asdsad', 'dadasdasd', '2020-10-20 01:12:40'), (45, 'adasd', 'Raihan', '2020-10-20 01:14:23'), (46, 'asdsad', 'Altahg', '2020-10-20 01:14:25'), (47, 'asdasd', 'altaf', '2020-10-20 01:16:24'), (48, 'asdad', 'aadsad', '2020-10-20 01:16:26'), (49, 'asdasd', 'altaf', '2020-10-20 01:16:28'), (50, 'asdasd', 'dddfdf', '2020-10-20 01:19:57'), (51, 'fgfgfgg', 'lll', '2020-10-20 01:21:08'), (52, 'sdfsdfsdf', 'lll', '2020-10-20 01:21:13'), (53, 'jhjhjhjjjjjjjjjjjjjjjjjj', 'lll', '2020-10-20 01:21:17'), (54, 'kkkkkkkk', 'lll', '2020-10-20 01:21:20'), (55, 'asdasdad', 'Altf', '2020-10-20 01:26:21'), (56, 'asdadad', 'asdad', '2020-10-20 01:26:23'), (57, 'asdasd', 'asdadad', '2020-10-20 01:26:56'), (58, 'asdasdasd', 'asdasdad', '2020-10-20 01:27:04'), (59, 'asad', 'adaasdasd', '2020-10-20 01:28:20'), (60, 'asdasda', 'dasda', '2020-10-20 01:28:22'), (61, 'asdasd', 'asdasda', '2020-10-20 01:29:42'), (62, 'asdasd', 'asdasdad', '2020-10-20 01:29:47'), (63, 'asdadasd', 'asdasda', '2020-10-20 01:29:52'), (64, 'woi nabule', 'asdasda', '2020-10-20 01:29:57'), (65, 'apa anjing', 'asdasdad', '2020-10-20 01:30:00'), (66, 'Jab', 'Agrian', '2020-10-20 01:30:22'), (67, 'Apa gil ?', 'Rajab', '2020-10-20 01:30:26'), (68, 'ko bisa bantu saya?', 'Agrian', '2020-10-20 01:30:31'), (69, 'apa kah itu?', 'Rajab', '2020-10-20 01:30:35'), (70, 'bantu buatkan saya ui/ux', 'Agrian', '2020-10-20 01:30:53'), (71, 'sa msh newbie ji kasia', 'Rajab', '2020-10-20 01:31:00'), (72, 'sa bayar ko', 'Agrian', '2020-10-20 01:31:04'), (73, 'alele', 'Rajab', '2020-10-20 01:31:10'), (74, 'brp ko mau?', 'Agrian', '2020-10-20 01:31:16'), (75, '1 jt 1 page wkwkwkw', 'Rajab', '2020-10-20 01:31:21'), (76, 'edede', 'Agrian', '2020-10-20 01:31:24'), (77, 'bisnya bgtu pa', 'Agrian', '2020-10-20 01:32:01'), (78, 'terserah saya', 'Rajab', '2020-10-20 01:32:06'), (79, 'apakah itu?', 'Farhan', '2020-10-20 01:34:39'), (80, 'sa ngerumpi juga pi', 'Farhan', '2020-10-20 01:34:57'); /*!40000 ALTER TABLE `chat` ENABLE KEYS */; /*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */; /*!40014 SET FOREIGN_KEY_CHECKS=IF(@OLD_FOREIGN_KEY_CHECKS IS NULL, 1, @OLD_FOREIGN_KEY_CHECKS) */; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/* Warnings: - You are about to drop the `Post` table. If the table is not empty, all the data it contains will be lost. - You are about to drop the `Profile` table. If the table is not empty, all the data it contains will be lost. - You are about to drop the `User` table. If the table is not empty, all the data it contains will be lost. */ -- CreateEnum CREATE TYPE "Gender" AS ENUM ('MALE', 'FEMALE'); -- CreateEnum CREATE TYPE "Semester" AS ENUM ('FALL', 'SPRING', 'SUMMER'); -- DropForeignKey ALTER TABLE "Post" DROP CONSTRAINT "Post_authorId_fkey"; -- DropForeignKey ALTER TABLE "Profile" DROP CONSTRAINT "Profile_userId_fkey"; -- DropTable DROP TABLE "Post"; -- DropTable DROP TABLE "Profile"; -- DropTable DROP TABLE "User"; -- CreateTable CREATE TABLE "Student" ( "id" SERIAL NOT NULL, "uniCode" TEXT NOT NULL, "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, "updatedAt" TIMESTAMP(3) NOT NULL, "fname" VARCHAR(255) NOT NULL, "lname" VARCHAR(255) NOT NULL, "gender" "Gender", "password" TEXT NOT NULL, "email" TEXT NOT NULL, "level" INTEGER, "semester" "Semester", "program" TEXT, "major" TEXT, "creditDone" INTEGER, "creditHave" INTEGER, "supervisorId" INTEGER, PRIMARY KEY ("id") ); -- CreateTable CREATE TABLE "Supervisor" ( "id" SERIAL NOT NULL, "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, "updatedAt" TIMESTAMP(3) NOT NULL, "fname" VARCHAR(255) NOT NULL, "lname" VARCHAR(255) NOT NULL, "gender" "Gender", "password" TEXT NOT NULL, "email" TEXT NOT NULL, PRIMARY KEY ("id") ); -- CreateTable CREATE TABLE "Course" ( "id" SERIAL NOT NULL, "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, "updatedAt" TIMESTAMP(3) NOT NULL, "discreption" TEXT, "credit" INTEGER, "available" BOOLEAN NOT NULL DEFAULT true, "courseCode" TEXT NOT NULL, PRIMARY KEY ("id") ); -- CreateTable CREATE TABLE "Enrollment" ( "id" SERIAL NOT NULL, "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, "updatedAt" TIMESTAMP(3) NOT NULL, "supervisorId" INTEGER, "studentID" INTEGER NOT NULL, "courseID" INTEGER NOT NULL, "isAproved" BOOLEAN NOT NULL DEFAULT false, PRIMARY KEY ("id") ); -- CreateTable CREATE TABLE "_CourseToStudent" ( "A" INTEGER NOT NULL, "B" INTEGER NOT NULL ); -- CreateTable CREATE TABLE "_CoursePrerequisites" ( "A" INTEGER NOT NULL, "B" INTEGER NOT NULL ); -- CreateIndex CREATE UNIQUE INDEX "Student.uniCode_unique" ON "Student"("uniCode"); -- CreateIndex CREATE UNIQUE INDEX "Student.email_unique" ON "Student"("email"); -- CreateIndex CREATE UNIQUE INDEX "Supervisor.email_unique" ON "Supervisor"("email"); -- CreateIndex CREATE UNIQUE INDEX "_CourseToStudent_AB_unique" ON "_CourseToStudent"("A", "B"); -- CreateIndex CREATE INDEX "_CourseToStudent_B_index" ON "_CourseToStudent"("B"); -- CreateIndex CREATE UNIQUE INDEX "_CoursePrerequisites_AB_unique" ON "_CoursePrerequisites"("A", "B"); -- CreateIndex CREATE INDEX "_CoursePrerequisites_B_index" ON "_CoursePrerequisites"("B"); -- AddForeignKey ALTER TABLE "Student" ADD FOREIGN KEY ("supervisorId") REFERENCES "Supervisor"("id") ON DELETE SET NULL ON UPDATE CASCADE; -- AddForeignKey ALTER TABLE "Enrollment" ADD FOREIGN KEY ("supervisorId") REFERENCES "Supervisor"("id") ON DELETE SET NULL ON UPDATE CASCADE; -- AddForeignKey ALTER TABLE "Enrollment" ADD FOREIGN KEY ("studentID") REFERENCES "Student"("id") ON DELETE CASCADE ON UPDATE CASCADE; -- AddForeignKey ALTER TABLE "Enrollment" ADD FOREIGN KEY ("courseID") REFERENCES "Course"("id") ON DELETE CASCADE ON UPDATE CASCADE; -- AddForeignKey ALTER TABLE "_CourseToStudent" ADD FOREIGN KEY ("A") REFERENCES "Course"("id") ON DELETE CASCADE ON UPDATE CASCADE; -- AddForeignKey ALTER TABLE "_CourseToStudent" ADD FOREIGN KEY ("B") REFERENCES "Student"("id") ON DELETE CASCADE ON UPDATE CASCADE; -- AddForeignKey ALTER TABLE "_CoursePrerequisites" ADD FOREIGN KEY ("A") REFERENCES "Course"("id") ON DELETE CASCADE ON UPDATE CASCADE; -- AddForeignKey ALTER TABLE "_CoursePrerequisites" ADD FOREIGN KEY ("B") REFERENCES "Course"("id") ON DELETE CASCADE ON UPDATE CASCADE;
-- 修改日期:2012.10.17 -- 修改人:费滔 -- 修改原因:新增客户需求,中烟 -- 修改内容:增加退款勾兑 alter table bis_acc_his_dtl add blend CHAR(1) default '0'; comment on column bis_acc_his_dtl.blend is '是否勾兑标识'; alter table bis_acc_his_dtl add blend_info VARCHAR(200); comment on column bis_acc_his_dtl.blend_info is '退款勾兑原因';
CREATE TABLE IF NOT EXISTS "t_status" ( "statusId" integer, "userId" integer, "status" text, PRIMARY KEY ("statusId", "userId") );
-- phpMyAdmin SQL Dump -- version 4.7.4 -- https://www.phpmyadmin.net/ -- -- Hôte : 127.0.0.1 -- Généré le : mer. 28 mars 2018 à 12:27 -- Version du serveur : 10.1.30-MariaDB -- Version de PHP : 7.2.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8mb4 */; -- -- Base de données : `projetbd` -- -- -------------------------------------------------------- -- -- Structure de la table `bd` -- CREATE TABLE `bd` ( `id_BD` int(6) NOT NULL, `titre_BD` varchar(50) COLLATE utf8_bin NOT NULL, `date_Creation_BD` date DEFAULT NULL, `date_Fin_BD` date DEFAULT NULL, `note_BD` int(2) DEFAULT NULL, `rang_BD` int(6) DEFAULT NULL, `valide_Admin_BD` varchar(5) COLLATE utf8_bin DEFAULT NULL, `synopsis_BD` varchar(2000) COLLATE utf8_bin DEFAULT NULL, `couverture_BD` varchar(150) COLLATE utf8_bin DEFAULT NULL, `id_Utilisateur` int(6) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; -- -- Déchargement des données de la table `bd` -- INSERT INTO `bd` (`id_BD`, `titre_BD`, `date_Creation_BD`, `date_Fin_BD`, `note_BD`, `rang_BD`, `valide_Admin_BD`, `synopsis_BD`, `couverture_BD`, `id_Utilisateur`) VALUES (1, 'Harry Potter', '2018-01-09', '2018-03-10', NULL, NULL, NULL, 'Le sorcier', 'harry_potter.jpg', 2), (2, 'Tom Tom et Nana', '2017-12-10', '2017-03-20', NULL, NULL, NULL, NULL, 'tom_tom_nana.jpg', 2), (3, 'Le monde de Narnia', '2018-01-09', '2018-01-20', NULL, NULL, NULL, NULL, 'narnia.jpg', 2), (4, 'Totoro', '2018-01-20', '2018-03-10', NULL, NULL, NULL, NULL, 'totoro.jpg', 2), (7, 'Test', '2018-02-21', '2018-03-15', NULL, NULL, '0', 'Test', 'harry_potter.jpg', 2), (9, 'TT', '2018-02-23', '2018-03-06', NULL, NULL, '0', '', 'narnia.jpg', 2), (10, 'Toto', '2018-02-23', NULL, NULL, NULL, '0', '', 'totoro.jpg', 2), (11, 'BD1', '2018-03-11', NULL, NULL, NULL, '0', 'Once upon a time', '', 2); -- -------------------------------------------------------- -- -- Structure de la table `bd_genre` -- CREATE TABLE `bd_genre` ( `id_BD` int(6) NOT NULL, `id_Genre` int(2) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; -- -- Déchargement des données de la table `bd_genre` -- INSERT INTO `bd_genre` (`id_BD`, `id_Genre`) VALUES (1, 4), (2, 2), (2, 6), (3, 4), (4, 5), (4, 6), (7, 4), (7, 6), (9, 5), (10, 4), (11, 2); -- -------------------------------------------------------- -- -- Structure de la table `bd_langue` -- CREATE TABLE `bd_langue` ( `id_BD` int(6) NOT NULL, `id_Langue` int(2) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; -- -- Déchargement des données de la table `bd_langue` -- INSERT INTO `bd_langue` (`id_BD`, `id_Langue`) VALUES (1, 1), (1, 2), (1, 3), (1, 4), (2, 1), (3, 1), (3, 2), (4, 1), (4, 2), (4, 6), (7, 5), (9, 2), (10, 2), (11, 2); -- -------------------------------------------------------- -- -- Structure de la table `bulle` -- CREATE TABLE `bulle` ( `id_Bulle` int(4) NOT NULL, `parole_BD` varchar(1000) COLLATE utf8_bin DEFAULT NULL, `x_Bulle` float(4,2) DEFAULT NULL, `police_Bulle` varchar(50) COLLATE utf8_bin DEFAULT NULL, `taille_Bulle` int(2) DEFAULT NULL, `couleur_Texte_Bulle` varchar(20) COLLATE utf8_bin DEFAULT NULL, `type_Bulle` varchar(40) COLLATE utf8_bin DEFAULT NULL, `numero_Bulle` int(3) NOT NULL, `id_Image` int(4) NOT NULL, `id_Langue` int(2) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; -- -------------------------------------------------------- -- -- Structure de la table `chapitre` -- CREATE TABLE `chapitre` ( `id_Chapitre` int(2) NOT NULL, `titre_Chapitre` varchar(50) COLLATE utf8_bin DEFAULT NULL, `date_Creation_Chapitre` date DEFAULT NULL, `numero_Chapitre` int(2) NOT NULL, `id_BD` int(6) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; -- -- Déchargement des données de la table `chapitre` -- INSERT INTO `chapitre` (`id_Chapitre`, `titre_Chapitre`, `date_Creation_Chapitre`, `numero_Chapitre`, `id_BD`) VALUES (1, 'chapitre1', NULL, 1, 1), (2, 'chapitre2', NULL, 2, 1), (3, 'chapitre3', NULL, 3, 1), (4, 'chapitre4', NULL, 4, 1), (5, 'chapitre1', NULL, 1, 2), (6, 'chapitre1', NULL, 1, 3), (7, 'chapitre2', NULL, 2, 3), (8, 'chapitre3', NULL, 3, 3), (9, 'chapitre1', NULL, 1, 4), (15, 'Chapitre 1', '2018-02-23', 1, 9), (16, 'Chapitre 1', '2018-02-23', 1, 9); -- -------------------------------------------------------- -- -- Structure de la table `commentaire` -- CREATE TABLE `commentaire` ( `id_Commentaire` int(6) NOT NULL, `commentaire_Comm` varchar(4000) COLLATE utf8_bin DEFAULT NULL, `id_Chapitre` int(2) NOT NULL, `id_Utilisateur` int(6) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; -- -------------------------------------------------------- -- -- Structure de la table `forum` -- CREATE TABLE `forum` ( `id_Forum` int(4) NOT NULL, `date_Creation_Forum` date DEFAULT NULL, `titre_Forum` varchar(50) COLLATE utf8_bin DEFAULT NULL, `id_BD` int(6) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; -- -- Déchargement des données de la table `forum` -- INSERT INTO `forum` (`id_Forum`, `date_Creation_Forum`, `titre_Forum`, `id_BD`) VALUES (1, '2018-01-28', 'titre 1', 1), (2, '2018-01-28', 'titre 2', 3), (3, '2018-01-28', 'titre 3', 4), (4, '2018-01-28', 'fffff', 1), (6, '2018-01-28', 'lilo', 2), (7, '2018-01-28', 'prop', 1), (8, '2018-02-20', 'ko', 3), (10, '2018-02-23', 'TT', 9), (11, '2018-02-23', 'Toto', 10), (12, '2018-03-11', 'BD1', 11); -- -------------------------------------------------------- -- -- Structure de la table `genre` -- CREATE TABLE `genre` ( `id_Genre` int(2) NOT NULL, `libelle_Genre` varchar(50) COLLATE utf8_bin NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; -- -- Déchargement des données de la table `genre` -- INSERT INTO `genre` (`id_Genre`, `libelle_Genre`) VALUES (1, 'Policier'), (2, 'Jeunesse'), (3, 'SF'), (4, 'Fantastique'), (5, 'Aventure'), (6, 'Humour'); -- -------------------------------------------------------- -- -- Structure de la table `image` -- CREATE TABLE `image` ( `id_Image` int(4) NOT NULL, `source_Image` varchar(150) COLLATE utf8_bin NOT NULL, `numero_Image` int(3) NOT NULL, `id_Chapitre` int(2) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; -- -- Déchargement des données de la table `image` -- INSERT INTO `image` (`id_Image`, `source_Image`, `numero_Image`, `id_Chapitre`) VALUES (1, 'Narnia.jpg', 1, 15), (2, 'totoro.jpg', 2, 15); -- -------------------------------------------------------- -- -- Structure de la table `langue` -- CREATE TABLE `langue` ( `id_Langue` int(2) NOT NULL, `libelle_Langue` varchar(50) COLLATE utf8_bin NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; -- -- Déchargement des données de la table `langue` -- INSERT INTO `langue` (`id_Langue`, `libelle_Langue`) VALUES (1, 'Français'), (2, 'Anglais'), (3, 'Espagnol'), (4, 'Italien'), (5, 'Chinois'), (6, 'Japonais'); -- -------------------------------------------------------- -- -- Structure de la table `mail` -- CREATE TABLE `mail` ( `id_Mail` int(4) NOT NULL, `objet_Mail` varchar(30) COLLATE utf8_bin DEFAULT NULL, `message_Mail` varchar(4000) COLLATE utf8_bin NOT NULL, `date_Envoi_Mail` date DEFAULT NULL, `statut_Mail` varchar(5) COLLATE utf8_bin DEFAULT NULL, `id_Utilisateur` int(6) NOT NULL, `id_Dest_Utilisateur` int(6) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; -- -- Déchargement des données de la table `mail` -- INSERT INTO `mail` (`id_Mail`, `objet_Mail`, `message_Mail`, `date_Envoi_Mail`, `statut_Mail`, `id_Utilisateur`, `id_Dest_Utilisateur`) VALUES (1, 'objet 1', 'message 1', '2018-01-28', NULL, 1, 2), (2, 'objet 2', 'message 2', '2018-01-28', NULL, 1, 2), (3, 'objet 3', 'message 3', '2018-01-28', NULL, 2, 1), (4, 'objet 4', 'message 4', '2018-01-28', NULL, 2, 1), (5, 'tt', 'tt', NULL, NULL, 3, 2), (6, 'mm', 'Hello', '2018-02-20', '0', 2, 1), (7, 'ee', 'ee', '2018-02-24', '0', 2, 5); -- -------------------------------------------------------- -- -- Structure de la table `modification` -- CREATE TABLE `modification` ( `id_Utilisateur` int(6) NOT NULL, `id_Bulle` int(4) NOT NULL, `date_Modif` date DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; -- -------------------------------------------------------- -- -- Structure de la table `post` -- CREATE TABLE `post` ( `id_Post` int(4) NOT NULL, `message_Post` varchar(4000) COLLATE utf8_bin DEFAULT NULL, `date_Post` date DEFAULT NULL, `heure_Post` date DEFAULT NULL, `id_Utilisateur` int(6) NOT NULL, `id_Forum` int(4) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; -- -- Déchargement des données de la table `post` -- INSERT INTO `post` (`id_Post`, `message_Post`, `date_Post`, `heure_Post`, `id_Utilisateur`, `id_Forum`) VALUES (1, 'message Hello World', '2018-01-28', '2018-01-28', 2, 6), (2, 'Message Hello World', '2018-01-28', '2018-01-28', 2, 6), (3, '', '2018-01-28', '2018-01-28', 2, 7), (4, 'Hello', '2018-01-09', '2018-01-09', 2, 1), (5, 'Hi', NULL, NULL, 2, 2), (6, NULL, NULL, NULL, 2, 3), (7, NULL, NULL, NULL, 2, 4), (8, 'tra', '2018-02-20', NULL, 7, 8), (9, 'tra', '2018-02-20', NULL, 7, 8), (10, 'rr', '2018-02-20', NULL, 7, 8), (11, 'rr', '2018-02-20', NULL, 7, 8), (12, 'rr', '2018-02-20', NULL, 7, 8); -- -------------------------------------------------------- -- -- Structure de la table `traduire` -- CREATE TABLE `traduire` ( `id_Utilisateur` int(6) NOT NULL, `id_BD` int(6) NOT NULL, `date_Debut_Traduire` date DEFAULT NULL, `date_Fin_Traduire` date DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; -- -------------------------------------------------------- -- -- Structure de la table `type_u` -- CREATE TABLE `type_u` ( `id_Utilisateur` int(6) NOT NULL, `id_Type` int(2) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; -- -- Déchargement des données de la table `type_u` -- INSERT INTO `type_u` (`id_Utilisateur`, `id_Type`) VALUES (1, 1), (1, 2), (2, 1), (2, 2), (2, 3), (3, 1), (3, 3), (4, 1), (4, 3), (4, 4), (5, 1), (5, 3), (7, 1), (7, 3), (8, 3); -- -------------------------------------------------------- -- -- Structure de la table `type_utilisateur` -- CREATE TABLE `type_utilisateur` ( `id_Type` int(2) NOT NULL, `libelle_Type` varchar(50) COLLATE utf8_bin NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; -- -- Déchargement des données de la table `type_utilisateur` -- INSERT INTO `type_utilisateur` (`id_Type`, `libelle_Type`) VALUES (1, 'lecteur'), (2, 'administrateur'), (3, 'dessinateur'), (4, 'traducteur'); -- -------------------------------------------------------- -- -- Structure de la table `utilisateur` -- CREATE TABLE `utilisateur` ( `id_Utilisateur` int(6) NOT NULL, `pseudo_Utilisateur` varchar(25) COLLATE utf8_bin NOT NULL, `mdp_Utilisateur` varchar(30) COLLATE utf8_bin NOT NULL, `mail_Utilisateur` varchar(50) COLLATE utf8_bin NOT NULL, `note_Utilisateur` int(2) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; -- -- Déchargement des données de la table `utilisateur` -- INSERT INTO `utilisateur` (`id_Utilisateur`, `pseudo_Utilisateur`, `mdp_Utilisateur`, `mail_Utilisateur`, `note_Utilisateur`) VALUES (1, 'mathi', 'mathi', 'mathi@gmail.com', NULL), (2, 'anna', 'anna', 'anna@gmail.com', NULL), (3, 'toto', 'toto', 'toto@gmail.com', NULL), (4, 'lola', 'lola', 'lola@gmail.com', NULL), (5, 'leo', 'leo', 'leo@gmail.com', NULL), (6, 'test2', 'test2', 'test@test.com', 5), (7, 'marie', 'marie', 'marie@gmail.com', NULL), (8, 'mathis ', 'ma', 'mathis@gmail.com ', NULL); -- -- Index pour les tables déchargées -- -- -- Index pour la table `bd` -- ALTER TABLE `bd` ADD PRIMARY KEY (`id_BD`,`id_Utilisateur`), ADD KEY `id_Utilisateur` (`id_Utilisateur`); -- -- Index pour la table `bd_genre` -- ALTER TABLE `bd_genre` ADD PRIMARY KEY (`id_BD`,`id_Genre`), ADD KEY `id_Genre` (`id_Genre`); -- -- Index pour la table `bd_langue` -- ALTER TABLE `bd_langue` ADD PRIMARY KEY (`id_BD`,`id_Langue`), ADD KEY `id_Langue` (`id_Langue`); -- -- Index pour la table `bulle` -- ALTER TABLE `bulle` ADD PRIMARY KEY (`id_Bulle`,`numero_Bulle`,`id_Image`,`id_Langue`), ADD KEY `id_Image` (`id_Image`), ADD KEY `id_Langue` (`id_Langue`); -- -- Index pour la table `chapitre` -- ALTER TABLE `chapitre` ADD PRIMARY KEY (`id_Chapitre`,`numero_Chapitre`,`id_BD`), ADD KEY `id_BD` (`id_BD`); -- -- Index pour la table `commentaire` -- ALTER TABLE `commentaire` ADD PRIMARY KEY (`id_Commentaire`,`id_Chapitre`,`id_Utilisateur`), ADD KEY `id_Chapitre` (`id_Chapitre`), ADD KEY `id_Utilisateur` (`id_Utilisateur`); -- -- Index pour la table `forum` -- ALTER TABLE `forum` ADD PRIMARY KEY (`id_Forum`,`id_BD`), ADD KEY `id_BD` (`id_BD`); -- -- Index pour la table `genre` -- ALTER TABLE `genre` ADD PRIMARY KEY (`id_Genre`); -- -- Index pour la table `image` -- ALTER TABLE `image` ADD PRIMARY KEY (`id_Image`,`numero_Image`,`id_Chapitre`), ADD KEY `id_Chapitre` (`id_Chapitre`); -- -- Index pour la table `langue` -- ALTER TABLE `langue` ADD PRIMARY KEY (`id_Langue`); -- -- Index pour la table `mail` -- ALTER TABLE `mail` ADD PRIMARY KEY (`id_Mail`,`id_Utilisateur`,`id_Dest_Utilisateur`), ADD KEY `id_Utilisateur` (`id_Utilisateur`), ADD KEY `id_Dest_Utilisateur` (`id_Dest_Utilisateur`); -- -- Index pour la table `modification` -- ALTER TABLE `modification` ADD PRIMARY KEY (`id_Utilisateur`,`id_Bulle`), ADD KEY `id_Bulle` (`id_Bulle`); -- -- Index pour la table `post` -- ALTER TABLE `post` ADD PRIMARY KEY (`id_Post`,`id_Utilisateur`,`id_Forum`), ADD KEY `id_Utilisateur` (`id_Utilisateur`), ADD KEY `id_Forum` (`id_Forum`); -- -- Index pour la table `traduire` -- ALTER TABLE `traduire` ADD PRIMARY KEY (`id_Utilisateur`,`id_BD`), ADD KEY `id_BD` (`id_BD`); -- -- Index pour la table `type_u` -- ALTER TABLE `type_u` ADD PRIMARY KEY (`id_Utilisateur`,`id_Type`), ADD KEY `id_Type` (`id_Type`); -- -- Index pour la table `type_utilisateur` -- ALTER TABLE `type_utilisateur` ADD PRIMARY KEY (`id_Type`); -- -- Index pour la table `utilisateur` -- ALTER TABLE `utilisateur` ADD PRIMARY KEY (`id_Utilisateur`); -- -- AUTO_INCREMENT pour les tables déchargées -- -- -- AUTO_INCREMENT pour la table `bd` -- ALTER TABLE `bd` MODIFY `id_BD` int(6) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=12; -- -- AUTO_INCREMENT pour la table `bulle` -- ALTER TABLE `bulle` MODIFY `id_Bulle` int(4) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT pour la table `chapitre` -- ALTER TABLE `chapitre` MODIFY `id_Chapitre` int(2) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=17; -- -- AUTO_INCREMENT pour la table `commentaire` -- ALTER TABLE `commentaire` MODIFY `id_Commentaire` int(6) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT pour la table `forum` -- ALTER TABLE `forum` MODIFY `id_Forum` int(4) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13; -- -- AUTO_INCREMENT pour la table `genre` -- ALTER TABLE `genre` MODIFY `id_Genre` int(2) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7; -- -- AUTO_INCREMENT pour la table `image` -- ALTER TABLE `image` MODIFY `id_Image` int(4) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; -- -- AUTO_INCREMENT pour la table `langue` -- ALTER TABLE `langue` MODIFY `id_Langue` int(2) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7; -- -- AUTO_INCREMENT pour la table `mail` -- ALTER TABLE `mail` MODIFY `id_Mail` int(4) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8; -- -- AUTO_INCREMENT pour la table `post` -- ALTER TABLE `post` MODIFY `id_Post` int(4) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13; -- -- AUTO_INCREMENT pour la table `type_utilisateur` -- ALTER TABLE `type_utilisateur` MODIFY `id_Type` int(2) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5; -- -- AUTO_INCREMENT pour la table `utilisateur` -- ALTER TABLE `utilisateur` MODIFY `id_Utilisateur` int(6) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9; -- -- Contraintes pour les tables déchargées -- -- -- Contraintes pour la table `bd` -- ALTER TABLE `bd` ADD CONSTRAINT `bd_ibfk_1` FOREIGN KEY (`id_Utilisateur`) REFERENCES `utilisateur` (`id_Utilisateur`); -- -- Contraintes pour la table `bd_genre` -- ALTER TABLE `bd_genre` ADD CONSTRAINT `bd_genre_ibfk_1` FOREIGN KEY (`id_BD`) REFERENCES `bd` (`id_BD`), ADD CONSTRAINT `bd_genre_ibfk_2` FOREIGN KEY (`id_Genre`) REFERENCES `genre` (`id_Genre`); -- -- Contraintes pour la table `bd_langue` -- ALTER TABLE `bd_langue` ADD CONSTRAINT `bd_langue_ibfk_1` FOREIGN KEY (`id_BD`) REFERENCES `bd` (`id_BD`), ADD CONSTRAINT `bd_langue_ibfk_2` FOREIGN KEY (`id_Langue`) REFERENCES `langue` (`id_Langue`); -- -- Contraintes pour la table `bulle` -- ALTER TABLE `bulle` ADD CONSTRAINT `bulle_ibfk_1` FOREIGN KEY (`id_Image`) REFERENCES `image` (`id_Image`), ADD CONSTRAINT `bulle_ibfk_2` FOREIGN KEY (`id_Langue`) REFERENCES `langue` (`id_Langue`); -- -- Contraintes pour la table `chapitre` -- ALTER TABLE `chapitre` ADD CONSTRAINT `chapitre_ibfk_1` FOREIGN KEY (`id_BD`) REFERENCES `bd` (`id_BD`); -- -- Contraintes pour la table `commentaire` -- ALTER TABLE `commentaire` ADD CONSTRAINT `commentaire_ibfk_1` FOREIGN KEY (`id_Chapitre`) REFERENCES `chapitre` (`id_Chapitre`), ADD CONSTRAINT `commentaire_ibfk_2` FOREIGN KEY (`id_Utilisateur`) REFERENCES `utilisateur` (`id_Utilisateur`); -- -- Contraintes pour la table `forum` -- ALTER TABLE `forum` ADD CONSTRAINT `forum_ibfk_1` FOREIGN KEY (`id_BD`) REFERENCES `bd` (`id_BD`); -- -- Contraintes pour la table `image` -- ALTER TABLE `image` ADD CONSTRAINT `image_ibfk_1` FOREIGN KEY (`id_Chapitre`) REFERENCES `chapitre` (`id_Chapitre`); -- -- Contraintes pour la table `mail` -- ALTER TABLE `mail` ADD CONSTRAINT `mail_ibfk_1` FOREIGN KEY (`id_Utilisateur`) REFERENCES `utilisateur` (`id_Utilisateur`), ADD CONSTRAINT `mail_ibfk_2` FOREIGN KEY (`id_Dest_Utilisateur`) REFERENCES `utilisateur` (`id_Utilisateur`); -- -- Contraintes pour la table `modification` -- ALTER TABLE `modification` ADD CONSTRAINT `modification_ibfk_1` FOREIGN KEY (`id_Utilisateur`) REFERENCES `utilisateur` (`id_Utilisateur`), ADD CONSTRAINT `modification_ibfk_2` FOREIGN KEY (`id_Bulle`) REFERENCES `bulle` (`id_Bulle`); -- -- Contraintes pour la table `post` -- ALTER TABLE `post` ADD CONSTRAINT `post_ibfk_1` FOREIGN KEY (`id_Utilisateur`) REFERENCES `utilisateur` (`id_Utilisateur`), ADD CONSTRAINT `post_ibfk_2` FOREIGN KEY (`id_Forum`) REFERENCES `forum` (`id_Forum`); -- -- Contraintes pour la table `traduire` -- ALTER TABLE `traduire` ADD CONSTRAINT `traduire_ibfk_1` FOREIGN KEY (`id_Utilisateur`) REFERENCES `utilisateur` (`id_Utilisateur`), ADD CONSTRAINT `traduire_ibfk_2` FOREIGN KEY (`id_BD`) REFERENCES `bd` (`id_BD`); -- -- Contraintes pour la table `type_u` -- ALTER TABLE `type_u` ADD CONSTRAINT `type_u_ibfk_1` FOREIGN KEY (`id_Utilisateur`) REFERENCES `utilisateur` (`id_Utilisateur`), ADD CONSTRAINT `type_u_ibfk_2` FOREIGN KEY (`id_Type`) REFERENCES `type_utilisateur` (`id_Type`); 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 */;
BEGIN TRANSACTION CREATE TABLE [Avatars] ( [PrincipalID] uniqueidentifier NOT NULL, [Name] varchar(32) NOT NULL, [Value] varchar(255) NOT NULL DEFAULT '', PRIMARY KEY CLUSTERED ( [PrincipalID] ASC, [Name] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ) ON [PRIMARY] COMMIT
CREATE DATABASE IF NOT EXISTS test; USE test; CREATE TABLE IF NOT EXISTS push ( id BIGINT NOT NULL, actor_id BIGINT NOT NULL, actor_login VARBINARY(10000) NOT NULL, repo_id BIGINT NOT NULL, repo_name VARBINARY(10000) NOT NULL, created_at DATETIME NOT NULL, head BINARY(20) NOT NULL, `before` BINARY(20) NOT NULL, size BIGINT, distinct_size BIGINT, created_at_month AS LAST_DAY(created_at) PERSISTED DATE, KEY(created_at_month, repo_name, actor_login, `before`) USING CLUSTERED COLUMNSTORE );
create database db_school; use db_school; create table class( cid int primary key auto_increment, caption char(20) not null ); insert into class (caption) values ('三年二班'), ('一年三班'), ('三年一班') ; create table student( sid int primary key auto_increment, sname char(16) not null , gender enum('男','女') not null default '男', class_id int not null , foreign key (class_id) references class(cid) ); create table teacher( tid int primary key auto_increment, tname char(16) not null ); create table course( cid int primary key auto_increment, cname char(20) not null , teacher_id int not null , foreign key (teacher_id) references teacher(tid) ); create table scoure( sid int primary key auto_increment, student_id int not null , course_id int not null , number int not null , foreign key (student_id) references student(sid), foreign key (course_id) references course(cid) ); insert into student (sname,gender,class_id) values ('钢弹','女',1), ('铁锤','女',1), ('山炮','男',2) ; insert into teacher (tname) values ('剥夺'), ('苍龙'), ('菜刀') ; insert into course (cname, teacher_id) values ('生物',1), ('体育',1), ('物理',2) ; insert into scoure (student_id, course_id, number) values (1,1,60), (1,2,59), (2,2,60), (3,3,60) ;
--Problem 02 OneToMany CREATE TABLE Manufacturers ( ManufacturerID INT NOT NULL ,[Name] CHAR(20) NOT NULL ,EstablishedOn DATETIME ,PRIMARY KEY(ManufacturerID)); CREATE TABLE Models( ModelID INT NOT NULL ,[Name] CHAR(20) ,ManufacturerID INT NOT NULL ,PRIMARY KEY (ModelID)) ALTER TABLE Models ADD CONSTRAINT FK_Models_Manufacturers FOREIGN KEY (ManufacturerID) REFERENCES Manufacturers(ManufacturerID) INSERT INTO Manufacturers(ManufacturerID,[Name],EstablishedOn) VALUES (1,'BMW','07/03/1916') ,(2,'Tesla','01/01/2003') ,(3,'Lada','01/05/1966') INSERT INTO Models(ModelID,[Name],ManufacturerID) VALUES (101 ,'X1',1) ,(102,'i6',1) ,(103,'Model S',2) ,(104,'Model X',2) ,(105,'Model 3',2) ,(106,'Nova',3)
SELECT -- eventID -- eventID includes a reference to the specific animal project and the identifier of the specific animal (id_pk) involved in the capture event 'etn:' || projectcode || ':' || id_pk || ':event-capture' AS eventID, -- occurrenecID -- occurrenceID includes a reference to the specific animal project and the identifier of the specific animal (id_pk) involved in the capture occurrene 'etn:' || projectcode || ':' || id_pk || ':occurrence-capture' AS occurrenceID, measurementType, measurementValue, measurementUnit FROM ( -- Length data SELECT *, length_type::text AS measurementType, length::text AS measurementValue, length_units::text AS measurementUnit FROM vliz.animals_view WHERE length IS NOT NULL UNION ALL -- Length 2 data SELECT *, length2_type::text AS measurementType, length2::text AS measurementValue, length2_units::text AS measurementUnit FROM vliz.animals_view WHERE length2 IS NOT NULL UNION ALL -- Length 3 data SELECT *, length3_type::text AS measurementType, length3::text AS measurementValue, length3_units::text AS measurementUnit FROM vliz.animals_view WHERE length3 IS NOT NULL UNION ALL -- Length 4 data SELECT *, length4_type::text AS measurementType, length4::text AS measurementValue, length4_units::text AS measurementUnit FROM vliz.animals_view WHERE length4 IS NOT NULL UNION ALL -- Weight SELECT *, 'weight'::text AS measurementType, weight::text AS measurementValue, weight_units::text AS measurementUnit FROM vliz.animals_view WHERE weight_units IS NOT NULL UNION ALL -- Life stage SELECT *, 'life stage'::text AS measurementType, life_stage::text AS measurementValue, 'durif life stage'::text AS measurementUnit FROM vliz.animals_view WHERE life_stage IS NOT NULL UNION ALL -- Age SELECT *, 'age'::text AS measurementType, age::text AS measurementValue, age_units::text AS measurementUnit FROM vliz.animals_view WHERE age IS NOT NULL UNION ALL -- Sex SELECT *, 'sex'::text AS measurementType, sex::text AS measurementValue, ''::text AS measurementUnit FROM vliz.animals_view WHERE sex IS NOT NULL UNION ALL -- Origin SELECT *, 'origin'::text AS measurementType, wild_or_hatchery::text AS measurementValue, ''::text AS measurementUnit FROM vliz.animals_view WHERE wild_or_hatchery IS NOT NULL ) AS x WHERE id_pk IN ({animal_ids*}) ORDER BY eventid
-- phpMyAdmin SQL Dump -- version 5.1.0 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Aug 18, 2021 at 03:45 PM -- Server version: 10.4.18-MariaDB -- PHP Version: 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 */; -- -- Database: `odc` -- -- -------------------------------------------------------- -- -- Table structure for table `failed_jobs` -- CREATE TABLE `failed_jobs` ( `id` bigint(20) UNSIGNED NOT NULL, `uuid` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `connection` text COLLATE utf8mb4_unicode_ci NOT NULL, `queue` text COLLATE utf8mb4_unicode_ci NOT NULL, `payload` longtext COLLATE utf8mb4_unicode_ci NOT NULL, `exception` longtext COLLATE utf8mb4_unicode_ci NOT NULL, `failed_at` timestamp NOT NULL DEFAULT current_timestamp() ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `migrations` -- CREATE TABLE `migrations` ( `id` int(10) UNSIGNED NOT NULL, `migration` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `batch` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -- Dumping data for table `migrations` -- INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (1, '2014_10_12_000000_create_users_table', 1), (2, '2014_10_12_100000_create_password_resets_table', 1), (3, '2019_08_19_000000_create_failed_jobs_table', 1), (4, '2019_12_14_000001_create_personal_access_tokens_table', 1), (5, '2021_08_18_090448_create_product_category_table', 2); -- -------------------------------------------------------- -- -- Table structure for table `password_resets` -- CREATE TABLE `password_resets` ( `email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `token` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `created_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `personal_access_tokens` -- CREATE TABLE `personal_access_tokens` ( `id` bigint(20) UNSIGNED NOT NULL, `tokenable_type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `tokenable_id` bigint(20) UNSIGNED NOT NULL, `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `token` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL, `abilities` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, `last_used_at` timestamp NULL DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `products` -- CREATE TABLE `products` ( `id` bigint(20) UNSIGNED NOT NULL, `product_category_id` int(10) UNSIGNED NOT NULL, `name` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL, `image` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `price` int(11) NOT NULL, `tag` varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL, `description` text COLLATE utf8mb4_unicode_ci NOT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -- Dumping data for table `products` -- INSERT INTO `products` (`id`, `product_category_id`, `name`, `image`, `price`, `tag`, `description`, `created_at`, `updated_at`) VALUES (1, 2, 't-shit', 'bg-new-11.jpg', 450, 'addidas', 'Lorem ipsum', '2021-08-18 12:05:24', '2021-08-18 07:49:22'), (2, 1, 'Abbot Franklin', 'bulb.png', 82, 'Culpa ducimus elit', 'Dolores pariatur Ab', '2021-08-18 07:22:39', '2021-08-18 07:22:39'); -- -------------------------------------------------------- -- -- Table structure for table `product_category` -- CREATE TABLE `product_category` ( `id` bigint(20) UNSIGNED NOT NULL, `categoryname` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL, `discount` int(11) NOT NULL, `status` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -- Dumping data for table `product_category` -- INSERT INTO `product_category` (`id`, `categoryname`, `discount`, `status`, `created_at`, `updated_at`) VALUES (1, 'Cloths', 12, 'on', '2021-08-18 04:53:52', '2021-08-18 04:53:52'), (2, 'Toys', 13, 'on', '2021-08-18 04:54:14', '2021-08-18 05:59:56'); -- -------------------------------------------------------- -- -- Table structure for table `users` -- CREATE TABLE `users` ( `id` bigint(20) UNSIGNED NOT NULL, `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `email_verified_at` timestamp NULL DEFAULT NULL, `role_id` tinyint(1) NOT NULL DEFAULT 2, `password` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `remember_token` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -- Dumping data for table `users` -- INSERT INTO `users` (`id`, `name`, `email`, `email_verified_at`, `role_id`, `password`, `remember_token`, `created_at`, `updated_at`) VALUES (1, 'Holmes Juarez', 'minofyr@mailinator.com', NULL, 1, '$2y$10$..toz3JrZXRPbfYeg2as3O/ZZmFI0jGhOMGD5h3bC12pxu0MVftHG', NULL, '2021-08-18 03:28:39', '2021-08-18 03:28:39'), (2, 'Hiram Mcclain', 'bexokywix@mailinator.com', NULL, 2, '$2y$10$Lie2xWyMJH9G8j9x79ovmOYPgzP82/DQ6FlOtsDjs0EgJ3WPiwWJm', NULL, '2021-08-18 03:31:05', '2021-08-18 03:31:05'); -- -- Indexes for dumped tables -- -- -- Indexes for table `failed_jobs` -- ALTER TABLE `failed_jobs` ADD PRIMARY KEY (`id`), ADD UNIQUE KEY `failed_jobs_uuid_unique` (`uuid`); -- -- Indexes for table `migrations` -- ALTER TABLE `migrations` ADD PRIMARY KEY (`id`); -- -- Indexes for table `password_resets` -- ALTER TABLE `password_resets` ADD KEY `password_resets_email_index` (`email`); -- -- Indexes for table `personal_access_tokens` -- ALTER TABLE `personal_access_tokens` ADD PRIMARY KEY (`id`), ADD UNIQUE KEY `personal_access_tokens_token_unique` (`token`), ADD KEY `personal_access_tokens_tokenable_type_tokenable_id_index` (`tokenable_type`,`tokenable_id`); -- -- Indexes for table `products` -- ALTER TABLE `products` ADD PRIMARY KEY (`id`); -- -- Indexes for table `product_category` -- ALTER TABLE `product_category` ADD PRIMARY KEY (`id`); -- -- Indexes for table `users` -- ALTER TABLE `users` ADD PRIMARY KEY (`id`), ADD UNIQUE KEY `users_email_unique` (`email`); -- -- AUTO_INCREMENT for dumped tables -- -- -- AUTO_INCREMENT for table `failed_jobs` -- ALTER TABLE `failed_jobs` MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `migrations` -- ALTER TABLE `migrations` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8; -- -- AUTO_INCREMENT for table `personal_access_tokens` -- ALTER TABLE `personal_access_tokens` MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `products` -- ALTER TABLE `products` MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; -- -- AUTO_INCREMENT for table `product_category` -- ALTER TABLE `product_category` MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; -- -- AUTO_INCREMENT for table `users` -- ALTER TABLE `users` MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; 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 */;
CREATE OR REPLACE PUBLIC SYNONYM gen_all_claim_pkg FOR orient.gen_all_claim_pkg;
DROP DATABASE IF EXISTS `claimsy_dev`; CREATE DATABASE `claimsy_dev`;
-- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 11-12-2019 a las 18:17:02 -- Versión del servidor: 10.1.38-MariaDB -- Versión de PHP: 7.3.3 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 */; -- -- Base de datos: `descuentos` -- CREATE DATABASE IF NOT EXISTS `descuentos` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci; USE `descuentos`; -- -------------------------------------------------------- -- -- Estructura de tabla para la tabla `descuentos` -- CREATE TABLE `descuentos` ( `Id_descuento` int(10) NOT NULL, `Empresa` varchar(120) NOT NULL, `Codigo_descuento` varchar(30) NOT NULL, `Descripcion` varchar(150) NOT NULL, `Fecha_emision` date NOT NULL, `Caducidad` date NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Volcado de datos para la tabla `descuentos` -- INSERT INTO `descuentos` (`Id_descuento`, `Empresa`, `Codigo_descuento`, `Descripcion`, `Fecha_emision`, `Caducidad`) VALUES (1, 'Sony', 'DHT789', '20% descuento en juegos play station', '2019-11-15', '2019-11-30'), (2, 'NETFLIX', 'DSDF433', '1 MES DE PRUEBA GRATIS', '2019-11-28', '2019-12-28'), (3, 'MICROSOFT', 'ASDQ1247', '30% DESCUENTO EN CONSOLAS COMPRANDO 1 JUEGO', '2019-11-28', '2019-12-28'), (4, 'CINEMEX', 'CNMX7848', '1 BOLETO GRATIS A PARTIR DE 1 COMPRA EN TAQUILLA', '2019-11-28', '2019-12-28'), (5, 'DIDI', 'DD472Y', '50% A PARTIR DE LAS 2PM EL DÍA QUE LO USES', '2019-11-25', '2019-11-30'), (6, 'DIDI', 'DDFF3423', '5% DESCUENTO EN ENVIO ', '2019-11-20', '2019-11-30'), (7, 'UBER', 'UBBR4242', '5% DESCUENTO EN PRIMER VIAJE DEL DÍA', '2019-11-20', '2019-11-30'), (8, 'UBER', 'UBBR4242', '10% DESCUENTO EN 1 VIAJE EL FIN DE SEMANA', '2019-11-20', '2019-11-30'), (9, 'SONY', 'PLY323', '30% DESCUENTO EN CONTROLES A PARTIR DE LA SEGUNDA COMPRA', '2019-11-20', '2019-11-30'), (10, 'SONY', 'PLY356', '10% DESCUENTO EN CABLES DE PODER PARA CONSOLAS', '2019-11-20', '2019-11-30'), (11, 'CINEMEX', 'CNMX1231', '5% DESCUENTO EN PALOMITAS MEDIANAS', '2019-11-20', '2019-11-30'), (12, 'MICROSOFT', 'XBX89D', 'GRATIS 1 JUEGO A PARTIR DE LA COMPRA DE 1 CONSOLA', '2019-11-20', '2019-11-30'), (13, 'STEAM', 'STM780', 'GRATIS 1 DLC EN LA COMPRA DE CUALQUIER JUEGO', '2019-11-20', '2019-11-30'), (14, 'STEAM', 'STM744DA', '30% DESCUENTO COMPRANDO CALL OF DUTY', '2019-11-20', '2019-11-30'), (15, 'UBER EATS', 'UBET1234Y', '5% DESCUENTO EN ENVIO', '2019-11-20', '2019-11-30'), (16, 'UBER EATS', 'UBET143E', 'ENVIO GRATIS EN PEDIDOS DE $200 EN ADELANTE', '2019-11-20', '2019-11-30'), (17, 'MCDONALDS', 'MC2342EWQ', '10% DESCUENTO EN TU SEGUNDA HAMBURGUESA GRANDE', '2019-11-20', '2019-11-30'), (18, 'MCDONALDS', 'MC2342EWQ', '1 HAMBURGESA GRATIS EN PEDIDOS DE $10 EN ADELANTE', '2019-11-20', '2019-11-30'), (19, 'BURGUER KING', 'KNG323EW', '1 HELADO GRATIS EN LA COMPRA DE 2 HAMBURGUESAS ', '2019-11-20', '2019-11-30'), (20, 'BURGUER KING', 'KNGD3426', '1 PAY DE QUESO AL COMPRAR UNA HAMBURGUESA GRANDE', '2019-11-20', '2019-11-30'), (21, 'CINEPOLIS', 'CNPER2233', '5% DESCUENT EN COMIDA AL COMPRAR MAS DE 2 ENTRADAS', '2019-11-20', '2019-11-30'), (22, 'CINEPOLIS', 'CNPD8372JH', '1 BOLETO GRATIS A PARTIR DE LA COMPRA DEL SEGUNDO BOLETO', '2019-11-20', '2019-11-30'), (23, 'DIDIFOOD', 'DDFF', '5% DESCUENTO EN ENVIO', '2019-11-20', '2019-11-30'), (24, 'DIDIFOOD', 'DDFF', '5% EN PEDIDOS MAYORES A $100', '2019-11-20', '2019-11-30'), (25, 'CINEMEX', 'ASDAF435', '10% DESCUENTO 1 BOLETO', '2019-11-20', '2019-11-30'); -- -------------------------------------------------------- -- -- Estructura de tabla para la tabla `tiendas` -- CREATE TABLE `tiendas` ( `Id tienda` int(15) NOT NULL, `Nombre` varchar(15) NOT NULL, `Direccion` varchar(30) NOT NULL, `Telefono` varchar(10) NOT NULL, `Correo_electronico` varchar(30) NOT NULL, `Password` varchar(30) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Volcado de datos para la tabla `tiendas` -- INSERT INTO `tiendas` (`Id tienda`, `Nombre`, `Direccion`, `Telefono`, `Correo_electronico`, `Password`) VALUES (1, 'Imprenta sa de ', 'Cll juan aldama 120', '7894561230', 'tienda@hotmail.com', '123456'); -- -------------------------------------------------------- -- -- Estructura de tabla para la tabla `usuarios` -- CREATE TABLE `usuarios` ( `Id_usuario` int(10) NOT NULL, `Nombres` varchar(20) NOT NULL, `Apellidos` varchar(25) NOT NULL, `Correo_electronico` varchar(30) NOT NULL, `Password` varchar(30) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Volcado de datos para la tabla `usuarios` -- INSERT INTO `usuarios` (`Id_usuario`, `Nombres`, `Apellidos`, `Correo_electronico`, `Password`) VALUES (1, 'KEVIN', 'Rojas moncayo', 'kevinrojas06@gmail.com', '123456'), (2, 'Diego', 'Franco', 'diego@gmail.com', '123'), (3, 'Alain', 'Andres', 'alain@hotmail.com', '123456789'); -- -- Índices para tablas volcadas -- -- -- Indices de la tabla `descuentos` -- ALTER TABLE `descuentos` ADD PRIMARY KEY (`Id_descuento`); -- -- Indices de la tabla `tiendas` -- ALTER TABLE `tiendas` ADD PRIMARY KEY (`Id tienda`); -- -- Indices de la tabla `usuarios` -- ALTER TABLE `usuarios` ADD PRIMARY KEY (`Id_usuario`); -- -- AUTO_INCREMENT de las tablas volcadas -- -- -- AUTO_INCREMENT de la tabla `descuentos` -- ALTER TABLE `descuentos` MODIFY `Id_descuento` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=26; -- -- AUTO_INCREMENT de la tabla `tiendas` -- ALTER TABLE `tiendas` MODIFY `Id tienda` int(15) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; -- -- AUTO_INCREMENT de la tabla `usuarios` -- ALTER TABLE `usuarios` MODIFY `Id_usuario` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4; -- -- Base de datos: `particionhorizontal` -- CREATE DATABASE IF NOT EXISTS `particionhorizontal` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci; USE `particionhorizontal`; -- -------------------------------------------------------- -- -- Estructura de tabla para la tabla `datos_soldados` -- CREATE TABLE `datos_soldados` ( `Id` int(10) DEFAULT NULL, `Nombre_y_apellido` varchar(30) DEFAULT NULL, `Batallon` varchar(30) DEFAULT NULL, `Compania` varchar(30) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- -- -- Estructura Stand-in para la vista `particion1` -- (Véase abajo para la vista actual) -- CREATE TABLE `particion1` ( `Id` int(5) ,`Nombre` varchar(15) ,`Raza` varchar(15) ); -- -------------------------------------------------------- -- -- Estructura Stand-in para la vista `particion2` -- (Véase abajo para la vista actual) -- CREATE TABLE `particion2` ( `Id` int(5) ,`Nombre` varchar(15) ,`Raza` varchar(15) ); -- -------------------------------------------------------- -- -- Estructura de tabla para la tabla `veterinaria_sucursal_1` -- CREATE TABLE `veterinaria_sucursal_1` ( `Id` int(5) DEFAULT NULL, `Nombre` varchar(15) DEFAULT NULL, `Raza` varchar(15) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 PARTITION BY RANGE (Id) ( PARTITION grupo1 VALUES LESS THAN (6) ENGINE=InnoDB, PARTITION grupo2 VALUES LESS THAN (11) ENGINE=InnoDB ); -- -- Volcado de datos para la tabla `veterinaria_sucursal_1` -- INSERT INTO `veterinaria_sucursal_1` (`Id`, `Nombre`, `Raza`) VALUES (1, 'Kaiser', 'Pitbull'), (2, 'Simon', 'Schnawser'), (3, 'Bruno', 'Doberman'), (4, 'Gucci', 'Pastor Aleman'), (5, 'Kira', 'Golden Retreave'), (5, 'Goretty', 'Pitbull'), (6, 'Whiskey', 'Pomerania'), (7, 'Channel', 'Pomerania'), (8, 'Zeus', 'Pitbull'), (9, 'Mateo', 'Criollo'), (10, 'Freya', 'Pastor Inglés'); -- -------------------------------------------------------- -- -- Estructura para la vista `particion1` -- DROP TABLE IF EXISTS `particion1`; CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `particion1` AS select `veterinaria_sucursal_1`.`Id` AS `Id`,`veterinaria_sucursal_1`.`Nombre` AS `Nombre`,`veterinaria_sucursal_1`.`Raza` AS `Raza` from `veterinaria_sucursal_1` PARTITION (`grupo1`) ; -- -------------------------------------------------------- -- -- Estructura para la vista `particion2` -- DROP TABLE IF EXISTS `particion2`; CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `particion2` AS select `veterinaria_sucursal_1`.`Id` AS `Id`,`veterinaria_sucursal_1`.`Nombre` AS `Nombre`,`veterinaria_sucursal_1`.`Raza` AS `Raza` from `veterinaria_sucursal_1` PARTITION (`grupo2`) ; -- -- Base de datos: `phpmyadmin` -- CREATE DATABASE IF NOT EXISTS `phpmyadmin` DEFAULT CHARACTER SET utf8 COLLATE utf8_bin; USE `phpmyadmin`; -- -------------------------------------------------------- -- -- Estructura de tabla para la tabla `pma__bookmark` -- CREATE TABLE `pma__bookmark` ( `id` int(11) NOT NULL, `dbase` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT '', `user` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT '', `label` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '', `query` text COLLATE utf8_bin NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Bookmarks'; -- -------------------------------------------------------- -- -- Estructura de tabla para la tabla `pma__central_columns` -- CREATE TABLE `pma__central_columns` ( `db_name` varchar(64) COLLATE utf8_bin NOT NULL, `col_name` varchar(64) COLLATE utf8_bin NOT NULL, `col_type` varchar(64) COLLATE utf8_bin NOT NULL, `col_length` text COLLATE utf8_bin, `col_collation` varchar(64) COLLATE utf8_bin NOT NULL, `col_isNull` tinyint(1) NOT NULL, `col_extra` varchar(255) COLLATE utf8_bin DEFAULT '', `col_default` text COLLATE utf8_bin ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Central list of columns'; -- -------------------------------------------------------- -- -- Estructura de tabla para la tabla `pma__column_info` -- CREATE TABLE `pma__column_info` ( `id` int(5) UNSIGNED NOT NULL, `db_name` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '', `table_name` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '', `column_name` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '', `comment` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '', `mimetype` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '', `transformation` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT '', `transformation_options` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT '', `input_transformation` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT '', `input_transformation_options` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT '' ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Column information for phpMyAdmin'; -- -------------------------------------------------------- -- -- Estructura de tabla para la tabla `pma__designer_settings` -- CREATE TABLE `pma__designer_settings` ( `username` varchar(64) COLLATE utf8_bin NOT NULL, `settings_data` text COLLATE utf8_bin NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Settings related to Designer'; -- -- Volcado de datos para la tabla `pma__designer_settings` -- INSERT INTO `pma__designer_settings` (`username`, `settings_data`) VALUES ('root', '{\"snap_to_grid\":\"off\",\"angular_direct\":\"direct\",\"relation_lines\":\"true\"}'); -- -------------------------------------------------------- -- -- Estructura de tabla para la tabla `pma__export_templates` -- CREATE TABLE `pma__export_templates` ( `id` int(5) UNSIGNED NOT NULL, `username` varchar(64) COLLATE utf8_bin NOT NULL, `export_type` varchar(10) COLLATE utf8_bin NOT NULL, `template_name` varchar(64) COLLATE utf8_bin NOT NULL, `template_data` text COLLATE utf8_bin NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Saved export templates'; -- -------------------------------------------------------- -- -- Estructura de tabla para la tabla `pma__favorite` -- CREATE TABLE `pma__favorite` ( `username` varchar(64) COLLATE utf8_bin NOT NULL, `tables` text COLLATE utf8_bin NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Favorite tables'; -- -------------------------------------------------------- -- -- Estructura de tabla para la tabla `pma__history` -- CREATE TABLE `pma__history` ( `id` bigint(20) UNSIGNED NOT NULL, `username` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '', `db` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '', `table` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '', `timevalue` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `sqlquery` text COLLATE utf8_bin NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='SQL history for phpMyAdmin'; -- -------------------------------------------------------- -- -- Estructura de tabla para la tabla `pma__navigationhiding` -- CREATE TABLE `pma__navigationhiding` ( `username` varchar(64) COLLATE utf8_bin NOT NULL, `item_name` varchar(64) COLLATE utf8_bin NOT NULL, `item_type` varchar(64) COLLATE utf8_bin NOT NULL, `db_name` varchar(64) COLLATE utf8_bin NOT NULL, `table_name` varchar(64) COLLATE utf8_bin NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Hidden items of navigation tree'; -- -------------------------------------------------------- -- -- Estructura de tabla para la tabla `pma__pdf_pages` -- CREATE TABLE `pma__pdf_pages` ( `db_name` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '', `page_nr` int(10) UNSIGNED NOT NULL, `page_descr` varchar(50) CHARACTER SET utf8 NOT NULL DEFAULT '' ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='PDF relation pages for phpMyAdmin'; -- -------------------------------------------------------- -- -- Estructura de tabla para la tabla `pma__recent` -- CREATE TABLE `pma__recent` ( `username` varchar(64) COLLATE utf8_bin NOT NULL, `tables` text COLLATE utf8_bin NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Recently accessed tables'; -- -- Volcado de datos para la tabla `pma__recent` -- INSERT INTO `pma__recent` (`username`, `tables`) VALUES ('root', '[{\"db\":\"red_social\",\"table\":\"usuarios\"},{\"db\":\"descuentos\",\"table\":\"descuentos\"},{\"db\":\"descuentos\",\"table\":\"usuarios\"},{\"db\":\"descuentos\",\"table\":\"tiendas\"},{\"db\":\"descuentos\",\"table\":\"registro usuarios\"},{\"db\":\"descuentos\",\"table\":\"registro tiendas\"},{\"db\":\"descuentos\",\"table\":\"Registro tiendas\"},{\"db\":\"descuentos\",\"table\":\"Registro usuarios\"},{\"db\":\"pruebadb\",\"table\":\"tabla\"},{\"db\":\"particionhorizontal\",\"table\":\"datos_soldados\"}]'); -- -------------------------------------------------------- -- -- Estructura de tabla para la tabla `pma__relation` -- CREATE TABLE `pma__relation` ( `master_db` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '', `master_table` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '', `master_field` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '', `foreign_db` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '', `foreign_table` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '', `foreign_field` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '' ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Relation table'; -- -------------------------------------------------------- -- -- Estructura de tabla para la tabla `pma__savedsearches` -- CREATE TABLE `pma__savedsearches` ( `id` int(5) UNSIGNED NOT NULL, `username` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '', `db_name` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '', `search_name` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '', `search_data` text COLLATE utf8_bin NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Saved searches'; -- -------------------------------------------------------- -- -- Estructura de tabla para la tabla `pma__table_coords` -- CREATE TABLE `pma__table_coords` ( `db_name` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '', `table_name` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '', `pdf_page_number` int(11) NOT NULL DEFAULT '0', `x` float UNSIGNED NOT NULL DEFAULT '0', `y` float UNSIGNED NOT NULL DEFAULT '0' ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Table coordinates for phpMyAdmin PDF output'; -- -------------------------------------------------------- -- -- Estructura de tabla para la tabla `pma__table_info` -- CREATE TABLE `pma__table_info` ( `db_name` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '', `table_name` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '', `display_field` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '' ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Table information for phpMyAdmin'; -- -------------------------------------------------------- -- -- Estructura de tabla para la tabla `pma__table_uiprefs` -- CREATE TABLE `pma__table_uiprefs` ( `username` varchar(64) COLLATE utf8_bin NOT NULL, `db_name` varchar(64) COLLATE utf8_bin NOT NULL, `table_name` varchar(64) COLLATE utf8_bin NOT NULL, `prefs` text COLLATE utf8_bin NOT NULL, `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Tables'' UI preferences'; -- -------------------------------------------------------- -- -- Estructura de tabla para la tabla `pma__tracking` -- CREATE TABLE `pma__tracking` ( `db_name` varchar(64) COLLATE utf8_bin NOT NULL, `table_name` varchar(64) COLLATE utf8_bin NOT NULL, `version` int(10) UNSIGNED NOT NULL, `date_created` datetime NOT NULL, `date_updated` datetime NOT NULL, `schema_snapshot` text COLLATE utf8_bin NOT NULL, `schema_sql` text COLLATE utf8_bin, `data_sql` longtext COLLATE utf8_bin, `tracking` set('UPDATE','REPLACE','INSERT','DELETE','TRUNCATE','CREATE DATABASE','ALTER DATABASE','DROP DATABASE','CREATE TABLE','ALTER TABLE','RENAME TABLE','DROP TABLE','CREATE INDEX','DROP INDEX','CREATE VIEW','ALTER VIEW','DROP VIEW') COLLATE utf8_bin DEFAULT NULL, `tracking_active` int(1) UNSIGNED NOT NULL DEFAULT '1' ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Database changes tracking for phpMyAdmin'; -- -------------------------------------------------------- -- -- Estructura de tabla para la tabla `pma__userconfig` -- CREATE TABLE `pma__userconfig` ( `username` varchar(64) COLLATE utf8_bin NOT NULL, `timevalue` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `config_data` text COLLATE utf8_bin NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='User preferences storage for phpMyAdmin'; -- -- Volcado de datos para la tabla `pma__userconfig` -- INSERT INTO `pma__userconfig` (`username`, `timevalue`, `config_data`) VALUES ('root', '2019-12-11 17:16:45', '{\"lang\":\"es\",\"Console\\/Mode\":\"collapse\",\"FontSize\":\"85%\"}'); -- -------------------------------------------------------- -- -- Estructura de tabla para la tabla `pma__usergroups` -- CREATE TABLE `pma__usergroups` ( `usergroup` varchar(64) COLLATE utf8_bin NOT NULL, `tab` varchar(64) COLLATE utf8_bin NOT NULL, `allowed` enum('Y','N') COLLATE utf8_bin NOT NULL DEFAULT 'N' ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='User groups with configured menu items'; -- -------------------------------------------------------- -- -- Estructura de tabla para la tabla `pma__users` -- CREATE TABLE `pma__users` ( `username` varchar(64) COLLATE utf8_bin NOT NULL, `usergroup` varchar(64) COLLATE utf8_bin NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Users and their assignments to user groups'; -- -- Índices para tablas volcadas -- -- -- Indices de la tabla `pma__bookmark` -- ALTER TABLE `pma__bookmark` ADD PRIMARY KEY (`id`); -- -- Indices de la tabla `pma__central_columns` -- ALTER TABLE `pma__central_columns` ADD PRIMARY KEY (`db_name`,`col_name`); -- -- Indices de la tabla `pma__column_info` -- ALTER TABLE `pma__column_info` ADD PRIMARY KEY (`id`), ADD UNIQUE KEY `db_name` (`db_name`,`table_name`,`column_name`); -- -- Indices de la tabla `pma__designer_settings` -- ALTER TABLE `pma__designer_settings` ADD PRIMARY KEY (`username`); -- -- Indices de la tabla `pma__export_templates` -- ALTER TABLE `pma__export_templates` ADD PRIMARY KEY (`id`), ADD UNIQUE KEY `u_user_type_template` (`username`,`export_type`,`template_name`); -- -- Indices de la tabla `pma__favorite` -- ALTER TABLE `pma__favorite` ADD PRIMARY KEY (`username`); -- -- Indices de la tabla `pma__history` -- ALTER TABLE `pma__history` ADD PRIMARY KEY (`id`), ADD KEY `username` (`username`,`db`,`table`,`timevalue`); -- -- Indices de la tabla `pma__navigationhiding` -- ALTER TABLE `pma__navigationhiding` ADD PRIMARY KEY (`username`,`item_name`,`item_type`,`db_name`,`table_name`); -- -- Indices de la tabla `pma__pdf_pages` -- ALTER TABLE `pma__pdf_pages` ADD PRIMARY KEY (`page_nr`), ADD KEY `db_name` (`db_name`); -- -- Indices de la tabla `pma__recent` -- ALTER TABLE `pma__recent` ADD PRIMARY KEY (`username`); -- -- Indices de la tabla `pma__relation` -- ALTER TABLE `pma__relation` ADD PRIMARY KEY (`master_db`,`master_table`,`master_field`), ADD KEY `foreign_field` (`foreign_db`,`foreign_table`); -- -- Indices de la tabla `pma__savedsearches` -- ALTER TABLE `pma__savedsearches` ADD PRIMARY KEY (`id`), ADD UNIQUE KEY `u_savedsearches_username_dbname` (`username`,`db_name`,`search_name`); -- -- Indices de la tabla `pma__table_coords` -- ALTER TABLE `pma__table_coords` ADD PRIMARY KEY (`db_name`,`table_name`,`pdf_page_number`); -- -- Indices de la tabla `pma__table_info` -- ALTER TABLE `pma__table_info` ADD PRIMARY KEY (`db_name`,`table_name`); -- -- Indices de la tabla `pma__table_uiprefs` -- ALTER TABLE `pma__table_uiprefs` ADD PRIMARY KEY (`username`,`db_name`,`table_name`); -- -- Indices de la tabla `pma__tracking` -- ALTER TABLE `pma__tracking` ADD PRIMARY KEY (`db_name`,`table_name`,`version`); -- -- Indices de la tabla `pma__userconfig` -- ALTER TABLE `pma__userconfig` ADD PRIMARY KEY (`username`); -- -- Indices de la tabla `pma__usergroups` -- ALTER TABLE `pma__usergroups` ADD PRIMARY KEY (`usergroup`,`tab`,`allowed`); -- -- Indices de la tabla `pma__users` -- ALTER TABLE `pma__users` ADD PRIMARY KEY (`username`,`usergroup`); -- -- AUTO_INCREMENT de las tablas volcadas -- -- -- AUTO_INCREMENT de la tabla `pma__bookmark` -- ALTER TABLE `pma__bookmark` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT de la tabla `pma__column_info` -- ALTER TABLE `pma__column_info` MODIFY `id` int(5) UNSIGNED NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT de la tabla `pma__export_templates` -- ALTER TABLE `pma__export_templates` MODIFY `id` int(5) UNSIGNED NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT de la tabla `pma__history` -- ALTER TABLE `pma__history` MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT de la tabla `pma__pdf_pages` -- ALTER TABLE `pma__pdf_pages` MODIFY `page_nr` int(10) UNSIGNED NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT de la tabla `pma__savedsearches` -- ALTER TABLE `pma__savedsearches` MODIFY `id` int(5) UNSIGNED NOT NULL AUTO_INCREMENT; -- -- Base de datos: `pruebadb` -- CREATE DATABASE IF NOT EXISTS `pruebadb` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci; USE `pruebadb`; -- -------------------------------------------------------- -- -- Estructura de tabla para la tabla `tabla` -- CREATE TABLE `tabla` ( `clave` varchar(10) NOT NULL, `nombre` varchar(25) NOT NULL, `direccion` varchar(35) NOT NULL, `telefono` varchar(10) NOT NULL, `carrera` varchar(40) NOT NULL, `semestre` int(2) NOT NULL, `edad` int(2) NOT NULL, `cp` int(10) NOT NULL, `calificacion` int(2) NOT NULL, `materia` varchar(30) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -- Volcado de datos para la tabla `tabla` -- INSERT INTO `tabla` (`clave`, `nombre`, `direccion`, `telefono`, `carrera`, `semestre`, `edad`, `cp`, `calificacion`, `materia`) VALUES ('001', 'Kevin Rojas', 'Camino real metepec 120', '1230546789', 'Ingenieria sistemas', 7, 26, 0, 9, 'Bases de datos distribuidas'), ('12345', 'KEVIN ROJAS', 'CAMINO REAL A METEPEC 120', '1234567890', 'INGENIERIA SISTEMAS', 7, 26, 0, 8, 'FISICA'), ('12345', 'KEVIN ROJAS', 'CAMINO REAL A METEPEC 120', '1234567890', 'INGENIERIA SISTEMAS', 7, 26, 0, 8, 'FISICA'), ('656', 'GHGHVHVH', 'HFGH', 'GFGFUGFU', 'GCGVH', 4, 45, 0, 7, 'FDFGF'), ('656', 'GHGHVHVH', 'HFGH', 'GFGFUGFU', 'GCGVH', 4, 45, 0, 7, 'FDFGF'), ('', '', '', '', '', 0, 0, 0, 0, ''); -- -- Base de datos: `red_social` -- CREATE DATABASE IF NOT EXISTS `red_social` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci; USE `red_social`; -- -------------------------------------------------------- -- -- Estructura de tabla para la tabla `usuarios` -- CREATE TABLE `usuarios` ( `Id_usuario` int(11) NOT NULL, `Nombres` varchar(20) DEFAULT NULL, `Primer_apellido` varchar(15) DEFAULT NULL, `Segundo_apellido` varchar(15) DEFAULT NULL, `Direccion` varchar(150) DEFAULT NULL, `Telefono` varchar(10) DEFAULT NULL, `Correo` varchar(30) DEFAULT NULL, `Password` varchar(8) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Volcado de datos para la tabla `usuarios` -- INSERT INTO `usuarios` (`Id_usuario`, `Nombres`, `Primer_apellido`, `Segundo_apellido`, `Direccion`, `Telefono`, `Correo`, `Password`) VALUES (1, 'Kevin Andres', 'Rojas', 'Moncayo', 'Camino Real a Metepec 120-16, Col. El hípico', '7894561230', 'kevinrojas06@gmail.com', '789456'), (2, 'Diego ', 'Vidal', 'Apolonio', 'Pino Suarez 45', '01122587', 'diegoapolonio@gmail.com', '12844'), (3, 'Diego', 'Franco', 'Morales', 'Ignacio Comonfot 16', '7854102364', 'diego@gmail.com', '4568987'), (4, 'Maria Paula', 'Llanos ', 'Devia', 'Melchor muzquiz 500 int. 7', '0231458710', 'paula14@gmail.com', '012547'), (5, 'Jennifer', 'Morales', 'Aroca', 'Pino Suarez 34', '1254000014', 'jennifer@outlook.com', '12365784'); -- -- Índices para tablas volcadas -- -- -- Indices de la tabla `usuarios` -- ALTER TABLE `usuarios` ADD PRIMARY KEY (`Id_usuario`); -- -- AUTO_INCREMENT de las tablas volcadas -- -- -- AUTO_INCREMENT de la tabla `usuarios` -- ALTER TABLE `usuarios` MODIFY `Id_usuario` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6; -- -- Base de datos: `test` -- CREATE DATABASE IF NOT EXISTS `test` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci; USE `test`; 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 cities
select avg("replacementCost") as "average replacement cost" from "films";
SELECT deptno, empno, ename FROM employees WHERE deptno =10 OR deptno =20 intersect SELECT deptno, empno, ename FROM employees WHERE deptno =30 OR deptno =20 /
SPOOL INSTALL.LOG ALTER SESSION SET "_oracle_script"=true; DEFINE USER_NAME = &&1 DEFINE LOCATION = &&2 PROMPT Calling script create_tablespaces @create_tablespaces &&USER_NAME &&LOCATION PROMPT Calling script create_schema @create_schema &&USER_NAME PROMPT Calling script privilege_schema @privilege_schema &&USER_NAME SPOOL OFF
-- phpMyAdmin SQL Dump -- version 4.6.6 -- https://www.phpmyadmin.net/ -- -- Client : localhost:3306 -- Généré le : Lun 10 Septembre 2018 à 14:14 -- Version du serveur : 5.5.60-MariaDB -- Version de PHP : 5.6.30 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 */; -- -- Base de données : `es15o_home_bd5` -- -- -------------------------------------------------------- -- -- Structure de la table `admins` -- CREATE TABLE `admins` ( `id` int(10) UNSIGNED NOT NULL, `email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `password` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `remember_token` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -- Contenu de la table `admins` -- INSERT INTO `admins` (`id`, `email`, `password`, `remember_token`, `created_at`, `updated_at`) VALUES (1, 'teck@easywebmobile.fr', '$2y$10$QV/6fsI0EN1PM9lJYfxKk.Xp8NR6hQVRaobpeopgYsn.KhT73cgKW', '03Z9KGN4BcWrS0AaqVmxxzzSBcKKzFATrke0J2OJXXSFPOOulPz8Ns6GSZpY', '2018-07-08 12:08:39', '2018-07-08 12:08:39'); -- -------------------------------------------------------- -- -- Structure de la table `annonces` -- CREATE TABLE `annonces` ( `id` int(10) UNSIGNED NOT NULL, `categorie_id` int(11) NOT NULL, `titre` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `description` text COLLATE utf8mb4_unicode_ci NOT NULL, `image` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `prix` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `residence` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `genre` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `age` int(11) DEFAULT NULL, `type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, `user_id` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -- Contenu de la table `annonces` -- INSERT INTO `annonces` (`id`, `categorie_id`, `titre`, `description`, `image`, `prix`, `residence`, `genre`, `age`, `type`, `created_at`, `updated_at`, `user_id`) VALUES (5, 4, 'Annonce event', 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod\ntempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,\nquis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo\nconsequat. Duis aute irure dolor in reprehenderit in voluptate velit esse', '1532102640_annonce.jpg', '500', 'Calmeilles', '', 200, 'o', '2018-07-20 14:04:00', '2018-07-20 14:04:00', NULL), (2, 6, 'Annonce 2', 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod\r\ntempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,\r\nquis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo\r\nconsequat. Duis aute irure dolor in reprehenderit in voluptate velit esse\r\ncillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non\r\nproident, sunt in culpa qui officia deserunt mollit anim id est laborum.', '1532090428_annonce.png', '5', 'Perpignan', '', 3, 'o', '2018-07-20 10:40:28', '2018-07-20 10:40:28', NULL), (3, 3, 'Annonce 3', 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod\r\ntempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,\r\nquis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo\r\nconsequat. Duis aute irure dolor in reprehenderit in voluptate velit esse\r\ncillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non\r\nproident, sunt in culpa qui officia deserunt mollit anim id est laborum.', '1532090463_annonce.jpg', '50', 'Perpignan', '', 25, 'o', '2018-07-20 10:41:03', '2018-07-20 10:41:03', NULL), (4, 1, 'Annonce informations', 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod\r\ntempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,\r\nquis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo\r\nconsequat. Duis aute irure dolor in reprehenderit in voluptate velit esse\r\ncillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non\r\nproident, sunt in culpa qui officia deserunt mollit anim id est laborum.', '1532090702_annonce.png', '25', 'Saint-Laurent-de-la-Salanque', '', 2, 'o', '2018-07-20 10:45:02', '2018-07-20 10:45:02', NULL), (8, 6, 'Titre annonces', 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod\ntempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,\nquis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo\nconsequat. Duis aute irure dolor in reprehenderit in voluptate velit esse', 'image_463215.png', '99', NULL, NULL, NULL, 'r', '2018-08-02 13:41:34', '2018-08-02 13:41:34', NULL), (11, 5, 'Mon annonce', 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod\ntempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,\nquis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo\nconsequat. Duis aute irure dolor in reprehenderit in voluptate velit esse', '1533283389_annonce.jpg', '88', NULL, NULL, NULL, 'r', '2018-08-03 06:03:10', '2018-08-03 06:03:10', 2), (12, 7, 'Annonce essai', 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod\ntempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,\nquis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo\nconsequat. Duis aute irure dolor in reprehenderit in voluptate velit esse', '1533283515_annonce.jpg', '8864', NULL, NULL, NULL, 'r', '2018-08-03 06:05:16', '2018-08-03 06:05:16', 2), (19, 6, 'Test luc', 'Description restaurant', '1534498118_annonce.jpg', '8000', NULL, NULL, NULL, 'r', '2018-08-17 07:28:38', '2018-08-17 07:28:38', 1); -- -------------------------------------------------------- -- -- Structure de la table `categories` -- CREATE TABLE `categories` ( `id` int(10) UNSIGNED NOT NULL, `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -- Contenu de la table `categories` -- INSERT INTO `categories` (`id`, `name`, `created_at`, `updated_at`) VALUES (1, 'Information', '2018-07-20 09:12:14', '2018-07-20 09:12:14'), (2, 'Market place', '2018-07-20 09:12:18', '2018-07-20 09:12:18'), (3, 'Service', '2018-07-20 09:12:21', '2018-07-20 09:12:21'), (4, 'Event', '2018-07-19 21:00:00', '2018-07-19 21:00:00'), (5, 'Real estate', '2018-07-19 21:00:00', '2018-07-19 21:00:00'), (6, 'Restaurant', '2018-07-19 21:00:00', '2018-07-19 21:00:00'), (7, 'Motorbike', '2018-07-19 21:00:00', '2018-07-19 21:00:00'), (8, 'All', '2018-07-19 21:00:00', '2018-07-19 21:00:00'), (9, 'Food', '2018-08-28 17:50:06', '2018-08-28 17:50:06'); -- -------------------------------------------------------- -- -- Structure de la table `contenu` -- CREATE TABLE `contenu` ( `id` int(11) NOT NULL, `titre` varchar(255) NOT NULL, `content` text NOT NULL, `categorie` varchar(255) NOT NULL, `created_at` datetime DEFAULT NULL, `updated_at` datetime DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -- -- Contenu de la table `contenu` -- INSERT INTO `contenu` (`id`, `titre`, `content`, `categorie`, `created_at`, `updated_at`) VALUES (1, 'Terms & conditions', '<h1 style=\"text-align: center;\">Terms &amp; conditions</h1>\r\n<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Assumenda culpa cum dolorem doloribus facilis harum incidunt ipsum maiores maxime modi molestias nisi, praesentium rerum totam veritatis? Error fugit temporibus voluptate?</p>\r\n<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Assumenda culpa cum dolorem doloribus facilis harum incidunt ipsum maiores maxime modi molestias nisi, praesentium rerum totam veritatis? Error fugit temporibus voluptate?</p>', 'page', NULL, '2018-07-29 09:22:31'); -- -------------------------------------------------------- -- -- Structure de la table `likes` -- CREATE TABLE `likes` ( `id` int(10) UNSIGNED NOT NULL, `annonce_id` int(11) NOT NULL, `membre_id` int(11) DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -- Contenu de la table `likes` -- INSERT INTO `likes` (`id`, `annonce_id`, `membre_id`, `created_at`, `updated_at`) VALUES (2, 2, 2, NULL, NULL), (3, 3, 2, NULL, NULL); -- -------------------------------------------------------- -- -- Structure de la table `membres` -- CREATE TABLE `membres` ( `id` int(10) UNSIGNED NOT NULL, `username` varchar(250) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `password` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `nom` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `prenom` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `birthday` date DEFAULT NULL, `sex` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `pseudo` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `phone` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `email` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `salt` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `residence_id` int(11) DEFAULT NULL, `remember_token` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, `role` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL, `complete` int(1) NOT NULL DEFAULT '0' ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -- Contenu de la table `membres` -- INSERT INTO `membres` (`id`, `username`, `password`, `nom`, `prenom`, `birthday`, `sex`, `pseudo`, `phone`, `email`, `salt`, `residence_id`, `remember_token`, `created_at`, `updated_at`, `role`, `complete`) VALUES (1, 'luc', '$2y$10$0WNjc6xtemOnWzh7llMGbu3D6G8jIEglJuCCkqdNEjP25Fzhkxo5m', 'Resident', 'Test', '1990-09-17', 'Male', 'Luc', '06261234', 'luc@easywebmobile.fr', 'b2hvbWU=', NULL, NULL, '2018-07-20 06:09:54', '2018-07-20 06:09:54', 'resident', 1), (2, 'test2', '$2y$10$fYuhjej/Brwba6yUP7ops.U/QCzhSSrsfSPT8QOe3V0Y3kD1rT9kK', 'Test', 'Prénom', NULL, 'Male', 'Ttttttyyt', '6546810004', 'test2@easywebmobile.fr', 'b2hvbWU=', NULL, NULL, '2018-07-20 06:10:10', '2018-08-24 09:54:42', 'resident', 1), (4, 'test-r', '$2y$10$ZijBvH1UTW8LhbrP3RO.t.5CAXuedPwFPmMpB5/S.G/zkiPETZ9Jm', 'Last testr', 'testr', '2018-08-24', 'Male', 'B', '8899', 'Testr@gmail.com', 'b2hvbWU=', 3, NULL, '2018-08-23 06:25:52', '2018-08-24 05:44:55', 'resident', 1), (5, 'test-r1', '$2y$10$f5moKuhqAel2da..SpJgYO2z2id7FqTwWFBHPRQ.A6RlDumYoottK', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'cmppanozbmk=', 1, NULL, '2018-08-23 06:26:00', '2018-08-23 06:26:00', 'resident', 0); -- -------------------------------------------------------- -- -- Structure de la table `migrations` -- CREATE TABLE `migrations` ( `id` int(10) UNSIGNED NOT NULL, `migration` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `batch` int(11) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -- Contenu de la table `migrations` -- INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (1, '2018_06_29_145053_create_users_table', 1), (2, '2018_06_29_150206_create_admins_table', 1); -- -------------------------------------------------------- -- -- Structure de la table `partenaires` -- CREATE TABLE `partenaires` ( `id` int(10) UNSIGNED NOT NULL, `username` varchar(250) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `password` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `nom` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `prenom` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `birthday` date DEFAULT NULL, `sex` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `pseudo` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `phone` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `salt` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `residence_id` int(11) DEFAULT NULL, `remember_token` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -- Contenu de la table `partenaires` -- INSERT INTO `partenaires` (`id`, `username`, `password`, `nom`, `prenom`, `birthday`, `sex`, `pseudo`, `phone`, `email`, `salt`, `residence_id`, `remember_token`, `created_at`, `updated_at`) VALUES (1, NULL, '$2y$10$XQf0M6FjROGXHtJt0jsEK.dis8HpzVrbXBsX6HGDeGfv/RH6bz/0C', 'Partenaire', 'Testeur', NULL, NULL, NULL, NULL, 'partenaire@gmail.com', 'a3E5MHd2YXE=', NULL, NULL, '2018-07-20 05:38:32', '2018-07-20 05:38:32'); -- -------------------------------------------------------- -- -- Structure de la table `residence` -- CREATE TABLE `residence` ( `id` int(10) UNSIGNED NOT NULL, `numero` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `nom` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `nom_ref` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `prenom_ref` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `email` varchar(250) COLLATE utf8mb4_unicode_ci NOT NULL, `adresse` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `code_postal` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `ville` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `tel` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `nb_partenaire` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `nb_resident` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `actif` tinyint(1) DEFAULT '1', `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, `syndic_id` int(11) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -- Contenu de la table `residence` -- INSERT INTO `residence` (`id`, `numero`, `nom`, `nom_ref`, `prenom_ref`, `email`, `adresse`, `code_postal`, `ville`, `tel`, `nb_partenaire`, `nb_resident`, `actif`, `created_at`, `updated_at`, `syndic_id`) VALUES (1, '1321', 'Résidence test', 'web', 'easy', 'residence@test.com', 'TEST', '66400', 'Calmeilles', '0654651321', '5', '5', 1, '2018-07-19 06:56:29', '2018-07-19 06:56:29', 1), (2, '123456', 'Test', 'Nom', 'prenom', 'test3@easywebmobile.fr', 'Adresse test', '96000', 'Perpignan', '1321', '5', '2', 1, '2018-07-25 05:11:20', '2018-07-25 05:11:20', 1), (3, '79800', 'Ma résidence', 'Easy', 'Easywebmobile', 'luc@easywebmobile.fr', 'adresse test', '95200', 'Paris', '65621', '2', '2', 1, '2018-08-06 11:33:30', '2018-08-06 11:52:14', 2); -- -------------------------------------------------------- -- -- Structure de la table `residents` -- CREATE TABLE `residents` ( `id` int(10) UNSIGNED NOT NULL, `username` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `password` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `nom` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `prenom` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `birthday` date DEFAULT NULL, `sex` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `pseudo` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `phone` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `salt` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `complete` tinyint(1) NOT NULL DEFAULT '0', `remember_token` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, `residence_id` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -- Contenu de la table `residents` -- INSERT INTO `residents` (`id`, `username`, `password`, `nom`, `prenom`, `birthday`, `sex`, `pseudo`, `phone`, `email`, `salt`, `complete`, `remember_token`, `created_at`, `updated_at`, `residence_id`) VALUES (1, NULL, '$2y$10$XUyC5aHHyabwadT16caWEOremfsoe4cLouSK1gQ/LpfWIoYz7gp5e', 'Ohome last', 'Ohome first', '1990-07-13', 'Male', 'Ohome pseudo', '6632258', 'test2@easywebmobile.fr', 'b2hvbWU=', 1, NULL, NULL, '2018-07-13 06:37:07', NULL), (2, NULL, '$2y$10$2OBl0Goqc4Dxt//Kh/Lovej0H5L5uW8un/b2d/dzryrdR.FHEyLXC', 'A', 'A', '2018-07-15', 'Male', 'A', '0894315846', 'A', 'MTIz', 1, NULL, '2018-07-13 11:29:40', '2018-07-15 07:22:24', NULL), (3, NULL, '$2y$10$qtVRb1lBQR19t8sbVKMS6Og0NpyXq0DpYCvKGgGZhLwEVkQ3dSm1O', NULL, NULL, NULL, NULL, NULL, NULL, 'b', 'dGpuajZtMjM=', 0, NULL, '2018-07-15 09:26:47', '2018-07-15 09:26:47', NULL), (4, NULL, '$2y$10$XUyC5aHHyabwadT16caWEOremfsoe4cLouSK1gQ/LpfWIoYz7gp5e', 'p', 'noel', '2018-07-12', 'Male', 'nightley', '0638506283', 'easywebmobile', 'b2hvbWU=', 1, NULL, '2018-07-23 05:13:31', '2018-07-23 05:42:06', NULL); -- -------------------------------------------------------- -- -- Structure de la table `users` -- CREATE TABLE `users` ( `id` int(10) UNSIGNED NOT NULL, `username` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `password` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `remember_token` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, `salt` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -- Contenu de la table `users` -- INSERT INTO `users` (`id`, `username`, `email`, `password`, `remember_token`, `created_at`, `updated_at`, `salt`) VALUES (1, 'syndic', 'test@gmail.com', '$2y$10$FIK3UHAKUj9LSLNodWFYp.LjGq/Fw6Orl/FWtWV9AAaj5Dp4WjmM2', '7c9rUr6XAO7U8g7NMq5YrBQNwweqDtCiDfZi3vciE9jakEcrvyGdafaZxZWp', '2018-07-19 11:20:59', '2018-08-06 13:16:24', 'a3NqYXlsNTI='), (2, 'easyweb', 'syndic@easywebmobile.fr', '$2y$10$HFFmKszIxwa8FyAr0wWd/O0SPDpsiCofrhib5MqZjVyJdFvwjKXBK', 'UucJKwJC1rsfjnjOVWhCMRV7UNAViGly0YQC9vCMBwC1rwd5BDL9PmeE7imu', '2018-07-25 04:30:52', '2018-08-06 13:18:09', 'MWgxNDdscDI='); -- -- Index pour les tables exportées -- -- -- Index pour la table `admins` -- ALTER TABLE `admins` ADD PRIMARY KEY (`id`); -- -- Index pour la table `annonces` -- ALTER TABLE `annonces` ADD PRIMARY KEY (`id`); -- -- Index pour la table `categories` -- ALTER TABLE `categories` ADD PRIMARY KEY (`id`); -- -- Index pour la table `contenu` -- ALTER TABLE `contenu` ADD PRIMARY KEY (`id`); -- -- Index pour la table `likes` -- ALTER TABLE `likes` ADD PRIMARY KEY (`id`); -- -- Index pour la table `membres` -- ALTER TABLE `membres` ADD PRIMARY KEY (`id`), ADD UNIQUE KEY `residents_username_unique` (`username`); -- -- Index pour la table `migrations` -- ALTER TABLE `migrations` ADD PRIMARY KEY (`id`); -- -- Index pour la table `partenaires` -- ALTER TABLE `partenaires` ADD PRIMARY KEY (`id`), ADD UNIQUE KEY `partenaires_username_unique` (`username`); -- -- Index pour la table `residence` -- ALTER TABLE `residence` ADD PRIMARY KEY (`id`), ADD UNIQUE KEY `residence_email_unique` (`email`); -- -- Index pour la table `residents` -- ALTER TABLE `residents` ADD PRIMARY KEY (`id`); -- -- Index pour la table `users` -- ALTER TABLE `users` ADD PRIMARY KEY (`id`); -- -- AUTO_INCREMENT pour les tables exportées -- -- -- AUTO_INCREMENT pour la table `admins` -- ALTER TABLE `admins` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; -- -- AUTO_INCREMENT pour la table `annonces` -- ALTER TABLE `annonces` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=25; -- -- AUTO_INCREMENT pour la table `categories` -- ALTER TABLE `categories` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10; -- -- AUTO_INCREMENT pour la table `contenu` -- ALTER TABLE `contenu` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; -- -- AUTO_INCREMENT pour la table `likes` -- ALTER TABLE `likes` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4; -- -- AUTO_INCREMENT pour la table `membres` -- ALTER TABLE `membres` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6; -- -- AUTO_INCREMENT pour la table `migrations` -- ALTER TABLE `migrations` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; -- -- AUTO_INCREMENT pour la table `partenaires` -- ALTER TABLE `partenaires` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; -- -- AUTO_INCREMENT pour la table `residence` -- ALTER TABLE `residence` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4; -- -- AUTO_INCREMENT pour la table `residents` -- ALTER TABLE `residents` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5; -- -- AUTO_INCREMENT pour la table `users` -- ALTER TABLE `users` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
insert into users values ('mc@gmail.com','Michael Choi','abcd','Edmonton','M'); insert into users values ('tedwalsh@td.com','Ted Walsh','7632','Calgary','M'); insert into users values ('hm@mah.com','Harry Mah','1453','Waterloo, ON','M'); insert into users values ('ks@gmail.com','Kaitlyn Scott','pqwe','Toronto, ON','F'); insert into users values ('angels@gmail.com','Angel Silverman','anlo','Edmonton','F'); insert into users values ('mk@abc.com','Maximillion Kung','0931','Burnaby, BY','F'); insert into users values ('davood@gmail.com','Davood Rafiei','1234','Edmonton','M'); insert into users values ('amr@yahoo.ca','Amir Salimi','123445','Edmonton','O'); insert into users values ('amrv2@yahoo.ca','Amir Salimi','123445','Edmonton','O'); insert into users values ('chomsky@mit.edu','Noam chomsky','420420','MIT','N'); insert into users values ('chm@gmail.com','Angela Chomsky','1843','Toronto','F'); insert into users values ('j.chomsky.a@gmail.com','Janet','h7np','Calgary','F'); insert into users values ('johnChoMskY@gmail.com','John','7538','MIT','M'); insert into products values ('N01', 'Nikon F100'); insert into products values ('N02', 'Nikon D3500'); insert into products values ('B01', 'BMW M8'); insert into products values ('PS01', 'ps4xbox'); insert into products values ('PS02', 'ps4xbox'); insert into products values ('P01', 'Porsche 91'); insert into products values ('P02', 'Porsche 98'); insert into products values ('K01', 'kettle'); insert into products values ('K02', 'kettle2'); insert into products values ('K03', 'kettle sold as item only'); insert into sales values ('S01', 'mc@gmail.com', 'N01', datetime('now','-365 days'), 'ticket ps4', 'Mint', 1400); insert into sales values ('S02', 'mc@gmail.com', 'N02', datetime('now','-730 days'), 'xbox Voucher', 'Used', 698); insert into sales values ('S03', 'hm@mah.com', 'N02', datetime('now','+3 days'), ' xxboxx x', 'New', 10); insert into sales values ('S04', 'ks@gmail.com', 'P01', datetime('now','-1 days'), 'tick ps4', 'ticket', 3000); insert into sales values ('S042', 'ks@gmail.com', 'P01', datetime('now','-1 days'), 'vouch xBoX', 'ticket', 3000); insert into sales values ('S041', 'ks@gmail.com', 'P01', datetime('now','+4 days'), 'vouch', 'voucher', 3000); insert into sales values ('S05', 'angels@gmail.com', 'N02', datetime('now'), 'ticket', 'very old', 30); insert into sales values ('S051', 'angels@gmail.com', 'N02', datetime('now','+3 days','-10 minute'), 'ticket', 'very old', 30); insert into sales values ('S052', 'angels@gmail.com', 'N02',datetime('now','+3 days','+10 minute'), 'ticket', 'very old', 30); insert into sales values ('S06', 'davood@gmail.com', 'B01', datetime('now','+1 days','+6 hour','1 minute'), 'voucher', 'useful voucher', 424); insert into sales values ('S07', 'davood@gmail.com', 'PS01', datetime('now','+100 days','-6 hour','-10 minute'), 'ps4 xbox', 'old console', 424); insert into sales values ('S08', 'ks@gmail.com', 'PS01', datetime('now','-100 days'), 'PS4 xbox', 'mint', 10000); insert into sales values ('S09', 'chomsky@mit.edu', 'K01', datetime('now','+100 days','-1 hour','-11 minute'), 'ok kettle', 'new', 1); insert into sales values ('S091', 'chomsky@mit.edu', 'K01', datetime('now','-100 days', '+2 hour','+41 minute'), 'good kettle', 'new', 2); insert into sales values ('S092', 'davood@gmail.com', 'N01', datetime('now','+100 days'), 'great camera', 'new', 3); insert into sales values ('S093', 'davood@gmail.com', 'K02', datetime('now','+300 days'), 'a kettle', 'new', 100); insert into sales values ('S094', 'ks@gmail.com', 'K02', datetime('now','+200 days'), 'a kettle', 'used', 100); insert into sales values ('S010', 'amrv2@yahoo.ca', 'PS02', datetime('now','+300 days'), 'lorum ipsum', 'new', 100); insert into sales values ('S011', 'hm@mah.com', 'B01', datetime('now','+300 days'), 'a device!', 'new', 600); insert into sales values ('S012', 'hm@mah.com', 'P01', datetime('now','+300 days'), 'another device!', 'used', 223); insert into sales values ('S081', 'ks@gmail.com', 'PS01', datetime('now','+100 days'), 'PS4 xbox xbox xxxboxxx', 'mint', 1000); insert into bids values ('B01', 'hm@mah.com', 'S01', '2016-04-01', 1405.02); insert into bids values ('B02', 'ks@gmail.com', 'S01', '2016-04-02', 1407.99); insert into bids values ('B03', 'hm@mah.com', 'S02', '2018-09-11', 299); insert into bids values ('B04', 'davood@gmail.com', 'S02', '2018-09-12', 999); insert into bids values ('B05', 'angels@gmail.com', 'S03', '2016-01-03', 499); insert into bids values ('B051', 'ks@gmail.com', 'S03', '2017-01-03', 523); insert into bids values ('B052', 'angels@gmail.com', 'S03', '2017-01-05', 529); insert into bids values ('B06', 'tedwalsh@td.com', 'S04', '2019-05-19', 3000); insert into bids values ('B07', 'ks@gmail.com', 'S04', '2019-05-20', 4000); insert into bids values ('B08', 'ks@gmail.com', 'S04', '2019-05-21', 100); insert into bids values ('B09', 'tedwalsh@td.com', 'S04', '2019-06-22', 101); insert into bids values ('B091', 'tedwalsh@td.com', 'S042', '2019-06-22', 8001); insert into bids values ('B101', 'angels@gmail.com', 'S06', '2020-01-0', 421); insert into bids values ('B102', 'angels@gmail.com', 'S06', '2020-01-07', 422); insert into bids values ('B103', 'angels@gmail.com', 'S06', '2020-01-07', 424); insert into bids values ('B11', 'amr@yahoo.ca', 'S07', '2018-09-12', 25); insert into bids values ('B111', 'amr@yahoo.ca', 'S08', '2018-09-12', 50); INSERT INTO "reviews" VALUES ('mc@gmail.com', 'tedwalsh@td.com', 3.9, 'great guy!', '2016-05-02'); INSERT INTO "reviews" VALUES ('ks@gmail.com', 'tedwalsh@td.com', 4.0, 'great guy!', '2016-05-02'); INSERT INTO "reviews" VALUES ('davood@gmail.com', 'tedwalsh@td.com', 4.0, 'great guy!', '2016-05-02'); INSERT INTO "reviews" VALUES ('mk@abc.com', 'tedwalsh@td.com', 4.1, 'great guy!', '2016-05-02'); INSERT INTO "reviews" VALUES ('tedwalsh@td.com', 'ks@gmail.com', 4.0, 'great guy!', '2016-05-02'); INSERT INTO "reviews" VALUES ('mc@gmail.com', 'ks@gmail.com', 4.0, 'great guy!', '2016-05-02'); INSERT INTO "reviews" VALUES ('angels@gmail.com', 'ks@gmail.com', 4.2, 'great guy!', '2016-05-02'); INSERT INTO "reviews" VALUES ('hm@mah.com', 'mc@gmail.com', 5.0, '', '2016-03-16 17:51:30'); INSERT INTO "reviews" VALUES ('angels@gmail.com', 'mc@gmail.com', 5.0, '', '2017-03-16 17:51:30'); INSERT INTO "reviews" VALUES ('mc@gmail.com', 'davood@gmail.com', 3.9, 'great guy!', '2016-05-02'); INSERT INTO "reviews" VALUES ('hm@mah.com', 'davood@gmail.com', 5.0, '', '2016-03-16 17:51:30'); INSERT INTO "reviews" VALUES ('angels@gmail.com', 'davood@gmail.com', 5.0, '', '2017-03-16 17:51:30'); INSERT INTO "reviews" VALUES ('tedwalsh@td.com', 'davood@gmail.com', 5.0, 'great prof!', '2016-05-02'); INSERT INTO "reviews" VALUES ('mc@gmail.com', 'amr@yahoo.ca', 1.0, 'bad', '2016-05-02'); INSERT INTO "reviews" VALUES ('hm@mah.com', 'amr@yahoo.ca', 1.0, 'slow', '2016-03-16 17:51:30'); INSERT INTO "reviews" VALUES ('angels@gmail.com', 'amr@yahoo.ca', 1.0, 'tired', '2017-03-16 17:51:30'); INSERT INTO "reviews" VALUES ('mc@gmail.com', 'amrv2@yahoo.ca', 5.0, 'bad', '2016-05-02'); INSERT INTO "reviews" VALUES ('hm@mah.com', 'amrv2@yahoo.ca', 5.0, 'slow', '2016-03-16 17:51:30'); INSERT INTO "reviews" VALUES ('angels@gmail.com', 'amrv2@yahoo.ca', 5.0, 'tired', '2017-03-16 17:51:30'); INSERT INTO "reviews" VALUES ('mc@gmail.com', 'hm@mah.com', 2.0, 'bad', '2016-05-02'); INSERT INTO "reviews" VALUES ('hm@mah.com', 'hm@mah.com', 2.0, 'slow', '2016-03-16 17:51:30'); INSERT INTO "reviews" VALUES ('angels@gmail.com', 'hm@mah.com', 2.0, 'tired', '2017-03-16 17:51:30'); INSERT INTO "reviews" VALUES ('tedwalsh@td.com', 'chomsky@mit.edu', 1.0, '!', '2016-05-02'); INSERT INTO "reviews" VALUES ('angels@gmail.com', 'chomsky@mit.edu', 1.0, 'ok!', '2016-05-02'); INSERT INTO "previews" VALUES (1, 'N01', 'hm@mah.com', 1.0, 'definitly used', '2019-09-01 21:47:25'); INSERT INTO "previews" VALUES (2, 'N01', 'hm@mah.com', 1.0, 'unused', '2019-11-01 21:47:25'); INSERT INTO "previews" VALUES (3, 'N02', 'ks@gmail.com', 3.0, 'great quality', '2019-10-01 21:47:25'); INSERT INTO "previews" VALUES (4, 'N02', 'ks@gmail.com', 5.0, 'great quality', '2019-10-01 21:47:25'); INSERT INTO "previews" VALUES (5, 'P02', 'mk@abc.com', 4.1, 'amazing car', '2019-09-01 21:47:25'); INSERT INTO "previews" VALUES (6, 'P02', 'mk@abc.com', 3.8, 'amazing car', '2019-10-01 21:47:25'); INSERT INTO "previews" VALUES (61, 'P02', 'mk@abc.com', 4.2, 'amazing car', '2019-10-01 21:47:25'); INSERT INTO "previews" VALUES (7, 'PS01', 'mk@abc.com', 5.0, 'a console', '2019-03-01 21:47:25'); INSERT INTO "previews" VALUES (8, 'PS01', 'mk@abc.com', 5.0, 'xbox+ps4?', '2019-03-01 21:47:25'); INSERT INTO "previews" VALUES (9, 'PS01', 'mk@abc.com', 4.0, '3rd time buying', '2020-02-01 21:47:25'); INSERT INTO "previews" VALUES (10, 'PS01', 'mk@abc.com', 3.9, 'addicted', '2020-02-01 21:47:25'); INSERT INTO "previews" VALUES (11, 'K01', 'mk@abc.com', 5.0, 'addicted', '2020-02-01 21:47:25'); INSERT INTO "previews" VALUES (12, 'K01', 'hm@mah.com', 5.0, 'addicted', '2020-01-01 21:47:25'); INSERT INTO "previews" VALUES (13, 'K01', 'chomsky@mit.edu', 5.0, 'addicted', '2019-12-01 21:47:25');
--CREATE SCHEMA Pokedex; --Jogos-- create table pokedex.jogo(ID INT NOT NULL PRIMARY KEY GENERATED ALWAYS AS IDENTITY (START WITH 1, INCREMENT BY 1), jogo VARCHAR(15) NOT NULL); insert into pokedex.jogo (jogo) values --Gen I-- ('Red'),--1 ('Blue'), ('Yellow'), --Gen II-- ('Gold'), ('Silver'),--5 ('Crystal'), --Gen III-- ('Fire Red'),--7 ('Leaf Green'), ('Ruby'), ('Sapphire'),--10 ('Emerald'), --Gen IV-- ('Diamond'),--12 ('Pearl'), ('Platinum'), ('Heart Gold'),--15 ('Soul Silver'), --Gen V-- ('Black'),--17 ('White'), ('Black 2'), ('White 2'),--20 --Gen VI-- ('X'),--21 ('Y'), ('Omega Ruby'), ('Alpha Sapphire');--24 -- Tipos -- create table pokedex.tipo(ID INT NOT NULL PRIMARY KEY GENERATED ALWAYS AS IDENTITY (START WITH 1, INCREMENT BY 1), tipo VARCHAR(12) NOT NULL); INSERT INTO pokedex.tipo (TIPO) VALUES ('Normal'), --1 ('Lutador'), --2 ('Voador'), --3 ('Venenoso'), --4 ('Terrestre'), --5 ('Pedra'), --6 ('Inseto'), --7 ('Fantasma'), --8 ('Metálico'),--9 ('Fogo'), --10 ('Agua'), --11 ('Grama'), --12 ('Elétrico'), --13 ('Psíquico'), --14 ('Gelo'), --15 ('Dragão'), --16 ('Noturno'), --17 ('Fada');--18 --Pokemons-- create TABLE pokedex.pokemon(ID INT NOT NULL PRIMARY KEY GENERATED ALWAYS AS IDENTITY (START WITH 1, INCREMENT BY 1), nome VARCHAR(20) NOT NULL, tipo1 int not null, FOREIGN KEY (tipo1) REFERENCES pokedex.tipo(ID), tipo2 int, FOREIGN KEY (tipo2) REFERENCES pokedex.tipo(ID)); INSERT INTO pokedex.pokemon (nome, tipo1, tipo2) VALUES --Kanto ('Bulbasaur', 12, 4), ('Ivysaur', 12, 4), ('Venosaur', 12, 4), ('Charmander', 10, null), ('Charmeleon', 10, null), --5 ('Charizard', 10, 3), ('Squirtle', 11, null), ('Wartortle', 11, null), ('Blastoise', 11, null), ('Caterpie', 7, null), --10 ('Metapod', 7, null), ('Butterfree', 7, 3), ('Weedle', 7, 4), ('Kakuna', 7, 4), ('Beedrill', 7, 4), --15 ('Pidgey', 1, 3), ('Pidgeotto', 1, 3), ('Pidgeot', 1, 3), ('Rattata', 1, null), ('Raticate', 1, null), --20 ('Spearow', 1, 3), ('Fearow', 1, 3), ('Ekans', 4, null), ('Arbok', 4, null), ('Pikachu', 13, null), --25 ('Raichu', 13, null), ('Sandshrew', 5, null), ('Sandslash', 5, null), ('Nidoran F', 4, null), ('Nidorina', 4, null), --30 ('Nidoqueen', 4, 5), ('Nidoran M', 4, null), ('Nidorino', 4, null), ('Nidoking', 4, 5), ('Clefairy', 18, null), --35 ('Clefable', 18, null), ('Vulpix', 10, null), ('Ninetales', 10, null), ('Jigglypuff', 1, 18), ('Wigglytuff', 1, 18), --40 ('Zubat', 4, 3), ('Golbat', 4, 3), ('Oddish', 12, 4), ('Gloom', 12, 4), ('Vilwplume', 12, 4), --45 ('Paras', 7, 12), ('Parasect', 7, 12), ('Venonat', 7, 4), ('Venomoth', 7, 4), ('Diglet', 5, null), --50 ('Dugtrio', 5, null), ('Meowth', 1, null), ('Persian', 1, null), ('Psyduck', 11, null), ('Golduck', 11, null), --55 ('Mankey', 2, null), ('Primape', 2, null), ('Growlithe', 10, null), ('Arcanine', 10, null), ('Poliwag', 11, null), --60 ('Poliwhirl', 11, null), ('Poliwrath', 11, 2), ('Abra', 14, null), ('Kadabra', 14, null), ('Alakazam', 14, null), --65 ('Machop', 2, null), ('Machoke', 2, null), ('Machamp', 2, null), ('Bellsprout', 12, 4), ('Weepinbell', 12, 4), --70 ('Victreebel', 12, 4), ('Tentacool', 11, 4), ('Tentacruel', 11, 4), ('Geodude', 6, 5), ('Graveler', 6, 5), --75 ('Golem', 6, 5), ('Ponyta', 10, null), ('Rapidash', 10, null), ('Slowpoke', 11, 14), ('Slowbro', 11, 14), --80 ('Magnemite', 13, 9), ('Magneton', 13, 9), ('Farfetch''d', 1, 3), ('Doduo', 1, 3), ('Dodrio', 1, 3), --85 ('Seel', 11, null), ('Dewgong', 11, 15), ('Grimer', 4, null), ('Muk', 4, null), ('Shellder', 11, null), --90 ('Cloyster', 11, 15), ('Gastly', 8, 4), ('Haunter', 8, 4), ('Gengar', 8, 4), ('Onix', 6, 5), --95 ('Drowzee', 14, null), ('Hypno', 14, null), ('Krabby', 11, null), ('Kingler', 11, null), ('Voltorb', 13, null), --100 ('Electrode', 13, null), ('Exeggcute', 12, 14), ('Exeggutor', 12, 14), ('Cubone', 5, null), ('Marowak', 5, null), --105 ('Hitmonlee', 2, null), ('Hitmonchan', 2, null), ('Lickitung', 1, null), ('Koffing', 4, null), ('Weezing', 4, null), --110 ('Rhyhorn', 5, 6), ('Rhydon', 5, 6), ('Chansey', 1, null), ('Tangela', 12, null), ('Kangaskhan', 1, null), --115 ('Horsea', 11, null), ('Seadra', 11, null), ('Goldeen', 11, null), ('Seaking', 11, null), ('Staryu', 11, null), --120 ('Starmie', 11, 14), ('Mr. Mime', 14, 18), ('Scyther', 7, 3), ('Jynx', 15, 14), ('Electabuzz', 13, null), --125 ('Magmar', 10, null), ('Pinsir', 7, null), ('Tauros', 1, null), ('Magikarp', 11, null), ('Gyarados', 11, 3), --130 ('Lapras', 11, 15), ('Ditto', 1, null), ('Eevee', 1, null), ('Vaporeon', 11, null), ('Jolteon', 13, null), --135 ('Flareon', 10, null), ('Porygon', 1, null), ('Omanyte', 6, 11), ('Omastar', 6, 11), ('Kabuto', 6, 11), --140 ('Kabutops', 6, 11), ('Aerodactyl', 6, 3), ('Snorlax', 1, null), ('Articuno', 15, 3), ('Zapdos', 13, 3), --145 ('Moltres', 10, 3), ('Dratini', 16, null), ('Dragonair', 16, null), ('Dragonite', 16, 3), ('Mewtwo', 14, null), --150 ('Mew', 14, null), --Johto ('Chikorita', 12, null), ('Bayleef', 12, null), ('Meganium', 12, null), ('Cyndaquil', 10, null), --155 ('Quilava', 10, null), ('Typhlosion', 10, null), ('Totodile', 11, null), ('Croconaw', 11, null), ('Feraligatr', 11, null), --160 ('Sentret', 1, null), ('Furret', 1, null), ('Hoothoot', 1, 3), ('Noctowl', 1, 3), ('Ledyba', 7, 3), --165 ('Ledian', 7, 3), ('Spinarak', 7, 4), ('Ariados', 7, 4), ('Crobat', 4, 3), ('Chinchou', 11, 13), --170 ('Lanturn', 11, 13), ('Pichu', 13, null), ('Cleffa', 18, null), ('Igglybuff', 1, 18), ('Togepi', 18, null), --176 ('Togetic', 18, 3), ('Natu', 14, 3), ('Xatu', 14, 3), ('Mareep', 13, null), ('Flaaffy', 13, null), --180 ('Ampharos', 13, null), ('Bellossom', 12, null), ('Marill', 11, 18), ('Azumarill', 11, 18), ('Sudowoodo', 6, null), --185 ('Politoed', 11, null), ('Hoppip', 12, 3), ('Skiploom', 12, 3), ('Jumpluff', 12, 3), ('Aipom', 1, null),--190 ('Sunkern', 12, null), ('Sunflora', 12, null), ('Yanma', 7, 3), ('Wooper', 11, 5), ('Quagsire', 11, 5), --195 ('Espeon', 14, null), ('Umbreon', 17, null), ('Murkrow', 17, 3), ('Slowking', 11, 14), ('Misdreavus', 8, null), --200 ('Unown', 14, null), ('Wobbuffet', 14, null), ('Girafarig', 1, 14), ('Pineco', 7, null), ('Forretress', 7, 9), --205 ('Dunsparce', 1, null), ('Gligar', 5, 3), ('Steelix', 9, 5), ('Snubbull', 18, null), ('Granbull', 18, null), --210 ('Qwilfish', 11, 4), ('Scizor', 7, 9), ('Shuckle', 7, 6), ('Heracross', 7, 2), ('Sneasel', 17, 15), --215 ('Teddiursa', 1, null), ('Ursaring', 1, null), ('Slugma', 10, null), ('Magcargo', 10, 6), ('Swinub', 15, 5), --220 ('Piloswine', 15, 5), ('Corsola', 11, 6), ('Remoraid', 11, null), ('Octillery', 11, null), ('Delibird', 15, 3), --225 ('Mantine', 11, 3), ('Skarmory', 9, 3), ('Houndour', 17, 10), ('Houndoom', 17, 10), ('Kingdra', 11, 16), --230 ('Phanpy', 5, null), ('Donphan', 5, null), ('Porygon2', 1, null), ('Stantler', 1, null), ('Smeargle', 1, null), --235 ('Tyrogue', 2, null), ('Hitmontop', 2, null), ('Smoochum', 15, 13), ('Elekid', 13, null), ('Magby', 10, null), --240 ('Miltank', 1, null), ('Blissey', 1, null), ('Raikou', 13, null), ('Entei', 10, null), ('Suicune', 11, null), --245 ('Larvitar', 6, 5), ('Pupitar', 6, 5), ('Tyranitar', 6, 17), ('Lugia', 14, 3), ('Ho-Oh', 10, 3), --250 ('Celebi', 14, 12), --Hoenn ('Treecko',12 ,null), ('Grovyle', 12, null), ('Sceptile', 12, null), ('Torchic', 10, null),--255 ('Combusken', 10, 2), ('Blaziken', 10, 2), ('Mudkip', 11, null), ('Marshtomp', 11, 5), ('Swampert', 11, 5),--260 ('Poochyena', 17, null), ('Mightyena', 17, null), ('Zigzagoon', 1, null), ('Linoone', 1, null), ('Wurmple', 7, null),--265 ('Silcoon', 7, null), ('Beautifly', 7, 3), ('Cascoon', 7, null), ('Dustox', 7, 4), ('Lotad', 11, 12),--270 ('Lombre', 11, 12), ('Ludicolo', 11, 12), ('Seedot', 12, null), ('Nuzleaf', 12, 17), ('Shiftry', 12, 17),--275 ('Taillow', 1, 3), ('Swellow', 1, 3), ('Wingull', 11, 3), ('Pelipper', 11, 3), ('Ralts', 14, 18),--280 ('Kirlia', 14, 18), ('Gardevoir', 14, 18), ('Surskit', 7, 11), ('Masquerain', 7, 3), ('Shroomish', 12, null),--285 ('Breloom', 12, 2), ('Slakoth', 1, null), ('Vigoroth', 1, null), ('Slaking', 1, null), ('Nincada', 7, 5),--290 ('Ninjask', 7, 3), ('Shedinja', 7, 8), ('Whismur', 1, null), ('Loudred', 1, null), ('Exploud', 1, null),--295 ('Maluhita', 2, null), ('Hariyama', 2, null), ('Azurill', 1, 18), ('Nosepass', 6, null), ('Skitty', 1, null),--300 ('Delcatty', 1, null), ('Sableye', 17, 8), ('Mawile', 9, 18), ('Aron', 9, 6), ('Larion', 9, 6),--305 ('Aggron', 9, 6), ('Meditite', 2, 14), ('Medicham', 2, 14), ('Electrike', 13, null), ('Manectric', 13, null),--310 ('Plusle', 13, null), ('Minun', 13, null), ('Volbeat', 7, null), ('Illumise', 7, null), ('Roselia', 12, 4),--315 ('Gulpin', 4, null), ('Swalot', 4, null), ('Carvanha', 11, 17), ('Sharpedo', 11, 17), ('Wailmer', 11, null),--320 ('Wailord', 11, null), ('Numel', 10, 5), ('Camerupt', 10, 5), ('Torkoal', 10, null), ('Spoink', 14, null),--325 ('Grumpig', 14, null), ('Spinda', 1, null), ('Trapinch', 5, null), ('Vibrava', 5, 16), ('Flygon', 5, 16),--330 ('Cacnea', 12, null), ('Cactune', 12, 17), ('Swablu', 1, 3), ('Altaria', 16, 3), ('Zangoose', 1, null),--335 ('Seviper', 4, null), ('Lunatone', 6, 14), ('Solrock', 6, 14), ('Barboach', 11, 5), ('Whiscash', 11, 5),--340 ('Corpish', 11, null), ('Crawdaunt', 11, 17), ('Baltoy', 5, 14), ('Claydol', 5, 14), ('Lileep', 6, 12),--345 ('Cradily', 6, 12), ('Anorith', 6, 7), ('Armaldo', 6, 7), ('Feebas', 11, null), ('Milotic', 11, null),--350 ('Castform', 1, null), ('Kecleon', 1, null), ('Shuppet', 8, null), ('Banette', 8, null), ('Duskull', 8, null),--355 ('Dusclops', 8, null), ('Tropius', 12, 3), ('Chimecho', 14, null), ('Absol', 17, null), ('Wynaut', 14, null),--360 ('Snorunt', 15, null), ('Glalie', 15, null), ('Spheal', 15, 11), ('Sealeo', 15, 11), ('Walrein', 15, 11),--365 ('Clamperl', 11, null), ('Huntail', 11, null), ('Gorebyss', 11, null), ('Relicanth', 11, 6), ('Luvdisc', 11, null),--370 ('Bagon', 16, null), ('Shelgon', 16, null), ('Salamence', 16, 3), ('Beldum', 9, 14), ('Metang', 9, 14),--375 ('Metagross', 9, 14), ('Regirock', 6, null), ('Regice', 15, null), ('Registeel', 9, null), ('Latias', 16, 14),--380 ('Latios', 16, 14), ('Kyogre', 11, null), ('Groudon', 5, null), ('Rayquaza', 16, 3), ('Jirachi', 9, 14),--385 ('Deoxys', 9, null); --Evolucoes-- create table pokedex.evolution(basic int not null, foreign key (basic) references pokedex.pokemon(id), evolution int not null primary key, foreign key (evolution) references pokedex.pokemon(id), evolution_mode varchar (30) not null); INSERT INTO pokedex.evolution(basic, evolution, evolution_mode)VALUES --Kanto (1, 2, 'Level 16'), (2, 3, 'Level 36'), (4, 5, 'Level 16'), (5, 6, 'Level 36'), (7, 8, 'Level 16'), (8, 9, 'Level 36'), (10, 11, 'Level 7'), (11, 12, 'Level 10'), (13, 14, 'Level 7'), (14, 15, 'Level 10'), (16, 17, 'Level 18'), (17, 18, 'Level 36'), (19, 20, 'Level 20'), (21, 22, 'Level 20'), (23, 24, 'Level 22'), (25, 26, 'Thunder Stone'), (27, 28, 'Level 22'), (29, 30, 'Level 16'), (30, 31, 'Moon Stone'), (32, 33, 'Level 16'), (33, 34, 'Moon Stone'), (35, 36, 'Moon Stone'), (37, 38, 'Fire Stone'), (39, 40, 'Moon Stone'), (41, 42, 'Level 22'), (43, 44, 'Level 21'), (44, 45, 'Leaf Stone'), (46, 47, 'Level 24'), (48, 49, 'Level 31'), (50, 51, 'Level 26'), (52, 53, 'Level 28'), (54, 55, 'Level 33'), (56, 57, 'Level 28'), (58, 59, 'Fire Stone'), (60, 61, 'Level 25'), (61, 62, 'Water Stone'), (63, 64, 'Level 16'), (64, 65, 'Trade'), (66, 67, 'Level 28'), (67, 68, 'Trade'), (69, 70, 'Level 21'), (70, 71, 'Leaf Stone'), (72, 73, 'Level 30'), (74, 75, 'Level 25'), (75, 76, 'Trade'), (77, 78, 'Level 40'), (79, 80, 'Level 37'), (81, 82, 'Level 30'), (84, 85, 'Level 31'), (86, 87, 'Level 34'), (88, 89, 'Level 38'), (90, 91, 'Water Stone'), (92, 93, 'Level 25'), (93, 94, 'Trade'), (96, 97, 'Level 26'), (98, 99, 'Level 28'), (100, 101, 'Level 30'), (102, 103, 'Leaf Stone'), (104, 105, 'Level 28'), (109, 110, 'Level 35'), (111, 112, 'Level 42'), (116, 117, 'Level 32'), (118, 119, 'Level 33'), (120, 121, 'Water Stone'), (129, 130, 'Level 20'), (133, 134, 'Water Stone'), (133, 135, 'Thunder Stone'), (133, 136, 'Fire Stone'), (138, 139, 'Level 40'), (140, 141, 'Level 40'), (147, 148, 'Level 30'), (148, 149, 'Level 55'), --Johto (152, 153, 'Level 16'), (153, 154, 'Level 32'), (155, 156, 'Level 16'), (156, 157, 'Level 32'), (158, 159, 'Level 16'), (159, 160, 'Level 32'), (161, 162, 'Level 15'), (163, 164, 'Level 20'), (165, 166, 'Level 18'), (167, 168, 'Level 22'), (42, 169, 'Felicidade'), (170, 171, 'Level 27'), (172, 25, 'Felicidade'), (173, 35, 'Felicidade'), (174, 39, 'Felicidade'), (175, 176, 'Felicidade'), (177, 178, 'Level 25'), (179, 180, 'Level 15'), (180, 181, 'Level 30'), (44, 182, 'Sun Stone'), (183, 184, 'Level 18'), (61, 186, 'Trade, hold King''s Rock'), (187, 188, 'Level 18'), (188, 189, 'Level 27'), (191, 192, 'Sun Stone'), (194, 195, 'Level 20'), (133, 196, 'Felicidade, durante a noite'), (133, 197, 'Felicidade, durante o dia'), (79, 199, 'Trade, hold King''s Rock'), (204, 205, 'Level 31'), (95, 208, 'Trade, hold Metal Coat'), (209, 210, 'Level 23'), (123, 212, 'Trade, hold Metal Coat'), (216, 217, 'Level 30'), (218, 219, 'Level 38'), (220, 221, 'Level 33'), (223, 224, 'Level 25'), (228, 229, 'Level 24'), (117, 230, 'Trade, hold Dragon Scale'), (231, 232, 'Level 25'), (137, 233, 'Trade, hold Up-Grade'), (236, 106, 'Level 20, Attack > Defense'), (236, 107, 'Level 20, Attack < Defense'), (236, 237, 'Level 20, Attack = Defense'), (238, 124, 'Level 30'), (239, 125, 'Level 30'), (240, 126, 'Level 30'), (113, 242, 'Felicidade'), (246, 247, 'Level 30'), (247, 248, 'Level 55'); --Hoenn-- --Disponiveis-- create table pokedex.disponivel(ID INT NOT NULL PRIMARY KEY GENERATED ALWAYS AS IDENTITY (START WITH 1, INCREMENT BY 1), pokemon int not null, foreign key (pokemon) references pokedex.pokemon(id), jogo int not null, foreign key (jogo) references pokedex.jogo(id)); insert into pokedex.disponivel(pokemon, jogo) values --Kanto (1,1), (1,2), (1,3), (1,7), (1,8), (1,15), (1,16), (1,21), (1,22), (4,1), (4,2), (4,3), (4,7), (4,8), (4,15), (4,16), (4,21), (4,22), (7,1), (7,2), (7,3), (7,7), (7,8), (7,15), (7,16), (7,21), (7,22), (10,1), (10,2), (10,3), (10,4), (10,5), (10,6), (10,7), (10,8), (10,12), (10,13), (10,14), (10,15), (10,16), (10,21), (10,22), (11,1), (11,2), (11,3), (11,4), (11,5), (11,6), (11,7), (11,8), (11,12), (11,13), (11,14), (11,15), (11,16), (11,18), (11,22), (12,4), (12,5), (12,6), (12,15), (12,16), (12,18), (13,1), (13,2), (13,3), (13,4), (13,5), (13,6), (13,7), (13,8), (13,12), (13,13), (13,14), (13,15), (13,16), (13,21), (13,22), (14,1), (14,2), (14,4), (14,5), (14,6), (14,7), (14,8), (14,12), (14,13), (14,14), (14,15), (14,16), (14,17), (14,21), (14,23), (14,24), (15,4), (15,5), (15,6), (15,15), (15,16), (15,17); --Capturados-- create table pokedex.capturado(ID INT NOT NULL PRIMARY KEY GENERATED ALWAYS AS IDENTITY (START WITH 1, INCREMENT BY 1), pokemon int not null, foreign key (pokemon) references pokedex.pokemon(id), jogo int not null, foreign key (jogo) references pokedex.jogo(id)); insert into pokedex.capturado(pokemon, jogo) values --Kanto (001, 23), (002, 23), (003, 23), (004, 23), (005, 23), (006, 23), (007, 23), (008, 23), (009, 23), (010, 23), (011, 23), (012, 23), (013, 23), (014, 23), (015, 23), (016, 23), (017, 23), (018, 23), (019, 23), (020, 23), (021, 23), (022, 23), (023, 23), (025, 23), (026, 23), (027, 23), (029, 23), (030, 23), (031, 23), (032, 23), (033, 23), (034, 23), (035, 23), (037, 23), (038, 23), (039, 23), (040, 23), (041, 23), (042, 23), (043, 23), (044, 23), (045, 23), (046, 23), (047, 23), (048, 23), (049, 23), (050, 23), (051, 23), (052, 23), (053, 23), (054, 23), (056, 23), (057, 23), (058, 23), (059, 23), (060, 23), (061, 23), (062, 23), (063, 23), (064, 23), (065, 23), (066, 23), (067, 23), (068, 23), (072, 23), (073, 23), (074, 23), (075, 23), (076, 23), (077, 23), (081, 23), (082, 23), (083, 23), (084, 23), (085, 23), (086, 23), (087, 23), (088, 23), (090, 23), (091, 23), (092, 23), (093, 23), (094, 23), (095, 23), (096, 23), (098, 23), (099, 23), (100, 23), (102, 23), (103, 23), (104, 23), (106, 23), (108, 23), (109, 23), (100, 23), (101, 23), (102, 23), (103, 23), (104, 23), (105, 23), (106, 23), (107, 23), (108, 23), (109, 23), (111, 23), (114, 23), (115, 23), (116, 23), (118, 23), (119, 23), (120, 23), (121, 23), (122, 23), (123, 23), (124, 23), (125, 23), (126, 23), (127, 23), (129, 23), (130, 23), (131, 23), (132, 23), (133, 23), (134, 23), (135, 23), (136, 23), (137, 23), (138, 23), (139, 23), (140, 23), (141, 23), (142, 23), (143, 23), (144, 23), (145, 23), (146, 23), (147, 23), (148, 23), (149, 23), (150, 23); --Pokedex-- create table pokedex.pokedex (National_number int not null primary key, foreign key (national_number) references pokedex.pokemon(id), kanto_number int, Johto_number int, hoenn_number int, sinnoh_number int, unova_number int, central_kalos_number int, costal_kalos_number int, Mountain_kalos_number int); INSERT INTO pokedex.pokedex (national_number, kanto_number, Johto_number, hoenn_number, sinnoh_number, unova_number, central_kalos_number, costal_kalos_number, Mountain_kalos_number) VALUES --Kanto (001, 001, 226, null, null, null, 080, null, null), (002, 002, 227, null, null, null, 081, null, null), (003, 003, 228, null, null, null, 082, null, null), (004, 004, 229, null, null, null, 083, null, null), (005, 005, 230, null, null, null, 084, null, null), (006, 006, 231, null, null, null, 085, null, null), (007, 007, 232, null, null, null, 086, null, null), (008, 008, 233, null, null, null, 087, null, null), (009, 009, 234, null, null, null, 088, null, null), (010, 010, 024, null, null, null, null, null, null), (011, 011, 025, null, null, null, null, null, null), (012, 012, 026, null, null, null, null, null, null), (013, 013, 027, null, null, null, null, null, null), (014, 014, 028, null, null, null, null, null, null), (015, 015, 029, null, null, null, null, null, null), (016, 016, 010, null, null, null, null, null, null), (017, 017, 011, null, null, null, null, null, null), (018, 018, 012, null, null, null, null, null, null), (019, 019, 017, null, null, null, null, null, null), (020, 020, 018, null, null, null, null, null, null), (021, 021, 013, null, null, null, null, null, null), (022, 022, 014, null, null, null, null, null, null), (023, 023, 050, null, null, null, null, null, null), (024, 024, 051, null, null, null, null, null, null), (025, 025, 022, null, null, null, null, null, null), (026, 026, 023, null, null, null, null, null, null), (027, 027, 048, null, null, null, null, null, null), (028, 028, 049, null, null, null, null, null, null), (029, 029, 095, null, null, null, null, null, null), (030, 030, 096, null, null, null, null, null, null), (031, 031, 097, null, null, null, null, null, null), (032, 032, 098, null, null, null, null, null, null), (033, 033, 099, null, null, null, null, null, null), (034, 034, 100, null, null, null, null, null, null), (035, 035, 041, null, null, null, null, null, null), (036, 036, 042, null, null, null, null, null, null), (037, 037, 125, null, null, null, null, null, null), (038, 038, 126, null, null, null, null, null, null), (039, 039, 044, null, null, null, null, null, null), (040, 040, 045, null, null, null, null, null, null), (041, 041, 037, null, null, null, null, null, null), (042, 042, 038, null, null, null, null, null, null), (043, 043, 083, null, null, null, null, null, null), (044, 044, 084, null, null, null, null, null, null), (045, 045, 085, null, null, null, null, null, null), (046, 046, 070, null, null, null, null, null, null), (047, 047, 071, null, null, null, null, null, null), (048, 048, 108, null, null, null, null, null, null), (049, 049, 109, null, null, null, null, null, null), (050, 050, 132, null, null, null, null, null, null), (051, 051, 133, null, null, null, null, null, null), (052, 052, 136, null, null, null, null, null, null), (053, 053, 137, null, null, null, null, null, null), (054, 054, 138, null, null, null, null, null, null), (055, 055, 139, null, null, null, null, null, null), (056, 056, 134, null, null, null, null, null, null), (057, 057, 135, null, null, null, null, null, null), (058, 058, 127, null, null, null, null, null, null), (059, 059, 128, null, null, null, null, null, null), (060, 060, 072, null, null, null, null, null, null), (061, 061, 073, null, null, null, null, null, null), (062, 062, 074, null, null, null, null, null, null), (063, 063, 089, null, null, null, null, null, null), (064, 064, 090, null, null, null, null, null, null), (065, 065, 091, null, null, null, null, null, null), (066, 066, 140, null, null, null, null, null, null), (067, 067, 141, null, null, null, null, null, null), (068, 068, 142, null, null, null, null, null, null), (069, 069, 064, null, null, null, null, null, null), (070, 070, 065, null, null, null, null, null, null), (071, 071, 066, null, null, null, null, null, null), (072, 072, 162, null, null, null, null, null, null), (073, 073, 163, null, null, null, null, null, null), (074, 074, 034, null, null, null, null, null, null), (075, 075, 035, null, null, null, null, null, null), (076, 076, 036, null, null, null, null, null, null), (077, 077, 201, null, null, null, null, null, null), (078, 078, 202, null, null, null, null, null, null), (079, 079, 080, null, null, null, null, null, null), (080, 080, 081, null, null, null, null, null, null), (081, 081, 118, null, null, null, null, null, null), (082, 082, 119, null, null, null, null, null, null), (083, 083, 158, null, null, null, null, null, null), (084, 084, 199, null, null, null, null, null, null), (085, 085, 200, null, null, null, null, null, null), (086, 086, 176, null, null, null, null, null, null), (087, 087, 177, null, null, null, null, null, null), (088, 088, 116, null, null, null, null, null, null), (089, 089, 117, null, null, null, null, null, null), (090, 090, 169, null, null, null, null, null, null), (091, 091, 170, null, null, null, null, null, null), (092, 092, 058, null, null, null, null, null, null), (093, 093, 059, null, null, null, null, null, null), (094, 094, 060, null, null, null, null, null, null), (095, 095, 062, null, null, null, null, null, null), (096, 096, 087, null, null, null, null, null, null), (097, 097, 088, null, null, null, null, null, null), (098, 098, 164, null, null, null, null, null, null), (099, 099, 165, null, null, null, null, null, null), (100, 100, 120, null, null, null, null, null, null), (101, 101, 121, null, null, null, null, null, null), (102, 102, 104, null, null, null, null, null, null), (103, 103, 105, null, null, null, null, null, null), (104, 104, 203, null, null, null, null, null, null), (105, 105, 204, null, null, null, null, null, null), (106, 106, 144, null, null, null, null, null, null), (107, 107, 145, null, null, null, null, null, null), (108, 108, 178, null, null, null, null, null, null), (109, 109, 114, null, null, null, null, null, null), (110, 110, 115, null, null, null, null, null, null), (111, 111, 206, null, null, null, null, null, null), (112, 112, 207, null, null, null, null, null, null), (113, 113, 217, null, null, null, null, null, null), (114, 114, 179, null, null, null, null, null, null), (115, 115, 205, null, null, null, null, null, null), (116, 116, 186, null, null, null, null, null, null), (117, 117, 187, null, null, null, null, null, null), (118, 118, 078, null, null, null, null, null, null), (119, 119, 079, null, null, null, null, null, null), (120, 120, 167, null, null, null, null, null, null), (121, 121, 168, null, null, null, null, null, null), (122, 122, 156, null, null, null, null, null, null), (123, 123, 110, null, null, null, null, null, null), (124, 124, 153, null, null, null, null, null, null), (125, 125, 155, null, null, null, null, null, null), (126, 126, 151, null, null, null, null, null, null), (127, 127, 112, null, null, null, null, null, null), (128, 128, 148, null, null, null, null, null, null), (129, 129, 076, null, null, null, null, null, null), (130, 130, 077, null, null, null, null, null, null), (131, 131, 219, null, null, null, null, null, null), (132, 132, 092, null, null, null, null, null, null), (133, 133, 180, null, null, null, null, null, null), (134, 134, 181, null, null, null, null, null, null), (135, 135, 182, null, null, null, null, null, null), (136, 136, 183, null, null, null, null, null, null), (137, 137, 215, null, null, null, null, null, null), (138, 138, 220, null, null, null, null, null, null), (139, 139, 221, null, null, null, null, null, null), (140, 140, 222, null, null, null, null, null, null), (141, 141, 223, null, null, null, null, null, null), (142, 142, 224, null, null, null, null, null, null), (143, 143, 225, null, null, null, null, null, null), (144, 144, 235, null, null, null, null, null, null), (145, 145, 236, null, null, null, null, null, null), (146, 146, 237, null, null, null, null, null, null), (147, 147, 241, null, null, null, null, null, null), (148, 148, 242, null, null, null, null, null, null), (149, 149, 243, null, null, null, null, null, null), (150, 150, 249, null, null, null, null, null, null), (151, 151, 250, null, null, null, null, null, null), (152, null, 001, null, null, null, null, null, null), (153, null, 002, null, null, null, null, null, null), (154, null, 003, null, null, null, null, null, null), (155, null, 004, null, null, null, null, null, null), (156, null, 005, null, null, null, null, null, null), (157, null, 006, null, null, null, null, null, null), (158, null, 007, null, null, null, null, null, null), (159, null, 008, null, null, null, null, null, null), (160, null, 009, null, null, null, null, null, null), (161, null, 019, null, null, null, null, null, null), (162, null, 020, null, null, null, null, null, null), (163, null, 015, null, null, null, null, null, null), (164, null, 016, null, null, null, null, null, null), (172, null, 021, null, null, null, null, null, null), (165, null, 030, null, null, null, null, null, null), (166, null, 031, null, null, null, null, null, null), (167, null, 032, null, null, null, null, null, null), (168, null, 033, null, null, null, null, null, null), (169, null, 039, null, null, null, null, null, null), (173, null, 040, null, null, null, null, null, null), (174, null, 043, null, null, null, null, null, null), (175, null, 046, null, null, null, null, null, null), (176, null, 047, null, null, null, null, null, null), (206, null, 052, null, null, null, null, null, null), (179, null, 053, null, null, null, null, null, null), (180, null, 054, null, null, null, null, null, null), (181, null, 055, null, null, null, null, null, null), (194, null, 056, null, null, null, null, null, null), (195, null, 057, null, null, null, null, null, null), (201, null, 061, null, null, null, null, null, null), (208, null, 063, null, null, null, null, null, null), (187, null, 067, null, null, null, null, null, null), (188, null, 068, null, null, null, null, null, null), (189, null, 069, null, null, null, null, null, null), (186, null, 075, null, null, null, null, null, null), (199, null, 082, null, null, null, null, null, null), (182, null, 086, null, null, null, null, null, null), (204, null, 093, null, null, null, null, null, null), (205, null, 094, null, null, null, null, null, null), (193, null, 101, null, null, null, null, null, null), (191, null, 102, null, null, null, null, null, null), (192, null, 103, null, null, null, null, null, null), (202, null, 107, null, null, null, null, null, null), (212, null, 111, null, null, null, null, null, null), (214, null, 113, null, null, null, null, null, null), (190, null, 122, null, null, null, null, null, null), (209, null, 123, null, null, null, null, null, null), (210, null, 124, null, null, null, null, null, null), (234, null, 129, null, null, null, null, null, null), (183, null, 130, null, null, null, null, null, null), (184, null, 131, null, null, null, null, null, null), (236, null, 143, null, null, null, null, null, null), (237, null, 146, null, null, null, null, null, null), (203, null, 147, null, null, null, null, null, null), (241, null, 149, null, null, null, null, null, null), (240, null, 150, null, null, null, null, null, null), (238, null, 152, null, null, null, null, null, null), (239, null, 154, null, null, null, null, null, null), (235, null, 157, null, null, null, null, null, null), (177, null, 159, null, null, null, null, null, null), (178, null, 160, null, null, null, null, null, null), (211, null, 161, null, null, null, null, null, null), (213, null, 166, null, null, null, null, null, null), (222, null, 171, null, null, null, null, null, null), (223, null, 172, null, null, null, null, null, null), (224, null, 173, null, null, null, null, null, null), (170, null, 174, null, null, null, null, null, null), (171, null, 175, null, null, null, null, null, null), (196, null, 184, null, null, null, null, null, null), (197, null, 185, null, null, null, null, null, null), (230, null, 188, null, null, null, null, null, null), (207, null, 189, null, null, null, null, null, null), (225, null, 190, null, null, null, null, null, null), (220, null, 191, null, null, null, null, null, null), (221, null, 192, null, null, null, null, null, null), (216, null, 193, null, null, null, null, null, null), (217, null, 194, null, null, null, null, null, null), (231, null, 195, null, null, null, null, null, null), (232, null, 196, null, null, null, null, null, null), (226, null, 197, null, null, null, null, null, null), (227, null, 198, null, null, null, null, null, null), (198, null, 208, null, null, null, null, null, null), (228, null, 209, null, null, null, null, null, null), (229, null, 210, null, null, null, null, null, null), (218, null, 211, null, null, null, null, null, null), (219, null, 212, null, null, null, null, null, null), (215, null, 213, null, null, null, null, null, null), (200, null, 214, null, null, null, null, null, null), (233, null, 216, null, null, null, null, null, null), (242, null, 218, null, null, null, null, null, null), (243, null, 238, null, null, null, null, null, null), (244, null, 239, null, null, null, null, null, null), (245, null, 240, null, null, null, null, null, null), (246, null, 244, null, null, null, null, null, null), (247, null, 245, null, null, null, null, null, null), (248, null, 246, null, null, null, null, null, null), (249, null, 247, null, null, null, null, null, null), (250, null, 248, null, null, null, null, null, null), (251, null, 251, null, null, null, null, null, null), (252, null, null, 001, null, null, null, null, null), (253, null, null, 002, null, null, null, null, null), (254, null, null, 003, null, null, null, null, null), (255, null, null, 004, null, null, null, null, null), (256, null, null, 005, null, null, null, null, null), (257, null, null, 006, null, null, null, null, null), (258, null, null, 007, null, null, null, null, null), (259, null, null, 008, null, null, null, null, null), (260, null, null, 009, null, null, null, null, null), (261, null, null, 010, null, null, null, null, null), (262, null, null, 011, null, null, null, null, null), (263, null, null, 012, null, null, null, null, null), (264, null, null, 013, null, null, null, null, null), (265, null, null, 014, null, null, null, null, null), (266, null, null, 015, null, null, null, null, null), (267, null, null, 016, null, null, null, null, null), (268, null, null, 017, null, null, null, null, null), (269, null, null, 018, null, null, null, null, null), (270, null, null, 019, null, null, null, null, null), (271, null, null, 020, null, null, null, null, null), (272, null, null, 021, null, null, null, null, null), (273, null, null, 022, null, null, null, null, null), (274, null, null, 023, null, null, null, null, null), (275, null, null, 024, null, null, null, null, null), (276, null, null, 025, null, null, null, null, null), (277, null, null, 026, null, null, null, null, null), (278, null, null, 027, null, null, null, null, null), (279, null, null, 028, null, null, null, null, null), (280, null, null, 029, null, null, null, null, null), (281, null, null, 030, null, null, null, null, null), (282, null, null, 031, null, null, null, null, null), (283, null, null, 032, null, null, null, null, null), (284, null, null, 033, null, null, null, null, null), (285, null, null, 034, null, null, null, null, null), (286, null, null, 035, null, null, null, null, null), (287, null, null, 036, null, null, null, null, null), (288, null, null, 037, null, null, null, null, null), (289, null, null, 038, null, null, null, null, null);
-- phpMyAdmin SQL Dump -- version 4.6.5.2 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: Jun 01, 2017 at 12:59 AM -- Server version: 10.1.21-MariaDB -- PHP Version: 5.6.30 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: `CTUBUSDATABASE` -- -- -------------------------------------------------------- -- -- Table structure for table `Admin` -- CREATE TABLE `Admin` ( `uname` varchar(100) NOT NULL, `password` varchar(100) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `Admin` -- INSERT INTO `Admin` (`uname`, `password`) VALUES ('debanik', 'moto'), ('lipi', 'silver'), ('kanchan', 'bronze'), ('ashok', 'yellow'), ('kulwinder', 'firey'), ('prabhjot', 'SPICs'), ('harman', 'bingo'), ('nidhi', 'emotions'), ('danvir', 'string'), ('navpreet', 'tweety'), ('komal', 'dragon'), ('spic', 'spic'); -- -------------------------------------------------------- -- -- Table structure for table `allotbus` -- CREATE TABLE `allotbus` ( `allotid` int(11) NOT NULL, `busno` varchar(11) DEFAULT NULL, `routeid` int(11) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `allotbus` -- INSERT INTO `allotbus` (`allotid`, `busno`, `routeid`) VALUES (1, '101', 1), (2, '102', 2), (3, '103', 3), (4, '104', 4), (5, '105', 5), (6, '106', 6), (7, '107', 7), (8, '108', 8), (9, '109', 9), (10, '110', 10); -- -------------------------------------------------------- -- -- Table structure for table `feedback` -- CREATE TABLE `feedback` ( `fid` int(11) NOT NULL, `name` tinytext, `email` text, `phone` tinytext, `feedback` varchar(1000) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `feedback` -- INSERT INTO `feedback` (`fid`, `name`, `email`, `phone`, `feedback`) VALUES (1, 'Debanik', 'debanikonline@gmail.com', '8194946794', 'Properly tested.'), (2, 'Ashok Kashav', 'ashok.kashav@gmail.com', '7890234560', 'Very Good Debanik'); -- -------------------------------------------------------- -- -- Table structure for table `route_master` -- CREATE TABLE `route_master` ( `routeid` int(11) NOT NULL, `routename` varchar(100) DEFAULT NULL, `startname` varchar(100) DEFAULT NULL, `endname` varchar(100) DEFAULT NULL, `starttime` varchar(11) DEFAULT NULL, `stoptime` varchar(11) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `route_master` -- INSERT INTO `route_master` (`routeid`, `routename`, `startname`, `endname`, `starttime`, `stoptime`) VALUES (1, 'Sec12 PGI to Sec20 Pkl', 'Sector 12 PGI', 'Sector 20 Panchkula', '6:15AM', '8:40PM'), (2, 'Sec12 PGI to MouliJagran', 'Sector 12 PGI', 'Mouli Jagran', '8:00AM', '5:00PM'), (3, 'Sec12 PGI to Sec65 mkt', 'Sector 12 PGI', 'Sector 65 Market', '6:00AM', '8:30PM'), (4, 'ISBT 43 to Mansa Devi', 'ISBT 43', 'Mansa Devi', '6:00AM', '8:30PM'), (5, 'ISBT 17 to Mansa Devi', 'ISBT 17', 'Mansa Devi', '6:00AM', '8:30PM'), (6, 'ISBT 43 to Kaimbwala', 'ISBT 43', 'Kaimbwala', '6:00AM', '8:00PM'), (7, 'ISBT 43 to HighCourt', 'ISBT 43', 'High Court', '6:00AM', '5:30PM'), (8, 'ISBT 43 to IT PARK Chd via Railway Station', 'ISBT 43', 'IT Park Chandigarh', '6:00AM', '7:30PM'), (9, 'ISBT 43 to IT PARK chd\r\nvia Madhya Marg', 'ISBT 43', 'IT Park Chandigarh', '6:00AM', '7:30PM'), (10, 'Sec12 PGI to ISBT 43', 'Sector 12 PGI', 'ISBT 43', '6:00AM', '8:00PM'); -- -------------------------------------------------------- -- -- Table structure for table `stopage_detail` -- CREATE TABLE `stopage_detail` ( `stopid` int(11) NOT NULL, `stopname` varchar(100) DEFAULT NULL, `stoptime` varchar(20) DEFAULT NULL, `routeid` int(11) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `stopage_detail` -- INSERT INTO `stopage_detail` (`stopid`, `stopname`, `stoptime`, `routeid`) VALUES (1, 'PGI OPD', '6:15AM', 1), (2, 'Sector 10', '7:00AM', 1), (3, 'ISBT 17', '7:15AM', 1), (4, 'Sector 8/Sector 18', '7:30AM', 1), (5, 'Sector 7/Sector 19', '7:15AM', 1), (6, 'Grain Market Sector 26', '8:00AM', 1), (7, 'Industrial Area Ph-1', '8:30AM', 1), (8, 'Railway Station', '8:45AM', 1), (9, 'Housing Board', '9:00AM', 1), (10, 'Sector 9', '9:15AM', 1), (11, 'Sector 10', '9:30AM', 1), (12, 'Sector 4 Panchkula', '9:45AM', 1), (13, 'Sector 21 Panchkula', '10:00AM', 1), (14, 'Sector 20 Panchkula', '10:15AM', 1), (15, 'PGI OPD', '8:15AM', 2), (16, 'Sector 10/Sector 16', '8:30AM', 2), (17, 'ISBT 17', '8:45AM', 2), (18, 'Sector 8/Sector 18', '9:00AM', 2), (19, 'Sector 7/Sector 19', '9:15AM', 2), (20, 'Grain Market Sector 26', '9:30AM', 2), (21, 'Industrial Area Ph-1', '9:45AM', 2), (22, 'Railway Station', '10:00AM', 2), (23, 'Railway Crossing', '10:15AM', 2), (24, 'Housing Board', '10:30AM', 2), (25, 'Mouli Jagran', '10:35AM', 2), (26, 'Sector 12 PGI', '6:00AM', 3), (27, 'PGI OPD', '6:15AM', 3), (28, 'Sector 10', '6:30:AM', 3), (29, 'ISBT 17', '6:45AM', 3), (30, 'Aroma Sector 22', '7:00AM', 3), (31, 'Sector 34', '7:10AM', 3), (32, 'Sector 43', '7:15AM', 3), (33, 'ISBT 43', '7:20AM', 3), (34, 'Sector 44', '7:45AM', 3), (35, 'Sector 45', '7:50AM', 3), (36, 'Sector 46', '8:00AM', 3), (37, 'Sector 47', '8:10AM', 3), (38, 'Sector 48', '8:15AM', 3), (39, 'Sector 65', '8:20AM', 3), (40, 'ISBT 43', '6:00AM', 4), (41, 'Sector 44', '6:15AM', 4), (42, 'Sector 45', '6:30:AM', 4), (43, 'Sector 46', '6:45AM', 4), (44, 'Sector 47', '7:00AM', 4), (45, 'Ram Darbar', '7:10AM', 4), (46, 'Tribune Chowk', '7:15AM', 4), (47, 'Paultry Farm', '7:20AM', 4), (48, 'Industrial Area Ph-1', '7:45AM', 4), (49, 'Railway Station', '7:50AM', 4), (50, 'Railway Crossing', '8:00AM', 4), (51, 'Housing Board', '8:10AM', 4), (52, 'Mani Majra', '8:15AM', 4), (53, 'Mansa Devi', '8:20AM', 4), (54, 'ISBT 17', '6:00AM', 5), (55, 'Sector 44', '6:15AM', 5), (56, 'Sector 45', '6:30:AM', 5), (57, 'Sector 47', '6:45AM', 5), (58, 'Tribune Chowk', '7:00AM', 5), (59, 'Industrial Area Ph-1', '7:10AM', 5), (60, 'Railway Crossing', '7:15AM', 5), (61, 'Housing Board', '7:20AM', 5), (62, 'Fun Republic', '7:45AM', 5), (63, 'Mani Majra', '7:50AM', 5), (64, 'Mansa Devi', '8:00AM', 5), (65, 'ISBT 43', '6:00AM', 6), (66, 'Sector 42', '6:15AM', 6), (67, 'Sector 36', '6:30:AM', 6), (68, 'Sector 23', '6:45AM', 6), (69, 'ISBT 17', '7:00AM', 6), (70, 'Sector 9', '7:10AM', 6), (71, 'Sector 3', '7:15AM', 6), (72, 'Punjab Secretriat', '7:20AM', 6), (73, 'High Court', '7:45AM', 6), (74, 'Sukhna Lake', '7:50AM', 6), (75, 'Kaimbwala', '8:00AM', 6), (76, 'ISBT 43', '6:00AM', 7), (77, 'Sector 42', '6:15AM', 7), (78, 'Sector 37', '6:30:AM', 7), (79, 'Sector 24', '6:45AM', 7), (80, 'Sector 23', '6:45AM', 7), (81, 'ISBT 17', '7:00AM', 7), (82, 'Sector 9', '7:10AM', 7), (83, 'Sector 3', '7:15AM', 7), (84, 'High Court', '7:45AM', 7), (85, 'ISBT 43', '6:00AM', 8), (86, 'Sector 43', '6:15AM', 8), (87, 'Sector 36', '6:30:AM', 8), (88, 'Sector 23', '6:45AM', 8), (89, 'ISBT 17', '7:00AM', 8), (90, 'Sector 18', '7:10AM', 8), (91, 'Sector 19', '7:15AM', 8), (92, 'Sector 27', '7:20AM', 8), (93, 'Sector 28', '7:40AM', 8), (94, 'Industrial Area ph-1', '7:50AM', 8), (95, 'Railway Station', '8:00AM', 8), (96, 'Railway Crossing', '8:10AM', 8), (97, 'Housing Board', '8:15AM', 8), (98, 'Mani Majra', '8:20AM', 8), (99, 'Indra Colony', '8:30AM', 8), (100, 'Kishangarh', '8:35AM', 8), (101, 'IT PARK chd', '8:50AM', 8), (102, 'ISBT 43', '6:00AM', 9), (103, 'Sector 42', '6:15AM', 9), (104, 'Sector 36', '6:30:AM', 9), (105, 'Sector 23', '6:45AM', 9), (106, 'ISBT 17', '7:00AM', 9), (107, 'Sector 8', '7:10AM', 9), (108, 'Sector 7', '7:15AM', 9), (109, 'Grain Market Sector 26', '7:20AM', 9), (110, 'Railway Crossing', '7:30AM', 9), (111, 'Housing Board', '7:45AM', 9), (112, 'Mani Majra', '8:00AM', 9), (113, 'Indra Colony', '8:10AM', 9), (114, 'Kishangarh', '8:15AM', 9), (115, 'IT PARK chd', '8:20AM', 9), (116, 'Sector 12 PGI', '6:00AM', 10), (117, 'Sector 11', '6:05AM', 10), (118, 'Sector 30', '6:10:AM', 10), (119, 'Sector 17', '6:15AM', 10), (120, 'ISBT 17', '6:20AM', 10), (121, 'Aroma 22', '6:25AM', 10), (122, 'Sector 34', '6:30AM', 10), (123, 'Sector 44', '6:35AM', 10), (124, 'ISBT 43', '6:40AM', 10); -- -------------------------------------------------------- -- -- Table structure for table `UserDetails` -- CREATE TABLE `UserDetails` ( `cid` int(50) NOT NULL, `cname` varchar(50) DEFAULT NULL, `cmail` varchar(50) DEFAULT NULL, `cphone` int(20) DEFAULT NULL, `canswer` tinytext, `cpassword` varchar(100) DEFAULT NULL, `securityquestion` text ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `UserDetails` -- INSERT INTO `UserDetails` (`cid`, `cname`, `cmail`, `cphone`, `canswer`, `cpassword`, `securityquestion`) VALUES (1, 'spic', 'spic@spic.com', 2147483647, 'spic', 'spic', 'Name of first school'); -- -- Indexes for dumped tables -- -- -- Indexes for table `allotbus` -- ALTER TABLE `allotbus` ADD PRIMARY KEY (`allotid`); -- -- Indexes for table `feedback` -- ALTER TABLE `feedback` ADD PRIMARY KEY (`fid`); -- -- Indexes for table `route_master` -- ALTER TABLE `route_master` ADD PRIMARY KEY (`routeid`); -- -- Indexes for table `stopage_detail` -- ALTER TABLE `stopage_detail` ADD PRIMARY KEY (`stopid`); -- -- Indexes for table `UserDetails` -- ALTER TABLE `UserDetails` ADD PRIMARY KEY (`cid`); -- -- AUTO_INCREMENT for dumped tables -- -- -- AUTO_INCREMENT for table `allotbus` -- ALTER TABLE `allotbus` MODIFY `allotid` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=12; -- -- AUTO_INCREMENT for table `feedback` -- ALTER TABLE `feedback` MODIFY `fid` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; -- -- AUTO_INCREMENT for table `route_master` -- ALTER TABLE `route_master` MODIFY `routeid` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=12; -- -- AUTO_INCREMENT for table `stopage_detail` -- ALTER TABLE `stopage_detail` MODIFY `stopid` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=127; -- -- AUTO_INCREMENT for table `UserDetails` -- ALTER TABLE `UserDetails` MODIFY `cid` int(50) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
create table if not exists `your_database`.`template` ( id bigint(11) auto_increment comment '主键' primary key, created_at bigint(11) null comment '创建时间', updated_at bigint(11) null comment '更新时间', is_delete tinyint(3) default 0 null comment '是否删除' ) comment '模板' charset = utf8mb4; create index idx_created_at on galio.template (created_at); create index idx_is_delete on galio.template (is_delete); create index idx_updated_at on galio.template (updated_at);
SET VERIFY OFF connect "SYS"/"&&sysPassword" as SYSDBA set echo on spool /home/oracle/postScripts.log append UPDATE sys.USER$ set SPARE6=NULL; @/u01/app/oracle/product/12.1.0/dbhome_1/rdbms/admin/dbmssml.sql; execute dbms_datapump_utl.replace_default_dir; commit; connect "SYS"/"&&sysPassword" as SYSDBA alter session set current_schema=ORDSYS; @/u01/app/oracle/product/12.1.0/dbhome_1/ord/im/admin/ordlib.sql; alter session set current_schema=SYS; connect "SYS"/"&&sysPassword" as SYSDBA create or replace directory XMLDIR as '/u01/app/oracle/product/12.1.0/dbhome_1/rdbms/xml'; create or replace directory XSDDIR as '/u01/app/oracle/product/12.1.0/dbhome_1/rdbms/xml/schema'; connect "SYS"/"&&sysPassword" as SYSDBA connect "SYS"/"&&sysPassword" as SYSDBA execute ORACLE_OCM.MGMT_CONFIG_UTL.create_replace_dir_obj; execute dbms_qopatch.replace_logscrpt_dirs; connect "SYS"/"&&sysPassword" as SYSDBA set echo on spool /home/oracle/postDBCreation.log append grant sysdg to sysdg; grant sysbackup to sysbackup; grant syskm to syskm;
/* Navicat MySQL Data Transfer Source Server : MYSQL57 Source Server Version : 50726 Source Host : localhost:3306 Source Database : demo Target Server Type : MYSQL Target Server Version : 50726 File Encoding : 65001 Date: 2020-02-25 02:05:25 */ SET FOREIGN_KEY_CHECKS=0; -- ---------------------------- -- Table structure for cmf_shop_classify -- ---------------------------- DROP TABLE IF EXISTS `cmf_shop_classify`; CREATE TABLE `cmf_shop_classify` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '分类编号', `name` varchar(255) DEFAULT NULL COMMENT '分类名称', `status` int(11) DEFAULT '1' COMMENT '分类状态', `sort` int(11) DEFAULT '1000' COMMENT '分类排序', `classify_id` int(11) DEFAULT '0' COMMENT '所属分类', PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;
-- Main Schema -- Create schemas -- Create tables CREATE TABLE IF NOT EXISTS census_2017 ( state VARCHAR(20) NOT NULL, median_income VARCHAR(10), number_employed BIGINT, number_unemployed BIGINT, number_poverty BIGINT, number_families_in_poverty BIGINT, median_home_value VARCHAR(15), median_gross_rent VARCHAR(10), PRIMARY KEY(state) ); CREATE TABLE IF NOT EXISTS petfinder_data ( city VARCHAR(150), country VARCHAR(2), id VARCHAR(25) NOT NULL UNIQUE, latitude DECIMAL(6, 2), longitude DECIMAL(6, 2), name VARCHAR(150), state VARCHAR(20), zipcode VARCHAR(5) ); CREATE TABLE IF NOT EXISTS census_demographics ( state VARCHAR(20), median_age DECIMAL(3, 1), population BIGINT, pop_white_only BIGINT, pop_black_only BIGINT, pop_american_indian_only BIGINT, pop_native_hawaiian_only BIGINT, pop_two_or_more_races BIGINT, pop_hispanic_origin_only BIGINT ); CREATE TABLE IF NOT EXISTS census_commute_data ( state VARCHAR(20), commute_time_pub_transit DECIMAL(8, 6), commute_time_solo_auto DECIMAL(8, 6), commute_time_walking DECIMAL(8, 6) ); -- IMPORT DATA BEFORE CONTINUING TO FOREIGN KEYS -- -------------IMPORT FOREIGN KEYS------------- -- Create FKs ALTER TABLE census_commute_data ADD FOREIGN KEY (state) REFERENCES census_2017(state) MATCH SIMPLE ; ALTER TABLE census_demographics ADD FOREIGN KEY (state) REFERENCES census_2017(state) MATCH SIMPLE ; ALTER TABLE petfinder_data ADD FOREIGN KEY (state) REFERENCES census_2017(state) MATCH SIMPLE ; -- Create Indexes
/*==============================================================*/ /* Table : blob_values */ /*==============================================================*/ create table blob_values ( b_id INTEGER not null, b_text BLOB SUB_TYPE TEXT, b_image BLOB, primary key (b_id) ); /*==============================================================*/ /* Table : cargo */ /*==============================================================*/ create table cargo ( c_id INTEGER not null, c_dep_id SMALLINT, c_name CHAR(10), c_seal SMALLINT, c_date_came TIMESTAMP, c_date_out TIMESTAMP, c_weight FLOAT, c_width INTEGER, c_height INTEGER, c_cost NUMERIC(12,4), c_attributes BLOB SUB_TYPE TEXT, primary key (c_id) ); /*==============================================================*/ /* Table : date_values */ /*==============================================================*/ create table date_values ( d_id INTEGER not null, d_date DATE, d_time TIME, d_datetime TIMESTAMP, d_timestamp TIMESTAMP, primary key (d_id) ); /*==============================================================*/ /* Table : department */ /*==============================================================*/ create table department ( dep_id SMALLINT not null, dep_name VARCHAR(20), dep_shname CHAR(5), dep_address VARCHAR(255), primary key (dep_id) ); /*==============================================================*/ /* View : department */ /*==============================================================*/ create view dep_view as select * from department; /*==============================================================*/ /* Table : equipment */ /*==============================================================*/ create table equipment ( eq_id INTEGER not null, eq_name VARCHAR(30), eq_type SMALLINT, eq_cost NUMERIC(9,4), eq_date DATE, woff_date DATE, primary key (eq_id) ); /*==============================================================*/ /* Table : equipment2 */ /*==============================================================*/ create table equipment2 ( dep_id SMALLINT not null, eq_id INTEGER not null, primary key (dep_id, eq_id) ); /*==============================================================*/ /* Table : number_values */ /*==============================================================*/ create table number_values ( n_id INTEGER not null, n_tint SMALLINT, n_sint SMALLINT, n_int INTEGER, n_bdecimal DECIMAL(18), n_numeric NUMERIC(9,4), n_float FLOAT, n_real FLOAT, n_dprecission DOUBLE PRECISION, n_money NUMERIC(8,2), primary key (n_id) ); /*==============================================================*/ /* Table : people */ /*==============================================================*/ create table people ( p_id SMALLINT not null, p_dep_id SMALLINT, p_name VARCHAR(40), p_begin_work TIME, p_end_work TIME, p_picture BLOB, p_resume BLOB SUB_TYPE TEXT, p_redundant SMALLINT, primary key (p_id) ); /*==============================================================*/ /* Table : string_values */ /*==============================================================*/ create table string_values ( s_id int not null, s_char CHAR(255), s_varchar VARCHAR(255), s_nchar CHAR(255), s_nvarchar VARCHAR(255), s_bit BLOB SUB_TYPE TEXT, s_varbit BLOB, primary key (s_id) ); /*==============================================================*/ /* Table : Case_Sensitive */ /*==============================================================*/ create table "Case_Sensitive" ( cs_id INTEGER not null, "Cs_Data1" INTEGER, "cs_data1" INTEGER, "cs data1" INTEGER, primary key (cs_id) ); /*==============================================================*/ /* Table : case_sensitive */ /*==============================================================*/ create table case_sensitive ( cs_id INTEGER not null, "CS_DATA1" INTEGER, "CS_Data2" INTEGER, "Cs_Data3" INTEGER, primary key (cs_id) ); /*==============================================================*/ /* Table : high_load */ /*==============================================================*/ create table high_load ( hl_id INTEGER NOT NULL, data1 FLOAT, data2 CHAR(10), primary key (hl_id) ); /*==============================================================*/ /* Table : default_values */ /*==============================================================*/ create table default_values ( d_id INTEGER NOT NULL, d_fld1 INTEGER DEFAULT 123456, d_fld2 FLOAT DEFAULT 123.456, d_fld3 VARCHAR(10) DEFAULT 'xyz', d_fld4 DATE default '2003-12-11', d_fld5 TIME default '23:12:11', d_fld6 TIMESTAMP default '2003-12-11 23:12:11', primary key (d_id) ); /*==============================================================*/ /* Table : domain_values */ /*==============================================================*/ create domain tinteger INT default 123456; create domain tfloat FLOAT default 123.456; create domain tstring VARCHAR(10) default 'xyz'; create table domain_values ( d_id INTEGER not null, d_fld1 tinteger, d_fld2 tfloat, d_fld3 tstring, primary key (d_id) ); alter table cargo add foreign key (c_dep_id) references department (dep_id); alter table equipment2 add foreign key (dep_id) references department (dep_id); alter table equipment2 add foreign key (eq_id) references equipment (eq_id); alter table people add foreign key (p_dep_id) references department (dep_id); SET TERM ^ ; /*==============================================================*/ /* Stored procedure: procedure1 */ /*==============================================================*/ CREATE PROCEDURE PROCEDURE1(P1 INTEGER) RETURNS(R1 INTEGER) AS BEGIN R1 = P1 + 1; SUSPEND; END ^ /*==============================================================*/ /* Stored procedure: procedure2 */ /*==============================================================*/ CREATE PROCEDURE PROCEDURE2 RETURNS(R1 VARCHAR(30)) AS BEGIN FOR SELECT eq_name FROM equipment ORDER BY eq_name INTO :R1 DO SUSPEND; END ^ SET TERM ; ^ /*==============================================================*/ /* Grant privileges to columns */ /*==============================================================*/ grant update(p_resume, p_redundant) on people to SYSDBA; /*==============================================================*/ /* Grant privileges to table */ /*==============================================================*/ grant select on people to SYSDBA;
/* SQLyog Ultimate v13.1.1 (32 bit) MySQL - 10.1.38-MariaDB : Database - omkost_db ********************************************************************* */ /*!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*/`omkost_db` /*!40100 DEFAULT CHARACTER SET latin1 */; USE `omkost_db`; /*Table structure for table `tb_fasilitas_kamar` */ DROP TABLE IF EXISTS `tb_fasilitas_kamar`; CREATE TABLE `tb_fasilitas_kamar` ( `id_fasilitas_kamar` int(20) NOT NULL AUTO_INCREMENT, `luas_kamar` char(30) DEFAULT NULL, `bed` char(6) DEFAULT 'tidak', `meja_belajar` char(6) DEFAULT 'tidak', `tv` char(6) DEFAULT 'tidak', `ac` char(6) DEFAULT 'tidak', `wifi` char(6) DEFAULT 'tidak', `pasutri` char(6) DEFAULT 'tidak', `almari` char(6) DEFAULT 'tidak', `id_kost` int(20) DEFAULT NULL, PRIMARY KEY (`id_fasilitas_kamar`), KEY `id_kost` (`id_kost`), CONSTRAINT `tb_fasilitas_kamar_ibfk_1` FOREIGN KEY (`id_kost`) REFERENCES `tb_kost` (`id_kost`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB AUTO_INCREMENT=30 DEFAULT CHARSET=latin1; /*Data for the table `tb_fasilitas_kamar` */ insert into `tb_fasilitas_kamar`(`id_fasilitas_kamar`,`luas_kamar`,`bed`,`meja_belajar`,`tv`,`ac`,`wifi`,`pasutri`,`almari`,`id_kost`) values (29,' Meter X Meter','ya','ya','ya','ya','ya','ya','ya',16); /*Table structure for table `tb_fasilitas_umum` */ DROP TABLE IF EXISTS `tb_fasilitas_umum`; CREATE TABLE `tb_fasilitas_umum` ( `id_fasilitas_umum` int(20) NOT NULL AUTO_INCREMENT, `ruang_makan` char(6) DEFAULT 'tidak', `ruang_tamu` char(6) DEFAULT 'tidak', `ruang_jemuran` char(6) DEFAULT 'tidak', `taman` char(6) DEFAULT 'tidak', `mushola` char(6) DEFAULT 'tidak', `dapur` char(6) DEFAULT 'tidak', `bawa_hewan` char(6) DEFAULT 'tidak', `akses_kunci_gerbang` char(6) DEFAULT 'tidak', `cctv` char(6) DEFAULT 'tidak', `fasilitas_lain` char(60) DEFAULT NULL, `id_kost` int(20) DEFAULT NULL, PRIMARY KEY (`id_fasilitas_umum`), KEY `id_kost` (`id_kost`), CONSTRAINT `tb_fasilitas_umum_ibfk_1` FOREIGN KEY (`id_kost`) REFERENCES `tb_kost` (`id_kost`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=latin1; /*Data for the table `tb_fasilitas_umum` */ /*Table structure for table `tb_gambar_detail` */ DROP TABLE IF EXISTS `tb_gambar_detail`; CREATE TABLE `tb_gambar_detail` ( `id_gambar_detail` int(20) NOT NULL AUTO_INCREMENT, `gambar_1` char(200) DEFAULT NULL, `gambar_2` char(200) DEFAULT NULL, `gambar_3` char(200) DEFAULT NULL, `gambar_4` char(200) DEFAULT NULL, `id_kost` int(20) DEFAULT NULL, PRIMARY KEY (`id_gambar_detail`), KEY `id_kost` (`id_kost`), CONSTRAINT `tb_gambar_detail_ibfk_1` FOREIGN KEY (`id_kost`) REFERENCES `tb_kost` (`id_kost`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB AUTO_INCREMENT=52 DEFAULT CHARSET=latin1; /*Data for the table `tb_gambar_detail` */ insert into `tb_gambar_detail`(`id_gambar_detail`,`gambar_1`,`gambar_2`,`gambar_3`,`gambar_4`,`id_kost`) values (45,'302464.jpg','3024711.jpg','302464.jpg','302473.jpg',16), (46,'3024711.jpg','3024711.jpg','3024711.jpg','3024711.jpg',17), (50,'302472.jpg','3024641.jpg','combo.PNG','snip.PNG',NULL), (51,'combo1.PNG','combo1.PNG','combo1.PNG','combo1.PNG',18); /*Table structure for table `tb_kamar_mandi` */ DROP TABLE IF EXISTS `tb_kamar_mandi`; CREATE TABLE `tb_kamar_mandi` ( `id_kamar_mandi` int(20) NOT NULL AUTO_INCREMENT, `kamar_mandi_dalam` char(6) DEFAULT 'tidak', `shower` char(6) DEFAULT 'tidak', `kloset_duduk` char(6) DEFAULT 'tidak', `ember_mandi` char(6) DEFAULT 'tidak', `air_panas` char(6) DEFAULT 'tidak', `id_kost` int(20) DEFAULT NULL, PRIMARY KEY (`id_kamar_mandi`), KEY `id_kost` (`id_kost`), CONSTRAINT `tb_kamar_mandi_ibfk_1` FOREIGN KEY (`id_kost`) REFERENCES `tb_kost` (`id_kost`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=latin1; /*Data for the table `tb_kamar_mandi` */ insert into `tb_kamar_mandi`(`id_kamar_mandi`,`kamar_mandi_dalam`,`shower`,`kloset_duduk`,`ember_mandi`,`air_panas`,`id_kost`) values (9,'tidak','ya','ya','ya','ya',17), (11,'tidak','ya','ya','ya','tidak',18); /*Table structure for table `tb_kost` */ DROP TABLE IF EXISTS `tb_kost`; CREATE TABLE `tb_kost` ( `id_kost` int(20) NOT NULL AUTO_INCREMENT, `nama_kost` char(25) DEFAULT NULL, `alamat_kost` char(40) DEFAULT NULL, `harga_kost` char(8) DEFAULT NULL, `jenis_kost` char(6) DEFAULT NULL, `jumlah_kamar` char(3) DEFAULT NULL, `kamar_tersedia` char(3) DEFAULT NULL, `penghuni_kost` char(6) DEFAULT NULL, `id_pemilik` int(20) DEFAULT NULL, PRIMARY KEY (`id_kost`), KEY `id_pemilik` (`id_pemilik`), CONSTRAINT `tb_kost_ibfk_1` FOREIGN KEY (`id_pemilik`) REFERENCES `tb_pemilik` (`id_pemilik`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB AUTO_INCREMENT=22 DEFAULT CHARSET=latin1; /*Data for the table `tb_kost` */ insert into `tb_kost`(`id_kost`,`nama_kost`,`alamat_kost`,`harga_kost`,`jenis_kost`,`jumlah_kamar`,`kamar_tersedia`,`penghuni_kost`,`id_pemilik`) values (16,'KOST 1','Jl. Satu','1000.000','bulan','5','3','PUTRI',1), (17,'KOST 2','Jl. Dua','750000','bulan','7','4','CAMPUR',1), (18,'KOST 3','Jl. Tiga','900000','bulan','12','9','CAMPUR',1); /*Table structure for table `tb_parkir` */ DROP TABLE IF EXISTS `tb_parkir`; CREATE TABLE `tb_parkir` ( `id_parkir` int(20) NOT NULL AUTO_INCREMENT, `mobil` char(6) DEFAULT 'tidak', `motor` char(6) DEFAULT 'tidak', `sepeda` char(6) DEFAULT 'tidak', `id_kost` int(20) DEFAULT NULL, PRIMARY KEY (`id_parkir`), KEY `id_kost` (`id_kost`), CONSTRAINT `tb_parkir_ibfk_1` FOREIGN KEY (`id_kost`) REFERENCES `tb_kost` (`id_kost`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=latin1; /*Data for the table `tb_parkir` */ insert into `tb_parkir`(`id_parkir`,`mobil`,`motor`,`sepeda`,`id_kost`) values (10,'ya','ya','ya',18), (11,'ya','tidak','ya',16); /*Table structure for table `tb_pemilik` */ DROP TABLE IF EXISTS `tb_pemilik`; CREATE TABLE `tb_pemilik` ( `id_pemilik` int(20) NOT NULL AUTO_INCREMENT, `nama_pemilik` char(30) DEFAULT NULL, `kontak_pemilik` char(15) DEFAULT NULL, `email` char(20) DEFAULT NULL, `password` varchar(50) DEFAULT NULL, PRIMARY KEY (`id_pemilik`) ) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=latin1; /*Data for the table `tb_pemilik` */ insert into `tb_pemilik`(`id_pemilik`,`nama_pemilik`,`kontak_pemilik`,`email`,`password`) values (1,'Hari','089630035749','hari@hari.com','21232f297a57a5a743894a0e4a801fc3'), (11,'Hari kurniawan','082118301993','yabiyabi12@gmail.com','d84f8fcb02903f2f7909d3296fc751bb'), (12,'','','','d41d8cd98f00b204e9800998ecf8427e'), (13,'wqeqwe','765','asu@asu.asu','9cdfb439c7876e703e307864c9167a15'), (14,'43242','4','4@4.4','310dcbbf4cce62f762a2aaa148d556bd'); /*!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 */;
CREATE TABLE Majors ( MajorID INT PRIMARY KEY IDENTITY, [Name] VARCHAR(50) NOT NULL ) CREATE TABLE Students ( StudentID INT PRIMARY KEY IDENTITY, StudentNumber CHAR(10), StudentName VARCHAR(50), MajorID INT FOREIGN KEY REFERENCES Majors(MajorID) ) CREATE TABLE Payments ( PaymentID INT PRIMARY KEY IDENTITY, PaymentDate DATE, PaymentAmount DECIMAL(15,2), StudentID INT FOREIGN KEY REFERENCES Students(StudentID) ) CREATE TABLE Subjects ( SubjectID INT PRIMARY KEY IDENTITY, SubjectName VARCHAR(50) NOT NULL ) CREATE TABLE Agenda ( StudentID INT FOREIGN KEY REFERENCES Students(StudentID), SubjectID INT FOREIGN KEY REFERENCES Subjects(SubjectID), CONSTRAINT PK_StudentID_SubjectID PRIMARY KEY (StudentID,SubjectID) )
update scotter set marca = :marca, modelo = :modelo, precio = :precio, ciudad = :ciudad, vendedor = :vendedor, estado = :estado, foto = :foto where id = :id
-- phpMyAdmin SQL Dump -- version 3.5.2.2 -- http://www.phpmyadmin.net -- -- Хост: localhost -- Время создания: Июл 30 2013 г., 11:30 -- Версия сервера: 5.5.27 -- Версия PHP: 5.4.7 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8 */; -- -- База данных: `dle` -- -- -------------------------------------------------------- -- -- Структура таблицы `qa_category` -- CREATE TABLE IF NOT EXISTS `qa_category` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(50) NOT NULL, `link` varchar(50) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=cp1251 AUTO_INCREMENT=4 ; -- -- Дамп данных таблицы `qa_category` -- INSERT INTO `qa_category` (`id`, `name`, `link`) VALUES (1, 'Общие вопросы по ЕГЭ', 'obshie_voprosy_po_ege'), (2, 'Общие вопросы по ГИА', 'obshie_voprosy_po_gia'), (3, 'Вопросы по ВУЗам', 'voprosy_po_vuzam'); -- -------------------------------------------------------- -- -- Структура таблицы `qa_comment` -- CREATE TABLE IF NOT EXISTS `qa_comment` ( `id` int(11) NOT NULL AUTO_INCREMENT, `text` text NOT NULL, `id_question` int(11) NOT NULL, PRIMARY KEY (`id`), KEY `id_comment` (`id_question`) ) ENGINE=MyISAM DEFAULT CHARSET=cp1251 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Структура таблицы `qa_question` -- CREATE TABLE IF NOT EXISTS `qa_question` ( `id` int(11) NOT NULL AUTO_INCREMENT, `title` varchar(100) NOT NULL, `text` text NOT NULL, `id_category` int(11) NOT NULL, PRIMARY KEY (`id`), KEY `id_category` (`id_category`) ) ENGINE=MyISAM DEFAULT CHARSET=cp1251 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 */;
-- Viene el manager de Musimundos y para organizar su inventario de discos te pide un informe con todos los albumes que posee la empresa. Realizá una consulta que devuelva todos los álbumes. -- Ingresá de la columna titulo el nombre del álbum que aparece quinto. SELECT * FROM albumes; -- WHERE id = 5; -- Rta : Big Ones -- Para realizar un control de ventas, Musimundos te pide el primer nombre y teléfono de todos sus clientes. -- Insertá el número de teléfono del segundo cliente que obtuviste. SELECT * FROM clientes; -- WHERE id = 2; -- Rta: +49 0711 2842222
set hive.execution.engine=spark; drop table if exists dwd.dwd_report_risk_node_info; create table if not exists dwd.dwd_report_risk_node_info ( `version_no` string , `apply_no` string , `partner_bank_name` string COMMENT '合作银行', `company_name` string COMMENT '公司名称', `product_name` string COMMENT '产品名称', `tail_release_node` string COMMENT '放款节点', `channel_man` string COMMENT '渠道经理', `seller_name` string COMMENT '借款人', `partner_name` string COMMENT '合作机构', `baodan_date` timestamp COMMENT '报单日期', `baodan_time` string COMMENT '报单时间', `baodan_user_name` string COMMENT '报单人员', `sc_date` timestamp COMMENT '审查日期', `sc_time` string COMMENT '审查时间', `sc_status` string COMMENT '审查结果', `sc_opinion` string COMMENT '审查意见', `sc_user_name` string COMMENT '审查人员', `sc_rel_use_time` bigint, `sp_date` timestamp COMMENT '审批日期', `sp_time` string COMMENT '审批时间', `sp_status` string COMMENT '审批结果', `sp_opinion` string COMMENT '审批意见', `sp_user_name` string COMMENT '审批人员', `sp_rel_use_time` bigint, `first_spbj_date` timestamp COMMENT '第一次审批补件时间', `first_spbj_time` string , `materials_full_date` timestamp COMMENT '确认录入完成时间', `input_end_date` timestamp COMMENT '确认录入完成时间', `standard_sc_time` timestamp , `standard_spbj_time` string, `standard_sp_time` timestamp , `standard_baodan_time` timestamp , `sc_use_time` bigint comment '审查处理时间(小时)', `sp_use_time` bigint comment '审批处理时间(小时)', `spbj_use_time` double, `risk_level` string COMMENT '风险等级', `is_spbj` string , `ydkyh_name` string COMMENT '原贷款机构', `xdkyh_name` string COMMENT '新贷款机构', `mqspsx` string , `ydkjkrlx` string COMMENT '原贷款借款人类型', `xdkjkrlx` string COMMENT '新贷款借款人类型', `rule_level` string COMMENT '难易程度', `borrow_amount` double COMMENT '借款金额', `scsd_date` timestamp COMMENT '审查锁定时间' ); with tmp_check_opinion as ( select tmp.PROC_INST_ID_ ,min(case when tmp.TASK_KEY_ = 'UserTask2' then tmp.COMPLETE_TIME_ end ) UserTask2_time -- baodan_time ,min(case when tmp.TASK_KEY_ = 'UserTask2' then tmp.AUDITOR_NAME_ end ) UserTask2_user -- baodan_user_name ,min(case when tmp.TASK_KEY_ = 'ApplyCheck' then tmp.AUDITOR_NAME_ end ) ApplyCheck_user -- sc_user_name ,min(case when tmp.TASK_KEY_ = 'ApplyCheck' then tmp.COMPLETE_TIME_ end ) ApplyCheck_time -- sc_time ,min(case when tmp.TASK_KEY_ = 'ApplyCheck' then tmp.STATUS_ end ) ApplyCheck_status -- sc_status ,min(case when tmp.TASK_KEY_ = 'ApplyCheck' then tmp.OPINION_ end ) ApplyCheck_opinion -- sp_opinion ,min(case when tmp.TASK_KEY_ = 'UserTask3' then tmp.COMPLETE_TIME_ end ) UserTask3_time ,min(case when tmp.TASK_KEY_ = 'UserTask3' then tmp.STATUS_ end ) UserTask3_status ,min(case when tmp.TASK_KEY_ = 'UserTask3' then tmp.OPINION_ end ) UserTask3_opinion ,min(case when tmp.TASK_KEY_ = 'UserTask3' then tmp.AUDITOR_NAME_ end ) UserTask3_user ,min(case when tmp.TASK_KEY_ = 'UserTask4' then tmp.COMPLETE_TIME_ end ) UserTask4_time ,min(case when tmp.TASK_KEY_ = 'UserTask4' then tmp.STATUS_ end ) UserTask4_status ,min(case when tmp.TASK_KEY_ = 'UserTask4' then tmp.OPINION_ end ) UserTask4_opinion ,min(case when tmp.TASK_KEY_ = 'UserTask4' then tmp.AUDITOR_NAME_ end ) UserTask4_user ,min(case when tmp.TASK_KEY_ = 'Investigate' then tmp.ASSIGN_TIME_ end ) Investigate_assign_time ,min(case when tmp.TASK_KEY_ = 'ManCheck' then tmp.COMPLETE_TIME_ end ) ManCheck_time ,min(case when tmp.TASK_KEY_ = 'ManCheck' then tmp.STATUS_ end ) ManCheck_status ,min(case when tmp.TASK_KEY_ = 'ManCheck' then tmp.OPINION_ end ) ManCheck_opinion ,min(case when tmp.TASK_KEY_ = 'ManCheck' then tmp.AUDITOR_NAME_ end ) ManCheck_user ,min(case when tmp.TASK_KEY_ = 'Investigate' then tmp.COMPLETE_TIME_ end ) Investigate_time ,min(case when tmp.TASK_KEY_ = 'Investigate' then tmp.STATUS_ end ) Investigate_status ,min(case when tmp.TASK_KEY_ = 'Investigate' then tmp.OPINION_ end ) Investigate_opinion ,min(case when tmp.TASK_KEY_ = 'Investigate' then tmp.AUDITOR_NAME_ end ) Investigate_user from( select b.*, row_number() over(partition by b.PROC_INST_ID_, b.TASK_KEY_ order by b.COMPLETE_TIME_) rank from ods.ods_bpms_bpm_check_opinion b where b.COMPLETE_TIME_ is not null ) tmp where rank = 1 group by tmp.PROC_INST_ID_ ), tmp_check_opinion_desc as ( select tmp.PROC_INST_ID_ ,min(case when tmp.TASK_KEY_ = 'UserTask4' then tmp.AUDITOR_NAME_ end ) UserTask4_user ,min(case when tmp.TASK_KEY_ = 'UserTask4' then tmp.COMPLETE_TIME_ end ) UserTask4_time ,min(case when tmp.TASK_KEY_ = 'UserTask4' then tmp.STATUS_ end ) UserTask4_status ,min(case when tmp.TASK_KEY_ = 'UserTask4' then tmp.OPINION_ end ) UserTask4_opinion ,min(case when tmp.TASK_KEY_ = 'ManCheck' then tmp.COMPLETE_TIME_ end ) ManCheck_time ,min(case when tmp.TASK_KEY_ = 'ManCheck' then tmp.STATUS_ end ) ManCheck_status ,min(case when tmp.TASK_KEY_ = 'ManCheck' then tmp.OPINION_ end ) ManCheck_opinion ,min(case when tmp.TASK_KEY_ = 'ManCheck' then tmp.AUDITOR_NAME_ end ) ManCheck_user from( select b.*, row_number() over(partition by b.PROC_INST_ID_, b.TASK_KEY_ order by b.COMPLETE_TIME_ desc) rank from ods.ods_bpms_bpm_check_opinion b where b.COMPLETE_TIME_ is not null ) tmp where rank = 1 group by tmp.PROC_INST_ID_ ), tmp_biz_missing_materials as ( SELECT bmm.apply_no ,max(id) max_id ,min(bmm.create_time) min_create_time FROM ods.ods_bpms_biz_missing_materials bmm where bmm.node_id = "Investigate" group by bmm.apply_no ), tmp_matter_record as ( select apply_no, MAX(bomr.create_time) InputInfoComplete_time, Max(bomr.handle_time) InputInfoComplete_h_time from ods.ods_bpms_biz_order_matter_record bomr where matter_key='InputInfoComplete' group by apply_no ), tmp_ods_bpms_b_product_node as ( select * from ( select a.* ,ROW_NUMBER() OVER(PARTITION BY loan_node_code ORDER BY create_time desc) rn from ods.ods_bpms_b_product_node a ) as a where rn = 1 ), tmp_all as ( SELECT 'V1.5' as version_no, t1.apply_no apply_no, t1.partner_bank_name, case when t1.man_check_first = 'Y' then '先审批后面签' when t1.man_check_first = 'N' then '先面签后审批' end mqspsx, t1.product_name product_name_o, t1.house_no, so_1.NAME_ company_name, IF(t2.PROC_DEF_KEY_ = 'bizApply_zztfb','郑州提放保',t1.product_name) product_name, nvl(sd_1.name_, bpn.loan_node_name) tail_release_node , -- 放款节点, t1.sales_user_name channel_man, t1.seller_name seller_name, t1.partner_insurance_name partner_name, DATE_FORMAT(tco.UserTask2_time,'yyyy-MM-dd') baodan_date, DATE_FORMAT(tco.UserTask2_time,'HH:mm:ss') baodan_time, tco.UserTask2_user baodan_user_name, (case when t1.apply_status = "finished" and tco.ApplyCheck_user = "系统自动终止" then DATE_FORMAT(tco.ApplyCheck_time,'yyyy-MM-dd') else DATE_FORMAT(tco.UserTask3_time,'yyyy-MM-dd') end) sc_date, (case when t1.apply_status = "finished" and tco.ApplyCheck_user = "系统自动终止" then DATE_FORMAT(tco.ApplyCheck_time,'HH:mm:ss') else DATE_FORMAT(tco.UserTask3_time,'HH:mm:ss') end) sc_time, (case when t1.apply_status = "finished" and tco.ApplyCheck_user = "系统自动终止" then tco.ApplyCheck_status else tco.UserTask3_status end) sc_status, (case when t1.apply_status = "finished" and tco.ApplyCheck_user = "系统自动终止" then tco.ApplyCheck_opinion else tco.UserTask3_opinion end) sc_opinion, (case when t1.apply_status = "finished" and tco.ApplyCheck_user = "系统自动终止" then tco.ApplyCheck_user else tco.ApplyCheck_user end) sc_user_name, null sc_rel_use_time, DATE_FORMAT(tcod.UserTask4_time,'yyyy-MM-dd') sp_date, DATE_FORMAT(tcod.UserTask4_time,'HH:mm:ss') sp_time, tcod.UserTask4_status sp_status, tcod.UserTask4_opinion sp_opinion, tcod.UserTask4_user sp_user_name, null sp_rel_use_time, null first_spbj_date, null first_spbj_time, tco.Investigate_assign_time scsd_date -- 审查锁定时间 FROM ods.ods_bpms_biz_apply_order t1 left join ods.ods_bpms_bpm_pro_inst t2 on t1.flow_instance_id = t2.ID_ left join ods.ods_bpms_biz_isr_mixed t3 on t1.apply_no = t3.apply_no left join ods.ods_bpms_biz_fee_summary t4 on t1.apply_no = t4.apply_no left join ods.ods_bpms_sys_org so_1 on t1.branch_id = so_1.CODE_ left join ods.ods_bpms_sys_dic sd_1 on sd_1.key_=t3.tail_release_node and sd_1.type_id_ = "10000047750219" left join tmp_ods_bpms_b_product_node bpn on bpn.loan_node_code=t3.tail_release_node left join tmp_check_opinion tco on t1.flow_instance_id = tco.PROC_INST_ID_ left join tmp_check_opinion_desc tcod on t1.flow_instance_id = tcod.PROC_INST_ID_ WHERE t2.PROC_DEF_KEY_ IN ( 'bizApply_all_cash', 'bizApply_all_insure' ) union all SELECT 'V1.5' as version_no, t1.apply_no apply_no, t1.partner_bank_name, case when t1.man_check_first = 'Y' then '先审批后面签' when t1.man_check_first = 'N' then '先面签后审批' end mqspsx, t1.product_name product_name_o, t1.house_no, so_1.NAME_ company_name, IF (t2.PROC_DEF_KEY_ = 'bizApply_zztfb','郑州提放保',t1.product_name) product_name, nvl(sd_1.name_, bpn.loan_node_name) tail_release_node , --放款节点, t1.sales_user_name channel_man, t1.seller_name seller_name, t1.partner_insurance_name partner_name, DATE_FORMAT(tco.UserTask3_time,'yyyy-MM-dd') baodan_date, DATE_FORMAT(tco.UserTask3_time,'HH:mm:ss') baodan_time, tco.UserTask3_user baodan_user_name, (case when t1.apply_status = "finished" and tco.ApplyCheck_user = "系统自动终止" then DATE_FORMAT(tco.ApplyCheck_time,'yyyy-MM-dd') else DATE_FORMAT(tco.UserTask4_time,'yyyy-MM-dd') end) sc_date, (case when t1.apply_status = "finished" and tco.ApplyCheck_user = "系统自动终止" then DATE_FORMAT(tco.ApplyCheck_time,'yyyy-MM-dd') else DATE_FORMAT(tco.UserTask4_time,'HH:mm:ss') end) sc_time, (case when t1.apply_status = "finished" and tco.ApplyCheck_user = "系统自动终止" then tco.ApplyCheck_status else tco.UserTask4_status end) sc_status, (case when t1.apply_status = "finished" and tco.ApplyCheck_user = "系统自动终止" then tco.ApplyCheck_opinion else tco.UserTask4_opinion end) sc_opinion, (case when t1.apply_status = "finished" and tco.ApplyCheck_user = "系统自动终止" then tco.ApplyCheck_user else tco.UserTask4_user end) sc_user_name, null sc_rel_use_time, DATE_FORMAT(tcod.UserTask4_time,'yyyy-MM-dd') sp_date, DATE_FORMAT(tcod.UserTask4_time,'HH:mm:ss') sp_time, tcod.UserTask4_status sp_status, tcod.UserTask4_opinion sp_opinion, tcod.UserTask4_user sp_user_name, null sp_rel_use_time, null first_spbj_date, null first_spbj_time, tco.Investigate_assign_time scsd_date -- 审查锁定时间 FROM ods.ods_bpms_biz_apply_order t1 left join ods.ods_bpms_bpm_pro_inst t2 on t1.flow_instance_id = t2.ID_ left join ods.ods_bpms_biz_isr_mixed t3 on t1.apply_no = t3.apply_no left join ods.ods_bpms_biz_fee_summary t4 on t1.apply_no = t4.apply_no left join ods.ods_bpms_sys_org so_1 on t1.branch_id = so_1.CODE_ left join ods.ods_bpms_sys_dic sd_1 on sd_1.key_=t3.tail_release_node and sd_1.type_id_ = "10000047750219" left join tmp_ods_bpms_b_product_node bpn on bpn.loan_node_code=t3.tail_release_node left join tmp_check_opinion tco on t1.flow_instance_id = tco.PROC_INST_ID_ left join tmp_check_opinion_desc tcod on t1.flow_instance_id = tcod.PROC_INST_ID_ WHERE t2.PROC_DEF_KEY_ IN ( 'bizApply_zztfb' ) union all SELECT 'V2.0' as version_no, t1.apply_no apply_no, t1.partner_bank_name, case when t1.man_check_first = 'Y' then '先审批后面签' when t1.man_check_first = 'N' then '先面签后审批' end mqspsx, t1.product_name product_name_o, t1.house_no, so_1.NAME_ company_name, IF(t2.PROC_DEF_KEY_ = 'bizApply_zztfb','郑州提放保',t1.product_name) product_name, nvl(sd_1.name_, bpn.loan_node_name) tail_release_node , -- 放款节点, t1.sales_user_name channel_man, t1.seller_name seller_name, t1.partner_insurance_name partner_name, -- 当单子被系统拒绝时,biz_order_matter_record不会存储相关的数据, 只有bpm_check_opinion表中存在 DATE_FORMAT(tco.ApplyCheck_time,'yyyy-MM-dd') baodan_date, DATE_FORMAT(tco.ApplyCheck_time,'HH:mm:ss') baodan_time, tco.ApplyCheck_user baodan_user_name, (case when t1.apply_status = "finished" and tco.ApplyCheck_user = "系统自动终止" then DATE_FORMAT(tco.ApplyCheck_time,'yyyy-MM-dd') else DATE_FORMAT(tco.ManCheck_time,'yyyy-MM-dd') end) sc_date, (case when t1.apply_status = "finished" and tco.ApplyCheck_user = "系统自动终止" then DATE_FORMAT(tco.ApplyCheck_time,'HH:mm:ss') else DATE_FORMAT(tco.ManCheck_time,'HH:mm:ss') end) sc_time, (case when t1.apply_status = "finished" and tco.ApplyCheck_user = "系统自动终止" then tco.ApplyCheck_status else tco.ManCheck_status end) sc_status, (case when t1.apply_status = "finished" and tco.ApplyCheck_user = "系统自动终止" then tco.ApplyCheck_opinion else tco.ManCheck_opinion end) sc_opinion, (case when t1.apply_status = "finished" and tco.ApplyCheck_user = "系统自动终止" then tco.ApplyCheck_user else tco.ManCheck_user end) sc_user_name, NULL sc_rel_use_time, null sp_date, null sp_time, null sp_status, null sp_opinion, null sp_user_name, NULL sp_rel_use_time, null first_spbj_date, null first_spbj_time, tco.Investigate_assign_time scsd_date -- 审查锁定时间 FROM ods.ods_bpms_biz_apply_order t1 left join ods.ods_bpms_bpm_pro_inst t2 on t1.flow_instance_id = t2.ID_ left join ods.ods_bpms_biz_isr_mixed t3 on t1.apply_no = t3.apply_no left join ods.ods_bpms_biz_fee_summary t4 on t1.apply_no = t4.apply_no left join ods.ods_bpms_sys_org so_1 on t1.branch_id = so_1.CODE_ left join ods.ods_bpms_sys_dic sd_1 on sd_1.key_=t3.tail_release_node and sd_1.type_id_ = "10000047750219" left join tmp_ods_bpms_b_product_node bpn on bpn.loan_node_code=t3.tail_release_node left join tmp_check_opinion tco on t1.flow_instance_id = tco.PROC_INST_ID_ left join tmp_check_opinion_desc tcod on t1.flow_instance_id = tcod.PROC_INST_ID_ WHERE t2.PROC_DEF_KEY_ IN ( 'bizApplyFlowCash_v2', 'bizApplyFlowIns_v2', 'bizApply_mortgage', 'bizApplyTransition', 'bizApply_mfb', 'bizApplyFlowInsurance_v2' ) UNION ALL SELECT 'V2.5' as version_no, t1.apply_no apply_no, t1.partner_bank_name, case when t1.man_check_first = 'Y' then '先审批后面签' when t1.man_check_first = 'N' then '先面签后审批' end mqspsx, t1.product_name product_name_o, t1.house_no, so_1.NAME_ company_name, IF (t2.PROC_DEF_KEY_ = 'bizApply_zztfb','郑州提放保',t1.product_name) product_name, nvl(sd_1.name_, bpn.loan_node_name) tail_release_node , --放款节点, t1.sales_user_name channel_man, t1.seller_name seller_name, t1.partner_insurance_name partner_name, -- 当单子被系统拒绝时,biz_order_matter_record不会存储相关的数据, 只有bpm_check_opinion表中存在 DATE_FORMAT(tco.ApplyCheck_time,'yyyy-MM-dd') baodan_date, DATE_FORMAT(tco.ApplyCheck_time,'HH:mm:ss') baodan_time, tco.ApplyCheck_user baodan_user_name, case when t1.apply_status = "finished" and tco.ApplyCheck_user = "系统自动终止" then DATE_FORMAT(tco.ApplyCheck_time,'yyyy-MM-dd') else DATE_FORMAT(tco.Investigate_time,'yyyy-MM-dd') end sc_date, case when t1.apply_status = "finished" and tco.ApplyCheck_user = "系统自动终止" then DATE_FORMAT(tco.ApplyCheck_time,'HH:mm:ss') else DATE_FORMAT(tco.Investigate_time,'HH:mm:ss') end sc_time, case when t1.apply_status = "finished" and tco.ApplyCheck_user = "系统自动终止" then tco.ApplyCheck_status else tco.Investigate_status end sc_status, case when t1.apply_status = "finished" and tco.ApplyCheck_user = "系统自动终止" then tco.ApplyCheck_opinion else tco.Investigate_opinion end sc_opinion, case when t1.apply_status = "finished" and tco.ApplyCheck_user = "系统自动终止" then tco.ApplyCheck_user else tco.Investigate_user end sc_user_name, NULL sc_rel_use_time, DATE_FORMAT(tcod.ManCheck_time,'yyyy-MM-dd') sp_date, DATE_FORMAT(tcod.ManCheck_time,'HH:mm:ss') sp_time, tcod.ManCheck_status sp_status, tcod.ManCheck_opinion sp_opinion, tcod.ManCheck_user sp_user_name, NULL sp_rel_use_time, to_date(tbmm.min_create_time) first_spbj_date, date_format(tbmm.min_create_time, "HH:mm:ss") first_spbj_time, tco.Investigate_assign_time scsd_date -- 审查锁定时间 FROM ods.ods_bpms_biz_apply_order t1 left join ods.ods_bpms_bpm_pro_inst t2 on t1.flow_instance_id = t2.ID_ left join ods.ods_bpms_biz_isr_mixed t3 on t1.apply_no = t3.apply_no left join ods.ods_bpms_biz_fee_summary t4 on t1.apply_no = t4.apply_no left join ods.ods_bpms_sys_org so_1 on t1.branch_id = so_1.CODE_ left join ods.ods_bpms_sys_dic sd_1 on sd_1.key_=t3.tail_release_node and sd_1.type_id_ = "10000047750219" left join tmp_ods_bpms_b_product_node bpn on bpn.loan_node_code=t3.tail_release_node left join tmp_check_opinion tco on t1.flow_instance_id = tco.PROC_INST_ID_ left join tmp_check_opinion_desc tcod on t1.flow_instance_id = tcod.PROC_INST_ID_ left join tmp_biz_missing_materials tbmm on t1.apply_no = tbmm.apply_no WHERE t2.PROC_DEF_KEY_ IN ( 'bizApplyFlowCash_v2_5', 'bizApplyFlowIns_v2_5', 'bizApplyFlowIns_mfb' ) ) insert overwrite table dwd.dwd_report_risk_node_info select a.version_no version_no -- 版本号 ,a.apply_no apply_no ,a.partner_bank_name -- 合作银行 ,a.company_name company_name -- 公司名称 ,a.product_name product_name -- 业务类型 ,a.tail_release_node tail_release_node -- 放款节点 ,a.channel_man channel_man -- 渠道经理 ,a.seller_name seller_name -- 借款人 ,a.partner_name partner_name -- 机构 ,a.baodan_date baodan_date -- 报审日期 ,a.baodan_time baodan_time -- 报审时间 ,a.baodan_user_name baodan_user_name -- 报审人员 ,a.sc_date sc_date -- 审查日期 ,a.sc_time sc_time -- 审查时间 ,a.sc_status sc_status -- 审查结果 ,a.sc_opinion sc_opinion -- 审查意见 ,case when a.sc_status = "awaiting_check" then substr(a.sc_opinion, 1, INSTR("已",a.sc_opinion) - 1) else a.sc_user_name end sc_user_name -- 审查人员 ,a.sc_rel_use_time sc_rel_use_time -- `sc_rel_use_time` ,a.sp_date sp_date -- 审批日期 ,a.sp_time sp_time -- 审批时间 ,a.sp_status sp_status -- 审批结果 ,a.sp_opinion sp_opinion -- 审批意见 ,a.sp_user_name sp_user_name -- 审批人员 ,a.sp_rel_use_time sp_rel_use_time -- ,a.first_spbj_date ,a.first_spbj_time ,tmr.InputInfoComplete_time materials_full_date -- '确认录入完成时间', ,tmr.InputInfoComplete_h_time input_end_date -- '确认录入完成时间', ,(CASE WHEN DATE_FORMAT(concat(sc_date," ", sc_time),'H') <9 THEN CONCAT(DATE_FORMAT(concat(sc_date," ", sc_time),'yyyy-MM-dd'),' 09:00:00') WHEN DATE_FORMAT(concat(sc_date," ", sc_time),'H') BETWEEN 12 AND 13 THEN CONCAT(DATE_FORMAT(concat(sc_date," ", sc_time),'yyyy-MM-dd'),' 14:00:00') WHEN DATE_FORMAT(concat(sc_date," ", sc_time),'H') >= 18 THEN CONCAT(DATE_FORMAT(DATE_ADD(concat(sc_date," ", sc_time),1),'yyyy-MM-dd'),' 09:00:00') ELSE concat(sc_date," ", sc_time) END) AS standard_sc_time ,(CASE WHEN DATE_FORMAT(concat(first_spbj_date," ", first_spbj_time),'H') <9 THEN CONCAT(DATE_FORMAT(concat(first_spbj_date," ", first_spbj_time),'yyyy-MM-dd'),' 09:00:00') WHEN DATE_FORMAT(concat(first_spbj_date," ", first_spbj_time),'H') BETWEEN 12 AND 13 THEN CONCAT(DATE_FORMAT(concat(first_spbj_date," ", first_spbj_time),'yyyy-MM-dd'),' 14:00:00') WHEN DATE_FORMAT(concat(first_spbj_date," ", first_spbj_time),'H') >= 18 THEN CONCAT(DATE_FORMAT(DATE_ADD(concat(first_spbj_date," ", first_spbj_time),1),'yyyy-MM-dd'),' 09:00:00') ELSE concat(first_spbj_date," ", first_spbj_time) END) AS standard_spbj_time ,(CASE WHEN DATE_FORMAT(concat(sp_date," ", sp_time),'H') <9 THEN CONCAT(DATE_FORMAT(concat(sp_date," ", sp_time),'yyyy-MM-dd'),' 09:00:00') WHEN DATE_FORMAT(concat(sp_date," ", sp_time),'H') BETWEEN 12 AND 13 THEN CONCAT(DATE_FORMAT(concat(sp_date," ", sp_time),'yyyy-MM-dd'),' 14:00:00') WHEN DATE_FORMAT(concat(sp_date," ", sp_time),'H') >= 18 THEN CONCAT(DATE_FORMAT(DATE_ADD(concat(sp_date," ", sp_time),1),'yyyy-MM-dd'),' 09:00:00') ELSE concat(sp_date," ", sp_time) END) AS standard_sp_time ,(CASE WHEN DATE_FORMAT(concat(baodan_date," ", baodan_time),'H') <9 THEN CONCAT(DATE_FORMAT(concat(baodan_date," ", baodan_time),'yyyy-MM-dd'),' 09:00:00') WHEN DATE_FORMAT(concat(baodan_date," ", baodan_time),'H') BETWEEN 12 AND 13 THEN CONCAT(DATE_FORMAT(concat(baodan_date," ", baodan_time),'yyyy-MM-dd'),' 14:00:00') WHEN DATE_FORMAT(concat(baodan_date," ", baodan_time),'H') >= 18 THEN CONCAT(DATE_FORMAT(DATE_ADD(concat(baodan_date," ", baodan_time),1),'yyyy-MM-dd'),' 09:00:00') ELSE concat(baodan_date," ", baodan_time) END) AS standard_baodan_time ,round((unix_timestamp(concat(sc_date," ", sc_time)) - unix_timestamp( CASE WHEN DATE_FORMAT(concat(baodan_date," ", baodan_time),'H') <9 THEN CONCAT(DATE_FORMAT(concat(baodan_date," ", baodan_time),'yyyy-MM-dd'),' 09:00:00') WHEN DATE_FORMAT(concat(baodan_date," ", baodan_time),'H') >= 18 THEN CONCAT(DATE_FORMAT(DATE_ADD(concat(baodan_date," ", baodan_time),1),'yyyy-MM-dd'),' 09:00:00') ELSE concat(baodan_date," ", baodan_time) END) )/3600, 0) sc_use_time -- 审查处理时间(小时) ,round((unix_timestamp(concat(sp_date," ", sp_time)) - unix_timestamp( CASE WHEN DATE_FORMAT(concat(baodan_date," ", baodan_time),'H') <9 THEN CONCAT(DATE_FORMAT(concat(baodan_date," ", baodan_time),'yyyy-MM-dd'),' 09:00:00') WHEN DATE_FORMAT(concat(baodan_date," ", baodan_time),'H') >= 18 THEN CONCAT(DATE_FORMAT(DATE_ADD(concat(baodan_date," ", baodan_time),1),'yyyy-MM-dd'),' 09:00:00') ELSE concat(baodan_date," ", baodan_time) end) )/3600, 2) sp_use_time -- 审批处理时间(小时) ,round((unix_timestamp(concat(first_spbj_date," ", first_spbj_time)) - unix_timestamp( CASE WHEN DATE_FORMAT(concat(baodan_date," ", baodan_time),'H') <9 THEN CONCAT(DATE_FORMAT(concat(baodan_date," ", baodan_time),'yyyy-MM-dd'),' 09:00:00') WHEN DATE_FORMAT(concat(baodan_date," ", baodan_time),'H') >= 18 THEN CONCAT(DATE_FORMAT(DATE_ADD(concat(baodan_date," ", baodan_time),1),'yyyy-MM-dd'),' 09:00:00') ELSE concat(baodan_date," ", baodan_time) END) )/3600, 2) spbj_use_time ,bim.risk_level -- 风险等级 ,(case when tbmm.max_id is not null then '是' else "否" end) is_spbj ,(case when a.product_name_o like "%赎楼%" and a.product_name_o not like "%无%" then bol.ori_loan_bank_name else "-" end ) ydkyh_name -- 原贷款银行 ,bnl.new_loan_bank_name xdkyh_name -- 新贷款银行 ,mqspsx ,case when bol.borrower_type = "PERSONAL" then "个人" when bol.borrower_type = "PUBLIC" then "公司" end ydkjkrlx -- 原贷款seller_name类型 ,case when bnl.borrower_type = "PERSONAL" then "个人" when bnl.borrower_type = "PUBLIC" then "公司" end xdkjkrlx -- 新贷款seller_name类型 , case when bim.rule_level = "easy" then "易" when bim.rule_level = "mad" then "难" end rule_level -- 难易程度 ,(case when a.product_name not like "%及时贷%" then bnl.biz_loan_amount else bfs.borrowing_amount end) borrow_amount -- 金额 ,a.scsd_date -- 审查锁定时间 from tmp_all as a left join ods.ods_bpms_biz_isr_mixed bim on a.apply_no = bim.apply_no left join tmp_biz_missing_materials tbmm on a.apply_no = tbmm.apply_no left join (select * from ods.ods_bpms_biz_ori_loan_common where rn = 1) bol on bol.apply_no=a.apply_no left join (select * from ods.ods_bpms_biz_new_loan_common where rn = 1) bnl on bnl.apply_no=a.apply_no left join ods.ods_bpms_biz_fee_summary bfs on bfs.apply_no=a.apply_no left join tmp_matter_record tmr on tmr.apply_no = a.apply_no
DROP PROCEDURE IF EXISTS OutstandingVendorFeesDetail; CREATE PROCEDURE OutstandingVendorFeesDetail(month INT, year INT, vendor INT) BEGIN DECLARE monthEnd DATETIME; DECLARE _30Days DATETIME; DECLARE _60Days DATETIME; DECLARE _90Days DATETIME; DECLARE _180Days DATETIME; DECLARE _365Days DATETIME; # We define "monthEnd" as midnight of the first day of the following month, in order to account for # the time portion of the DATETIME values. SET monthEnd = DATE_ADD(MAKEDATE(year, 1), INTERVAL month MONTH); SET _30Days = SUBDATE(monthEnd, INTERVAL 1 MONTH); SET _60Days = SUBDATE(monthEnd, INTERVAL 2 MONTH); SET _90Days = SUBDATE(monthEnd, INTERVAL 3 MONTH); SET _180Days = SUBDATE(monthEnd, INTERVAL 6 MONTH); SET _365Days = SUBDATE(monthEnd, INTERVAL 12 MONTH); SELECT v.userid 'Vendor No' , CONCAT_WS(' ', TRIM(v.firstname), TRIM(v.lastname)) 'Vendor Name' , o.id 'Order No' , DATE(o.ordereddate) 'Order Date' , CONCAT_WS(' ', o.propertyaddress, o.propertycity, o.propertystate, o.propertyzipcode) 'Property Address' , ot.descrip 'Product' , pt.descrip 'Part Type' , p.part_label 'Label' , p.vendorfee 'Vendor Fee' , DATE(vendor_paid) 'Vendor Paid' , c.checknumber 'Check No' , DATE(t.dts) 'Date Completed' , CASE WHEN t.dts >= _30Days AND t.dts < monthEnd THEN '30 Day' WHEN t.dts >= _60Days AND t.dts < _30Days THEN '60 Day' WHEN t.dts >= _90Days AND t.dts < _60Days THEN '90 Day' WHEN t.dts >= _180Days AND t.dts < _90Days THEN '4-6 Mths' WHEN t.dts >= _365Days AND t.dts < _180Days THEN '7-12 Mths' WHEN t.dts < _365Days THEN '1 Year+' END 'Date Bucket' FROM orders o JOIN order_parts p ON p.orderid = o.id JOIN order_types ot ON ot.id = o.order_type JOIN part_types pt ON pt.id = p.part_type JOIN user_data_vendor v ON v.userid = p.acceptedby LEFT JOIN client_transactions t ON t.orderid = o.id AND t.type = 'COMPLETED' LEFT JOIN ( SELECT p.id , c.checknumber FROM vendor_checks c, order_parts p WHERE FIND_IN_SET(p.id, c.partids) AND p.acceptedby = vendor ) c ON c.id = p.id WHERE o.companyid = 1 AND o.order_status IN (7, 14) # Completed, Reconsideration AND p.order_status = 7 # Completed AND p.acceptedby = vendor AND (t.dts < monthEnd OR t.dts IS NULL) ORDER BY t.dts, o.ordereddate, p.part_label; END; CALL OutstandingVendorFeesDetail(8, 2015, 1241);
UPDATE clients SET hash = ? WHERE slug = ?
CREATE procedure sp_acc_gethiddencols(@reportid int) as select isnull(HiddenColumns,0) from FaReportData where ReportID = @reportid
SELECT * FROM emp; SELECT ENAME, HIREDATE FROM emp; SELECT EMPNO, ENAME FROM emp; SELECT JOB FROM emp GROUP BY JOB; SELECT COUNT(*) AS '총 사원수' FROM emp; SELECT ENAME FROM emp WHERE DEPTNO = 10; SELECT ENAME, SAL FROM emp WHERE SAL >= 2500; SELECT * FROM emp WHERE ENAME = 'KING'; SELECT EMPNO, ENAME FROM emp WHERE ENAME LIKE 'S%'; SELECT EMPNO, ENAME FROM emp WHERE ENAME LIKE '%T%'; SELECT EMPNO, ENAME, SAL, COMM FROM emp WHERE COMM IN (300,500,1400); SELECT EMPNO, ENAME, SAL FROM emp WHERE 1200<SAL<3500; SELECT EMPNO, ENAME, JOB, DEPTNO FROM emp WHERE JOB = 'MANAGER' AND DEPTNO = 30; SELECT EMPNO, ENAME, DEPTNO FROM emp WHERE NOT DEPTNO = 30; SELECT EMPNO, ENAME, COMM FROM emp WHERE NOT COMM IN (300,500,1400); # 질문 -- 16. 이름에 S가 포함되지 않는 사원의 사번,이름을 조회하시오. SELECT EMPNO, ENAME FROM emp WHERE NOT ENAME LIKE '%S%'; -- 17. 급여가 1200보다 미만이거나 3700 초과하는 사원의 사번,이름,월급여를 조회하시오. SELECT EMPNO, ENAME, SAL FROM emp WHERE 1200>SAL OR 3700<SAL ; -- 18. 직속상사가 NULL 인 사원의 이름과 직급을 조회하시오. SELECT EMPNO, JOB FROM emp WHERE MGR IS NULL; -- 19. 부서별 평균월급여를 구하시오 SELECT DEPTNO, AVG(SAL) AS '평균월급여' #ROUND(AVG(SAL),2) FROM emp GROUP BY DEPTNO ; -- 20. 부서별 전체 사원수와 커미션을 받는 사원들의 수를 구하시오. SELECT DEPTNO, COUNT(*), COUNT(COMM) FROM emp GROUP BY DEPTNO; -- 21. 부서별 최대 급여와 최소 급여를 구하시오. SELECT DEPTNO, MAX(SAL) AS '최대 급여', MIN(SAL) AS '최소 급여' FROM emp GROUP BY DEPTNO; -- 22. 부서별로 급여 평균 (단, 부서별 급여 평균이 2000 이상만)을 구하시오. SELECT DEPTNO, AVG(SAL) AS '급여 평균' FROM emp GROUP BY DEPTNO HAVING AVG(SAL) >= 2000; -- 23. 월급여가 1000 이상인 사원만을 대상으로 부서별로 월급여 평균을 구하라. 단, 평균값이 2000 이상인 레코드만 구하라. SELECT DEPTNO, AVG(SAL) AS '월 급여 평균' FROM emp GROUP BY DEPTNO; -- 24. 급여가 높은 순으로 조회하되 급여가 같을 경우 이름의 철자가 빠른 사원순으로 사번,이름,월급여를 조회하시오. -- 25. 사원명과 부서명을 조회하시오. -- 26. 이름,월급여,월급여등급을 조회하시오. -- 27. 이름,부서명,월급여등급을 조회하시오. -- 28.이름,직속상사이름을 조회하시오. -- 29. 이름,부서명을 조회하시오.단, 사원테이블에 부서번호가 40에 속한 사원이 없지만 부서번호 40인 부서명도 출력되도록 하시오. -- 30. 이름,부서번호,부서이름을 조회하시오. -- 31. 부서번호가 30번인 사원들의 이름, 직급, 부서번호, 부서위치를 조회하시오. -- 32. 커미션을 받는 사원의 이름, 커미션, 부서이름,부서위치를 조회하시오. -- 33. DALLAS에서 근무하는 사원의 이름,직급,부서번호,부서명을 조회하시오. -- 34. 이름에 A 가 들어가는 사원의 이름,부서명을 조회하시오. -- 35. 이름, 직급, 월급여, 월급여등급을 조회하시오. -- 36. ALLEN과 같은 부서에 근무하는 사원의 이름, 부서번호를 조회하시오. -- 37. 사원명 'JONES'가 속한 부서명을 조회하시오.
-- phpMyAdmin SQL Dump -- version 4.7.9 -- https://www.phpmyadmin.net/ -- -- Хост: 127.0.0.1 -- Время создания: Сен 28 2021 г., 15:56 -- Версия сервера: 5.7.22-22-log -- Версия PHP: 5.6.37 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_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 */; -- -- База данных: `a369307_1` -- -- -------------------------------------------------------- -- -- Структура таблицы `acts_during_break` -- CREATE TABLE `acts_during_break` ( `id` int(11) NOT NULL, `user_id` int(11) NOT NULL, `function` varchar(255) NOT NULL, `chat_id` int(11) NOT NULL, `status` int(2) NOT NULL DEFAULT '1' ) ENGINE=InnoDB DEFAULT CHARSET=cp1251; -- -------------------------------------------------------- -- -- Структура таблицы `chats` -- CREATE TABLE `chats` ( `id` int(11) NOT NULL, `chat_id` int(11) DEFAULT NULL, `users` text COLLATE utf8_unicode_ci, `date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `total_iq` int(20) NOT NULL DEFAULT '0' ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Дамп данных таблицы `chats` -- INSERT INTO `chats` (`id`, `chat_id`, `users`, `date`, `total_iq`) VALUES (1, 235359833, 'a:1:{i:0;i:235359833;}', '2021-07-28 14:13:27', 112), (3, 2000000001, 'a:4:{i:0;i:186934537;i:1;i:235359833;i:2;i:507220083;i:3;i:295082014;}', '2021-07-28 14:13:27', 609), (5, 2000000002, 'a:3:{i:0;i:235359833;i:1;i:295082014;i:2;s:9:\"507220083\";}', '2021-07-28 14:13:27', 328), (6, 2000000003, 'a:8:{i:0;i:186934537;i:1;i:225564419;i:2;i:235359833;i:3;i:290972470;i:4;i:295082014;i:5;i:221722743;i:6;i:305920000;i:7;i:365804255;}', '2021-07-28 14:13:27', 1443), (7, 2000000004, 'a:4:{i:0;i:235359833;i:1;i:391938279;i:2;i:186934537;i:3;i:429699846;}', '2021-07-28 14:13:27', 393), (8, 2000000005, 'a:9:{i:0;i:433967116;i:1;i:295082014;i:2;i:447933178;i:3;i:235359833;i:4;i:301524723;i:5;i:346885102;i:6;i:303196179;i:7;i:152863856;i:8;i:272519379;}', '2021-09-08 14:26:17', 726), (9, 507220083, 'a:1:{i:0;i:507220083;}', '2021-09-12 10:24:58', 39), (11, 535843557, 'a:1:{i:0;i:535843557;}', '2021-09-17 06:39:54', 21), (12, 2000000006, 'a:10:{i:0;i:447933178;i:1;i:325931171;i:2;i:292832454;i:3;i:547445094;i:4;i:387524318;i:5;i:608964244;i:6;i:313550696;i:7;i:423204284;i:8;i:393663077;i:9;i:639144023;}', '2021-09-17 06:51:08', 264), (13, 2000000009, 'a:9:{i:0;i:235359833;i:1;i:429699846;i:2;i:186934537;i:3;i:391938279;i:4;i:535843557;i:5;i:214608811;i:6;i:413821266;i:7;i:462746561;i:8;i:209743564;}', '2021-09-24 16:31:41', 530), (14, 2000000011, 'a:2:{i:0;i:662668710;i:1;i:535843557;}', '2021-09-26 17:55:49', 47); -- -------------------------------------------------------- -- -- Структура таблицы `logs` -- CREATE TABLE `logs` ( `id` int(11) NOT NULL, `date` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, `user_id` int(11) NOT NULL, `function` varchar(255) NOT NULL, `description` varchar(2048) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=cp1251; -- -- Дамп данных таблицы `logs` -- INSERT INTO `logs` (`id`, `date`, `user_id`, `function`, `description`) VALUES (1, '2021-09-18 20:04:07', 1, '1', '1'); -- -------------------------------------------------------- -- -- Структура таблицы `promo` -- CREATE TABLE `promo` ( `code` text, `count` int(11) DEFAULT '0', `value` int(11) NOT NULL DEFAULT '0', `id` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=cp1251; -- -------------------------------------------------------- -- -- Структура таблицы `settings` -- CREATE TABLE `settings` ( `id` int(11) NOT NULL, `break` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=cp1251; -- -- Дамп данных таблицы `settings` -- INSERT INTO `settings` (`id`, `break`) VALUES (1, 1); -- -------------------------------------------------------- -- -- Структура таблицы `users` -- CREATE TABLE `users` ( `id` int(11) NOT NULL, `first_name` text CHARACTER SET utf8, `last_name` text CHARACTER SET utf8, `iq` int(11) NOT NULL DEFAULT '0', `user_id` int(11) DEFAULT NULL, `chat_id` int(11) DEFAULT NULL, `registration_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `cmd_date` varchar(255) COLLATE utf8_unicode_ci DEFAULT '01, 01, 2021', `joined` text CHARACTER SET utf8 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Дамп данных таблицы `users` -- INSERT INTO `users` (`id`, `first_name`, `last_name`, `iq`, `user_id`, `chat_id`, `registration_date`, `cmd_date`, `joined`) VALUES (2, 'Александр', 'Соромотин', 137, 235359833, 235359833, '2021-07-28 14:13:27', '27, 09, 2021', 'true'), (4, 'Олег', 'Цыгвинцев', 189, 186934537, 2000000009, '2021-07-28 14:13:27', '28, 09, 2021', 'true'), (6, 'Макар', 'Колотов', 217, 225564419, 2000000003, '2021-07-28 14:13:27', '28, 09, 2021', 'true'), (7, 'Андрей', 'Петунин', 253, 290972470, 2000000003, '2021-07-28 14:13:27', '28, 09, 2021', 'true'), (9, 'Макс', 'Мустафаев', 250, 221722743, 2000000003, '2021-07-28 14:13:27', '28, 09, 2021', NULL), (10, 'Данил', 'Щепелин', 122, 305920000, 2000000003, '2021-07-28 14:13:27', '08, 09, 2021', NULL), (11, 'Никита', 'Панкратов', 1, 365804255, 2000000003, '2021-07-28 14:13:27', '06, 08, 2021', NULL), (12, 'Вадим', 'Красильников', 97, 391938279, 2000000009, '2021-07-28 14:13:27', '28, 09, 2021', 'true'), (14, 'Катя', 'Павук', 56, 433967116, 2000000005, '2021-09-08 14:26:16', '24, 09, 2021', NULL), (15, 'Евгений', 'Сушилов', 274, 295082014, 2000000003, '2021-09-08 14:51:39', '28, 09, 2021', 'true'), (16, 'Анастасия', 'Неред\'', 75, 447933178, 2000000006, '2021-09-08 15:18:15', '28, 09, 2021', 'true'), (17, 'Катерина', 'Яковлева', 33, 301524723, 2000000005, '2021-09-08 15:18:18', '28, 09, 2021', NULL), (18, 'Тимофей', 'Продатов', 46, 346885102, 2000000005, '2021-09-09 04:34:59', '25, 09, 2021', NULL), (19, 'Дарья', 'Павук', 62, 303196179, 2000000005, '2021-09-09 08:45:17', '28, 09, 2021', 'true'), (21, 'Матвей', 'Иллюминатов', 4, 152863856, 2000000005, '2021-09-13 03:01:05', '13, 09, 2021', NULL), (22, 'Юра', 'Кринжулькин', 39, 272519379, 2000000005, '2021-09-13 04:41:43', '28, 09, 2021', 'true'), (23, 'Марк', 'Ковальский', 26, 429699846, 2000000009, '2021-09-16 06:37:55', '28, 09, 2021', 'true'), (25, 'Матвей', 'Чечеткин', 18, 535843557, 2000000011, '2021-09-17 06:36:17', '28, 09, 2021', 'true'), (26, 'Игорь', 'Гец', 24, 325931171, 2000000006, '2021-09-17 06:51:20', '28, 09, 2021', NULL), (27, 'Матвей', 'Бояркин', 34, 292832454, 2000000006, '2021-09-17 06:52:17', '28, 09, 2021', NULL), (28, 'Вера', 'Савичева', 23, 547445094, 2000000006, '2021-09-17 06:53:19', '26, 09, 2021', NULL), (29, 'Степан', 'Шумилов', 28, 387524318, 2000000006, '2021-09-17 06:54:08', '26, 09, 2021', NULL), (30, 'Анастасия', 'Неред', 10, 608964244, 2000000006, '2021-09-17 06:57:00', '17, 09, 2021', NULL), (31, 'Рафаиль', 'Миндибаев', 28, 313550696, 2000000006, '2021-09-17 07:04:39', '28, 09, 2021', NULL), (32, 'Екатерина', 'Глушкова', 25, 423204284, 2000000006, '2021-09-17 08:09:01', '20, 09, 2021', NULL), (33, 'Рустам', 'Учинин', 7, 393663077, 2000000006, '2021-09-19 12:24:04', '19, 09, 2021', NULL), (35, 'Михаил', 'Аверинцев', 39, 507220083, 2000000001, '2021-09-19 13:26:11', '26, 09, 2021', 'true'), (36, 'Алёна', 'Волошина', 9, 214608811, 2000000009, '2021-09-24 16:40:03', '26, 09, 2021', NULL), (37, 'Алёна', 'Мордвинова', 34, 413821266, 2000000009, '2021-09-24 16:41:47', '28, 09, 2021', 'true'), (38, 'Егор', 'Бурылов', 20, 244261009, 244261009, '2021-09-24 18:10:43', '01, 01, 2021', 'true'), (39, 'Виктория', 'Лосева', 2, 462746561, 2000000009, '2021-09-25 18:45:26', '25, 09, 2021', NULL), (40, 'Ульяна', 'Литвинова', 18, 209743564, 2000000009, '2021-09-26 12:38:18', '27, 09, 2021', 'true'), (41, 'Галя', 'Венигрет', 29, 662668710, 2000000011, '2021-09-26 17:55:49', '28, 09, 2021', 'true'), (42, 'Вячеслав', 'Козубенко', 10, 639144023, 2000000006, '2021-09-28 05:42:38', '28, 09, 2021', NULL); -- -- Индексы сохранённых таблиц -- -- -- Индексы таблицы `acts_during_break` -- ALTER TABLE `acts_during_break` ADD PRIMARY KEY (`id`); -- -- Индексы таблицы `chats` -- ALTER TABLE `chats` ADD PRIMARY KEY (`id`); -- -- Индексы таблицы `logs` -- ALTER TABLE `logs` ADD PRIMARY KEY (`id`); -- -- Индексы таблицы `promo` -- ALTER TABLE `promo` ADD PRIMARY KEY (`id`); -- -- Индексы таблицы `settings` -- ALTER TABLE `settings` ADD PRIMARY KEY (`id`); -- -- Индексы таблицы `users` -- ALTER TABLE `users` ADD PRIMARY KEY (`id`); -- -- AUTO_INCREMENT для сохранённых таблиц -- -- -- AUTO_INCREMENT для таблицы `acts_during_break` -- ALTER TABLE `acts_during_break` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=205; -- -- AUTO_INCREMENT для таблицы `chats` -- ALTER TABLE `chats` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=15; -- -- AUTO_INCREMENT для таблицы `logs` -- ALTER TABLE `logs` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; -- -- AUTO_INCREMENT для таблицы `promo` -- ALTER TABLE `promo` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT для таблицы `settings` -- ALTER TABLE `settings` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; -- -- AUTO_INCREMENT для таблицы `users` -- ALTER TABLE `users` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=43; 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 */;
create or replace package meteor_pkg is FUNCTION js_number(n IN NUMBER) RETURN VARCHAR2 DETERMINISTIC; end meteor_pkg; / show errors create or replace package body meteor_pkg is FUNCTION js_number(n IN NUMBER) RETURN VARCHAR2 DETERMINISTIC IS jsn VARCHAR2(100); BEGIN jsn := to_char(n); if substr(jsn, 0, 1) = '.' then jsn := '0'||jsn; end if; return jsn; END; end meteor_pkg; / show errors exit;
-- noinspection SqlNoDataSourceInspectionForFile UPDATE `marmoles_wp420`.`wp_options` t SET t.`option_value` = 'http://localhost:8080' WHERE t.`option_id` = 2; UPDATE `marmoles_wp420`.`wp_options` t SET t.`option_value` = 'http://localhost:8080' WHERE t.`option_id` = 1;
select * from mydb.photo_post order by createdAt desc limit 5;
-- Aug 16, 2013 1:10:21 PM VET -- LVE Retention INSERT INTO LVE_WH_ConceptGroup (AD_Client_ID,AD_Org_ID,Created,CreatedBy,Description,IsActive,LVE_WH_ConceptGroup_ID,Name,Updated,UpdatedBy,Value) VALUES (11,0,TO_TIMESTAMP('2013-08-16 13:10:21','YYYY-MM-DD HH24:MI:SS'),100,'ISLR','Y',1000000,'ISLR',TO_TIMESTAMP('2013-08-16 13:10:21','YYYY-MM-DD HH24:MI:SS'),100,'ISLR') ; -- Aug 16, 2013 1:10:52 PM VET -- LVE Retention INSERT INTO LVE_WH_ConceptGroup (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,LVE_WH_ConceptGroup_ID,Name,Updated,UpdatedBy,Value) VALUES (11,0,TO_TIMESTAMP('2013-08-16 13:10:52','YYYY-MM-DD HH24:MI:SS'),100,'Y',1000001,'RETENCION IVA',TO_TIMESTAMP('2013-08-16 13:10:52','YYYY-MM-DD HH24:MI:SS'),100,'RETENCION IVA') ; -- Aug 16, 2013 1:11:00 PM VET -- LVE Retention UPDATE LVE_WH_ConceptGroup SET Description='RETENCION IVA',Updated=TO_TIMESTAMP('2013-08-16 13:11:00','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE LVE_WH_ConceptGroup_ID=1000001 ; -- Aug 16, 2013 1:11:27 PM VET -- LVE Retention UPDATE LVE_WH_ConceptGroup SET Description='GRUPO DE RETENCION ISLR', Name='RETENCION ISLR', Value='RETENCION ISLR',Updated=TO_TIMESTAMP('2013-08-16 13:11:27','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE LVE_WH_ConceptGroup_ID=1000000 ; -- Aug 16, 2013 1:11:34 PM VET -- LVE Retention UPDATE LVE_WH_ConceptGroup SET Description='GRUPO DE RETENCION IVA',Updated=TO_TIMESTAMP('2013-08-16 13:11:34','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE LVE_WH_ConceptGroup_ID=1000001 ;
SELECT DISTINCT fde_code, category, mel AS mel, name AS NAME, flight_phase, 'LANDED' AS flight_state, message AS description, received AS messsage_logged_time FROM bombardier.servb_fde_fault fault WHERE fde_code IN :fde_codes AND leg_id IN :leg_ids AND fault_code IS NULL
--Code written by: Dave Tuchan, Date: 8th of July 2018, Capstone Churn Rates --1. Get familiar with the company SELECT MIN(subscription_start) AS 'First subscription', MAX(subscription_start) AS 'Last subscription' FROM subscriptions; SELECT DISTINCT segment FROM subscriptions; --2. Overall churn trend since the company started & --3. Compare the churn rates between user segments --Temporary table: Months WITH months AS ( SELECT '2017-01-01' AS first_day, '2017-01-31' AS last_day UNION SELECT '2017-02-01' AS first_day, '2017-02-28' AS last_day UNION SELECT '2017-03-01' AS first_day, '2017-03-31' AS last_day ), --Temporary table: Subscriptions combined with Months cross_join AS ( SELECT * FROM subscriptions CROSS JOIN months ), --Temporary table: Active / Canceled users status AS ( SELECT id, first_day AS 'month', CASE WHEN (segment = '87') AND (subscription_start < first_day) AND ((subscription_end > first_day) OR (subscription_end IS NULL)) THEN 1 ELSE 0 END AS 'is_active_87', CASE WHEN (segment = '30') AND (subscription_start < first_day) AND ((subscription_end > first_day) OR (subscription_end IS NULL)) THEN 1 ELSE 0 END AS 'is_active_30', CASE WHEN (segment = '87') AND (subscription_end BETWEEN first_day AND last_day) THEN 1 ELSE 0 END AS 'is_canceled_87', CASE WHEN (segment = '30') AND (subscription_end BETWEEN first_day AND last_day) THEN 1 ELSE 0 END AS 'is_canceled_30' FROM cross_join ), --Temporary table: Aggregated fields status_aggregate AS ( SELECT month, SUM(is_active_30) AS 'sum_active_30', SUM(is_active_87) AS 'sum_active_87', SUM(is_canceled_30) AS 'sum_canceled_30', SUM(is_canceled_87) AS 'sum_canceled_87', SUM(is_active_30) + SUM(is_active_87) AS 'Sum_active_total', SUM(is_canceled_30) + SUM(is_canceled_87) AS 'Sum_canceled_total' FROM status GROUP BY 1 ORDER BY 1 ASC ) --Calculate churn rate statistics SELECT month, ROUND(1.0 * sum_canceled_87 / sum_active_87 * 100, 2) AS 'Segment 87', ROUND(1.0 * sum_canceled_30 / sum_active_30 * 100, 2) AS 'Segment 30', ROUND(1.0 * Sum_canceled_total / Sum_active_total * 100, 2) AS 'Overall' FROM status_aggregate GROUP BY 1 ORDER BY 1 ASC;
DROP TABLE IF EXISTS Specializes CASCADE; CREATE TABLE Specializes ( instructor_id INTEGER REFERENCES Instructors (instructor_id), course_area_name TEXT REFERENCES CourseAreas (course_area_name), PRIMARY KEY(instructor_id, course_area_name) );
SELECT * FROM desi_loja.consumidor WHERE data_aniversario BETWEEN '1990-01-01' AND '2000-01-01';
/* Populate tables */ INSERT INTO clientes (nombre, apellido, email, create_at, foto) VALUES('Hector', 'Huaman Flores', 'hector.10.fisi@gmail.com', '2017-08-01', ''); INSERT INTO clientes (nombre, apellido, email, create_at, foto) VALUES('Tatiana', 'Huaman Flores', 'tatiana@gmail.com', '2017-08-02', ''); INSERT INTO clientes (nombre, apellido, email, create_at, foto) VALUES('Angely', 'Huaman Flores', 'angely@gmail.com', '2017-08-03', ''); INSERT INTO clientes (nombre, apellido, email, create_at, foto) VALUES('Jane', 'Doe', 'jane.doe@gmail.com', '2017-08-04', ''); INSERT INTO clientes (nombre, apellido, email, create_at, foto) VALUES('Rasmus', 'Lerdorf', 'rasmus.lerdorf@gmail.com', '2017-08-05', ''); /* Populate tabla productos */ INSERT INTO productos (nombre, precio, create_at) VALUES('Panasonic Pantalla LCD', 259990, NOW()); INSERT INTO productos (nombre, precio, create_at) VALUES('Sony Camara digital DSC-W320B', 123490, NOW()); INSERT INTO productos (nombre, precio, create_at) VALUES('Apple iPod shuffle', 1499990, NOW()); INSERT INTO productos (nombre, precio, create_at) VALUES('Sony Notebook Z110', 37990, NOW()); INSERT INTO productos (nombre, precio, create_at) VALUES('Hewlett Packard Multifuncional F2280', 69990, NOW()); INSERT INTO productos (nombre, precio, create_at) VALUES('Bianchi Bicicleta Aro 26', 69990, NOW()); INSERT INTO productos (nombre, precio, create_at) VALUES('Mica Comoda 5 Cajones', 299990, NOW()); /* Creamos algunas facturas */ INSERT INTO facturas (descripcion, observacion, cliente_id, create_at) VALUES('Factura equipos de oficina', null, 1, NOW()); INSERT INTO facturas_items (cantidad, factura_id, producto_id) VALUES(1, 1, 1); INSERT INTO facturas_items (cantidad, factura_id, producto_id) VALUES(2, 1, 4); INSERT INTO facturas_items (cantidad, factura_id, producto_id) VALUES(1, 1, 5); INSERT INTO facturas_items (cantidad, factura_id, producto_id) VALUES(1, 1, 7); INSERT INTO facturas (descripcion, observacion, cliente_id, create_at) VALUES('Factura Bicicleta', 'Alguna nota importante!', 1, NOW()); INSERT INTO facturas_items (cantidad, factura_id, producto_id) VALUES(3, 2, 6); /* Creamos algunos usuarios con sus roles*/ INSERT INTO users (username,password,enabled) VALUES ('andres','$2a$10$pN5tnPLNnrwtaMtQIW5UbOPo4oACX5Awgu21SKBx40m79Lz9mEgaO',1); INSERT INTO users (username,password,enabled) VALUES ('admin','$2a$10$mbDW3By5KzgddUABp9O/p.mIyi1OK/TwiELPsxZ0Gokya9KyBl9MK',1); INSERT INTO authorities (user_id,authority) VALUE (1,'ROLE_USER'); INSERT INTO authorities (user_id,authority) VALUE (2,'ROLE_ADMIN'); INSERT INTO authorities (user_id,authority) VALUE (2,'ROLE_USER');
CREATE TABLE HERO ( ID NUMBER(10) NOT NULL, HNAME VARCHAR2(20) NOT NULL, UNIVERSE VARCHAR2(20) NOT NULL, POWER NUMBER(3) CHECK(POWER >=0 and power<=100) not null, DESCRIPTION VARCHAR2(1200) NOT NULL, ALIVE CHAR check(ALIVE in ('Y','N')), PHONE NUMBER (11), LOGO VARCHAR2(200) ); /*HERO*/ INSERT INTO HERO ( "ID", "HNAME", "UNIVERSE", "POWER", "DESCRIPTION", "ALIVE", "PHONE", "LOGO" ) VALUES ( '1', 'Captain America', 'Marvel', '80', 'Captain America, old man', 'Y', '89171123214', 'cap_logo.jpg' );
-- IMDbレーティングが10.0の映画の数を判別するSQL SELECT COUNT(movie_id) FROM ratings WHERE rating = 10.0;
-- MySQL dump 10.13 Distrib 8.0.13, for Win64 (x86_64) -- -- Host: localhost Database: cinema -- ------------------------------------------------------ -- Server version 8.0.13 /*!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 `actor` -- DROP TABLE IF EXISTS `actor`; /*!40101 SET @saved_cs_client = @@character_set_client */; SET character_set_client = utf8mb4 ; CREATE TABLE `actor` ( `id_actor` int(11) NOT NULL AUTO_INCREMENT, `first_name` varchar(45) DEFAULT NULL, `last_name` varchar(45) DEFAULT NULL, PRIMARY KEY (`id_actor`) ) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `actor` -- LOCK TABLES `actor` WRITE; /*!40000 ALTER TABLE `actor` DISABLE KEYS */; INSERT INTO `actor` VALUES (1,'Benito','Toscano'),(2,'Simone','Durante'),(3,'Emanuele','Pasaro'),(4,'Caterina','Boccuti'),(5,'Simone','Toscano'); /*!40000 ALTER TABLE `actor` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `film` -- DROP TABLE IF EXISTS `film`; /*!40101 SET @saved_cs_client = @@character_set_client */; SET character_set_client = utf8mb4 ; CREATE TABLE `film` ( `id_film` int(11) NOT NULL AUTO_INCREMENT, `title` varchar(45) DEFAULT NULL, `costo` double DEFAULT NULL, PRIMARY KEY (`id_film`) ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `film` -- LOCK TABLES `film` WRITE; /*!40000 ALTER TABLE `film` DISABLE KEYS */; INSERT INTO `film` VALUES (1,'X-Man',10),(2,'Venom',15); /*!40000 ALTER TABLE `film` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `film_actor` -- DROP TABLE IF EXISTS `film_actor`; /*!40101 SET @saved_cs_client = @@character_set_client */; SET character_set_client = utf8mb4 ; CREATE TABLE `film_actor` ( `id_film_actor` int(11) NOT NULL AUTO_INCREMENT, `fk_id_film` int(11) NOT NULL, `fk_id_actor` int(11) NOT NULL, PRIMARY KEY (`id_film_actor`), KEY `fk_id_film_idx` (`fk_id_film`), KEY `fk_id_actor_idx` (`fk_id_actor`), CONSTRAINT `fk_id_actor` FOREIGN KEY (`fk_id_actor`) REFERENCES `actor` (`id_actoractor`), CONSTRAINT `fk_id_film` FOREIGN KEY (`fk_id_film`) REFERENCES `film` (`id_film`) ) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `film_actor` -- LOCK TABLES `film_actor` WRITE; /*!40000 ALTER TABLE `film_actor` DISABLE KEYS */; INSERT INTO `film_actor` VALUES (1,1,1),(2,1,2),(3,1,3),(4,2,4),(5,2,1); /*!40000 ALTER TABLE `film_actor` 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 2018-11-20 20:05:04
-- MySQL dump 10.13 Distrib 5.7.9, for Win64 (x86_64) -- -- Host: localhost Database: cubo_cubo -- ------------------------------------------------------ -- Server version 5.7.11-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 `role` -- DROP TABLE IF EXISTS `role`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `role` ( `#` int(20) NOT NULL AUTO_INCREMENT, `name` varchar(100) DEFAULT NULL, `access` int(20) DEFAULT NULL, `author` int(20) DEFAULT NULL, `created` datetime DEFAULT NULL, `description` text, `editor` int(20) DEFAULT NULL, `modified` datetime DEFAULT NULL, `published` datetime DEFAULT NULL, `publisher` int(20) DEFAULT NULL, `status` int(20) DEFAULT NULL, `title` text, PRIMARY KEY (`#`), UNIQUE KEY `name` (`name`), UNIQUE KEY `name_UNIQUE` (`name`) ) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COMMENT='User Role'; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `role` -- LOCK TABLES `role` WRITE; /*!40000 ALTER TABLE `role` DISABLE KEYS */; INSERT INTO `role` VALUES (0,'guest',0,1,'1968-12-10 00:00:00','User is not logged in, and cannot change any item',NULL,NULL,'1968-12-10 00:00:00',1,1,'Guest'),(1,'user',4,1,'1968-12-10 00:00:00','User is logged in, but cannot change any item',NULL,NULL,'1968-12-10 00:00:00',1,1,'User'),(2,'author',4,1,'1968-12-10 00:00:00','User can create items, or change their own items',NULL,NULL,'1968-12-10 00:00:00',1,1,'Author'),(3,'editor',4,1,'1968-12-10 00:00:00','User can add items, or change any unpublished items',NULL,NULL,'1968-12-10 00:00:00',1,1,'Editor'),(4,'publisher',4,1,'1968-12-10 00:00:00','User can add, change, or publish any item',NULL,NULL,'1968-12-10 00:00:00',1,1,'Publisher'),(5,'manager',4,1,'1968-12-10 00:00:00','User can manipulate any item, and manage users',NULL,NULL,'1968-12-10 00:00:00',1,1,'Manager'),(6,'administrator',4,1,'1968-12-10 00:00:00','User can do everything',NULL,NULL,'1968-12-10 00:00:00',1,1,'Administrator'); /*!40000 ALTER TABLE `role` 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-03-05 0:45:07
CREATE OR REPLACE VIEW V_ZB006_ZB AS (SELECT CZDE119,"JSDE901LC","CZDE941","JSDE106",substr(DE186,1,1) as de186,"DE011","DE042","DE062","DE151", to_char(JSDE110,'yyyy-mm-dd') as jsde110, to_char(DE001,'yyyy-mm-dd') as de001, trunc(de001) as cxrq, jsde012, "CZDE182",nvl(JSDE010,0) as jsde010,"JSDE909","JSDE007","JSDE940","DE026","JSDE008","JSDE029","JSDE049", "DE022","JSDE109","JSDE011","JSDE955","CZDE938","CZDE188","CZDE189","ID","DE102","YZDE303", sum(DE181) as de181,sum(SYJE) as syje,sum(TZJE) as tzje,sum(ZTSYJE) as ztsyje,sum(KYJE) as kyje,sum(zfcgje) as zfcgje,sum(zfcgjenew) as zfcgjenew FROM v_zb006_mx group by CZDE119,"JSDE901LC","CZDE941","JSDE106",substr(DE186,1,1),"DE011","DE042","DE062","DE151", to_char(JSDE110,'yyyy-mm-dd') , to_char(DE001,'yyyy-mm-dd') , trunc(de001), "CZDE182",nvl(JSDE010,0) ,"JSDE909","JSDE007","JSDE940","DE026","JSDE008","JSDE029","JSDE049", "DE022","JSDE109","JSDE011","JSDE955","CZDE938","CZDE188","CZDE189","ID","DE102","YZDE303",jsde012 );
-- phpMyAdmin SQL Dump -- version 4.9.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Creato il: Dic 16, 2019 alle 16:13 -- Versione del server: 10.4.8-MariaDB -- Versione PHP: 7.3.10 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: `sitoterremoti` -- -- -------------------------------------------------------- -- -- Struttura della tabella `posts` -- CREATE TABLE `posts` ( `id` int(11) NOT NULL, `titolo` varchar(255) COLLATE utf8_bin NOT NULL, `contenuto` text COLLATE utf8_bin NOT NULL, `data` datetime NOT NULL DEFAULT current_timestamp(), `pubblico` tinyint(4) NOT NULL DEFAULT 0, `deleted` tinyint(4) NOT NULL DEFAULT 0, `idUser` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; -- -- Dump dei dati per la tabella `posts` -- INSERT INTO `posts` (`id`, `titolo`, `contenuto`, `data`, `pubblico`, `deleted`, `idUser`) VALUES (1, 'Ultimo terremoto', 'Ultimo terremoto registrato in Peru di Magnitudo 6.9', '0000-00-00 00:00:00', 1, 0, 1); -- -------------------------------------------------------- -- -- Struttura della tabella `utenti` -- CREATE TABLE `utenti` ( `id` int(11) NOT NULL, `nickname` varchar(255) COLLATE utf8_bin NOT NULL, `password` varchar(255) COLLATE utf8_bin NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; -- -- Dump dei dati per la tabella `utenti` -- INSERT INTO `utenti` (`id`, `nickname`, `password`) VALUES (2, '404', '189bbbb00c5f1fb7fba9ad9285f193d1'), (3, 'Eyren', '4fd68417f607626bcfe4bb9a0eedc2a9'), (4, 'Angelo', '4d13a053ad2208574a5d50797be4bd2c'), (5, 'Antonio', 'bcb7e9e73ce1771a23777b05bd8d3ea9'), (6, 'manuz', '27e74a7187d63ee3fd2d4788efc98561'), (7, 'chaper', 'ccd8659a8b6a1b93d5ac6043d5ba9c19'), (8, 'Andrea 9', 'cf4fe3bb576c98af8f4f7127d18c6833'), (9, 'aurora', '99c8ef576f385bc322564d5694df6fc2'); -- -- Indici per le tabelle scaricate -- -- -- Indici per le tabelle `posts` -- ALTER TABLE `posts` ADD PRIMARY KEY (`id`), ADD KEY `idUser` (`idUser`); -- -- Indici per le tabelle `utenti` -- ALTER TABLE `utenti` ADD PRIMARY KEY (`id`); -- -- AUTO_INCREMENT per le tabelle scaricate -- -- -- AUTO_INCREMENT per la tabella `posts` -- ALTER TABLE `posts` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=25; -- -- AUTO_INCREMENT per la tabella `utenti` -- ALTER TABLE `utenti` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10; 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 */;
create table `countries` ( `id` bigint unsigned auto_increment, `code` varchar(50) not null, `name` varchar(50) not null, primary key (`id`) ); insert into `countries` (code, name) values ('KZ', 'Казахстан'), ('RU', 'Россия'), ('US', 'США'), ('UK', 'Великобритания'), ('UA', 'Украина'); create table `cities` ( `id` bigint unsigned auto_increment, `country_id` bigint unsigned, `name` varchar (50) not null, primary key (`id`), foreign key (country_id) references countries(id) ); insert into `cities` (country_id, name) values ('2', 'Москва'), ('2', 'Омск'), ('2', 'Ленинград'), ('5', 'Одесса'), ('5', 'Киев'), ('5', 'Львов'); create table `employees` ( `id` bigint unsigned auto_increment, `city_id` bigint unsigned, `first_name` varchar (50) not null, `last_name` varchar (50) not null, `middle_name` varchar (50), `phone_number` varchar (50), `address` varchar (100), primary key (`id`), foreign key (city_id) references cities(id) ); insert into `employees` (city_id, first_name, last_name, middle_name, phone_number, address) values (1,'Артём', 'Вершило', 'Сергеевич', '+7(701)569-96-77', 'Майлина 23'), (2, 'Артём', 'Кузнецов', 'Игоревич', '+7(700)777-00-77', 'Пушкина 21'), (4, 'Максим', 'Вершило', 'Артёмович', '+7(800)656-11-88', 'Вавилова 1');