query-369caf974485b477c096e6d57c4b88b6

rq turtle/ttl

Requesting help finding all mathematics related nodesI'm looking for help writing a deep search query for all math-related nodes. I wrote the following query that returns only ~300 nodes:

Use at

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 ?item ?itemLabel ?linkTo WHERE {
  { wd:Q395 wdt:P361* ?item. }
  UNION
  { ?item wdt:P361* wd:Q395. }
  OPTIONAL { ?item wdt:P361 ?linkTo. }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v1("?item"):::projected v2("?linkTo"):::projected c4(["bd:serviceParam"]):::iri c6(["en"]):::literal c1(["wd:Q395"]):::iri subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; v1 --"wdt:P361"--> c1 end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; c1 --"wdt:P361"--> v1 end union0r <== or ==> union0l end subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P361".-> v2 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c4 --"wikibase:language"--> c6 end