winnie-fsAptos Base - [chain] Transactions by Type pie copy
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
›
⌄
-- forked from Aptos Base - [chain] Transactions by Type pie @ https://flipsidecrypto.xyz/edit/queries/89421531-efd1-41c1-b58c-42b0e15b2916
with
txs as (
select
block_timestamp
, tx_hash
, case
when tx_type = 'user_transaction' then 'User Transactions'
when tx_type = 'state_checkpoint_transaction' then 'State Checkpoint Txs.'
when tx_type = 'block_metadata_transaction' then 'Block Metadata Txs.'
end as tx_type
from aptos.core.fact_transactions
where block_timestamp ::date > current_date() - interval '{{days}} days'
)
select
tx_type as "Type"
, count(1) as "Count"
from txs
group by 1
order by 2 desc
Run a query to Download Data