Abbas_ra21Thruster Volume per Trader
Updated 2024-05-05Copy Reference Fork
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 tb AS (
SELECT
BLOCK_TIMESTAMP,
TX_HASH,
ORIGIN_FROM_ADDRESS AS Trader,
CONTRACT_ADDRESS AS Token_address,
ethereum.public.udf_hex_to_int(data)::int/1e18 AS Amount,
Amount * price AS Amount_USD
FROM
blast.core.fact_event_logs A
INNER JOIN base.price.ez_hourly_token_prices B ON B.TOKEN_ADDRESS = '0x4200000000000000000000000000000000000006'
AND date_trunc('hour', BLOCK_TIMESTAMP) = B.HOUR
WHERE
ORIGIN_TO_ADDRESS IN (
'0x44889b52b71e60de6ed7de82e2939fcc52fb2b4e',
'0x98994a9a7a2570367554589189dc9772241650f6',
'0x337827814155ecbf24d20231fca4444f530c0555',
LOWER('0xD6F9A29a11326c1C59297b576D30B6169FdB9300')
)
AND topics[0] = '0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef'
AND CONTRACT_ADDRESS = '0x4300000000000000000000000000000000000004'
AND ORIGIN_FUNCTION_SIGNATURE IN (
'0x7ff36ab5',
'0x18cbafe5',
'0xfb3bdb41',
'0x791ac947',
'0xb6f9de95',
'0x38ed1739',
'0xac9650d8',
'0x49bd339b',
'0x8f1fda56'
)
AND TX_STATUS = 'SUCCESS'
),
volume_per_trader AS (
SELECT
QueryRunArchived: QueryRun has been archived