Bummer! This is just a preview. You need to be signed in with a Basic account to view the entire video.
Calculating School Capacity0:56 with Ben Deitch
What's the total capacity of the school?
Welcome to your first day, I hope you're ready to get started.
The fire department showed up, and they need an update on the school's seating
capacity before they'll let school start.
If you could figure out the total capacity of the school, that would be really,
To find the total capacity of the school, we'll need to use the rooms table.
And if we look at the rooms table, it looks like a pretty simple table,
there's just an ID and a capacity.
So to get the total capacity of the school,
we just need to add up all these capacity numbers and see what they add up to.
To do this in sequel, we just need to select the sum of
the capacity column from the rooms table.
Semicolon, and then run the query, and there we go.
We have a capacity for 596 total students.
You need to sign up for Treehouse in order to download course files.Sign up