我有一张看起来像这样的桌子
ITEM_NAME | NUM_SOLD | NUM_VIEWS
Apple | 50 | 75
Orange | 40 | 85
Pear | 80 | 70
Cherry | 15 | 60
我想按最后两列中最高的数字对其进行排序。
所以上表的排序如下:
ITEM_NAME | NUM_SOLD | NUM_VIEWS
Orange | 40 | 85
Pear | 80 | 70
Apple | 50 | 75
Cherry | 15 | 60
你可以看到,通过我输入的数字,它们大多是按 排序的NUM_VIEWS,但是因为Pear它的NUM_SOLD值高于任何一个Apple值,所以它在Orange和之间排序Apple。
这个 Apple and Pear 示例是我无法正常工作的。