AlisdairO / pgexercises

PostgreSQL Exercises web site code
Other
400 stars 62 forks source link

Classify results into buckets #21

Closed danners closed 7 years ago

danners commented 8 years ago

In this exercise the resulting column is not checked, e.g. the query:

select name, case when monthlymaintenance < 100 THEN 'cheap' else 'expensive' end from cd.facilities

is treated as correct solution.

AlisdairO commented 8 years ago

Hm, it's working for me - any chance you could check again? Thanks!

AlisdairO commented 7 years ago

Closing due to inactivity - please do reopen if you're still seeing it!

pkuca commented 3 years ago

5 years later - it seems like the instruction just needs to be updated to match what's expected. Maybe the following would work: How can you produce a list of facilities, with each labelled as 'cheap' or 'expensive' depending on if their monthly maintenance cost is more than $100? Return the name of the facility and its corresponding 'cost' label.