A similar result can be obtained using subquery in the SELECT cause but not exactly same. I still don't know why this doesn't get me the same output