Postgresql Create Function Sql Syntax For Descending