In your second queries, the difference relates to a combination of ?prop ?title and ?example . Therefore, you do not get duplicates, for example, for the following two lines received in the second query:
dbpedia2:subunitName "subunit name "@en "cent"@en dbpedia2:subunitName "subunit name "@en "centavo"@en
they are not duplicated because the third line ?example has two different meanings "cent"@en and "centavo"@en
One possible way to solve this is to use GROUP BY and MIN to get only the lowest ranked value for ?label and ?example , ie:
SELECT ?prop MIN(?title) MIN(?example) WHERE { ?thing ?prop ?example. ?thing a <http://dbpedia.org/ontology/Currency>. ?prop rdf:type rdf:Property. ?prop rdfs:label ?title. } GROUP BY ?prop
Manuel salvadores
source share