I had quite an unsuccesful day today with the challenge. I spent around 2 hrs trying to figure out this solution and I was not able to solve it. I will ask for help and also look into it tomorrow.
My solution so far:
WITH temp AS (
SELECT * FROM rental
WHERE EXTRACT(YEAR FROM DATE(rental_ts)) = 2020 AND
EXTRACT(MONTH FROM DATE(rental_ts)) = 05
),
joins AS (
SELECT f.film_id, i.inventory_id
FROM film f LEFT JOIN inventory i
ON f.film_id = i.film_id
)

Leave a comment