QuestionQ140

VerifiedManipulating Data

Refer to the Exhibit and examine the structure and data in the INVOICE table:

Question Image

Which two SQL statements execute successfully?

Choose two
Explanation

MIN and MAX may aggregate date and character values, so aggregating INV_DATE and CUST_ID is valid. Subtracting one Oracle DATE value from another yields a numeric day difference; therefore, AVG(inv_date - SYSDATE) is numeric, as is AVG(inv_amt). AVG requires a numeric or numerically convertible argument, and nested aggregates require separate grouping levels.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!