Hossein2023-02-05 09:10 PM
Updated 2023-02-05
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
›
⌄
with table1 as (
select replace (value,'EVENT_JSON:') as Description,
tx_hash
from near.core.fact_receipts,
table (flatten (input => logs))
where receiver_id = 'token.paras.near'
and status_value like '%Success%')
select case when description ilike '%roketodapp%' or description ilike '%roketo%' or description ilike 'roketo%' or description ilike '%roketo' then 'Interaction With Roketo DAPP'
when description ilike '%to staking.paras.near' then 'Stake'
when description ilike '%from staking.paras.near' then 'UnStake'
when description ilike '%mogmog.near%' then 'Interaction With MogMog'
when description ilike '%to v2.ref-finance.near%' then 'Deposit to Ref Finance'
when description ilike '%from v2.ref-finance.near%' then 'Withdraw From Ref Finance'
else 'Other Actions' end as action_type,
count (distinct tx_hash)
from table1
group by 1
order by 2 DESC
Run a query to Download Data