[34736] | 1 | prefix skos: <http://www.w3.org/2004/02/skos/core#>
|
---|
| 2 | prefix dct: <http://purl.org/dc/terms/>
|
---|
| 3 | prefix xsd: <http://www.w3.org/2001/XMLSchema#>
|
---|
| 4 |
|
---|
| 5 | PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
|
---|
| 6 | PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
---|
| 7 |
|
---|
| 8 | prefix dbc: <http://dbpedia.org/resource/Category:>
|
---|
| 9 | prefix dbr: <http://dbpedia.org/resource/>
|
---|
| 10 | prefix dbp: <http://dbpedia.org/property/>
|
---|
| 11 |
|
---|
| 12 | PREFIX dbo: <http://dbpedia.org/ontology/>
|
---|
| 13 |
|
---|
| 14 | PREFIX prov: <http://www.w3.org/ns/prov#>
|
---|
| 15 |
|
---|
| 16 | SELECT ?country_in_year (?year AS ?Year) (?country AS ?Country) ?entrant ?song
|
---|
| 17 |
|
---|
| 18 | WHERE {
|
---|
| 19 | SERVICE <https://dbpedia.demo.openlinksw.com/sparql> {
|
---|
| 20 | ?countries_in_esc_by_year skos:broader dbc:Countries_in_the_Eurovision_Song_Contest_by_year.
|
---|
| 21 |
|
---|
| 22 | ?country_in_year dct:subject ?countries_in_esc_by_year.
|
---|
| 23 | bind( REPLACE(str(?country_in_year), ".*(\\d{4})", "$1") as ?year).
|
---|
| 24 | FILTER ( xsd:integer(?year) < 2020).
|
---|
| 25 |
|
---|
| 26 | ?country_in_year dbp:country ?country.
|
---|
| 27 |
|
---|
[34747] | 28 | ?country_in_year dbp:entrant ?entrant
|
---|
| 29 | FILTER (isURI(?entrant)).
|
---|
[34736] | 30 |
|
---|
| 31 | ?country_in_year dbp:song ?song_errata
|
---|
| 32 | FILTER (isLITERAL(?song_errata)).
|
---|
| 33 | }
|
---|
| 34 |
|
---|
| 35 | ?country_in_year dbp:song ?song.
|
---|
| 36 | ?country_in_year dct:source ?song_errata.
|
---|
| 37 |
|
---|
| 38 | SERVICE <https://dbpedia.demo.openlinksw.com/sparql> {
|
---|
[34745] | 39 | ?song dbp:artist|dbp:as ?entrant.
|
---|
[34736] | 40 | }
|
---|
| 41 | ?song dct:source ?song_errata.
|
---|
| 42 |
|
---|
[34758] | 43 | OPTIONAL {
|
---|
| 44 | SERVICE <https://dbpedia.demo.openlinksw.com/sparql> {
|
---|
| 45 | ?entrant rdfs:label ?entrant_label
|
---|
| 46 | FILTER (lang(?entrant_label) = 'en').
|
---|
| 47 | }
|
---|
[34747] | 48 | }
|
---|
[34736] | 49 | }
|
---|
| 50 | ORDER BY DESC(?countries_in_esc_by_year)
|
---|
| 51 |
|
---|
| 52 |
|
---|
| 53 |
|
---|
| 54 |
|
---|
| 55 |
|
---|