I have a custom object called booking which has alll the bookings made by contacts. I need to have a VF page to get all the bookings made by all the contacts with a specific recordtype and show the no of bookings made by each contact for a given date in search criteria. We would also need to show the booking made for next 7 days too.
The question that i have is
Should i have one query written to get the count for given date and one for getting the count for the next 7 days?
Write a single query to get all the records for the bookingdate >= givendate and bookingdate <= givendate +7 and then loop through the list to get the count
Which approach would be best or is there a better way other than the two i mentioned ?