• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 219
  • Last Modified:

Count Distinct

Hi..Please Help

I have a table with is a log of users interaction with a system.  each time the user uses the system it stamps the db with various details.  What i would like to do is create a query that shows me a count against each of the customers id

eg

user            date           action
abc           1.00 pm          A
xyz           1.05 pm           B
abc           1.10pm           C

i would liekt o generate a query that gives the result

user                       hits
abc                          2
xyz                           1


Thank you for your help

cafferm
0
cafferm
Asked:
cafferm
  • 2
1 Solution
 
rafranciscoCommented:
Try this:

SELECT User, COUNT(*)
FROM YourTable
GROUP BY User
0
 
rafranciscoCommented:
SELECT User, COUNT(*) AS Hits
FROM YourTable
GROUP BY User
0
 
caffermAuthor Commented:
Now thats fast - thank you very much
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now