![enter image description here](https://i.stack.imgur.com/rV3w8.png)

I think for this kind of result I have to use union
but the problem is that I dont know the number of columns.That's why I will not be able to use Union.