query-1aec3ff531ad3f92615cb5b7c887f5e6

rq turtle/ttl

Ships built in Finland

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 rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?label ?description ?imo (GROUP_CONCAT(DISTINCT ?manufacturer_name;separator=", ") AS ?manufacturer_names) (GROUP_CONCAT(DISTINCT ?location_of_creation_name;separator=", ") AS ?location_of_creation_names) ?yard_number (GROUP_CONCAT(DISTINCT ?iol;separator=", ") AS ?instance_ofs) ?service_entry {
  {
    SELECT * {
      VALUES ?manufacturer_list {wd:Q327429 wd:Q11874481 wd:Q4117007 wd:Q11887488 wd:Q2944983 wd:Q17334709 wd:Q18688797 wd:Q12358532 wd:Q11890180 wd:Q21927194 wd:Q7943682 wd:Q30638410 wd:Q1524298 wd:Q12358532 wd:Q65072048 wd:Q1278953 wd:Q3817603 wd:Q105019750 wd:Q7224811 wd:Q98204447 wd:Q18688871 wd:Q1197161 wd:Q43082510 wd:Q113458692 wd:Q112845005 wd:Q112653321 wd:Q124485935}
      ?item wdt:P176 ?manufacturer_list .
      OPTIONAL { ?item wdt:P458 ?imo . }
      OPTIONAL { ?item wdt:P176 ?manufacturer . }
      OPTIONAL { ?item wdt:P1071 ?location_of_creation . }
      OPTIONAL { ?item wdt:P729 ?service_entry . }
      OPTIONAL { ?item wdt:P617 ?yard_number . }
      OPTIONAL { ?item wdt:P31 ?instance_of . }
       FILTER(?instance_of not in (wd:Q118017625, wd:Q15057021, wd:Q15057020, wd:Q559026, wd:Q19832486, wd:Q15142894, wd:Q15056995, wd:Q34336, wd:Q55725952, wd:Q811704, wd:Q376, wd:Q11436, wd:Q76154857, wd:Q121289722, wd:Q15056993, wd:Q18758641, wd:Q63040754)).
    }
  }
  SERVICE wikibase:label {
    bd:serviceParam wikibase:language "en" .
    ?item rdfs:label ?label . ?item schema:description ?description . ?instance_of rdfs:label ?iol . ?manufacturer rdfs:label ?manufacturer_name . ?location_of_creation rdfs:label ?location_of_creation_name
  }
}
GROUP BY ?item ?label ?description ?imo ?yard_number ?service_entry
ORDER BY xsd:integer(?yard_number)
#ORDER BY DESC(?service_entry)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v10("?description"):::projected v5("?imo"):::projected v2("?instance_of") v16("?instance_ofs") v11("?iol"):::projected v4("?item"):::projected v9("?label"):::projected v7("?location_of_creation") v13("?location_of_creation_name"):::projected v15("?location_of_creation_names") v6("?manufacturer") v3("?manufacturer_list") v12("?manufacturer_name"):::projected v14("?manufacturer_names") v8("?service_entry"):::projected v1("?yard_number"):::projected c25(["bd:serviceParam"]):::iri c27(["en"]):::literal f0[["?instance_of != 'wd:Q118017625'?instance_of != 'wd:Q15057021'?instance_of != 'wd:Q15057020'?instance_of != 'wd:Q559026'?instance_of != 'wd:Q19832486'?instance_of != 'wd:Q15142894'?instance_of != 'wd:Q15056995'?instance_of != 'wd:Q34336'?instance_of != 'wd:Q55725952'?instance_of != 'wd:Q811704'?instance_of != 'wd:Q376'?instance_of != 'wd:Q11436'?instance_of != 'wd:Q76154857'?instance_of != 'wd:Q121289722'?instance_of != 'wd:Q15056993'?instance_of != 'wd:Q18758641'?instance_of != 'wd:Q63040754'"]] f0 --> v2 bind1[/VALUES ?manufacturer_list/] bind1-->v3 bind10(["wd:Q327429"]) bind10 --> bind1 bind11(["wd:Q11874481"]) bind11 --> bind1 bind12(["wd:Q4117007"]) bind12 --> bind1 bind13(["wd:Q11887488"]) bind13 --> bind1 bind14(["wd:Q2944983"]) bind14 --> bind1 bind15(["wd:Q17334709"]) bind15 --> bind1 bind16(["wd:Q18688797"]) bind16 --> bind1 bind17(["wd:Q12358532"]) bind17 --> bind1 bind18(["wd:Q11890180"]) bind18 --> bind1 bind19(["wd:Q21927194"]) bind19 --> bind1 bind110(["wd:Q7943682"]) bind110 --> bind1 bind111(["wd:Q30638410"]) bind111 --> bind1 bind112(["wd:Q1524298"]) bind112 --> bind1 bind113(["wd:Q12358532"]) bind113 --> bind1 bind114(["wd:Q65072048"]) bind114 --> bind1 bind115(["wd:Q1278953"]) bind115 --> bind1 bind116(["wd:Q3817603"]) bind116 --> bind1 bind117(["wd:Q105019750"]) bind117 --> bind1 bind118(["wd:Q7224811"]) bind118 --> bind1 bind119(["wd:Q98204447"]) bind119 --> bind1 bind120(["wd:Q18688871"]) bind120 --> bind1 bind121(["wd:Q1197161"]) bind121 --> bind1 bind122(["wd:Q43082510"]) bind122 --> bind1 bind123(["wd:Q113458692"]) bind123 --> bind1 bind124(["wd:Q112845005"]) bind124 --> bind1 bind125(["wd:Q112653321"]) bind125 --> bind1 bind126(["wd:Q124485935"]) bind126 --> bind1 v4 --"wdt:P176"--> v3 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v4 -."wdt:P458".-> v5 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v4 -."wdt:P176".-> v6 end subgraph optional2["(optional)"] style optional2 fill:#bbf,stroke-dasharray: 5 5; v4 -."wdt:P1071".-> v7 end subgraph optional3["(optional)"] style optional3 fill:#bbf,stroke-dasharray: 5 5; v4 -."wdt:P729".-> v8 end subgraph optional4["(optional)"] style optional4 fill:#bbf,stroke-dasharray: 5 5; v4 -."wdt:P617".-> v1 end subgraph optional5["(optional)"] style optional5 fill:#bbf,stroke-dasharray: 5 5; v4 -."wdt:P31".-> v2 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c25 --"wikibase:language"--> c27 v4 --"rdfs:label"--> v9 v4 --"schema:description"--> v10 v2 --"rdfs:label"--> v11 v6 --"rdfs:label"--> v12 v7 --"rdfs:label"--> v13 end bind5[/"?manufacturer_name"/] v12 --o bind5 bind5 --as--o v14 bind6[/"?location_of_creation_name"/] v13 --o bind6 bind6 --as--o v15 bind7[/"?iol"/] v11 --o bind7 bind7 --as--o v16