query-aba60ba120691c0bb2883778ab59b53d

rq turtle/ttl

Propertiesauthor (P50)instance of (P31)subclass of (P279)

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 bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?collectivePseudonymLabel ?collectivePseudonym ?humanLabel ?human ?evidence
WHERE {
  ?evidence schema:about ?collectivePseudonym.
  ?work wdt:P50 ?collectivePseudonym.
  ?collectivePseudonym wdt:P31 wd:Q16017119.
  MINUS {?collectivePseudonym wdt:P31/wdt:P279* wd:Q10648343}
  ?human wdt:P31 wd:Q5.
  { ?collectivePseudonym ?p ?human }
  UNION
  { ?human ?p ?collectivePseudonym }
  FILTER regex(STR(?evidence), 'https://en.wikipedia.org/wiki/')
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en" }
}
ORDER BY ?collectivePseudonym ?human
LIMIT 100

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v1("?collectivePseudonym"):::projected v3("?evidence"):::projected v2("?human"):::projected v5("?p") v4("?work") a1((" ")) c10(["bd:serviceParam"]):::iri c8(["wd:Q5"]):::iri c12(["en"]):::literal c7(["wd:Q10648343"]):::iri c5(["wd:Q16017119"]):::iri f0[["regex(str(?evidence),'https://en.wikipedia.org/wiki/')"]] f0 --> v3 v3 --"schema:about"--> v1 v4 --"wdt:P50"--> v1 v1 --"wdt:P31"--> c5 subgraph minus1["MINUS"] style minus1 stroke-width:6px,fill:pink,stroke:red; v1 --"wdt:P31"--> a1 a1 --"wdt:P279"--> c7 end v2 --"wdt:P31"--> c8 subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; v2 -->v5--> v1 end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; v1 -->v5--> v2 end union0r <== or ==> union0l end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c10 --"wikibase:language"--> c12 end