Math on query

jwillet1

Registered User.
Local time
Yesterday, 17:06
Joined
Nov 8, 2013
Messages
35
I have a query i use to return some time lengths for test runs. The user inputs a start and end date and time for multiple test categories, the query will pull those results and use datediff to determine the length of the test.

The issue is that a single test run, ie id 1032, can include metrics for many things. In the attachment you will see that a, test 1032 having 7 metrics, St, Ha, Ha E, etc. What i need to do is distribute evenly the test length in to each of those metrics. As it stand now if i group on testid and sum the hours it looks like test 1032 took 45.5 hours where it actually took 6.5. If each line of the query held 1/7 of the total test time, ie .93 hours, this would total the correct length of 6.5.

Is there a way i can do this in the query
 

Attachments

  • query question.PNG
    query question.PNG
    19.7 KB · Views: 111
You need to group on multiple fields, e.g. TestID > AttributeShort > ASRLine... in that order (depending on your requirement).
 

Users who are viewing this thread

Back
Top Bottom