Hi! Could we please enable some services and cookies to improve your experience and our website?

SQLize | PHPize | SQLtest

Online Sandbox for SQL and PHP: Write, Run, Test, and Share SQL Queries and PHP Code

A A A
Login    Share code      Blog   FAQ
Copy Format Clear
SET SESSION group_concat_max_len = 1000000;; SELECT r.rental_date AS meet_time, s.store_id, GROUP_CONCAT( CONCAT(c.last_name, ' ', c.first_name) ORDER BY c.last_name, c.first_name SEPARATOR ',' ) AS customers FROM rental r JOIN customer c ON r.customer_id = c.customer_id JOIN staff s ON r.staff_id = s.staff_id GROUP BY s.store_id, r.rental_date HAVING COUNT(DISTINCT r.customer_id) >= 2 ORDER BY meet_time, s.store_id; ; show status like 'Last_query_cost';

Stuck with a problem? Got Error? Ask AI support!

Copy Clear