By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,714 Members | 1,318 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,714 IT Pros & Developers. It's quick & easy.

problem with count distinct

P: 1
I'm trying to make a report of users per hour (I have one that works for users per day) but when I execute the query I realize that I get more users than the ones I have

here is my query

select datepart(hour,date) as 'Hour',
count (distinct user) 'User'
from mensajeejb
group by datepart(hour,date)
order by datepart(hour,date)

Please help me

Oct 14 '05 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.