SocioAnalyticaBlast overview over time copy
    Updated 2025-02-19
    WITH TokenPrices AS (
    SELECT
    TO_TIMESTAMP(value[0]::string) as date,
    value[1] as price
    FROM (
    SELECT livequery.live.udf_api(
    'https://api.coingecko.com/api/v3/coins/ethereum/market_chart?vs_currency=usd&days=max&interval=daily&precision=3') as response
    ),LATERAL FLATTEN (input => response:data:prices)
    )
    ,
    main as (
    SELECT
    block_timestamp,
    STATUS,
    tx_hash,
    block_number,
    tx_fee,
    tx_fee * b.price as tx_fee_usd
    FROM blast.core.fact_transactions a
    LEFT JOIN TokenPrices b ON date_trunc('d', block_timestamp) = b.date

    )
    SELECT
    date_trunc('{{granularity}}',block_timestamp) as date,
    count(DISTINCT tx_hash) as n_txs,
    sum(CASE WHEN STATUS = 'SUCCESS' THEN 1 ELSE 0 END) as successful_txns,
    sum(CASE WHEN STATUS != 'SUCCESS' THEN 1 ELSE 0 END) as unsuccessful_txns,
    100*successful_txns/(successful_txns+unsuccessful_txns) as success_rate,
    sum(n_txs) over (ORDER BY date) as cum_txs,
    count(DISTINCT block_number) as block_number_count,
    sum(block_number_count) over (ORDER BY date) as cum_block,
    sum(tx_fee) as "Gas Fee [ETH]",
    avg(tx_fee) as "Avg. Gas Fee [ETH]",
    avg(tx_fee_usd) as "Avg .Gas Fee [USD]",
    median(tx_fee) as "Median Gas Fee [ETH]",
    median(tx_fee_usd) as "Median Gas Fee [USD]",
    Last run: 2 months ago
    DATE
    N_TXS
    SUCCESSFUL_TXNS
    UNSUCCESSFUL_TXNS
    SUCCESS_RATE
    CUM_TXS
    BLOCK_NUMBER_COUNT
    CUM_BLOCK
    Gas Fee [ETH]
    Avg. Gas Fee [ETH]
    Avg .Gas Fee [USD]
    Median Gas Fee [ETH]
    Median Gas Fee [USD]
    CUM_FEE_ETH
    Gas Fee [USD]
    CUM_FEE_USD
    1
    2025-02-19 17:00:00.000879487058998.9879462187002211235155885270.0048868523995.557030247e-72.310238275e-76024.424898387
    2
    2025-02-19 16:00:00.000139081369421498.4613172186914271800155872920.011785266468.473731998e-72.597062239e-76024.420011535
    3
    2025-02-19 15:00:00.000156591534231797.9756052186775191800155854920.019128015940.000001221534962.603386283e-76024.408226269
    4
    2025-02-19 14:00:00.000142921408520798.5516372186618601800155836920.01972452870.0000013801097612.399395665e-76024.389098253
    5
    2025-02-19 13:00:00.00012516124546299.5046342186475681800155818920.0055556744914.438857855e-72.144482587e-76024.369373724
    6
    2025-02-19 12:00:00.000135521338816498.7898472186350521800155800920.0067121758474.952904255e-71.88681486e-76024.363818049
    7
    2025-02-19 11:00:00.00012384123364899.6124032186215001800155782920.0048468250993.913779957e-71.800607943e-76024.357105874
    8
    2025-02-19 10:00:00.000124051230310299.1777512186091161800155764920.0074319395775.9910839e-72.31344355e-76024.352259048
    9
    2025-02-19 09:00:00.00012364122956999.4419282185967111800155746920.0073917912825.978478876e-72.413474888e-76024.344827109
    10
    2025-02-19 08:00:00.000137751363114498.9546282185843471800155728920.0099423161747.217652395e-72.37189314e-76024.337435318
    11
    2025-02-19 07:00:00.00014735146449199.3824232185705721800155710920.014906921360.0000010116675512.400967434e-76024.327493001
    12
    2025-02-19 06:00:00.000135791344613399.0205462185558371800155692920.0088099083776.487891875e-72.567744935e-76024.31258608
    13
    2025-02-19 05:00:00.00013620135635799.5814982185422581800155674920.0095720279037.027920634e-72.607664897e-76024.303776172
    14
    2025-02-19 04:00:00.000138911375213998.9993522185286381800155656920.0082412793485.932819342e-72.79865049e-76024.294204144
    15
    2025-02-19 03:00:00.00013498134069299.3184182185147471800155638920.015391121440.0000011402519964.981845709e-76024.285962864
    16
    2025-02-19 02:00:00.000150881487021898.5551432185012491800155620920.017353530970.0000011501544914.010293016e-76024.270571743
    17
    2025-02-19 01:00:00.000143731426011399.2138042184861611800155602920.0066642433634.636640481e-71.982595738e-76024.253218212
    18
    2025-02-19 00:00:00.000139341379813699.023972184717881800155584920.0095260940256.836582478e-71.886377999e-76024.246553969
    19
    2025-02-18 23:00:00.00011824117824299.644792184578541800155566920.0052121762874.408132854e-71.966796618e-76024.237027875
    20
    2025-02-18 22:00:00.00012401123336899.4516572184460301800155548920.019391712950.0000015637217122.298938388e-76024.231815698
    ...
    8661
    1MB
    27s