query-0f9e2b8eea46b1c147a648c9190bddb3

rq turtle/ttl

Properties and values from single item with qualifiers

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?wdLabel ?ps_Label ?wdpqLabel ?pq_Label {
  VALUES (?company) {(wd:Q95)}

  ?company ?p ?statement .
  ?statement ?ps ?ps_ .

  ?wd wikibase:claim ?p.
  ?wd wikibase:statementProperty ?ps.

  OPTIONAL {
  ?statement ?pq ?pq_ .
  ?wdpq wikibase:qualifier ?pq .
  }

  SERVICE wikibase:label { bd:serviceParam wikibase:language "en" }
} ORDER BY ?wd ?statement ?ps_

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v4("?company") v5("?p") v7("?pq") v8("?pq_") v6("?ps") v3("?ps_") v2("?statement") v1("?wd") v9("?wdpq") c5(["bd:serviceParam"]):::iri c7(["en"]):::literal bind0[/VALUES ?company/] bind0-->v4 bind00(["wd:Q95"]) bind00 --> bind0 v4 -->v5--> v2 v2 -->v6--> v3 v1 --"wikibase:claim"--> v5 v1 --"wikibase:statementProperty"--> v6 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v2 -->v7--> v8 v9 -."wikibase:qualifier".-> v7 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c5 --"wikibase:language"--> c7 end