FAQ: Code Challenge: Multiple Tables - Code Challenge 2

This community-built FAQ covers the “Code Challenge 2” 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 2

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!

I have been using the following query to join “select … from plays, songs where plays.song_id=songs.id”. How is this any different from the query provided in hint which is “select … from plays join songs on plays.song_id=songs.id”? And if it is not, why can’t I move forward?

2 Likes

Hello,

I have the same question as the reply above me, but it hadn’t been answered, and it’s been awhile so I thought I would ask again with some formatted code.

 SELECT plays.user_id AS 'user',
  plays.play_date AS 'date', 
  songs.title AS 'song name'
FROM plays
JOIN songs
  ON plays.song_id = songs.id
;

and

 SELECT plays.user_id AS 'user',
  plays.play_date AS 'date', 
  songs.title AS 'song name'
FROM plays
JOIN songs
  WHERE plays.song_id = songs.id
;

Both seem to get the correct answer.

Another useless thread. I don’t understand why codecademy encourage us to use the forum. This is a total waste of time!

VALID FAQ covers the “Code Challenge 2” exercise from the lesson “Code Challenge