PC Review


Reply
Thread Tools Rate Thread

calculating 30 year daily average

 
 
=?Utf-8?B?R2l6?=
Guest
Posts: n/a
 
      4th Aug 2005
Hi everyone,

I have a dataset of daily precip values over a 30 year time span (a table
with 11,000 plus records) . So basically for everyday (date) of the year I
have 30 precip values. I am trying to create a table that contains the
average precip for every date, i.e. Jan 1, Jan 2, etc., over those 30 years,
so then my resulting table will have 365 records. I am able to label each
date in a format such that Jan 1 is "0101", Jan 2 is "0102" and so on, but am
stuck now on how to use the Avg function to average all "0101" dates and so
on.

Any help is appreciated, thanks.
 
Reply With Quote
 
 
 
 
MGFoster
Guest
Posts: n/a
 
      4th Aug 2005
Giz wrote:
> Hi everyone,
>
> I have a dataset of daily precip values over a 30 year time span (a table
> with 11,000 plus records) . So basically for everyday (date) of the year I
> have 30 precip values. I am trying to create a table that contains the
> average precip for every date, i.e. Jan 1, Jan 2, etc., over those 30 years,
> so then my resulting table will have 365 records. I am able to label each
> date in a format such that Jan 1 is "0101", Jan 2 is "0102" and so on, but am
> stuck now on how to use the Avg function to average all "0101" dates and so
> on.


Not sure what you're getting at. Try this:

SELECT Month(date_column) As Mon,
Day(date_column) As Dy,
Avg(precip_value) As PrecipAvg

FROM table_name
--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)
 
Reply With Quote
 
John Spencer (MVP)
Guest
Posts: n/a
 
      5th Aug 2005
SELECT Format(YourDate,"mmdd"), Avg(Precipitation)
FROM YourTable
GROUP BY Format(YourDate,"mmdd")


MGFoster wrote:
>
> Giz wrote:
> > Hi everyone,
> >
> > I have a dataset of daily precip values over a 30 year time span (a table
> > with 11,000 plus records) . So basically for everyday (date) of the year I
> > have 30 precip values. I am trying to create a table that contains the
> > average precip for every date, i.e. Jan 1, Jan 2, etc., over those 30 years,
> > so then my resulting table will have 365 records. I am able to label each
> > date in a format such that Jan 1 is "0101", Jan 2 is "0102" and so on, but am
> > stuck now on how to use the Avg function to average all "0101" dates and so
> > on.

>
> Not sure what you're getting at. Try this:
>
> SELECT Month(date_column) As Mon,
> Day(date_column) As Dy,
> Avg(precip_value) As PrecipAvg
>
> FROM table_name
> --
> MGFoster:::mgf00 <at> earthlink <decimal-point> net
> Oakland, CA (USA)

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Calculating Average Daily Balances jacobfarino@gmail.com Microsoft Excel Programming 1 13th Nov 2008 06:51 AM
Calculating Monthly Average from Daily Values 77m.grub@gmail.com Microsoft Excel Discussion 7 11th Aug 2008 09:32 PM
calculating mean daily average krzystam@gmail.com Microsoft Excel Discussion 3 10th Jul 2008 05:08 PM
Comparing y-t-d average between 2 years for each year without surpassing present year's week Yvon Microsoft Excel Misc 2 13th Jul 2004 04:07 PM
Daily Average =?Utf-8?B?TUNvcm4=?= Microsoft Excel New Users 2 23rd Feb 2004 08:01 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:45 PM.