Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
You can also do this:
select count(distinct user_id) as cnt
from table
Until you say what you want to count, and on which DBMS, the number of records by unique user_id will look something like this:
select count(*) as cnt
from (select user_id
from table
group by user_id)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question