query = `SELECT ?item ?itemLabel ?sitelinks ?value ?valueLabel WHERE {
?item (wdt:P31/(wdt:P279*)) wd:${category} ;
wdt:${pcountry} wd:${country} ;
rdfs:label ?itemLabel ;
wikibase:sitelinks ?sitelinks.
MINUS { ?item wdt:P576 _:b1. }
OPTIONAL {?item wdt:${feature} ?value.
OPTIONAL {
?value rdfs:label ?valueLabel.
FILTER(LANG(?valueLabel) = "${lang}")
}
}
FILTER(LANG(?itemLabel) = "${lang}")
}
ORDER BY DESC (?sitelinks)
LIMIT 10000`