I need some help with something that should be very basic but i cannot get it to work in MS Access 2007 despite lots of researching. Can someone please help me adapt the query below to count the number of distinct or unique "extensions"?
The table has 20+ columns but I only want to see 3 + a count column. I need the group by because the same extension could be listed multiple times with the same loc_ID, ROW_DATE and STARTTIME
SELECT root_hagent.loc_id, root_hagent.row_date, root_hagent.starttime, Count(root_hagent.extension) AS CountOfextension
FROM root_hagent
GROUP BY root_hagent.loc_id, root_hagent.row_date, root_hagent.starttime
HAVING (((root_hagent.row_date)>Now()-1));
The table has 20+ columns but I only want to see 3 + a count column. I need the group by because the same extension could be listed multiple times with the same loc_ID, ROW_DATE and STARTTIME
SELECT root_hagent.loc_id, root_hagent.row_date, root_hagent.starttime, Count(root_hagent.extension) AS CountOfextension
FROM root_hagent
GROUP BY root_hagent.loc_id, root_hagent.row_date, root_hagent.starttime
HAVING (((root_hagent.row_date)>Now()-1));