title: Crosstab query in SQL Server
body: <p>I have a table with two columns (Date, Subject), I have created a query from it
  with three columns (MName, Subject, Counting) and also I have created a Dynamic crosstab query.</p>
  <p>All of these I have done in MS Access easily.</p>
  <p>My question is how can I create this 'Dynamic crosstab query' in SQL server.</p>
  <p><a href="https://i.stack.imgur.com/R98Qs.png" rel="nofollow noreferrer">My Table</a></p>
  <p><a href="https://i.stack.imgur.com/CjBXg.png" rel="nofollow noreferrer">Query</a></p>
  <p><a href="https://i.stack.imgur.com/XpbJZ.png" rel="nofollow noreferrer">Dynamic Crosstab Query</a></p>