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
Douglas J. Steele - 17 Jul 2007 18:32 GMT
SELECT qNom.Nominee, Count(qNom.Nominee) AS Nominations
FROM qNom
GROUP BY qNom.Nominee
ORDER BY qNom.Nominee

Signature
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)
>I want table of nominations which includes the Nominee, Nominator, and
>reason
[quoted text clipped - 22 lines]
>
> Thanks
trainsteve - 17 Jul 2007 18:52 GMT
Thanks. That works.
> SELECT qNom.Nominee, Count(qNom.Nominee) AS Nominations
> FROM qNom
[quoted text clipped - 27 lines]
> >
> > Thanks