Classify facilities by upkeep
CASE WHEN returns the first matching branch; ELSE catches everything else.
task
For each facility, give name and a column cost_class: 'high' when monthly_upkeep is 400 or more, otherwise 'low'. Order by name.
Run a query to see rows here.
Run EXPLAIN on the statement under the cursor: Plan tab, button Explain.
No tables yet.
CASE WHEN returns the first matching branch; ELSE catches everything else.
For each facility, give name and a column cost_class: 'high' when monthly_upkeep is 400 or more, otherwise 'low'. Order by name.