Re: Reporting by family tree

From: swastik Gurung <gurung_swastik(at)yahoo(dot)com>
To: "pgsql-novice(at)lists(dot)postgresql(dot)org" <pgsql-novice(at)lists(dot)postgresql(dot)org>, Ibrahim Shaame <ishaame(at)gmail(dot)com>
Subject: Re: Reporting by family tree
Date: 2023-10-05 13:15:07
Message-ID: 1901532185.8873313.1696511707263@mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

I suppose you ought to be using, recursive CTE queries
Documentation can be found at: 7.8. WITH Queries (Common Table Expressions)

|
|
|
| | |

|

|
|
| |
7.8. WITH Queries (Common Table Expressions)

7.8. WITH Queries (Common Table Expressions) # 7.8.1. SELECT in WITH 7.8.2. Recursive Queries 7.8.3. Common Tabl...
|

|

|

On Thursday, 5 October 2023 at 16:44:46 GMT+5:45, Ibrahim Shaame <ishaame(at)gmail(dot)com> wrote:


I have a table of members of alarge family extendending back to eight generations. The currentmembers contribute a monthly amount to the family fund. Only truedescendants are included in the family list, no wives, no husbands.There are two tables

1- Names with the following fields: idno (unique) --family member

parentid -- id number of the parent who connected the child to the family

etc

etc

2– Contributions with fields: idno

etc

etc

NowI want to report Names and contributions par family tree: My ideal isto list grandfather, father, children based on the two fields (id,parentid).

Any suggestions?

Thanks in advance

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Ibrahim Shaame 2023-10-05 14:48:56 Re: Reporting by family tree
Previous Message Ibrahim Shaame 2023-10-05 10:58:55 Reporting by family tree