User Counts of ratio of answer to question

0

Please login or register to vote for this query.

(click on this box to dismiss)

Craft CMS Meta

Q&A about the site for administrators, end users, developers and designers for Craft CMS

SELECT top 10 *
FROM   (SELECT p.owneruserid, 
               p.id, 
               pt.name 
        FROM   posts p 
               INNER JOIN posttypes pt 
                 ON p.posttypeid = pt.id) p 
       PIVOT (
       COUNT (p.id) 
       FOR p.name IN ([Question], [Answer])) AS pvt

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results