rails / arel

A Relational Algebra
2.06k stars 390 forks source link

FILTER clause #460

Closed crashtech closed 6 years ago

crashtech commented 7 years ago

I'd like to make a contribution by implementing the FILTER clause, as better described in these blog posts: https://medium.com/little-programming-joys/the-filter-clause-in-postgres-9-4-3dd327d3c852#.r492befze and https://blog.jooq.org/2014/12/30/the-awesome-postgresql-9-4-sql2003-filter-clause-for-aggregate-functions/

I'm using this, and WITHIN GROUP as well, to build up elaborated reports. Currently I'm using literal SQL, but have started something here, but any help or advice would be nice.

matthewd commented 6 years ago

Per #523, Arel development is moving to rails/rails.

If this issue is still relevant, please consider reopening it over there. (Note that the Rails repository does not accept feature request issues, and requires reproduction steps that rely on Active Record's documented API.)

snkashis commented 5 years ago

@crashtech , @Envek, any plans to replicate this in https://github.com/rails/rails? Seems really useful.

crashtech commented 5 years ago

@snkashis I developed a GEM for PostgreSQL, which I have plans to add this feature over there.

snkashis commented 5 years ago

@crashtech you’re referring to https://github.com/crashtech/torque-postgresql ?

crashtech commented 5 years ago

@snkashis yes