当前位置: 代码迷 >> 报表 >> 请问一个英文的数据库题
  详细解决方案

请问一个英文的数据库题

热度:269   发布时间:2016-05-05 08:12:05.0
请教一个英文的数据库题
You need to analyze how long your orders to be shipped from the date that the order is placed. To do this you must create a report that displays the customer number, date order, date shipped and the number of months in whole numbers from the time the order is placed to the time the order is shipped. Which statement produces the required results? 
A. SELECT custid, orderate, shipdate, ROUND(MONTHS_BETWEEN(shipdate,orderate))
“Time Taken” FROM ord;
B. SELECT custid, orderate, shipdate,ROUND(DAYS_BETWEEN(shipdate,orderate))/30.
FROM ord;
C. SELECT custid, orderate, shipdate, ROUND OFF (shipdate-orderate) “Time Taken”
FROM ord;
D. SELECT custid, orderate, shipdate,MONTHS_BETWEEN (shipdate,orderate) “Time Taken”.
FROM ord;


------解决方案--------------------
A. SELECT custid, orderate, shipdate, ROUND(MONTHS_BETWEEN(shipdate,orderate)) “Time Taken” FROM ord;
  相关解决方案