rezarwzStake chart based on volume and number of transactions
Updated 2023-09-15
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 base as (
SELECT
fa.tx_id,
date_trunc('month', fa.block_timestamp) as month,
CASE
when tx_to = 'BEYJqFx5G6whGmpJ4Ar9yyKfnDVBTcGWDSnJPPmsPWh6' then 'Stake'
when TX_FROM = 'BEYJqFx5G6whGmpJ4Ar9yyKfnDVBTcGWDSnJPPmsPWh6' then 'UnStake'
END as action,
case
when tx_to = 'BEYJqFx5G6whGmpJ4Ar9yyKfnDVBTcGWDSnJPPmsPWh6' then TX_FROM
when TX_FROM = 'BEYJqFx5G6whGmpJ4Ar9yyKfnDVBTcGWDSnJPPmsPWh6' then tx_to
end as user_address,
CASE
when fa.mint = 'HxhWkVpk5NS4Ltg5nij2G671CKXFRKPK8vy271Ub4uEK' Then 'HXRO'
when fa.mint = 'CPwspzHc4bKtBQGNRhpRG9v3qRiPLWP28GrfZepwmBSz' Then 'esHXRO'
when fa.mint = '36VFoo1rQ7a1w45jBwHmr2sodnUUhRtL7K6fsx2tuMwb' Then 'L-HXRO'
end as token_name,
amount
FROM
solana.core.fact_transfers fa
inner join solana.core.fact_events ev on ev.tx_id = fa.tx_id
and ev.block_timestamp = fa.block_timestamp
and ev.block_id = fa.block_id
and ev.index = round(fa.index)
WHERE
fa.MINT in(
'CPwspzHc4bKtBQGNRhpRG9v3qRiPLWP28GrfZepwmBSz',
'36VFoo1rQ7a1w45jBwHmr2sodnUUhRtL7K6fsx2tuMwb',
'HxhWkVpk5NS4Ltg5nij2G671CKXFRKPK8vy271Ub4uEK'
)
and ev.PROGRAM_ID = '2jmux3fWV5zHirkEZCoSMEgTgdYZqkE9Qx2oQnxoHRgA'
and amount!=0)
SELECT
month,
action,
token_name,
Run a query to Download Data