hypergladeHy - RWA - tvl
    Updated 2024-07-02
    -- forked from prateem / RWA - tvl @ https://flipsidecrypto.xyz/prateem/q/jV8K_Uv8_VGj/rwa---tvl

    with tab1 as (
    SELECT defillama.get('/protocol/maple', {}) as resp_maple,
    defillama.get('/protocol/goldfinch', {}) as resp_goldfinch,
    defillama.get('/protocol/centrifuge', {}) as resp_centrifuge,
    defillama.get('/protocol/truefi', {}) as resp_truefi,
    defillama.get('/protocol/clearpool', {}) as resp_clearpool,
    defillama.get('/protocol/ondo-finance', {}) as resp_ondo,
    defillama.get('/protocol/realio-network', {}) as resp_realio,
    defillama.get('/protocol/toucan-protocol', {}) as resp_toucan,
    defillama.get('/protocol/swarm-markets', {}) as resp_swarm,
    defillama.get('/protocol/polytrade', {}) as resp_polytrade,
    defillama.get('/protocol/defactor', {}) as resp_defactor,
    defillama.get('/protocol/strikex', {}) as resp_strikex,
    defillama.get('/protocol/mantra', {}) as resp_mantra,
    defillama.get('/protocol/inx', {}) as resp_inx,
    defillama.get('/protocol/curio', {}) as resp_curio,
    defillama.get('/protocol/propy', {}) as resp_propy,
    defillama.get('/protocol/regen', {}) as resp_regen,
    defillama.get('/protocol/klimadao', {}) as resp_klimadao,
    defillama.get('/protocol/labs-group', {}) as resp_labs,
    defillama.get('/protocol/credefi', {}) as resp_credefi,
    defillama.get('/protocol/elysia', {}) as resp_elysia
    )

    SELECT
    TO_TIMESTAMP(f.value:date::INT) AS date,
    'Ethereum' as chain,
    f.value:totalLiquidityUSD::FLOAT AS totalLiquidityUSD,
    'Maple Finance' as protocol
    FROM
    tab1,
    LATERAL FLATTEN(input => tab1.resp_maple['data']['chainTvls']['Ethereum']['tvl']) f

    UNION ALL
    QueryRunArchived: QueryRun has been archived