nerdexam
Oracle

1Z0-082 · Question #132

The sales table has columns prod_id and quantity_sold of data type number In two queries execute successfully?

The correct answer is A. SELECT prod_id FROM sales WHERE quantity_sold > 55000 GROUP BY prod_id HAVING C. SELECT COUNT|prod_id> FROM sales WHERE quantity_sold > 55000 GROUP BY prod_id. See the full explanation below for the reasoning.

SQL and PL/SQL

Question

The sales table has columns prod_id and quantity_sold of data type number In two queries execute successfully?

Options

  • ASELECT prod_id FROM sales WHERE quantity_sold > 55000 GROUP BY prod_id HAVING
  • BSELECT prod_id FROM sales WHERE quantity_sold > 5S000 AND COUNT(-) > 10 GROUP BY
  • CSELECT COUNT|prod_id> FROM sales WHERE quantity_sold > 55000 GROUP BY prod_id;
  • DSELECT COUNTlprod_id> FROM sales GROUP BY prod_id WHERE quantity_Sold > 55000;
  • ESELECT prod_id FROM sales WHERE quantity_scld > 55000 AND COUNT(-) > 10 GROUP BY

How the community answered

(48 responses)
  • A
    71% (34)
  • B
    4% (2)
  • D
    8% (4)
  • E
    17% (8)

Topics

#GROUP BY#HAVING clause#WHERE vs HAVING#COUNT function

Community Discussion

No community discussion yet for this question.

Full 1Z0-082 Practice