raho2023-08-29 07:33 PM
    Updated 2023-08-30
    WITH monthly_tvl AS (
    SELECT
    DATE_TRUNC('month', date) as month,
    chain,
    chain_id,
    TVL_USD
    FROM external.defillama.fact_chain_tvl
    WHERE chain = 'Flow'
    )
    SELECT
    month,
    chain,
    AVG(TVL_USD) AS avg_monthly
    FROM monthly_TVL
    GROUP BY 1, 2
    ORDER BY month DESC
    Run a query to Download Data