Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello everybody.
I would like to know how i could map this tables:
Production Hist by Machine |
---|
Machine ID |
Datehour |
Partial amount |
Worker - Role |
---|
Id Worker |
Id Role |
Worker login datehour |
Worker logout datehour |
Role - Machines |
---|
Id Role |
From Datehour |
To Datehour |
Machine ID |
I would like to know production by worker = sum(Partial amount) The roles can change operative machines dynamically and worker can change his/her role dynamically.
Please, i need help.
aggr(sum(partialamount),[worker-role]))
Incorrect.but thanks
I need Partialamount with machine dates between worker login and logout and the same time between role-machine from and to dates
Hi.
You can link Production history and Roles using Machine ID, From Datehour, To Datehour, Datehour. It's an advanced intervalmatch case with a key field (refer to the help).
Using that linktable you can get the relation between Id Role and Datehour. Then you can similarly link Workers using Id Role, Datehour, Worker login datehour, Worker logout datehour.
Now you can draw the scheme and avoid the loop references with some complex keys.
I guess that different workers don't chose the same roles at the same time.
Thanks for your answer,
Workers could chose the same role at the same time.
So that they can use the same machine at the same time. Then you should decide how the amount of work should be calculated.
Anyway the logic provided above is still applicable.