select lst.cid_from, lst.max(call_time) from calls lst group by lst.cid_from
select prv.cid_from, prv.max(call_time) from calls prv
inner join (select lst.cid_from, lst.max(call_time) mxtm from calls lst group by cid_from) tlst on tlst.cid_from = prv.cid_from
where prv.call_time < tlst.mxtm
group by prv.cid_from