OQL - Sub SELECT statements in SELECT?!

  Hi all,  I have a dynamic excel export where I build as many columns as required, but when looking at the OQL it creates, I am not able to pick the right cell under the relevant header.   SELECT RowAnswer as RowAnswer0, RowAnswer as RowAnswer1   FROM "Reporting"."HeaderItem" AS headerItem     INNER JOIN headerItem/"Reporting"."RowItem_HeaderItem"/"Reporting"."RowItem" AS rowItem    INNER JOIN "headerItem"/"Reporting"."HeaderItem_Report"/"Reporting"."Report" AS refobject    ON refobject/ID = 40250921669626909    WHERE headerItem.ColNo = 1 ; This results in a table like this for example (where all rows have the same result since there is only one where clause pointing to the one header only): Vendor       Status Docusign     Docusign Workshare   Workshare FlipLet          FlipLet HighQ           HighQ   What is the best way to achieve a SELECT where the each column will have a where clause, e.g. RowAnswer0 where headerItem.ColNo = 1, RowAnswer0 where headerItem.ColNo = 2, and so on, so I end up with a result like the one below: Vendor       Status Docusign     In Progress Workshare   To Start FlipLet          In Progress HighQ           Completed   I have tried a number of options but back to square one as none worked. The model. The RowItem_Report was not intended, but it was one way to get some of the output as required
1 answers

Don’t know about Dynamic Excel Export, but I do know that OQL does allow subqueries. For instance:

SELECT FirstName FROM Sales.Customer WHERE Name in (SELECT Name FROM Sales.Customer WHERE Name LIKE 'B%')

See the example "Where in(subquery)” on https://mydemoversion8-sandbox.mxapps.io/p/OQL