SQLize Online / PHPize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
select first_name, last_name, film.title, min(rental_date) as first_rental_date, max(rental_date) as last_rental_date, count(rental_id) as rentals_count from rental left join inventory using (inventory_id) left join customer using (customer_id) left join film using (film_id) group by customer_id, film_id having rentals_count>1 order by customer_id, film_id

Stuck with a problem? Got Error? Ask ChatGPT!

Copy Clear