QuestionQ100

VerifiedRestricting and Sorting Data

Review the description of the PRODUCT_INFORMATION table:

Question Image

Which query returns the number of products whose list price is null?

Explanation

COUNT(expression) counts only rows for which the expression is non-null. After WHERE list_price IS NULL filters to products without a list price, NVL(list_price, 0) changes each null value to 0, so COUNT counts every qualifying product. Oracle documents that aggregate functions ignore nulls and that NVL substitutes a value when its first expression is null.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!