hessCurrent TVL
    Updated 2023-08-11
    with avax_price as ( select hour::date as date,
    avg(price) as avg_price
    from avalanche.core.fact_hourly_token_prices
    where hour::date >= '2022-01-01'
    group by 1)
    ,
    tvl as ( select date, tvl_usd
    from external.defillama.fact_chain_tvl
    where chain = 'Avalanche'
    and date >= '2022-01-01')

    select a.date, tvl_usd, tvl_usd/avg_price as tvl_avax
    from tvl a join avax_price b on a.date = b.date
    order by 1 desc
    limit 1


    Run a query to Download Data