5. Consider the table account given below :
Jack and John are given with the requirement to retrieve the account details and sort details according to location (alphabetically) and in decreasing order of the amount in each of that location.
SELECT custno, accountno, ifsccode, location, amount, accounttype FROM account ORDER BY location ASC, amount DESC;
SELECT custno, accountno, ifsccode, location, amount, accounttype FROM account ORDER BY 5 DESC, 4 ASC;
Whose query will be correct to satisfy the above requirements ?
a. Only Jack
b. Only John
c. Both Jack and John
d. Neither Jack nor John
6. Consider given tables :
SELECT custid, custname, gender
FROM customer WHERE custid IN (
SELECT custid FROM purchase WHERE billdate = (SELECT MIN(billdate) FROM purchase));
Which customer(s) details will be fetched when the above query is executed ?
a. Eliza and Robert
b. Jenny and Maria
c. William and Eliza
d. Robert and Jenny