[Nepomuk] Complex SPARQL Query

Vishesh Handa me at vhanda.in
Fri Nov 30 05:10:05 UTC 2012


Hey guys

I'm trying to write a sparql query to list all the resources which have
more than 1 value for nao:lastModified (cause of buggy code).

I was trying - "select distinct ?r (select count(?m) where { ?r
nao:lastModified ?m . }) as ?mc where { ?r ?p ?o . FILTER( ?mc > 1 ) . }"

But virtuoso refuses to let me use the ?mc variable in the where clause. I
can do a - "select distinct ?r (select count(?m) where { ?r
nao:lastModified ?m . }) as ?mc where { ?r ?p ?o . } ORDER BY DESC(?mc)
LIMIT 10". Check the results, modify them, and re-run the query, but it's
terribly slow. Running this query takes over a minute.

Does anyone know of a simpler way of doing this?

-- 
Vishesh Handa
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/nepomuk/attachments/20121130/b1efd66a/attachment.html>


More information about the Nepomuk mailing list