SELECT a.TagId, b.TagId, COUNT(*) as CountRelations FROM ...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Vegetarianism

Q&A for those committed to a vegan or vegetarian lifestyle and anyone interested in learning more

SELECT
       a.TagId,
       b.TagId,
       COUNT(*) as CountRelations
FROM PostTags AS a
JOIN PostTags AS b 
  ON a.PostId = b.PostId
WHERE a.TagId != b.TagId
GROUP BY a.TagId, b.TagId
ORDER BY CountRelations DESC;

Enter Parameters

Options:
Switch to meta site
loading Hold tight while we fetch your results