April 3, 2017 at 1:47 pm
from the following sample record , every userid has an under score in the middle which gives session id but i would like to exclude the session and get count for the user account and group by year. I would like to see count for each user per month and year.
userid timestmap
Domain\mpollin_qspmmk45vnd3uheooa3dst45 12/21/2016 13:33:16.740000
April 3, 2017 at 2:04 pm
Tara-1044200 - Monday, April 3, 2017 1:47 PMfrom the following sample record , every userid has an under score in the middle which gives session id but i would like to exclude the session and get count for the user account and group by year. I would like to see count for each user per month and year.userid timestmap
Domain\mpollin_qspmmk45vnd3uheooa3dst45 12/21/2016 13:33:16.740000
You could use something like this:GROUP BY LEFT( userid, CHARINDEX( '_', userid))
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy