query-d590f2dddbbb72cf916873899ea67b9e

rq turtle/ttl

exemplo the uso de qualifiers

Use at

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 ps: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item   ?itemLabel  ?itemdesc ?concelhoLabel  ?distritoLabel   
WHERE {
  ?item wdt:P17 wd:Q45 .
  ?item wdt:P31 wd:Q1131296. 
  ?item wdt:P131 ?concelho . 
  ?concelho  wdt:P131 ?distrito .
   ?item schema:description ?itemdesc.
    FILTER(LANG(?itemdesc) = "pt")

   MINUS  { ?item wdt:P1566 [] . }

     ?item p:P31 ?statement.
     ?statement ps:P31 ?instance .
      MINUS  { ?statement pq:P582 ?endtime . }
      MINUS  { ?statement pq:P580 ?starttime . }

  MINUS { ?item wdt:P31/wdt:P279* wd:Q486972. }     #povoamento
  MINUS {
   ?article1 schema:about ?item . 
   ?article1 schema:isPartOf <https://ceb.wikipedia.org/> .   #WP.pt
    }

   SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v9("?article1") v3("?concelho") v4("?distrito") v7("?endtime") v6("?instance") v2("?item"):::projected v1("?itemdesc"):::projected v8("?starttime") v5("?statement") a1((" ")) a2((" ")) c21(["en"]):::literal c5(["wd:Q1131296"]):::iri c3(["wd:Q45"]):::iri c14(["wd:Q486972"]):::iri c19(["bd:serviceParam"]):::iri c17([https://ceb.wikipedia.org/]):::iri f0[["?itemdesc = 'pt'"]] f0 --> v1 v2 --"p:direct/P17"--> c3 v2 --"p:direct/P31"--> c5 v2 --"p:direct/P131"--> v3 v3 --"p:direct/P131"--> v4 v2 --"schema:description"--> v1 subgraph minus1["MINUS"] style minus1 stroke-width:6px,fill:pink,stroke:red; v2 --"p:direct/P1566"--> a1 end v2 --"p:P31"--> v5 v5 --"p:statement/P31"--> v6 subgraph minus2["MINUS"] style minus2 stroke-width:6px,fill:pink,stroke:red; v5 --"p:qualifier/P582"--> v7 end subgraph minus3["MINUS"] style minus3 stroke-width:6px,fill:pink,stroke:red; v5 --"p:qualifier/P580"--> v8 end subgraph minus4["MINUS"] style minus4 stroke-width:6px,fill:pink,stroke:red; v2 --"p:direct/P31"--> a2 a2 --"p:direct/P279"--> c14 end subgraph minus5["MINUS"] style minus5 stroke-width:6px,fill:pink,stroke:red; v9 --"schema:about"--> v2 v9 --"schema:isPartOf"--> c17 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c19 --"wikibase:language"--> c21 end