Codecademy export
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT * | |
FROM survey | |
LIMIT 10; | |
SELECT question, | |
COUNT(DISTINCT user_id) | |
FROM survey | |
GROUP BY question; | |
SELECT question, | |
COUNT(DISTINCT user_id) | |
FROM survey | |
GROUP BY 1; | |
SELECT * | |
FROM quiz | |
LIMIT 5; | |
SELECT * | |
FROM home_try_on | |
LIMIT 5; | |
SELECT * | |
FROM purchase | |
LIMIT 5; | |
SELECT DISTINCT q.user_id, | |
h.user_id IS NOT NULL AS 'is_home_try_on', | |
h.number_of_pairs, | |
p.user_id IS NOT NULL AS 'is_purchase' | |
FROM quiz q | |
LEFT JOIN home_try_on h | |
ON q.user_id = h.user_id | |
LEFT JOIN purchase p | |
ON p.user_id = q.user_id | |
LIMIT 10; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks for sharing!
I´ve got the same code as you.
Keep on sharing.
Best regards!