How can I find the players with the most amount of a virtual currency? I want to do this from Playfab as a consultation.
How can I find the players with the most amount of a virtual currency? I want to do this from Playfab as a consultation.
PlayFab's player search support Kusto query now. If you only want to find the player with the most amount of a virtual currency, you can use following query in Players Page:
VirtualCurrencyBalances.xx > 0 | order by toint(VirtualCurrencyBalances.xx) | take 1
Please note "| take 1" is needed as the Players page currently will always order the result by last login time or total VTD. There is no way to get the displayed result ordered by the amount of virtual currency. If you do want to the result can be ordered by your setting, please feel free to post a feature request.
You can create a Statistic for this virtual currency and change the Statistic when the virtual currency changes. Since each Statistic has a corresponding Leaderboard, you can use API GetLeaderboard to get the player with the most virtual currency.
12 People are following this question.