Pages

Subscribe Twitter Twitter

Wednesday, October 27, 2010

How to count data group by week?

try this.
It's work on Oracle database.
select distinct trunc(s_time) - to_char(s_time,'d') week, count(*)
from xTABLE
group by trunc(s_time) - to_char(s_time,'d')
order by week

No comments: