Posted by Iris, June 22, 2022, 11:10 a.m.
Question 119 Instructions and Solution are different
Hi in question 119 it says:
- Write a query to return top 2 countries for each day in July and August 2021
However the solution shows results only for august.
WITH daily_bookings_by_country AS (
SELECT D.date, L.country, COUNT(B.booking_id) AS bookings
FROM dates D
LEFT JOIN bookings B
ON B.date = D.date
LEFT JOIN listings L
ON L.listing_id = B.listing_id
WHERE D.date >= '2021-08-01'
AND D.date < '2021-09-01'
GROUP BY D.date, L.country