# FAQ: Usage Funnels - Results

This community-built FAQ covers the “Results” exercise from the lesson “Usage Funnels”.

Paths and Courses
This exercise can be found in the following Codecademy content:

## FAQs on the exercise Results

There are currently no frequently asked questions associated with this exercise – that’s where you come in! You can contribute to this section by offering your own questions, answers, or clarifications on this exercise. Ask or answer a question by clicking reply () below.

If you’ve had an “aha” moment about the concepts, formatting, syntax, or anything else with this exercise, consider sharing those insights! Teaching others and answering their questions is one of the best ways to learn and stay sharp.

## Join the Discussion. Help a fellow learner on their journey.

Agree with a comment or answer? Like () to up-vote the contribution!

Need broader help or resources? Head here.

Looking for motivation to keep learning? Join our wider discussions.

Found a bug? Report it!

Have a question about your account or billing? Reach out to our customer support team!

None of the above? Find out where to ask other questions here!

Can someone explain to me what this code means from the Funnels section of the Data Science Path: 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;

Thanks

1 Like

The exercise is to create a query from the `quiz, home_try_on, purchase` tables.

Start by querying one table first and then add the other tables one by one.

``````SELECT DISTINCT q.user_id,
h.user_id IS NOT NULL AS ‘is_home_try_on’,  -- if the user_id is not null, return 1, else 0
h.number_of_pairs,
p.user_id IS NOT NULL AS ‘is_purchase’      -- if the user_id is not null, return 1, else 0
FROM quiz q
LEFT JOIN home_try_on h                                            -- outer join home_try_on table
ON q.user_id = h.user_id
LEFT JOIN purchase p                                               -- outer join purchase table
ON p.user_id = q.user_id
LIMIT 10;
``````
2 Likes