I have a table where I want to get the list of users who latest transaction created_date subtracted by second latest created_date should be equal to or more than 180 days.
Here's how my table looks like:
Sample Data:
Basically, I want to get list of only those user_id whose difference between the latest created_at date and second latest created_date is greater than or equal to 180 days. So in the above example, the query should only give me user_id '1' in the output.

