query-f64feae62bdbc458e0e5b912c40bb39f

rq turtle/ttl

Propertiesemployer (P108)start time (P580)end time (P582)

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?person ?personLabel ?employer ?employerLabel ?startTime ?endTime
WHERE {
  VALUES ?employer {
    wd:Q49115
  }
  ?person p:P108 ?statement.
  ?statement ps:P108 ?employer.
  OPTIONAL {?statement pq:P580 ?startTime}
  OPTIONAL {?statement pq:P582 ?endTime}

  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY DESC(?startTime)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v2("?employer"):::projected v5("?endTime"):::projected v3("?person"):::projected v1("?startTime"):::projected v4("?statement") c6(["bd:serviceParam"]):::iri c8(["#91;AUTO_LANGUAGE#93;,en"]):::literal bind0[/VALUES ?employer/] bind0-->v2 bind00(["wd:Q49115"]) bind00 --> bind0 v3 --"p:P108"--> v4 v4 --"p:statement/P108"--> v2 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v4 -."p:qualifier/P580".-> v1 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v4 -."p:qualifier/P582".-> v5 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c6 --"wikibase:language"--> c8 end