title: Putting aggregations in group by
body: <p>I'm having trouble displaying the data how I would like.  I would like to make 2 rows, with  1 column each displaying like:</p>
  
  <pre><code>Home Wins | Visitor Wins
  ------------------------
    3       |      2
  </code></pre>
  
  <p>I assume my issue is adding the Case When to the group by, because as of now (without the group by clause) it displays:</p>
  
  <pre><code>Home Wins | Visitor Wins
  ------------------------
    1       |      1
  </code></pre>
  
  <p>.</p>
  
  <pre><code>SELECT
    sum(CASE WHEN ga_home_score &gt; ga_visitor_score THEN 1 ELSE 0 END) "Home Wins",
    sum(CASE WHEN ga_home_score &lt; ga_visitor_score THEN 1 ELSE 0 END) "Visitor Win"
  FROM dl_game g
    JOIN dl_team ht ON g.ga_home_id = ht.te_id
    JOIN dl_team vt ON g.ga_home_id = vt.te_id
  WHERE ga_schedule_date &lt;= '15-JUN-12'
  GROUP BY ((CASE WHEN ga_home_score &gt; ga_visitor_score THEN 1 ELSE 0 END),
            (CASE WHEN ga_home_score &lt; ga_visitor_score THEN 1 ELSE 0 END));
  </code></pre>