zakkisyedEthereum - Daily Stats
    Updated 2022-12-13
    WITH
    daily_stats AS (
    SELECT
    date_trunc(day,block_timestamp) as utc_date
    , (CASE WHEN utc_date >= '2022-09-15' then 'Post-Merge' ELSE 'Pre-Merge' END) AS time_period
    , count(*) AS transactions
    , count(distinct from_address) AS unique_addresses
    , count(*) / 24 / 60 / 60 AS tps
    , avg(CASE WHEN status = 'SUCCESS' THEN 100.0000 ELSE 0.0000 END) AS success_rate
    FROM ethereum.core.fact_transactions
    WHERE utc_date >= '2021-08-05'
    and block_timestamp < current_date -- limiting data due to incomplete tables
    GROUP BY 1,2
    )
    SELECT *
    FROM daily_stats
    ORDER BY 1 DESC
    Run a query to Download Data