query-2b3d80508103e199b6132ba5b918462e
TEMPLATE={"template":"Information about the ?series video games series","variables":{"?series":{"query":" SELECT ?id WHERE { ?id wdt:P31 wd:Q7058673. }"} } } SELECT ?series ?seriesLabel ?first_gameLabel ?first_game_date ?latest_gameLabel (GROUP_CONCAT(DISTINCT ?genreLabel; SEPARATOR = ", ") AS ?genres) (GROUP_CONCAT(DISTINCT ?platformLabel; SEPARATOR = ", ") AS ?platforms) (GROUP_CONCAT(DISTINCT ?developerLabel; SEPARATOR = ", ") AS ?developers) WHERE { BIND(wd:Q289129 AS ?series) OPTIONAL { ?series wdt:P136 ?genre. ?genre rdfs:label ?genreLabel. FILTER((LANG(?genreLabel)) = "en") } ?games wdt:P179 ?series; wdt:P400 ?platform; wdt:P178 ?developer. OPTIONAL { ?first_game p:P179 ?seriesStatement. ?seriesStatement ps:P179 ?series; rdf:type wdno:P155. ?first_game wdt:P577 ?first_game_date } OPTIONAL { ?latest_game p:P179 ?seriesStatement2. ?seriesStatement2 ps:P179 ?series; rdf:type wdno:P156. ?latest_game wdt:P577 ?latest_game_date } ?platform rdfs:label ?platformLabel. FILTER((LANG(?platformLabel)) = "en") ?developer rdfs:label ?developerLabel. FILTER((LANG(?developerLabel)) = "en") SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } } GROUP BY ?series ?seriesLabel ?first_gameLabel ?first_game_date ?latest_gameLabel
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wdno: <http://www.wikidata.org/prop/novalue/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#TEMPLATE={"template":"Information about the ?series video games series","variables":{"?series":{"query":" SELECT ?id WHERE { ?id wdt:P31 wd:Q7058673. }"} } }
SELECT ?series ?seriesLabel ?first_gameLabel ?first_game_date ?latest_gameLabel
(GROUP_CONCAT(DISTINCT ?genreLabel; SEPARATOR = ", ") AS ?genres)
(GROUP_CONCAT(DISTINCT ?platformLabel; SEPARATOR = ", ") AS ?platforms) (GROUP_CONCAT(DISTINCT ?developerLabel; SEPARATOR = ", ") AS ?developers)
WHERE {
BIND(wd:Q289129 AS ?series)
OPTIONAL {
?series wdt:P136 ?genre.
?genre rdfs:label ?genreLabel.
FILTER((LANG(?genreLabel)) = "en")
}
?games wdt:P179 ?series;
wdt:P400 ?platform;
wdt:P178 ?developer.
OPTIONAL {
?first_game p:P179 ?seriesStatement.
?seriesStatement ps:P179 ?series;
rdf:type wdno:P155.
?first_game wdt:P577 ?first_game_date
}
OPTIONAL {
?latest_game p:P179 ?seriesStatement2.
?seriesStatement2 ps:P179 ?series;
rdf:type wdno:P156.
?latest_game wdt:P577 ?latest_game_date
}
?platform rdfs:label ?platformLabel.
FILTER((LANG(?platformLabel)) = "en")
?developer rdfs:label ?developerLabel.
FILTER((LANG(?developerLabel)) = "en")
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
GROUP BY ?series ?seriesLabel ?first_gameLabel ?first_game_date ?latest_gameLabel