dprasad
asked on
Selecting distinct/non distinct from same data set
Hello. In a call center environment, each call that comes in is placed into an appropriate category. Calls are placed by participants.
The goal is to count how many times the same participant called into the same category within a 15 day period. Those records need to be tabulated, other calcs remain, but this is the hard part.
See attached file for 2 queries. Only difference is that one is distinct, the other is not selecting distinct. If I could somehow subtract the counts from eachother i would get at the needed number. But because it has to be summed as a group with participant, I'm not sure how these could be subtracted. Maybe a sub-select query of some sort?
Thanks for any advice.
The goal is to count how many times the same participant called into the same category within a 15 day period. Those records need to be tabulated, other calcs remain, but this is the hard part.
See attached file for 2 queries. Only difference is that one is distinct, the other is not selecting distinct. If I could somehow subtract the counts from eachother i would get at the needed number. But because it has to be summed as a group with participant, I'm not sure how these could be subtracted. Maybe a sub-select query of some sort?
Thanks for any advice.
ASKER
Doh, please see it attached and i think you will understand my method..
queries.txt
queries.txt
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks!!
ASKER
thanks
please post sample data and expected output