Kayıtlar

Şubat 17, 2017 tarihine ait yayınlar gösteriliyor

Mongodb Aggregation

db.products.aggregate([ {$group:{ _id:"$category", num_categories: {$sum:1} } } ]) $project reshape - n:1 $match filter - n:1 $group aggregate - n:1 $sort  sort - 1 : 1 $skip  skips - n:1 $limit limit - n:1 $unwind normalize the data tags :["red","blue"] tags : red tags : blue $out : output - 1:1 $redact compount groupby aggregate function db.products.aggregate([ {$group:{ _id:{"manufacturer": "$manufacturer",     "category": "$category" }, num_categories: {$sum:1} } } ]) seçili markaların ürün fiyatlarını toplama db.products.aggregate([ {$group:{ _id:{"maker": "$manufacturer"}, sum_prices: {$sum:"$price"} } } ]) json dosyalarını almak için mongoimport kullanıyoruz //state göre toplam nüfus db.zips.aggregate([{"$group":{"_id":"$state", "population":{$sum:"$pop"}}}])