query-3705ff3cd917556d4ae209f6801c54e4
Topics
Use at
- https://query.wikidata.org/sparql
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
?count
(CONCAT("#topic/", SUBSTR(STR(?topic), 32), "/podcast") AS ?countUrl)
?topic ?topicLabel
(CONCAT("#topic/", SUBSTR(STR(?topic), 32)) AS ?topicUrl)
?example_podcast ?example_podcastLabel
(CONCAT("#podcast/", SUBSTR(STR(?example_podcast), 32)) AS ?example_podcastUrl)
WHERE {
{
SELECT
(COUNT(?podcast) AS ?count)
?topic
(SAMPLE(?podcast) AS ?example_podcast)
WHERE {
?podcast wdt:P31 / wdt:P279* wd:Q24634210 ;
wdt:P921 ?topic .
}
GROUP BY ?topic
} SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY DESC(?count)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?count"):::projected
v5("?countUrl")
v4("?example_podcast"):::projected
v7("?example_podcastUrl")
v2("?podcast")
v3("?topic"):::projected
v6("?topicUrl")
a1((" "))
c6(["bd:serviceParam"]):::iri
c8(["#91;AUTO_LANGUAGE#93;,en"]):::literal
c3(["wd:Q24634210"]):::iri
v2 --"wdt:P31"--> a1
a1 --"wdt:P279"--> c3
v2 --"wdt:P921"--> v3
bind2[/"count(?podcast)"/]
v2 --o bind2
bind2 --as--o v4
bind3[/"sample(?podcast)"/]
v2 --o bind3
bind3 --as--o v4
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c6 --"wikibase:language"--> c8
end
bind4[/"concat('#topic/',substring(str(?topic),'32^^xsd:integer'),'/podcast')"/]
v3 --o bind4
bind4 --as--o v5
bind5[/"concat('#topic/',substring(str(?topic),'32^^xsd:integer'))"/]
v3 --o bind5
bind5 --as--o v6
bind6[/"concat('#podcast/',substring(str(?example_podcast),'32^^xsd:integer'))"/]
v4 --o bind6
bind6 --as--o v7