Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM SQL » View Thread |
Messages 1 to 8 of 8 total |
sum of an average |
Thu, Nov 6 2008 1:11 PM | Permanent Link |
"Sean McDermott" | D7 Pro DBISAM 4.7
select DateReference, avg(AirTemp) as ATAvg from meticedata group by datereference order by datereference How do I get a sum of the average daily values? E.g. in pseudo code "sum(avg(ATAvg))" Many thanks, Sean |
Thu, Nov 6 2008 2:08 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Sean,
<< How do I get a sum of the average daily values? E.g. in pseudo code "sum(avg(ATAvg))" >> Do you want just one total number ? If so, then just use this script: select DateReference, avg(AirTemp) as ATAvg INTO "\Memory\temp" from meticedata group by datereference order by datereference; SELECT SUM(ATAvg) AS AvgTotal FROM "\Memory\Temp"; -- Tim Young Elevate Software www.elevatesoft.com |
Thu, Nov 6 2008 3:55 PM | Permanent Link |
"Sean McDermott" | Thanks Tim, great service as always, Sean
"Tim Young [Elevate Software]" <timyoung@elevatesoft.com> wrote in message news:3576CA0D-5425-4F15-96FB-BDDC4D030C5F@news.elevatesoft.com... > Sean, > > << How do I get a sum of the average daily values? E.g. in pseudo code > "sum(avg(ATAvg))" >> > > Do you want just one total number ? If so, then just use this script: > > select DateReference, avg(AirTemp) as ATAvg > INTO "\Memory\temp" > from meticedata > group by datereference > order by datereference; > > SELECT SUM(ATAvg) AS AvgTotal > FROM "\Memory\Temp"; > > -- > Tim Young > Elevate Software > www.elevatesoft.com > |
Thu, Nov 6 2008 4:16 PM | Permanent Link |
"Robert" | "Sean McDermott" <Sean@HorizonCanada.com> wrote in message news:6034AC07-5AA3-440E-AA34-3485B387DB24@news.elevatesoft.com... > D7 Pro DBISAM 4.7 > > select DateReference, avg(AirTemp) as ATAvg from meticedata group by > datereference order by datereference > > How do I get a sum of the average daily values? E.g. in pseudo code > "sum(avg(ATAvg))" > Out of curiosity here, what's the purpose of a sum of averages? Robert |
Fri, Nov 7 2008 9:50 AM | Permanent Link |
"Sean McDermott" | Hi Robert, in this case I am calculating Freezing Degree Days which is based
on an average of many daily temperature values less than zero. But, for one output I need the total of the FDD numbers to date to back calculate an ice thickness. Aren't you glad you asked? Cheers, Sean "Robert" <ngsemail2005withoutthis@yahoo.com.ar> wrote in message news:F376F80A-BACF-415D-AFF9-535068229122@news.elevatesoft.com... > > "Sean McDermott" <Sean@HorizonCanada.com> wrote in message > news:6034AC07-5AA3-440E-AA34-3485B387DB24@news.elevatesoft.com... >> D7 Pro DBISAM 4.7 >> >> select DateReference, avg(AirTemp) as ATAvg from meticedata group by >> datereference order by datereference >> >> How do I get a sum of the average daily values? E.g. in pseudo code >> "sum(avg(ATAvg))" >> > > Out of curiosity here, what's the purpose of a sum of averages? > > Robert > |
Fri, Nov 7 2008 9:56 AM | Permanent Link |
"Robert" | "Sean McDermott" <Sean@HorizonCanada.com> wrote in message news:AB3113BB-7670-41E9-A556-B70C2877E102@news.elevatesoft.com... > Hi Robert, in this case I am calculating Freezing Degree Days which is > based on an average of many daily temperature values less than zero. But, > for one output I need the total of the FDD numbers to date to back > calculate an ice thickness. Ah, obvious, the old ice thickness calculation. I should have known. Robert |
Fri, Nov 7 2008 10:36 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Sean
"This isn't to do with global warming is it?" he asks suspiciously Roy Lambert |
Fri, Nov 7 2008 10:47 AM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Roy,
<< "This isn't to do with global warming is it?" he asks suspiciously >> Nah, he's just figuring out when it's safe to hit the pond and play some hockey. -- Tim Young Elevate Software www.elevatesoft.com |
This web page was last updated on Monday, April 29, 2024 at 05:23 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |