I'm trying to develop myself about mongodb. and asking some question for two days.
yesterday, I've learned that "First column > Second Column". In mongodb I've made this like:
$hg = $coll_mac->aggregate(array(
array('$match'=>array('sezon_kodu'=>$sezon, 'tarih'=>array('$lt'=>$time))),
array('$project'=>
array(
'c'=>array('$cmp'=>array('$ft1','$ft2'))
)
),
array('$match'=>array('c'=>array('$gt'=>0))),
array( '$group' => array(
'_id' => '',
'total' => array('$sum' => '$c')
))
));
Now, how can I write this? "Select records that (First column + Second Column)>2"