通常,您需要对同一张表进行自我联接,然后将“重复”条件放入联接条件中。
例如
SELECt *FROM Transactions t1 inner join Transactions t2 on t1.Terminal = t2.Terminal and t1.Amount = t2.Amount and DATEDIFF(minute,t2.TransactionDate,t1.TransactionDate) between 0 and 10 and t1.TransactionID > t2.TransactionID
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)