Anyone able to convert this Oracle SQL Query into something I can use in Access 2003? I've played with it a bit, but I have no clue how this would work in Access.
mintime, endtime)) as totalduration
from ( select t1.agent, t1.endtime, min(t3.starttime) as mintime
from #tmp t1
left join #tmp t2 on t2.agent = t1.agent and t2.starttime > t1.starttime and t2.starttime <= t1.endtime
left join #tmp t3 on t3.agent = t1.agent and t3.starttime < t1.starttime and t3.endtime >= t1.starttime
where t2.agent is null
group by t1.agent, t1.endtime
group by agent
Original Post Here
Thanks in advance.