Re: GROUP_CONCAT

On 20 Oct 2009, at 18:54, Steve Harris wrote:
> data:
>
> <> :a "foo", "bar", "baz" .
>
> query:
>
> SELECT GROUP_CONCAT(?y, "|") AS ?cat
> WHERE {
>   ?x :a ?y .
> } ORDER BY ?y GROUP BY ?x
>
> results:
>
> ?cat = "bar|baz|foo"

This might not be correct, maybe ORDER BY ?x, ?y GROUP BY ?x or GROUP  
BY ?x ORDER BY ?y or some other combination.

I don't think we have a formal definition that covers this yet, and I  
forget what SQL does offhand.

- Steve

-- 
Steve Harris
Garlik Limited, 2 Sheen Road, Richmond, TW9 1AE, UK
+44(0)20 8973 2465  http://www.garlik.com/
Registered in England and Wales 535 7233 VAT # 849 0517 11
Registered office: Thames House, Portsmouth Road, Esher, Surrey, KT10  
9AD

Received on Tuesday, 20 October 2009 18:12:22 UTC