xxxxxxxxxx
SELECT
COUNT(IF(DAYOFWEEK(rental_date) IN (1, 7), 1, NULL)) AS weekend_rentals,
COUNT(IF(DAYOFWEEK(rental_date) NOT IN (1, 7), 1, NULL)) AS weekday_rentals,
COUNT(return_date) AS completed_rentals,
COUNT(*) AS total_rentals
FROM
rental;