query-38b3c40195a51f2c020e1fc9df797003
ItemsNew York City (Q60)
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?p ?propLabel (COUNT(?p) as ?occurrences)
WHERE
{
{wd:Q60 ?p ?o}
UNION
{?o ?p wd:Q60}
?prop wikibase:directClaim ?p
SERVICE wikibase:label { bd:serviceParam wikibase:language "en" }
}
GROUP BY ?p ?propLabel
ORDER BY DESC(?occurrences)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?o")
v5("?occurrences")
v2("?p"):::projected
v4("?prop")
c4(["bd:serviceParam"]):::iri
c1(["wd:Q60"]):::iri
c6(["en"]):::literal
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
v3 -->v2--> c1
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
c1 -->v2--> v3
end
union0r <== or ==> union0l
end
v4 --"wikibase:directClaim"--> v2
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c4 --"wikibase:language"--> c6
end
bind1[/"count(?p)"/]
v2 --o bind1
bind1 --as--o v5