sql 對某個字段去重,並按照另一個字段排序

需求: 實現對錶中的單據字段去重,而且按照生成日期字段排序。 使用: 1 select distinct bill from table where xxxx order by bill ; distinct bill 字段,不能按照其餘字段排序。web select bill ,date from table where xxx order by date desc; 未實現bill 字段去重
相關文章
相關標籤/搜索