Posted by Abbas, July 15, 2023, 4:56 p.m.
168. Average number of streams in the US
Need your help to know why is my query answer not matching with the expected one.
with cte as
(SELECT customer_country, count(distinct v.stream_id) as counters,d.date from dates d left join video_stream v on d.date=v.stream_dt
group by d.date)
select date, counters as num_streams from cte
where date>='2021-08-01' and date<'2021-08-08' and customer_country like'US'
In my answer the rows with zero num_rentals are missing.