Deloitte | COGNIZANT | IBM | CAPGEMINI
SELECT
c.customer_id,
CONCAT(c.first_name, ' ', c.last_name) AS full_name,
COUNT(r.rental_id) AS rental_count
FROM customer c
JOIN rental r
ON c.customer_id = r.customer_id
GROUP BY c.customer_id, c.first_name, c.last_name
HAVING COUNT(r.rental_id) > 2
ORDER BY c.customer_id ASC;
SQL✅
//Accenture
756 ·