I don't understand why this SPARQL queries produce duplicates:

SELECT DISTINCT ?WikidataItem ?itemLabel
  ?WikidataItem rdfs:label ?itemLabel. 
  ?WikidataItem ?label "Mozilla Firefox"@en.  

Try it here.

Is it producing a row of output in every language? How can I change my query in order for it to produce only the single result in English?


I'm still confused about how to solve my problem, since I perhaps oversimplified my example. I actually am using FILTER(CONTAINS(LCASE(?itemLabel), "firefox"@en)) among other things to limit my query. How do I output only the English language label for each entry?

  • Do you need just FILTER(lang(?itemLabel)='en')? Feb 27, 2019 at 18:24

1 Answer 1


Is it producing a row of output in every language?

Yes, you're correct: ?itemLabel match labels in all languages.

Try simply SELECT * {?item rdfs:label "Mozilla Firefox"@en}.

If you want to project a variable, use VALUES:

SELECT * {VALUES (?label) {("Mozilla Firefox"@en)} ?item rdfs:label ?label}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.