query-ecfb01e37b64d39e1e8b484250e52945
Below is a query yielding a similar table to the main page, but with columns for Brahui, Hindko, Torwali, and Khowar:
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX dct: <http://purl.org/dc/terms/>
select distinct ?l ?lfa ?l1 ?lbrh ?l2 ?lhno ?l3 ?ltrw ?l4 ?lkhw
where {
{
select ?l ?lfa {
values ?l {
# lexeme IDs from the first column of the main table go here
}
?l wikibase:lemma ?lfa . filter(lang(?lfa)="fa")
}
}.
optional { ?l1 dct:language wd:Q33202 ; wikibase:lemma ?lbrh ; wdt:P5191 ?l . filter(lang(?lbrh)="brh") }
optional { ?l2 dct:language wd:Q382273 ; wikibase:lemma ?lhno ; wdt:P5191 ?l . filter(lang(?lhno)="hno") }
optional { ?l3 dct:language wd:Q2665246 ; wikibase:lemma ?ltrw ; wdt:P5191 ?l . filter(lang(?ltrw)="trw") }
optional { ?l4 dct:language wd:Q938216 ; wikibase:lemma ?lkhw ; wdt:P5191 ?l . filter(lang(?lkhw)="khw") }
filter(bound(?l1)|| bound(?l2) || bound(?l3) || bound(?l4))
} order by str(?lemma)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v11("?l"):::projected
v2("?l1"):::projected
v3("?l2"):::projected
v4("?l3"):::projected
v5("?l4"):::projected
v9("?lbrh"):::projected
v1("?lemma")
v10("?lfa"):::projected
v8("?lhno"):::projected
v6("?lkhw"):::projected
v7("?ltrw"):::projected
c11(["wd:Q2665246"]):::iri
c8(["wd:Q33202"]):::iri
c10(["wd:Q382273"]):::iri
c12(["wd:Q938216"]):::iri
f0[["(bound(?l1) || (bound(?l2) || (bound(?l3) || bound(?l4))))"]]
f0 --> v2
f0 --> v3
f0 --> v4
f0 --> v5
f1[["?lfa = 'fa'"]]
f1 --> v10
bind2[/VALUES ?l/]
bind2-->v11
v11 --"wikibase:lemma"--> v10
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v2 -."dct:language".-> c8
v2 --"wikibase:lemma"--> v9
v2 --"wdt:P5191"--> v11
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v3 -."dct:language".-> c10
v3 --"wikibase:lemma"--> v8
v3 --"wdt:P5191"--> v11
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v4 -."dct:language".-> c11
v4 --"wikibase:lemma"--> v7
v4 --"wdt:P5191"--> v11
end
subgraph optional3["(optional)"]
style optional3 fill:#bbf,stroke-dasharray: 5 5;
v5 -."dct:language".-> c12
v5 --"wikibase:lemma"--> v6
v5 --"wdt:P5191"--> v11
end