Just put your entire query into a subquery, and then add a pivot to sort out the UAE/NonUAE Male/Female So... Select * from ( ) then, for the "2nd" pivot, add Pivot ( )
↧