ArioUser Behavior (redux) - 1
    Updated 2022-10-26
    with ETH_Data as (
    SELECT
    date_trunc('day', block_timestamp) as date,
    count(distinct tx_hash) as "ETH - # TXs",
    sum("ETH - # TXs") over (order by date) as "ETH - Total # TXs",
    count(distinct FROM_ADDRESS) as "ETH - # Users",
    sum("ETH - # Users") over(order by date) as "ETH - Total # Users",
    sum(tx_fee) as "ETH - Fee Volume ($ETH)",
    avg(tx_fee) as "ETH - AVG Tx Fee",
    sum("ETH - Fee Volume ($ETH)") over(order by date) as "ETH - Cumulative Fee Volume"
    from ethereum.core.fact_transactions
    where 1=1
    and STATUS = 'SUCCESS'
    and TX_FEE is not null
    and block_timestamp >= CURRENT_DATE - 30
    group by 1
    ),
    OP_Data as (
    SELECT
    date_trunc('day', block_timestamp) as date,
    count(distinct tx_hash) as "OP - # TXs",
    sum("OP - # TXs") over (order by date) as "OP - Total # TXs",
    count(distinct FROM_ADDRESS) as "OP - # Users",
    sum("OP - # Users") over(order by date) as "OP - Total # Users",
    sum(tx_fee) as "OP - Fee Volume ($ETH)",
    avg(tx_fee) as "OP - AVG Tx Fee",
    sum("OP - Fee Volume ($ETH)") over(order by date) as "OP - Cumulative Fee Volume"
    from optimism.core.fact_transactions
    where 1=1
    and STATUS = 'SUCCESS'
    and TX_FEE is not null
    and block_timestamp >= CURRENT_DATE - 30
    group by 1
    )

    select *,
    Run a query to Download Data