Get total COUNT(*) and other columns in one SELECT
446249Sep 21 2006 — edited Sep 21 2006Hi. I need to return the Count(*) along with a few other columns, but have had no luck creating the correct PL/SQL statement. Here's the statement I've got,
select page_id, role_id, count(*) as cnt
from user u
where trim(u.email_id) = trim('myemailID')
and u.is_active = 'Y'
group by u.page_id, u.role_id;
This returns this data,
page_id role_id cnt
--------------------------------------------------
ADMIN SA 1
COMPOSE SA 1
ANNOUNCE SA 1
I'd like to get the value 3 in this case for the column cnt. How do I do this? Thanks.