SQLize Online / PHPize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
select i.film_id, datediff(r.return_date, lead(r.rental_date) over(partition by i.film_id order by r.rental_date asc)) as diff from rental r left join inventory i on r.inventory_id = i.inventory_id order by i.film_id asc

Stuck with a problem? Got Error? Ask ChatGPT!

Copy Clear