title: Identify how many times in a month a report gets access
body: <p>Using SQL Server v17.4 and am not sure how to create a query that sum's the number of times a user opens a report.</p>
  
  <p>These are the columns:</p>
  
  <pre><code>ID (GUID) 
  User (Varchar(100) - name to the person who accessed the report
  PageName(varchar(200) - report name
  DateAccessed (datetime) - date user accessed the report
  </code></pre>
  
  <p>This is my current query but it is not returning what I want:</p>
  
  <pre><code>SELECT
      PageName Report,
      [user] UserName,
      FORMAT([DateAccessed],'MMM') Month,
      COUNT(user) Count
  FROM 
      DB.Table
  GROUP BY 
      PageName, [user], [dateaccessed]
  ORDER BY 
      report
  </code></pre>
  
  <p>This is the result I am looking for:</p>
  
  <pre><code>Report      User    Month   Accesed
  Report#1    Andy    Nov     10
  Report#2    Angela  Dec     5
  Report#3    Angus   Jan     15
  </code></pre>