题解 | #不超过 10 美元的最贵产品的价格#
确定 Products 表中价格不超过 10 美元的最贵产品的价格
https://www.nowcoder.com/practice/19d1f06a58b04258aabe5a5a9934e611
select max(prod_price) as max_price from Products where prod_price<=10; select prod_price max_price from Products where prod_price <= 10 order by prod_price desc limit 1;
- 排序后取第一位
- 直接使用max函数