jp123 [FLOW] Flow vs L1s - Tx Success Rates
Updated 2022-05-31Copy Reference Fork
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
›
⌄
--Number of transactions -Transaction success rates -Number of unique wallets to make a transaction -Number of wallets that used the chain everyday since May 9th -Transaction fees
WITH tx as (
SELECT 'Flow' as chain, block_timestamp::date as date, IFF(TX_SUCCEEDED = 'true', 'SUCCEEDED', 'FAILED') as tx_status, COUNT(DISTINCT tx_id) as num_tx, 100 * ratio_to_report(num_tx) over (partition by date) as percent
FROM flow.core.fact_transactions
WHERE date > '2022-05-09'
GROUP BY 1, 2, 3
UNION
SELECT 'Solana' as chain, block_timestamp::date as date, IFF(SUCCEEDED = 'TRUE', 'SUCCEEDED', 'FAILED') as tx_status, COUNT(DISTINCT tx_id) as num_tx, 100 * ratio_to_report(num_tx) over (partition by date) as percent
FROM flipside_prod_db.solana.fact_transactions
WHERE date > '2022-05-09'
GROUP BY 1, 2, 3
-- UNION
-- SELECT 'Algorand' as chain, block_timestamp::date as date, COUNT(DISTINCT tx_id) as num_tx
-- FROM flipside_prod_db.algorand.transactions
-- WHERE date > '2022-05-09'
-- GROUP BY 1, 2
UNION
SELECT 'Ethereum' as chain, block_timestamp::date as date, IFF(STATUS = 'SUCCESS', 'SUCCEEDED', 'FAILED') as tx_status, COUNT(DISTINCT TX_HASH) as num_tx, 100 * ratio_to_report(num_tx) over (partition by date) as percent
FROM flipside_prod_db.ethereum_core.fact_transactions
WHERE date > '2022-05-09'
GROUP BY 1, 2, 3
)
SELECT chain, date, percent
FROM tx
WHERE tx_status = 'SUCCEEDED'
Run a query to Download Data