Afonso_DiazGrouping txns
Updated 2025-02-28
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
›
⌄
with pricet as (
select
hour::date as date,
symbol,
avg(price) as price_usd
from near.price.ez_prices_hourly
group by 1, 2
union
select
hour::date as date,
'ETH',
avg(price) as price_usd
from ethereum.price.ez_prices_hourly
where token_address = '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2'
group by 1, 2
union
select
hour::date as date,
'WBTC',
avg(price) as price_usd
from ethereum.price.ez_prices_hourly
where token_address = '0x2260fac5e5542a773aa44fbcfedf7c193bc2c599'
group by 1, 2
),
t as (
select
tx_hash,
block_timestamp,
actions as action,
case
when a.symbol = 'USDC' then amount_raw / pow(10, 18)
when a.symbol = 'USDC.e' then amount_raw / pow(10, 18)
QueryRunArchived: QueryRun has been archived