0

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

Maurice Kroon
  • 959
  • 4
  • 13
  • 29

1 Answers1

0

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 > How do I (or can I) SELECT DISTINCT on multiple columns?

Community
  • 1
  • 1
Maurice Kroon
  • 959
  • 4
  • 13
  • 29