query-2dfc046126ebc5c664d7ae85bd34ca51
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 ?itemLabel ?startTime ?endTime ?maintainedByWikiProjectLabel ?editionNr ?followsLabel ?followedByLabel ?officialWebsite ?logoImage
(GROUP_CONCAT(DISTINCT ?countryLabel; SEPARATOR = " | ") AS ?countries)
(GROUP_CONCAT(DISTINCT ?organizerLabel; SEPARATOR = " | ") AS ?organizers)
(GROUP_CONCAT(DISTINCT ?participantLabel; SEPARATOR = " | ") AS ?participants)
WHERE {
?item wdt:P179 wd:Q51845238.
OPTIONAL { ?item wdt:P580 ?startTime. }
OPTIONAL { ?item wdt:P582 ?endTime. }
OPTIONAL { ?item wdt:P6104 ?maintainedByWikiProject. }
OPTIONAL { ?item wdt:P393 ?editionNr. }
OPTIONAL { ?item wdt:P155 ?follows. }
OPTIONAL { ?item wdt:P156 ?followedBy. }
OPTIONAL { ?item wdt:P856 ?officialWebsite. }
OPTIONAL { ?item wdt:P154 ?logoImage. }
OPTIONAL { ?item wdt:P17 ?country. }
OPTIONAL { ?item wdt:P664 ?organizer. }
OPTIONAL { ?item wdt:P710 ?participant. }
SERVICE wikibase:label {
bd:serviceParam wikibase:language "de,en".
?item rdfs:label ?itemLabel.
?maintainedByWikiProject rdfs:label ?maintainedByWikiProjectLabel.
?follows rdfs:label ?followsLabel.
?followedBy rdfs:label ?followedByLabel.
?country rdfs:label ?countryLabel.
?organizer rdfs:label ?organizerLabel.
?participant rdfs:label ?participantLabel.
}
}
GROUP BY ?item ?itemLabel ?startTime ?endTime ?maintainedByWikiProjectLabel ?editionNr ?followsLabel ?followedByLabel ?officialWebsite ?logoImage
ORDER BY DESC(?startTime)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v20("?countries")
v10("?country")
v17("?countryLabel"):::projected
v5("?editionNr"):::projected
v3("?endTime"):::projected
v7("?followedBy")
v16("?followedByLabel"):::projected
v6("?follows")
v15("?followsLabel"):::projected
v2("?item"):::projected
v13("?itemLabel"):::projected
v9("?logoImage"):::projected
v4("?maintainedByWikiProject")
v14("?maintainedByWikiProjectLabel"):::projected
v8("?officialWebsite"):::projected
v11("?organizer")
v18("?organizerLabel"):::projected
v21("?organizers")
v12("?participant")
v19("?participantLabel"):::projected
v22("?participants")
v1("?startTime"):::projected
c15(["bd:serviceParam"]):::iri
c2(["wd:Q51845238"]):::iri
c17(["de,en"]):::literal
v2 --"wdt:P179"--> c2
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wdt:P580".-> v1
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wdt:P582".-> v3
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wdt:P6104".-> v4
end
subgraph optional3["(optional)"]
style optional3 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wdt:P393".-> v5
end
subgraph optional4["(optional)"]
style optional4 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wdt:P155".-> v6
end
subgraph optional5["(optional)"]
style optional5 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wdt:P156".-> v7
end
subgraph optional6["(optional)"]
style optional6 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wdt:P856".-> v8
end
subgraph optional7["(optional)"]
style optional7 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wdt:P154".-> v9
end
subgraph optional8["(optional)"]
style optional8 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wdt:P17".-> v10
end
subgraph optional9["(optional)"]
style optional9 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wdt:P664".-> v11
end
subgraph optional10["(optional)"]
style optional10 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wdt:P710".-> v12
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c15 --"wikibase:language"--> c17
v2 --"rdfs:label"--> v13
v4 --"rdfs:label"--> v14
v6 --"rdfs:label"--> v15
v7 --"rdfs:label"--> v16
v10 --"rdfs:label"--> v17
v11 --"rdfs:label"--> v18
v12 --"rdfs:label"--> v19
end
bind3[/"?countryLabel"/]
v17 --o bind3
bind3 --as--o v20
bind4[/"?organizerLabel"/]
v18 --o bind4
bind4 --as--o v21
bind5[/"?participantLabel"/]
v19 --o bind5
bind5 --as--o v22