WITH lps as (
SELECT
date_trunc('day',block_timestamp) as date,tx_hash,
origin_FROM_ADDRESS as users
FROM ethereum.core.fact_event_logs e
WHERE origin_to_address = '0xd9e1ce17f2641f24ae83637ab66a2cca9c378b9f'
and event_name = 'Transfer'
and event_inputs:from::string = '0x0000000000000000000000000000000000000000'
and origin_function_signature in ('0xe8e33700','0xf305d719')),
lp_positions as (
SELECT
users,
count(distinct tx_hash) as n_lp_positions
FROM lps
GROUP BY 1
)
select avg(n_lp_positions) from lp_positions