Multiple inner joins in the report function

0
Greetings! I'm currently working on a Mendix application for school and I have run into the following problem. While using the report widget everything is going smoothly when joining two entities. However, when i try to ad a third (see OQL below) the Application gives me an error while there are no error to be found in the modeler. Someone, please help! Error giving code: From csys.Employee as Employee Inner Join Employee/csys.Planning_Medewerker/csys.Planning as PM, Employee/csys.Billing_Grid_Employees/csys.Billing_Grid as BM Group by Employee/Med_ID Select Employee.Med_ID as Employee_ID, SUM(PM/Planned_Hours) as Planned_Hours, SUM(BM/Actual_Hours) as Actual_Hour Normal inner join working code: From csys.Employee as Employee Inner Join Employee/csys.Planning_Medewerker/csys.Planning as PM Group by Employee/Med_ID Select Employee.Med_ID as Employee_ID, SUM(PM/Planned_Hours) as Planned_Hours Oh, and when using this construction it just adds up everyhting and does not display individual Employee ID's From csys.Employee as Employee Inner Join Employee/csys.Planning_Medewerker/csys.Planning as PM Inner Join Employee/csys.Billing_Grid_Employees/csys.Billing_Grid as BM Group by Employee/Med_ID Select Employee.Med_ID as Employee_ID, SUM(PM/Planned_Hours) as Planned_Hours, SUM(BM/Actual_Hours) as Actual_Hours
asked
1 answers
0

maybe try something like

  From csys.Employee as Employee
 Select Employee.Med_ID as Employee_ID
 , (SELECT SUM(PM/Planned_Hours) FROM csys.Planning AS PM WHERE PM/csys.Billing_Grid_Employees=Employee.ID) as Planned_Hours
 , (SELECT  SUM(BM/Actual_Hours) FROM csys.Billing_Grid AS BM WHERE BM/csys.Billing_Grid_Employees=Employee.ID) as Actual_Hours
answered