"Matt Arnilo S. Baluyos (Mailing Lists)" <matt.baluyos.lists@gmail.com> writes:
> ... ORDER BY date_part('year', article_pubdate),
> date_part('month', article_pubdate) DESC;
The above means
... ORDER BY date_part('year', article_pubdate) ASC,
date_part('month', article_pubdate) DESC;
You want
... ORDER BY date_part('year', article_pubdate) DESC,
date_part('month', article_pubdate) DESC;
As noted by the other respondent, sorting on one date_trunc column is
probably the better way to do it, but I thought I'd point out the DESC
issue anyway. A lot of people get that wrong.
regards, tom lane