zoukankan      html  css  js  c++  java
  • OCP-1Z0-051-V9.02-150题

    150. View the Exhibit and examine the data in the PROMOTIONS table.

    You need to display all promo categories that do not have 'discount' in their subcategory.

    Which two SQL statements give the required result? (Choose two.)

     

    A. SELECT promo_category

    FROM promotions

    MINUS

    SELECT promo_category

    FROM promotions

    WHERE promo_subcategory = 'discount';

    所有promo_category 减去包含promo_subcategory = 'discount'的,符合题意。

    B. SELECT promo_category

    FROM promotions

    INTERSECT 交集

    SELECT promo_category

    FROM promotions

    WHERE promo_subcategory = 'discount';

    所有promo_category 中包含promo_subcategory = 'discount'的,与题意相反。

    C. SELECT promo_category

    FROM promotions

    MINUS

    SELECT promo_category

    FROM promotions

    WHERE promo_subcategory <> 'discount';

    所有promo_category 中减去不包含promo_subcategory = 'discount'的,与题意相反。

     

    D. SELECT promo_category

    FROM promotions

    INTERSECT

    SELECT promo_category

    FROM promotions

    WHERE promo_subcategory <> 'discount';
     
    所有promo_category 交集不包含promo_subcategory = 'discount'的,符合题意。
    Answer: AD
     
    答案解析:
    本题意是让找出不包含promo_subcategory = 'discount'的产品。
     

    MINUS 返回第一个查询有,第二个查询无的

    which returns only unique rows returned by the first query but not by the second

    INTERSECT 返回共同有的

    which returns only those unique rows returned by both queries
     
     
  • 相关阅读:
    windows开启PostgreSQL数据库远程访问
    Git使用介绍
    linux 常用工具记录及简介
    ubuntu18 安装坑点记录(华硕飞行堡垒)
    快手自动视频随机点赞脚本
    接触手机脚本编程------基于触动精灵的lua编程
    使电脑蜂鸣器发声小脚本
    tensorflow--非线性回归
    python笔记--------numpy
    python笔记--------二
  • 原文地址:https://www.cnblogs.com/hzcya1995/p/13317201.html
Copyright © 2011-2022 走看看