rezarwzL2 Defi TVL
    Updated 2025-02-24
    with l2_tvl as (
    SELECT
    TO_TIMESTAMP(VALUE:date) as date,
    value:tvl as tvl_usd,
    'Blast' as blockchain
    from
    (
    SELECT
    livequery.live.udf_api(
    'https://api.llama.fi/v2/historicalChainTvl/Blast'
    ) :data as resp
    ),
    LATERAL FLATTEN (input => resp)
    union
    all
    SELECT
    TO_TIMESTAMP(VALUE:date) as date,
    value:tvl as tvl_usd,
    'Base' as blockchain
    from
    (
    SELECT
    livequery.live.udf_api(
    'https://api.llama.fi/v2/historicalChainTvl/Base'
    ) :data as resp
    ),
    LATERAL FLATTEN (input => resp)
    union
    all
    SELECT
    TO_TIMESTAMP(VALUE:date) as date,
    value:tvl as tvl_usd,
    'Arbitrum' as blockchain
    from
    (
    SELECT
    QueryRunArchived: QueryRun has been archived