Question: Please write in MySQL or according to MySQL. (because some other packages like Oracle commands for SQL are different from MySQL. I want MySQL.) You

Please write in MySQL or according to MySQL. (because some other packages like Oracle commands for SQL are different from MySQL. I want MySQL.)

You have to create the table, Populate with data and run the queries for getting output. Sufficient data need to be entered.

Please create a database with a size which will yield a good result(maybe 10 records, as given in the question), and provide it here.

Please write in MySQL or according to MySQL. (because some other packages

Will upvote if your solution is correct.

Thanks.

2. Consider the following relational schema CUSTOMERS(cid, cname, city, ph_no) ITEMS(ino, iname, price, type) ORDERS( order_no, ino, cid, ord_date, qty) Note: Item type must be Groceries, Stationeries, or Electronics. Create tables through appropriate SQL commands specifying all integrity constraints. Insert at least 10 records in each table so that the following yields some results. Write SQL commands for the following queries: a. For each item type, display the item with the lowest price. b. Display the name of the customer who has ordered the highest-priced item. c. Display the names of the customers who have ordered the item mobile phone". d. Display the details of the customers who have NOT ordered more than 2 items in the last 6 months. e. Display the list of cities sorted by their number of orders. (City with the highest number of orders should top the list) f. Display the name of the city where customers ordered the highest number of electronics

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!