Challenge

Project 1

TASK:1

TASK:-2

create database e_com;
use e_com;
create table product(
name varchar(520),
color varchar(52),
seller varchar(45),
sizes_avail int ,
quantity_avail int,
cost int,
current_dis int,
calculation int,
avg_ratings int,
total_ratings int,
reviews_for_rating int,
review_country varchar(56),
categories varchar(89),
brand varchar(56),
tags int,
related_product varchar(60)
);
create table customer(
customer_id int not null,
gender varchar(10),
dob date,
city varchar(45),
pw varchar(10),
name varchar(58),
email varchar(20),
delivery_address varchar(56),
contacts int(10),
primary key (customer_id)
);
create table orders(
status varchar(56),
customer_id int not null,
product_id int not null
);
create table seller(
name varchar(52),
mobile_number int(10),
password varchar(10),
catgories_product_provide varchar(520)
);
create table wish_list(
customer_id int not null,
product_id int not null,
product_name varchar(90)
);
create table reviews(
customer_id int not null,
product_id int not null,
product_name varchar(56),
stars_geting int
);

TASK-3


/*1*/select * from customer left join orders on customer.c_id=orders.c_id where orders.c_city = "bhubaneswar";

/*2*/alter table product rename column id to prod_name ,rename column name to prod_name, rename column style to prod_stye;

/*3*/select * from customer inner join product on customer.cid=product.cid where product.purchitom>=1;
/*3*/SELECT * FROM CUSTOMER WHERE PURCH_ITOM>=1;

/*4*/SELECT * FROM CUSTOMER WHERE CNAME LIKE 'A%A' AND PURCH_ITOM>1;


/*6*/

CREATE TABLE Customers (
ID INT PRIMARY KEY,
Name VARCHAR(50),
Email VARCHAR(100)
);

CREATE TABLE Orders (
ID INT PRIMARY KEY,
CustomerID INT,
OrderDate DATE,
TotalAmount DECIMAL(10,2),
FOREIGN KEY (CustomerID) REFERENCES Customers(ID)
);
INSERT INTO Customers (ID, Name, Email) VALUES (1, 'rakesh', '[email protected]');
INSERT INTO Customers (ID, Name, Email) VALUES (2, 'pabitra', '[email protected]');

INSERT INTO Orders (ID, CustomerID, OrderDate, TotalAmount) VALUES (1, 1, '2021-01-01', 100.00);
INSERT INTO Orders (ID, CustomerID, OrderDate, TotalAmount) VALUES (2, 2, '2021-02-01', 200.00);
ALTER TABLE Customers ADD COLUMN Address VARCHAR(200);

ALTER TABLE Orders MODIFY COLUMN TotalAmount DECIMAL(12,2);

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.