我有一个包含169461条记录的数据库。在一个字段中是begin_milepost,它以0.01为间隔从0开始数字计数。我想通过创建一个平均每次记录10条记录的新列来创建一条记录,然后让它一直向下完成,从而将间隔从0.01更改为0.1。我正在使用访问权限2013.
示例将是0.01,0.02,0.03,0.04,0.05,0.06,0.07,0.08,0.09,0.1变为0.055并在接下来的10个记录中重复。
答案 0 :(得分:0)
看看这是否能满足您的需求:
SELECT (([Marker]-0.01)*100)\10 AS MarkerGroup, Sum([Marker])/Count([Marker]) AS AvgMarker
FROM tblMarkers
GROUP BY (([Marker]-0.01)*100)\10;