query-bbfd0f59a13dcdcc26627dd0320276b0

rq turtle/ttl

Propertiestaxon synonym (P1420)instance of (P31)stated in (P248)of (P642)

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX prov: <http://www.w3.org/ns/prov#>
PREFIX pr: <http://www.wikidata.org/prop/reference/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?item ?itemLabel ?synonym ?synonymLabel ?ref ?refLabel WHERE {
  ?item p:P31 [
    ps:P31 wd:Q1040689;
    pq:P642 ?synonym;
    prov:wasDerivedFrom [
      pr:P248 ?ref
    ]
  ].
  ?synonym wdt:P1420 ?item. # only those matched with a reciprocal statement
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],mul,en". }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?item"):::projected v2("?ref"):::projected v1("?synonym"):::projected a1((" ")) a2((" ")) c2(["wd:Q1040689"]):::iri c9(["bd:serviceParam"]):::iri c11(["#91;AUTO_LANGUAGE#93;,mul,en"]):::literal a1 --"p:statement/P31"--> c2 a1 --"p:qualifier/P642"--> v1 a2 --"p:reference/P248"--> v2 a1 --"prov:wasDerivedFrom"--> a2 v3 --"p:P31"--> a1 v1 --"p:direct/P1420"--> v3 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c9 --"wikibase:language"--> c11 end