可学答题网 > 问答 > MCTS(70-431)题库
目录: 标题| 题干| 答案| 搜索| 相关
问题

You work for a co


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?()

  • ASELECT 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
  • BSELECT 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
  • CSELECT 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
  • DSELECT 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
参考答案
参考解析:
分类:MCTS(70-431)题库
相关推荐

1、You work as a net

You work as a network technician at. Your boss, Mrs. , is interested in the Spanning&ens...

2、You work as a net

You work as a network technician at Certkiller .com. Your boss, Mrs. Certkiller, is intereste...

3、You work in a com

You work in a company which uses SQL Server 2008. You are the administrator of the co...

4、You work as a net

You work as a network exchange administrator at Company.com.the Company.com network currently consists&en...

5、You work as a dat

You work as a database administrator for Certkiller .com. You enabled tracing while creating a&...

6、You work as a Web

You work as a Web Developer at Certkiller.com. You are in the process of creating a W...