query-88c381839e1a1047a83cb5974f4ac40d
title:NRK TV ID SELECT ?item ?itemLabel ?itemDescription ?nrkid WHERE { { ?item (wdt:P449|wdt:P162) wd:Q190238. } UNION { ?item (wdt:P449|wdt:P162) wd:Q1025656. } OPTIONAL { ?item wdt:P9979 ?nrkid. } SERVICE wikibase:label { bd:serviceParam wikibase:language "nb,en". } }
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 bd: <http://www.bigdata.com/rdf#>
#title:NRK TV ID
SELECT ?item ?itemLabel ?itemDescription ?nrkid WHERE {
{ ?item (wdt:P449|wdt:P162) wd:Q190238. }
UNION
{ ?item (wdt:P449|wdt:P162) wd:Q1025656. }
OPTIONAL { ?item wdt:P9979 ?nrkid. }
SERVICE wikibase:label { bd:serviceParam wikibase:language "nb,en". }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?item"):::projected
v2("?nrkid"):::projected
c2(["wd:Q190238"]):::iri
c4(["wd:Q1025656"]):::iri
c7(["bd:serviceParam"]):::iri
c9(["nb,en"]):::literal
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;
v1 --"wdt:P162"--> c4
end
subgraph union1r[" "]
style union1r fill:#abf,stroke-dasharray: 3 3;
v1 --"wdt:P449"--> c4
end
union1r <== or ==> union1l
end
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
subgraph union2[" Union "]
subgraph union2l[" "]
style union2l fill:#abf,stroke-dasharray: 3 3;
v1 --"wdt:P162"--> c2
end
subgraph union2r[" "]
style union2r fill:#abf,stroke-dasharray: 3 3;
v1 --"wdt:P449"--> c2
end
union2r <== or ==> union2l
end
end
union0r <== or ==> union0l
end
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P9979".-> v2
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c7 --"wikibase:language"--> c9
end