query-0682bf74c971aa408d48fa710c08edd6
Fields which studies the most topics
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel (GROUP_CONCAT(?topicLabel; SEPARATOR = " ; ") AS ?subject) (COUNT(?item) AS ?studied_count) WHERE {
SELECT distinct ?item ?topic ?itemLabel ?topicLabel WHERE {
?item wdt:P2578|^wdt:P2579 ?topic.
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
}
GROUP BY ?item ?itemLabel
ORDER BY DESC (?studied_count)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?item"):::projected
v6("?studied_count")
v5("?subject")
v3("?topic")
v4("?topicLabel"):::projected
c4(["bd:serviceParam"]):::iri
c6(["#91;AUTO_LANGUAGE#93;,en"]):::literal
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
v3 --"wdt:P2579"--> v2
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
v2 --"wdt:P2578"--> v3
end
union0r <== or ==> union0l
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c4 --"wikibase:language"--> c6
end
bind2[/"?topicLabel"/]
v4 --o bind2
bind2 --as--o v5
bind3[/"count(?item)"/]
v2 --o bind3
bind3 --as--o v6