Query editor
withlast_held as (SELECT*,row_number() over (partition bycontract_address,token_idorder byblock_number desc,evt_index desc) as last_transferFROMnft.transfers trWHEREcontract_address = 0x39ad68c0ca12907C5f60a50C5b5f045cAb16A3eBAND blockchain = 'polygon')SELECTlhu.to as holder,ens.name as holder_ens,cardinality(array_agg(lhu.token_id)) as tokens_held,array_agg(lhu.token_id) as token_idsFROMlast_held lhuLEFT JOIN labels.ens ens ON ens.address = lhu.toWHERElhu.last_transfer = 1AND lhu.to != 0x0000000000000000000000000000000000000000GROUP BY1,2ORDER BY3 DESC