I am trying to learn how to use JOINs and for the life of me I cannot seem to get my head around the query I need to get the results I want.
My Tables:
What I am trying to achieve is:
Select all articles from Articles that are tagged as Gold and Silver
I believe my table relationships are OK, Green are PK's and Red FK's.
I have made multiple attempts at this and this is my latest:
SELECT Articles.Article_Name, Articles_Tagged.Tag_ID, Tags.Tag_Name
FROM Articles
INNER JOIN Articles_Tagged ON Articles.Article_ID=Articles_Tagged.Article_ID
WHERE Articles_Tagged.Tag_Name='Gold' AND Articles_Tagged.Tag_Name='Silver';
I believe my issue is the JOIN, which I think is throwing this message:
The multi-part identifier "Tags.Tag_Name" could not be bound.