SocioCryptoTrading Volume
    Updated 2024-07-26
    -- forked from Trading Volume @ https://flipsidecrypto.xyz/edit/queries/06259e0d-f8cc-467d-b662-af0436bff410

    SELECT TO_TIMESTAMP(value[0]::string) as date,
    value[1] as trading_volume_usd
    FROM (
    SELECT livequery.live.udf_api(
    'https://api.coingecko.com/api/v3/coins/klay-token/market_chart?vs_currency=usd&days=120&interval=daily&precision=3') as response
    ),LATERAL FLATTEN (input => response:data:total_volumes)
    WHERE date < current_date
    ORDER BY date DESC


    QueryRunArchived: QueryRun has been archived