query-3f3bd4a19f3133d01289b0a15a97158c
Adding version type (P548) as qualifier when the Mobygames ID matched a certain regex − here was the SPARQL: (P548)version type , to add the )EditGroup( #16620Following up on the previous section: I made a QuickStatements batch,
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?value ?versionLabel WHERE
{
?item p:P1933 ?statement.
?statement ps:P1933 ?value .
FILTER( REGEX(REPLACE(STR(?value), "%20", " "), "^.*?(:?limited|special|collectors)-edition$") )
OPTIONAL { ?statement pq:P548 ?version}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?item"):::projected
v3("?statement")
v1("?value"):::projected
v4("?version")
c8(["bd:serviceParam"]):::iri
c10(["#91;AUTO_LANGUAGE#93;,en"]):::literal
f0[["regex(replace(str(?value),'%20',' '),'^.*?(:?limited|special|collectors)-edition$')"]]
f0 --> v1
v2 --"p:P1933"--> v3
v3 --"p:statement/P1933"--> v1
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v3 -."p:qualifier/P548".-> v4
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c8 --"wikibase:language"--> c10
end