Template:Wikidata list (see links on https://www.wikidata.org/wiki/Q19860885 ) is the template used by Listeriabot to generate lists. It accepts old style wdq (wdq=) and sparql (sparql=). Deprecation warning should be added in the big projects when wdq= is set and a tracker category added. That way we can easily switch the remaining lists to the new syntax. Magnus added an overview to https://tools.wmflabs.org/listeria/botstatus.php so it's easy to see what lists still use old style wdq syntax. The number of lists still using wdq is not that big and quite a few are easy to switch. Goal of this task (is changed to) switching the remaining lists over to sparql.
Suggestions:
- use https://tools.wmflabs.org/wdq2sparql/w2s.php
- use SELECT DISTINCT instead of SELECT
- replace | with \u007C in the template
- add LIMIT 1000 where many results are expected (max is 5000)