query-63430d024a55eeb75edd5ff55af5f223

rq turtle/ttl

completeness P735/734 for visual artists SELECT (COUNT(DISTINCT ?item) as ?all) (COUNT(DISTINCT ?hasP735) as ?P735) (COUNT(DISTINCT ?hasP734) as ?P734) WHERE { ?item wdt:P106/wdt:P279* wd:Q3391743 . hint:Prior hint:gearing "forward".
OPTIONAL { ?item wdt:P735 [] . BIND(?item as ?hasP735) } OPTIONAL { ?item wdt:P734 [] . BIND(?item as ?hasP734) } }

Use at

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
# completeness P735/734 for visual artists
SELECT
  (COUNT(DISTINCT ?item) as ?all)
  (COUNT(DISTINCT ?hasP735) as ?P735)
  (COUNT(DISTINCT ?hasP734) as ?P734)
WHERE
{
    ?item wdt:P106/wdt:P279* wd:Q3391743 .

    OPTIONAL { ?item wdt:P735 [] . BIND(?item as ?hasP735) } 
    OPTIONAL { ?item wdt:P734 [] . BIND(?item as ?hasP734) } 
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v6("?P734") v5("?P735") v4("?all") v3("?hasP734"):::projected v2("?hasP735"):::projected v1("?item"):::projected a2((" ")) a3((" ")) a1((" ")) c3(["wd:Q3391743"]):::iri v1 --"wdt:P106"--> a1 a1 --"wdt:P279"--> c3 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P735".-> a2 bind0[/"?item"/] v1 --o bind0 bind0 --as--o v2 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P734".-> a3 bind1[/"?item"/] v1 --o bind1 bind1 --as--o v3 end bind5[/"count(?item)"/] v1 --o bind5 bind5 --as--o v4 bind6[/"count(?hasP735)"/] v2 --o bind6 bind6 --as--o v5 bind7[/"count(?hasP734)"/] v3 --o bind7 bind7 --as--o v6