query-61d305d3f2dd6bb5186d096ef9992ab8
Constraint violation: Unique value
Use at
- https://query.wikidata.org/sparql
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
SELECT ?id (COUNT(?id) AS ?countOfId) (GROUP_CONCAT(?qId;SEPARATOR = ", ") AS ?qIds) WHERE {
?item wdt:P685 ?id .
BIND(str(?item) as ?url)
BIND(strafter(?url, "http://www.wikidata.org/entity/") as ?qId)
}
GROUP BY ?id
HAVING(?countOfId > 1)
ORDER BY DESC(?countOfId) ASC(xsd:integer(?id))
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v6("?countOfId")
v2("?id"):::projected
v3("?item")
v5("?qId"):::projected
v6("?qIds")
v4("?url")
f0[["?countOfId > '1^^xsd:integer'"]]
f0 --> v6
v3 --"wdt:P685"--> v2
bind1[/"str(?item)"/]
v3 --o bind1
bind1 --as--o v4
bind2[/"substring-after(?url,'http://www.wikidata.org/entity/')"/]
v4 --o bind2
bind2 --as--o v5
bind5[/"count(?id)"/]
v2 --o bind5
bind5 --as--o v6
bind6[/"?qId"/]
v5 --o bind6
bind6 --as--o v6