query-efb6d49ee24941bfb5d12313b70f1aa5

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) {
    ?superitem wdt:P131 wd:Q3131 .

    ?item wdt:P131 ?superitem .
    ?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; v5("?count") v2("?item"):::projected v1("?superitem") v4("?type"):::projected v3("?wfr") a1((" ")) c2(["wd:Q3131"]):::iri c5(["wd:Q16970"]):::iri c8(["fr"]):::literal v1 --"wdt:P131"--> c2 v2 --"wdt:P131"--> v1 v2 --"wdt:P31"--> a1 a1 --"wdt:P279"--> c5 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v3 -."schema:about".-> v2 v3 --"schema:inLanguage"--> c8 end bind0[/"if(bound(?wfr),'Avec','Sans')"/] v3 --o bind0 bind0 --as--o v4 bind2[/"count(?item)"/] v2 --o bind2 bind2 --as--o v5