User Counts of ratio of answer to question


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 pvt.owneruserid, pvt.Question, pvt.answer
FROM   (SELECT p.owneruserid, 
        FROM   posts p 
               INNER JOIN posttypes pt 
                 ON p.posttypeid =
                 WHERE pt.ID in (1,2) and p.ownerUserID is not null) p 
       PIVOT (
       COUNT ( 
       FOR IN ([Question], [Answer])) AS pvt

Enter Parameters

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