Re: Stuck Up In My Category Tree - Mailing list pgsql-novice

From Don Parris
Subject Re: Stuck Up In My Category Tree
Date
Msg-id CAJ-7yokYm4N+mXAa-V0-gBTQt+nOzAuOqmSh6wcKVZDRW_ZP9w@mail.gmail.com
Whole thread Raw
In response to Re: Stuck Up In My Category Tree  (Don Parris <parrisdc@gmail.com>)
Responses Re: Stuck Up In My Category Tree  (Brent Dombrowski <brent.dombrowski@gmail.com>)
List pgsql-novice
On Wed, Aug 17, 2011 at 19:31, Don Parris <parrisdc@gmail.com> wrote:
On Wed, Aug 17, 2011 at 16:20, Don Parris <parrisdc@gmail.com> wrote:
On Wed, Aug 17, 2011 at 05:24, Chetan Suttraway <chetan.suttraway@enterprisedb.com> wrote:

Could you please post a self contained test case here?

Regards,
Chetan


Hi Chetan,

Thanks.  I will post something first chance I get - could be tomorrow morning though.

I've not made much progress to date, so still need the help.  :-(
 
I now have a work-around.  I have a view called amntby_cat that contains the sums by category, which I pull into a LibreOffice Calc sheet.  I then use a second sheet with a list of the top-level categories, and a series of formulas to sum all the sub-categories for each top-level category,

I am now curious as to how business accounting databases approach transaction categories?  If I am selling widgets to all 7 continents (as i learned them), I might have sales as follows:

Antartica - expeditioners love our widgets!
Europe
  Germany
    Berlin, Mainz
  England
    London
    Brighton
North America
  USA
    New York
    Atlanta
    LA
  Mexico
    Mexico City
etc... ad nauseum.

But I may only want to see sales by continent.

Or more closely related:
Sales
  Advertising
  Communications
Operations
  parts
  labor
  Equipment

But I May only want to see the figures summed up at the top-level. 

How is this issue approached in other cases?  Have I taken a bad approach to my category structure?  It appears to be a common approach to categories in general, but is there a solution that better fits my case?

Thanks,
Don
--
D.C. Parris, FMP, LEED AP O+M, ESL Certificate
Minister, Security/FM Coordinator, Free Software Advocate
GPG Key ID: F5E179BE

pgsql-novice by date:

Previous
From: "Jean-Yves F. Barbier"
Date:
Subject: Re: Invalid input syntax for integer
Next
From: Brent Dombrowski
Date:
Subject: Re: Stuck Up In My Category Tree