Ive got a table 'don开发者_如何学JAVAations' 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
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?
精彩评论