Subject How do I return a count of (2) distinct records when there are multiple records in a table?
Author SoftTech
Greetings All,

I have a temporary table in my database that stores activities on a debt
that will eventually be exported to another company.

In the following scenario, there are two debts 1010-6-12 and 1010-7-13 that
have activities on them.

During our export we combine activities for each debt into one memo line.

Is it possible to write a SQL select statement to take the following data
and return a count of (2) records?

SITE_ID, ACCT_ID, CASE_ID, DEBT_NO, MEMO_DATE, MEMO

3008, 1010, 6, 12, 6/28/2011 6:44:57 AM, Payment Plan Created
3008, 1010, 6, 12, 6/28/2011 6:46:15 AM, Payment Plan Deleted
3008, 1010, 6, 12, 6/28/2011 7:07:19 AM, Inbound Call Received: Positive
Outcome
3008, 1010, 6, 12, 6/28/2011 7:09:13 AM, Inbound Call Received: Positive
Outcome
3008, 1010, 6, 12, 6/28/2011 7:10:26 AM, Outbound Call - No Answer
3008, 1010, 6, 12, 6/28/2011 7:26:15 AM, Dialer - Left Message
3008, 1010, 6, 12, 6/28/2011 8:14:54 AM, Settlement Letter
3008, 1010, 7, 13, 6/28/2011 6:44:57 AM, Payment Plan Created
3008, 1010, 7, 13, 6/28/2011 6:46:15 AM, Payment Plan Deleted
3008, 1010, 7, 13, 6/28/2011 7:09:13 AM, Inbound Call Received: Positive
Outcome
3008, 1010, 7, 13, 6/28/2011 7:26:15 AM, Dialer - No Answer

Thanks to all that reply,

Mike