Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

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

Merged
merged 1 commit into from

2 participants

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Dec 14, 2012
  1. @parkerl
This page is out of date. Refresh to see the latest.
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:
Something went wrong with that request. Please try again.