- From: Paul Gearon <gearon@ieee.org>
- Date: Tue, 2 Nov 2010 20:46:38 -0400
- To: Steve Harris <steve.harris@garlik.com>
- Cc: Lee Feigenbaum <lee@thefigtrees.net>, SPARQL Working Group <public-rdf-dawg@w3.org>
On Tue, Nov 2, 2010 at 6:25 PM, Steve Harris <steve.harris@garlik.com> wrote: > It's not in XPath (as far as I can tell), but I'd like a RAND() function, it's incredibly useful, e.g. > > SELECT ?s WHERE { ?s a <Foo> } ORDER BY RAND() LIMIT 10 > > SQL's RAND() returns a floating point number between 0 and 1, which works fine. You can also pass it a constant seed value as an argument, but that always struck me as a bit of a strange way of doing it. Random seeds are useful for unit tests. You get essentially random, but deterministic, results. Paul
Received on Wednesday, 3 November 2010 00:47:12 UTC