query-2174c2ddaf66e8e64a71357a24f43d4a
TODO
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 rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?Label ?instance ?instanceLabel ?year ?height ?length ?isleLabel_c ?isle_c
where
{ { select ?item (group_concat(?isle;separator=", ") as ?isle_c) (group_concat(?isleLabel;separator=", ") as ?isleLabel_c) WHERE {
?item wdt:P31/wdt:P279* wd:Q44377.
?item wdt:P17 wd:Q4628.
OPTIONAL { ?item wdt:P5130 ?isle.
SERVICE wikibase:label
{ bd:serviceParam wikibase:language "fr,en,fo,dk".
?isle rdfs:label ?isleLabel.
}
}
} group by ?item } OPTIONAL { ?item wdt:P31 ?instance.
SERVICE wikibase:label
{ bd:serviceParam wikibase:language "fr,en,fo,dk".
?instance rdfs:label ?instanceLabel.
}
}
OPTIONAL { ?item wdt:P580 ?annee_debut_0. }
OPTIONAL { ?item wdt:P571 ?annee_debut_1. }
OPTIONAL { ?item wdt:P1619 ?annee_debut_2. }
BIND(COALESCE(STR(YEAR(?annee_debut_2)), STR(YEAR(?annee_debut_1)), STR(YEAR(?annee_debut_0))) AS ?year)
OPTIONAL { ?item wdt:P2048 ?height. }
OPTIONAL { ?item wdt:P2043 ?length. }
SERVICE wikibase:label
{ bd:serviceParam wikibase:language "fr,en,fo,dk".
?item rdfs:label ?Label.
}
}
#GROUP BY ?item ?label
LIMIT 100
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v14("?Label"):::projected
v8("?annee_debut_0")
v9("?annee_debut_1")
v10("?annee_debut_2")
v12("?height"):::projected
v6("?instance"):::projected
v7("?instanceLabel"):::projected
v2("?isle")
v3("?isleLabel")
v5("?isleLabel_c"):::projected
v4("?isle_c"):::projected
v1("?item"):::projected
v13("?length"):::projected
v11("?year"):::projected
a1((" "))
c5(["wd:Q4628"]):::iri
c10(["fr,en,fo,dk"]):::literal
c3(["wd:Q44377"]):::iri
c8(["bd:serviceParam"]):::iri
v1 --"wdt:P31"--> a1
a1 --"wdt:P279"--> c3
v1 --"wdt:P17"--> c5
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P5130".-> v2
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c8 --"wikibase:language"--> c10
v2 --"rdfs:label"--> v3
end
end
bind2[/"?isle"/]
v2 --o bind2
bind2 --as--o v4
bind3[/"?isleLabel"/]
v3 --o bind3
bind3 --as--o v5
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P31".-> v6
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c8 --"wikibase:language"--> c10
v6 --"rdfs:label"--> v7
end
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P580".-> v8
end
subgraph optional3["(optional)"]
style optional3 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P571".-> v9
end
subgraph optional4["(optional)"]
style optional4 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P1619".-> v10
end
bind4[/"str(year-from-dateTime(?annee_debut_2))str(year-from-dateTime(?annee_debut_1))str(year-from-dateTime(?annee_debut_0))"/]
v10 --o bind4
v9 --o bind4
v8 --o bind4
bind4 --as--o v11
subgraph optional5["(optional)"]
style optional5 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P2048".-> v12
end
subgraph optional6["(optional)"]
style optional6 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P2043".-> v13
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c8 --"wikibase:language"--> c10
v1 --"rdfs:label"--> v14
end