select sum(TX_COUNT) as "TX count by week" ,count(distinct(MINER)) as"Active miners per week",sum(TX_COUNT)/count(distinct(MINER)) "Average tx done by miners", date_trunc('week',BLOCK_TIMESTAMP) as date
from ethereum.core.fact_blocks
group by 4
order by 4 desc