合計された列のMAX値のみを選択しようとしています
select rental.member_id,
rental.rental_id,
sum(rental_line.Qty) as TotalRentals
from Rental
INNER JOIN rental_line
on rental.rental_id =rental_line.rental_id
where MONTHS_BETWEEN(sysdate, datein)<(12)
group by rental.member_id,
rental.rental_id,
SUM(TotalRentals) = MAX(SUM(TotalRentals));
何か案は?