query-bfa296dfbd5eb261b4132d9f864a5304
Separate each game couple Silver, ... and Blue, Pokémon Gold andSome games from the main series of Pokémon are "coupled": Pokémon Red Some IDs are for single Pokémon games so: has to be added with the "coupled" item as statement(P361)part of in the single game the property has to be added with the single item as statement(P527)has part(s) in the "coupled" game the property every "coupled" game has to be splitted and every single items has to be created (Pokémon Gold, Pokémon Silver, ...)Here is a list of games that have to be separated:
Use at
- https://query.wikidata.org/sparql
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#>
SELECT ?item ?games
WHERE
{
?item wdt:P31 wd:Q7889;
wdt:P179 wd:Q24558579;
rdfs:label ?games.
MINUS {
?item wdt:P31 wd:Q7889;
wdt:P179 wd:Q24558579;
wdt:P527 ?hasPart.
}
MINUS {
?item wdt:P31 wd:Q7889;
wdt:P179 wd:Q24558579;
wdt:P361 ?partOf.
}
FILTER(LANG(?games) = "en").
FILTER(CONTAINS(?games, " and ")).
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?games"):::projected
v3("?hasPart")
v2("?item"):::projected
v4("?partOf")
c4(["wd:Q7889"]):::iri
c6(["wd:Q24558579"]):::iri
f0[["contains(?games,' and ')"]]
f0 --> v1
f1[["?games = 'en'"]]
f1 --> v1
v2 --"wdt:P31"--> c4
v2 --"wdt:P179"--> c6
v2 --"rdfs:label"--> v1
subgraph minus2["MINUS"]
style minus2 stroke-width:6px,fill:pink,stroke:red;
v2 --"wdt:P31"--> c4
v2 --"wdt:P179"--> c6
v2 --"wdt:P527"--> v3
end
subgraph minus3["MINUS"]
style minus3 stroke-width:6px,fill:pink,stroke:red;
v2 --"wdt:P31"--> c4
v2 --"wdt:P179"--> c6
v2 --"wdt:P361"--> v4
end