select
date_trunc('day', block_timestamp) as date,
count(tx_hash) as swaps_count,
sum(swaps_count) over (order by date) as cumulative_swaps_count,
count(distinct origin_from_address) as unique_swapper,
sum(unique_swapper) over (order by date) as cumulative_unique_swapper,
sum(amount_in_usd) as swaps_volume,
sum(swaps_volume) over (order by date) as cumulative_swaps_volume,
(unique_swapper/swaps_count)*100 as ratio
from optimism.velodrome.ez_swaps
where date < current_date
group by 1