query-488ce1a04d5163600bf8834c51c31c64

rq turtle/ttl

Need help with a SPARQL query 21:21, 9 October 2017 (UTC)) talk (Fructibus? If yes, can I get help for building such a query? If yes, then where should I ask for help? Thank you. query.wikidata.orgHello, I would like to find the items that have an entry (or statement) at Wikimedia Commons and an entry at any Wikipedia project, but not on English Wikipedia. Is it possible to do that by making a SPARQL query at I tried the following query, but it times out if not limited, maybe someone can come up with a more efficient query. In the below code the number of results is limited to 1,000. is the place to ask for query help.Wikidata:Request a query: I guess Fructibus@

Use at

PREFIX schema: <http://schema.org/>
SELECT DISTINCT ?item ?commons
WHERE
{
  ?commons   schema:about ?item . FILTER(CONTAINS(str(?commons),'commons.wikimedia.org'))
  ?wikipedia schema:about ?item . FILTER(CONTAINS(str(?wikipedia),'wikipedia.org'))
  OPTIONAL { 
    ?enwp    schema:about ?item . FILTER(CONTAINS(str(?enwp),'en.wikipedia.org'))
  } FILTER(!BOUND(?enwp))
}
LIMIT 1000

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?commons"):::projected v1("?enwp") v4("?item"):::projected v2("?wikipedia") f0[["not bound(?enwp)"]] f0 --> v1 f1[["contains(str(?wikipedia),'wikipedia.org')"]] f1 --> v2 f2[["contains(str(?commons),'commons.wikimedia.org')"]] f2 --> v3 v3 --"schema:about"--> v4 v2 --"schema:about"--> v4 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v1 -."schema:about".-> v4 end