query-6b93e4dab459554e13ca4a3660868350
Nicereddy
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 psv: <http://www.wikidata.org/prop/statement/value/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel ?releaseDate
{
?item wdt:P31 wd:Q7889; # items that are video games
p:P577 ?releaseDateStatement. # items with a publication date.
?releaseDateStatement a wikibase:BestRank. # ... of best rank (instead of wdt:P577)
?releaseDateStatement psv:P577 ?releaseDateValue.
?releaseDateValue wikibase:timeValue ?releaseDate ;
wikibase:timePrecision 11 . # Precision is "day" (encoded as integer 11)
SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?item"):::projected
v4("?releaseDate"):::projected
v2("?releaseDateStatement")
v3("?releaseDateValue")
c9(["11^^xsd:integer"]):::literal
c5(["wikibase:BestRank"]):::iri
c13(["en"]):::literal
c11(["bd:serviceParam"]):::iri
c2(["wd:Q7889"]):::iri
v1 --"p:direct/P31"--> c2
v1 --"p:P577"--> v2
v2 --"a"--> c5
v2 --"p:statement/value/P577"--> v3
v3 --"wikibase:timeValue"--> v4
v3 --"wikibase:timePrecision"--> c9
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c11 --"wikibase:language"--> c13
end