I am attempting to create a data entity with the SysUserLog table to export the latest login date for a user (createdDateTime field). I am unsure how to perform the MAX date with a data entity to represent the following SQL query:
select UserId, Max(createdDateTime) AS 'LastLogin'
from SYSUSERLOG
group by UserId
Here is how I made the structure of the entity:
Is there a range I can apply for the MAX(createdDateTime) or should I go via a SysComputedColumn?
Thanks