Okay, I should know this, but I am shaking my head in shame (I am really a programmer, not a SQL or DBA). Anyway, I have records for the year of client names, telephone numbers and appointment dates. Simple. What I need to get is a DISTINCT list of clients served for the year with their current telephone number. As some client have changed their telephone number, I am including apptDate and ordering by ClientName then apptDate DESC and what I want to do is to only pick that FIRST record for each client. I used TOP 1, but that is only returning 1 record.
so the SQL is:
SELECT DISTINCT ClientName, Telephone, apptdate FROM DailyCalls
WHERE Telephone <>'Invalid Number'
ORDER BY ClientName, apptdate desc
Thanks for the help