with tx_ides as (select tx_hash,contract_address from ethereum.core.fact_event_logs
where contract_name='KashiPairMediumRiskV1')
select sum(tx_fee),to_date(block_timestamp::date) from ethereum.core.fact_transactions inner join tx_ides
on tx_ides.tx_hash=ethereum.core.fact_transactions.tx_hash
group by 2