View Full Version : Counting Distinct Values In A Query


The Brown Growler
11-09-2008, 01:26 AM
Hi,

Is it possible to count the number of distinct values for a field in a query using the query grid and a function/formula?

I have a field that contains some duplicate values and rather than count the full list as "Count" would do, I hope to be able to obtain a "Distinct Count" of the unique values.

At the moment the query is a non SQL specific query and I would prefer to keep that type, however, if the only solution is an SQL specific query I am willing to give it a try.

Any help most appreciated

marleymanner1
11-09-2008, 02:37 PM
Brown Growler,

I would really just use stacked queries here. I'm not even sure if you can do this in one query, but you certainly can in two!

1) SELECT DISTINCT * FROM TABLE
2) SELECT COUNT(*) FROM QUERY