boomer77tvl thorversary
    Updated 2022-04-24
    with tvl_first as (
    select sum((asset_liquidity * asset_price_usd) + (rune_liquidity * rune_price_usd)) as tvl, day, pool_name,
    'First 30 Days' as type

    from thorchain.daily_pool_stats
    where day between '2021-04-11' and '2021-05-11'
    group by 2,3
    order by day asc
    ),

    tvl_last as (
    select sum((asset_liquidity * asset_price_usd) + (rune_liquidity * rune_price_usd)) as tvl, day , pool_name,
    'Last 30 Days' as type

    from thorchain.daily_pool_stats
    where day >= CURRENT_DATE - 30
    group by 2,3
    order by day desc
    )

    select * from tvl_first
    union
    select * from tvl_last
    Run a query to Download Data