Func 1


Please login or register to vote for this query.

(click on this box to dismiss)

Joomla Meta

Q&A about the site for Joomla! administrators, users, developers and designers

SELECT P.Id AS [Post Link], R.MaxScore, R.PostType
FROM Posts P
    SELECT MAX(PO.Score) AS MaxScore, PT.Name AS PostType
    FROM Posts PO
    INNER JOIN PostTypes PT ON PT.Id = PO.PostTypeId 
          AND PT.Id IN (1, 2) -- 1 => Question, 2 => Answer
    WHERE PO.DeletionDate IS NULL 
    GROUP BY PT.Name
    ) R ON R.MaxScore = P.Score;

Enter Parameters

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