- solution
可以使用窗口函数进行筛选出按照日期每个日期出现的次数,然后筛选出来两个数值相等的记录来,当然可以通过join的方式进行查询
select workid,recdate, rectime, time4 from (select *, count(1) over(PARTITION by recdate ) num from T0916 ) a
where a.num>=2 and a.rectime=a.time4
select workid,recdate, rectime, time4 from (select *, count(1) over(PARTITION by recdate ) num from T0916 ) a
where a.num>=2 and a.rectime=a.time4