Created
February 20, 2020 09:40
-
-
Save ishiDACo/9d87aebe341755011e228319a614900c to your computer and use it in GitHub Desktop.
distinct した要素数カウント
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
db.getCollection('scrape').aggregate([ | |
{"$group" : {_id:"$hostname", count:{$sum:1}}}, | |
{$sort: {count:-1}} | |
]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment