query-79675b25910cdd1b77755d84a37cdfbc

rq turtle/ttl

title: Songs with all info SELECT ?song (GROUP_CONCAT(DISTINCT(?songName); separator=" / ") as ?names) ?songLabel ?songDescription (GROUP_CONCAT(DISTINCT(?countryLabel); separator=" + ") as ?countries) (GROUP_CONCAT(DISTINCT(?langLabel); separator=" + ") as ?langs)

?performer ?performerLabel # several lines if several performers of the song

or use this line for combined label:

(GROUP_CONCAT(DISTINCT(?performerLabel); separator=" + ") as ?performers) (GROUP_CONCAT(DISTINCT(?composerLabel); separator="; ") as ?composers) (GROUP_CONCAT(DISTINCT(?poetLabel); separator="; ") as ?poets) (GROUP_CONCAT(DISTINCT(?genreLabel); separator=", ") as ?genres) ?pub ?creat ?length WHERE { SELECT ?song ?songName ?songLabel ?songDescription ?countryLabel ?langLabel ?performer ?performerLabel ?composerLabel ?poetLabel ?genreLabel ?pub ?creat ?length WHERE { ?euro wdt:P179 wd:Q276; wdt:P585 ?time. FILTER (YEAR(?time)=2024). VALUES ?format {wd:Q7366 wd:Q134556 wd:Q105543609} ?song wdt:P31 ?format. ?song wdt:P1344 ?euro. OPTIONAL {?song wdt:P1476 ?songName.} OPTIONAL {?song wdt:P175 ?performer.} OPTIONAL {?song wdt:P495 ?country.} OPTIONAL {?song wdt:P407 ?lang.} OPTIONAL {?song wdt:P86 ?composer.} OPTIONAL {?song wdt:P676 ?poet.} OPTIONAL {?song wdt:P136 ?genre.} OPTIONAL {?song wdt:P577 ?pub.} OPTIONAL {?song wdt:P571 ?creat.} OPTIONAL {?song wdt:P2047 ?length.} SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } } } GROUP BY ?song ?songLabel ?songDescription ?pub ?creat ?length ORDER BY ?names

Use at

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: Songs with all info
SELECT ?song 
(GROUP_CONCAT(DISTINCT(?songName); separator=" / ") as ?names)
?songLabel ?songDescription
(GROUP_CONCAT(DISTINCT(?countryLabel); separator=" + ") as ?countries)
(GROUP_CONCAT(DISTINCT(?langLabel); separator=" + ") as ?langs)
# ?performer ?performerLabel # several lines if several performers of the song
#or use this line for combined label:
(GROUP_CONCAT(DISTINCT(?performerLabel); separator=" + ") as ?performers)
(GROUP_CONCAT(DISTINCT(?composerLabel); separator="; ") as ?composers)
(GROUP_CONCAT(DISTINCT(?poetLabel); separator="; ") as ?poets) 
(GROUP_CONCAT(DISTINCT(?genreLabel); separator=", ") as ?genres) 
?pub ?creat ?length
WHERE
{
  SELECT ?song ?songName ?songLabel ?songDescription ?countryLabel ?langLabel ?performer ?performerLabel ?composerLabel ?poetLabel ?genreLabel ?pub ?creat ?length WHERE {
  ?euro wdt:P179 wd:Q276; wdt:P585 ?time. FILTER (YEAR(?time)=2024).
  VALUES ?format {wd:Q7366 wd:Q134556 wd:Q105543609}
  ?song wdt:P31 ?format.
  ?song wdt:P1344 ?euro.
  OPTIONAL {?song wdt:P1476 ?songName.}
  OPTIONAL {?song wdt:P175 ?performer.}
  OPTIONAL {?song wdt:P495 ?country.}
  OPTIONAL {?song wdt:P407 ?lang.}
  OPTIONAL {?song wdt:P86 ?composer.}
  OPTIONAL {?song wdt:P676 ?poet.}
  OPTIONAL {?song wdt:P136 ?genre.}
  OPTIONAL {?song wdt:P577 ?pub.}
  OPTIONAL {?song wdt:P571 ?creat.}
  OPTIONAL {?song wdt:P2047 ?length.}
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
  }
 }
GROUP BY ?song ?songLabel ?songDescription ?pub ?creat ?length
ORDER BY ?names

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v10("?composer") v19("?composerLabel"):::projected v25("?composers") v22("?countries") v8("?country") v16("?countryLabel"):::projected v14("?creat"):::projected v3("?euro") v4("?format") v12("?genre") v21("?genreLabel"):::projected v27("?genres") v9("?lang") v17("?langLabel"):::projected v23("?langs") v15("?length"):::projected v22("?names") v7("?performer") v18("?performerLabel"):::projected v24("?performers") v11("?poet") v20("?poetLabel"):::projected v26("?poets") v13("?pub"):::projected v5("?song"):::projected v6("?songName"):::projected v2("?time") c18(["bd:serviceParam"]):::iri c20(["#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 bind1[/VALUES ?format/] bind1-->v4 bind10(["wd:Q7366"]) bind10 --> bind1 bind11(["wd:Q134556"]) bind11 --> bind1 bind12(["wd:Q105543609"]) bind12 --> bind1 v5 --"wdt:P31"--> v4 v5 --"wdt:P1344"--> v3 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v5 -."wdt:P1476".-> v6 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v5 -."wdt:P175".-> v7 end subgraph optional2["(optional)"] style optional2 fill:#bbf,stroke-dasharray: 5 5; v5 -."wdt:P495".-> v8 end subgraph optional3["(optional)"] style optional3 fill:#bbf,stroke-dasharray: 5 5; v5 -."wdt:P407".-> v9 end subgraph optional4["(optional)"] style optional4 fill:#bbf,stroke-dasharray: 5 5; v5 -."wdt:P86".-> v10 end subgraph optional5["(optional)"] style optional5 fill:#bbf,stroke-dasharray: 5 5; v5 -."wdt:P676".-> v11 end subgraph optional6["(optional)"] style optional6 fill:#bbf,stroke-dasharray: 5 5; v5 -."wdt:P136".-> v12 end subgraph optional7["(optional)"] style optional7 fill:#bbf,stroke-dasharray: 5 5; v5 -."wdt:P577".-> v13 end subgraph optional8["(optional)"] style optional8 fill:#bbf,stroke-dasharray: 5 5; v5 -."wdt:P571".-> v14 end subgraph optional9["(optional)"] style optional9 fill:#bbf,stroke-dasharray: 5 5; v5 -."wdt:P2047".-> v15 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c18 --"wikibase:language"--> c20 end bind9[/"?songName"/] v6 --o bind9 bind9 --as--o v22 bind10[/"?countryLabel"/] v16 --o bind10 bind10 --as--o v22 bind11[/"?langLabel"/] v17 --o bind11 bind11 --as--o v23 bind12[/"?performerLabel"/] v18 --o bind12 bind12 --as--o v24 bind13[/"?composerLabel"/] v19 --o bind13 bind13 --as--o v25 bind14[/"?poetLabel"/] v20 --o bind14 bind14 --as--o v26 bind15[/"?genreLabel"/] v21 --o bind15 bind15 --as--o v27