Skip to content

Instantly share code, notes, and snippets.

@ornicar
Created March 11, 2015 21:59
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ornicar/2a402e46d05074f880d6 to your computer and use it in GitHub Desktop.
Save ornicar/2a402e46d05074f880d6 to your computer and use it in GitHub Desktop.
lichess-main-1(mongod-2.6.7)[PRIMARY] lichess> db.user4.aggregate({$match:{engine:{$ne:true},'count.rated':{$gte:30}}},{$group:{_id:true,bullet:{$avg:'$perfs.bullet.gl.r'},blitz:{$avg:'$perfs.blitz.gl.r'},classical:{$avg:'$perfs.classical.gl.r'}}})
{
"result": [
{
"_id": true,
"bullet": 1455.578271795132,
"blitz": 1492.0044836092948,
"classical": 1548.2483650420252
}
],
"ok": 1
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment