Permalink
Browse files

Make GROUP BY example more accurate and complete.

  • Loading branch information...
1 parent 6bcd287 commit 22b0dbe82cdc3c29c2e0036d1fa8f8d8f5530a5d @parkerl parkerl committed Dec 14, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 README.markdown
View
2 README.markdown
@@ -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 22b0dbe

Please sign in to comment.