BlockTrackerswaps btc.b usdc on avalanche
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
›
⌄
SELECT
'USDC --> BTC.b' as direction,
pool_name,
platform,
date_trunc('day', block_timestamp) as date,
count(DISTINCT tx_hash) as num_swaps,
count(DISTINCT origin_from_address) as swappers,
sum(amount_in) as volume_of_swaps,
avg(amount_in)as avg_volume_of_swaps,
median(amount_in) as med_volume_of_swaps
FROM
avalanche.core.ez_dex_swaps
WHERE
token_in = '0xb97ef9ef8734c71904d8002f8b6bc66dd9c48a6e' --usdc
AND token_out = '0x152b9d0fdc40c096757f570a51e494bd4b943e50' --btc.b
AND date > dateadd('month', -12,current_date)
and date < current_date
GROUP BY 2 ,3, 4
UNION
SELECT
'BTC.b --> USDC' as direction,
pool_name,
platform,
date_trunc('day', block_timestamp) as date,
count(DISTINCT tx_hash) as num_swaps,
count(DISTINCT origin_from_address) as swappers,
sum(amount_out) as volume_of_swaps,
avg(amount_out)as avg_volume_of_swaps,
median(amount_out) as med_volume_of_swaps
FROM
avalanche.core.ez_dex_swaps
WHERE
token_out = '0xb97ef9ef8734c71904d8002f8b6bc66dd9c48a6e' --usdc
AND token_in = '0x152b9d0fdc40c096757f570a51e494bd4b943e50' --btc.b
AND date > dateadd('month', -12,current_date)
and date < current_date
Run a query to Download Data