davidwallUntitled Query
    Updated 2023-01-14
    --credit : https://app.flipsidecrypto.com/velocity/queries/9f1416c2-0b4e-4ee6-8877-ee4dff36b874
    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