The document creates a database called restaurant1 and defines several tables to store information about food items, orders, customers, chefs, menus, and payments. It then inserts sample data into each table and writes some queries to retrieve related data from the tables.
The document creates a database called restaurant1 and defines several tables to store information about food items, orders, customers, chefs, menus, and payments. It then inserts sample data into each table and writes some queries to retrieve related data from the tables.
The document creates a database called restaurant1 and defines several tables to store information about food items, orders, customers, chefs, menus, and payments. It then inserts sample data into each table and writes some queries to retrieve related data from the tables.
The document creates a database called restaurant1 and defines several tables to store information about food items, orders, customers, chefs, menus, and payments. It then inserts sample data into each table and writes some queries to retrieve related data from the tables.
insert into food_items2 values('F1','south indian','1','100','rice');
insert into food_items2 values('F2','mango juice','2','200','milk shake'); insert into food_items2 values('F3','strawberry juice','3','330','milk shake'); insert into food_items2 values('F4','chikku juice','1','50','milk shake'); insert into food_items2 values('F5','banana juice','1','20','milk shake'); select * from food_items2;
insert into order_items2 values('o1','f1','10');
insert into order_items2 values('o2','f2','10'); insert into order_items2 values('o3','f3','10'); select * from order_items2;
insert into customer1
values('co1','muhammedaman1314@gmail.com','6364039135','Aman','p101','F1'); insert into customer1 values('co2','sp@gmail.com','6364335843','sooraj','p102','F2'); insert into customer1 values('co3','sachinbsdk@gmail.com','6343556654','sachin','p103','F3'); insert into customer1 values('co4','e23r2n1314@gmail.com','1234567890','john','p104','F4'); insert into customer1 values('co5','ryryail.com','2387653181','kiran','p105','F5'); select * from customer1;
insert into chef1 values('ch01','sachin','sachin1','1234567890','o1');
insert into chef1 values('ch02','aman','aman1','6547892231','o2'); insert into chef1 values('ch03','sooraj','sooraj1','1234567123','o3'); insert into chef1 values('ch04','kiran','kiran1','1215648820','o2'); select * from chef1;
insert into menu5 values('m1','100','2021/02/10','2021/03/10','f1');
insert into menu5 values('m2','150','2021/02/11','2021/03/11','f2'); insert into menu5 values('m3','140','2021/02/12','2021/03/12','f3'); insert into menu5 values('m4','130','2021/02/13','2021/03/13','f4'); insert into menu5 values('m5','210','2021/02/14','2021/03/14','f5'); select * from menu5;
insert into payment6 values('pm1','co1','o1','2021/02/10','100','phone pay');
insert into payment6 values('pm2','co2','o2','2021/02/02','100','paytm'); insert into payment6 values('pm3','co3','o3','2021/02/13','100','google pay'); insert into payment6 values('pm4','co4','o4','2021/02/14','100','amazon pay'); insert into payment6 values('pm5','co5','o5','2021/02/15','100','fam pay'); select * from payment6;
select chef_name from chef1 c1,food_items2 fi,order_items2 oi where
c1.order_id=oi.order_id and oi.food_id=fi.food_id and food_name='south indian';
select payment_type from payment6 p6,customer1 c1 where
p6.customer_id=c1.customer_id and c1.customer_name='sachin';
select food_name from food_items2 where unit_price between 3 and 100;
select food_name from food_items2 order by food_name asc;