-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

> ORDER BY
> date_part('year', uu.add_date), date_part('month', uu.add_date),
> date_part('day',  uu.add_date) DESC;

You are sorting by three columns, only the last one is desc. 

What you need is:

...
order by
        date_part( 'year', uu.add_date ) desc,
        date_part( 'month', uu.add_date ) desc,
        date_part( 'day', uu.add_date ) desc
;

Mit freundlichem Gruß / With kind regards
        Holger Klawitter
- --
lists <at> klawitter <dot> de
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQFAjTtF1Xdt0HKSwgYRAmaDAKCcSo5kEPkn4QJfsFhg9EE0k/dmmwCfa7gB
cUjzCy/X0mJXW0Aooyb7pbE=
=0Fhk
-----END PGP SIGNATURE-----


---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Reply via email to