BA - SQL Assignment
BA - SQL Assignment
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)
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 bestselling product.
3. For all customers whose first ever purchase was from online, calculate the average number
of times they purchase from offline in a month
4. List the top 7 spenders in Y city (here Y should be a user-input variable)