elsinaTime Pattern
    Updated 2025-05-26
    with price as (
    select
    date_trunc('day', hour) as date,
    avg(price) as price_usd
    from crosschain.price.ez_prices_hourly
    where
    blockchain = 'ethereum' and
    token_address = lower('0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599' )
    group by 1
    ),

    base as (
    SELECT
    block_timestamp,
    from_address,
    tx_hash,
    value as amount,
    amount * price_usd as amount_usd,
    tx_fee
    from mezo.testnet.fact_transactions left join price on block_timestamp::date = date
    where
    tx_succeeded = 'TRUE'
    )

    SELECT
    date_part('hour', block_timestamp) as "Hour",
    case when dayofweek(block_timestamp)=0 then 7 else dayofweek(block_timestamp) end||' - '||dayname(block_timestamp) as "Day Name",
    COUNT(DISTINCT tx_hash) AS tx_count
    FROM base
    GROUP BY 1, 2
    ORDER BY 1,2 asc


    Last run: 13 days ago
    Hour
    Day Name
    TX_COUNT
    1
    01 - Mon4758
    2
    02 - Tue5719
    3
    03 - Wed4807
    4
    04 - Thu7256
    5
    05 - Fri6651
    6
    06 - Sat5769
    7
    07 - Sun6438
    8
    11 - Mon5613
    9
    12 - Tue11072
    10
    13 - Wed5760
    11
    14 - Thu9798
    12
    15 - Fri6302
    13
    16 - Sat4500
    14
    17 - Sun6344
    15
    21 - Mon8516
    16
    22 - Tue8770
    17
    23 - Wed4198
    18
    24 - Thu18477
    19
    25 - Fri7915
    20
    26 - Sat6520
    ...
    168
    3KB
    3s