有订单表Orders,它的数据如下图所示。列出客户订单总金额大于3000的数据,正确的是()
A: SELECTID,SUM(OrderAmount)FROMORDERSgroupbyIDhavingsum(OrderAmount)>3000
B: SELECTID,SUM(OrderAmount)FROMORDERSwheresum(OrderAmount)>3000 groupbyID
C: SELECTID,SUM(OrderAmount)FROMORDERSwheresum(OrderAmount)>3000
D: SELECTID,SUM(OrderAmount)FROMORDERS groupbyID wheresum(OrderAmount)>3000
A: SELECTID,SUM(OrderAmount)FROMORDERSgroupbyIDhavingsum(OrderAmount)>3000
B: SELECTID,SUM(OrderAmount)FROMORDERSwheresum(OrderAmount)>3000 groupbyID
C: SELECTID,SUM(OrderAmount)FROMORDERSwheresum(OrderAmount)>3000
D: SELECTID,SUM(OrderAmount)FROMORDERS groupbyID wheresum(OrderAmount)>3000
举一反三
- 数据表如图所示,列出客户订单总金额大于3000的数据,正确的SQL是________[img=1101x418]1803c6faf3915a8.png[/img] A: SELECT C_ID,SUM(OrderAmount) FROM Orders GROUP BY C_ID HAVING SUM(OrderAmount)>3000 B: SELECT C_ID,SUM(OrderAmount) FROM Orders WHERE SUM (OrderAmoount)>3000 GROUP BY C_ID C: SELECT C_ID,SUM(OrderAmount) FROM Orders WHERE SUM (OrderAmoount)>3000 D: SELECT C_ID,SUM(OrderAmount) FROM Orders GROUP BY C_ID WHERE SUM(OrderAmount)>3000
- 若按天计算每个客户的订单总金额,正确的SQL是________。[img=1101x418]17de922ac4b9078.png[/img] A: SELECT C_ID,COUNT(OrderPrice)FROM Orders GROUP BY C_ID,OrederDate B: SELECT OrderDate,C_ID,SUM(OrderPrice)FROM Orders GROUP BY OrderDate C: SELECT OrderDate,C_ID,SUM(OrderPrice)FROM Orders GROUP BY OrderDate,C_ID D: SELECT OrderDate,SUM(OrderAmount)FROM Orders GROUP BY OrderDate,C_ID
- 列出客户订单总金额大于3000的数据,正确的SQL是()。 A: A B: B C: C D: D
- 在Excel单元格中输入数值3000,与它相等的表达式是( )。 A: 3000 B: :=3000/1 C: :=average(Sum(3000,3000)) D: 300
- 有订单表如下: 订单(订单号(C,4),客户号(C,4),职员号(C,3),签订日期(D),金额(N,6,2)) 查询每个客户的总金额信息的正确SQL语句是______。 A: SELECT 订单号,SUM(金额) FROM 订单 GROUP BY 客户号 B: SELECT 订单号,SUM(金额) FROM 订单 ORDER BY 客户号 C: SELECT 客户号,SUM(金额) FROM 订单 GROUP BY 客户号 D: SELECT 客户号,SUM(金额) FROM 订单 ORDER BY 客户号