SELECT qNom.Nominee, Count(qNom.Nominee) AS Nominations
FROM qNom
GROUP BY qNom.Nominee
ORDER BY qNom.Nominee
--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)
"trainsteve" <(E-Mail Removed)> wrote in message
news:C25A5F49-5C23-4058-91AE-(E-Mail Removed)...
>I want table of nominations which includes the Nominee, Nominator, and
>reason
> for the nomination. The database allows for multiple Nominees per
> nomination,
> so I used a UNION query to deal with that.
>
> I want to be able to count how many nominations a each person recieved, so
> that when I run the query i get something like this:
>
> Nominee Nominations
> Randy 3
> Sue 1
> Jack 2
> Ann 1
>
> Here is the SQL statement I am using:
>
> SELECT qNom.Nominee, Count(qNom.Nominee) AS Nominations
> FROM qNom;
>
> But i get an error message stating I tried to run a query that
> 'qNom.Nominee' is not part of the aggregate function.
>
> Any ideas on how to resolve this?
>
> Thanks