Tobi_12024-05-28 02:23 PM
Updated 2024-05-28
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
›
⌄
WITH daus as (
SELECT
distinct sender as users,
trunc(block_timestamp, 'week') as weeks,
count(distinct trunc(block_timestamp, 'day')) as active_days
FROM
aptos.core.fact_transactions
group by
1,
2
having
active_days >= 2
),
active_users as (
SELECT
trunc(x.block_timestamp, 'week') as date,
SUBSTRING(
PAYLOAD_FUNCTION,
1,
CHARINDEX('::', PAYLOAD_FUNCTION) - 1
) as to_address,
count(distinct x.sender) as n_user,
count(distinct x.tx_hash) as txs
from
aptos.core.fact_transactions x
where
sender in (
select
users
from
daus
)
group by
1,
2
),
QueryRunArchived: QueryRun has been archived