0
如果在使用group by选择时应用限制,限制将应用于返回的组数或行数?我想限制返回的组。MySQL“group by”限制组返回
这里是我的审判:
select * from orders group by customer_email limit 0,2
从这个表:
id customer_email
0 [email protected]
1 [email protected]
2 [email protected]
3 [email protected]
4 [email protected]
5 [email protected]
6 [email protected]
我想返回的行0,1,2,3,4,5。
上述查询的结果是什么? – Hemantwagh07
它将返回有限的组而不是行。你想限制组,但你需要返回行0 1 2 3 4 5? – Justin
这应该会产生一个错误,因为您没有使用任何聚合函数,但使用了 – polin