SELECT TOP 100 q.Id AS [User Link] , q.QScore , a.AScore...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Motor Vehicle Maintenance and Repair Meta

Q&A about the site for mechanics and DIY enthusiast owners of cars, trucks, and motorcycles

-- Enter Query Title
-- Enter Query Description

SELECT
     TOP 100
       q.Id AS [User Link]
     , q.QScore
     , a.AScore
FROM
    (
SELECT
      p.OwnerUserId AS Id
    , SUM( p.Score ) AS QScore
FROM
    Posts p
WHERE
    p.PostTypeId = 1
AND p.CommunityOwnedDate IS NULL
GROUP BY
    p.OwnerUserId
    ) AS q
    , (
SELECT
      a.OwnerUserId AS Id
    , SUM( a.Score ) AS AScore
FROM
    Posts a
WHERE
    a.PostTypeId = 2
AND a.CommunityOwnedDate IS NULL
GROUP BY
    a.OwnerUserId
    ) AS a
WHERE
    a.Id = q.Id
ORDER BY
    3 DESC

Enter Parameters

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