crypto_gostcontinuing-gold
    Updated 2024-10-18
    WITH recent_transactions AS (
    SELECT
    block_timestamp::DATE AS transaction_date,
    COUNT(tx_id) AS daily_transaction_count,
    SUM(fee) AS daily_transaction_volume,
    DATE_TRUNC('second', block_timestamp) AS second_truncated
    FROM
    ALEO.core.fact_transactions
    WHERE
    block_timestamp >= DATEADD(DAY, -30, CURRENT_DATE)
    GROUP BY
    block_timestamp::DATE,
    DATE_TRUNC('second', block_timestamp)
    ),

    total_transactions AS (
    SELECT
    COUNT(tx_id) AS total_transactions
    FROM
    ALEO.core.fact_transactions
    WHERE
    block_timestamp >= DATEADD(DAY, -30, CURRENT_DATE)
    )

    SELECT
    t.transaction_date,
    t.daily_transaction_count,
    t.daily_transaction_volume,
    COALESCE(ROUND(t.daily_transaction_count / 86400, 2), 0) AS transactions_per_second -- 86400 seconds in a day
    FROM
    recent_transactions t
    JOIN
    total_transactions tt ON 1=1
    ORDER BY
    t.transaction_date DESC;

    Last run: 2 months ago
    TRANSACTION_DATE
    DAILY_TRANSACTION_COUNT
    DAILY_TRANSACTION_VOLUME
    TRANSACTIONS_PER_SECOND
    1
    2024-10-18 00:00:00.00081.3157930
    2
    2024-10-18 00:00:00.00040.8086040
    3
    2024-10-18 00:00:00.00051.3189160
    4
    2024-10-18 00:00:00.000101.8473960
    5
    2024-10-18 00:00:00.00060.7721260
    6
    2024-10-18 00:00:00.00060.9317830
    7
    2024-10-18 00:00:00.00050.213180
    8
    2024-10-18 00:00:00.00040.204240
    9
    2024-10-18 00:00:00.00030.153180
    10
    2024-10-18 00:00:00.00051.2883820
    11
    2024-10-18 00:00:00.000205.5420550
    12
    2024-10-18 00:00:00.00070.5103010
    13
    2024-10-18 00:00:00.00030.5822160
    14
    2024-10-18 00:00:00.00040.5822160
    15
    2024-10-18 00:00:00.00020.102120
    16
    2024-10-18 00:00:00.000101.8965310
    17
    2024-10-18 00:00:00.00050.2821360
    18
    2024-10-18 00:00:00.00050.8736130
    19
    2024-10-18 00:00:00.00031.40
    20
    2024-10-18 00:00:00.00010.051060
    ...
    100000
    4MB
    5s