Code:
SELECT * FROM [SessionProfile].[dbo].[ReadableSessions] (nolock) where application like ‘%gmmev9%’
select u.userprincipalname, sp.stagename, sp.tmst from StageProgress sp (nolock)
inner join ServerProfile servp (nolock) on sp.SessionId = servp.ProfileId
inner join [User] u (nolock) on u.id = servp.UserId
where sp.tmst > DATEADD("MINUTE", -5, getdate()) and u.userprincipalname like ‘%gmmob002%’
order by sp.tmst desc, u.userprincipalname
Output: