Query editor
with follow_data as (select call_block_time,follower,profile_idfrom (select call_block_time,-- vars_struct.follower as follower,-- vars_struct.profileIds as profile_idsfollower,ARRAY[CAST(profile_ids AS uint256)] AS profile_idsfrom (select call_block_time,-- from_json(vars, 'struct<follower:string,profileIds:array<long>>') AS vars_structJSON_VALUE(vars,'lax $.follower') as follower,json_query(vars, 'lax $.profileIds[*]') AS profile_idsfrom lens_polygon.LensHub_call_followWithSig)union allselect call_block_time,-- t.`from` as follower,CAST(t."from" AS VARCHAR) AS follower,f.profileIds as profile_idsfrom lens_polygon.LensHub_call_follow finner join polygon.transactions t on f.call_tx_hash = t.hashwhere-- call_block_time >= '2022-05-18' -- Lens launch date-- and block_time >= '2022-05-18'call_block_time >= CAST('2022-05-18' AS TIMESTAMP)AND block_time >= CAST('2022-05-18' AS TIMESTAMP)) f-- lateral view explode(profile_ids) as profile_idCROSS JOIN UNNEST (f.profile_ids) AS b (profile_id)),follow_daily_summary as (select date_trunc('day', call_block_time) as block_date,count(*) following_count,count(distinct profile_id) as profile_countfrom follow_datagroup by 1)select block_date,following_count,profile_count,sum(following_count) over (order by block_date) as accumulate_following_countfrom follow_daily_summaryorder by block_date