with base as (
SELECT
*, concat('0x', substr(input_data, 291, 40)) as address_of_pool
from optimism.core.fact_transactions
where origin_function_signature ilike '0x7ac09bf7' and to_address ilike '0x09236cff45047dbee6b921e00704bed6d6b8cf7e')
select address_of_pool, count(distinct tx_hash) as count_transactions
from base
group by 1