Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: SQL question, calculating average age by group

Re: SQL question, calculating average age by group

From: Adam Sandler <corn29_at_excite.com>
Date: 24 Aug 2005 13:54:04 -0700
Message-ID: <1124916844.575967.141010@z14g2000cwz.googlegroups.com>


Gents... thanks for the help so far! I did know going into it that the n / 365.25 was incorrect but it was something I tried to crank out really quickly and hence the mathmatical approximation.

When I started seeing some of the optput later on though, that little voice inside my head said something was wrong... so I decided to ask this group for insight.

Also, I tried using this SQL statement:

select s_etype, avg (floor((months_between(sysdate,d_birthdate)/12)) from pass.t_personnel group by s_etype

And I keep getting missing right parenthesis errors (the asterik appears underneath the "from"). I'm wondering if its because of the months_between function? I'm not familiar with months_between... is it a provided function like 'floor''?

Thanks! Received on Wed Aug 24 2005 - 15:54:04 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US