query-96a1a46812752d96e9f7dc614609f466
UEFA Euro 2016 teams by goals
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 bd: <http://www.bigdata.com/rdf#>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX v: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
SELECT ?teamLabel (SUM(?score) AS ?goals) (COUNT(?score) AS ?games) WHERE {
?match wdt:P179 wd:Q189571 .
?match p:P1923 ?teamStatement . ?teamStatement v:P1923 ?team . ?teamStatement pq:P1351 ?score
SERVICE wikibase:label{bd:serviceParam wikibase:language "en,de"}
}
GROUP BY ?team ?teamLabel
ORDER BY DESC(?goals) ASC(?games)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v7("?games")
v7("?goals")
v3("?match")
v6("?score"):::projected
v5("?team")
v4("?teamStatement")
c7(["bd:serviceParam"]):::iri
c9(["en,de"]):::literal
c2(["wd:Q189571"]):::iri
v3 --"p:direct/P179"--> c2
v3 --"p:P1923"--> v4
v4 --"p:statement/P1923"--> v5
v4 --"p:qualifier/P1351"--> v6
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c7 --"wikibase:language"--> c9
end
bind2[/"sum(?score)"/]
v6 --o bind2
bind2 --as--o v7
bind3[/"count(?score)"/]
v6 --o bind3
bind3 --as--o v7