sunshine-juliaCopy of Copy of Token transfers
    Updated 2022-09-01
    with last_tx as (
    select tokenid, max(block_timestamp) as last_tx_time
    from ethereum.core.ez_nft_transfers
    where nft_address = '0xb47e3cd837ddf8e4c57f05d70ab865de6e193bbb'
    group by 1
    ),holding as (
    select tx_hash from ethereum.core.ez_nft_transfers a,last_tx b
    where nft_address = '0xb47e3cd837ddf8e4c57f05d70ab865de6e193bbb' and a.tokenid = b.tokenid
    and last_tx_time = block_timestamp
    ),nft_top_ten as (
    select nft_to_address, count(distinct tokenid) as punks_held
    from ethereum.core.ez_nft_transfers
    where tx_hash in (select tx_hash from holding)
    and nft_to_address !='0x0000000000000000000000000000000000000000'
    group by 1
    order by 2 desc
    limit 10)
    select count(distinct tx_hash) as num_tx,sum(price_usd) as spent_amount
    from ethereum.core.ez_nft_sales
    where nft_address = '0xb47e3cd837ddf8e4c57f05d70ab865de6e193bbb'
    and buyer_address in (select nft_to_address from nft_top_ten)

    Run a query to Download Data