W3C home > Mailing lists > Public > public-rdf-dawg@w3.org > October to December 2009

Re: GROUP_CONCAT

From: Steve Harris <steve.harris@garlik.com>
Date: Tue, 20 Oct 2009 19:11:51 +0100
Message-Id: <F5E59AFE-9481-46D3-965B-F5BFF078B824@garlik.com>
To: "public-rdf-dawg@w3.org Group" <public-rdf-dawg@w3.org>
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 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 16:15:40 GMT