query-40a5e1a29c161a3db9dda397ea9d1e76

rq turtle/ttl

title: Thesis students for a university and their various IDs SELECT ?academic ?scholia ?academicLabel ?academicDescription ?academicAltLabel ?degreeLabel ?gender ?lccn ?lccnurl ?viaf ?viafurl ?orcid ?orcidurl ?gscholarurl WHERE { ?academic wdt:P31 wd:Q5 ; # instances (P31) of humans (Q5) p:P69 ?statement . # check for an "educated at" (P69) statement

?statement ps:P69 wd:Q1150437 . # educated at Victoria University of Wellington

?statement pq:P512 ?degree . # get qualifier "academic degree" (P512)

BIND( URI(CONCAT('https://scholia.toolforge.org/author/', STRAFTER(STR(?academic), "/entity/"))) AS ?scholia ) .

OPTIONAL { ?academic wdt:P21 ?gender . } .
OPTIONAL { ?academic wdt:P244 ?lccn . BIND( IRI(CONCAT('https://lccn.loc.gov/', STR(?lccn))) AS ?lccnurl ) . } . OPTIONAL { ?academic wdt:P214 ?viaf . BIND( IRI(CONCAT('https://viaf.org/viaf/', STR(?viaf))) AS ?viafurl ) . } . OPTIONAL { ?academic wdt:P496 ?orcid . BIND( IRI(CONCAT('https://orcid.org/', STR(?orcid))) AS ?orcidurl ) . } . OPTIONAL { ?academic wdt:P1960 ?gscholar . BIND( IRI(CONCAT('https://scholar.google.com/citations?user=', STR(?gscholar))) AS ?gscholarurl ) . } .

SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }

} LIMIT 50

Use at

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#>
#title: Thesis students for a university and their various IDs
SELECT ?academic ?scholia ?academicLabel ?academicDescription ?academicAltLabel  ?degreeLabel ?gender ?lccn ?lccnurl  ?viaf ?viafurl ?orcid ?orcidurl ?gscholarurl  WHERE {
  ?academic wdt:P31 wd:Q5 ; # instances (P31) of humans (Q5)
            p:P69 ?statement . # check for an "educated at" (P69) statement

  ?statement ps:P69 wd:Q1150437 . # educated at Victoria University of Wellington

  ?statement pq:P512 ?degree . # get qualifier "academic degree" (P512)

  BIND( URI(CONCAT('https://scholia.toolforge.org/author/', STRAFTER(STR(?academic), "/entity/")))  AS ?scholia ) .

   OPTIONAL { ?academic wdt:P21 ?gender . } .   
   OPTIONAL { ?academic wdt:P244 ?lccn .  BIND( IRI(CONCAT('https://lccn.loc.gov/', STR(?lccn)))  AS ?lccnurl ) .   } . 
   OPTIONAL { ?academic wdt:P214 ?viaf .  BIND( IRI(CONCAT('https://viaf.org/viaf/', STR(?viaf)))  AS ?viafurl ) . } . 
   OPTIONAL { ?academic wdt:P496 ?orcid .  BIND( IRI(CONCAT('https://orcid.org/', STR(?orcid)))  AS ?orcidurl ) . } . 
   OPTIONAL { ?academic wdt:P1960 ?gscholar .  BIND( IRI(CONCAT('https://scholar.google.com/citations?user=', STR(?gscholar)))  AS ?gscholarurl ) . } . 

  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }

} LIMIT 50

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v1("?academic"):::projected v3("?degree") v5("?gender"):::projected v12("?gscholar") v13("?gscholarurl"):::projected v6("?lccn"):::projected v7("?lccnurl"):::projected v10("?orcid"):::projected v11("?orcidurl"):::projected v4("?scholia"):::projected v2("?statement") v8("?viaf"):::projected v9("?viafurl"):::projected c13(["bd:serviceParam"]):::iri c5(["wd:Q1150437"]):::iri c2(["wd:Q5"]):::iri c15(["#91;AUTO_LANGUAGE#93;,en"]):::literal v1 --"p:direct/P31"--> c2 v1 --"p:P69"--> v2 v2 --"p:statement/P69"--> c5 v2 --"p:qualifier/P512"--> v3 bind0[/"concat('https://scholia.toolforge.org/author/',substring-after(str(?academic),'/entity/'))"/] v1 --o bind0 bind0 --as--o v4 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v1 -."p:direct/P21".-> v5 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v1 -."p:direct/P244".-> v6 bind1[/"concat('https://lccn.loc.gov/',str(?lccn))"/] v6 --o bind1 bind1 --as--o v7 end subgraph optional2["(optional)"] style optional2 fill:#bbf,stroke-dasharray: 5 5; v1 -."p:direct/P214".-> v8 bind2[/"concat('https://viaf.org/viaf/',str(?viaf))"/] v8 --o bind2 bind2 --as--o v9 end subgraph optional3["(optional)"] style optional3 fill:#bbf,stroke-dasharray: 5 5; v1 -."p:direct/P496".-> v10 bind3[/"concat('https://orcid.org/',str(?orcid))"/] v10 --o bind3 bind3 --as--o v11 end subgraph optional4["(optional)"] style optional4 fill:#bbf,stroke-dasharray: 5 5; v1 -."p:direct/P1960".-> v12 bind4[/"concat('https://scholar.google.com/citations?user=',str(?gscholar))"/] v12 --o bind4 bind4 --as--o v13 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c13 --"wikibase:language"--> c15 end