Need help building SQL Query (simple JOIN)
- by Newbie
Hello!
In my database, I have a "users", a "quests" and a "questings" table.
A user can solve a quest. Solving a quest will save the "user_id" and the "quest_id" in my "questings" table.
Now, I want to select all quests, a user has NOT solved (meaning there is no entry for this user and quest in "questings" table)!
Let's say the user has the id 14. How to write this query?
After solving this query, I want to filter the results, too.
A quest and a user has a city, too.
What to do for writing a query which returns all quests, a user has NOT solved yet, in the users city (user city == quest city)?