Sql 排序<=37天加上其他要求?
我请求按以下方式对表进行排序,先看1,然后看2,然后看3:Sql 排序<=37天加上其他要求?,sql,oracle,sorting,grouping,Sql,Oracle,Sorting,Grouping,我请求按以下方式对表进行排序,先看1,然后看2,然后看3: 示例_date只需在排序依据中使用多个键即可。你的规则是这样的: order by (case when sample_date <= 37 then 1 else 2 end), (case when field_x is not null then 1 else 2 end), (case when sample_date <= 37 then sampl
order by (case when sample_date <= 37 then 1
else 2 end),
(case when field_x is not null then 1 else 2 end),
(case when sample_date <= 37 then sample_date end) desc,
number desc
order by(样本日期时的情况)