#017Level 6 of 6 · Scenario 3: The Conservation Budget
The overspend
Scenario 3 · The Conservation Budget
The conservation budget overran, and badly. The director does not want a list of expensive jobs — she has one, and it explains nothing. She wants the single kind of work that account is actually going on, and she wants to be told where it is happening.
Schema · 1 table
treatments
- idpkINTEGER
- object_titleVARCHAR
- wingVARCHAR
- treatment_typeVARCHAR
- conservatorVARCHAR
- started_onDATE
- hoursDOUBLE
- costDOUBLE
Toolkit
- SELECT
- Choose which columns come back.
- FROM
- Specify which table to read.
- WHERE
- Filter rows by a condition.
- ORDER BY
- Sort the results by a column.
- DESC
- Reverse the sort: largest or latest first.
- COUNT(*)
- How many rows there are.
- SUM
- Add up a numeric column.
- GROUP BY
- Split the rows into groups.
- HAVING
- Filter the groups after they are built.
Objective
Name the treatment type responsible for the overspend. Run as many queries as you need — but read the second walkthrough step afterwards even if you get it first time.
Your query
⌘ ⏎
The treatment type
Results
No result yet.