Query editor
with follow_data as (select f.follower, p.profile_idfrom (select from_hex(cast(json_extract(vars,'$.follower') as varchar)) as follower, -- cast to varbinarycast(json_extract(vars,'$.profileIds') as array(integer)) as profile_ids -- cast to arrayfrom lens_polygon.LensHub_call_followWithSigunion allselect t."from" as follower,cast(f.profileIds as array(integer)) as profile_idsfrom lens_polygon.LensHub_call_follow finner join polygon.transactions t on f.call_tx_hash = t.hashwhere call_block_time >= date('2022-05-18') -- Lens launch dateand block_time >= date('2022-05-18')and call_success = true) fcross join unnest(f.profile_ids) as p(profile_id)),profile_follower as (select profile_id,count(follower) as follower_countfrom follow_datagroup by 1)select (case when follower_count >= 10000 then '10K+ Followers'when follower_count >= 1000 then '1K+ Followers'when follower_count >= 100 then '100+ Followers'when follower_count >= 50 then '50+ Followers'when follower_count >= 10 then '10+ Followers'when follower_count >= 5 then '5+ Followers'else '1 - 5 Followers'end) as follower_count_type,count(profile_id) as profile_countfrom profile_followergroup by 1