query-3a0bcf03a92123d7b926726ee7e16b4f
Qualifiers
SELECT ?item ?itemLabel ?itemDescription ?propLabel ?pq_pred ?pq_obj WHERE { ?item wdt:P17 wd:Q45 . ?item wdt:P31 wd:Q1131296 .
?item p:P31 ?award_statement . ?award_statement ps:P31 wd:Q1131296 . # freguesia
# FILTER NOT EXISTS {
?award_statement pq:P582 ?pq_obj . # a triple involving the freguesia ...
?prop wikibase:qualifier pq:P582 . # ... with a predicate pq:P582 that is a qualifier
# }
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } }
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 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#>
#Qualifiers
SELECT ?item ?itemLabel ?itemDescription ?propLabel ?pq_pred ?pq_obj WHERE {
?item wdt:P17 wd:Q45 .
?item wdt:P31 wd:Q1131296 .
?item p:P31 ?award_statement .
?award_statement ps:P31 wd:Q1131296 . # freguesia
# FILTER NOT EXISTS {
?award_statement pq:P582 ?pq_obj . # a triple involving the freguesia ...
?prop wikibase:qualifier pq:P582 . # ... with a predicate pq:P582 that is a qualifier
# }
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?award_statement")
v1("?item"):::projected
v3("?pq_obj"):::projected
v4("?prop")
c10(["bd:serviceParam"]):::iri
c7(["p:qualifier/P582"]):::iri
c12(["#91;AUTO_LANGUAGE#93;,en"]):::literal
c4(["wd:Q1131296"]):::iri
c2(["wd:Q45"]):::iri
v1 --"p:direct/P17"--> c2
v1 --"p:direct/P31"--> c4
v1 --"p:P31"--> v2
v2 --"p:statement/P31"--> c4
v2 -->c7--> v3
v4 --"wikibase:qualifier"--> c7
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c10 --"wikibase:language"--> c12
end