select samples.datetest,SYS(11,datetest)as sss where not empty(datetest) from samples into cursor testy nofilterselect distinct datetest from testy where sss in (select avg(sss) from testy)