mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Improve example for having()
This commit is contained in:
parent
767eca4913
commit
ceca3a0564
1 changed files with 1 additions and 1 deletions
|
@ -496,7 +496,7 @@ SQL uses the +HAVING+ clause to specify conditions on the +GROUP BY+ fields. You
|
|||
For example:
|
||||
|
||||
<ruby>
|
||||
Order.group("date(created_at)".having(["created_at > ?", 1.month.ago])
|
||||
Order.group("date(created_at)".having("created_at > ?", 1.month.ago)
|
||||
</ruby>
|
||||
|
||||
The SQL that would be executed would be something like this:
|
||||
|
|
Loading…
Reference in a new issue