Updated 2023-08-30
    WITH transactions AS (
    SELECT
    date_trunc('week', block_timestamp) AS date,
    COUNT(DISTINCT tx_hash) AS tx_count,
    COUNT(DISTINCT tx_hash) / (24 * 60 * 60) AS tx_per_second
    FROM bitcoin.core.fact_transactions
    GROUP BY 1
    ),

    prices AS (
    SELECT
    date_trunc('day', HOUR) AS date,
    AVG(price) AS price
    FROM ethereum.core.fact_hourly_token_prices
    WHERE symbol = 'WBTC'
    GROUP BY 1
    )

    SELECT
    t.date,
    t.tx_count,
    t.tx_per_second,
    p.price
    FROM transactions t
    JOIN prices p ON t.date = p.date
    ORDER BY 1
    Run a query to Download Data