need help!! [message #20159] |
Thu, 02 May 2002 11:33 |
JOHN
Messages: 182 Registered: April 1998
|
Senior Member |
|
|
I need to create a view that will return the average number of events taking place in august. not for a specific year, for all years in the database. any suggustions?
|
|
|
Re: need help!! [message #20160 is a reply to message #20159] |
Thu, 02 May 2002 12:02 |
Jon
Messages: 483 Registered: May 2001
|
Senior Member |
|
|
Something like this should do it...
select events/years events_in_aug
from
(select count(*) events from event_table where to_char(event_date,'MM') = '08'),
(select count(distinct(to_char(event_date,'YYYY'))) years from event_table where to_char(event_date,'MM') = '08')
;
|
|
|
Re: need help!! [message #20179 is a reply to message #20160] |
Fri, 03 May 2002 23:19 |
srinivasarao
Messages: 15 Registered: April 2002
|
Junior Member |
|
|
your answer is quiet right
i am very interested by seeing this query
very nice
it will help me in different ways
friend
srinivasarao.p
|
|
|