diff options
Diffstat (limited to 'res/sql/views')
-rw-r--r-- | res/sql/views/orcl_accounts.sql | 1 | ||||
-rw-r--r-- | res/sql/views/pg_accounts.sql | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/res/sql/views/orcl_accounts.sql b/res/sql/views/orcl_accounts.sql index 400d38f..f3f5d6e 100644 --- a/res/sql/views/orcl_accounts.sql +++ b/res/sql/views/orcl_accounts.sql | |||
@@ -2,6 +2,7 @@ CREATE OR REPLACE VIEW accounts AS | |||
2 | 2 | ||
3 | SELECT | 3 | SELECT |
4 | users.uuid AS user_uuid, | 4 | users.uuid AS user_uuid, |
5 | users.username AS username, | ||
5 | COALESCE(transactions.balance, 0) AS balance, | 6 | COALESCE(transactions.balance, 0) AS balance, |
6 | COALESCE(sales.open_bids, 0) AS open_bids, | 7 | COALESCE(sales.open_bids, 0) AS open_bids, |
7 | COALESCE(transactions.balance, 0) - COALESCE(sales.open_bids, 0) AS equity | 8 | COALESCE(transactions.balance, 0) - COALESCE(sales.open_bids, 0) AS equity |
diff --git a/res/sql/views/pg_accounts.sql b/res/sql/views/pg_accounts.sql index 400d38f..f3f5d6e 100644 --- a/res/sql/views/pg_accounts.sql +++ b/res/sql/views/pg_accounts.sql | |||
@@ -2,6 +2,7 @@ CREATE OR REPLACE VIEW accounts AS | |||
2 | 2 | ||
3 | SELECT | 3 | SELECT |
4 | users.uuid AS user_uuid, | 4 | users.uuid AS user_uuid, |
5 | users.username AS username, | ||
5 | COALESCE(transactions.balance, 0) AS balance, | 6 | COALESCE(transactions.balance, 0) AS balance, |
6 | COALESCE(sales.open_bids, 0) AS open_bids, | 7 | COALESCE(sales.open_bids, 0) AS open_bids, |
7 | COALESCE(transactions.balance, 0) - COALESCE(sales.open_bids, 0) AS equity | 8 | COALESCE(transactions.balance, 0) - COALESCE(sales.open_bids, 0) AS equity |