Wow, you just expect the full script here? I will give you examples from the book only, you will need to customize it per your needs.
1) ---Ch02Top10WebRequests.sql---
SELECT
TOP 10
STRCAT(EXTRACT_PATH(cs-uri-stem),'/') AS RequestPath,
EXTRACT_FILENAME(cs-uri-stem) AS RequestedFile,
COUNT(*) AS Hits,
MAX(time-taken) AS MaxTime,
AVG(time-taken) AS AvgTime,
AVG(sc-bytes) AS AvgBytesSent
FROM %source% TO %destination%
GROUP BY cs-uri-stem
ORDER BY MaxTime, TotalHits DESC
---Ch02Top10WebRequests.sql---
2) Unless you are doing centralized w3c logging, else you will need to copy/rename all those website log files into a directory then run it.
3) C:\Temp\Tools\Logparser>LogParser.exe -i:w3c "select top 10 c-ip as IP, count(*)
as Hits from *.log group by IP order by hits desc" -o:NAT
Tweak the script a bit then schedule it in a batch file accordingly