thank you Lucas and Stas, this works for me.

so it would be fair to say that p:P39 by-passes the semantics of
wdt:P39 with ranking*. for my own understanding why is a wdt property
called a direct property**?

* https://www.wikidata.org/wiki/Help:Ranking
**https://www.mediawiki.org/wiki/Wikidata_query_service/User_Manual#Basics_-_Understanding_Prefixes

On Tue, Oct 3, 2017 at 7:24 PM, Stas Malyshev <[email protected]> wrote:
> Hi!
>
> On 10/3/17 4:02 PM, Marco Neumann wrote:
>> why doesn't the following query produce
>> http://www.wikidata.org/entity/Q17905 in the result set?
>
> The query asks for wdt:P39 wd:Q1939555, however current preferred value
> for P39 there is Q29576752. When the item has preferred value, only this
> value shows up in wdt. If you want all values, use something like:
>
> https://query.wikidata.org/#SELECT%20%3FMdB%20%3FMdBLabel%20WHERE%20%7B%0ASERVICE%20wikibase%3Alabel%20%7B%20bd%3AserviceParam%20wikibase%3Alanguage%20%22%5BAUTO_LANGUAGE%5D%2Cen%22.%20%7D%0A%3FMdB%20p%3AP39%20%3FxRefNode.%20%0A%3FxRefNode%20pq%3AP2937%20wd%3AQ30579723%3B%0A%20%20%20ps%3AP39%20wd%3AQ1939555.%0A%7D
>
> Or change "preferred" status on Q17905:P39.
>
> --
> Stas Malyshev
> [email protected]



-- 


---
Marco Neumann
KONA

_______________________________________________
Wikidata-tech mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikidata-tech

Reply via email to