Matching relative time in native query


#1

Hi, how do you achieve the following in Metabase with a native query? I.e. match against the last minute.

[
    { 
        "$match": {
            "timestamp" : {"$gt": { "$subtract" : [ISODate(), 60000]}}
	    }
	}
]

#2

And I guess I can add that while this works it doesn’t really help me for my use case.
[ { "$sort": { "_id" : -1 } }, { "$limit": 10 } ]