with a as (Select tokenid, max(block_timestamp) as tm from ethereum.core.ez_nft_transfers
where project_name='cryptopunks' and event_index>0
group by 1),
b as (select nft_to_address as holder, tokenid, block_timestamp as t from ethereum.core.ez_nft_transfers where project_name='cryptopunks')
select count( b.tokenid) as n_punks
from a
inner join b
on a.tm=b.t
where holder = '0x0000000000000000000000000000000000000000' or holder ='0x0000000000000000000000000000000000000001'