views:

15

answers:

1

Hi,

Ive got a table 'donations' which is filled (by users) on a daily basis. I would like to create a graph that shows the cumulative number of donations per day.

So,

table donations:
id  created_at
1   19/01 
2   20/01
3   20/01
4   21/01

Should become:

[1,3,4]

How to do this with rails3&postgresql? Thanks in advance

A: 

So its actually quite easy..

simply select "DISTINCT"... ok, this was a n00b question, figured it out! for the people that want to know more > http://stackoverflow.com/questions/54418/how-do-i-or-can-i-select-distinct-on-multiple-columns-postgresql

Maurice Kroon