query-151ff26dd22552d1026f87e84528d9e4
added before 2016-10
SELECT * WHERE { { SELECT ?id (COUNT(?obj) AS ?count) (GROUP_CONCAT(?obj; SEPARATOR = " , ") AS ?items) WHERE { ?obj wdt:P345 ?id. } GROUP BY ?id } FILTER(?count > 1) } added before 2016-10
SELECT * WHERE { { SELECT ?id (COUNT(?obj) AS ?count) (GROUP_CONCAT(?obj; SEPARATOR = " , ") AS ?items) WHERE { ?obj wdt:P345 ?id. } GROUP BY ?id } FILTER(?count > 1) } added before 2016-10
SELECT * WHERE { { SELECT ?id (COUNT(?obj) AS ?count) (GROUP_CONCAT(?obj; SEPARATOR = " , ") AS ?items) WHERE { ?obj wdt:P345 ?id. } GROUP BY ?id } FILTER(?count > 1) }
Use at
- https://query.wikidata.org/sparql
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
#added before 2016-10
SELECT * WHERE {
{
SELECT ?id (COUNT(?obj) AS ?count) (GROUP_CONCAT(?obj; SEPARATOR = " , ") AS ?items) WHERE { ?obj wdt:P345 ?id. }
GROUP BY ?id
}
FILTER(?count > 1)
}
Query found at
- https://www.wikidata.org/wiki/User:Amitie_10g/Sandbox/Wikidata:SPARQL_query_service/queries/examples/maintenance
- https://www.wikidata.org/wiki/User:Amitie_10g/Sandbox/Wikidata:SPARQL_query_service/queries/examples/maintenance/en
- https://www.wikidata.org/wiki/User:Amitie_10g/Sandbox/Wikidata:SPARQL_query_service/queries/examples/maintenance/es
- https://www.wikidata.org/wiki/User:Amitie_10g/Sandbox/Wikidata:SPARQL_query_service/queries/examples/maintenance/zh
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?count"):::projected
v3("?id"):::projected
v4("?items"):::projected
v2("?obj")
f0[["?count > '1^^xsd:integer'"]]
f0 --> v4
v2 --"wdt:P345"--> v3
bind3[/"count(?obj)"/]
v2 --o bind3
bind3 --as--o v4
bind4[/"?obj"/]
v2 --o bind4
bind4 --as--o v4