saber-jlswap vs transfer general stats
Updated 2022-12-06Copy Reference Fork
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
›
⌄
--methode credit to banbannard
with base as (
select tx_hash
from avalanche.core.fact_event_logs
where event_name = 'Swap'
and block_timestamp >= '2022-07-01'),
swap as (
select
count(distinct tx_hash) as tx_count,
count(distinct ORIGIN_FROM_ADDRESS) as uniqe_swapper,
sum(event_inputs:value/1e6) as Total_Volume,
avg(event_inputs:value/1e6) as Average_Volume
from avalanche.core.fact_event_logs
where contract_address = '0xb97ef9ef8734c71904d8002f8b6bc66dd9c48a6e'
and event_name = 'Transfer'
and tx_hash in (select tx_hash from base)
),
transfer as (
select
count(distinct tx_hash) as tx_count,
count(distinct ORIGIN_FROM_ADDRESS) as uniqe_swapper,
sum(event_inputs:value/1e6) as Total_Volume,
avg(event_inputs:value/1e6) as Average_Volume
from avalanche.core.fact_event_logs
where contract_address = '0xb97ef9ef8734c71904d8002f8b6bc66dd9c48a6e'
and event_name = 'Transfer'
and tx_hash not in (select tx_hash from base)
and block_timestamp >= '2022-07-01')
select *,'Swaps' as type
from swap
union
select * , 'Transfers' as type
from transfer
Run a query to Download Data