title: in grouping getting duplicate records
body: <p>I want to filter records on the basis of month. Requirement is in month how much projects are in "completed, pending, started etc" status. This is my query but i am getting duplicate records.</p>
  
  <pre>
  SELECT distinct
          convert(varchar(7), w.ExpectedStartDate, 126) AS StatusOfMonth,
          COUNT(w.StatusTypeId) AS StatusCount,
          w.StatusTypeId,
          st.StatusTypeName
  
          FROM Table1 w
          LEFT OUTER JOIN StatusType st ON st.StatusTypeId = w.StatusTypeId
          WHERE   CONVERT(VARCHAR(20), w.ExpectedStartDate, 103) BETWEEN '10/01/2011' AND '14/04/2011'
  GROUP BY ExpectedStartDate, w.StatusTypeId, st.StatusTypeName
  </pre>
  
  <p><img src="https://i.stack.imgur.com/AanqD.png" alt="Please see image to clarify what i want"></p>
  
  <p>Please see image to clarify what i want. Please let me know how can i get correct results.</p>