select date_trunc ({{Time_Interval}},mindate) as date,
count (distinct receiver) as New_Bridgors,
sum (New_Bridgors) over (order by date asc) as Cumulative_Bridgors
from (
select receiver,
min (block_timestamp) as mindate
from aptos.defi.fact_bridge_activity
where source_chain_name ilike 'avalanche'
group by 1 having mindate >= '{{Start_Date}}' and mindate <= '{{End_Date}}')
group by 1
order by 1 desc