Template
single collection
multiple collections
mgodatagen
update
indexe
explain
Stage
Database
bson
mgodatagen
[{x:34.56},{x:34.67},{x:34.12}]
Query
db.collection.aggregate([{$project:{x:{$cond:[{$gte:[{$subtract:["$x",{$floor:"$x"}]},0.5]},{$ceil:"$x"},{$floor:"$x"}]}}}])
Result