Ali3NDistribution of Swappers By Their AVAX Balance and Number of Swaps on Pangolin (Avalanche Pharaoh)
Updated 2025-03-24
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
›
⌄
-- forked from Distribution of Swappers By Their AVAX Balance and Number of Swaps on Pangolin (Avalanche Pangolin) @ https://flipsidecrypto.xyz/studio/queries/650a3c78-4d2b-4e40-8a5f-554f3c93d8c4
with timetable as (
select case when '{{TimeFrame}}' = 'Last 7 Days' then 7
when '{{TimeFrame}}' = 'Last 30 Days' then 30
when '{{TimeFrame}}' = 'Last 60 Days' then 60
when '{{TimeFrame}}' = 'Last 90 Days' then 90
when '{{TimeFrame}}' = 'Last 180 Days' then 180
when '{{TimeFrame}}' = 'Last 365 Days' then 365
when '{{TimeFrame}}' = 'All Time' then 5000
else 5000 end as timeframe),
maintable as (
select origin_from_address,
count (distinct tx_hash) as Swaps_Count
from avalanche.defi.ez_dex_swaps t1
join timetable
where platform ilike '%pharaoh%'
and block_timestamp >= CURRENT_DATE - timeframe
group by 1),
receivetable as (
select to_address as receiver,
sum (amount) as Received_Volume
from avalanche.core.ez_native_transfers
where to_address in (select distinct origin_from_address from maintable)
group by 1),
sendtable as (
select from_address as sender,
sum (amount) as sent_volume
from avalanche.core.ez_native_transfers
where from_address in (select distinct origin_from_address from maintable)
group by 1),
balancetable as (
Auto-refreshes every 12 hours
QueryRunArchived: QueryRun has been archived