query-ab0f0ad909e147fcd80171b1debebe34
qualificadors de la P793 per una llista SELECT ?qual ?qualLabel ?count WHERE { { SELECT ?qual (COUNT(DISTINCT ?item) AS ?count) WHERE { hint:Query hint:optimizer "None" . VALUES ?item { wd:Q6534 wd:Q178275 wd:Q20104553 wd:Q131297 wd:Q127912 wd:Q461891 wd:Q3284177 wd:Q29649110 wd:Q36585269 wd:Q36248530 wd:Q27067584 wd:Q23017389 wd:Q16516506 wd:Q57970209 wd:Q959755 wd:Q12650252 wd:Q70990430 wd:Q35785569 wd:Q88177037 wd:Q64038205 wd:Q55475380 }
Ajustar valor de Pnnn a la propietat a analitzar els qualifs.
?item p:P793 ?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) ASC(?qualLabel)
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX p: <http://www.wikidata.org/prop/>
#qualificadors de la P793 per una llista
SELECT ?qual ?qualLabel ?count WHERE {
{
SELECT ?qual (COUNT(DISTINCT ?item) AS ?count) WHERE {
VALUES ?item {
wd:Q6534
wd:Q178275
wd:Q20104553
wd:Q131297
wd:Q127912
wd:Q461891
wd:Q3284177
wd:Q29649110
wd:Q36585269
wd:Q36248530
wd:Q27067584
wd:Q23017389
wd:Q16516506
wd:Q57970209
wd:Q959755
wd:Q12650252
wd:Q70990430
wd:Q35785569
wd:Q88177037
wd:Q64038205
wd:Q55475380
}
# Ajustar valor de Pnnn a la propietat a analitzar els qualifs.
?item p:P793 ?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) ASC(?qualLabel)
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")
bind0[/VALUES ?item/]
bind0-->v3
bind00(["wd:Q6534"])
bind00 --> bind0
bind01(["wd:Q178275"])
bind01 --> bind0
bind02(["wd:Q20104553"])
bind02 --> bind0
bind03(["wd:Q131297"])
bind03 --> bind0
bind04(["wd:Q127912"])
bind04 --> bind0
bind05(["wd:Q461891"])
bind05 --> bind0
bind06(["wd:Q3284177"])
bind06 --> bind0
bind07(["wd:Q29649110"])
bind07 --> bind0
bind08(["wd:Q36585269"])
bind08 --> bind0
bind09(["wd:Q36248530"])
bind09 --> bind0
bind010(["wd:Q27067584"])
bind010 --> bind0
bind011(["wd:Q23017389"])
bind011 --> bind0
bind012(["wd:Q16516506"])
bind012 --> bind0
bind013(["wd:Q57970209"])
bind013 --> bind0
bind014(["wd:Q959755"])
bind014 --> bind0
bind015(["wd:Q12650252"])
bind015 --> bind0
bind016(["wd:Q70990430"])
bind016 --> bind0
bind017(["wd:Q35785569"])
bind017 --> bind0
bind018(["wd:Q88177037"])
bind018 --> bind0
bind019(["wd:Q64038205"])
bind019 --> bind0
bind020(["wd:Q55475380"])
bind020 --> bind0
v3 --"p:P793"--> v4
v4 -->v5--> v6
v7 --"wikibase:qualifier"--> v5
bind2[/"count(?item)"/]
v3 --o bind2
bind2 --as--o v8
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v7 -."rdfs:label".-> v2
end