Free Oracle 1Z0-071 Exam Questions (page: 6)

Which two statements are true regarding the COUNT function? (Choose two.)

  1. A SELECT statement using the COUNT function with a DISTINCT keyword cannot have a WHERE clause.
  2. COUNT(DISTINCT inv_amt) returns the number of rows excluding rows containing duplicates and NULLs in the INV_AMT column.
  3. COUNT(inv_amt) returns the number of rows in a table including rows with NULL in the INV_AMT column.
  4. COUNT(*) returns the number of rows including duplicate rows and rows containing NULL value in any column.
  5. It can only be used for NUMBER data types.

Answer(s): B,D



Examine this statement:


What is returned upon execution?

  1. 0 rows
  2. an error
  3. 1 row
  4. 2 rows

Answer(s): D



Examine the description of the PRODUCT_INFORMATION table:


Which query retrieves the number of products with a null list price?

  1. SELECT COUNT (DISTINCT list_price) FROM product_information WHERE list_price IS NULL;
  2. SELECT COUNT (list_price) FROM product_information WHERE list_price IS NULL;
  3. SELECT COUNT (list_price) FROM product_information WHERE list_price = NULL;
  4. SELECT COUNT(NVL(list_price, 0)) FROM product_information WHERE list_price IS NULL;

Answer(s): D


Reference:

https://www.oracletutorial.com/oracle-aggregate-functions/oracle-avg/



Which statement is true about aggregate functions?

  1. The AVG function implicitly converts NULLS to zero.
  2. Aggregate functions can be nested to any number of levels.
  3. The MAX and MIN functions can be used on columns with character data types.
  4. Aggregate functions can be used in any clause of a SELECT statement.

Answer(s): B


Reference:

https://docs.oracle.com/database/121/SQLRF/functions003.htm



Which two statements are true about the ORDER BY clause when used with a SQL statement containing a SET operator such as UNION?

  1. Each SELECT statement in the compound query must have its own ORDER BY clause.
  2. Each SELECT statement in the compound query can have its own ORDER BY clause.
  3. Column positions must be used in the ORDER BY clause.
  4. The first column in the first SELECT of the compound query with the UNION operator is used by default to sort output in the absence of an ORDER BY clause.
  5. Only column names from the first SELECT statement in the compound query are recognized.

Answer(s): B,E



Viewing page 6 of 77



Post your Comments and Discuss Oracle 1Z0-071 exam prep with other Community members:

1Z0-071 Exam Discussions & Posts