select facid, sum(slots) as "Total Slots" from cd.bookings group by facid order by facid;
Other than the fact that we've introduced the SUM aggregate function, there's not a great deal to say about this exercise. For each distinct facility id, the SUM function adds together everything in the slots column.