Mysql – SQL – Select the ID corresponding to the max of a sum of values
This is the question in my hw Retrieve cartId having the maximum number of food items. Sample Data: (carts have multiple instances because the unitsInCart could be different items ie. 3 apples and 4 bananas) cart_items table cartId unitsInCart cart…