The listreceivedbyaccount RPC lists the total number of bitcoins received by each account.
listreceivedbyaccount (Deprecated, will be removed in V0.18. To use this command, start bitcoind with -deprecatedrpc=accounts)
*bitcoin-cli help listreceivedbyaccount
listreceivedbyaccount (Deprecated, will be removed in V0.18. To use this command, start bitcoind with -deprecatedrpc=accounts)