query-13702a18bd09cd735f548c613fa5d02f

rq turtle/ttl

TODO

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#>
SELECT DISTINCT ?song ?songLabel ?main_subject ?main_subjectLabel ?family ?familyLabel {
  ?family wdt:P105 wd:Q35409 .
  ?song wdt:P31/wdt:P279* wd:Q7366 .  # also subclasses of song included
  ?song wdt:P921 ?main_subject .
  ?main_subject wdt:P171* ?family .
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v1("?family"):::projected v3("?main_subject"):::projected v2("?song"):::projected a1((" ")) c5(["wd:Q7366"]):::iri c9(["bd:serviceParam"]):::iri c2(["wd:Q35409"]):::iri c11(["#91;AUTO_LANGUAGE#93;,en"]):::literal v1 --"wdt:P105"--> c2 v2 --"wdt:P31"--> a1 a1 --"wdt:P279"--> c5 v2 --"wdt:P921"--> v3 v3 --"wdt:P171"--> v1 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c9 --"wikibase:language"--> c11 end