You have a query that is summarising data e.g. sum(i_stafftime) but you have not used a group by clause at the bottom to show what to sum by.
For example:
Select dagent.row_Date, dagent.split, sum(dagent.I_stafftime) as Logon
where dagent.split = 1 or dagent.split = 2
Group by dagent.row_date, dagent.split |