MLDZMNhel5
Updated 2023-05-05
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 t1 as (select
recorded_hour::date as day,
token_address,
avg(close) as token_price
from solana.core.ez_token_prices_hourly prices
group by 1,2
)
select
block_timestamp::date as date,
case
when mint = 'hntyVP6YFm1Hg25TN9WGLqM12b8TQmcknKrdu1oxWux' then 'HNT'
when mint = 'iotEVVZLEywoTn1QdwNPddxPWszn3zFhEot3MfL9fns' then 'IOT'
when mint = 'mb1eu7TzEc71KxDpsmsKoucSSuuoGLv1drys1oP2jh6' then 'MOBILE'
when mint = 'dcuc8Amr83Wz27ZkQ2K9NS6r8zRpf1J6cvArEBDZDmm' then 'DC'
when mint = 'So11111111111111111111111111111111111111112' then 'SOL'
end as symbol,
sum(amount) as volume,
sum(amount*token_price) as volume_usd,
avg(amount*token_price) as avg_volume,
median(amount*token_price) as median_volume,
count(distinct tx_to) as no_wallets
from solana.core.fact_transfers s
inner join solana.core.fact_events e
using(block_timestamp, tx_id)
left join t1 a on s.mint=a.token_address
where succeeded
and e.program_id = '1atrmQs3eq1N2FEYWu6tyTXbCjP4uQwExpjtnhXtS8h' -- migration lazy transactions
and signers[0] = 'mgrArTL62g582wWV6iM4fwU1LKnbUikDN6akKJ76pzK'
and mint in (
'hntyVP6YFm1Hg25TN9WGLqM12b8TQmcknKrdu1oxWux', -- HNT
'iotEVVZLEywoTn1QdwNPddxPWszn3zFhEot3MfL9fns', -- IOT
'mb1eu7TzEc71KxDpsmsKoucSSuuoGLv1drys1oP2jh6', -- MOBILE
Run a query to Download Data