query-fb19036b138027da33276ee2def193a1

rq turtle/ttl

Wikiprojects maintained by the KB SELECT ?project ?projectLabelEN ?projectLabelNL ?WDprojectpage ?projectbanner (GROUP_CONCAT(DISTINCT ?subjectLabelEN ; separator = " * ") as ?projectAboutEN) (GROUP_CONCAT(DISTINCT ?subjectLabelNL ; separator = " * ") as ?projectAboutNL) ?projectTopicMainCat ?projectTopicMainCatLabelEN

?commonscat

?commonscatURL ?WPNLurl WHERE { ?project wdt:P31 wd:Q16695773; wdt:P126 wd:Q1526131. OPTIONAL {?project wdt:P18 ?projectbanner.} OPTIONAL {?project rdfs:label ?projectLabelEN FILTER(LANG(?projectLabelEN)='en').} OPTIONAL {?project rdfs:label ?projectLabelNL FILTER(LANG(?projectLabelNL)='nl').} OPTIONAL {?WDprojectpage schema:about ?project . ?WDprojectpage schema:isPartOf https://www.wikidata.org/.}

OPTIONAL {?project wdt:P921 ?subject. ?subject rdfs:label ?subjectLabelEN. FILTER(LANG(?subjectLabelEN)='en').} OPTIONAL {?project wdt:P921 ?subject. ?subject rdfs:label ?subjectLabelNL. FILTER(LANG(?subjectLabelNL)='nl')}

OPTIONAL {?project wdt:P910 ?projectTopicMainCat. ?projectTopicMainCat rdfs:label ?projectTopicMainCatLabelEN. FILTER(LANG(?projectTopicMainCatLabelEN)='en'). ?commonscatURL schema:about ?projectTopicMainCat . ?commonscatURL schema:isPartOf https://commons.wikimedia.org/.}

OPTIONAL {?project wdt:P910 ?projectTopicMainCat2. ?WPNLurl schema:about ?projectTopicMainCat2 . ?WPNLurl schema:isPartOf https://nl.wikipedia.org/.}

} GROUP BY ?project ?projectLabelEN ?projectLabelNL ?WDprojectpage ?projectbanner ?projectTopicMainCat ?projectTopicMainCatLabelEN ?commonscatURL ?WPNLurl #?commonscat

Use at

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#>
#Wikiprojects maintained by the KB
SELECT ?project 
?projectLabelEN 
?projectLabelNL 
?WDprojectpage ?projectbanner 
(GROUP_CONCAT(DISTINCT ?subjectLabelEN ; separator = " **** ") as ?projectAboutEN) 
(GROUP_CONCAT(DISTINCT ?subjectLabelNL ; separator = " **** ") as ?projectAboutNL)
?projectTopicMainCat ?projectTopicMainCatLabelEN
#?commonscat 
?commonscatURL 
?WPNLurl
WHERE 
{
  ?project wdt:P31 wd:Q16695773; wdt:P126 wd:Q1526131.
  OPTIONAL {?project wdt:P18 ?projectbanner.}
  OPTIONAL {?project rdfs:label ?projectLabelEN FILTER(LANG(?projectLabelEN)='en').}
  OPTIONAL {?project rdfs:label ?projectLabelNL FILTER(LANG(?projectLabelNL)='nl').}
  OPTIONAL {?WDprojectpage schema:about ?project .
     ?WDprojectpage schema:isPartOf <https://www.wikidata.org/>.}  

  OPTIONAL {?project wdt:P921 ?subject.
     ?subject rdfs:label ?subjectLabelEN. FILTER(LANG(?subjectLabelEN)='en').}
  OPTIONAL {?project wdt:P921 ?subject.
     ?subject rdfs:label ?subjectLabelNL. FILTER(LANG(?subjectLabelNL)='nl')}

  OPTIONAL {?project wdt:P910 ?projectTopicMainCat.
     ?projectTopicMainCat rdfs:label ?projectTopicMainCatLabelEN. FILTER(LANG(?projectTopicMainCatLabelEN)='en').
     ?commonscatURL schema:about ?projectTopicMainCat .
     ?commonscatURL schema:isPartOf <https://commons.wikimedia.org/>.}

   OPTIONAL {?project wdt:P910 ?projectTopicMainCat2.
     ?WPNLurl schema:about ?projectTopicMainCat2 .
     ?WPNLurl schema:isPartOf <https://nl.wikipedia.org/>.}

} GROUP BY ?project  ?projectLabelEN ?projectLabelNL ?WDprojectpage ?projectbanner ?projectTopicMainCat ?projectTopicMainCatLabelEN ?commonscatURL ?WPNLurl #?commonscat

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v8("?WDprojectpage"):::projected v13("?WPNLurl"):::projected v11("?commonscatURL"):::projected v6("?project"):::projected v14("?projectAboutEN") v15("?projectAboutNL") v5("?projectLabelEN"):::projected v4("?projectLabelNL"):::projected v10("?projectTopicMainCat"):::projected v12("?projectTopicMainCat2") v1("?projectTopicMainCatLabelEN"):::projected v7("?projectbanner"):::projected v9("?subject") v3("?subjectLabelEN"):::projected v2("?subjectLabelNL"):::projected c11([https://www.wikidata.org/]):::iri c14([https://commons.wikimedia.org/]):::iri c6(["wd:Q1526131"]):::iri c4(["wd:Q16695773"]):::iri c15([https://nl.wikipedia.org/]):::iri v6 --"wdt:P31"--> c4 v6 --"wdt:P126"--> c6 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v6 -."wdt:P18".-> v7 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v6 -."rdfs:label".-> v5 end subgraph optional2["(optional)"] style optional2 fill:#bbf,stroke-dasharray: 5 5; v6 -."rdfs:label".-> v4 end subgraph optional3["(optional)"] style optional3 fill:#bbf,stroke-dasharray: 5 5; v8 -."schema:about".-> v6 v8 --"schema:isPartOf"--> c11 end subgraph optional4["(optional)"] style optional4 fill:#bbf,stroke-dasharray: 5 5; v6 -."wdt:P921".-> v9 v9 --"rdfs:label"--> v3 end subgraph optional5["(optional)"] style optional5 fill:#bbf,stroke-dasharray: 5 5; v6 -."wdt:P921".-> v9 v9 --"rdfs:label"--> v2 end subgraph optional6["(optional)"] style optional6 fill:#bbf,stroke-dasharray: 5 5; v6 -."wdt:P910".-> v10 v10 --"rdfs:label"--> v1 v11 --"schema:about"--> v10 v11 --"schema:isPartOf"--> c14 end subgraph optional7["(optional)"] style optional7 fill:#bbf,stroke-dasharray: 5 5; v6 -."wdt:P910".-> v12 v13 --"schema:about"--> v12 v13 --"schema:isPartOf"--> c15 end bind2[/"?subjectLabelEN"/] v3 --o bind2 bind2 --as--o v14 bind3[/"?subjectLabelNL"/] v2 --o bind3 bind3 --as--o v15