Hi Stewart,
Yes, I thought I could count many different groupings in the same SQL statement. Thanks for clarifying that for me.
In my case, all the Grant IDs are unique. A faculty member could have more than one grant (so associated with more than one Grant ID). Considering the data above: what I need is a query which will yield a count of 2 for Payroll Number, 4 for Grant ID, etc (have many other groupings...
User Profile
Collapse
-
Select Distinct with multiple count?
Hi,
I have a query which is supposed to count distinct fields but it doesn't work properly. It does not count the unique values of the PayrollNumber. It counts all values. Any ideas why? Thanks.
[code=sql]SELECT qryProjects.Fis calYear AS FiscalYear, qryProjects.MyF ac AS HomeFac, Count(qryProjec ts.PayrollNumbe r) AS CountOfPayrollN umber, Count(qryProjec ts.GrantID) AS CountOfProjects , Count(IIF(qryPr ojects.contract _type="Tenured" ,0))...
No activity results to display
Show More
Leave a comment: