Query editor
WITH _ AS (SELECT ''), evaa_daily_ as (selectblock_date,sum(tvl_usd) as tvl_usdfromquery_4979350group by1), evaa_monthly_ as (select'EVAA' as project,date_trunc('month', block_date) as block_date,max_by(tvl_usd, block_date) as tvl_usdfromevaa_daily_group by2), affluent_daily_ as (selectblock_date,accum_supply_usd_tot - accum_borrow_usd_tot as tvl_usdfromquery_5301092whereaccum_supply_usd_tot - accum_borrow_usd_tot > 100), affluent_monthly_ as (select'Affluent' as project,date_trunc('month', block_date) as block_date,max_by(tvl_usd, block_date) as tvl_usdfromaffluent_daily_group by2)SELECT *FROM (select * from evaa_monthly_union allselect * from affluent_monthly_) _WHERE block_date >= DATE_TRUNC('month', CURRENT_DATE - INTERVAL '367' DAY)