我在使用SQL在Access中创建查询时遇到一些小麻烦。任何帮助将不胜感激。
我正在尝试创建一个看起来像这样的查询
数据库看起来像这样(我不得不用通用名称重新创建它) LOG
dispatcher tech zone serviceorder casesummary resolution date_
John Doe Trump MZ 13458215 MZ/ description Replaced Printer 8/1/2015
John Doe Clinton Core 45821654 Core/ description Added Paper 8/1/2015
John Doe Smith WA 12458254 WA/ description WOA 8/1/2015
John Doe Smith WA 15465224 WA/ description Replaced Printer 8/2/2015
John Doe Williams WB 15468521 WB/ description Replaced Scangun 8/2/2015
John Doe Jones WFF 48593258 WFF/ description Replaced Scangun 8/3/2015
John Doe Jones WFF 15487528 WFF/ description Replaced printer 8/4/2015
Bob Dole Jones WA 65328451 WA/ description WOA 8/4/2015
Bob Dole Williams WB 48521596 WB/ description WOA 8/5/2015
Bob Dole Trump WC 34852369 WC/ description WOA 8/5/2015
Bob Dole Trump WC 63214789 WC/ description Replaced Printer 8/5/2015
Bob Dole Williams WB 52369852 WB/ description Added Paper 8/6/2015
Bob Dole Johnson WE 25896325 WE/ description WOA 8/6/2015
Jack Hill Jones WC 78521478 WC/ description Replaced Printer 8/6/2015
Jack Hill Jones WC 52585258 WC/ description Replaced Scangun 8/7/2015
Jack Hill Johnson WD 12457898 WD/ description Replaced Scangun 8/8/2015
Jack Hill Clinton Core 45698523 Core/ description Replaced printer 8/8/2015
Jack Hill Smith WA 32589654 WA/ description WOA 8/8/2015
我目前的代码就是这个
SELECT DISTINCT Format(Log.Date_,"ddd") AS [Day], LOG.Date_,
(select COUNT(*) FROM LOG
Where Zone_of_call = "WFF") AS WA
FROM LOG
WHERE (((LOG.Date_) >= [Start Date] And (LOG.Date_) <= [End Date]))
ORDER BY LOG.Date_;
数据库是LOG。我跳过了技术和调度,然后按区域跳到了每个案例的每日计数列。