A postgresql query is required that returns null at the end of a non-zero value, regardless of the order of the upstream / downstream.
For example: - I have a column say purchase_price that has values 1, 5, 3, 0, null, null
Then for ORDER BY purchase_price ASChe must return
0
1
3
5
null
null
and for ORDER BY purchase_price DESCHe must return
5
3
1
0
null
null
I need to synthesize a solution that I can apply for the types 'boolean', 'float', 'string', 'integer', 'date'Datatype
Salil source
share