Query editor
with nft_transfer_detail as (select e.evt_block_time,e.evt_tx_hash,e."to" as address,e.tokenId as token_id,1 as token_countfrom erc721_ethereum.evt_Transfer ewhere e.contract_address = 0x4b15a9c28034dC83db40CD810001427d3BD7163Dand e.evt_block_time > TIMESTAMP '2023-01-01 00:00:00'union allselect evt_block_time,evt_tx_hash,"from" as address,tokenId as token_id,-1 as token_countfrom erc721_ethereum.evt_Transfer ewhere e.contract_address = 0x4b15a9c28034dC83db40CD810001427d3BD7163Dand e.evt_block_time > TIMESTAMP '2023-01-01 00:00:00'and "from" <> 0x0000000000000000000000000000000000000000 -- Mint),nft_transfer_token_summary as (select address,token_id,sum(token_count) as token_countfrom nft_transfer_detail tgroup by 1, 2having sum(token_count) > 0),top_holders as (select address,count(distinct token_id) as hold_token_countfrom nft_transfer_token_summarygroup by 1order by 2 desclimit 100),all_holders_summary as (select count(token_id) as total_token_countfrom nft_transfer_token_summary),top_holders_summary as (select sum(hold_token_count) as top_holder_token_countfrom top_holders),ape_purchased_event_logs as (SELECTblock_hash, bytearray_ltrim (topic1) as playerAddress, bytearray_to_uint256(topic2) as amountApePurchased, tx_hash, block_timeFROM ethereum.logsWHERE