MLDZMNTrait analysis 2
    Updated 2022-06-18
    with minted as (
    with tb1 as (select
    TOKENID,
    BLOCK_TIMESTAMP as mint_time,
    MINT_PRICE_USD as mint_usd
    from ethereum.core.ez_nft_mints
    where NFT_ADDRESS=lower('0x4b10701Bfd7BFEdc47d50562b76b436fbB5BdB3B')
    ),

    tb2 as (select
    BLOCK_TIMESTAMP,
    TOKENID,
    tx_hash,
    min(BLOCK_TIMESTAMP) as sale_time,
    PRICE_USD as sale_usd
    from ethereum.core.ez_nft_sales
    where NFT_ADDRESS=lower('0x4b10701Bfd7BFEdc47d50562b76b436fbB5BdB3B')
    group by 1,2,3,5)

    select
    tb1.TOKENID
    from tb1
    join tb2 on tb1.TOKENID=tb2.TOKENID
    where DATEDIFF(day, mint_time,sale_time)<1
    group by 1),


    trait as (select
    block_number as mint_block,
    block_timestamp as mint_time,
    tx_hash as mint_hash,
    contract_address,
    tokenflow_eth.hextoint(topics[1]) as tokenID,
    tokenflow_eth.hextoint(substr(data,3,64)) as background,
    tokenflow_eth.hextoint(substr(data,67,64)) as body,
    tokenflow_eth.hextoint(substr(data,131,64)) as accessory,
    Run a query to Download Data