Search code examples
rdfsparqlsemantic-webvirtuoso

SPARQL - Order By "duplicates"/"rename" property, why?


In my Virtuoso (07.00.3203) SPARQL endpoint: http://opendata.caceres.es/sparql

If I make this simple query:

select ?uri ?label ?itineraPaso
where {
?uri a om:Procesion.
?uri rdfs:label "Amor el jueves santo."@es .
?uri om:itineraPaso ?itineraPaso.
?itineraPaso rdfs:label ?label.
} order by (?label)

I get this output:

img1

It is like the labels of the different ?itineraPaso were the same (when I know that is not the case).

Then, if I try the same query without the "order by" clause:

select ?uri ?label ?itineraPaso
where {
?uri a om:Procesion.
?uri rdfs:label "Amor el jueves santo."@es .
?uri om:itineraPaso ?itineraPaso.
?itineraPaso rdfs:label ?label.
} 

It works as supposed: enter image description here

Do you know why is this happening? How can I order by label elegantly in the same query?

Thanks,

Jesús

EDIT: Sorry, but it seems that images don't work. You can simply click the links.


Solution

  • The virtuoso version is: 07.00.3203 .

    Funny enough I have tried the same example in an old virtuoso instance we have for testing (ver: 06.01.3127) and it works perfectly, so it must be a bug.

    For those who want to replicate the bug, the triples are the following:

    https://mega.co.nz/#!QldDySoD!vCnGqlYFCA5-jyMzq3GuRH39Kb2nMiUARG752G1pfAs