Column1 | Column2 --------+-------- 1 | 1 3 | 2 1 | 3 2 | 1 2 | 4
我想要column1的最大值,然后是column2的最大值:在本示例中-> 3:2
使用以下内容:
select column1, column2 from tab where column1 = ( Select max(column1) from tab );
SQL小提琴演示
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
点击生成二维码
我来说两句