Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: CJ moore
  Where is CJ moore?
 
 United Kingdom
 CJ moore
 To: John Discallar
  Where is John Discallar?
 Nagoya
 Japan
 John Discallar
 Tags
Subject: RE: Averaging the Average
Thread ID: 15800 Message ID: 15802 # Views: 0 # Ratings: 0
Version: Unknown Category: General VFP Topics
Date: Tuesday, October 01, 2002 9:59:30 AM         
   


how about, sele field1, count('field1') as totf, sum('field1') as sumf into table ??? group by field1

then you can divide the two fields and get an avarage.

i think this is on the lines of what you want, if not it might give you some ideas.

Craig

> Hi All,
>
> How could i Average the Average of the fields?
>
> Sample Data
>
> ROW1 BiggerGroup1 Group1 5
> ROW2 BiggerGroup1 Group1 7
> ROW3 BiggerGroup1 Group2 3
> ROW4 BiggerGroup1 Group3 3
> ROW5 BiggerGroup1 Group3 6
> ROW6 BiggerGroup2 Group1 2
> ROW7 BiggerGroup2 Group1 4
> ROW8 BiggerGroup2 Group2 5
> ROW9 BiggerGroup2 Group3 5
> ROW10BiggerGroup2 Group3 6
>
> I Have Created an Average According to Group :
>
> BiggerGroup1
> Group1 6.00 (because [5+7] / 2)
> Group2 3.00
> Group3 4.50
> BiggerGroup2
> Group1 3.00
> Group2 5.00
> Group3 5.50
>
> My problem is that i could not Average the Average that i have made based from the Group , initially i did an average with a control based on the bigger group , but computation is based from the original data which has a difference compared when averaging the average per group
>
> Regards
>
> Foxpro Child


ENTIRE THREAD

Averaging the Average Posted by Caij Gomez @ 10/1/2002 8:53:20 AM
RE: Averaging the Average Posted by CJ moore @ 10/1/2002 9:59:30 AM
RE: Averaging the Average Posted by Yuri Rubinov @ 10/1/2002 2:50:02 PM