Alexandre Leitao
Alexandre Leitao

Reputation: 1

Access/SQL Count Distinct Values

Need a quick help with Access. I'm not comfortable around SQL but i will try to explain my problems. I'm trying to create a simple query to Count the Number of distinct of Numbers in the following way:

What I have:

Table 1:

enter image description here

What I need to have:

Table 2:

enter image description here

Is it possible?

Upvotes: 0

Views: 43

Answers (1)

Gordon Linoff
Gordon Linoff

Reputation: 1269773

MS Access doesn't support count(distinct). But you can use a subquery:

select col1, count(*)
from (select distinct col1, col2 from t) as t
group by col1

Upvotes: 2

Related Questions