![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi, I have one table with records of internet activity, one hit per row. I need to generate a report of the top 10 websites of the top 10 users on any given day. Currently I'm manually running two separate queries: Query 1: Return top users for a given time period Use ISAFWLOG SELECT clientusername, count(*) as total From WebProxyLog Where logTime between '20100927 10:00:00.000' AND '20100927 23:59:59.999' AND ClientUserName <> 'anonymous' group by clientusername order by total desc Query 2: Return top websites for a particular user Use ISAFWLOG SELECT desthost, count(*) as total From WebProxyLog Where logTime between '20100926 10:00:00.000' AND '20100927 23:59:59.999' AND ClientUserName = 'username' group by desthost order by total desc What's the easiest way to do this in one query or stored procedure? I am not very good with SQL so any help would be great. Thanks!! |
#3
| |||
| |||
|
|
Hi, I have one table of internet activity, one hit per row. I need to generate a report of the top 10 websites of the top 10 users on any given day. |
![]() |
| Thread Tools | |
| Display Modes | |
| |