[AccessD] Count of Unique Records

jeffrey.demulling at usbank.com jeffrey.demulling at usbank.com
Wed May 28 09:43:30 CDT 2003


You might try something like this:

SELECT dbo_tblOffices.Name, Count(dbo_tblOffices.Name) AS CountOfName
FROM dbo_tblOffices
GROUP BY dbo_tblOffices.Name;





"Mark Boyd" <MarkBoyd at mcbeeassociates.com>
Sent by: accessd-bounces at databaseadvisors.com
05/28/2003 09:35 AM
Please respond to accessd

 
        To:     AccessD at databaseadvisors.com
        cc: 
        Subject:        [AccessD] Count of Unique Records


I have a table with the following records:
John
John
Bill
Bob
 
I need to find out how many unique records there are.
My current approach is 1 query grouping the above table.
Then, I get a count of grouped records with a 2nd query.
 
Is there a way to avoid using 2 queries for this?
The above is obviously an example.  The table actually holds thousands and 
thousands of records.
 
Thanks,
Mark Boyd
Sr. Systems Analyst
McBee Associates, Inc.
 _______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://databaseadvisors.com/pipermail/accessd/attachments/20030528/2837ab89/attachment-0001.html>


More information about the AccessD mailing list