Practice Interview Questions
| Question | Status |
|---|---|
The sales team is keen on identifying the months with the highest sales. Using the provided sales data, your task is to determine the top three year-month combinations for sales.
Your output should feature the top three monthly sales in the format YYYY-MM, along with the corresponding cumulative sales.
fct_customer_sales table:
| Column Name | Description |
|---|---|
| cust_id | Identifier of customer |
| prod_sku_id | Identifier of product |
| order_date | Date and time of order |
| order_value | Price of order |
| order_id | Identifier of order |
The sales team is keen on identifying the months with the highest sales. Using the provided sales data, your task is to determine the top three year-month combinations for sales.
Your output should feature the top three monthly sales in the format YYYY-MM, along with the corresponding cumulative sales.
fct_customer_sales table:
| Column Name | Description |
|---|---|
| cust_id | Identifier of customer |
| prod_sku_id | Identifier of product |
| order_date | Date and time of order |
| order_value | Price of order |
| order_id | Identifier of order |
Example output:
| sales_month | total_sales |
|---|---|
| 2021-10 | 11169 |
| 2021-08 | 10534 |
| 2021-11 | 10275 |
Example output:
| sales_month | total_sales |
|---|---|
| 2021-10 | 11169 |
| 2021-08 | 10534 |
| 2021-11 | 10275 |