title: Multi Column cross tabulation AKA pivot
body: <p>I've been learning and practicing sql for about 6 months. I'm ready to throw in and just admit I'm to dumb for it and my brain just can't wrap around most its patterns. I'm trying to create a pivot table. There isn't much in the way simple literature on the subject and the one source I did find talked of creating cubes and basic entity-attribute-value (EAV) logic.. Whatever that means.</p>
  
  <pre><code>name        action  pagecount
  -------------------------------
  Company A   PRINT    3
  Company A   PRINT    2
  Company A   PRINT    3
  Company B   EMAIL    6
  Company B   PRINT    2
  Company B   PRINT    2
  Company B   PRINT    1
  Company A   PRINT    3
  </code></pre>
  
  <p>I want to cross tabulate (is that the right term?) column <code>name</code> with the total count of column <code>action</code> and the total count of column <code>pagecount</code></p>
  
  <pre><code> name        action_PRINT   action_EMAIL       pagecount_PRINT      pagecount_EMAIL
  --------------------------------------------------------------------------------
  Company A   4                0                 11                       0
  Company B   3                1                 5                        6
  </code></pre>