order by子句未显示预期结果

时间:2016-04-11 06:03:45

标签: sql oracle

当我运行以下查询,我需要在日期使用trim函数, 输出顺序不正确

  select trim(man_date_created)as createddate,count(*) recordcount
  from man 
  where man_date_created>sysdate-15 
  group by trim(man_date_created) ORDER BY createddate;

这是我从这个查询获得的输出

01-APR-16
02-APR-16
03-APR-16
04-APR-16
05-APR-16
06-APR-16
07-APR-16
08-APR-16
09-APR-16
10-APR-16
11-APR-16
27-MAR-16
28-MAR-16
29-MAR-16
30-MAR-16
31-MAR-16

你可以看到它在4月11日之后显示出游行的条目   是否有任何解决方案,以便我不能得到所有状态的计数?

0 个答案:

没有答案