In Oracle SQL, how do I return count(*) column along side of a regular column?
What works:
select count(*) from TABLE where username = 'USERNAME';
What I'd like to work:
select username,count(*) from TABLE where username = 'USERNAME';
So I want the username along side of the count, to expand this into another query that lists numerous usernames and the count of their records.
Error:
ORA-00937: not a single-group group function
00937. 00000 - "not a single-group group function"
*Cause:
*Action:
Error at Line: 7 Column: 7
Question:
So, how do I do it?