W3C home > Mailing lists > Public > public-rdf-dawg@w3.org > July to September 2010

limit per resource rethought...

From: Axel Polleres <axel.polleres@deri.org>
Date: Wed, 11 Aug 2010 10:56:45 +0100
Message-Id: <F0663892-BAE7-4947-84F2-4BF1EA1239B3@deri.org>
To: SPARQL Working Group <public-rdf-dawg@w3.org>
Hi all again,

in the course of my last mail, I also thought about adding another example:

E)  "Give me all persons and the first 3 (alphabetically by name) of their friends"

but I couldn't find any way to write this in an intuitive manner... ideas anyone? 
I am afraid, that - by the scoping we have imposed for subqueries - that one might be difficult/impossible? 

The following naive writing  does't work obviously:

  { ?P a :Person . 
    {SELECT ?P ?F { ?P :knows ?F . ?F name ?N } ORDER BY ?N LIMIT 3 }

I also think I recall that we had this discussion already some time back in some other form,
but I can't recall the outcome :-| 

Anyone to help?

Received on Wednesday, 11 August 2010 09:57:14 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:01:01 UTC