โ† All 1Z0-071 Flashcard Decks

Aggregating Data with Group Functions Flashcards

6 cards from real 1Z0-071 practice questions. Tap to flip, then mark Knew It or Still Learning โ€” missed cards come back until you master them.

Read the first 6 Aggregating Data with Group Functions flashcards as text
  1. Which is the correct order of clauses in a SELECT statement using GROUP BY and HAVING?

    Answer: SELECT, FROM, WHERE, GROUP BY, HAVING, ORDER BY

    The correct order is SELECT, FROM, WHERE, GROUP BY, HAVING, ORDER BY.

  2. What is the output of SELECT MAX(salary) - MIN(salary) FROM employees?

    Answer: The salary range across all employees

    Oracle allows arithmetic between aggregate functions in the SELECT clause, returning the salary range.

  3. A query uses GROUP BY department_id. Which column can appear in the SELECT list WITHOUT being inside an aggregate function?

    Answer: department_id

    Only department_id can appear unaggregated in SELECT because it is in the GROUP BY clause.

  4. Which aggregate function is used to find the average salary per department?

    Answer: AVG()

    AVG() is the standard Oracle group function that computes the arithmetic mean of a numeric column.

  5. What does GROUP BY ROLLUP(department_id, job_id) produce in addition to normal groups?

    Answer: Subtotals for each department_id and a grand total

    ROLLUP creates subtotal rows for each level of the grouping hierarchy plus a grand total row.

  6. Which statement correctly nests group functions?

    Answer: SELECT MAX(AVG(salary)) FROM employees GROUP BY department_id

    Oracle allows nesting group functions one level deep when a GROUP BY clause is present.