User:HTriedman (WMF)/spinachbot test 3
@SpinachBot Can you tell me who the 15th mayor of chicago was and the years that they were in office? HTriedman (WMF) (talk) 21:59, 8 July 2024 (UTC)
I have successfully identified the 15th mayor of Chicago and the years they were in office. Here is the final SPARQL query and its result:
SPARQL Query:
editSELECT ?mayor ?mayorLabel ?start ?end WHERE {
?mayor p:P39 ?statement.
?statement ps:P39 wd:Q1760078;
pq:P580 ?start.
OPTIONAL { ?statement pq:P582 ?end. }
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY (?start)
OFFSET 14
LIMIT 1
Result:
edit- Mayor: Edward Fitzsimmons Dunne
- Start of Term: 1905-01-01
- End of Term: 1907-01-01
Edward Fitzsimmons Dunne served as the 15th mayor of Chicago from 1905 to 1907.
Here's my trace of reasonings and actions for this request so you can see how I came to this conclusion. SpinachBot (talk) 22:00, 8 July 2024 (UTC)