Oracle Database SQL — Question 41

The SALES table has columns PROD_ID and QUANTITY_SOLD of data type NUMBER.
Which two queries execute successfully? (Choose two.)

Answer options

Correct answer: B, E

Explanation

Option B is correct because it properly groups the results by prod_id and uses HAVING to filter those groups based on the count of records. Option E is also correct as it counts prod_id while filtering by quantity_sold and groups by prod_id. Options A, C, and D have syntax errors or use COUNT improperly, which will lead to execution failures.