Er is een fout opgetreden in de query:
Query = SELECT distinct w_im.invoernummer FROM w_im, (SELECT distinct A.invoernummer FROM w_im as A, bestanden as B where (trim(leading '0' from substr(A.invoernummer,1,4))=B.invoernummer) order by B.datum desc LIMIT 12) tmp where (w_im.invoernummer = tmp.invoernummer)

Foutmelding = Expression #1 of ORDER BY clause is not in SELECT list, references column 'bonassit_aw.B.datum' which is not in SELECT list; this is incompatible with DISTINCT