Home » SQL & PL/SQL » SQL & PL/SQL » Count per month
Count per month [message #4569] Sun, 22 December 2002 22:35 Go to next message
Heidi R
Messages: 1
Registered: December 2002
Junior Member
Total newbie here... I want to list the total number of estimates, by month, for each facility. But what I am getting instead is hundreds and hundreds of pages instead of one COUNT (sum of all estimates) per facility.
Here's my hundreds of pages query:

SELECT f.facilitycode,
to_char(E.timestamp, 'MM-YYYY'), count(e.estimatenumber)
FROM estimate E, facility F
GROUP BY to_char(e.timestamp, 'MM-YYYY'), f.facilitycode, e.estimatenumber

can anyone help??
Re: Count per month [message #4570 is a reply to message #4569] Sun, 22 December 2002 23:59 Go to previous message
Maaher
Messages: 7065
Registered: December 2001
Senior Member
Remove e.estimatenumber from the GROUP BY clause.

MHE
Previous Topic: Can anyone help me code a simple function?
Next Topic: Re: How to retrive image from oracle???
Goto Forum:
  


Current Time: Tue May 21 02:29:28 CDT 2024