title: Compute "Amount" using values from tables
body: <p>I have the following tables already in my DB </p>
  
  <pre><code>EMP
      E_N E_NAM     E_RATE E_DEP
      --- ----- ---------- -----
      1   A            400      
      2   B            200 1    
      3   C            150 2    
      4   D            150 3    
      5   E            120 1    
      6   F            100 1    
      7   G            100 2    
      8   H             50 2    
      9   I             50 3    
      10  J             50 3    
      11  K            150 3  
  
  
  WORKS
      E_NO PR_NO      HRS
      ---  ---   ----------
      2     1           10
      3     2           20
      5     1           20
      5     2           20
      5     3           20
      6     1           10
      6     2           10
  </code></pre>
  
  <p>I have to compute the amount billed to each project as AMOUNT, and that is the sum of the amount billed to the project by all employees who work on said project. The amount billed being E_RATE*HRS (product of HRS and E_RATE).</p>
  
  <p>There are only 3 PR_NO: 1, 2 and 3. </p>
  
  <p>I've tried this multiple times with no avail, I know that it has to be a nested query and the calculation to be shown AS AMOUNT, but no clue on how exactly to only display the 3 projects with the calculation already made.</p>