Afonso_DiazGrouping Transactions(volume usd) copy
Updated 2024-05-29
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
pricet as (
select
hour::date as date,
avg(price) as price_usd
from ethereum.price.ez_hourly_token_prices
where symbol = 'WETH'
group by 1
),
t as (
select
tx_hash,
block_timestamp,
'Deposit' as action,
decoded_log:assets/1e18 as amount,
decoded_log:owner as user
from ethereum.core.ez_decoded_event_logs
where origin_function_signature = '0x2d2da806'
and origin_to_address = '0x48afbbd342f64ef8a9ab1c143719b63c2ad81710'
and tx_status = 'SUCCESS'
and event_name = 'Deposit'
union all
select
tx_hash,
block_timestamp,
'Withdraw' as action,
decoded_log:assets/1e18 as amount,
decoded_log:owner as user
from ethereum.core.ez_decoded_event_logs
where origin_function_signature = '0xba087652'
and origin_to_address = '0x48afbbd342f64ef8a9ab1c143719b63c2ad81710'
and tx_status = 'SUCCESS'
QueryRunArchived: QueryRun has been archived