Good afternoon,
I'm writing a query that needs to pull the same data with three different filters due to the way in which it is measured.
For example: I need to pull service times associated with three different codes, call them 1, 2 and 3.
I can pull the times for 1 and 3 with no problem.
2 however needs to be pulled in two different ways as the data gets recorded funny. Each code has three times associated with it (time of problem, time problem acknowledge and time problem resolved.
About 50% of the time the problem for 2 is resolved right away (one record) and sometimes it takes two trips (two records) but when this happens the first of the two records only has two of the three times.
I can write three subquerys, each with a filter designed to capture only one of the three possible situations detailed above... how can I get the 'service time' from all three subquerys to be added together so it doesn't have to be done manually? Or is there another way to pull the data I might be missing?
Any help or suggestions would be greatly appreciated!
I'm writing a query that needs to pull the same data with three different filters due to the way in which it is measured.
For example: I need to pull service times associated with three different codes, call them 1, 2 and 3.
I can pull the times for 1 and 3 with no problem.
2 however needs to be pulled in two different ways as the data gets recorded funny. Each code has three times associated with it (time of problem, time problem acknowledge and time problem resolved.
About 50% of the time the problem for 2 is resolved right away (one record) and sometimes it takes two trips (two records) but when this happens the first of the two records only has two of the three times.
I can write three subquerys, each with a filter designed to capture only one of the three possible situations detailed above... how can I get the 'service time' from all three subquerys to be added together so it doesn't have to be done manually? Or is there another way to pull the data I might be missing?
Any help or suggestions would be greatly appreciated!