query-7416fcee67c25a94e9c3316f4b97a360
Propertiesinstance of (P31)subclass of (P279) TODO
Use at
- https://query.wikidata.org/sparql
PREFIX mwapi: <http://wikiba.se/ontology#>
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/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel WHERE {
?link schema:about wd:Q81068910;schema:isPartOf <https://en.wikipedia.org/>;schema:name ?title . #point to the wiki you are searching, remove line if no QID
SERVICE wikibase:mwapi {
bd:serviceParam wikibase:api "Generator" .
bd:serviceParam wikibase:endpoint "en.wikipedia.org" . #point to the wiki you are searching
bd:serviceParam mwapi:titles ?title . #replace here if no QID
bd:serviceParam mwapi:generator "links" .
?item wikibase:apiOutputItem mwapi:item .
?ns wikibase:apiOutput "@ns" .
}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
MINUS { ?item wdt:P31 wd:Q3241045 . } #filtering out disease outbreak items
MINUS { ?item wdt:P31/wdt:P279* wd:Q1048835 .} #filtering out countries and other political territorial entities
FILTER (?ns = "0"). #showing only articles
}
Query found at
- https://www.wikidata.org/wiki/User:Susannaanas/SPARQL
- https://www.wikidata.org/wiki/Wikidata:WikiProject_COVID-19/Focus_list
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?item"):::projected
v2("?link")
v1("?ns")
v3("?title")
a1((" "))
c17(["mwapi:item"]):::iri
c19(["@ns"]):::literal
c26(["wd:Q1048835"]):::iri
c5([https://en.wikipedia.org/]):::iri
c12(["en.wikipedia.org"]):::literal
c8(["bd:serviceParam"]):::iri
c24(["wd:Q3241045"]):::iri
c15(["links"]):::literal
c3(["wd:Q81068910"]):::iri
c22(["#91;AUTO_LANGUAGE#93;,en"]):::literal
c10(["Generator"]):::literal
f0[["?ns = '0'"]]
f0 --> v1
v2 --"schema:about"--> c3
v2 --"schema:isPartOf"--> c5
v2 --"schema:name"--> v3
subgraph s1["http://wikiba.se/ontology#mwapi"]
style s1 stroke-width:4px;
c8 --"mwapi:api"--> c10
c8 --"mwapi:endpoint"--> c12
c8 --"mwapi:titles"--> v3
c8 --"mwapi:generator"--> c15
v4 --"mwapi:apiOutputItem"--> c17
v1 --"mwapi:apiOutput"--> c19
end
subgraph s2["http://wikiba.se/ontology#label"]
style s2 stroke-width:4px;
c8 --"mwapi:language"--> c22
end
subgraph minus1["MINUS"]
style minus1 stroke-width:6px,fill:pink,stroke:red;
v4 --"wdt:P31"--> c24
end
subgraph minus2["MINUS"]
style minus2 stroke-width:6px,fill:pink,stroke:red;
v4 --"wdt:P31"--> a1
a1 --"wdt:P279"--> c26
end