query-b907463cfa35d60fae2713697b1ae875

rq turtle/ttl

TODO

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX schema: <http://schema.org/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT distinct ?item ?itemLabel ?sitelink ?article (group_concat(distinct ?occupationL;separator="; ") as ?occupationLabel) (group_concat(distinct ?fieldL;separator="; ") as ?fieldLabel) WHERE 
{
 {?item wdt:P106/wdt:P279* wd:Q331432.}
  UNION
 {?item wdt:P101/wdt:P279* wd:Q331432.}
 OPTIONAL {?item wdt:P106 ?occupation.}
 OPTIONAL {?item wdt:P101 ?field.}
 ?sitelink ^schema:name ?article .
 ?article schema:about ?item ;
          schema:isPartOf <https://fr.wikipedia.org/> .
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". 
                         ?item rdfs:label ?itemLabel .
                         ?occupation  rdfs:label ?occupationL .
                         ?field rdfs:label ?fieldL .}
} group by ?item ?itemLabel ?sitelink ?article

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v4("?article"):::projected v3("?field") v8("?fieldL"):::projected v10("?fieldLabel") v1("?item"):::projected v6("?itemLabel"):::projected v2("?occupation") v7("?occupationL"):::projected v9("?occupationLabel") v5("?sitelink"):::projected a1((" ")) a2((" ")) c8([https://fr.wikipedia.org/]):::iri c3(["wd:Q331432"]):::iri c10(["bd:serviceParam"]):::iri c12(["#91;AUTO_LANGUAGE#93;,en"]):::literal subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; v1 --"wdt:P101"--> a2 a2 --"wdt:P279"--> c3 end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; v1 --"wdt:P106"--> a1 a1 --"wdt:P279"--> c3 end union0r <== or ==> union0l end subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P106".-> v2 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P101".-> v3 end v4 --"schema:name"--> v5 v4 --"schema:about"--> v1 v4 --"schema:isPartOf"--> c8 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c10 --"wikibase:language"--> c12 v1 --"rdfs:label"--> v6 v2 --"rdfs:label"--> v7 v3 --"rdfs:label"--> v8 end bind2[/"?occupationL"/] v7 --o bind2 bind2 --as--o v9 bind3[/"?fieldL"/] v8 --o bind3 bind3 --as--o v10