SQLize Online / PHPize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
SELECT r.customer_id, c.first_name, c.last_name, CEIL(AVG(DATEDIFF(r.return_date, r.rental_date))) AS average_rental_time FROM rental r JOIN customer c ON r.customer_id = c.customer_id GROUP BY r.customer_id, c.first_name, c.last_name ORDER BY r.customer_id ASC; ; show status like 'Last_query_cost';

Stuck with a problem? Got Error? Ask ChatGPT!

Copy Clear