Question:

SELECT COUNTRY CASE CITY WHEN TORONTO THEN ON WHEN OTTAWA

Last updated: 6/10/2023

SELECT COUNTRY CASE CITY WHEN TORONTO THEN ON WHEN OTTAWA

SELECT COUNTRY CASE CITY WHEN TORONTO THEN ON WHEN OTTAWA THEN ON WHEN WATERLOO THEN ON WHEN MONTREAL THEN QC WHEN VANCOUVER THEN BC WHEN KAMLOOPS THEN BC ELSE Unknown END AS PROVINCES FROM SAMPLE TABLE Re write the query above to contain the least number of case when statements Notice there is the same provinces being referenced multiple times in the query