Hi Power Automate community,
I'm trying to recreate a SQL query in Power Automate that lists employees with their manager information any (INNER JOIN OR LEFT JOIN style). Here's my SQL logic:
SELECT
e.EMPLOYEE_ID,
e.FIRST_NAME AS EMPLOYEE_FIRST_NAME,
e.LAST_NAME AS EMPLOYEE_LAST_NAME,
e.MANAGER_ID,
m.FIRST_NAME AS MANAGER_FIRST_NAME,
m.LAST_NAME AS MANAGER_LAST_NAME
FROM employees e
JOIN employees m ON e.MANAGER_ID = m.EMPLOYEE_ID --LEFT JOIN employees m ON e.MANAGER_ID = m.EMPLOYEE_ID
NEED my result with power automate like this:

My setup:
Specific challenges:
How to properly handle cases where MANAGER_ID is null
Best practice for structuring the output
What I've tried:
Filter array approaches
Nested "Get item" calls
Tried Parse JSON but struggling with the syntax
Can anyone share:
A complete flow example for this JOIN pattern?
Optimization tips for 500+ records?
How to properly specify columns to avoid errors?
Thanks in advance for any guidance!