OQL Query in crash course

0
Hello, I’m beginner in Medix. I got stuck in OQL Query in Mendix Crash course which is based on Summerhill hospital management app. The query given in the course is showing wrong. The purpose of the query is to retrieve the details about department name in hospital according to shift planning. 
asked
2 answers
0

Hii shubham nagre,

below  is working OQL try this.

hope it will help you.

 

SELECT D.Name DepartmentName, COUNT(S/id) Number
FROM UserManager.Shift S
JOIN S/UserManager.Shift_Department/UserManager.Department D
LEFT OUTER JOIN S/UserManager.Shift_Employee/UserManager.Employee E
WHERE E/ID = NULL
GROUP BY D.Name


 

answered
0

Did this course a while ago, so I had a look at the OQL in that project’s Dataset. It is this:

SELECT D.Name DepartmentName, COUNT(S/id) Number
FROM UserManager.Shift S
JOIN S/UserManager.Shift_PlanningPeriod/UserManager.PlanningPeriod/UserManager.PlanningPeriod_Department/UserManager.Department D
LEFT OUTER JOIN S/UserManager.Shift_Employee/UserManager.Employee E
WHERE S/UserManager.Shift_Employee = NULL
GROUP BY D.Name

Does this oql work for you?

answered