Moejan9th1
Updated 2023-01-17
9
1
2
3
4
5
6
7
›
⌄
select
iff(BLOCK_TIMESTAMP::date = '2023-01-09', 'Jan-9th', 'Other') as type,
date_trunc('day', BLOCK_TIMESTAMP)::date AS DAY,
count(BLOCK_ID) as blocks,
86400 /blocks as Avgtimesec
from terra.core.fact_blocks where BLOCK_TIMESTAMP::date between '2023-01-01' and CURRENT_DATE - 5
group by 1,2
Run a query to Download Data