I need help writing a query that will validate a first expression and than, if its true, will validate the following expression. Something like:
SELECT
name
FROM
names
WHERE
(tag_id = 1 OR tag_id = 2) AND (tag_id = 3 OR tag_id = 4)
Tried to use subqueries with if’s and exists, but no success.
Any help? Thanks,
Reading between the lines a bit, perhaps something like this: