rezarwz2024-04-26 01:25 PM
Updated 2024-04-27
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
›
⌄
with all_tornado_blast as (
SELECT
*
from
(
SELECT
CASE
when et.from_address = tx.from_address then 'Buy'
else 'Sell'
end as Type,
tx.tx_hash,
tk.SYMBOL as Token,
tk.AMOUNT as token_amount,
tx.BLOCK_TIMESTAMP,
tx.from_address as ua,
et.amount_usd as USD_AMOUNT,
et.AMOUNT as ETH_AMOUNT,
FROM
blast.core.fact_transactions tx
left JOIN blast.core.ez_native_transfers et on et.tx_hash = tx.tx_hash
and (
et.from_address = '0x02df485037c08c3743c182636987c1452cf2e7f9'
or et.to_address = '0x02df485037c08c3743c182636987c1452cf2e7f9'
)
and (
et.from_address = tx.from_Address
or et.to_address = tx.from_address
)
left JOIN blast.core.ez_token_transfers tk on tx.tx_hash = tk.tx_hash
and(
(
et.from_address = tx.from_Address
and tk.to_address = tx.from_Address
)
or(
et.to_address = tx.from_Address
QueryRunArchived: QueryRun has been archived