query-d9ede6b8eaf35aeebc41d8cd187814a0
07:33, 30 July 2017 (UTC) Jura--- There is just one, unless you remove "whatever". 08:34, 30 July 2017 (UTC)) talk (Xaris333. I don't want to use other properties or items. (P3450)sports season of league or competition : Thanks. But I just want to find the items that have more than 1 value for Jura1@08:37, 30 July 2017 (UTC) Jura--- Try to remove what you don't need. : Is not working. Jura1@
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT
?item ?itemLabel
?whatever ?whateverLabel
(COUNT(DISTINCT ?sport) as ?ct)
{
?item wdt:P641 ?whatever .
?item wdt:P641 ?sport
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
GROUP BY
?item ?itemLabel
?whatever ?whateverLabel
HAVING (?ct > 1)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v5("?ct")
v2("?item"):::projected
v4("?sport"):::projected
v3("?whatever"):::projected
c4(["bd:serviceParam"]):::iri
c6(["#91;AUTO_LANGUAGE#93;,en"]):::literal
f0[["?ct > '1^^xsd:integer'"]]
f0 --> v5
v2 --"wdt:P641"--> v3
v2 --"wdt:P641"--> v4
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c4 --"wikibase:language"--> c6
end
bind2[/"count(?sport)"/]
v4 --o bind2
bind2 --as--o v5