I have a rails model called UserScore which has user_id and computed_date.
It has records like
user_id computed_date
1 2012-01-11
1 2012-01-10
2 2012-01-04
3 2012-01-06
1 2012-01-13
I want just the most recent (single) score for all users in the table. The dates for scoring are not all the same, so some users may not have been scored for weeks, others were scored yesterday..
I know I could just get them all and loop through, but this table has 20m records, looking for a way to leverage sql finder to narrow it down for me.
thanks
Joel
I don’t have rails 2.3 handy to test, but the following should work.