Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
/** 5. NULL values **/
SELECT
COUNT(*) AS total_cnt,
COUNT(CASE WHEN location_var = 'California' THEN id_var END) AS california_CNT,
COUNT(CASE WHEN location_var <> 'California' THEN id_var END) AS non_california_CNT
FROM
userlogin
WHERE id_var = '0155'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment