MySQL MAX() function returns maximum value in a set of values. It accepts one argument i.e. the expression and returns the highest value of the expression. This expression is the required parameter.
The following statement returns maximum price in set of price list of items.
SELECT ITEM_ID, ITEM, PRICE
FROM ITEM
WHERE price=(SELECT MAX(price) FROM ITEM);
Solution:
MySQL MAX() function returns maximum value in a set of values. It accepts one argument i.e. the expression and returns the highest value of the expression. This expression is the required parameter.
The following statement returns maximum price in set of price list of items.
Output of the above code -
need an explanation for this answer? contact us directly to get an explanation for this answer+---------+------+-------+ | ITEM_ID | ITEM | PRICE | +---------+------+-------+ | 1003 | Bag | 1430 | +---------+------+-------+