Skip to content

Instantly share code, notes, and snippets.

Created Feb 19, 2020
What would you like to do?
Codecademy export
WITH comb3 AS (SELECT quiz.user_id, CASE WHEN number_of_pairs IS NOT NULL THEN 'True'
ELSE 'False'
END AS 'is_home_try_on', number_of_pairs, CASE WHEN price IS NOT NULL THEN 'True'
ELSE 'False'
END AS 'is_purchase'
FROM quiz
LEFT JOIN home_try_on
ON quiz.user_id = home_try_on.user_id
LEFT JOIN purchase
ON home_try_on.user_id = purchase.user_id)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment