query-056f857154f9a84e4a4e33e3c05d532a
Series display items. (Q7058673)video game series I would like to enrich the display on : (Q99431276)Dark Souls Currently, it would display the games part of the series ; on eg (2016)(Q20112508)Dark Souls III (2014)(Q3702740)Dark Souls II (2011)(Q1166232)Dark Souls . With the same example that would be: (P8646)expansion of ) to enrich that with the expansions of each game (the things linked to each item with what IGDB doesI would like (inspired by (Q55381943)Dark Souls III: The Ringed City (Q113283443)Dark Souls III: Ashes of Ariandel (2016) (Q20112508)Dark Souls III (Q102277373)Dark Souls II: Crown of the Sunken King (Q102277371)Dark Souls II: Crown of the Old Iron King (Q102277574)Dark Souls II: Crown of the Ivory King (2014) (Q3702740)Dark Souls II (Q50296391)Dark Souls: Artorias of the Abyss (2011) (Q1166232)Dark Souls Here would be a query that retrieves the data:
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 bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel (MIN(YEAR(?date)) AS ?year) ?game WHERE {
{
?item wdt:P179 wd:Q99431276.
VALUES ?type {
wd:Q7889
wd:Q16070115
wd:Q4393107
wd:Q65963104
}
?item wdt:P31 ?type.
}
UNION
{
?item wdt:P8646 ?game.
?game wdt:P179 wd:Q99431276.
}
OPTIONAL { ?item wdt:P577 ?date. }
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
GROUP BY ?item ?itemLabel ?game
ORDER BY (?year)