• cstg85 (1/16/2015)


    Nevyn, I have attached a picture of the current results I am receiving. It's showing that I am performing 2,736 attn tests on machine 55242278 for the day of 9/26. I think it is adding up all of the combinations for that day. Maybe I am wrong?

    You ought to be wrong. As long as it groups by all three columns, it should be only giving you the attn's for that day.

    Now, it is not necessarily SORTING the results as you want.

    Try adding "ORDER BY TestDate,SerialNumber,TestType" after the group by clause and see if you get more of the format you want.

    To understand Eirikur's queries, you will need to look up "windowing functions".