title: Count from inner select statement
body: <p>I am trying to execute the following query in SQL server but I am getting error. Can somebody explain me how to count the inner select statement?</p>
  
  <pre><code>SELECT COUNT(*) from
  
  (Select ID,
        COUNT(ID)
    FROM [Testing].[dbo].[Bench] group by ID  having COUNT(*) =5);
  </code></pre>