Load the transfer columns in the list too
This commit is contained in:
1 parent
70e0a37122
commit
9a342a9658
1 file changed
+6
-1
@@ -566,7 +566,12 @@ class SkuldHandler(BaseHTTPRequestHandler):
|
|||||||
values.append(query["type"][0])
|
values.append(query["type"][0])
|
||||||
sql = (
|
sql = (
|
||||||
"SELECT t.*, m.name AS market_name, d.name AS to_market_name,"
|
"SELECT t.*, m.name AS market_name, d.name AS to_market_name,"
|
||||||
" COALESCE(SUM(c.cost_ore), 0) AS cost_ore"
|
" COALESCE(SUM(c.cost_ore), 0) AS cost_ore,"
|
||||||
|
" COALESCE(SUM(c.sats), 0) AS consumed_sats,"
|
||||||
|
" COALESCE((SELECT SUM(l.cost_ore_original) FROM lots l"
|
||||||
|
" WHERE l.origin_tx_id = t.id), 0) AS lot_cost_ore,"
|
||||||
|
" COALESCE((SELECT SUM(l.sats_original) FROM lots l"
|
||||||
|
" WHERE l.origin_tx_id = t.id), 0) AS lot_sats"
|
||||||
" FROM transactions t LEFT JOIN markets m ON m.id = t.market_id"
|
" FROM transactions t LEFT JOIN markets m ON m.id = t.market_id"
|
||||||
" LEFT JOIN markets d ON d.id = t.to_market_id"
|
" LEFT JOIN markets d ON d.id = t.to_market_id"
|
||||||
" LEFT JOIN lot_consumptions c ON c.tx_id = t.id"
|
" LEFT JOIN lot_consumptions c ON c.tx_id = t.id"
|
||||||
|
|||||||
Reference in new issue
Block a user