Moetp -> correlation
    Updated 2024-04-05
    with ee as (
    select
    HOUR :: Date as days,
    avg(PRICE) as price_usd
    from
    ethereum.price.ez_hourly_token_prices
    where
    token_address ilike '0x576e2BeD8F7b46D34016198911Cdf9886f78bea7'
    and
    HOUR >= current_date - 90
    group by
    1
    order by
    1 desc
    ),
    trd as (
    with price as (
    select
    HOUR :: Date as day,
    avg(PRICE) as price,
    token_address
    from
    ethereum.price.ez_hourly_token_prices
    group by
    1,
    token_address
    ),
    mid as (
    select
    a.*,
    case
    when amount_in_usd is null then amount_in * b.price
    else amount_in_usd
    end as sell_usd,
    case
    when amount_out_usd is null then amount_out * c.price
    QueryRunArchived: QueryRun has been archived