query-2875f26809fbdf085259529c2cd1d55a
And there's no reason why you should not see the statement - that might help
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 ?item ?itemLabel (year(?when) as ?year) ?statement ?winnerLabel ?score
WHERE
{
?item wdt:P31 wd:Q57776091. # the item is an instance of a Sweet Adelines International chorus competition
?item wdt:P585 ?when. # it has a when statement
?item p:P1346 ?statement. # it has a p: value for P1346, which points to a statement - the unique URI
?statement ps:P1346 ?winner. # the statement has a ps: value i.e. the winner's identity
?statement pq:P1351 ?score. # the statement has a pq:P1351 value, which is the score
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
} order by desc(?year)
Query found at
- https://www.wikidata.org/wiki/User:Tagishsimon/WDQS
- https://www.wikidata.org/wiki/User_talk:Tagishsimon
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?item"):::projected
v6("?score"):::projected
v4("?statement"):::projected
v3("?when"):::projected
v5("?winner")
v7("?year")
c2(["wd:Q57776091"]):::iri
c8(["bd:serviceParam"]):::iri
c10(["#91;AUTO_LANGUAGE#93;,en"]):::literal
v2 --"p:direct/P31"--> c2
v2 --"p:direct/P585"--> v3
v2 --"p:P1346"--> v4
v4 --"p:statement/P1346"--> v5
v4 --"p:qualifier/P1351"--> v6
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c8 --"wikibase:language"--> c10
end
bind0[/"year-from-dateTime(?when)"/]
v3 --o bind0
bind0 --as--o v7