Last active
January 16, 2022 04:01
-
-
Save hemantachhami19/7445f187923ef0cc60e7c0de56219fe0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select distinct t1.* | |
from payments t1 | |
join payments t2 | |
on t2.created_at between (t1.created_at - interval '10 second') | |
and (t1.created_at + interval '10 second') | |
and t2.id != t1.id | |
order by id |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment