query-e1ceb63395d033130cf15569abf8bd32
title: Countries, songs and participants at Eurovision 2024 SELECT distinct ?countryLabel ?item ?itemLabel ?song ?songLabel ?performer ?performerLabel WHERE { ?euro wdt:P179 wd:Q276; wdt:P585 ?time. FILTER (YEAR(?time)=2024). ?item wdt:P1344|wdt:P361 ?euro. ?item wdt:P31 wd:Q35718073. ?item wdt:P17|wdt:P495 ?country. #use this when there are links froms songs to country
OPTIONAL {?item wdt:P17 ?country.} OPTIONAL {?item wdt:P495 ?country.} #use this for all (but wrong) combinations
?song wdt:P175 ?performer. ?song wdt:P495 ?country. ?song wdt:P1344 ?euro. SERVICE wikibase:label { bd:serviceParam wikibase:language "ru,[AUTO_LANGUAGE],en". } } ORDER BY ?countryLabel
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#>
#title: Countries, songs and participants at Eurovision 2024
SELECT distinct ?countryLabel ?item ?itemLabel ?song ?songLabel ?performer ?performerLabel WHERE
{
?euro wdt:P179 wd:Q276; wdt:P585 ?time. FILTER (YEAR(?time)=2024).
?item wdt:P1344|wdt:P361 ?euro.
?item wdt:P31 wd:Q35718073.
?item wdt:P17|wdt:P495 ?country. #use this when there are links froms songs to country
# OPTIONAL {?item wdt:P17 ?country.} OPTIONAL {?item wdt:P495 ?country.} #use this for all (but wrong) combinations
?song wdt:P175 ?performer.
?song wdt:P495 ?country.
?song wdt:P1344 ?euro.
SERVICE wikibase:label { bd:serviceParam wikibase:language "ru,[AUTO_LANGUAGE],en". }
}
ORDER BY ?countryLabel
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v5("?country")
v1("?countryLabel"):::projected
v3("?euro")
v4("?item"):::projected
v7("?performer"):::projected
v6("?song"):::projected
v2("?time")
c8(["wd:Q35718073"]):::iri
c13(["bd:serviceParam"]):::iri
c15(["ru,#91;AUTO_LANGUAGE#93;,en"]):::literal
c3(["wd:Q276"]):::iri
f0[["year-from-dateTime(?time) = '2024^^xsd:integer'"]]
f0 --> v2
v3 --"wdt:P179"--> c3
v3 --"wdt:P585"--> v2
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
v4 --"wdt:P361"--> v3
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
v4 --"wdt:P1344"--> v3
end
union0r <== or ==> union0l
end
v4 --"wdt:P31"--> c8
subgraph union1[" Union "]
subgraph union1l[" "]
style union1l fill:#abf,stroke-dasharray: 3 3;
v4 --"wdt:P495"--> v5
end
subgraph union1r[" "]
style union1r fill:#abf,stroke-dasharray: 3 3;
v4 --"wdt:P17"--> v5
end
union1r <== or ==> union1l
end
v6 --"wdt:P175"--> v7
v6 --"wdt:P495"--> v5
v6 --"wdt:P1344"--> v3
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c13 --"wikibase:language"--> c15
end