--iff(charindex('-', pool_name) = 0, pool_name, LEFT(pool_name, CHARINDEX('-', pool_name) - 1))
select
iff(charindex('-', pool_name) = 0, pool_name, LEFT(pool_name, CHARINDEX('-', pool_name) - 1)) as pool,
sum(total_swap_fees_usd) as total_swap_fees
from thorchain.daily_pool_stats
where day >= '2022-3-25'
group by pool