Query editor
with profile_created as (select distinct p.handle,p.profileId as profile_id,p.evt_tx_hash,p.evt_block_time,first_value(t."to") over (partition by t.tokenId order by t.evt_block_time desc) as owner -- last transfer to is ownerfrom lens_polygon.LensHub_evt_ProfileCreated pinner join lens_polygon.LensHub_evt_Transfer t on p.profileId = t.tokenId),profile_create_summary as (select count(*) as total_profile_countfrom profile_created),profile_transfer_detail as (select tokenId as profile_id,evt_tx_hash,evt_block_time,"from" as from_address,"to" as to_addressfrom lens_polygon.LensHub_evt_Transfer),profile_transfer_grouped as (select profile_id,count(*) as transfer_countfrom profile_transfer_detailwhere from_address <> 0x0000000000000000000000000000000000000000and to_address <> 0x0000000000000000000000000000000000000000group by 1--having count(*) > 1),profile_transfer_summary as (select count(*) as transferred_profile_count,sum(transfer_count) as total_transfer_countfrom profile_transfer_grouped)select transferred_profile_count,total_transfer_count,total_profile_count,cast(transferred_profile_count as double) / total_profile_count * 100.0 as transferred_profile_percentagefrom profile_transfer_summaryinner join profile_create_summary on true