WITH SWAPS AS (
select swapper as wallet,
count(distinct swap_from_asset_id) as number_of_assets
from algorand.swaps
where block_timestamp >= '2022-01-01'
and swap_from_amount >= 0
group by wallet--, type
order by number_of_assets desc
)
select count(distinct wallet) as total_wallets,
sum(number_of_assets) as total_assets_swapped,
avg(number_of_assets),
max(number_of_assets),
median(number_of_assets),
min(number_of_assets)
from SWAPS