freemartianBedrock Daily Users
    Updated 2023-08-30
    with dates as (
    select
    timestampdiff('day', '2023-06-06 16:00:00.000', current_date) as X_days_after_bedrock,
    '2023-06-06 16:00:00.000' as Bedrock_live,
    current_date - (2*X_days_after_bedrock) as X_days_before_bedrock
    )

    SELECT
    COUNT(DISTINCT from_address) AS "Number of Daily users",
    -- SUM(tx_fee) AS "Total Fee",
    -- AVG(tx_fee) AS "Average Fee",
    -- MAX(tx_fee) AS "Maximum Fee Paid",
    -- MIN(tx_fee) AS "Minimum Fee Paid",
    (CASE
    WHEN block_timestamp < '2023-06-06 16:00:00.000' THEN 'Before Bedrock'
    when block_timestamp > '2023-06-06 16:00:00.000' then 'After Bedrock' END
    ) AS "Label",
    date_trunc('day', block_timestamp) as time

    FROM optimism.core.fact_transactions
    inner join dates d
    WHERE block_timestamp BETWEEN X_days_before_bedrock and current_date
    GROUP BY "Label", time
    ORDER BY "Label"




    with dates as (
    select
    timestampdiff('day', '2023-06-06 16:00:00.000', current_date) as X_days_after_bedrock,
    '2023-06-06 16:00:00.000' as Bedrock_live,
    current_date - (2*X_days_after_bedrock) as X_days_before_bedrock
    Run a query to Download Data