You have a table ABC with columns a and b. You now want to use a multiple-argument aggregate function to display a in descending order of b. To do this, you have written the following two queries.
A:
SELECT string_agg(a, ‘,’ ORDER BY b) FROM ABC;
B:
SELECT string_agg(a ORDER BY b, ‘,’) FROM ABC;
Which of these queries is an incorrect way to implement the given objective?
Options
- Only A
- Only B
- Both A and B
- Neither A nor B