title: Calculating Total Sales from Multiple MySQL Tables
body: <p>I'm trying to figure out how to determine the total sales for an employee using MySQL. The DB has 4 tables in it that will help determine the total sales.  I was able to create a Query that selects all the necessary tables to calculate the Sales Total.</p>
  
  <p>Query:</p>
  
  <pre><code>SELECT employees.eno, employees.ename, orders.ono, orders.eno, 
      parts.pno, parts.price,odetails.ono, odetails.pno, odetails.qty
  FROM test.employees, test.parts, test.orders, test.odetails
  WHERE employees.eno = orders.eno AND parts.pno = odetails.pno
  </code></pre>
  
  <p>This comes up with a Table that displays the Employee's name, Item, price it's sold at.  I'm not sure where to go from here.  And any help would be much appreciated!  I'm not sure if a stored procedure would help, then I could call it in a Java program to print out the results.  Just really confused here.  Any help would be appreciated.  Thank you!</p>