Challenge

Project 1

CREATE TABLE coupon_code( customer_id int, coupon_type varchar(20), coupon_id int, discount int);
INSERT INTO `coupon_code` (`customer_id`, `coupon_type`, `coupon_id`, `discount`) VALUES ('123', 'diwali', '1', '100'), ('124', 'diwali', '2', '150'), ('125', 'aadi', '3', '200');
ALTER TABLE `coupon_code` ADD PRIMARY KEY(`customer_id`);

CREATE TABLE order_table ( customer_id int, order_id int, shipment_company varchar(10), invoice_id int(10), PRIMARY key(customer_id));
INSERT INTO `order_table` (`customer_id`, `order_id`, `shipment_company`, `invoice_id`) VALUES ('123', '1', 'indi', '21'), ('124', '2', 'shams', '22'), ('125', '3', 'courier', '23');


CREATE TABLE invoice( customer_id int, customer_name varchar(22), product_id int, product_quantity int(10), price int, PRIMARY KEY (customer_id) );
INSERT INTO `invoice` (`customer_id`, `customer_name`, `product_id`, `product_quantity`, `price`) VALUES ('123', 'subash', '31', '2', '200'), ('124', 'safeek', '33', '1', '300'), ('125', 'nithya kumar', '35', '4', '700');


CREATE TABLE user_wishlist ( wish_list_id int, customer_id int, product_id int, PRIMARY KEY (wish_list_id));
INSERT INTO `user_wishlist` (`wish_list_id`, `customer_id`, `product_id`) VALUES ('91', '123', '398'), ('92', '124', '338'), ('93', '125', '359');


CREATE TABLE review( review_id varchar(20), product_id int, product_type varchar(20), rating int, review text, reviewer_name varchar(20), reviewer_mail varchar(30));
INSERT INTO `review` (`review_id`, `product_id`, `product_type`, `rating`, `review`, `reviewer_name`, `reviewer_mail`) VALUES ('rv12', '31', 'gadgets', '5', 'good product .', 'subash', '[email protected]'), ('rv22', '33', 'electronics', '4', 'battery size needs to increase', 'safeek', '[email protected]');
ALTER TABLE `review` ADD PRIMARY KEY(`review_id`);


CREATE table product( product_id int , product_name varchar(20), color varchar(20), seller varchar(20), size int, quantity_available int, price int);
ALTER TABLE `product` ADD PRIMARY KEY(`product_id`);
INSERT INTO `product` (`product_id`, `product_name`, `color`, `seller`, `size`, `quantity_available`, `price`) VALUES ('31', 'name1', 'black', 'seller1', '23', '50', '200'), ('33', 'name2', 'blue', 'seller2', '30', '50', '300');

CREATE TABLE customer( customer_id int, customer_name varchar(20), gender varchar(10), dob date, city varchar(20), password varchar(20), mail varchar(20), address text(200), number int);
ALTER TABLE customer ADD PRIMARY KEY(customer_id);
INSERT INTO `customer` (`customer_id`, `customer_name`, `gender`, `dob`, `city`, `password`, `mail`, `address`, `number`) VALUES ('123', 'subash', 'male', '2000-10-10', 'dindigul', 'password123', '[email protected]', 'ayyalur , dindigul (districy), Tamil nadu', '983637485'), ('124', 'safeek', 'male', '2022-11-23', 'palani', 'password12243545', '[email protected]', 'palani , dindigul (districy), Tamil nadu', '1234567890');

CREATE TABLE order_sts( customer_id int, order_sts varchar(20), product_id int, address text(200), shipment_sts varchar(20), shipment_id int, PRIMARY key (customer_id));
INSERT INTO `order_sts` (`customer_id`, `order_sts`, `product_id`, `address`, `shipment_sts`, `shipment_id`) VALUES ('123', 'paid', '31', 'ayyalur , dindigul ', 'delivered', '9876'), ('124', 'cod', '38', 'palani , dindigul', 'yet to deliver', '980');

CREATE TABLE seller ( seller_id int, seller_name varchar(20), mobile_no int(20), password varchar(20), categories varchar(20), product_names varchar(20), PRIMARY KEY (seller_id));
INSERT INTO `seller` (`seller_id`, `seller_name`, `mobile_no`, `password`, `categories`, `product_names`) VALUES ('0024', 'seller1', '859454045', 'passwords1123', 'categorie1', 'name1'), ('0034', 'seller2', '0657945445', 'passwords22243545', 'categorie2', 'name2');

Your portfolio, next

Ship work like this
in your own course.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.