Spark Scala Data Frame to have multiple aggregation of single group by. eg
val groupped = df.groupBy("firstName", "lastName").sum("Amount").toDF()
But What if I need Count, Sum, Max etc
/* Below Does Not Work , but this is what the intention is
val groupped = df.groupBy("firstName", "lastName").sum("Amount").count().toDF()
*/
output
groupped.show()
--------------------------------------------------
| firstName | lastName| Amount|count | Max | Min |
--------------------------------------------------