Query editor
with action_data as (with follow_data as (select call_block_time,call_tx_hash,user_address,profile_idfrom (select call_block_time,call_tx_hash,-- vars_struct.follower as user_address,-- vars_struct.profileIds as profile_idsfollower as user_address,ARRAY[CAST(profile_ids AS uint256)] AS profile_idsfrom (select call_block_time,call_tx_hash,-- 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,call_tx_hash,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 >= CAST('2022-05-18' AS TIMESTAMP) -- Lens launch dateand 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)),collect_data as (select call_block_time,call_tx_hash,-- vars:collector as user_address,-- vars:profileId as profile_idJSON_VALUE(vars, 'lax $.collector') as user_address,-- JSON_VALUE(vars, 'lax $.profileId') as profile_idCAST(JSON_VALUE(vars, 'lax $.profileId') AS uint256) as profile_idfrom lens_polygon.LensHub_call_collectWithSigwhere call_success = trueunion allselect call_block_time,call_tx_hash,CAST(t."from" AS VARCHAR) as user_address,-- CAST(c.profileId AS VARCHAR) as profile_idc.profileIdfrom lens_polygon.LensHub_call_collect cinner join polygon.transactions t on c.call_tx_hash = t.hashwhere call_block_time >= CAST('2022-05-18' AS TIMESTAMP) -- Lens launch dateand block_time >= CAST('2022-05-18' AS TIMESTAMP)and c.call_success = true)