h4wkNetwork Fee Comparison - Since 15th Aug 2023 daily
    Updated 2024-03-21
    -- forked from Network Fee Comparison - Since 15th Aug 2023 2 @ https://flipsidecrypto.xyz/edit/queries/58f04faf-4571-4ca1-a31d-566d0f06da4a

    -- forked from Network Fee Comparison - Since 15th Aug 2023 @ https://flipsidecrypto.xyz/edit/queries/c1b79489-6e2d-474e-b043-4347ad488e7a

    with base_price_sei as (
    SELECT
    livequery.live.udf_api(
    'https://api.coingecko.com/api/v3/coins/sei-network/market_chart?vs_currency=usd&days=90&interval=daily&precision=3'
    ) as resp
    )
    , price_sei as (
    SELECT
    TO_TIMESTAMP(value [0]::string) as date,
    'SEI' as symbol,
    value[1] as price
    from base_price_sei, LATERAL FLATTEN (input => resp:data:prices)
    where date >= '2023-08-15'
    )
    , price_poly as (
    select
    hour::date as date,
    avg(price) as price
    from polygon.price.ez_hourly_token_prices
    where symbol = 'MATIC' and date >= '2023-08-15'
    group by 1
    )
    , price_eth as (
    select
    hour::date as date,
    avg(price) as price
    from ethereum.price.ez_hourly_token_prices
    where symbol = 'WETH' and date >= '2023-08-15'
    group by 1
    )
    , price_ava as (
    select
    QueryRunArchived: QueryRun has been archived