Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update account_balances to only take active accounts into account #36

Open
dmitryrck opened this issue Apr 21, 2021 · 0 comments
Open

Comments

@dmitryrck
Copy link
Owner

As for today the account_balances view sums the balance of all account.

Change that to only include active accounts:

      create or replace view account_balances as
        select currency, sum(balance) as value, cast(avg(precision) as integer) as precision
        from accounts
        where accounts.active = true
        group by currency;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant