query-2ed652e274c70dbde7ef4a275437dd1e

rq turtle/ttl

TODO

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?item ?itemLabel (count (?memberOf) AS ?cG) (count (?memberOfPP) AS ?cP) (count (?source) AS ?cR) WHERE {
  {
    VALUES ?memberOf { a bunch of wd:Q… }.
    ?item wdt:P463 ?memberOf.
  }
  UNION
  {
    VALUES ?memberOfPP { another bunch of wd:Q… }.
    ?item wdt:P102 ?memberOfPP.
  }
  UNION
  {
    SELECT DISTINCT ?source ?item WHERE {
      {
        VALUES ?memberOf { a bunch of wd:Q… again }.
        ?source wdt:P463 ?memberOf.
      }
      UNION
      {
        VALUES ?memberOfPP { another bunch of wd:Q… again }.
        ?source wdt:P102 ?memberOfPP.
      }
      ?item ^(wdt:P22|wdt:P25|wdt:P26|wdt:P40|wdt:P451|wdt:P1038|wdt:P3373|wdt:P3448) ?source.
    }
  }
  SERVICE wikibase:label {bd:serviceParam wikibase:language "fr,en". }
} GROUP BY ?item ?itemLabel ?cR

Query found at