query-c91899003efac7b1533828107069c55f
TODO
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 rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?i ?l ?y{
?i wdt:P31 wd:Q5 ; rdfs:label ?l. Filter(lang(?l) = 'ja')
?a schema:about ?i ;schema:isPartOf <https://ja.wikipedia.org/> .
FILTER(STRSTARTS(?l, "五")).
OPTIONAL { ?i wdt:P27 ?n } . FILTER(!BOUND(?n))
OPTIONAL { ?i wdt:P1814 ?y } .
SERVICE wikibase:label { bd:serviceParam wikibase:language "ja" }
}order by ?i limit 15
Query found at
- https://www.wikidata.org/wiki/User:Suisui/%E6%97%A5%E6%9C%AC%E8%AA%9E/Common_Japanese_items
- https://www.wikidata.org/wiki/User:Suisui/%E6%97%A5%E6%9C%AC%E8%AA%9E/Common_Japanese_items/SPARQL
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?a")
v1("?i"):::projected
v3("?l"):::projected
v2("?n")
v5("?y"):::projected
c12(["bd:serviceParam"]):::iri
c2(["ja"]):::literal
c4(["wd:Q5"]):::iri
c8([https://ja.wikipedia.org/]):::iri
f0[["not bound(?n)"]]
f0 --> v2
f1[["starts-with(?l,'五')"]]
f1 --> v3
f2[["?l = 'ja'"]]
f2 --> v3
v1 --"wdt:P31"--> c4
v1 --"rdfs:label"--> v3
v4 --"schema:about"--> v1
v4 --"schema:isPartOf"--> c8
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P27".-> v2
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P1814".-> v5
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c12 --"wikibase:language"--> c2
end