We have three different types Direct, Indirect and Others. Where Indirect and Others are fixed values and Direct types are dynamic which are getting from ECC.
So they are expecting heading before each type and result according to these types.
Tried so many options but not able to achieve the desired result as expected in Query Designer.
Please find the attached document for desired output