-- forked from Sniper / Top 10 swappers by most number of swaps @ https://flipsidecrypto.xyz/Sniper/q/ifvz2Fq3dEf0/top-10-swappers-by-most-number-of-swaps
SELECT
sender,
concat(source_chain, '=>', destination_chain) AS bridge_path,
count(DISTINCT(tx_hash)) AS total_swaps,
sum(amount) AS total_volume_swapped,
avg(amount) as average_volume_swapped
FROM
axelar.defi.ez_bridge_squid
WHERE
block_timestamp :: date >= '{{Start_Date}}'
and block_timestamp :: date <= '{{End_Date}}'
GROUP BY
1,
2
ORDER BY
3 DESC
LIMIT
50