Hey sistemastda,
the dataset would have to look roughly like this, to my understanding:
Select user, day, min(timestamp) as first_activity, max(timestamp) as last_activity
from
###(select coalesce(user,unauthuser,srcip) as user, itime as timestamp, $DAY_OF_MONTH as day
from $log where $filter group by user)###
group by user
order by day
select user, day, first timestamp/last timestamp from
-> select user (or unauthuser/srcip, whatever is present), timestamp, day of the month
-> group by user (all entries for one user are grouped together)
group by user (all entries for one user are grouped together)
order by day (within grouping for user, order by day)
The dataset probably will NOT function if used exactly as above; it would need some finetuning and modification to meet your exact purposes.