Skip to content

Commit 5621c93

Browse files
authored
Merge pull request rails#50306 from jbk2/patch-1
Correct example query given in HAVING conditions section [ci skip]
2 parents 900dc32 + 3da041e commit 5621c93

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

guides/source/active_record_querying.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1041,7 +1041,7 @@ SQL uses the `HAVING` clause to specify conditions on the `GROUP BY` fields. You
10411041
For example:
10421042

10431043
```ruby
1044-
Order.select("created_at, sum(total) as total_price").
1044+
Order.select("created_at as ordered_date, sum(total) as total_price").
10451045
group("created_at").having("sum(total) > ?", 200)
10461046
```
10471047

0 commit comments

Comments
 (0)