title: What's the correct way to do nested groupings in Java Streams
body: <p>I'm trying to process supplier discounts to show only max discount per supplier with min customer ID here:</p>
  <pre><code>supplierDiscountList.stream()
                  .collect(
                          Collectors.groupingBy(
                                  SupplierDiscount::getStoreName,
                                  Collectors.maxBy(Comparator.comparing(SupplierDiscount::getDiscountPercentage)),
                                  Collectors.minBy(Comparator.comparing(SupplierDiscount::getCustomerID))
                          )
                  );
  </code></pre>
  <p>I managed to have collector for .maxBy only but don't understand how to make them nested.
  Any ideas?</p>