select count(distinct memid) from cd.bookings
Your first instinct may be to go for a subquery here. Something like the below:
select count(*) from (select distinct memid from cd.bookings) as mems
This does work perfectly well, but we can simplify a touch with the help of a little extra knowledge in the form of COUNT DISTINCT. This does what you might expect, counting the distinct values in the passed column.