query-da40f8f3e9925da34b412f3a9b160bcc
Query no longer workingUntil recently, the below query was working fine. Now, I have a java error. Is this issue linked to the query or to WQS?
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?instance ?instanceLabel (COALESCE(?instanceLabel, " autres") AS ?itemLabel) ?count {{
SELECT ?instance (COUNT(DISTINCT ?item) as ?count) {
?item wdt:P17 wd:Q142.
?item (wdt:P31/wdt:P279*) wd:Q16970 ; wdt:P31 ?instance.}
GROUP BY ?instance
HAVING (?count > 50)}
UNION {
SELECT (SUM(?count) AS ?count) {{
SELECT (COUNT(DISTINCT ?item) as ?count) {
?item wdt:P17 wd:Q142.
?item (wdt:P31/wdt:P279*) wd:Q16970 ; wdt:P31 ?instance.}
GROUP BY ?instance
HAVING (?count <=50)}}}
SERVICE wikibase:label { bd:serviceParam wikibase:language "fr". }}
ORDER BY DESC(?count)