If you read the documentation https://www.postgresql.org/docs/8.3/queries-order.html you will see that nulls first is the default for desc. What you are seeing is the rows with nulls first and they can appear in any order as you have only ordered by [2] which these rows don't have. add nulls last after desc to get the order you want.