Skip to content

Commit 3da041e

Browse files
authored
Correct HAVING conditions active_record example query
Correct the active_record query example, in the HAVING conditions section, to align with the corresponding given SQL output.
1 parent 900dc32 commit 3da041e

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)