select ff.serverlogin Сотрудник, ss.typename Документ, count(ss.typename) Количество from smstaff ff, smdoclog s, ssobjecttypes ss where s.eventtime>sysdate-1 and ss.objtype = s.doctype(+) and ff.serverlogin=s.username group by ss.typename, ff.serverlogin order by 3 desc
ss.objtype = s.doctype(+) and ff.serverlogin=s.username
s.eventtime>sysdate-1
select article, count(article) from smspec sp, smdoclog s where s.eventtime>sysdate-1 and s.id = sp.docid and sp.article = 'xxxxxx' group by article