prefix skos: prefix dct: prefix xsd: PREFIX rdf: PREFIX rdfs: prefix dbc: prefix dbr: prefix dbp: PREFIX dbo: PREFIX prov: SELECT ?country_in_year (?year AS ?Year) (?country AS ?Country) ?entrant ?song WHERE { SERVICE { ?countries_in_esc_by_year skos:broader dbc:Countries_in_the_Eurovision_Song_Contest_by_year. ?country_in_year dct:subject ?countries_in_esc_by_year. bind( REPLACE(str(?country_in_year), ".*(\\d{4})", "$1") as ?year). FILTER ( xsd:integer(?year) < 2020). ?country_in_year dbp:country ?country. ?country_in_year dbp:entrant ?entrant FILTER (isURI(?entrant)). ?country_in_year dbp:song ?song_errata FILTER (isLITERAL(?song_errata)). } ?country_in_year dbp:song ?song. ?country_in_year dct:source ?song_errata. SERVICE { ?song dbp:artist|dbp:as ?entrant. } ?song dct:source ?song_errata. OPTIONAL { SERVICE { ?entrant rdfs:label ?entrant_label FILTER (lang(?entrant_label) = 'en'). } } } ORDER BY DESC(?countries_in_esc_by_year)