Query editor
/*HOW TO WORK WITH `action_delegate_delegate_action_actions` to get the fields inside each row of function call within delegated action:- first explode the array by doing cross join unnest- then access each row/function call's repsective field like method_name by doing . directly*/with exploded as (select block_date, block_height as block_height_executed, tx_hash, receipt_id -- receipt for this action (there are many actions included in one txn), execution_status, cardinality(action_delegate_delegate_action_actions) as delegated_action_size -- how many function calls are being delegated, action_delegate_delegate_action_sender_id as action_from, action_delegate_delegate_action_receiver_id as action_to-- Explode the array into rows, actions.value as action_data, actions.index as delegated_action_index, action_delegate_delegate_action_actions as raw_delegated_actions -- raw nested list of delegated actions/* explode by doing cross join unnest here*/from near.actions CROSS JOIN UNNEST(action_delegate_delegate_action_actions) WITH ORDINALITY as actions(value, index)where action_kind = 'DELEGATE_ACTION'and cardinality(action_delegate_delegate_action_actions) >= 2and receipt_id = '6DB2AzkLXzoU9CMj9GKSZi7y8dGxVrqrbtBsfpLVQCQ8'and block_date = date('2024-09-17')and block_height = 128251854)select block_date, block_height_executed, tx_hash, receipt_id, execution_status, delegated_action_size -- how many function calls are being delegated, action_from, action_to-- , typeof(action_data) -- row(args varchar, deposit varchar, gas bigint, method_name varchar)/* below is how you can access the delegated function call info */, action_data.args as function_call_args, action_data.deposit as function_call_deposit, action_data.gas as function_call_gas, action_data.method_name as function_call_method_name, delegated_action_index, raw_delegated_actions -- raw nested list of delegated actionsfrom exploded