query-ec8368cf5cfdaf4bb165acd8191f4e87

rq turtle/ttl

Propertiesinstance of (P31)family name (P734)native label (P1705)given name (P735)employer (P108)

Use at

PREFIX mwapi: <http://wikiba.se/ontology#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
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 distinct ?lname ?fname ?person ?personLabel ?ucd
  {
     { SELECT distinct ?person ?lname ?fname WHERE {
      VALUES (?fname ?lname) {
("Ursula" "Abbott")
("Norman" "Akesson")
("Henry" "Alder")
("V." "Algazi")
("R." "Allard")
("Thomas" "Allen")
("Maynard" "Amerine")
("David" "Anderson")
("Gary" "Anderson")
("Lawrence" "Andrews")
("Samuel" "Armistead")
("Floyd" "Ashton")
("Daniel" "Axelrod")
("John" "Ayer")
("Oscar" "Bacon")
("R." "Baldwin")
("Michael" "Barbour")
("David" "Barnette")
("Edward" "Barrett")
("Donald" "Bath")
("Arnold" "Bauer")
("Herbert" "Bauer")
      }
    bind(concat(?fname," ",?lname) as ?s)
    SERVICE wikibase:mwapi {
      bd:serviceParam wikibase:endpoint "www.wikidata.org";
                    wikibase:api "Generator";
                    mwapi:generator "search";
                    mwapi:gsrsearch ?s;
                    mwapi:gsrlimit "max".
     ?person wikibase:apiOutputItem mwapi:title.
   } } }.


  ?person wdt:P31 wd:Q5;
          wdt:P734/wdt:P1705 ?ln;
          wdt:P735/wdt:P1705 ?fn;
          .
  filter(xsd:string(?ln) = ?lname)
  filter(xsd:string(?fn) = ?fname)
  OPTIONAL {
    bind(wd:Q129421 as ?ucd)
    ?person wdt:P108 ?ucd.
    }
   SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
} order by ?lname ?fname ?person

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v4("?fn") v6("?fname"):::projected v5("?ln") v6("?lname"):::projected v3("?person"):::projected v6("?s") v7("?ucd"):::projected a1((" ")) a2((" ")) c4(["www.wikidata.org"]):::literal c11(["max"]):::literal c8(["search"]):::literal c2(["bd:serviceParam"]):::iri c15(["wd:Q5"]):::iri c22(["#91;AUTO_LANGUAGE#93;,en"]):::literal c13(["mwapi:title"]):::iri c6(["Generator"]):::literal f0[["http://www.w3.org/2001/XMLSchema#string(?fn) = ?fname"]] f0 --> v4 f0 --> v6 f1[["http://www.w3.org/2001/XMLSchema#string(?ln) = ?lname"]] f1 --> v5 f1 --> v6 bind2[/VALUES ?fname ?lname/] bind2-->v6 bind2-->v6 bind20(["Ursula"]) bind20 --> bind2 bind21(["Abbott"]) bind21 --> bind2 bind22(["Norman"]) bind22 --> bind2 bind23(["Akesson"]) bind23 --> bind2 bind24(["Henry"]) bind24 --> bind2 bind25(["Alder"]) bind25 --> bind2 bind26(["V."]) bind26 --> bind2 bind27(["Algazi"]) bind27 --> bind2 bind28(["R."]) bind28 --> bind2 bind29(["Allard"]) bind29 --> bind2 bind210(["Thomas"]) bind210 --> bind2 bind211(["Allen"]) bind211 --> bind2 bind212(["Maynard"]) bind212 --> bind2 bind213(["Amerine"]) bind213 --> bind2 bind214(["David"]) bind214 --> bind2 bind215(["Anderson"]) bind215 --> bind2 bind216(["Gary"]) bind216 --> bind2 bind217(["Anderson"]) bind217 --> bind2 bind218(["Lawrence"]) bind218 --> bind2 bind219(["Andrews"]) bind219 --> bind2 bind220(["Samuel"]) bind220 --> bind2 bind221(["Armistead"]) bind221 --> bind2 bind222(["Floyd"]) bind222 --> bind2 bind223(["Ashton"]) bind223 --> bind2 bind224(["Daniel"]) bind224 --> bind2 bind225(["Axelrod"]) bind225 --> bind2 bind226(["John"]) bind226 --> bind2 bind227(["Ayer"]) bind227 --> bind2 bind228(["Oscar"]) bind228 --> bind2 bind229(["Bacon"]) bind229 --> bind2 bind230(["R."]) bind230 --> bind2 bind231(["Baldwin"]) bind231 --> bind2 bind232(["Michael"]) bind232 --> bind2 bind233(["Barbour"]) bind233 --> bind2 bind234(["David"]) bind234 --> bind2 bind235(["Barnette"]) bind235 --> bind2 bind236(["Edward"]) bind236 --> bind2 bind237(["Barrett"]) bind237 --> bind2 bind238(["Donald"]) bind238 --> bind2 bind239(["Bath"]) bind239 --> bind2 bind240(["Arnold"]) bind240 --> bind2 bind241(["Bauer"]) bind241 --> bind2 bind242(["Herbert"]) bind242 --> bind2 bind243(["Bauer"]) bind243 --> bind2 bind3[/"concat(?fname,' ',?lname)"/] v6 --o bind3 v6 --o bind3 bind3 --as--o v6 subgraph s1["http://wikiba.se/ontology#mwapi"] style s1 stroke-width:4px; c2 --"mwapi:endpoint"--> c4 c2 --"mwapi:api"--> c6 c2 --"mwapi:generator"--> c8 c2 --"mwapi:gsrsearch"--> v6 c2 --"mwapi:gsrlimit"--> c11 v3 --"mwapi:apiOutputItem"--> c13 end v3 --"wdt:P31"--> c15 v3 --"wdt:P734"--> a1 a1 --"wdt:P1705"--> v5 v3 --"wdt:P735"--> a2 a2 --"wdt:P1705"--> v4 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; bind4[/"'wd:Q129421'"/] bind4 --as--o v7 v3 -."wdt:P108".-> v7 end subgraph s2["http://wikiba.se/ontology#label"] style s2 stroke-width:4px; c2 --"mwapi:language"--> c22 end