Home » SQL & PL/SQL » SQL & PL/SQL » daily count for last two years. (Oracle 9i, Unix)
daily count for last two years. [message #300198] Thu, 14 February 2008 10:25 Go to next message
Cathy2008
Messages: 9
Registered: February 2008
Junior Member
I want to findout the no.of transactions on each date for last two years. how can i get it.

Thanks,
Cathy
Re: daily count for last two years. [message #300199 is a reply to message #300198] Thu, 14 February 2008 10:26 Go to previous messageGo to next message
skooman
Messages: 912
Registered: March 2005
Location: Netherlands
Senior Member
That depends on the data you have...
Did you try count? What happens?
Re: daily count for last two years. [message #300215 is a reply to message #300198] Thu, 14 February 2008 11:07 Go to previous messageGo to next message
Cathy2008
Messages: 9
Registered: February 2008
Junior Member
I tried with the below sql

select count(tans_id), trans_date from transaction
where trans_date <= sysdate
group by trans_date;

but got tans_date is not a gorup by expression.

any ideas?
Re: daily count for last two years. [message #300219 is a reply to message #300215] Thu, 14 February 2008 11:17 Go to previous messageGo to next message
Michel Cadot
Messages: 64152
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Use SQL*Plus and copy and paste your execution.
It is not possible to get the error you posted with this query.

Regards
Michel
Re: daily count for last two years. [message #300224 is a reply to message #300198] Thu, 14 February 2008 11:34 Go to previous message
Cathy2008
Messages: 9
Registered: February 2008
Junior Member
Thanks, Mike.

I think i spoke early. It's working, i have mixed with some other satements in my TOAD. My appologies.

Previous Topic: Which Approach is the Better
Next Topic: dbms_scheduler and off-line reports
Goto Forum:
  


Current Time: Sat Dec 10 03:22:14 CST 2016

Total time taken to generate the page: 0.11525 seconds