Create 3 tables with the following details:
1. Sales_Data: order_id, SKUs bought (multiple comma separated values), price, discount,
order_date, customer_id, order_city, channel_type (can be either ‘online’/’offline’ only)
(Note: SKUs should be alpha-numeric codes for products belonging in 2 categories, steel
starting with ST and ceramic starting with CR)
2. Product_Details: SKU, MRP, product_name
3. Customer_Details: customer_id, name, phone_number, email
Please populate the data with sample data that can be downloaded online.
Solve the following questions by writing queries with respect to the above tables:
1. Name and list the details of all customers who have placed multiple orders and have
purchased a ceramic item at least once.
2. Find the most expensive bestseller
3. For all customers who have purchased for the first time online, calculate the average
number of times they purchase offline in a month
4. List the top 7 spenders in Y city (here Y should be a user-input variable)