query-9ac513d653d5e759277fcd4f4eebd9da

rq turtle/ttl

TODO

Use at

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
SELECT ?item ?ebird ?ababird ?match WHERE {
   {
  SELECT ?item WHERE {
    { ?item wdt:P3444 [] } UNION { ?item wdt:P4526 [] }
  }
}.
  OPTIONAL { ?item wdt:P3444 ?ebird }
  OPTIONAL { ?item wdt:P4526 ?ababird }
  BIND(IF(?ebird = ?ababird, 'same', 'different') AS ?match) .
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?ababird"):::projected v2("?ebird"):::projected v1("?item"):::projected v4("?match"):::projected a1((" ")) a2((" ")) subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; v1 --"wdt:P4526"--> a2 end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; v1 --"wdt:P3444"--> a1 end union0r <== or ==> union0l end subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P3444".-> v2 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P4526".-> v3 end bind0[/"if(?ebird = ?ababird,'same','different')"/] v2 --o bind0 v3 --o bind0 bind0 --as--o v4