我需要有关我的 SQL 代码的帮助来识别重复序列的出现。比如说,我的表结构是这样的:
Name E_Date Maker Status
---- ------ ----- ------
John Apr-6 Apple Success
Peter Apr-6 Apple Success
John Apr-6 Apple Success
Peter Apr-7 Samsung Success
John Apr-6 Samsung Success
John Apr-6 Apple Failure
Peter Apr-6 Apple Success
John Apr-6 Apple Success
所以上面的记录有 4 列/维度,你可以看到 John Apr-6 Apple Success 出现了 3 次。我的 SQL 代码应该计算这个并分配 rec_cnt = 3 和 dup_cnt = 1
有人可以帮我弄这个吗?