TASK #156 · Medium · ZalandoMonthly Average Product Rating
Your brief
Zalando collects customer product reviews: each row in reviews
is a stars rating (1 to 5) left by user_id for product_id
on submit_date.
Write a query that for every (product, month) pair returns product_id, the month number mth, and the average rating avg_stars rounded to two decimals. Only consider products that have at least one review.
Write a query that for every (product, month) pair returns product_id, the month number mth, and the average rating avg_stars rounded to two decimals. Only consider products that have at least one review.
Ctrl / ⌘ + ↵
Result
Write a query and run it to see the results.
Schema
productsproduct_id, product_name, category, pricereviewsreview_id, product_id, user_id, submit_date, starsinventoryinventory_id, product_id, status, add_dateordersorder_id, user_id, order_dateorder_itemsitem_id, order_id, product_id, quantity