How to get this o/p from the sql query

Printable View