User Profile

Collapse

Profile Sidebar

Collapse
alienz747
alienz747
Last Activity: May 8 '08, 07:53 PM
Joined: May 8 '08
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • alienz747
    replied to Select Distinct with multiple count?
    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...
    See more | Go to post

    Leave a comment:


  • alienz747
    started a topic Select Distinct with multiple count?

    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))...
    See more | Go to post
    Last edited by Stewart Ross; May 8 '08, 06:31 PM. Reason: Added code tags for SQL code
No activity results to display
Show More
Working...