I'm trying to understand how to select one publication date from a list of place of publications from wikidata using SPARQL. I have a query that I think is close but I'm looking for some help in narrowing it down. What I have so far is the following:
SELECT ?item ?itemLabel ?publication_date WHERE {
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
VALUES (?item) {(wd:Q18486021)}
{SELECT ?item ?publication_date WHERE {
?item p:P577 ?publication_date_entry.
?publication_date_entry pq:P291 wd:Q30.
?item wdt:P577 ?publication_date.
}}
}
I'm attempting to get the publication date for the release matching the US from https://www.wikidata.org/wiki/Q18486021 (Star Wars: The Last Jedi). If you scroll down to the publication date section you'll notice that there are 5 releases. I want to select the date for the US release (15 December 2017). It happens to be first, but I want to generalize this so that I can pull out the US release date for any film. From here I want to generalize this to matching the US release date for all films.
I think what I'm doing above is a sub query that attempts to match the US release date but it results in one row for each release (5 total).