Hmmm . . . use window functions:
SELECT ptt.*
FROM (SELECT ptt.*,
COUNT(*) OVER (PARTITION BY ptt.tag_id) as cnt
FROM PostToTag ptt
) ptt
WHERE cnt >= 30;
CLICK HERE to find out more related problems solutions.
Hmmm . . . use window functions:
SELECT ptt.*
FROM (SELECT ptt.*,
COUNT(*) OVER (PARTITION BY ptt.tag_id) as cnt
FROM PostToTag ptt
) ptt
WHERE cnt >= 30;
CLICK HERE to find out more related problems solutions.