adambalaQuickest sale's period -- Min Holding Time in minute.
    Updated 2022-10-23
    with buytable1 as (
    select (BLOCK_TIMESTAMP) AS MINT_DATE ,BUYER_address, tx_hash, tokenid, price_usd,price
    FROM ethereum.core.ez_nft_sales
    WHERE EVENT_TYPE = 'sale' and CURRENCY_SYMBOL = 'ETH'
    and lower(NFT_ADDRESS)=lower('0x9c8ff314c9bc7f6e59a9d9225fb22946427edc03')
    and price_usd > 0 and price > 0 ),

    selltable1 as (
    select (BLOCK_TIMESTAMP) AS DATE ,seller_address, tx_hash, tokenid, price_usd,price
    FROM ethereum.core.ez_nft_sales
    WHERE EVENT_TYPE = 'sale' and CURRENCY_SYMBOL = 'ETH'
    and lower(NFT_ADDRESS)=lower('0x9c8ff314c9bc7f6e59a9d9225fb22946427edc03')
    and price_usd > 0 and price > 0 )

    select
    datediff('minute',MINT_date,date) as "hold time in minute" ,
    t1.tokenid,
    'https://www.nftscan.com/' || BUYER_address as trader,
    'https://www.nftscan.com/0x9c8ff314c9bc7f6e59a9d9225fb22946427edc03/' ||t1.tokenid as "token id"
    --T2.price || ' - '||T1.price || ' = ' as "Sale PRICE - bought PRICE (ETH)" ,
    --sum (t2.price_usd - t1.price_usd) as USD_Profit
    --sum (t2.price - t1.price) as ETH_Profit
    from buytable1 t1 join selltable1 t2 on BUYER_address = seller_address and t1.tokenid = t2.tokenid
    WHERE MINT_date < DATE
    order by 1 asc
    limit 10
    Run a query to Download Data