query-f48583a114f9c8fcc3faeb66c87f6394

rq turtle/ttl

Propertiesinstance of (P31)subclass of (P279)title (P1476)performer (P175)YouTube video ID (P1651)determination method or standard (P459)point in time (P585)charted in (P2291)ranking (P1352) Propertiesinstance of (P31)subclass of (P279)title (P1476)performer (P175)YouTube video ID (P1651)determination method or standard (P459)point in time (P585)charted in (P2291)ranking (P1352) Propertiesinstance of (P31)subclass of (P279)title (P1476)performer (P175)YouTube video ID (P1651)determination method or standard (P459)point in time (P585)charted in (P2291)ranking (P1352) Propertiesinstance of (P31)subclass of (P279)title (P1476)performer (P175)YouTube video ID (P1651)determination method or standard (P459)point in time (P585)charted in (P2291)ranking (P1352) Propertiesinstance of (P31)subclass of (P279)title (P1476)performer (P175)YouTube video ID (P1651)determination method or standard (P459)point in time (P585)charted in (P2291)ranking (P1352) Propertiesinstance of (P31)subclass of (P279)title (P1476)performer (P175)YouTube video ID (P1651)determination method or standard (P459)point in time (P585)charted in (P2291)ranking (P1352) Propertiesinstance of (P31)subclass of (P279)title (P1476)performer (P175)YouTube video ID (P1651)determination method or standard (P459)point in time (P585)charted in (P2291)ranking (P1352) Propertiesinstance of (P31)subclass of (P279)title (P1476)performer (P175)YouTube video ID (P1651)determination method or standard (P459)point in time (P585)charted in (P2291)ranking (P1352) Propertiesinstance of (P31)subclass of (P279)title (P1476)performer (P175)YouTube video ID (P1651)determination method or standard (P459)point in time (P585)charted in (P2291)ranking (P1352) Propertiesinstance of (P31)subclass of (P279)title (P1476)performer (P175)YouTube video ID (P1651)determination method or standard (P459)point in time (P585)charted in (P2291)ranking (P1352) Propertiesinstance of (P31)subclass of (P279)title (P1476)performer (P175)YouTube video ID (P1651)determination method or standard (P459)point in time (P585)charted in (P2291)ranking (P1352) Propertiesinstance of (P31)subclass of (P279)title (P1476)performer (P175)YouTube video ID (P1651)determination method or standard (P459)point in time (P585)charted in (P2291)ranking (P1352) Propertiesinstance of (P31)subclass of (P279)title (P1476)performer (P175)YouTube video ID (P1651)determination method or standard (P459)point in time (P585)charted in (P2291)ranking (P1352) Propertiesinstance of (P31)subclass of (P279)title (P1476)performer (P175)YouTube video ID (P1651)determination method or standard (P459)point in time (P585)charted in (P2291)ranking (P1352) Propertiesinstance of (P31)subclass of (P279)title (P1476)performer (P175)YouTube video ID (P1651)determination method or standard (P459)point in time (P585)charted in (P2291)ranking (P1352) Propertiesinstance of (P31)subclass of (P279)title (P1476)performer (P175)YouTube video ID (P1651)determination method or standard (P459)point in time (P585)charted in (P2291)ranking (P1352) Propertiesinstance of (P31)subclass of (P279)title (P1476)performer (P175)YouTube video ID (P1651)determination method or standard (P459)point in time (P585)charted in (P2291)ranking (P1352) Propertiesinstance of (P31)subclass of (P279)title (P1476)performer (P175)YouTube video ID (P1651)determination method or standard (P459)point in time (P585)charted in (P2291)ranking (P1352) Propertiesinstance of (P31)subclass of (P279)title (P1476)performer (P175)YouTube video ID (P1651)determination method or standard (P459)point in time (P585)charted in (P2291)ranking (P1352) Propertiesinstance of (P31)subclass of (P279)title (P1476)performer (P175)YouTube video ID (P1651)determination method or standard (P459)point in time (P585)charted in (P2291)ranking (P1352) Propertiesinstance of (P31)subclass of (P279)title (P1476)performer (P175)YouTube video ID (P1651)determination method or standard (P459)point in time (P585)charted in (P2291)ranking (P1352) Propertiesinstance of (P31)subclass of (P279)title (P1476)performer (P175)YouTube video ID (P1651)determination method or standard (P459)point in time (P585)charted in (P2291)ranking (P1352) Propertiesinstance of (P31)subclass of (P279)title (P1476)performer (P175)YouTube video ID (P1651)determination method or standard (P459)point in time (P585)charted in (P2291)ranking (P1352) Propertiesinstance of (P31)subclass of (P279)title (P1476)performer (P175)YouTube video ID (P1651)determination method or standard (P459)point in time (P585)charted in (P2291)ranking (P1352) Propertiesinstance of (P31)subclass of (P279)title (P1476)performer (P175)YouTube video ID (P1651)determination method or standard (P459)point in time (P585)charted in (P2291)ranking (P1352) Propertiesinstance of (P31)subclass of (P279)title (P1476)performer (P175)YouTube video ID (P1651)determination method or standard (P459)point in time (P585)charted in (P2291)ranking (P1352) Propertiesinstance of (P31)subclass of (P279)title (P1476)performer (P175)YouTube video ID (P1651)determination method or standard (P459)point in time (P585)charted in (P2291)ranking (P1352) Propertiesinstance of (P31)subclass of (P279)title (P1476)performer (P175)YouTube video ID (P1651)determination method or standard (P459)point in time (P585)charted in (P2291)ranking (P1352) Propertiesinstance of (P31)subclass of (P279)title (P1476)performer (P175)YouTube video ID (P1651)determination method or standard (P459)point in time (P585)charted in (P2291)ranking (P1352) Propertiesinstance of (P31)subclass of (P279)title (P1476)performer (P175)YouTube video ID (P1651)determination method or standard (P459)point in time (P585)charted in (P2291)ranking (P1352)

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?musical_composition ?title (GROUP_CONCAT(DISTINCT ?performerLabel; separator=", ") AS ?performers) (YEAR(?chart_year) AS ?year) ?ranking (SAMPLE(?youtube_video_candidate) AS ?youtube_video) WHERE {
  SERVICE wikibase:label {
    bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en".
    ?performer rdfs:label ?performerLabel  
  }
  ?musical_composition wdt:P31/wdt:P279* wd:Q2188189.
  ?musical_composition p:P2291 ?charted_in.
  OPTIONAL { ?musical_composition wdt:P1476 ?title }.
  OPTIONAL { ?musical_composition wdt:P175 ?performer }.
  OPTIONAL { ?musical_composition wdt:P1651 ?youtube_video_id }.
  BIND(CONCAT("https://www.youtube.com/watch?v=", ?youtube_video_id) AS ?youtube_video_candidate).
  ?charted_in ps:P2291 ?chart.
  ?charted_in pq:P1352 ?ranking.
  ?chart wdt:P459 wd:Q17036134.
  ?chart wdt:P585 ?chart_year.
}
GROUP BY ?musical_composition ?charted_in ?title ?chart ?ranking ?chart_year
ORDER BY DESC(?year) ASC(?ranking)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v10("?chart") v11("?chart_year"):::projected v6("?charted_in") v5("?musical_composition"):::projected v3("?performer") v4("?performerLabel"):::projected v12("?performers") v2("?ranking"):::projected v7("?title"):::projected v13("?year") v13("?youtube_video") v9("?youtube_video_candidate"):::projected v8("?youtube_video_id") a1((" ")) c16(["wd:Q17036134"]):::iri c8(["wd:Q2188189"]):::iri c2(["bd:serviceParam"]):::iri c4(["#91;AUTO_LANGUAGE#93;,en"]):::literal subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c2 --"wikibase:language"--> c4 v3 --"rdfs:label"--> v4 end v5 --"p:direct/P31"--> a1 a1 --"p:direct/P279"--> c8 v5 --"p:P2291"--> v6 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v5 -."p:direct/P1476".-> v7 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v5 -."p:direct/P175".-> v3 end subgraph optional2["(optional)"] style optional2 fill:#bbf,stroke-dasharray: 5 5; v5 -."p:direct/P1651".-> v8 end bind0[/"concat('https://www.youtube.com/watch?v=',?youtube_video_id)"/] v8 --o bind0 bind0 --as--o v9 v6 --"p:statement/P2291"--> v10 v6 --"p:qualifier/P1352"--> v2 v10 --"p:direct/P459"--> c16 v10 --"p:direct/P585"--> v11 bind3[/"?performerLabel"/] v4 --o bind3 bind3 --as--o v12 bind4[/"year-from-dateTime(?chart_year)"/] v11 --o bind4 bind4 --as--o v13 bind5[/"sample(?youtube_video_candidate)"/] v9 --o bind5 bind5 --as--o v13