query-ef10d7e3ecf11ff27814fe6ea2b8e259
Works in Japan Search by British sculptors
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 schema: <http://schema.org/>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX bd: <http://www.bigdata.com/rdf#>
PREFIX jps: <https://jpsearch.go.jp/term/property#>
SELECT DISTINCT ?name ?work_link ?work ?creatorLabel ?date
WHERE {
{
SELECT ?creator WHERE {
VALUES ?citizenship {wd:Q145 wd:Q174193} . # UK, Britain & Ireland
?creator wdt:P6698 []; # Only get things with a Japan Search ID
wdt:P27 ?citizenship; wdt:P106 wd:Q1281618} # sculptors
} SERVICE <https://jpsearch.go.jp/rdf/sparql/> {
?jps_creator owl:sameAs ?creator . # convert Wikidata ID to Japan Search ID
?work schema:creator ?jps_creator . # Works by this artist
OPTIONAL {?work schema:name ?name } # This will return separate names in English and Japanese names
OPTIONAL {?work schema:dateCreated ?date}
}
FILTER (lang(?name)="en") # Show only the English name
BIND(URI( REPLACE(STR(?work), "/data/", "/item/") ) AS ?work_link)
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
} ORDER BY ?date
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?citizenship")
v4("?creator")
v1("?date"):::projected
v5("?jps_creator")
v2("?name"):::projected
v6("?work"):::projected
v7("?work_link"):::projected
a1((" "))
c12(["bd:serviceParam"]):::iri
c14(["#91;AUTO_LANGUAGE#93;,en"]):::literal
c5(["wd:Q1281618"]):::iri
f0[["?name = 'en'"]]
f0 --> v2
bind1[/VALUES ?citizenship/]
bind1-->v3
bind10(["wd:Q145"])
bind10 --> bind1
bind11(["wd:Q174193"])
bind11 --> bind1
v4 --"wdt:P6698"--> a1
v4 --"wdt:P27"--> v3
v4 --"wdt:P106"--> c5
subgraph s1["https://jpsearch.go.jp/rdf/sparql/"]
style s1 stroke-width:4px;
v5 --"owl:sameAs"--> v4
v6 --"schema:creator"--> v5
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v6 -."schema:name".-> v2
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v6 -."schema:dateCreated".-> v1
end
end
bind2[/"replace(str(?work),'/data/','/item/')"/]
v6 --o bind2
bind2 --as--o v7
subgraph s2["http://wikiba.se/ontology#label"]
style s2 stroke-width:4px;
c12 --"wikibase:language"--> c14
end