chrishannah8386
New Member
- Joined
- Jun 29, 2015
- Messages
- 10
Hello
I'm wondering if anyone can point me in the right direction.
I want to count the number of Distinct Customers in my table that have a Lead assigned and a Level and a Start Date
I'm trying the Distinct function but that can retrieve a list of unique Customers fine but then when I add the Lead field and add NOT NULL and the Level NOT NULL and Start Date NOT NULL it duplicates the customers (I realise that this is because those records/rows are DISTINCT but i only care about the Customer being distinct
I want to end up with the number of unique customers that have these 3 criteria.
SELECT DISTINCTROW [Account Activity].Customer, [Account Activity].[Lead], [Account Activity].[Level], [Account Activity].[Start Date]
FROM [Account Activity]
GROUP BY [Account Activity].Customer, [Account Activity].[Activ8 Lead], [Account Activity].[Level], [Account Activity].[Start Date]
HAVING ((([Account Activity].[Lead]) Is Not Null) AND (([Account Activity].[Level]) Is Not Null) AND (([Account Activity].[Start Date]) Is Not Null));
I dont know a lot about this sort of thing and i've managed to muddle through till now, but i'm stuck.
I'm wondering if anyone can point me in the right direction.
I want to count the number of Distinct Customers in my table that have a Lead assigned and a Level and a Start Date
I'm trying the Distinct function but that can retrieve a list of unique Customers fine but then when I add the Lead field and add NOT NULL and the Level NOT NULL and Start Date NOT NULL it duplicates the customers (I realise that this is because those records/rows are DISTINCT but i only care about the Customer being distinct
I want to end up with the number of unique customers that have these 3 criteria.
SELECT DISTINCTROW [Account Activity].Customer, [Account Activity].[Lead], [Account Activity].[Level], [Account Activity].[Start Date]
FROM [Account Activity]
GROUP BY [Account Activity].Customer, [Account Activity].[Activ8 Lead], [Account Activity].[Level], [Account Activity].[Start Date]
HAVING ((([Account Activity].[Lead]) Is Not Null) AND (([Account Activity].[Level]) Is Not Null) AND (([Account Activity].[Start Date]) Is Not Null));
I dont know a lot about this sort of thing and i've managed to muddle through till now, but i'm stuck.