If I use:
SELECT *
FROM "moves"
INNER
JOIN "move_conditions"
ON "move_conditions"."move_id" = "moves"."id"
INNER
JOIN "conditions"
ON "conditions"."id" = "move_conditions"."condition_id"
WHERE "conditions"."id" IN (29, 3)
This returns the correct tables where conditions have an id of 29 or 3.
However, if I try:
SELECT *
FROM "moves"
INNER
JOIN "move_conditions"
ON "move_conditions"."move_id" = "moves"."id"
INNER
JOIN "conditions"
ON "conditions"."id" = "move_conditions"."condition_id"
WHERE "conditions"."id" NOT IN (29, 3)
The result is incorrect. Conditions with id 29 or 3 are in the result. They should not be. How do I fix this?