See the Exhibit and examine the structure and data in the INVOICE table: Exhibit: Which
two SQL statements would executes successfully? (Choose two.)
A.
SELECT MAX(inv_date),MIN(cust_id) FROM invoice;
B.
SELECT MAX(AVG(SYSDATE – inv_date)) FROM invoice;
C.
SELECT (AVG(inv_date) FROM invoice;
D.
SELECT AVG(inv_date – SYSDATE),AVG(inv)amt) FROM invoice;
Explanation:
d or c , i m confused !!!!
select max(avg(sysdate – inv_date)) from invoice
Error at Command Line : 23 Column : 12
Error report –
SQL Error: ORA-00978: nested group function without GROUP BY
00978. 00000 – “nested group function without GROUP BY”
*Cause:
*Action:
please send me the explanation.
i think we can take average of only number data type and not date
ORA-00932: inconsistent datatypes: expected NUMBER got DATE