select AuthInfo, O.FriendlyName, SUO.LastAccessTime
from SystemUserOrganizations SUO
left join SystemUserAuthentication SUA ON SUO.UserId = SUA.UserId AND LEFT(AuthInfo, 1)='C'
left join Organization O ON SUO.OrganizationId=O.Id
where LastAccessTime IS NOT NULL
order by SUO.LastAccessTime DESC
Hiç yorum yok:
Yorum Gönder