大哥们,,,急,,,,,急,,,,急,,,,,
表名为wawfiy
字段1:date(日期)格式为2005-1-1
字段2:price(价格)格式为数字
date_e=2005-1-1
date_r=2005-2-14
因为有可能同一天有几个price,如
date price
2005-1-1 10
2005-1-1 20
2005-2-10 50
2005-2-11 35
2005-2-14 36
sql="select date,avg(price) as price1 from wawfiy where date between #" & date_e & "# and #" & date_r & "# group by date order by date"
这个样子是取的同一天的价格只取一个并且是取的平均值...
但我想取同一月的价格只取一个并且也只取平均值...