SQL Query of Weekly Most Requested WebPage in SharePoint 2013

Normally you can access Usage Reports from Popularity Trends but if you’re planning to write a custom webpart or want to see the results through sql, use a query like this:
 
 
Use WSS_UsageApplication
Select Top 100 ReferrerUrl,SUM(RequestCount) as Request from RequestUsage
Where (LogTime between (GETDATE() – 7) and GETDATE())
and ReferrerUrl like ‘%.aspx’
and RequestCount!= 0
Group By ReferrerUrl
Order by SUM(RequestCount) DESC

Araf Global is a software consultancy company founded in 2016 focusing on cutting edge technologies.