Practice Interview Questions
| Question | Status |
|---|---|
You are given a reviews table containing reviews of various products. Write a query to find the average stars for each product every month.
Additional requests:
reviews table:
| Column Name | Description |
|---|---|
| review_id | Unique identifier for each review |
| user_id | ID of the user who submitted the review |
| submit_date | Date the review was submitted |
| product_id | ID of the product being reviewed |
| stars | Number of stars given (rating) |
| month | product_id | avg_stars |
|---|---|---|
| 1 | 1001 | 4.60 |
| 1 | 1003 | 3.33 |
| 1 | 1004 | 3.33 |
| ID of the product being reviewed |
| stars | Number of stars given (rating) |
| month | product_id | avg_stars |
|---|---|---|
| 1 | 1001 | 4.60 |
| 1 | 1003 | 3.33 |
| 1 | 1004 | 3.33 |