hessTotal
    Updated 2024-02-28
    with hash as ( select DISTINCT tx_id
    from sei.core.fact_msg_attributes
    where attribute_value = 'sei1cujl8ujhc36lp7sr98x30u0aeqtjlj68kll5rqqr9dke5xvn2ltquzhysl'
    and attribute_key = 'collection'
    and block_timestamp::date >= '2024-02-08'
    and tx_id in (select tx_id from sei.core.fact_msg_attributes
    where attribute_value = 'mint'
    and attribute_key = 'action'
    and block_timestamp::date >= '2024-02-08'))
    ,
    nfts as (select block_timestamp,
    a.tx_id,
    attribute_value as nft
    from sei.core.fact_msg_attributes a join hash b on a.tx_id = b.tx_id
    where block_timestamp::date >= '2024-02-08'
    and attribute_key = 'token_id'
    )
    ,
    user as (select DISTINCT nft,
    a.block_timestamp,
    a.tx_id,
    attribute_value as user
    from sei.core.fact_msg_attributes a join nfts b on a.tx_id = b.tx_id
    where attribute_key = 'fee_payer'
    and a.block_timestamp::date >= '2024-02-08'
    )
    ,
    final as ( select DISTINCT nft,
    b.block_timestamp,
    b.tx_id,
    user,
    attribute_value/pow(10,6) as mint_price
    from user a left outer join sei.core.fact_msg_attributes b on a.tx_id = b.tx_id
    where attribute_key = 'price'
    and b.block_timestamp::date >= '2024-02-08')

    QueryRunArchived: QueryRun has been archived