messariaptos dapa q
Updated 2024-04-24
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
›
⌄
WITH ActiveDaysCTE AS (
SELECT
sender,
COUNT(DISTINCT date(block_timestamp)) AS active_days
FROM
aptos.core.fact_transactions
WHERE
date(block_timestamp) BETWEEN '2024-01-01' AND '2024-03-31'
GROUP BY
sender
)
SELECT
SUM(active_days * count_active_days) / SUM(count_active_days) AS weighted_average
FROM (
SELECT
active_days,
COUNT(active_days) AS count_active_days
FROM
ActiveDaysCTE
GROUP BY
active_days
) AS InnerQuery
QueryRunArchived: QueryRun has been archived