mz0111near 9
Updated 2023-05-18
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
›
⌄
with tab1 as (select
TX_SIGNER,
Min(date_trunc('day', block_timestamp)) as min_date,
Max(date_trunc('day', block_timestamp)) as max_date,
count(*) as transactions ,
b.LABEL_TYPE
from near.core.fact_transactions a
join near.core.dim_address_labels b
on b.ADDRESS = a.TX_RECEIVER
group by 1 , 5
having Min(date_trunc('day', block_timestamp)) > current_date - {{period}}
)
select
LABEL_TYPE,
sum(datediff('day', min_date, max_date))/ sum(transactions) as Time_Between_Transactions
from tab1
group by 1
Run a query to Download Data