Case when and then || SQL
Case when and then
Often it's useful to look at a numerical field not as raw data, but instead as being in different categories or groups.
You can use?CASE?with?WHEN,?THEN,?ELSE, and?END?to define a new grouping field.
Challenge table:
The challenge:
Using the?countries?table, create a new field?AS geosize_group?that groups the countries into three groups:
The solution:
Final output: