During the Production, below information are filled in paper forms for each machine in the workshop and then the information in the form is later entered in corresponding access tables and fields:
1- the Batch number (somehow identifies the product)
2- Form Number
3- the date of production
4- Machine
5- time intervals of the machine working and the number of employees attending to the machine . for example 2 persons from 10 AM to 12 PM and 1 person from 13 PM to 15 PM.
7- the quantity and length of the production in total time intervals registered in this form. for example 10 pieces of 3 meters each, 25 pieces of 3.5 meters each and 15 pieces of 2.8 meters each. (these are all defined as the same product although the lengths are different.
8-the wasted product in the total time intervals registered in this form. for example 12 pieces of 0.15 meters each.
please note that the production procedure doesn't allow us to count the number of products and the length of them for each interval separately. therefore, the quantity of the products and the lengths are determined for the total time intervals and do not correspond to each separate time interval.
I need a query with below output:
Total person hour total length of the production total length of waste Form A the total sum of time intervals multiplied by the number of persons for form A the total sum of the pieces produced multiplied by their length for form A the total sum of the pieces wasted multiplied by their length for form A Form B ... ... ...
I am attaching the data base here as well.
Timing V06.1 97-10-12 1733-1.accdb.zip
I can create three separate queries for each column (TotalLength, TotalWaste, TotalPersonHour queries) and then aggregate the results in a fourth query (Aggregate) to get the above result. I am curious to know if this can be reached directly in one query.
thank you