fdgfdgfdfgbf2023-07-19 09:26 PM copy
    -- forked from Mrfti / 2023-07-19 09:26 PM @ https://flipsidecrypto.xyz/Mrfti/q/KdQfY4fcsSTR/2023-07-19-09-26-pm
    with
    tbl1 AS (
    SELECT
    date_trunc(day, block_timestamp) as date1,
    max(block_reward) as "Block Reward"
    from
    bitcoin.core.ez_miner_rewards
    GROUP by
    1
    order by
    1
    ),
    tbl2 AS (
    SELECT
    hour as date2,
    avg(price) as "Price"
    from
    ethereum.core.fact_hourly_token_prices
    where
    symbol = 'WBTC'
    GROUP by
    1
    )
    SELECT
    date1,
    "Block Reward",
    "Price"
    from
    tbl1
    full join tbl2 on date1 = date2
    where
    date1 between '2020-05-05 00:00:00.000' and 'curn'
    order by
    1 asc
    Run a query to Download Data