There's no way to do it, as far as I've ever been able to figure out. At Cambridge Semantics, we've played with several designs of extensions to support it, but have had trouble getting the semantics right. We've hacked around it by extending GROUP_CONCAT to support ordering and limiting, but that's pretty inelegant as well. We also needed to add capabilities to include terms' serializations in what's concatenated in GROUP_CONCAT, rather than just stringified values. So it's been a lot of work for something that feels like it ought to be easier.
I'd be thrilled if someone had a better way to do it.
I've also been unable to find an elegant way to do it in SQL, which is little but cold comfort.