diff options
author | Lew Parker <parker@earthvectors.com> | 2012-12-13 17:16:36 -0700 |
---|---|---|
committer | Lew Parker <parker@earthvectors.com> | 2012-12-13 17:16:36 -0700 |
commit | 22b0dbe82cdc3c29c2e0036d1fa8f8d8f5530a5d (patch) | |
tree | 506b6efab81a724c6795f9fb24d1f8e9e99f368d /README.markdown | |
parent | 6bcd287628a38d74a128c9735431338fb10d2cba (diff) | |
download | rails-22b0dbe82cdc3c29c2e0036d1fa8f8d8f5530a5d.tar.gz rails-22b0dbe82cdc3c29c2e0036d1fa8f8d8f5530a5d.tar.bz2 rails-22b0dbe82cdc3c29c2e0036d1fa8f8d8f5530a5d.zip |
Make GROUP BY example more accurate and complete.
Diffstat (limited to 'README.markdown')
-rw-r--r-- | README.markdown | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/README.markdown b/README.markdown index afef04212a..70b378ff33 100644 --- a/README.markdown +++ b/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: |