query-22d77b13fed5639a21b061b954caa028

rq turtle/ttl

... items without date, without description SELECT ?item ?itemLabel { {
SELECT ?item (COUNT(?item) AS ?cnt) { ?item p:P31 [ ps:P31 wd:Q7889 ] . ?item p:P31 ?valueStatement . MINUS { ?item p:P577 ?date . } OPTIONAL { ?item schema:description ?itemDescription FILTER(LANG(?itemDescription) = "ro"). } FILTER (!BOUND(?itemDescription)) } GROUP BY ?item } SERVICE wikibase:label { bd:serviceParam wikibase:language "en". } FILTER(?cnt = 1) }

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX schema: <http://schema.org/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#... items without date, without description
SELECT ?item ?itemLabel
    {
        {   
    SELECT ?item (COUNT(?item) AS ?cnt) {
      ?item p:P31 [ ps:P31 wd:Q7889 ] .
      ?item p:P31 ?valueStatement .
      MINUS { ?item p:P577 ?date . }
      OPTIONAL { ?item schema:description ?itemDescription FILTER(LANG(?itemDescription) = "ro").  }
      FILTER (!BOUND(?itemDescription))
    } GROUP BY ?item
  }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
  FILTER(?cnt = 1)
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v6("?cnt") v5("?date") v3("?item"):::projected v2("?itemDescription") v4("?valueStatement") a1((" ")) c9(["bd:serviceParam"]):::iri c4(["wd:Q7889"]):::iri c11(["en"]):::literal f0[["?cnt = '1^^xsd:integer'"]] f0 --> v6 f1[["not bound(?itemDescription)"]] f1 --> v2 a1 --"p:statement/P31"--> c4 v3 --"p:P31"--> a1 v3 --"p:P31"--> v4 subgraph minus2["MINUS"] style minus2 stroke-width:6px,fill:pink,stroke:red; v3 --"p:P577"--> v5 end subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v3 -."schema:description".-> v2 end bind4[/"count(?item)"/] v3 --o bind4 bind4 --as--o v6 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c9 --"wikibase:language"--> c11 end