ReWrite Count Of CloseVotes

0

Please login or register to vote for this query.

(click on this box to dismiss)

スタック・オーバーフロー

プログラマーとプログラミングに熱心な人々のための質問と回答

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 to meta site
loading Hold tight while we fetch your results