Count Distinct in a Group By aggregate function in Access 2007 SQL

后端 未结 3 2033
无人及你
无人及你 2021-01-06 09:56

Hello I have browsed the forum for a while and am asking my first question here. I\'m in a bit of a bind and was wondering if I could get some help out. I am using Access 20

3条回答
  •  感动是毒
    2021-01-06 10:40

    I'm not expert in MS Access and it is quite a long time last time I have written anything for it, but this maybe will work:

    SELECT cd.DiagCode, Count(cd.CustomerID)
    FROM (select distinct DiagCode, CustomerID from CustomerTable) as cd 
    Group By cd.DiagCode;
    

提交回复
热议问题