OCP-1Z0-051 第148題 子查詢和ANY,ALL的使用
阿新 • • 發佈:2019-01-27
A.SELECT prod_category, avg(prod_list_price)
FROM products
GROUP BY prod_category
HAVING avg(prod_list_price) < ALL (SELECT max(prod_list_price) / 2
FROM products
GROUP BY prod_category);
B.SELECT prod_category, avg(prod_list_price)
FROM products
GROUP BY prod_category
HAVING avg(prod_list_price) > ANY (SELECT max(prod_list_price) / 2
FROM products
GROUP BY prod_category);
C.SELECT prod_category, avg(prod_list_price)
FROM products
HAVING avg(prod_list_price) < ALL (SELECT max(prod_list_price) / 2
FROM products
GROUP BY prod_category);
D.SELECT prod_category, avg(prod_list_price)
FROM products
GROUP BY prod_category
HAVING avg(prod_list_price) > ANY (SELECT max(prod_list_price) / 2
FROM products);
FROM products
GROUP BY prod_category
HAVING avg(prod_list_price) < ALL (SELECT max(prod_list_price) / 2
FROM products
GROUP BY prod_category);
B.SELECT prod_category, avg(prod_list_price)
FROM products
GROUP BY prod_category
HAVING avg(prod_list_price) > ANY (SELECT max(prod_list_price) / 2
FROM products
GROUP BY prod_category);
C.SELECT prod_category, avg(prod_list_price)
FROM products
HAVING avg(prod_list_price) < ALL (SELECT max(prod_list_price) / 2
FROM products
GROUP BY prod_category);
D.SELECT prod_category, avg(prod_list_price)
FROM products
GROUP BY prod_category
HAVING avg(prod_list_price) > ANY (SELECT max(prod_list_price) / 2
FROM products);