Partager via


IIS LogParser – Hits in last 7 Days

Here’s an IIS LogParser query I’ve written that will output the top hits for your website within the last 7 days. All you need to do is change the path of the log file location:

SELECT COUNT(*) AS Hits, cs-uri-stem AS Page
FROM D:LogFilePat*.*
WHERE
TO_DATE(Date) >= TO_DATE(SUB(SYSTEM_TIMESTAMP(), TO_TIMESTAMP(’01-07′, ‘MM-dd’)))
GROUP BY cs-uri-stem
ORDER BY Hits DESC

 

Matt Shadbolt