query-29d1b4887db4bfa790306e9693a44298

rq turtle/ttl

Propertiesauthor (P50)instance of (P31)

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 ?workLabel ?work ?collectivePseudonymLabel ?collectivePseudonym ?humanLabel ?human ?evidence
WHERE {
  ?evidence schema:about ?work.
  ?work wdt:P50 ?collectivePseudonym;
        wdt:P50 ?human.
  ?collectivePseudonym wdt:P31 wd:Q16017119.
  ?human wdt:P31 wd:Q5.
  {
    ?work ?workhumanrelationship ?human.
    ?collectivePseudonym ?p ?human
  }
  UNION
  {
    ?work ?workhumanrelationship ?human.
    ?human ?p ?collectivePseudonym
  }
  FILTER regex(STR(?evidence), 'https://en.wikipedia.org/wiki/')
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en" }
}
ORDER BY ?enWorkLabel
LIMIT 100

Query found at

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