select count(datetime) from attence w where exists
((select * from attence where to_char(w.datetime,'yyyy/mm/dd') = to_char(w.datetime,'yyyy/mm/dd'))
)and to_date((select gotime from attence),'HH24:MI:SS') > to_date((select gostandertime from standertime ),'HH24:MI:SS')
and to_date((select gotime from attence),'HH24:MI:SS') < to_date((select nulltime from standertime),'HH24:MI:SS') and usernumber=1;