There are lots of ways to generate a leaderboard and lots of filters you can use alongside the leaderboard. They are outlined below...
-leaderboard <stat> you can use any stat shown in profile commands
-leaderboard <stat> <team> you can view stats by team
-leaderboard <stat> <tag user> you can also look at the position of yourself or anyone in the leaderboard of your chosen stat
-leaderboard <stat> <filter>=<number/area> you can search using a filter such as level or hometown