First post covered it but I had something related on my clipboard that is similar that can be worth sharing.
select c.Name, c.Domain, l.*
from Evt_AeX_Client_LogOn l
join
(
select _ResourceGuid, MAX(_id) as '_id'
from Evt_AeX_Client_LogOn l
group by _ResourceGuid
) t
on l._id = t._id
join vComputer c
on l._ResourceGuid = c.Guid
In testing, if you get a graceful shutdown event, you do usually get a logoff event sent which is nice, but there can be reasons for missing one event or the other and i'd urge any customer not interested in these types of events to switch them off as they go immediately to the SMP.