Logs de Login de usuários no CrefazOn
select a.[Login], MAX(b.LogDate) as UltimoLogin from seguranca.usuario a with(nolock) left join Seguranca.LoginLogDetalhado b with(nolock) on a.Id = b.UsuarioId where a.Ativo = 1 and PessoaId is null group by a.[Login] order by UltimoLogin desc
No Comments