-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
Here is the query:
db.order_lineitem.aggregate( [ { $match: { $and: [ { "order.o_orderdate": { $gte: ISODate("1992-01-01") } }, { "order.o_orderdate": { $lte: ISODate("1996-01-01") } }, { l_discount: { $gte: 0.1 } }, { l_discount: { $lte: 0.3 } } ], l_quantity: { $lte: 25 } }, }, { $group: { _id: 1, revenue: { $sum: { $multiply: [ "$l_extendedprice", "$l_discount" ] } } } } ] )