kiacryptoETH Derivatives
    Updated 2022-09-27
    with aethc as (
    select
    date_trunc('day', hour) as date,
    case when date = '2022-09-15' then 'The merge' when date > '2022-09-15' then 'After the merge' else 'Before the merge' end as type,
    avg(price) as aethc_price
    from ethereum.core.fact_hourly_token_prices
    where date >= '2022-09-01' and date < current_date and token_address = '0xe95a203b1a91a908f9b9ce46459d101078c2c3cb'
    group by 1, 2
    ),
    reth as (
    select
    date_trunc('day', hour) as date,
    case when date = '2022-09-15' then 'The merge' when date > '2022-09-15' then 'After the merge' else 'Before the merge' end as type,
    avg(price) as reth_price
    from ethereum.core.fact_hourly_token_prices
    where date >= '2022-09-01' and date < current_date and token_address = '0xae78736cd615f374d3085123a210448e74fc6393'
    group by 1, 2
    ),
    steth as (
    select
    date_trunc('day', hour) as date,
    case when date = '2022-09-15' then 'The merge' when date > '2022-09-15' then 'After the merge' else 'Before the merge' end as type,
    avg(price) as steth_price
    from ethereum.core.fact_hourly_token_prices
    where date >= '2022-09-01' and date < current_date and token_address = '0xae7ab96520de3a18e5e111b5eaab095312d7fe84'
    group by 1, 2
    ),
    seth2 as (
    select
    date_trunc('day', hour) as date,
    case when date = '2022-09-15' then 'The merge' when date > '2022-09-15' then 'After the merge' else 'Before the merge' end as type,
    avg(price) as seth2_price
    from ethereum.core.fact_hourly_token_prices
    where date >= '2022-09-01' and date < current_date and token_address = '0xfe2e637202056d30016725477c5da089ab0a043a'
    group by 1, 2
    ),
    Run a query to Download Data