PostgreSQL - conditional ordering
conditional order can be performed with CASE
, like here:
select * from testorder by flag , case when flag then date end desc , case when not flag then date end asc
conditional order can be performed with CASE
, like here:
select * from testorder by flag , case when flag then date end desc , case when not flag then date end asc