aboutsummaryrefslogtreecommitdiff
path: root/res/sql/orcl_all.sql
diff options
context:
space:
mode:
authorPacien TRAN-GIRARD2015-02-07 23:57:36 +0100
committerPacien TRAN-GIRARD2015-02-07 23:57:36 +0100
commit3d22cb7d1ee6bdf7b484bbf001c76e81ae351dea (patch)
tree69470d595030a0f0abce97e779db99ff8e21425a /res/sql/orcl_all.sql
parentde24f5b788c1ae6307eb360877ea3ce61c8f7a6a (diff)
downloadminibay-3d22cb7d1ee6bdf7b484bbf001c76e81ae351dea.tar.gz
Update accounts view to include usernames
Diffstat (limited to 'res/sql/orcl_all.sql')
-rw-r--r--res/sql/orcl_all.sql2
1 files changed, 2 insertions, 0 deletions
diff --git a/res/sql/orcl_all.sql b/res/sql/orcl_all.sql
index b0367de..08015f4 100644
--- a/res/sql/orcl_all.sql
+++ b/res/sql/orcl_all.sql
@@ -222,6 +222,7 @@ CREATE OR REPLACE VIEW accounts AS
222 222
223 SELECT 223 SELECT
224 users.uuid AS user_uuid, 224 users.uuid AS user_uuid,
225 users.username AS username,
225 COALESCE(transactions.balance, 0) AS balance, 226 COALESCE(transactions.balance, 0) AS balance,
226 COALESCE(sales.open_bids, 0) AS open_bids, 227 COALESCE(sales.open_bids, 0) AS open_bids,
227 COALESCE(transactions.balance, 0) - COALESCE(sales.open_bids, 0) AS equity 228 COALESCE(transactions.balance, 0) - COALESCE(sales.open_bids, 0) AS equity
@@ -249,6 +250,7 @@ CREATE OR REPLACE VIEW accounts AS
249 GROUP BY best_bidder_uuid 250 GROUP BY best_bidder_uuid
250 ) sales 251 ) sales
251 ON sales.best_bidder_uuid = users.uuid; 252 ON sales.best_bidder_uuid = users.uuid;
253
252INSERT INTO USERS (UUID, USERNAME, EMAIL, USER_PASSWORD, CREATION_DATE, FIRST_NAME, LAST_NAME, COUNTRY_CODE, POSTAL_CODE, ADDRESS, PHONE, BIRTHDATE) 254INSERT INTO USERS (UUID, USERNAME, EMAIL, USER_PASSWORD, CREATION_DATE, FIRST_NAME, LAST_NAME, COUNTRY_CODE, POSTAL_CODE, ADDRESS, PHONE, BIRTHDATE)
253VALUES ('0C99BEF9-375F-3E4A-E050-D7936EBE2782', 'duf', 'duf@gmail.com', '123456', 255VALUES ('0C99BEF9-375F-3E4A-E050-D7936EBE2782', 'duf', 'duf@gmail.com', '123456',
254 TO_TIMESTAMP_TZ('2000-01-01 00:00:00.000000', 'YYYY-MM-DD Hh24:MI:SS.FF'), 'Francis', 'Dumas', 'FR', '86544', 256 TO_TIMESTAMP_TZ('2000-01-01 00:00:00.000000', 'YYYY-MM-DD Hh24:MI:SS.FF'), 'Francis', 'Dumas', 'FR', '86544',