tkvresearchforward-peach
    Updated 2025-05-22
    with tvl_tab as
    (select date,
    tvl_usd/2 as tvl
    from external.defillama.fact_chain_tvl
    where chain = 'Solana'),

    price_tab as
    (select date(HOUR) as datetime,
    avg(price) as avg_price
    from solana.price.ez_prices_hourly
    where is_native = 'TRUE'
    group by 1)

    select *
    from
    (select date,
    sol_tvl,
    (sol_tvl/468370000)*100 as ratio
    from
    (select date,
    tvl/avg_price as sol_tvl
    from tvl_tab a left join price_tab b
    on a.date = b.datetime))
    where date = current_date()-1


    Last run: about 1 month ago
    DATE
    SOL_TVL
    RATIO
    1
    2025-05-21 00:00:00.00058565141.602331312.504033478
    1
    59B
    2s