query-34252d9907dee0ed7b737ad5cf7509a4

rq turtle/ttl

title:Norske skip fra 1980+ uten IMO nr. eller MMSI nr. SELECT DISTINCT ?item ?itemLabel ?start ?end ?imo ?mmsi ?dnvgl ?article WHERE { ?item (wdt:P31/(wdt:P279*)) wd:Q11446; (wdt:P8047|wdt:P17) wd:Q20. OPTIONAL { ?item wdt:P729 ?start. } OPTIONAL { ?item wdt:P730 ?end. } OPTIONAL { ?item wdt:P458 ?imo. } OPTIONAL { ?article schema:about ?item; schema:isPartOf https://no.wikipedia.org/. } OPTIONAL { ?item wdt:P587 ?mmsi. } FILTER(!BOUND(?imo)) FILTER(!BOUND(?mmsi)) FILTER(?start >= "1980-01-01T00:00:00Z"^^xsd:dateTime) OPTIONAL { ?item wdt:P5006 ?dnvgl. } SERVICE wikibase:label { bd:serviceParam wikibase:language "nb,en". } } ORDER BY (?start) (?item)

Use at

PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX schema: <http://schema.org/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#title:Norske skip fra 1980+ uten IMO nr. eller MMSI nr.
SELECT DISTINCT ?item ?itemLabel ?start ?end ?imo ?mmsi ?dnvgl ?article WHERE {
  ?item (wdt:P31/(wdt:P279*)) wd:Q11446;
    (wdt:P8047|wdt:P17) wd:Q20.
  OPTIONAL { ?item wdt:P729 ?start. }
  OPTIONAL { ?item wdt:P730 ?end. }
  OPTIONAL { ?item wdt:P458 ?imo. }
  OPTIONAL {
    ?article schema:about ?item;
      schema:isPartOf <https://no.wikipedia.org/>.
  }
  OPTIONAL { ?item wdt:P587 ?mmsi. }
  FILTER(!BOUND(?imo))
  FILTER(!BOUND(?mmsi))
  FILTER(?start >= "1980-01-01T00:00:00Z"^^xsd:dateTime)
  OPTIONAL { ?item wdt:P5006 ?dnvgl. }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "nb,en". }
}
ORDER BY (?start) (?item)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v6("?article"):::projected v7("?dnvgl"):::projected v5("?end"):::projected v4("?imo"):::projected v2("?item"):::projected v3("?mmsi"):::projected v1("?start"):::projected a1((" ")) c6(["wd:Q20"]):::iri c17(["bd:serviceParam"]):::iri c13([https://no.wikipedia.org/]):::iri c19(["nb,en"]):::literal c4(["wd:Q11446"]):::iri f0[["?start >= '1980-01-01T00:00:00Z^^xsd:dateTime'"]] f0 --> v1 f1[["not bound(?mmsi)"]] f1 --> v3 f2[["not bound(?imo)"]] f2 --> v4 v2 --"wdt:P31"--> a1 a1 --"wdt:P279"--> c4 subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; v2 --"wdt:P17"--> c6 end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; v2 --"wdt:P8047"--> c6 end union0r <== or ==> union0l end subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P729".-> v1 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P730".-> v5 end subgraph optional2["(optional)"] style optional2 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P458".-> v4 end subgraph optional3["(optional)"] style optional3 fill:#bbf,stroke-dasharray: 5 5; v6 -."schema:about".-> v2 v6 --"schema:isPartOf"--> c13 end subgraph optional4["(optional)"] style optional4 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P587".-> v3 end subgraph optional5["(optional)"] style optional5 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P5006".-> v7 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c17 --"wikibase:language"--> c19 end