Hi Experts,
Please note, this is related to Oracle cloud, but I hope I can post this here as it is related to creation of sql query.
We have a table which has data of Hierarchy details table as below (please note it actually a query which is on Dimension Tables)

And we have also another table which has NPI Items table as below(This is also not a simple table query, but based on multiple table joinings if NPI Items are defined)

Now, first table query has to be modified in a way that it should show only the details which has items in second NPI Items query.
Example: ‘D313025GX03 - GDRV’ is item which is available in first Hierarchy Details table and also in NPI Items table. So, first 3 records has to be shown in output. As ‘ABC Item’ is not available in NPI Items table, the next 3 records should not be shown in Hierarchy Details table. So, final report has to be shown in below way.

Can anyone please help me on how to achieve this.
Thanks in Advance,
Bommi