jruby/activerecord-jdbc-adapter — pull request #369 by pierre-schambacher (2013-04-09 09:56:55+00:00)
Title: Fix pagination on SQL Server 2000 with GROUP clause (Fix #367)

The pagination condition was added before the ORDER condition.
If there is a GROUP BY clause, the pagination was in the GROUP BY
instead of the WHERE clause. New approach is extracting each clause and
build a new proper query.