title: Sum of multiple records from joined table?
body: <p>I have a query like this:</p>
  
  <pre><code>select a,b,c
  from
  table
  </code></pre>
  
  <p>Now I have another table which has hoursWorked in it. Basically I want the sum of anotherTable.hoursWorked where anotherTable.a = a and anotherTable.b = b and anotherTable.c = c.</p>
  
  <p>What kind of query do I need to do this?</p>
  
  <p>Thanks</p>
  
  <p>Something like this:</p>
  
  <pre><code>SELECT DATE, CUSTOMER, SUM(FKEY.HOURSWORKED)
  FROM TABLE1
  INNER JOIN TABLE2 FKEY ON FKEY.CUSTOMER = CUSTOMER, FKEY.DATE = DATE
  </code></pre>