title: Oracle SELECT : Count of events per team and per year
body: <p>As said in the title, I want to select the number of events per team and per year. The select statement below works fine but doesn't give me exactly what I am looking for.</p>
  
  <pre><code>SELECT
   Team.team_id,
   TO_CHAR(Event.START_DATE_TIME, 'yyyy') AS year,
   count(event_id)    AS events
  FROM
   Team
  LEFT OUTER JOIN
   Event ON Event.team_id = Team.team_id
  GROUP BY
   TO_CHAR(Event.START_DATE_TIME, 'yyyy'),
   team_id
  ORDER BY
   year  ASC,
   team_id  ASC
  ;
  </code></pre>
  
  <p>With this, if we have :</p>
  
  <pre><code>Team 1 : 1 event in 2006
  Team 2 : 1 event in 2007
  </code></pre>
  
  <p>We obtain :</p>
  
  <pre><code>ID | Year | Events
  ------------------
  1  | 2006 | 1
  2  | 2007 | 1
  </code></pre>
  
  <p>And I would like to obtain :</p>
  
  <pre><code>ID | Year | Events
  -------------------
  1  | 2006 | 1
  2  | 2006 | 0
  1  | 2007 | 0
  2  | 2007 | 1
  </code></pre>
  
  <p>I don't know how to modify my request to do so.</p>