Sbhn_NPbtc price 1
    Updated 2023-01-19
    with pre_eth_price_tbl as (
    select avg(price) as pre_eth_price
    from ethereum.core.fact_hourly_token_prices
    where SYMBOL = 'WBTC'
    and date_trunc('day', hour) = '2023-01-01'
    ),
    now_eth_price_tbl as (
    select avg(price) as now_eth_price
    from ethereum.core.fact_hourly_token_prices
    where SYMBOL = 'WBTC'
    and date_trunc('day', hour) = '2023-01-16'
    )

    SELECT *,
    ((pre_eth_price - now_eth_price)/pre_eth_price)*100 * -1 as "Delta Percent Eth Price"

    from pre_eth_price_tbl join now_eth_price_tbl
    Run a query to Download Data