SQL Fundamentals: DML, Aggregates, and Group Operations

Covers SQL data manipulation, aggregate functions, GROUP BY/HAVING clauses, NULL handling, and Oracle-specific features like MERGE and NVL

20 Questions Published

Questions

Question 1 True/False

We can use Group functions in the WHERE clause

  1. True
  2. False
Question 2 Multiple Choice (Single Answer)

We can use MIN and MAX for any

  1. Numeric data
  2. Data type
  3. Char data
  4. None of the Above
Question 3 True/False

You can update more than 1 row in a table with one update syntax

  1. True
  2. False
Question 4 Multiple Choice (Single Answer)

Delete from Employee where grade = ‘Y’” deletes

  1. All rows of the Employee table
  2. Rows of the Employee table where the set grade is ‘Y’
  3. Delete 1 row
  4. Nothing will be deleted
Question 5 Multiple Choice (Single Answer)

Which keyword used in DML statements prohibits you from changing rows that are not in the sub-query?

  1. CHECK keyword
  2. WITH CHECK keyword
  3. WITH CHECK OPTION keyword
  4. None of the Above
Question 6 Multiple Choice (Single Answer)

Explicit Defaults can be used in

  1. INSERT statement
  2. UPDATE statement
  3. Both of the Above
  4. None of the Above
Question 7 Multiple Choice (Single Answer)

MERGE statement

  1. Avoids separate updates
  2. ncreases performance and ease of use
  3. Is useful in data warehousing applications
  4. All of the above
Question 8 Multiple Choice (Single Answer)

Database transactions end with

  1. COMMIT or ROLLBACK
  2. A DDL or DCL statement executing
  3. USER exiting iSQL*Plus or System crash
  4. Any one of the above
Question 9 True/False

In an Oracle Database, Locks are critical

  1. True
  2. False
Question 10 Multiple Choice (Single Answer)

Which is not a group function?

  1. Count
  2. Avg
  3. Total
  4. Max
Question 11 True/False

You can use Avg or Sum group functions for any numeric data

  1. True
  2. False
Question 12 Multiple Choice (Single Answer)

COUNT(DISTINCT expr) returns

  1. No. of rows in a table
  2. No. of rows with non-null values of the expr
  3. No. of distinct non-null values of the expr
  4. None of the above
Question 13 Multiple Choice (Single Answer)

Which function forces group functions to include null values?

  1. Group By
  2. NVL
  3. Order By
  4. Having
Question 14 True/False

All columns in the SELECT list, that are not there in the GROUP function, should be in the Group By clause

  1. True
  2. False
Question 15 Multiple Choice (Single Answer)

Which is the clause used to restrict groups?

  1. HAVING
  2. WHERE
  3. Order By
  4. Group by
Question 16 True/False

We can nest Group Functions

  1. True
  2. False
Question 17 Multiple Choice (Single Answer)

Limiting the rows in a select statement for a specific condition is done by the clause

  1. Distinct
  2. Projection
  3. Where
  4. All of the above
Question 18 True/False

Character values are case insensitive

  1. True
  2. False
Question 19 True/False

Arithmetic expressions containing a null value evaluate to null.

  1. True
  2. False
Question 20 Multiple Choice (Single Answer)

Concatenation operator is

  1. +
  2. -
  3. ||
  4. *