Replaced Temp (totalAmount and frequentRenterPoints) with Query