|
我的电脑不能上传附件,只好用文字描述:
1、新建“查询1”
SELECT 表1.编号, IIf([泵挂]>1600,"1600-2100米",IIf([泵挂]>1300,"1300-1600米",IIf([泵挂]>1100,"1100-1300米",IIf([泵挂]>900,"900-1300米",IIf([泵挂]>500,"500-900米",IIf([泵挂]>300,"300-500米","300以下")))))) AS 挂高, IIf([产液量]>20,"20吨以上",IIf([产液量]>115,"15-20吨",IIf([产液量]>12,"12-15吨",IIf([产液量]>9,"9-12吨",IIf([产液量]>7,"7-9吨",IIf([产液量]>5,"5-7吨",IIf([产液量]>3,"3-5吨","3吨以下"))))))) AS 产量, 表1.系统效率
FROM 表1;
2、基于“查询1”建立“查询2”
TRANSFORM Avg(查询1.系统效率) AS 系统效率之平均值
SELECT 查询1.产量
FROM 查询1
GROUP BY 查询1.产量
PIVOT 查询1.挂高;
3、运行“查询2”即可
说明:具体的顺序和区段条件可修改为你自己的定义,也可以合并为一个单一的查询,试试看吧 |
|