with pair_metrics as (
select
count(distinct p.pool) as total_pairs,
sum(p.tvl_usd) as total_liquidity_usd
from ton.defi.fact_dex_pools p
where exists (
select 1
from ton.defi.fact_dex_trades t
where t.pool_address = p.pool
and t.project = 'ston.fi'
)
)
select
total_pairs as "Total Trading Pairs",
round(total_liquidity_usd, 2) as "Total Liquidity (USD)"
from pair_metrics;