query-0efdd269f9de9f50670c72f5562ad234

rq turtle/ttl

09:44, 9 June 2017 (UTC)) talk (MisterSynergy. If the data should be modeled differently, please let me know and I update this query. Have fun with your updates :-) —(Q16707842)Member of Parliament : (P39)position held comes from a qualifier of (P768)electoral district relations between the terms to exclude experienced MPs; however, their (P156)followed by /(P155)follows set and uses (Q29974940)57th Parliament of the United Kingdom (P463)member of This assumes that the MPs have 12:12, 9 June 2017 (UTC) Andy's edits; Talk to Andy); Pigsonthewing (Andy Mabbett = 8 June 2017? (P580)start time qualified with (Q16707842)Member of Parliament = (P39)position held : Thank you. AIUI, others are working on adding Q29974940, at an editathon. Meanwhile, I wonder if we'd have more luck using MisterSynergy@ This does not make that much of a difference:

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
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 ?item ?itemLabel ?itemDescription ?electoralDistrict ?website ?twitter ?image {
  ?item p:P39 ?positionStatement .
  ?positionStatement ps:P39 wd:Q16707842; pq:P580 ?startTime .
  FILTER(YEAR(?startTime) = 2017) .
  OPTIONAL {
    ?positionStatement pq:P768 ?electoralDistrict .
  }
  OPTIONAL {
    ?item wdt:P18 ?image .
  }
  OPTIONAL {
    ?item wdt:P856 ?website .
  }
  OPTIONAL {
    ?item wdt:P2002 ?twitter .
  }
  SERVICE wikibase:label { bd:serviceParam wikibase:language 'en' }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v4("?electoralDistrict"):::projected v5("?image"):::projected v2("?item"):::projected v3("?positionStatement") v1("?startTime") v7("?twitter"):::projected v6("?website"):::projected c4(["wd:Q16707842"]):::iri c13(["en"]):::literal c11(["bd:serviceParam"]):::iri f0[["year-from-dateTime(?startTime) = '2017^^xsd:integer'"]] f0 --> v1 v2 --"p:P39"--> v3 v3 --"p:statement/P39"--> c4 v3 --"p:qualifier/P580"--> v1 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v3 -."p:qualifier/P768".-> v4 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v2 -."p:direct/P18".-> v5 end subgraph optional2["(optional)"] style optional2 fill:#bbf,stroke-dasharray: 5 5; v2 -."p:direct/P856".-> v6 end subgraph optional3["(optional)"] style optional3 fill:#bbf,stroke-dasharray: 5 5; v2 -."p:direct/P2002".-> v7 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c11 --"wikibase:language"--> c13 end