We have a lot of articles about how to do but most of the time it is too much information.
This article tries to answer 2 questions!
How can we create XML column from a SQL query?
How can we create a table from XML column?
This example use NorthWind database: