Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Count How Many Entries for each UserID 1

Status
Not open for further replies.

Michael42

Programmer
Oct 8, 2001
1,454
US
Hello All,

I have a users audit table (Oracle 8.17's aud$) that I would like to produce a count of how many entries there are for each USERID.

Table: aud$
Field: userid

I have done the below but would take forever to do for all the userid's.
SELECT count(*) FROM aud$ WHERE userid = 'SmithJ';

What can you suggest?

Thanks,

Michael42
 
Something like this ?
SELECT userid, Count(*)
FROM aud$
GROUP BY userid;

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top