query-7296e4846adf0afacb6d70c5c09ba0bb
With the following query, we can list those scholarly articles whose main topic is part of computer science (first query) or mechanical engineering (second query). You can notice that both queries are the same, it is only one entity that changes, so you can change that entity with whatever area of knowledge you might be interested in (e.g. biology, mathematics, thermodynamics, psychology, etc.)
Use at
- https://query.wikidata.org/sparql
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
SELECT ?item ?titleZh ?titleEn {
?item wdt:P407 wd:Q7850;
wdt:P31 wd:Q13442814;
wdt:P921/wdt:P361 wd:Q21198.
OPTIONAL {
?item wdt:P1476 ?titleZh.
FILTER(LANG(?titleZh) = "zh").
}
OPTIONAL {
?item wdt:P1476 ?titleEn.
FILTER(LANG(?titleEn) = "en").
}
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?item"):::projected
v1("?titleEn"):::projected
v2("?titleZh"):::projected
a1((" "))
c9(["wd:Q21198"]):::iri
c4(["wd:Q7850"]):::iri
c6(["wd:Q13442814"]):::iri
v3 --"wdt:P407"--> c4
v3 --"wdt:P31"--> c6
v3 --"wdt:P921"--> a1
a1 --"wdt:P361"--> c9
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v3 -."wdt:P1476".-> v2
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v3 -."wdt:P1476".-> v1
end