How can one select only the items he want in the IN list? for example
select * from pagetags where TagID in (1,2,4)
Now I want all the page
you could try something like this:
SELECT id, Tag FROM ( SELECT id, Tag, COUNT(*) OVER(partition by id) as cnt FROM pagetags WHERE Tag in(1,2,4) GROUP BY id, tag ) a WHERE a.cnt = 3