1 TCO 7 Which is NOT an aggregate function Points 3 SUM COU
1. (TCO 7) Which is NOT an aggregate function? (Points : 3) SUM
COUNT
ROUND
MAX
5 and below
5 to 9
5 and above
9 and above
all nonaggregate columns must be included in a GROUP BY clause all aggregate and non-aggregate columns must be included in a GROUP BY clause all aggregate columns must be included in a WHERE clause |
Solution
1)Ans)round
2)Ans)All non aggregate columns must be included in groupby clause
3)ans) SELECT category, AVG(retail) FROM books GROUP BY category;
4)Ans) SELECT title FROM books WHERE pubdate = (SELECT MIN(pubdate) FROM books);
5)Ans)Innermost
6)Ans)correlated
7)Ans) SELECT lastname, firstname FROM customer WHERE customerid = (SELECT customerid FROM order WHERE shipdate IS NULL);
8)Ans) SELECT customerid, COUNT(orderid) FROM order GROUP BY customerid;
9)Ans) SELECT AVG(retail) FROM books;
10) 9 and above
