得看你的数据来写SQL,每个月都是10号来抄表,一个月只抄一次?
select t1.chaobiaoriqi,t2.chaobiaoriqi,t1.dianbiaodushu,t2.dianbiaodushu,t2.dianbiaodushu-t1.dianbiaodushu
from 记录表 as t1,记录表 as t2
where datediff('m',t1.chaobiaoriqi,t2.chaobiaoriqi)=1
如果表名为抄电表:
SELECT 抄电表.抄表日期, 抄电表.电表指数, nz(DMax("电表指数","抄电表","抄表日期<#" & [抄表日期] & "#"),0) AS 上期指数, [电表指数]-nz(DMax("电表指数","抄电表","抄表日期<#" & [抄表日期] & "#"),0) AS 当期用电
FROM 抄电表
ORDER BY 抄电表.抄表日期;