davidwallUntitled Query
    Updated 2023-01-16
    --credit : https://app.flipsidecrypto.com/velocity/queries/d95845ad-6b13-4ba1-8eea-14cd38d14877
    with ethpricet as (
    select hour::date as day,
    case when day >= '2022-12-24' and day < '2023-01-04' then 'Holidays'
    else 'Other Days' end as timespan,
    avg (price) as USDPrice
    from ethereum.core.fact_hourly_token_prices
    where symbol = 'WETH'
    and hour::date >= '2022-12-17'
    group by 1,2),

    avaxpricet as (
    select hour::date as day,
    case when day >= '2022-12-24' and day < '2023-01-04' then 'Holidays'
    else 'Other Days' end as timespan,
    avg (price) as USDPrice
    from ethereum.core.fact_hourly_token_prices
    where symbol = 'WAVAX'
    and hour::date >= '2022-12-17'
    group by 1,2),

    bnbpricet as (
    select hour::date as day,
    case when day >= '2022-12-24' and day < '2023-01-04' then 'Holidays'
    else 'Other Days' end as timespan,
    avg (price) as USDPrice
    from ethereum.core.fact_hourly_token_prices
    where symbol = 'WBNB'
    and hour::date >= '2022-12-17'
    group by 1,2),

    oppricet as (
    select hour::date as day,
    case when day >= '2022-12-24' and day < '2023-01-04' then 'Holidays'
    else 'Other Days' end as timespan,
    avg (price) as USDPrice
    Run a query to Download Data