MasiDaily Numbers
Updated 2024-10-18
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 tb0_price as ( select trunc(hour,'day') as date,
case when token_address = lower('0x2b2c81e08f1af8835a78bb2a90ae924ace0ea4be') then 'sAVAX'
when token_address = lower('0x152b9d0FdC40C096757F570A51E494bd4b943E50') then 'BTC.b'
when token_address = lower('0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E') then 'aUSD'
when token_address = lower('0x420FcA0121DC28039145009570975747295f2329') then 'COQ' end as symbol,
avg(price) as avg_price
from avalanche.price.ez_prices_hourly
where date = current_date
and token_address in (lower('0x2b2c81e08f1af8835a78bb2a90ae924ace0ea4be'),
lower('0x152b9d0FdC40C096757F570A51E494bd4b943E50'),
lower('0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E'),
lower('0x420FcA0121DC28039145009570975747295f2329'))
group by 1,2
UNION
select trunc(hour,'day') as date,
case when token_address = lower('0x152b9d0FdC40C096757F570A51E494bd4b943E50') then 'SolvBTC' end as symbol,
avg(price) as avg_price
from avalanche.price.ez_prices_hourly
where date = current_date
and token_address = lower('0x152b9d0FdC40C096757F570A51E494bd4b943E50')
group by 1,2 )
,
savax_deposit as (select trunc(block_timestamp,'day') as day,
'sAVAX' as symbol,
count(DISTINCT tx_hash) as deposit_tx,
count(DISTINCT origin_from_address) as depositor,
sum(amount) as deposit_amount,
SUM(COALESCE(deposit_amount, 0)) OVER (ORDER BY day) as cum_deposit,
max('25000') as max_cap
from avalanche.core.ez_token_transfers
where origin_to_address = lower('0xE3C983013B8c5830D866F550a28fD7Ed4393d5B7')
and to_address = lower('0xE3C983013B8c5830D866F550a28fD7Ed4393d5B7')
and origin_from_address = from_address
and block_timestamp::Date >= '2024-10-01'
group by 1,2)
,
QueryRunArchived: QueryRun has been archived