Home
41.
True or false: The AND operator can be used in the SELECT and the WHERE clauses.

False. The AND operator can be used only in the WHERE clause.

42.
True or false: The ANY operator can accept an expression list.

False. The ANY operator cannot take an expression list.

43.
What is the logical negation of the IN operator?

NOT IN

44.
What is the logical negation of the ANY and ALL operators?

<>ANY and <>ALL

45.
True or False: The AVG function returns an average of all rows from a SELECT column, including any NULL values.

False. The NULL values are not considered.

46.
True or False: The SUM function adds column totals.

False. The SUM function returns a total for a group of rows.

47.
What is the purpose of the HAVING clause and which other clause is it closest to?

The HAVING clause is used to constrain the groups returned by the GROUP BY clause. Therefore, it is closest to the WHERE clause in functionality.

48.
True or false: You must also use the GROUP BY clause when using the HAVING clause.

False; you do not need the GROUP BY clause unless you have non-aggregated column data in your query.

49.
True or false: The following SQL statement returns a total of the salaries by groups:
SELECT SUM(SALARY)
FROM EMPLOYEES;

False, the statement does not contain the column to group by or the GROUP BY clause, so it will display the sum of all salaries.

50.
True or false: The outermost function is always resolved first when functions are embedded within other functions in a query.

False. The innermost function is always resolved first when embedding functions within one another.