有如下一张表G0615
希望按工号查找日期(RecDate)相同的记录数>1,且Rectime=Time4
预计结果如下:
测试数据
CREATE TABLE G0615(
workid VARCHAR(20),
RecDate DATE,
RecTime VARCHAR(20),
Time4 VARCHAR(20)
)
INSERT INTO G0615 VALUES ('161181','2021-05-03','13:01','13:01');
INSERT INTO G0615 VALUES ('161181','2021-05-03','14:01','15:01');
INSERT INTO G0615 VALUES ('161181','2021-05-06','13:01','13:01');
INSERT INTO G0615 VALUES ('161181','2021-05-07','13:01','13:01');
INSERT INTO G0615 VALUES ('161181','2021-05-08','13:01','13:01');
INSERT INTO G0615 VALUES ('161181','2021-05-09','13:01','13:01');
参考答案