达梦数据库 多个字段group by 分组问题 ,SEPARATOR 问题
<!-- 该数据查出的结果与mysql 一致 -->
select d.* from
(select *, Row_Number() OVER (partition by "date","type","name" order by "date" desc) rank from "imonitor"."l_dos_bro" ) // 这一行为分组关键 分组字段为 date,type,name
as d where d."date">='2017-05-22 10:59:11' and d."date"<='2017-05-25 13:59:11' and d.rank=1 // 根据条件并取 rank的第一个值
<!-- SEPARATOR -->
mysql 里的用法 GROUP_CONCAT(c_remark SEPARATOR '<br>') as remark
达梦数据库用法 REPLACE(WM_CONCAT("c_remark") ,',','<br>') as remark