query-930c2d66a2607cded2fb48391239d197

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 { {
  SELECT ("Avec" as ?type) (COUNT(DISTINCT ?item) as ?count)
  WHERE {
    ?item (wdt:P131/wdt:P131) wd:Q3131.
    ?item (wdt:P31/wdt:P279*) wd:Q16970.
    ?article schema:about ?item .
    ?article schema:isPartOf <https://fr.wikipedia.org/>.} }
UNION {
  SELECT ("Sans" as ?type) (COUNT(DISTINCT ?item) as ?count)
  WHERE {
    ?item (wdt:P131/wdt:P131) wd:Q3131.
    ?item (wdt:P31/wdt:P279*) wd:Q16970.
    OPTIONAL { ?article schema:about ?item . }
  FILTER NOT EXISTS { ?wfr schema:about ?item ; schema:inLanguage "fr" } } }
}
ORDER BY ?type

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?article") v6("?count"):::projected v2("?item") v6("?type"):::projected v5("?wfr") a1((" ")) a2((" ")) a3((" ")) a4((" ")) c2(["wd:Q3131"]):::iri c8([https://fr.wikipedia.org/]):::iri c5(["wd:Q16970"]):::iri c10(["fr"]):::literal subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; f0[["not "]] subgraph f0e0["Exists Clause"] e0v1 --"schema:about"--> e0v2 e0v1 --"schema:inLanguage"--> e0c3 e0v2("?item"):::projected e0v1("?wfr"):::projected e0c3(["fr"]):::literal end f0--EXISTS--> f0e0 f0 --> v5 f0 --> c6 f0 --> v2 f0 --> c9 f0 --> c10 v5 --"schema:about"--> v2 v5 --"schema:inLanguage"--> c10 v2 --"wdt:P131"--> a3 a3 --"wdt:P131"--> c2 v2 --"wdt:P31"--> a4 a4 --"wdt:P279"--> c5 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v3 -."schema:about".-> v2 end bind2[/"'Sans'"/] bind2 --as--o v6 bind3[/"count(?item)"/] v2 --o bind3 bind3 --as--o v6 end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; v2 --"wdt:P131"--> a1 a1 --"wdt:P131"--> c2 v2 --"wdt:P31"--> a2 a2 --"wdt:P279"--> c5 v3 --"schema:about"--> v2 v3 --"schema:isPartOf"--> c8 bind5[/"'Avec'"/] bind5 --as--o v6 bind6[/"count(?item)"/] v2 --o bind6 bind6 --as--o v6 end union0r <== or ==> union0l end