vendredi 27 octobre 2017

How do I deal with multiple predicates?

My goal is to write a SPARQL query to determine all the smartphone units whose operating system (s:OS) is Android and whose price is less than 400.

Its confusing because in turtle format, there are multiple predicates. There is s:OS but also rdf:type. Which do I use? I have the following but I'm unsure about its accuracy:

SELECT ?phone
WHERE {
?phone s:OS|rdf:type ?OS .
?OS rdfs:subClassOf s:Android .

?phone s:price ?price .
FILTER (?price < 400) .
}




Aucun commentaire:

Enregistrer un commentaire