Backboards: 
Posts: 152
In response to "I was assuming it was a phone number. You need some field that is consistent across the records in order to aggregate them. -- nm" by Beryllium

so far I have this ...


SELECT * FROM dbo.CallHistoryData
WHERE RespondentID IN (
SELECT RespondentID
FROM dbo.NADBankCallHistoryData
WHERE LastCallDateTime>'2012-06-09 06:00' AND LastCallDateTime<'2012-06-10 06:00'
GROUP BY RespondentID
HAVING COUNT(*)<3 AND COUNT(*)>0
)
AND LastCallDateTime>'2012-06-09 06:00' AND LastCallDateTime<'2012-06-10 06:00'


It's giving me all records for that day for less than 3 attempts. How do I get just the last attempt?

Any idea how I then get ones with (or without) a previous refusal?

Thanks!



Responses:
Post a message   top
Replies are disabled on threads older than 7 days.