ITPub博客

首页 > 数据库 > Oracle > OCP 1Z0-051-118

OCP 1Z0-051-118

原创 Oracle 作者:LuiseDalian 时间:2014-05-21 06:42:02 0 删除 编辑
(118)View the Exhibit and examine the structure of the PROMOTIONS table. Examine the following two SQL statements:

-- Statement 1

SELECT promo_category, SUM(promo_cost) FROM promotions

WHERE promo_end_date-promo_begin_date > 30 GROUP BY promo_category;

--Statement 2

SELECT promo_category,sum(promo_cost) FROM promotions

GROUP BY promo_category

HAVING MIN(promo_end_date-promo_begin_date)>30;

Which statement is true regarding the above two SQL statements?

答案:(D)

解析:

HAVING子句中可以出现SELECT子句中没有出现的聚合函数。

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/17013648/viewspace-1165712/ ,如需转载,请注明出处,否则将追究法律责任。

上一篇: OCP 1Z0-051-117
下一篇: OCP 1Z0-051-119
请登录后发表评论 登录
全部评论

注册时间:2012-02-06

  • 博文量
    1986
  • 访问量
    6042362