The following query returns duplicate rows:
SELECT DISTINCT ?s ?l
WHERE {
?s wdt:P31 wd:Q19829914 ;
rdfs:label ?l .
FILTER(langMatches(lang(?l), "en"))
}
The following query returns duplicate rows:
SELECT DISTINCT ?s ?l
WHERE {
?s wdt:P31 wd:Q19829914 ;
rdfs:label ?l .
FILTER(langMatches(lang(?l), "en"))
}
I am not familiar with "langMatches". Is there an error? This seems to be working:
SELECT DISTINCT ?property ?label WHERE { ?property wdt:P31 wd:Q19829914 ; rdfs:label ?label . FILTER(LANG(?label) = "en") }
In the original query you select all languages variants.
LangMatches will match american english and UK-english variants, who are both present in Wikidata sometimes, with "en". And are technically different labels values as far as sparql is concerned because of the different language tag.
So you end-up having duplicates. To remove them you might remove the language tag with something like replacing "?l" with "(str(?l) as ?label)"