SQLize Online / PHPize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
select c.first_name, c.last_name, f.title, min(rental_date) as first_rental_date, max(rental_date) as last_rental_date, count(*) as rentals_count from customer c join rental r on c.customer_id = r.customer_id join inventory i on r.inventory_id = i.inventory_id join film f on i.film_id = f.film_id group by 1,2,3 having count(*)>1 ; show status like 'Last_query_cost';

Stuck with a problem? Got Error? Ask ChatGPT!

Copy Clear