Tag smackdown: java-ant versus ant

0

Please login or register to vote for this query.

(click on this box to dismiss)

compare performance of question tagged 'ant java' with those just tagged 'ant'

Ask Ubuntu

Q&A for Ubuntu users and developers

-- Tag smackdown: java-ant versus ant
-- compare performance of question tagged 'ant java' with those just tagged 'ant'

SELECT 
    CASE 
    WHEN ptj.PostId IS NULL
    THEN
         'ant'
    ELSE 'ant and java'
    END,
    COUNT( p.Id ),
    SUM( p.Score ),
    SUM( ISNULL( p.AnswerCount, 0 ) ),
    SUM( CASE WHEN p.AcceptedAnswerId IS NULL THEN 0 ELSE 1 END )
FROM
    Posts p

LEFT JOIN
   PostTags ptj
ON    ptj.PostId = p.Id
AND   ptj.TagId = ( SELECT id FROM Tags where TagName = 'java' )

WHERE p.Id IN (
SELECT
        pta.PostId
FROM
      PostTags pta

INNER JOIN
      Tags ta
ON    ta.Id = pta.TagId
AND   ta.TagName = 'ant'
)
GROUP BY
    CASE 
    WHEN ptj.PostId IS NULL
    THEN
         'ant'
    ELSE 'ant and java'
    END

Enter Parameters

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