题目内容

You work for a company that sells books. You are creating a report for a SQL Server 2005 database. The report will list sales representatives and their total sales for the current month. The report must include only those sales representatives who met their sales quota for the current month. The monthly sales quota is $2,000. The date parameters are passed in variables named @FromDate and @ToDate. You need to create the report so that it meets these requirements. Which SQL query should you use?()

A. SELECT s.AgentName,SUM(ISNULL(o.OrderTotal,0.00))AS SumOrderTotalFROM SalesAgents JOIN OrderHeader o ON s.AgentID=o.AgentIDWHERE o.OrderDate BETWEEN @FromDate AND @ToDateGROUP BY s.AgentName
B. SELECT s.AgentName, SUM(ISNULL (o.OrderTotal,0.00))AS SumOrderTotalFROM SalesAgent s JOIN OrderHeader o ON s.AgentID = o.AgentIDWHERE o.OrderDate BETWEEN @FromDate AND @ToDate AND o.OrderTotal >= 2000GROUP BY s.AgentName
C. SELECT s.AgentName, SUM(ISNULL (o.OrderTotal,0.00)) AS SumOrderTotalFROM SalesAgent s JOIN OrderHeader o ON s.AgentID=o.AgentID WHERE o.OrderDate BETWEEN @FromDate AND@ToDateGROUP BY s.AgentNameHAVING SUM(o.OrderTotal)>=2000
D. SELECT s.AgentName, SUM(ISNULL(o.OrderTotal,0.00)) AS SumOrderTotalFROM SalesAgent s JOIN OrderHeader o ON s.AgentID=o.AgentIDWHERE o.ordertotal=2000 AND o.OrderDate BETWEEN @FromDate AND @ToDateGROUP BY s.AgentNameHAVING SUM(o.OrderTotal) >= 2000

查看答案
更多问题

经营主体自主研发旬邑县农副产品、手工艺品等特色网货的,同类商品年线上销售额超过()万元的,经向县商务主管部门申请,一次性奖励1000元。

A. 5
B. 7
C. 9
D. 10

践行福建精神十大人物之一的(),曾先后获得“全国模范法官”、“全国道德模范提名奖获得者”、“全国五一劳动奖章”等荣誉称号。

A. 黄金莲
B. 詹红荔
C. 姜小鹰

蒙太奇运动

加拿大生理心理学家席尔提出了()

A. 压力与适应学说
B. 压力与应对模式
C. 生活变化与疾病关系学说
D. 危机学说

答案查题题库