Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

count each day and each varible

Status
Not open for further replies.

lloydanderson

IS-IT--Management
Sep 26, 2001
21
0
0
US
Hello,

I am a newbie and would appreciate your help - I am VB excel with Visual Fox Pro Driver.

This is some of the data that is returned:
anreise abreise preis pcode
8/13/2003 8/17/2003 79
8/13/2003 8/14/2003 78.81 HRN
8/13/2003 8/14/2003 85.68 HRN
8/13/2003 8/15/2003 135 EXTREME
8/13/2003 8/17/2003 149 XTRAVALE
8/13/2003 8/17/2003 61.31 EXPEDIA
8/13/2003 8/16/2003 87.2 TRAVELOC
8/13/2003 8/15/2003 87.2 TRAVELOC




What I am trying to accomplish is to return a count for each day of each the pcode's (german database) and then do an average of the preis of each date - Any guidance would be very helpful. Anreise is the begining date and abreise is the ending date


Lloyd
 
Hi Llyod:
I'm not familiar with Excel or FoxPro, but this is the equivalent in Access. Maybe it will point you on your way.

SELECT abreise, Count(pcode) AS Cnt, Avg(preis) AS Aver
FROM tblSales
GROUP BY abreise;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top