/*過去90日使用済み？*/
select max(viseq) as viseq2,to_char(max(adat), 'yyyy/mm/dd') as adat,count(distinct viseq) as cnt
from aur32 a
where a.dcls='3' and a.tcls='21'
  and a.ktktcd=:ktktcd
  and a.sbat2<:ssbat2
  and a.vseq=:vseq and adat>=(to_date(:sdday,'yyyy/mm/dd')-60)
