rashmanninquisitive-azure
Updated 2024-09-17
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
›
⌄
⌄
WITH total_transactions AS (
SELECT
COUNT(TX_HASH) AS total_tx
FROM
bsc.core.fact_transactions
WHERE
BLOCK_TIMESTAMP BETWEEN '2024-08-01' AND '2024-08-31'
),
successful_transactions AS (
SELECT
COUNT(TX_HASH) AS successful_tx
FROM
bsc.core.fact_transactions;
WHERE
BLOCK_TIMESTAMP BETWEEN '2024-08-01' AND '2024-08-31'
AND STATUS = 'SUCCESS' -- Assuming 'SUCCESS' indicates a successful transaction
)
SELECT
(successful_tx / total_tx::FLOAT) * 100 AS success_percentage
FROM
total_transactions, successful_transactions;
QueryRunArchived: QueryRun has been archived