Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • As always your version of Postgres, please. And the name is PostgreSQL or Postgres for short. Never "Postgre". Commented Feb 26, 2015 at 4:10
  • When you write grouping them all together, do you mean all selected rows, so that you get a single row aggregating all counts? Your column "Row" is a bit confusing, that's just noise, right? And it's unclear where the column Source DA in the result comes from. Does not agree with the query you show. Commented Feb 26, 2015 at 4:27
  • EB: Yes, I mean aggregating all the rows and the count values into a single value. For example say there are ten rows (ten days) I just want the summation of those ten days sum(count(*)) as an example by bucket. Commented Feb 26, 2015 at 4:36
  • EB: "Row" is just just noise, but also highlights how I am getting two rows now, but really just want one single row with everything as a sum in each bucket. Commented Feb 26, 2015 at 4:36
  • EB: Sorry, Source DA should read: "SettlementPointPrice". Fixed. Commented Feb 26, 2015 at 4:38