Need help with "Combining Tables Manually" exercise


#1

I found this code on a different thread and tried it.

SELECT *
FROM orders
JOIN subscriptions
ON subscriptions.subscription_id = orders.subscription_id;

SELECT *
FROM orders
JOIN subscriptions
ON subscriptions.subscription_id = orders.subscription_id
WHERE description_id = 3;

It doesn’t seem to work, can anyone help me figure out why?


#2

Says description instead of subscription in the last line?


#3

Hi, there! This question was bugging me too, and I saw your answer and played around with it. Turns out this is mostly correct, except for the last line:

WHERE description = “Fashion Magazine”;

This is because there is no “description_id” in the table, just “description”, and the value is not an integer but a string such as “Political Magazine”, “Fashion Magazine”, etc. Hope this helps.


#4

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