Re: Reporting by family tree - Mailing list pgsql-novice

From David G. Johnston
Subject Re: Reporting by family tree
Date
Msg-id CAKFQuwYn6MfTyjpDraVqW7TfnCh2Q3-DvfEYHz+vifXvzpr_FA@mail.gmail.com
Whole thread Raw
In response to Re: Reporting by family tree  (Ibrahim Shaame <ishaame@gmail.com>)
Responses Re: Reporting by family tree  (swastik Gurung <gurung_swastik@yahoo.com>)
List pgsql-novice
On Monday, October 16, 2023, Ibrahim Shaame <ishaame@gmail.com> wrote:
Thanks David for the reply. But I think you missed part of the code, which refers to ukoo:
)
 
SELECT  g.jina AS jina_la_mtoto,
        g.baba AS baba_wa_mtoto,
        g.babu AS babu_wa_mtoto,
        g.namba,
        mzazi.jina AS jina_la_mzazi,
        mzazi.baba AS jina_la_baba_la_mzazi,
        g.daraja
FROM ukoo g
JOIN majina2 mzazi
ON g.namba = mzazi.namba
ORDER BY g.namba;

Any suggestion?

That part of the query is outside the CTE and thus doesn’t impact the CTE’s results.  The part of the query that needs to be self-referencing is the subquery inside the CTE under the Union All.

David J.
 

pgsql-novice by date:

Previous
From: Ibrahim Shaame
Date:
Subject: Re: Reporting by family tree
Next
From: swastik Gurung
Date:
Subject: Re: Reporting by family tree