我有这张桌子
ID Date
1 08/10/2009 11:20:00
2 08/10/2009 12:06:06
3 08/11/2009 13:03:10
4 08/11/2009 01:20:00
5 08/11/2009 15:41:23
6 08/12/2009 14:22:20
我想回来:
Date Count
08/10/2009 2
08/11/2009 3
08/12/2009 1
PL / SQL中的。有什么想法吗?
答案 0 :(得分:10)
SELECT TRUNC(date) AS CreatedDate, COUNT(*) AS DateCount
FROM mytable
GROUP BY
TRUNC(date)
ORDER BY
CreatedDate