diff options
Diffstat (limited to 'res/sql/views')
-rw-r--r-- | res/sql/views/orcl_sales.sql | 2 | ||||
-rw-r--r-- | res/sql/views/pg_sales.sql | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/res/sql/views/orcl_sales.sql b/res/sql/views/orcl_sales.sql index 851d17e..b585819 100644 --- a/res/sql/views/orcl_sales.sql +++ b/res/sql/views/orcl_sales.sql | |||
@@ -2,11 +2,13 @@ CREATE OR REPLACE VIEW sales AS | |||
2 | 2 | ||
3 | SELECT | 3 | SELECT |
4 | items.uuid AS item_uuid, | 4 | items.uuid AS item_uuid, |
5 | items.item_name AS item_name, | ||
5 | items.user_uuid AS seller_uuid, | 6 | items.user_uuid AS seller_uuid, |
6 | items.start_date AS start_date, | 7 | items.start_date AS start_date, |
7 | items.end_date AS end_date, | 8 | items.end_date AS end_date, |
8 | best_bids.uuid AS best_bid_uuid, | 9 | best_bids.uuid AS best_bid_uuid, |
9 | best_bids.user_uuid AS best_bidder_uuid, | 10 | best_bids.user_uuid AS best_bidder_uuid, |
11 | items.initial_price AS initial_price, | ||
10 | best_bids.offer AS best_offer, | 12 | best_bids.offer AS best_offer, |
11 | COALESCE(charges.fee, 0) + COALESCE(charges.rate, 0) * best_bids.offer AS charges | 13 | COALESCE(charges.fee, 0) + COALESCE(charges.rate, 0) * best_bids.offer AS charges |
12 | 14 | ||
diff --git a/res/sql/views/pg_sales.sql b/res/sql/views/pg_sales.sql index f36d8e7..f1705f1 100644 --- a/res/sql/views/pg_sales.sql +++ b/res/sql/views/pg_sales.sql | |||
@@ -2,11 +2,13 @@ CREATE OR REPLACE VIEW sales AS | |||
2 | 2 | ||
3 | SELECT | 3 | SELECT |
4 | items.uuid AS item_uuid, | 4 | items.uuid AS item_uuid, |
5 | items.item_name AS item_name, | ||
5 | items.user_uuid AS seller_uuid, | 6 | items.user_uuid AS seller_uuid, |
6 | items.start_date AS start_date, | 7 | items.start_date AS start_date, |
7 | items.end_date AS end_date, | 8 | items.end_date AS end_date, |
8 | best_bids.uuid AS best_bid_uuid, | 9 | best_bids.uuid AS best_bid_uuid, |
9 | best_bids.user_uuid AS best_bidder_uuid, | 10 | best_bids.user_uuid AS best_bidder_uuid, |
11 | items.initial_price AS initial_price, | ||
10 | best_bids.offer AS best_offer, | 12 | best_bids.offer AS best_offer, |
11 | COALESCE(charges.fee, 0) + COALESCE(charges.rate, 0) * best_bids.offer AS charges | 13 | COALESCE(charges.fee, 0) + COALESCE(charges.rate, 0) * best_bids.offer AS charges |
12 | 14 | ||