Afonso_Diaz2023-10-24 10:30 PM
    Updated 2023-10-24
    with

    t1 as (
    select distinct tx_id
    from sei.core.fact_msg_attributes
    where attribute_key = '_contract_address'
    and msg_type = 'wasm-execute-exchange'
    and attribute_value = 'sei1pdwlx9h8nc3fp6073mweug654wfkxjaelgkum0a9wtsktwuydw5sduczvz'
    and tx_succeeded = 1
    ),

    t2 as (
    select
    tx_id,
    a.block_timestamp,
    a.attribute_value / 1e6 as amount_sei,
    b.attribute_value as seller,
    d.tx_from as buyer,
    split_part(c.attribute_value, ', ', 1) as tokenid,
    split_part(c.attribute_value, ', ', 2) as nft_address,
    case
    when nft_address ilike '%sei1rhx6r2q63t37yfsymzq9esx784lm2esskm7ny6j7j208xvpghzesp20vz2%' then 'RoverSeals'
    when nft_address ilike '%sei14wu660wh5dnmw8j0d5v0qqmfw4hu7u95ewpm6ydy7ffpm7am66lqr8k0fr%' then 'Path to Sei Mainnet: Fin Wallet'
    when nft_address ilike '%sei1xpxtdzcqh5dug3xdncmrw8lf8k7q37qly8s68g9prt5k2tsz8xwq5x67fm%' then 'ObtgonSei'
    when nft_address ilike '%sei1y7dzt3uf4fk7vc54kt6ntjyggefsk45pnfj09rdyyrar28yh5axq5leavl%' then 'Sei Mainnet Commemorative NFT'
    when nft_address ilike '%sei1auh2wqt263lqmj2ex362cmkyg8d3yg64jw5yv85h5c9vmn68w2tq29zk6k%' then 'Path to Sei Mainnet: SeaSwap'
    when nft_address ilike '%sei18ddlx5jsqhugd8g3qd5h5l5xdzc00rhvk8khvrvlyrm4x4r2g4vsfs3ckf%' then 'Akira'
    when nft_address ilike '%sei155kpekevm59yg8kaj0wufzpma6s78q6l0y9nnlnqu6lxmglskw7ss0zh9x%' then 'ShipMunk'
    when nft_address ilike '%sei1pkteljh83a83gmazcvam474f7dwt9wzcyqcf5puxvqqs6jcx8nnq2y74lu%' then 'The Colony'
    when nft_address ilike '%sei12ne7qtmdwd0j03t9t5es8md66wq4e5xg9neladrsag8fx3y89rcs5m2xaj%' then 'Mint By Users'
    when nft_address ilike '%sei1aj6t3eyus0vc5w7f4dnr84tk7g5xwrxfughvl0rfjljjs90rtklqlmz966%' then 'Sei Shiba'
    when nft_address ilike '%sei19lsam8qjj3jacfhsuqnn7zsc9326uje8qp96neukhaxyjtk3pkhs366058%' then 'Sailors'
    when nft_address ilike '%sei1kk00dtyzgqc8t2slcu9sra2gxqlruvk8nc8x96xzrnuvd4ne2mjqskj3nw%' then 'Yolee Universe'
    when nft_address ilike '%sei1cc0qgdxgstsjfnsz0u2at4flr93f0ux43u8lj770ft4dxfqvc6yqkvv289%' then 'Duck Club'
    when nft_address ilike '%sei13wx26urrrh0pp0fjues2gawxzq2hdmgqt8cmqvr3f4d058f4jd8sfwrtlh%' then 'Sei My Name'
    when nft_address ilike '%sei1zn8vezzrzr59lt9zsfe9hup4z4f67ke0w3fwc4vtf5rjd794z2wsmcv836%' then 'Amphora: Sei'
    Run a query to Download Data