FAQ: Code Challenge: Multiple Tables - Code Challenge 4

This community-built FAQ covers the “Code Challenge 4” exercise from the lesson “Code Challenge: Multiple Tables”.

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

Web Development

FAQs on the exercise Code Challenge 4

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

Ask or answer a question about this exercise by clicking reply (reply) below!

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

Need broader help or resources? Head here.

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

Learn more about how to use this guide.

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!

What does strftime stand for?

strftime probably means something like string format time.

1 Like

Thank you, that’ll help me to remember it.

1 Like

Why do you have to write:

‘select january.user_id from january’?

Why is

‘select user_id from january’

not sufficient?

1 Like

Sad there is no response here, because I have this same question.

Because february has a column with the same name.

SELECT january.user_id
FROM january
LEFT JOIN february
ON january.user_id = february.user_id
WHERE february.user_id IS NULL;


I used the following statements to get the same results:

SELECT j.user_id
FROM january j
WHERE j.user_id NOT IN
(SELECT f.user_id FROM february f)

Does joining tables before selecting the relevant columns have an advantage over the above method?

Hi there,

I was doing the Multiple Tables exercise code challenge 4, it was hard for me to do and to understand, to be honest, I don’t think I’ll be able to continue the SQL, it’s too difficult for me, the explanations and the code solutions, are not enough to understand and keeps motivated to get going. I’m about to quit and end the course. I don’t think there are enough resources for a truly beginner like me.

1 Like

Why we use the WHERE february.user_id IS NULL bit? The February table does not have any null values on the user_id column does it? It is a table that contains all the songs played in February. Why isn’t the where clause applied in another column that after the left join will indeed have null values?

Hi everyone, I have a question. Where says : " Add the following WHERE statement to find which users played songs in January, but not February." Should we use the DISTINCT clause on SELECT here because we need a unique user (ID’s) ?

SELECT january.user_id
FROM january
LEFT JOIN february
ON january.user_id = february.user_id
WHERE february.user_id IS NULL;

No idea on what is wrong in this code, please help.

Is that all of your code? What’s the previous code? What’s the output?

Capture 08

I feel the same way. I love it, and it is challenging, but i need more help. Don’t know where to look for help