SELECT date_trunc('day', block_timestamp) AS date
, COUNT(distinct block_number) AS block_count
, 86400/COUNT(distinct block_number) AS avg_block_time
FROM ethereum.core.fact_blocks
WHERE block_timestamp between '2022-01-01' and current_date - 2
GROUP BY date