2/8 foreign key lesson

Guys, please help with next exercise:

"3. On the next line, add the following code to the code editor

SELECT * FROM albums WHERE artist_id = 3;
Press Run.

What do you think artist_id is doing?"

I entered needed query(SELECT * FROM albums WHERE artist_id = 3;), but it is not enough. Exercise does not count (is red). What I should to do?

Are you seeing any kind of error message?

i’m also having this issue doesn’t matter what I do I can’t get past it, try even copying and pasting the exact code and it still doesn’t work.

1 Like

I had this then I realised it should be 2 lines of code.

Step 3 says add the line.

So it’s the line from step 2 and then step 3 so it should look like this.
SELECT * FROM artists WHERE id = 3;
SELECT * FROM albums WHERE artist_id = 3;

This worked for me and let me continue.

2 Likes

SELECT * FROM artists WHERE id = 3;
SELECT * FROM albums WHERE artist_id != 3;

this worked for me

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.