-
Type: Bug
-
Resolution: Works as Designed
-
Priority: Major - P3
-
None
-
Affects Version/s: 4.4.0-rc14
-
Component/s: None
-
Query
-
ALL
-
Given query in mongodb shell:
db.collection.find({ userId: 'userId', startDate: { $gt: ISODate("2020-07-01") } }, { time: { $divide: [{ $subtract: ['$endDate', '$startDate'] }, 3600000] } }).sort({ time: -1 })
sort does not affect result, always get the same no matter use
sort({ time: 1})
or
sort({ time -1 })