SELECT cnt(sin) as dupcnt, sin+dtos(add_date) + add_time as pkey ; FROM sheenatable ; ORDER BY 1 DESC ; GROUP by 2 ; INTO CURSOR cDuplicates