Multiply Google Ads Campaign data via API And Send it To Google Sheets

Hi;

I am trying to get summary numbers from Google Ads and write to Google Sheets.
I am getting Google Ads data with Ad Campaign Management - Make An API Call Module and the query at below.

{
“query” : “SELECT metrics.impressions, metrics.clicks, metrics.cost_micros,metrics.all_conversions FROM campaign WHERE segments.date DURING LAST_30_DAYS AND metrics.cost_micros > ‘0’”
}

but its returning all cost>0 campaigns one by one.
as like:
campaign a: 10 click, $100 cost
campaign b: 4click, $20 cost etc

I need total numbers(summary… as like you have 300 click in last 30 days, spend $1000 in total). How can i multiply click, costs etc as SUM(metrics.clicks) and send to Google Sheets?