你工作在一个售书公司.你正在基于SQLSERVER2005数据库创建一个报表。此报表显示本月超过销售配额的销售代表及他们的销售额。已知,销售配额为$2,000。查询的起始日期和截至日期以变量@FromDate和@ToDate传递进来。为了实现满足上述条件的报表,你应该使用下面哪一个SQL查询语句?() A.SELECTs.AgentName,SUM(ISNULL(o.OrderTotal,0.00))ASSumOrderTotalFROMSalesAgentsJOINOrderHeaderoONs.AgentID=o.AgentIDWHEREo.OrderDateBETWEEN@FromDateAND@ToDateGROUPBYs.AgentNameB.SELECTs.AgentName,SUM(ISNULL(o.OrderTotal,0.00))ASSumOrderTotalFROMSalesAgentsJOINOrderHeaderoONs.AgentID=o.AgentIDWHEREo.OrderDateBETWEEN@FromDateAND@ToDateANDo.OrderTotal=2000GROUPBYs.AgentNameC.SELECTs.AgentName,SUM(ISNULL(o.OrderTotal,0.00))ASSumOrderTotalFROMSalesAgentsJOINOrderHeaderoONs.AgentID=o.AgentIDWHEREo.OrderDateBETWEEN@FromDateAND@ToDateGROUPBYs.AgentNameHAVINGSUM(o.OrderTotal)=2000D.SELECTs.AgentName,SUM(ISNULL(o.OrderTotal,0.00))ASSumOrderTotalFROMSalesAgentsJOINOrderHeaderoONs.AgentID=o.AgentIDWHEREo.ordertotal=2000ANDo.OrderDateBETWEEN@FromDateAND@ToDateGROUPBYs.AgentNameHAVINGSUM(o.OrderTotal)=2000
A.SELECTs.AgentName,SUM(ISNULL(o.OrderTotal,0.00))ASSumOrderTotalFROMSalesAgentsJOINOrderHeaderoONs.AgentID=o.AgentIDWHEREo.OrderDateBETWEEN@FromDateAND@ToDateGROUPBYs.AgentName
B.SELECTs.AgentName,SUM(ISNULL(o.OrderTotal,0.00))ASSumOrderTotalFROMSalesAgentsJOINOrderHeaderoONs.AgentID=o.AgentIDWHEREo.OrderDateBETWEEN@FromDateAND@ToDateANDo.OrderTotal>=2000GROUPBYs.AgentName
C.SELECTs.AgentName,SUM(ISNULL(o.OrderTotal,0.00))ASSumOrderTotalFROMSalesAgentsJOINOrderHeaderoONs.AgentID=o.AgentIDWHEREo.OrderDateBETWEEN@FromDateAND@ToDateGROUPBYs.AgentNameHAVINGSUM(o.OrderTotal)>=2000
D.SELECTs.AgentName,SUM(ISNULL(o.OrderTotal,0.00))ASSumOrderTotalFROMSalesAgentsJOINOrderHeaderoONs.AgentID=o.AgentIDWHEREo.ordertotal=2000ANDo.OrderDateBETWEEN@FromDateAND@ToDateGROUPBYs.AgentNameHAVINGSUM(o.OrderTotal)>=2000