Reputation: 3582
again. I hope that I havent got tired of me. My query is:
select round((trunc(action_dt)-to_date('01011970','ddmmyyyy'))*24*60*60*1000) as action_dt, count(*) as cnt
from stat.jurnal_orders
where action_dt between TO_DATE('$begDate','DD/MM/YY') AND TO_DATE('$endDate','DD/MM/YY')
group by trunc(action_dt)
order by action_dt asc
It counts the number of events per one day.
18.03.05 1
18.03.05 4
18.03.05 4
25.03.05 2
25.03.05 2
25.03.05 1
Like that. But the thing is that I dont want to include weekends in my query! Weakends are SATURDAY AND SUNDAY(russia, lol)(sorry, guys) Can you help me?
Upvotes: 1
Views: 86
Reputation: 238086
where to_char(action_dt, 'DY', 'nls_date_language=AMERICAN') not in ('SAT', 'MON')
Upvotes: 4