Hello Houda In fresh versions of Virtuoso, you can use sql:SAMPLE() as a temporary workaround for missing SAMPLE (). SPARQL 1.1 will be supported rather sooner than later, we hope we can make it one of two implementations required by W3C policy for CR status of the spec.
Best Regards, Ivan Mikhailov OpenLink Software http://virtuoso.openlinksw.com On Tue, 2011-08-02 at 15:01 +0200, Houda kr wrote: > Hi, > > I need to know how to return one random label (for each item) when > the item has several labels (using SPARQL). I tried the following > query, but it returns the same label for all persons > > SELECT ?person ?name WHERE { > ?person a foaf:Agent . > { SELECT ?name WHERE { > ?person rdfs:label ?name > } LIMIT 1 } . > } > > Same behavior on DBpedia SPARQL endpoint (see > http://answers.semanticweb.com/questions/2726/using-sample-keyword-and-subqueries-at-dbpediaorg). > I need to understand why this query doesn't work since the second query > should retrieve the first name for each resource from the first query. > > I am trying to use the SAMPLE keyword (SPARQL 1.1), but it is not > supported by the current version of Virtuoso. I want to know when the > SPARQL 1.1 will be fully integrated in the open source distribution. > Any other suggestion is welcome. > > > thanks in advance > Houda
