query-51d461cdb15e9b1a6ff7808a109db7b2

rq turtle/ttl

Compare usage of qualifier P1 with values Q1 and Q2

Use at

PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
select * {
  {
    select (count(distinct ?s) AS ?count_1) {
      ?s pq:1 wd:Q1.
    }
  }
  {
    select (count(distinct ?s) AS ?count_2) {
      ?s pq:1 wd:Q2.
    }
  }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v2("?count_1"):::projected v3("?count_2"):::projected v1("?s") c2(["wd:Q1"]):::iri c3(["wd:Q2"]):::iri v1 --"pq:1"--> c2 bind1[/"count(?s)"/] v1 --o bind1 bind1 --as--o v2 v1 --"pq:1"--> c3 bind3[/"count(?s)"/] v1 --o bind3 bind3 --as--o v3