oracle query statistics data daily, weekly, monthly, quarterly, and annually
//Statistics by day
select count(dataid) as the number of operations per day, sum()
from tablename
group by trunc(createtime, 'DD'))
//According to calendar week
select to_char(date,'iw'),sum< span style="color: #000000;">()
from tablename
group by to_char(date,'iw')
//According to calendar month statistics
select to_char(date,'mm'),sum< span style="color: #000000;">()
from tablename
group by to_char(date,'mm')
// quarterly statistics
select to_char(date,'q'),sum< span style="color: #000000;">()
from tablename
group by to_char(date,'q')
//Annual statistics
select to_char(date,'yyyy'),sum< span style="color: #000000;">()
from tablename
group by to_char(date,'yyyy') pre>
oracle query statistics by day, week, month, quarter, and year
//Statistics by day
select count(dataid) as the number of operations per day, sum()
from tablename
group by trunc(createtime, 'DD'))
//According to calendar week
select to_char(date,'iw'),sum< span style="color: #000000;">()
from tablename
group by to_char(date,'iw')
//According to calendar month statistics
select to_char(date,'mm'),sum< span style="color: #000000;">()
from tablename
group by to_char(date,'mm')
// quarterly statistics
select to_char(date,'q'),sum< span style="color: #000000;">()
from tablename
group by to_char(date,'q')
//Annual statistics
select to_char(date,'yyyy'),sum< span style="color: #000000;">()
from tablename
group by to_char(date,'yyyy') pre>