i've to run a query like this (sql) in MongoDb 4:
SELECT * FROM log WHERE DATE_ADD(created_at, INTERVAL 2 HOUR) < NOW()
Basically, I want to find all the documents, in the PENDING state, whose creation date PLUS TWO HOURS is less than now .. Let me explain: I want to find all the documents in the PENDING state that have been in PENDING for more than two hours. I feel stupid, but I am failing to do this with MongoDb. I also created a playground:
https://mongoplayground.net/p/4bifqiX2KMJ
Can you help me?