Link to home
Start Free TrialLog in
Avatar of dprasad
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.
Avatar of Sean Stuber
Sean Stuber

no queries were attached, but that's ok, don't really need them

please post sample data and expected output
Avatar of dprasad

ASKER

Doh, please see it attached and i think you will understand my method..
queries.txt
ASKER CERTIFIED SOLUTION
Avatar of flow01
flow01
Flag of Netherlands image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of dprasad

ASKER

Thanks!!
Avatar of dprasad

ASKER

thanks