Create a DataFrame, group by all specified columns, apply the aggregation, and return the result as a flat table.