Subs wrote:
> I have a query
>
> Data in column A Data in column B
>
> John xcd
> Fred bys
> Jim bys
> Jim bys
>
> When I do a group by I get
>
> John xcd
> Fred bys
> Jim bys
>
>
> If i want to filter on Jim and count the number in Column B
> How do I get a query to give me one line that gives me
>
> Jim 2
>
> Thanks for any help
>
> Subs
Turn your select query into a totals query, With Jim as the criteria,
and a count on column B
SELECT ColumnA, Count(ColumnB) AS CountOfColumnB
FROM tblYourTable
GROUP BY ColumnA
HAVING (ColumnA="Jim");
--
-D
Duncan Bachen
Director of I.T., Ole Hansen and Sons, Inc.
|