PIVOT XML is an Operator in Oracle Database
The PIVOT operator takes data in separate rows, aggregates it and converts it into columns.
Adding the XML keyword to the PIVOT operator allows us to convert the generated pivot results to XML format. It also makes the PIVOT a little more flexible, allowing us to replace the hard coded IN clause with a subquery, or the ANY wildcard.