select * from a where b >0 and c = '2019-01-01' group by d having e>0 order by m;