ReWrite Count Of CloseVotes

0

Please login or register to vote for this query.

(click on this box to dismiss)

Esperanto Language

Q&A for teachers and students of the Esperanto language

SELECT
Count(id),
    CloseCount
FROM    (

SELECT
     p.id,
     count(v.id) CloseCount
FROM
     posts p
     INNER JOIN votes v
       ON p.id = v.PostID
          and v.votetypeid = 6
WHERE
     p.posttypeid = 1 
     and not closeddate is null
GROUP BY 
p.id ) t
GROUP BY 
      closeCount

Enter Parameters

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