hessTransaction/Block Correlation with Avg and Total Transaction Fees
    Updated 2025-04-27
    with contracts as ( select address,
    label_type,
    label,
    address_name
    from sei.core.dim_labels
    UNION
    select * from
    ( values ( 'silo','defi','sei1e3gttzq5e5k49f9f5gzvrl0rltlav65xu6p9xc0aj7e84lantdjqp7cncc','Mint and burn'),
    ('MRKT','nft','sei1jthjakeql58752e9c5d8p58gaeqk6zlfp8ntdam52kngagehu94qg8wm7u','Marketplace'),
    ('Kryptonite','defi','sei1ln7ntsqmxl8s502f83km9a475zyhcfhpj7v2fsm3pcmckdyys3tsktx9vk','Mint and burn')
    ) as a (label, label_type, address,address_name)
    )
    ,
    fees as ( select DISTINCT tx_id -- remove Oracle txns
    from sei.core.fact_transactions
    where fee = '0usei'
    and block_timestamp::date >= current_date - 30
    )
    ,
    users as ( select DISTINCT attribute_value as addresses,
    tx_id
    from sei.core.fact_msg_attributes
    where attribute_key in ('sender','fee_payer')
    and block_timestamp::date >= current_date - 30)
    ,
    transactions as ( select date(a.block_timestamp) as date,
    a.tx_id,
    label,
    label_type,
    address,
    address_name,
    addresses as user,
    a.block_id,
    avg(split(fee,'usei')[0]/pow(10,6)) as fees,
    avg(GAS_USED) as gas_use
    from sei.core.fact_msg_attributes a full join contracts b on a.attribute_value = b.address
    Last run: 26 days agoAuto-refreshes every 24 hours
    No Data to Display
    0
    2B
    96s