DEMO for Need help with a complex SQL query

0

Please login or register to vote for this query.

(click on this box to dismiss)

http://stackoverflow.com/q/4015915/119477

Stack Overflow

Q&A for programmers

-- DEMO for Need help with a complex SQL query 
-- http://stackoverflow.com/q/4015915/119477
 
SELECT DISTINCT   t2.TagName Other
from 
tags t
INNER JOIN postTags pt ON t.id = pt.tagid
INNER JOIN postTags pt2 ON pt.PostId = pt2.PostId
INNER JOIN tags t2 on pt2.Tagid = t2.id
where t.tagname = 'MySQL'

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results
:records returned in :time ms:cached