js699aleo dash
    Updated 2025-04-30
    WITH transaction_stats AS (
    SELECT
    COUNT(DISTINCT TX_ID) AS total_transactions,
    COUNT(CASE WHEN SUCCEEDED = TRUE THEN 1 END) * 100 / COUNT(*) AS success_rate_percentage,
    count(distinct program_id) as programs
    FROM aleo.core.fact_transitions
    ),
    block_stats AS (
    SELECT
    COUNT(DISTINCT BLOCK_ID) AS total_blocks,
    AVG(TX_COUNT) AS avg_tx_per_block
    FROM aleo.core.fact_blocks
    ),
    block_time_diffs AS (
    SELECT
    BLOCK_ID,
    DATEDIFF(SECOND,
    LAG(BLOCK_TIMESTAMP) OVER (ORDER BY BLOCK_TIMESTAMP),
    BLOCK_TIMESTAMP) AS time_diff_seconds
    FROM aleo.core.fact_blocks
    ),
    block_time_stats AS (
    SELECT
    AVG(time_diff_seconds) AS avg_time_between_blocks_seconds
    FROM block_time_diffs
    WHERE time_diff_seconds IS NOT NULL
    )

    SELECT
    t.total_transactions,
    t.success_rate_percentage,
    t.programs,
    b.total_blocks,
    b.avg_tx_per_block,
    bt.avg_time_between_blocks_seconds
    FROM transaction_stats t
    Last run: 29 days ago
    TOTAL_TRANSACTIONS
    SUCCESS_RATE_PERCENTAGE
    PROGRAMS
    TOTAL_BLOCKS
    AVG_TX_PER_BLOCK
    AVG_TIME_BETWEEN_BLOCKS_SECONDS
    1
    1977698096.78122524269457462.8473892.964481
    1
    52B
    4s