You can't. The value of properties such as GeoNames are literally not
in the database.
Very roughly speaking - Wikidata uses mediawiki to store json blobs
describing data. The actual data being stored is not exposed to the
MediaWiki database. The idea instead is that people would export this
data and use a specialized graph database to query it, such as
The closest you can get is:
select pl_from 'page id', page_title 'Q id' from pagelinks inner join
page on page_id = pl_from where pl_namespace =120 and pl_title =
'P1566' limit 20;
Which will give you a list of pages that have the P1566 property (or
otherwise link to it).
On Wed, Mar 14, 2018 at 1:45 AM, Huji Lee <huji.h...@gmail.com> wrote:
> I asked this on the Cloud mailing list and got some useful advice but am
> still looking for a better answer. Apologies for cross-posting.
> Take  as an example. We see that in this page, the entity Q2113430 has a
> property called GeoNames ID (property P1566) and that property has a value
> of 18918. *Where can I find the link *between Q2113430 <--> P1566 <-->
> 18918 *in the database?* (Not through the API, but via a direct SQL query
> on the database)
> The idea is to get a list of all these triads to use for some investigation
> needed for .
> Thanks in advance,
>  https://lists.wikimedia.org/pipermail/cloud/2018-March/000244.html
>  https://www.wikidata.org/wiki/Q2113430
>  https://phabricator.wikimedia.org/T174553
> MediaWiki-l mailing list
> To unsubscribe, go to:
MediaWiki-l mailing list
To unsubscribe, go to: