cloudnode-pro/BankAccounts

Top balance leaderboard

zefir-git opened this issue · 0 comments

Add /baltop [type] command

With an optional permission node that can be used to limit to own accounts only (this makes sense as one person can have many accounts).

type

  • not set — show top balance across all accounts
  • player — sum of all accounts per player
  • personal — top balances of personal accounts only
  • business — top balances of biz accounts only

The player option can be implemented with an SQL query like:

SELECT `owner`, SUM(`balance`) AS `balance` FROM bank_accounts GROUP BY `owner`;

(I don't remember the exact column & table names)