Swiggy
Swiggy
-- display rest
select R_Name,Rating,D_time,cost_for_two,Offer,R_address as Address from
Restaurant,Address where restaurant.R_id=address.R_id and R_city='Pondicherry';
--display menu
select Item_name,Price,Veg from Items,Menu where items.I_id=menu.I_id and
R_id=(select R_id from restaurant where R_Name='Surguru');
update cart set I_price=Qty*(select price from menu where I_id=1) where I_id=1;
update cart set I_price=Qty*(select price from menu where I_id=2) where I_id=2;
--add item
insert into items values(13,'Chappathi','T');
insert into menu values(1,13,60);
--orders placed
select O_id,orders.C_id,customer.name from orders,Customer where
orders.C_id=Customer.C_id and Order_status='Delivered';
--revenue of hotels
select restaurant.R_id,sum(Total_amount) as Total_revenue from orders,restaurant
where orders.R_id=restaurant.R_id and Order_status='Delivered' group by
restaurant.R_id;