Cross tabulation


For a little background and comparison, there’s an article on O’Reilly
( that
discusses the topic of server-side cross-tabulation, with respect to a
Perl toolset (DBIx::SQLCrosstab).

I’m getting started on a project for a client that will involve building
a variety of complex crosstabs on large sets of data. Unfortunately,
while there is a consensus that ruby/rails/some-foss-db would be the
preferred platform on which to code the app, there isn’t time reinvent
the crosstab wheel. The functionality needed here is a dealbreaker, and
sadly to say, these types of queries seem to be supported much better
within SQL Server than postgress/mysql, et al. Having become very
attached to Ruby, Rails and , I will be sick with
irony to have to use a lesser platform for the sake of expediency.

Does anyone know of a way to accomplish complex crosstabs from within a
ruby/rails app, without having to rely on database specific queries
(e.g. Microsoft SQL extensions), and without having to write it from


(If anyone is interested in starting a project to do this with
Ruby/rails, feel free to email me. I would love to be involved.)