hessPlatforms Overview
    Updated 2023-08-26
    with price as ( select date(hour) as date, token_address, symbol , price
    from base.core.fact_hourly_token_prices
    UNION
    select date(hour) as date, token_address, symbol , price
    from ethereum.core.fact_hourly_token_prices
    where symbol = 'WETH'
    and hour::date >= '2023-07-28'
    )
    ,
    price_plus as ( select date, symbol, avg(price) as avg_price
    from price
    group by 1,2
    UNION
    SELECT
    TO_TIMESTAMP(value[0]::string) as date,
    'Quack' as symbol
    , value[1] as avg_price
    from (
    SELECT livequery.live.udf_api(
    'https://api.coingecko.com/api/v3/coins/quack-token/market_chart?vs_currency=usd&days=90&interval=daily&precision=3') as resp
    )
    ,LATERAL FLATTEN (input => resp:data:prices)
    UNION
    SELECT
    TO_TIMESTAMP(value[0]::string) as date,
    'DACKIE' as symbol
    , value[1] as avg_price
    from (
    SELECT livequery.live.udf_api(
    'https://api.coingecko.com/api/v3/coins/dackieswap/market_chart?vs_currency=usd&days=90&interval=daily&precision=3') as resp
    )
    ,LATERAL FLATTEN (input => resp:data:prices)
    UNION
    SELECT
    TO_TIMESTAMP(value[0]::string) as date,
    'BSWAP' as symbol
    Run a query to Download Data