Привет. В скобках. Работает: time + (time - time).
Не работает: time + time - time. Спасибо. Я не буду спрашивать почему, просто запомню. :-) И что там за -+ в первом запросе ??? В оригинале так Select FF.text, FF.id_xf_user, FF.idcashjornal, FF.iddate, MaxTime,MinTime, cast('0:00' as time)+(MaxTime-MinTime) from ( select b.text, A.id_xf_user, A.idcashjornal, A.iddate, cast(Min(cast(a.lastcreate as time)) as time) as MinTime, cast(Max(cast(a.lastcreate as time)) as time) as MaxTime from xf_invoice A inner join xf_users b on b.idkey=A.id_xf_user group by 1,2,3,4 ) ff -- Дмитрий