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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Count Within a Count

Status
Not open for further replies.

szeiss

Programmer
Apr 5, 2000
137
US
Using 10g, I have a table of report names and user names. I need to count the total number of times each report was ran and the total number of unique users that ran each of those reports. I want to show the total report count and the total unique user count.

Thanks,
SZ

 
Never mind, I got it.

Code:
select report, count(report), count(distinct user)
from report_log               
having (count(distinct USER) >= 3)
group by REPORT
order by count(report) desc
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top