[redland-dev] order by on dates
Danny Ayers
danny.ayers at gmail.com
Mon Jun 6 21:45:58 BST 2005
Looking at the spec and the latest Rasqal release notes, I get the
impression I should be able to get results in reverse-chrono order
doing a SELECT with ORDER BY DESC[?date],
where date is a literal, (W3CDTF or whatever they're called nowadays).
Only it doesn't seem to be working for me. Very likely I'm missing
something obvious ;-)
Full query below. There's a live form with some data behind it at:
http://pragmatron.org/html-static/test-query.html
Cheers,
Danny.
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX dc: <http://purl.org/dc/elements/1.1/>
PREFIX rss: <http://purl.org/rss/1.0/>
PREFIX content: <http://purl.org/rss/1.0/modules/content/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX sqs: <http://purl.org/stuff/sqs/>
SELECT ?name, ?homepage, ?date, ?item, ?title, ?content WHERE
{
?homepage rdfs:seeAlso ?channel .
?channel rdf:type rss:channel .
?channel rss:title ?name .
?channel rss:items ?x .
?x ?y ?item .
?item rdf:type rss:item .
?item rss:title ?title .
?item dc:date ?date .
?item sqs:content ?content .
?item dc:date ?date .
}
ORDER BY DESC[?date]
LIMIT 10
--
http://dannyayers.com
More information about the redland-dev
mailing list