Eman-RazTotal stats by direction
Updated 2024-10-09
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
›
⌄
with axelar_services as (select created_at, lower(data:send:original_source_chain) as source_chain,
lower(data:send:original_destination_chain) as destination_chain,
sender_address as user, data:send:amount * data:link:price as amount, data:send:fee_value as fee, id, 'Token Transfers' as service
-- data:link:txhash as tx_hash
-- data:link:asset as asset
from axelar.axelscan.fact_transfers
where (data:send:original_source_chain='moonbeam' or data:send:original_destination_chain='moonbeam')
and created_at::date between '{{Start_Date}}' and '{{End_Date}}'
and status='executed'
and simplified_status='received'
union all
select created_at, to_varchar(lower(data:call:chain)) as source_chain, to_varchar(lower(data:call:returnValues:destinationChain)) as destination_chain,
to_varchar(data:call:transaction:from) as user, data:value as amount, (data:gas:gas_used_amount)*(data:gas_price_rate:source_token.token_price.usd) as fee,
to_varchar(id) as id,
'GMP' as service
from axelar.axelscan.fact_gmp
where (data:call:chain='moonbeam' or data:call:returnValues:destinationChain='moonbeam')
and status = 'executed'
and simplified_status = 'received'
and created_at::date between '{{Start_Date}}' and '{{End_Date}}')
select round(sum(amount),2) as "Amount (USD)",
count(distinct id) as "Transfers Count",
count(distinct user) as "Users Count", case
when source_chain='moonbeam' then 'Moonbeam➡⛓'
when destination_chain='moonbeam' then '⛓➡Moonbeam'
end as "Direction"
from axelar_services
group by 4
order by 1
Auto-refreshes every 24 hours
QueryRunArchived: QueryRun has been archived