with prices as (
select date_trunc(day,HOUR) ::date date ,
TOKEN_ADDRESS ,
SYMBOL,
avg(price) USD
from ethereum.price.ez_hourly_token_prices
where date_trunc(day,HOUR) ::date >= '2023-01-01'
group by 1,2,3
)
select
date_trunc(week,BLOCK_TIMESTAMP)::date weekly ,
count (DISTINCT TX_HASH) num_bridges ,
count (DISTINCT ORIGIN_FROM_ADDRESS) num_bridgers,
sum (num_bridges) over (order by weekly ) cum_bridges
from ethereum.defi.ez_bridge_activity
where BLOCK_TIMESTAMP >= '2023-01-01'
group by 1