query-080f50407b6399115919fa56ab963612
How to get top 100 categories available in most Wikipedias, but not created in a specific Wikipedia? 21:45, 11 December 2023 (UTC)) talk (Aram property, tracking and maintenance categories. Thanks! __HIDDENCAT__Hi, I wonder if we can get top 100 categories available on most Wikipedias, but still not created in a specific Wikipedia. Use Quarry (which I want this way if you can), API, SPARQL or any other way you prefer. If you can, add an optional condition to exclude those have In SPARQL, something like this seems to work, without filtering for hiddencats, but I guess they usually don’t get an item on Wikidata so this should not be a big issue : Aram@
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 schema: <http://schema.org/>
select ?item ?n {
?item wdt:P31 wd:Q4167836 .
?item wikibase:sitelinks ?n .
filter (?n > 90)
minus {
?cat schema:isPartOf <https://ja.wikipedia.org/> ;
schema:about ?item .
}
} order by desc (?n)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?cat")
v2("?item"):::projected
v1("?n"):::projected
c6([https://ja.wikipedia.org/]):::iri
c3(["wd:Q4167836"]):::iri
f0[["?n > '90^^xsd:integer'"]]
f0 --> v1
v2 --"wdt:P31"--> c3
v2 --"wikibase:sitelinks"--> v1
subgraph minus1["MINUS"]
style minus1 stroke-width:6px,fill:pink,stroke:red;
v3 --"schema:isPartOf"--> c6
v3 --"schema:about"--> v2
end