Forum: Rails-ES hacer consulta con Group

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Alfredo G. (Guest)
on 2007-01-16 20:03
Holas

quiero hacer esta seleccion:
SELECT A,MAX(MY_DATE) GROUP BY A

en RoR como seria??

gracias
Jaime M. (Guest)
on 2007-01-17 03:18
values = MyModel.maximum(:my_date, :group => :a)


Espero te sirva
---
Jaime Mora R.
Alfredo G. (Guest)
on 2007-01-17 14:51
Jaime Mora R. wrote:
>
> values = MyModel.maximum(:my_date, :group => :a)
>
>
> Espero te sirva
> ---
> Jaime Mora R.

Para que version es esta funcion??

gracias
Jaime M. (Guest)
on 2007-01-17 17:17
Actualmente tengo la versión 1.1.6, hice la prueba y funcionó
correctamente.

Espero te sirva
---
Jaime Mora R.
This topic is locked and can not be replied to.