Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicate results for predicate queries #361

Closed
hannahbast opened this issue Nov 16, 2020 · 1 comment
Closed

Duplicate results for predicate queries #361

hannahbast opened this issue Nov 16, 2020 · 1 comment

Comments

@hannahbast
Copy link
Member

The following query (all cities, restricted to Shanghai) gives two identical rows. Shouldn't it be only one row? Confusingly, on https://query.wikidata.org the query gives four identical rows.

PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
SELECT ?x WHERE {
  VALUES ?x { wd:Q8686 }
  ?x wdt:P31/wdt:P279* wd:Q515 . 
}
@hannahbast
Copy link
Member Author

The result is correct: There are two paths leading to wd:Q515. One via wd:Q1066538 ("National Central City") and one via wdt:P31 without using wdt:P279. The wdt:P279* alone should produce no duplicates (and there is no evidence that it does).

So all fine, just confusing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant