query-8e26f113b71b6c7304310969bd95d80a
qualificadors de la P159 per una llista
Ajustar valor de Pnnn a la propietat a analitzar els qualifs.
SELECT ?qual ?qualLabel ?count WHERE { { SELECT ?qual (COUNT(DISTINCT ?item) AS ?count) WHERE { hint:Query hint:optimizer "None". ?item p:P159 ?statement. ?statement ?pq_qual ?pq_obj. ?qual wikibase:qualifier ?pq_qual. } GROUP BY ?qual } OPTIONAL { ?qual rdfs:label ?qualLabel. FILTER((LANG(?qualLabel)) = "ca") } } ORDER BY DESC (?count) (?qualLabel) LIMIT 20
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX p: <http://www.wikidata.org/prop/>
#qualificadors de la P159 per una llista
# Ajustar valor de Pnnn a la propietat a analitzar els qualifs.
SELECT ?qual ?qualLabel ?count WHERE {
{
SELECT ?qual (COUNT(DISTINCT ?item) AS ?count) WHERE {
?item p:P159 ?statement.
?statement ?pq_qual ?pq_obj.
?qual wikibase:qualifier ?pq_qual.
}
GROUP BY ?qual
}
OPTIONAL {
?qual rdfs:label ?qualLabel.
FILTER((LANG(?qualLabel)) = "ca")
}
}
ORDER BY DESC (?count) (?qualLabel)
LIMIT 20
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v8("?count"):::projected
v3("?item")
v6("?pq_obj")
v5("?pq_qual")
v7("?qual"):::projected
v2("?qualLabel"):::projected
v4("?statement")
v3 --"p:P159"--> v4
v4 -->v5--> v6
v7 --"wikibase:qualifier"--> v5
bind1[/"count(?item)"/]
v3 --o bind1
bind1 --as--o v8
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v7 -."rdfs:label".-> v2
end