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