query-865b6bd2fb0ce07faf1766f427f1055b

rq turtle/ttl

TODO

Use at

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX schema: <http://schema.org/>
SELECT ?type (COUNT(DISTINCT ?item) AS ?count) {

    ?item (wdt:P131/wdt:P131) wd:Q3131. 
    ?item (wdt:P31/wdt:P279*) wd:Q16970.
    OPTIONAL {?wfr schema:about ?item ; schema:inLanguage "fr"}
    BIND (IF(BOUND(?wfr), 'Avec', 'Sans') AS ?type)
} GROUP BY ?type

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v4("?count") v1("?item"):::projected v3("?type"):::projected v2("?wfr") a1((" ")) a2((" ")) c2(["wd:Q3131"]):::iri c5(["wd:Q16970"]):::iri c8(["fr"]):::literal v1 --"wdt:P131"--> a1 a1 --"wdt:P131"--> c2 v1 --"wdt:P31"--> a2 a2 --"wdt:P279"--> c5 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v2 -."schema:about".-> v1 v2 --"schema:inLanguage"--> c8 end bind0[/"if(bound(?wfr),'Avec','Sans')"/] v2 --o bind0 bind0 --as--o v3 bind2[/"count(?item)"/] v1 --o bind2 bind2 --as--o v4