select case when projects ilike '%aave%' then 'AAVE'
when projects ilike '%joe%' then 'Trader Joe'
when projects ilike '%gmx%' then 'GMX'
else initcap (projects) end as "Project Name",
symbol as "Pool",
initcap(il_risk) as "Impermanent Loss Risk",
median (apy) as "APY",
avg (tvl_usd) as "TVL [$]",
median (volume_usd_1d) as "24H Volume",
median (volume_usd_7d) as "7D Volume",
avg (mu) as "MU (µ)",
avg (sigma) as "SIGMA (σ)"
from external.defillama.fact_pool_yields
where chain ilike 'Avalanche'
and date >= current_date - 1
and "Project Name" ilike '%{{Project_Name}}%'
group by 1,2,3
order by "TVL [$]" desc