Created
July 27, 2018 19:36
-
-
Save gtaing1/e0228be6d9675fa8c749aa804a5f71c8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select | |
UserName as Name, | |
Email as email, | |
Role as role, | |
PageVisited as ViewedPage, | |
/*Count(PageVisited) as NumberofHits,*/ | |
COUNT(CAST(Date as date)) as NumberOfVisits, | |
CAST(Date as date) as LastVisitedDate | |
from [dbo].[UserActivityLog] | |
where EMAIL NOT LIKE '%starcom%' | |
group by UserName,Role,Email,PageVisited,CAST(Date as date) | |
order by LastVisitedDate DESC | |
select * from [dbo].[UserActivityLog] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment