query-0b6fc1a2bf6e5b8103ebb606dcd02351
List of persons who hold a bachelor's degree in Computer science SELECT DISTINCT ?institution ?institutionLabel ?person ?personLabel ?degree ?degreeLabel ?majorLabel WHERE { ?person wdt:P31 wd:Q5 ; # instances (P31) of humans (Q5) p:P69 ?statement . # check for an "educated at" (P69) statement
?statement ps:P69 ?institution . # get value of the "educated at" statement, i.e. the institution ?institution wdt:P625 ?geoloc . # get the geolocation of the institution
?statement pq:P512 ?degree . # get qualifier "academic degree" (P512) ?statement pq:P812 ?major . # get qualifier "academic major (P812) ?degree wdt:P31/wdt:P279 wd:Q163727 . # filter for bachelor degrees (Q163727) ?major wdt:P31/wdt:P279 wd:Q21198 . # filter major for computer science (Q21198)
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } }
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 ps: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
# List of persons who hold a bachelor's degree in Computer science
SELECT DISTINCT ?institution ?institutionLabel ?person ?personLabel ?degree ?degreeLabel ?majorLabel WHERE {
?person wdt:P31 wd:Q5 ; # instances (P31) of humans (Q5)
p:P69 ?statement . # check for an "educated at" (P69) statement
?statement ps:P69 ?institution . # get value of the "educated at" statement, i.e. the institution
?institution wdt:P625 ?geoloc . # get the geolocation of the institution
?statement pq:P512 ?degree . # get qualifier "academic degree" (P512)
?statement pq:P812 ?major . # get qualifier "academic major (P812)
?degree wdt:P31*/wdt:P279* wd:Q163727 . # filter for bachelor degrees (Q163727)
?major wdt:P31*/wdt:P279* wd:Q21198 . # filter major for computer science (Q21198)
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}