yasmin-n-d-r-h2023-11-01 09:15 PM
    Updated 2023-11-01
    SELECT

    DATE_TRUNC('DAY', date) AS DAY,
    chain,
    AVG(tvl_usd) AS tvl
    FROM
    external.defillama.fact_chain_tvl
    where
    chain ilike any ('%near%', '%optimism%', '%base%', '%arbitrum%')
    and chain <> 'Arbitrum Nova'
    and date > current_date - 60
    GROUP BY
    1,
    2
    ;
    Run a query to Download Data