Query fix in mod_articles_archive so it works in PostgreSQL. Fixes #3292