select mems.surname, mems.firstname, mems.memid, min(bks.starttime) as starttime from cd.bookings bks inner join cd.members mems on mems.memid = bks.memid where starttime >= '2012-09-01' group by mems.surname, mems.firstname, mems.memid order by mems.memid;
This answer demonstrates the use of aggregate functions on dates. MIN works exactly as you'd expect, pulling out the lowest possible date in the result set. To make this work, we need to ensure that the result set only contains dates from September onwards. We do this using the WHERE clause.
You might typically use a query like this to find a customer's next booking. You can use this by replacing the date '2012-09-01' with the function now()