query-96068ac97520f6dbd7dc1fb64f961b32

rq turtle/ttl

List of identifiers for items with a given type of identifier 20:25, 14 November 2017 (UTC)) talk (MartinPoulter, but couldn't get it to work: I suppose I'm not clear on the different ways to address a property. Thanks in advance, this example. I tried to adapt (Q19595382)Wikidata property for authority control for people (P31)instance of ) then the value of that identifier. The property would have to be (P214)VIAF ID authority identifiers of those items. The result would have three columns: first the item, then the name of a type of identifier (e.g. other. I want a query that gives me all the (P497)CBDB ID Take all items with a

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX p: <http://www.wikidata.org/prop/>
SELECT ?item ?identifier ?value WHERE {
   {
  SELECT DISTINCT ?item WHERE {
    ?item p:P497 []
  }
}.
  ?identifier wikibase:propertyType wikibase:ExternalId; wikibase:claim ?p; wikibase:statementProperty ?ps; wdt:P31/wdt:P279* wd:Q19595382 .
  ?item ?p [ ?ps ?value ] .
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v2("?identifier"):::projected v1("?item"):::projected v3("?p") v4("?ps") v5("?value"):::projected a1((" ")) a2((" ")) a3((" ")) c8(["wd:Q19595382"]):::iri c3(["wikibase:ExternalId"]):::iri v1 --"p:P497"--> a1 v2 --"wikibase:propertyType"--> c3 v2 --"wikibase:claim"--> v3 v2 --"wikibase:statementProperty"--> v4 v2 --"p:direct/P31"--> a2 a2 --"p:direct/P279"--> c8 a3 -->v4--> v5 v1 -->v3--> a3