query-0efdd269f9de9f50670c72f5562ad234
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
- https://query.wikidata.org/sparql
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' }
}