totals = ( sales.groupBy("region") .agg(F.sum("amount").alias("total")) .orderBy("region") )