query-f5ffecf2eada42a6f21338247d9fecb0
Propertiesbroader concept (P4900)
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?item ?itemLabel ?p ?propLabel ?broaderItem ?broaderItemLabel ?numBroaderQuals
WHERE
{
{
SELECT ?item (COUNT(DISTINCT ?stmt) AS ?numBroaderQuals)
WHERE {
?item ?p ?stmt .
?stmt pq:P4900 ?broaderItem .
?prop wikibase:claim ?p .
}
GROUP BY ?item
ORDER BY DESC(?numBroaderQuals)
}
?item ?p ?stmt .
?stmt pq:P4900 ?broaderItem .
?prop wikibase:claim ?p .
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY DESC(?numBroaderQuals) ?item
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v5("?broaderItem"):::projected
v2("?item"):::projected
v7("?numBroaderQuals"):::projected
v3("?p"):::projected
v6("?prop")
v4("?stmt")
c4(["bd:serviceParam"]):::iri
c6(["#91;AUTO_LANGUAGE#93;,en"]):::literal
v2 -->v3--> v4
v4 --"pq:P4900"--> v5
v6 --"wikibase:claim"--> v3
bind1[/"count(?stmt)"/]
v4 --o bind1
bind1 --as--o v7
v2 -->v3--> v4
v4 --"pq:P4900"--> v5
v6 --"wikibase:claim"--> v3
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c4 --"wikibase:language"--> c6
end