Lucas_Werkmeister_WMDE added a comment.

Once it’s working, here’s a query for battles within 100km around you (historical ones, hopefully!):

# Battles around you
#defaultView:Map
SELECT ?battle ?battleLabel ?location ?year WHERE {
  ?battle wdt:P31 wd:Q178561.
  SERVICE wikibase:around {
    ?battle wdt:P625 ?location.
    bd:serviceParam wikibase:center "[AUTO_COORDINATES]";
                    wikibase:radius "100";
                    wikibase:distance ?dist.
  }
  OPTIONAL { ?battle wdt:P580 ?startTime. }
  OPTIONAL { ?battle wdt:P585 ?pointInTime. }
  OPTIONAL { ?battle wdt:P582 ?endTime. }
  BIND(COALESCE(?startTime, ?pointInTime, ?endTime) AS ?date)
  BIND(YEAR(?date) AS ?year)
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}

TASK DETAIL
https://phabricator.wikimedia.org/T192822

EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Jonas, Lucas_Werkmeister_WMDE
Cc: Lucas_Werkmeister_WMDE, Lea_Lacroix_WMDE, gerritbot, Jonas, Aklapper, Versusxo, Majesticalreaper22, Giuliamocci, Adrian1985, Cpaulf30, Lahi, Gq86, Baloch007, Darkminds3113, Bsandipan, Lordiis, GoranSMilovanovic, Adik2382, Th3d3v1ls, Ramalepe, Liugev6, QZanden, EBjune, merbst, LawExplorer, Lewizho99, Maathavan, Xmlizer, jkroll, Smalyshev, Wikidata-bugs, Jdouglas, aude, Tobias1984, Manybubbles, Lydia_Pintscher, Mbch331
_______________________________________________
Wikidata-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs

Reply via email to