Which two SQL statements would execute successfully?

View the Exhibit and examine the structure and data in the INVOICE table.
Which two SQL statements would execute successfully? (Choose two.)
A. SELECT AVG(inv_date )
FROM invoice;
B. SELECT MAX(inv_date), MIN(cust_id)
FROM invoice;
C. SELECT MAX(AVG(SYSDATE – inv_date))
FROM invoice;
D. SELECT AVG( inv_date – SYSDATE), AVG(inv_amt)
FROM invoice;

Download Printable PDF. VALID exam to help you PASS.

5 thoughts on “Which two SQL statements would execute successfully?

  1. A is incorrect because AVG function could not apply for DATE data type. As well as any other group function like MIN, MAX, SUM, etc

    1. Exhibit not really needed. Need to look at the data types.

      I don’t think their “explanation” does any real explaining though.
      What figure is that you can’t use “Avg” with dates (even though dates are stored as numbers).
      In “D” with “Invoice_date – SYSDATE” you get an integer and that’s why you can use AVG there.

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.