title: Use Access (SQL) query to group (histogram) data by date with multiple fields
body: <p>I'm looking to try and put together a histogram for returns and group it by division, but just for an example, let's say we have drivers that are prone to crashing cars.  I want to know how many times each driver has crashed a car in each quarter so I can see if they're getting better worse at the whole driving thing.</p>
  
  <p>Here's a table of example data:</p>
  
  <pre><code>crash_date  driver  car
  10/26/2013  Jane    Hundo
  11/3/2013   Bob     Hundo
  11/6/2013   John    Ferd
  11/12/2013  John    Superoo
  11/12/2013  Bob     Ferd
  1/20/2014   John    Superoo
  3/5/2014    John    Superoo
  3/17/2014   Bob     Superoo
  5/24/2014   Bob     Hundo
  </code></pre>
  
  <p>What I'd like to get is the number of crashes organized by driver and quarter:</p>
  
  <pre><code>Quarter Bob     Jane    John
  Q4Y13   2       1       2
  Q1Y14   1       0       2
  Q2Y14   1       0       0
  Q3Y14   0       0       0
  </code></pre>
  
  <p>Using the info from <a href="https://stackoverflow.com/questions/1764881/mysql-getting-data-for-histogram-plot">this question</a> got me this far:</p>
  
  <pre><code>SELECT  crash_year as Year, Count(*) as Bob
  FROM    (SELECT  year(crash_date) as crash_year
          FROM    (SELECT DISTINCT crash_date, driver
                  FROM            crash_table
                  WHERE           driver = "Bob") AS subQuery1) AS subQuery2
  GROUP   BY crash_year
  ORDER   BY crash_year;
  </code></pre>
  
  <p>Which gives me this result:</p>
  
  <pre><code>Year    Bob
  2013    2
  2014    2
  </code></pre>
  
  <p>I haven't had much more luck with my searches up to this point, but I'll keep poking around.</p>