提交 53c26fca 编写于 作者: Z Zachary Scott

Remove docs regarding grouping multiple values, as we should avoid

duplicating API reference in guides. Also  [ci skip]
上级 22820f7b
......@@ -676,23 +676,6 @@ FROM "orders"
GROUP BY status
```
It is possible to do this count with multiple values, to do this only add the
other column to `group`.
```ruby
Order.group(:status, :delivery_method).count
# => { ['awaiting_approval', 'regular'] => 5, ['awaiting_approval', 'fast'] => 2, ['paid', 'regular'] => 2, ['paid', 'fast'] => 10 }
```
The SQL that would be executed would be something like this:
```sql
SELECT COUNT (*) AS count_all, status AS status,
delivery_method AS delivery_method
FROM "orders"
GROUP BY status, delivery_method
```
Having
------
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册