Query editor
1select SUM(2 CASE 3 WHEN '{{currency}}' = 'USD' THEN collateralBalanceUsd4 WHEN '{{currency}}' = 'ETH' THEN collateralBalanceEth5 END6) as total_tvl 7from "query_4056904" group by timestamp order by timestamp desc limit 1
select SUM(
CASE
WHEN '{{currency}}' = 'USD' THEN collateralBalanceUsd
WHEN '{{currency}}' = 'ETH' THEN collateralBalanceEth
END
) as total_tvl
from "query_4056904" group by timestamp order by timestamp desc limit 1