with
list1 as (
select
date_trunc('day', hour)::date as day,
token_address,
symbol,
decimals,
avg(price) as price
from optimism.core.fact_hourly_token_prices
where
hour >= current_date - interval '{{ days }} days'
group by day, symbol, decimals, token_address
),
list3 as (
select
'0x1318811b1c6aed9c48623adb1ee22f81c6c6f876' as address,
'DC Token' as symbol,
'0' as decimals
union
select
'0xe649951f6e18492fca574d6113bbf446269312ee' as address,
'US Token' as symbol,
'0' as decimals
union
select * from optimism.core.dim_contracts
),
list2 as (
select
a.*,
event_inputs:recipient as from_address,