I want to get all military operations that are part of (P361) WW2, I don't get, e.g., Case Blue, because it is only a part of the Soviet German War but not part of WW2, but the Soviet German War itself is part of WW2. So what do I need to do to the statement to get also all "children" of all ww2 campaigns like Case Blue and ideally also the subsequent battles of those campaigns?
Query:
SELECT ?label WHERE {
?subj wdt:P361 wd:Q362.
?subj (wdt:P31/wdt:P279*) wd:Q831663.
?subj rdfs:label ?label.
FILTER((LANG(?label)) = "en")
}
EDIT - I think I found an improvement, but not really sure if is correct and it also feels a bit like a "hack", especially the distinct.
SELECT DISTINCT ?label WHERE {
?campaign wdt:P361 wd:Q362.
?campaign (wdt:P31/wdt:P279*) wd:Q198.
?battle wdt:P361*/wdt:P279* ?campaign.
?battle rdfs:label ?label.
FILTER((LANG(?label)) = "en")
}
Case Blue: https://www.wikidata.org/wiki/Q158287
German-Sovetic War: https://www.wikidata.org/wiki/Q189266