hessWeekly Volume Per Platform copy
    Updated 2024-06-01
    with open_tx as ( select DISTINCT tx_hash,
    contract_address as collection,
    origin_from_address as buyer,
    block_timestamp,
    SUBSTR(data, 129, 4) as quant,
    case when quant = '0a' then '10'
    when quant = '0b' then '11'
    when quant ilike '0%' then trim(quant,0)
    when quant = '3c' then '60' else quant end as quantity
    from sei.core_evm.fact_event_logs
    where contract_address != '0x0000000000000068f116a894984e2db1123eb395'
    and origin_to_address = '0x0000000000000068f116a894984e2db1123eb395'
    and block_timestamp::date >= '2024-05-27'
    and tx_status = 'SUCCESS'
    and topics[0] = '0xc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62'
    )
    ,
    collection as (select DISTINCT a.tx_hash,
    a.block_timestamp,
    collection,
    buyer,
    quantity,
    quant,
    lower('0x' || SUBSTR(INPUT, 35, 40) :: string) as seller,
    from sei.core_evm.fact_traces a join open_tx b on a.tx_hash = b.tx_hash
    where from_address = collection
    and a.block_timestamp::date >= '2024-05-27'
    )
    ,
    final_open as (select DISTINCT a.tx_hash,
    a.block_timestamp,
    collection,
    buyer,
    seller,
    quantity,
    quant,
    QueryRunArchived: QueryRun has been archived