フリー問題

Oracle Database SQL のフリー問題 10 / 20 問目

問題文

A query has to list the departments whose average salary is above 8000, and has to leave out the employees who work part time before that average is computed. Where does each condition belong?

選択肢

  1. The part time condition belongs in the HAVING clause and the average condition belongs in the WHERE clause, because groups are formed before rows are filtered.
  2. Both conditions belong in the WHERE clause, because that clause is evaluated once for every row and can also read the result of an aggregate function.
  3. Both conditions belong in the HAVING clause, because that clause is evaluated once for every group and can also read the columns of the individual rows.
  4. The part time condition belongs in the WHERE clause and the average condition belongs in the HAVING clause, because rows are filtered before the groups are formed.

解答・解説を確認するには

正解と解説の確認、回答の記録には無料登録が必要です。登録すると演習モードでフリー問題に回答し、正誤と解説をその場で確認できます。