SELECT 供应商, 类型, count(*) AS Count_Pass
FROM Report_Daily
WHERE 结果="ASS"
GROUP BY 供应商</F作者: wwwwa 时间: 2006-8-24 19:51
SELECT 供应商, 类型,sum(iif(结果='NG',1,0)) AS NG, sum(iif(结果='PASS',1,0)) AS PASS group by 供应商, 类型 作者: tusan 时间: 2006-8-25 00:10
谢谢,很好用!作者: wwwwa 时间: 2006-8-25 00:51
or
TRANSFORM nz(count(*),0)
SELECT 供应商, 类型
FROM tt GROUP BY 供应商, 类型
PIVOT 结果;