> Now, I'd like to get only the year and month parts but I want them
> ordered by year and then by month in ascending order. I'm using the
> query below, but it doesn't order the results the way I want it.
>
> gsin=> SELECT DISTINCT date_part('year', article_pubdate),
> date_part('month', article_pubdate) FROM articles GROUP BY
> date_part('year', article_pubdate), date_part('month',
> article_pubdate) ORDER BY date_part('year', article_pubdate),
> date_part('month', article_pubdate) DESC;
OOPS,
Sorry,
I previous email, did not really answer your question.
your year column is sorted ascending ( small to great).
your month column is sorted decending ( great to small).
you should specify asc or desc for both columns to insure the desired result.
Regards,
Richard Broersma Jr.