query-3c449719094875a6b0557accec43497e

rq turtle/ttl

Norske skip bygget i 1990 eller senere PREFIX sdir: https://www.sdir.no/skipssok/#/?q= PREFIX martr: https://www.marinetraffic.com/en/ais/details/ships/imo: PREFIX nais: https://nais.kystverket.no/aisstream/

SELECT DISTINCT ?itemLabel (YEAR(?start_) AS ?start) (YEAR(?end_) AS ?end) ?imo ?mmsi ?item (URI(CONCAT(STR(martr:), ?imo)) AS ?martr) (URI(CONCAT(STR(sdir:), ?imo)) AS ?sdir) (URI(CONCAT(STR(nais:), ?mmsi)) AS ?nais) WHERE { ?item wdt:P31/wdt:P279* wd:Q11446; wdt:P8047 wd:Q20. OPTIONAL { ?item wdt:P729 ?start_. } OPTIONAL { ?item wdt:P730 ?end_. } OPTIONAL { ?item wdt:P176 ?manufacturer. } OPTIONAL { ?item wdt:P458 ?imo. } OPTIONAL { ?item wdt:P587 ?mmsi. } FILTER (?start_ >= "1990-01-01"^^xsd:dateTime) SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } } ORDER BY DESC(?start_)

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 bd: <http://www.bigdata.com/rdf#>
# Norske skip bygget i 1990 eller senere
PREFIX sdir: <https://www.sdir.no/skipssok/#/?q=>
PREFIX martr: <https://www.marinetraffic.com/en/ais/details/ships/imo:>
PREFIX nais: <https://nais.kystverket.no/aisstream/>

SELECT DISTINCT
  ?itemLabel (YEAR(?start_) AS ?start) (YEAR(?end_) AS ?end) ?imo ?mmsi ?item 
  (URI(CONCAT(STR(martr:), ?imo)) AS ?martr)
  (URI(CONCAT(STR(sdir:), ?imo)) AS ?sdir)
  (URI(CONCAT(STR(nais:), ?mmsi)) AS ?nais)
WHERE {
  ?item wdt:P31/wdt:P279* wd:Q11446;
    wdt:P8047 wd:Q20.
  OPTIONAL { ?item wdt:P729 ?start_. }
  OPTIONAL { ?item wdt:P730 ?end_. }
  OPTIONAL { ?item wdt:P176 ?manufacturer. }
  OPTIONAL { ?item wdt:P458 ?imo. }
  OPTIONAL { ?item wdt:P587 ?mmsi. }
  FILTER (?start_ >= "1990-01-01"^^xsd:dat)
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY DESC(?start_)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v8("?end") v3("?end_"):::projected v5("?imo"):::projected v2("?item"):::projected v4("?manufacturer") v9("?martr") v6("?mmsi"):::projected v11("?nais") v10("?sdir") v7("?start") v1("?start_"):::projected a1((" ")) c6(["wd:Q20"]):::iri c13(["bd:serviceParam"]):::iri c15(["#91;AUTO_LANGUAGE#93;,en"]):::literal c4(["wd:Q11446"]):::iri f0[["?start_ >= s1990-01-01^^<http://www.w3.org/2001/XMLSchema#dat>'"]] f0 --> v1 v2 --"wdt:P31"--> a1 a1 --"wdt:P279"--> c4 v2 --"wdt:P8047"--> c6 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".-> v3 end subgraph optional2["(optional)"] style optional2 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P176".-> v4 end subgraph optional3["(optional)"] style optional3 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P458".-> v5 end subgraph optional4["(optional)"] style optional4 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P587".-> v6 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c13 --"wikibase:language"--> c15 end bind1[/"year-from-dateTime(?start_)"/] v1 --o bind1 bind1 --as--o v7 bind2[/"year-from-dateTime(?end_)"/] v3 --o bind2 bind2 --as--o v8 bind3[/"concat(str(https://www.marinetraffic.com/en/ais/details/ships/imo:),?imo)"/] v5 --o bind3 bind3 --as--o v9 bind4[/"concat(str(https://www.sdir.no/skipssok/#/?q=),?imo)"/] v5 --o bind4 bind4 --as--o v10 bind5[/"concat(str(https://nais.kystverket.no/aisstream/),?mmsi)"/] v6 --o bind5 bind5 --as--o v11