Skip to content

Instantly share code, notes, and snippets.

@codecademydev

codecademydev/project.sqlite Secret

Created Feb 15, 2020
Embed
What would you like to do?
Codecademy export
--Home Try-On Funnel
SELECT *
FROM quiz
LIMIT 5;
SELECT *
FROM home_try_on
LIMIT 5;
SELECT *
FROM purchase
LIMIT 5;
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
LIMIT 10;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment