How it’s written=PIVOTBY(row_fields, col_fields, values, function, [field_headers], [row_total_depth], [row_sort_order], [col_total_depth], [col_sort_order], [filter_array], [relative_to])
Summarises values by rows and columns (like a PivotTable). Arguments in [brackets] are optional.
10 points for a first try without hints, 5 otherwise.