答案 0 :(得分:2)
简单max
+ sum
即可:
select max(month),
sum(total_sales)
from table_name
答案 1 :(得分:2)
如果您只想最近一个月使用简单的最大值
-- this should return 4 and 11000
select max(month),sum(total_sales) from table1;
如果表中有其他列,则可以包含这些列(例如今年的total_sales ...)