cypherThorchain pool ranks
    Updated 2022-04-11
    select
    date_trunc('day', block_timestamp) as date,
    iff(charindex('-', pool_name) = 0, pool_name, LEFT(pool_name, CHARINDEX('-', pool_name) - 1)) as pool,
    avg(rune_amount_usd + asset_amount_usd) as tvl

    from thorchain.pool_block_balances
    where date >= '2022-1-1'
    and pool in ('BTC.BTC','ETH.ETH','BNB.BUSD','TERRA.LUNA', 'TERRA.UST','BNB.BNB', 'ETH.THOR', 'BNB.BTCB', 'ETH.USDC', 'BNB.ETH')
    group by pool, date
    Run a query to Download Data