I'm trying to write a query wherein no new tables or views are created. I'm using Oracle 8i. It is suppose to show for each project the weekly cost of each employee (salary is based on a 52 week year and 40 hour week) involved in that project. In addition, it is supposed to show the weekly cost for each employee, a subtotal and average weekly salary for each project as well as grand total and overall average.
Well, this is my first time using SQL and I don't know how to sum up an Employee's hours on a certain project, and then return just ONE entry with all the hours worked for that project. Here's what I have so far: http://stealth.kirenet.com/~aleinss/salary.sql
. If you can help me on getting the first part (computing the weekly cost of each employee for each project), I can probably use that query as a basis to solve the rest of the stuff.
Oh yeah, another question (probably simple), since I'm suppose to have a overall average and grand total, how can I put these after the table?
SQL> select table_name from all_tables;
DEPT_LOCATIONS PROJECT WORKS_ON
A description of each table is here: