ok, I could figure it out myself:
select employee
, sum(plan) as plans
, sum(actual) as total_actual
from (
select P.plan as plan
, R.employee
, Sum(R.actual) as actual
from Project as P
inner
join Report as R
on...
Thank you again for your assistance and patience, I apprecitate it very much.
Still though this query does not do what I intend, because now it displays the number of projects that the employee has made reports for. But I would like to see the value of "Project.plan". I tried to add it to the...
Thank you very much for your assistance, but I still don't get it. When I execute the query I have to enter a value for "actual" in line 3. I also tried R.actual and Report.actual, same result.
Sorry for this probably stupid question. Problem is that I don't know how this "select in select" works.
This is not quite what I intend, because if an employee has reported on more than one projet, I get one output line per project. But I would like to get it cululated, that means one line per employee.
I have a table "Projects" and a table "Report". Projects has a field "plan" and Report a field "actual".
For each project many reports can be made by different employees.
I want to create a query where I can see the sum of the actual of all reports on all projects a employee made together with...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.