rezarwzmain copy
Updated 2024-09-01
999
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
›
⌄
-- forked from main @ https://flipsidecrypto.xyz/edit/queries/54738a17-2015-4429-88d9-8c7684b30388
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,
sum(et.amount_usd) as USD_AMOUNT,
sum(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(
QueryRunArchived: QueryRun has been archived