query-3974bb41715b5eb8f53dc93e3a4c8bc7

rq turtle/ttl

dane dla drzewka pochodzenia gatunku SELECT DISTINCT ?u ?p ?uLabel ?n ?s ?sLabel ?sLatin WHERE { wd:Q780 wdt:P171* ?u . ?u wdt:P171 ?p . ?u wdt:P225 ?n . { ?u wdt:P31 wd:Q16521 } UNION { ?u wdt:P31 wd:Q310890 } UNION { ?u wdt:P31 wd:Q713623 } UNION { ?u wdt:P31 wd:Q23038290 } OPTIONAL { ?u wdt:P105 ?s OPTIONAL { ?s rdfs:label ?sLatin filter (lang(?sLatin) = "la").} } SERVICE wikibase:label { bd:serviceParam wikibase:language "pl" . } }

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX bd: <http://www.bigdata.com/rdf#>
# dane dla drzewka pochodzenia gatunku
SELECT DISTINCT ?u ?p ?uLabel ?n ?s ?sLabel ?sLatin WHERE {
  wd:Q780 wdt:P171* ?u .
  ?u wdt:P171 ?p .
  ?u wdt:P225 ?n .
  { ?u wdt:P31 wd:Q16521 } UNION { ?u wdt:P31 wd:Q310890 } UNION { ?u wdt:P31 wd:Q713623 } UNION { ?u wdt:P31 wd:Q23038290 }
  OPTIONAL { ?u wdt:P105 ?s OPTIONAL { ?s rdfs:label ?sLatin filter (lang(?sLatin) = "la").} }
  SERVICE wikibase:label {
    bd:serviceParam wikibase:language "pl" .
  }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?n"):::projected v2("?p"):::projected v5("?s"):::projected v4("?sLatin"):::projected v1("?u"):::projected c8(["wd:Q23038290"]):::iri c6(["wd:Q310890"]):::iri c13(["bd:serviceParam"]):::iri c5(["wd:Q16521"]):::iri c15(["pl"]):::literal c7(["wd:Q713623"]):::iri c1(["wd:Q780"]):::iri c1 --"wdt:P171"--> v1 v1 --"wdt:P171"--> v2 v1 --"wdt:P225"--> v3 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; subgraph union2[" Union "] subgraph union2l[" "] style union2l fill:#abf,stroke-dasharray: 3 3; v1 --"wdt:P31"--> c8 end subgraph union2r[" "] style union2r fill:#abf,stroke-dasharray: 3 3; v1 --"wdt:P31"--> c7 end union2r <== or ==> union2l end end subgraph union1r[" "] style union1r fill:#abf,stroke-dasharray: 3 3; v1 --"wdt:P31"--> c6 end union1r <== or ==> union1l end end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; v1 --"wdt:P31"--> c5 end union0r <== or ==> union0l end subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P105".-> v5 subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v5 -."rdfs:label".-> v4 end end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c13 --"wikibase:language"--> c15 end