query-77e2219968b26845bc331e016feaeab8
Items that exist on a specific project 14:28, 12 July 2019 (UTC)) talk (BennylinHi, how do I limit a query to find only items that are available on a Wikipedia project, for example id.wp? Thanks 14:47, 12 July 2019 (UTC) pagetalk / TomT0m author should work. I’ll modify my template as this is simpler.> https://id.wikipedia.org/ ?item ^schema:about/schema:isPartOf
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 bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel
WHERE
{
?item wdt:P31 wd:Q4167410.
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
filter exists { ?wp_artid_item schema:about ?item . ?wp_artid_item schema:isPartOf <https://id.wikipedia.org/> }
}
LIMIT 100
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?item"):::projected
v1("?wp_artid_item")
c5(["wd:Q4167410"]):::iri
c7(["bd:serviceParam"]):::iri
c3([https://id.wikipedia.org/]):::iri
c9(["#91;AUTO_LANGUAGE#93;,en"]):::literal
f0[[" "]]
subgraph f0e0["Exists Clause"]
e0v1 --"schema:about"--> e0v2
e0v1 --"schema:isPartOf"--> e0c3
e0v2("?item"):::projected
e0v1("?wp_artid_item"):::projected
e0c3([https://id.wikipedia.org/]):::iri
end
f0--EXISTS--> f0e0
f0 --> v1
f0 --> c1
f0 --> v2
f0 --> c2
f0 --> c3
v1 --"schema:about"--> v2
v1 --"schema:isPartOf"--> c3
v2 --"wdt:P31"--> c5
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c7 --"wikibase:language"--> c9
end