query-bf5fa0e1589f562f774de9c0eb90f615

rq turtle/ttl

Query #5: Graph people whos field of work is either: (linked data; linked open data; OR Semantic Web)

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX bd: <http://www.bigdata.com/rdf#>
#defaultView:Graph
SELECT DISTINCT ?item ?itemLabel ?itemDescription ?orcidIdURL ?fieldOfWork ?fieldOfWorkLabel ("CF0A2C" AS ?rgb)
WHERE
{
  {?item wdt:P31 wd:Q5 ; # instance of a human
         rdfs:label ?itemLabel .
   ?item wdt:P101 wd:Q515701 ; # linked data
         wdt:P101 ?fieldOfWork .
   OPTIONAL {?item wdt:P496 ?orcidId} .
   BIND (URI(CONCAT("https://orcid.org/", ENCODE_FOR_URI (?orcidId))) AS ?orcidIdURL)
   FILTER (lang(?itemLabel) = "en") 
  }
 UNION
  {?item wdt:P31 wd:Q5 ; # instance of a human
         rdfs:label ?itemLabel .
   ?item wdt:P101 wd:Q18692990 ; # linked open data
         wdt:P101 ?fieldOfWork .
   OPTIONAL {?item wdt:P496 ?orcidId} .
   BIND (URI(CONCAT("https://orcid.org/", ENCODE_FOR_URI (?orcidId))) AS ?orcidIdURL)
   FILTER (lang(?itemLabel) = "en") 
  }
 UNION
  {?item wdt:P31 wd:Q5 ; # instance of a human
         rdfs:label ?itemLabel .
   ?item wdt:P101 wd:Q54837 ; # Semantic Web
         wdt:P101 ?fieldOfWork .
   OPTIONAL {?item wdt:P496 ?orcidId} .
   BIND (URI(CONCAT("https://orcid.org/", ENCODE_FOR_URI (?orcidId))) AS ?orcidIdURL)
   FILTER (lang(?itemLabel) = "en") 
  }
 FILTER(?fieldOfWork IN (wd:Q18692990, wd:Q515701, wd:Q54837)) # Filter out 'Field of Work' values NOT in this list
 SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}
ORDER BY ?itemLabel

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v2("?fieldOfWork"):::projected v3("?item"):::projected v1("?itemLabel"):::projected v4("?orcidId") v6("?orcidIdURL"):::projected v6("?rgb") c3(["wd:Q54837"]):::iri c11(["bd:serviceParam"]):::iri c2(["wd:Q515701"]):::iri c1(["wd:Q18692990"]):::iri c6(["wd:Q5"]):::iri c4(["en"]):::literal list0c3(["wd:Q54837"]):::iri list0c2(["wd:Q515701"]):::iri list0c1(["wd:Q18692990"]):::iri list0c1 --o f0 list0c2 --o f0 list0c3 --o f0 f0[[" in "]] f0 --> v2 subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; subgraph union1[" Union "] subgraph union1l[" "] style union1l fill:#abf,stroke-dasharray: 3 3; f1[["?itemLabel = 'en'"]] f1 --> v1 v3 --"wdt:P31"--> c6 v3 --"rdfs:label"--> v1 v3 --"wdt:P101"--> c3 v3 --"wdt:P101"--> v2 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v3 -."wdt:P496".-> v4 end bind2[/"concat('https://orcid.org/',encode-for-uri(?orcidId))"/] v4 --o bind2 bind2 --as--o v6 end subgraph union1r[" "] style union1r fill:#abf,stroke-dasharray: 3 3; f3[["?itemLabel = 'en'"]] f3 --> v1 v3 --"wdt:P31"--> c6 v3 --"rdfs:label"--> v1 v3 --"wdt:P101"--> c1 v3 --"wdt:P101"--> v2 subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v3 -."wdt:P496".-> v4 end bind4[/"concat('https://orcid.org/',encode-for-uri(?orcidId))"/] v4 --o bind4 bind4 --as--o v6 end union1r <== or ==> union1l end end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; f5[["?itemLabel = 'en'"]] f5 --> v1 v3 --"wdt:P31"--> c6 v3 --"rdfs:label"--> v1 v3 --"wdt:P101"--> c2 v3 --"wdt:P101"--> v2 subgraph optional2["(optional)"] style optional2 fill:#bbf,stroke-dasharray: 5 5; v3 -."wdt:P496".-> v4 end bind6[/"concat('https://orcid.org/',encode-for-uri(?orcidId))"/] v4 --o bind6 bind6 --as--o v6 end union0r <== or ==> union0l end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c11 --"wikibase:language"--> c4 end bind7[/"'CF0A2C'"/] bind7 --as--o v6