title: Returning the Quarter in SQL Server
body: <p>I am a complete novice at SQL Server and naively thought that there would be a QUARTER() function, alas there is not and some googling didn't come up with anything useful!</p>
  
  <p>Basically what I want to achieve is that for all rows in my database I want a count of those rows grouped by Quarter.</p>
  
  <p>If possible I would like to keep all calculation with the query but if not it is PHP that is kicking everything off.</p>