Re: [SQL] Summing & Grouping in a Hierarchical Structure

2013-02-21 Thread Alexander Gataric
the WITH RECURSIVE clause, is even less so. I wonder if there is a good tutorial somewhere on this that shows some other examples? That might help me catch on a little better. I'll search for that today. On Thu, Feb 14, 2013 at 11:30 PM, Alexander Gataric wrote: I would try a r

Re: [SQL] Summing & Grouping in a Hierarchical Structure

2013-02-14 Thread Alexander Gataric
I would try a recursive query to determine the category structure and aggregate as you go. I had a similar problem with a hierarchical structure for an organization structure. Another thing you might try is to create a separate CTE for

[SQL] Re: [SQL] need some magic with generate_series()

2013-01-22 Thread Alexander Gataric
Create a CTE with the project code and starting month of the project. Left join to month series CTE. Sent from my smartphone - Reply message - From: "Andreas" To: "Alexander Gataric" Cc: "Filip RembiaƂkowski" , "jan zimmek" , Subject: [S

[SQL] Re: [SQL] need some magic with generate_series()

2013-01-22 Thread Alexander Gataric
I would create a common table expression with the series from Filip and left join to the table you need to report on. Sent from my smartphone - Reply message - From: "Andreas" To: "Filip RembiaƂkowski" Cc: "jan zimmek" , Subject: [SQL] need some magic with generate_series() Date: Tue,