Permalink
Browse files

Merge pull request #152 from parkerl/master

Update README to have a better GROUP BY example Issue #86

Closes #86
  • Loading branch information...
2 parents 6bcd287 + 22b0dbe commit 38d0a222e275d917a2c1d093b24457bafb600a00 @rafaelfranca rafaelfranca committed Dec 14, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 README.markdown
View
@@ -54,7 +54,7 @@ What are called `LIMIT` and `OFFSET` in SQL are called `take` and `skip` in Arel
`GROUP BY` is called `group`:
- users.group(users[:name]) # => SELECT * FROM users GROUP BY name
+ users.project(users[:name]).group(users[:name]) # => SELECT users.name FROM users GROUP BY users.name
The best property of the Relational Algebra is its "composability", or closure under all operations. For example, to restrict AND project, just "chain" the method invocations:

0 comments on commit 38d0a22

Please sign in to comment.