July 18th, 2003, 01:44 PM
SELECT DISTINCT and COUNT
I'm trying to write a query for an access database to give me distinct dates letters were sent out and the number that were sent out that day, and I'm having some trouble. My SQL book gives the following example:
To which access says syntax error.
SELECT COUNT(DISTINCT DateSent)
Can anybody help me out? Thanks!
July 18th, 2003, 03:43 PM
select count(*) from (select distinct datesend
July 18th, 2003, 06:55 PM
swampboogie, i can't believe you slipped up, you are usually perfect
"distinct dates" --> return more than one row
"number sent that day" --> number sent each date
select DateSent, count(*)
July 21st, 2003, 10:27 AM