query-ff48bf39c9a8504b1deb220005359edc

rq turtle/ttl

Norske skip med tittel som starter på 'MS' SELECT DISTINCT ?item ?itemLabel ?itemDesc ?imonr WHERE { ?item wdt:P31/wdt:P279* wd:Q11446; wdt:P8047|wdt:P17 wd:Q20. OPTIONAL { ?item wdt:P458 ?imonr. } ?item rdfs:label ?itemLabel. FILTER(LANG(?itemLabel) = "nb") FILTER(REGEX(?itemLabel, "^MS")) OPTIONAL { ?item schema:description ?itemDesc. FILTER(LANG(?itemDesc) = "nb") } } ORDER BY ?item

Use at

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX schema: <http://schema.org/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
# Norske skip med tittel som starter på 'MS'
SELECT DISTINCT ?item ?itemLabel ?itemDesc ?imonr
WHERE {
  ?item wdt:P31/wdt:P279* wd:Q11446;
    wdt:P8047|wdt:P17 wd:Q20.
  OPTIONAL { ?item wdt:P458 ?imonr. }
  ?item rdfs:label ?itemLabel.
  FILTER(LANG(?itemLabel) = "nb")
  FILTER(REGEX(?itemLabel, "^MS"))
  OPTIONAL {
    ?item schema:description ?itemDesc.
    FILTER(LANG(?itemDesc) = "nb")
  }
}
ORDER BY ?item

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v4("?imonr"):::projected v1("?item"):::projected v3("?itemDesc"):::projected v2("?itemLabel"):::projected a1((" ")) c7(["wd:Q20"]):::iri c5(["wd:Q11446"]):::iri f0[["regex(?itemLabel,'^MS')"]] f0 --> v2 f1[["?itemLabel = 'nb'"]] f1 --> v2 v1 --"wdt:P31"--> a1 a1 --"wdt:P279"--> c5 subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; v1 --"wdt:P17"--> c7 end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; v1 --"wdt:P8047"--> c7 end union0r <== or ==> union0l end subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P458".-> v4 end v1 --"rdfs:label"--> v2 subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v1 -."schema:description".-> v3 end