with tab1 as (select contract_address, count(distinct tx_hash) as txns_count
from aurora.core.fact_logs
where tx_status='SUCCESS'
and block_timestamp::date>='{{Start_Date}}' and block_timestamp::date<='{{End_Date}}'
group by 1)
select avg(txns_count) as avg, median(txns_count) as median
from tab1