Is there a way with PostgreSQL to sort rows with NULL values in fields to the end of the selected table?
NULL
Like:
SELECT * FROM table ORDER
Does this make the trick?
ORDER BY somevalue DESC NULLS LAST
Taken from: http://www.postgresql.org/docs/9.0/static/sql-select.html