la orden condicional se puede realizar con CASE
, como aquí:
select *
from test
order by
flag
, case when flag then date end desc
, case when not flag then date end asc
la orden condicional se puede realizar con CASE
, como aquí:
select *
from test
order by
flag
, case when flag then date end desc
, case when not flag then date end asc