query-31a486cd5ecf2c7beeb821ef5c15ae5a

rq turtle/ttl

Hungarian names

Use at

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 ps: <http://www.wikidata.org/prop/statement/>
PREFIX p: <http://www.wikidata.org/prop/>
SELECT DISTINCT ?item ?enLabel ?huLabel ?nativeLabel ?nativeLabelLang WHERE {
  ?item p:P106/ps:P106/wdt:P279* wd:Q26270618; wdt:P27 wd:Q28 .
  ?item rdfs:label ?enLabel .
  FILTER(LANG(?enLabel) = 'en') .
  ?item rdfs:label ?huLabel .
  FILTER(LANG(?huLabel) = 'hu') .
  OPTIONAL {
    ?item wdt:P1559 ?nativeLabel .
    BIND(LANG(?nativeLabel) AS ?nativeLabelLang) .
  }
  FILTER(STR(?enLabel) = STR(?huLabel)) .
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v1("?enLabel"):::projected v2("?huLabel"):::projected v3("?item"):::projected v4("?nativeLabel"):::projected v5("?nativeLabelLang"):::projected a1((" ")) a2((" ")) c8(["wd:Q28"]):::iri c6(["wd:Q26270618"]):::iri f0[["str(?enLabel) = str(?huLabel)"]] f0 --> v1 f0 --> v2 f1[["?huLabel = 'hu'"]] f1 --> v2 f2[["?enLabel = 'en'"]] f2 --> v1 v3 --"p:P106"--> a1 a1 --"p:statement/P106"--> a2 a2 --"p:direct/P279"--> c6 v3 --"p:direct/P27"--> c8 v3 --"rdfs:label"--> v1 v3 --"rdfs:label"--> v2 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v3 -."p:direct/P1559".-> v4 bind3[/"?nativeLabel"/] v4 --o bind3 bind3 --as--o v5 end