title: oracle sql count (or other sufficient aggregate) return zero when row not present
body: <p>I am using an Oracle DB.</p>
  
  <p>I have ONE table: Cars.</p>
  
  <p>It has three fields</p>
  
  <p>Race - Car - Finish</p>
  
  <p>The Car is essentially the ID field.  The race is the name of the race.   The Finish is where the car placed: (1st, 2nd, 4th, DNF).</p>
  
  <p>I want to return how many times a certain car finished at each position, including the zero instances.  So the end result would be:</p>
  
  <pre><code>Toyota
  Finish         Amount
  1st            3
  2nd            0
  3rd            2
  DNF            0
  </code></pre>
  
  <p>I've tried NVL to return zero when a car does not have a 2nd place finish:
  select Finish, count(nvl(finish))
  from cars where Car = 'Toyota';
  But this still only returns the 1st and 3rd place finish counts.  </p>
  
  <p>I am pretty much a beginner at SQL so I have been reading up all the zero count questions I could find on this site and elsewhere and cannot generalize the advice to my particular situation.  </p>
  
  <p>EDIT TO INCLUDE TABLE:
  I am including the table for clarification.  The "Race" field is really not important for this task as I am only trying to count "finish" positions.</p>
  
  <pre><code>CAR       RACE      FINISH
  Toyota    DCA       1st
  Toyota    NYC       3rd
  Toyota    ATL       3rd
  Toyota    PHI       1st
  </code></pre>