query-e95180c9fa369c754413a0227a22ab2d
German submarines in WW IIBattle of the Atlantic statistics in war reports and post war surveys. Stats such as number of patrols, merchants sunk, and submarines sunk. Group by month. Count
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 ?sub ?subLabel ?timeSink ?timeScuttle
{
# instance of submarine
?sub wdt:P31/wdt:P279* wd:Q2811 .
# ?sub wdt:P607 wd:Q184425 .
# conflict is WW II
?sub wdt:P607 wd:Q362 .
# operator is Kriegsmarine
?sub wdt:P137 wd:Q151701 .
optional {
# significant event is sinking
# ?sub wdt:P793 wd:Q30880545 .
?sub p:P793 ?stmtSignificant .
?stmtSignificant ps:P793 wd:Q30880545 .
?stmtSignificant pq:P585 ?timeSink .
}
optional {
# significant event is scuttling
# ?sub wdt:P793 wd:Q1786766 .
?sub p:P793 ?stmtSignificant .
?stmtSignificant ps:P793 wd:Q1786766 .
?stmtSignificant pq:P585 ?timeScuttle .
}
SERVICE wikibase:label {
bd:serviceParam wikibase:language "en" .
}
} ORDER BY ?timeSink
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?stmtSignificant")
v2("?sub"):::projected
v4("?timeScuttle"):::projected
v1("?timeSink"):::projected
a1((" "))
c3(["wd:Q2811"]):::iri
c7(["wd:Q151701"]):::iri
c16(["en"]):::literal
c10(["wd:Q30880545"]):::iri
c14(["bd:serviceParam"]):::iri
c12(["wd:Q1786766"]):::iri
c5(["wd:Q362"]):::iri
v2 --"p:direct/P31"--> a1
a1 --"p:direct/P279"--> c3
v2 --"p:direct/P607"--> c5
v2 --"p:direct/P137"--> c7
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v2 -."p:P793".-> v3
v3 --"p:statement/P793"--> c10
v3 --"p:qualifier/P585"--> v1
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v2 -."p:P793".-> v3
v3 --"p:statement/P793"--> c12
v3 --"p:qualifier/P585"--> v4
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c14 --"wikibase:language"--> c16
end