KeyrockWallet - Tx Distribution copy
Updated 2024-10-25
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
›
⌄
WITH TransactionCounts AS (
SELECT
sender AS wallet,
COUNT(DISTINCT tx_hash) AS total_transactions,
CASE
WHEN total_transactions < 20 THEN 'Less than 20 transactions'
WHEN total_transactions >= 20
AND total_transactions < 200 THEN '20-200 transactions'
WHEN total_transactions >= 200
AND total_transactions < 1000 THEN '200-1000 transactions'
ELSE 'Over 1000 transactions'
END as transaction_category
FROM
aptos.core.fact_transactions
WHERE
success = TRUE
AND wallet != ''
GROUP BY
sender
)
SELECT transaction_category, COUNT(DISTINCT wallet) as tot_wallet
FROM TransactionCounts
GROUP BY transaction_category
QueryRunArchived: QueryRun has been archived