Is it possible to get claims made in Wikidata using the SQL interface to the replicas of the production databases run by Wikimedia Labs (https://wikitech.wikimedia.org/wiki/Help:Tool_Labs/Database)?
I see on http://quarry.wmflabs.org/ (a service to "Run SQL queries against Wikipedia & other databases from your browser!") queries involving the wikidatawiki_p database -- e.g., http://quarry.wmflabs.org/query/3152. But I've not been able to find queries that pull out values for Wikidata claims.
To provide a concrete example, can one write a SQL query on the Wikimedia databases to return claims about the population of Alameda County, California (https://www.wikidata.org/wiki/Q107146), which was specifically, 1,510,271 in the 2010 census?
P1082 (https://www.wikidata.org/wiki/Property:P1082) is the population properly. In https://www.wikidata.org/wiki/Special:EntityData/Q107146.json, we see the following json fragment:
P1082: [ { id: "Q107146$8938463B-C469-4162-80F7-96DDDE1429DD", mainsnak: { snaktype: "value", property: "P1082", datatype: "quantity", datavalue: { value: { amount: "+1510271", unit: "1", upperBound: "+1510271", lowerBound: "+1510271" }, type: "quantity" } } ... } ] },
I've looked through the tables in wikidatawiki_p but can't find any table that has the claim data.
So I suspect the answer is no -- that although there's lot of metadata about Wikidata available to SQL queries on the replicas. (SQL not mentioned in https://www.wikidata.org/wiki/Wikidata:Data_access). Is this correct?
Thanks, -Raymond