We can use this function to combine multiple rows into single one. Generally to create comma separated list for each unique item. So this can create comma separated product list for any given category.
The same can be used to make a list of items in a given order.
A short but interesting article, the author has figured out a way to create a PDF from a stored procedure without using a third party library.