Skip to content

Commit 7d5272e

Browse files
committed
fix: full join lateral issue
1 parent 1d839e9 commit 7d5272e

File tree

1 file changed

+3
-2
lines changed
  • packages/fasset-indexer-api/src/analytics/utils

1 file changed

+3
-2
lines changed

packages/fasset-indexer-api/src/analytics/utils/raw-sql.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,11 +148,12 @@ SELECT
148148
am.name as agent_name, eau.hex as user, eao.hex as source,
149149
t.value_uba, t.resolution, ur.id as underlying_payment, COUNT(*) OVER() as count
150150
FROM (${Array.from(explorerQueryTransactions.entries()).filter(([k, _]) => methods.includes(k)).map(([_, v]) => v).join(' UNION ALL ')}) t
151-
FULL JOIN evm_address eau ON eau.id = t.user_id
152-
FULL JOIN LATERAL (
151+
LEFT JOIN evm_address eau ON eau.id = t.user_id
152+
LEFT JOIN LATERAL (
153153
SELECT *
154154
FROM underlying_reference ur
155155
WHERE ur.reference = t.payment_reference
156+
ORDER BY ur.id ASC
156157
LIMIT 1
157158
) ur ON true
158159
JOIN evm_log el ON el.id = t.evm_log_id

0 commit comments

Comments
 (0)