当我写
SELECt AnotherColumnFROM TableGROUP BY SomeColumn;
有用。在其他RDBMS中,IIRC这样的语句是不可能的,因为不属于任何组合键的不属于分组键的列就被引用了。
这种“怪癖”的行为与我想要的行为非常接近。所以我用它来获得想要的结果:
SELECt * FROM ( SELECt * FROM `table` ORDER BY AnotherColumn) t1GROUP BY SomeColumn;

当我写
SELECt AnotherColumnFROM TableGROUP BY SomeColumn;
有用。在其他RDBMS中,IIRC这样的语句是不可能的,因为不属于任何组合键的不属于分组键的列就被引用了。
这种“怪癖”的行为与我想要的行为非常接近。所以我用它来获得想要的结果:
SELECt * FROM ( SELECt * FROM `table` ORDER BY AnotherColumn) t1GROUP BY SomeColumn;