repo.or.cz
/
gitter.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Fix config formatting
[gitter.git]
/
scripts
/
useful-queries
/
top-rooms-by-users.mongo
blob
5c7b91d7e249acd95e56503a84811a7c9e20c38b
1
db.troupes.aggregate([
2
{ $unwind: '$users' },
3
{ $project: { uri: '$uri', userId: '$users.userId' } },
4
{ $group: { _id: '$uri', s: { $sum: 1 } } },
5
{ $sort: { s: -1 } },
6
{ $limit: 20 }])