select facid, extract(month from starttime) as month, sum(slots) as "Total Slots" from cd.bookings where starttime >= '2012-01-01' and starttime < '2013-01-01' group by facid, month order by facid, month;
The main piece of new functionality in this question is the EXTRACT function. EXTRACT allows you to get individual components of a timestamp, like day, month, year, etc. We group by the output of this function to provide per-month values. An alternative, if we needed to distinguish between the same month in different years, is to make use of the DATE_TRUNC function, which truncates a date to a given granularity.
It's also worth noting that this is the first time we've truly made use of the ability to group by more than one column.