KeyrockAPTOS TX COUNT 180D copy
Updated 2024-03-08
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
›
⌄
-- forked from aptos TX COUNT 180D @ https://flipsidecrypto.xyz/edit/queries/a22b67ac-7202-477d-95da-4546316bd638
WITH min_block_timestamp AS (
SELECT MIN(block_timestamp) AS min_timestamp
FROM aptos.core.fact_transactions
)
SELECT
date_trunc('day', block_timestamp) AS day,
COUNT(DISTINCT FACT_TRANSACTIONS_ID) AS daily_transactions
FROM
aptos.core.fact_transactions
CROSS JOIN
min_block_timestamp
WHERE
block_timestamp <= DATEADD(day, 180, min_timestamp) -- Limit to the first 180 days
GROUP BY
day
ORDER BY
day;
QueryRunArchived: QueryRun has been archived