I don't know your complete requirements, but shouldn't you be showing a lot less rows (just one per cart)? If you just want to list the Carts with Maintenance, you should avoid the inner join and try something like IN or EXISTS. If you don't care to show Carts even if a Cart doesn't have Maintenance, then you don't even need that.
The sort is explicitly defined by the order by in your query when you build your comma separated value.
The sort is not the problem, as you need it (and if you don't, just remove it).
Someone else might be able to go further with advices on DDL, but these are my 2 cents. 😉