Can I use non-aggregate columns with group by?

前端 未结 6 841
不思量自难忘°
不思量自难忘° 2020-12-09 09:24

You cannot (should not) put non-aggregates in the SELECT line of a GROUP BY query.

I would however like access the one of the non-aggregate

6条回答
  •  醉酒成梦
    2020-12-09 10:12

    You can't get the Id of the row that MAX found, because there might not be only one id with the maximum age.

提交回复
热议问题