query-5ca704c0020c8f034919820a16b0544d

rq turtle/ttl

Écrivains sans idref : (P269)IdRef ID Wikidata items for writers with more than one interwiki and without a

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX schema: <http://schema.org/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT distinct ?s ?writer ?sitelink ?linkcount
WHERE
{
  {?s wdt:P106 wd:Q36180 .} UNION { ?s wdt:P106 wd:Q482980 . } UNION { ?s wdt:P106 wd:Q49757 . }
  ?s wdt:P27 wd:Q142 .
  ?s wikibase:sitelinks ?linkcount .
  { ?sitelink schema:about ?s . ?sitelink schema:inLanguage "fr" . ?sitelink schema:isPartOf <https://fr.wikipedia.org/> .}
  MINUS { ?s wdt:P269 [] } .
  OPTIONAL {
     ?s rdfs:label ?writer filter (lang(?writer) = "fr").
   }
} GROUP BY ?s ?writer ?sitelink ?linkcount HAVING (?linkcount > 1) ORDER BY DESC(?linkcount)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v1("?linkcount"):::projected v3("?s"):::projected v4("?sitelink"):::projected v2("?writer"):::projected a1((" ")) c13([https://fr.wikipedia.org/]):::iri c2(["fr"]):::literal c6(["wd:Q49757"]):::iri c4(["wd:Q36180"]):::iri c5(["wd:Q482980"]):::iri c8(["wd:Q142"]):::iri f0[["?linkcount > '1^^xsd:integer'"]] f0 --> v1 subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; subgraph union1[" Union "] subgraph union1l[" "] style union1l fill:#abf,stroke-dasharray: 3 3; v3 --"wdt:P106"--> c6 end subgraph union1r[" "] style union1r fill:#abf,stroke-dasharray: 3 3; v3 --"wdt:P106"--> c5 end union1r <== or ==> union1l end end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; v3 --"wdt:P106"--> c4 end union0r <== or ==> union0l end v3 --"wdt:P27"--> c8 v3 --"wikibase:sitelinks"--> v1 v4 --"schema:about"--> v3 v4 --"schema:inLanguage"--> c2 v4 --"schema:isPartOf"--> c13 subgraph minus1["MINUS"] style minus1 stroke-width:6px,fill:pink,stroke:red; v3 --"wdt:P269"--> a1 end subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v3 -."rdfs:label".-> v2 end