Answer: The query to retrieve first name and sum of order qty for order sum greater than 25, and group the order sum by first name is as follows:
SELECT FIRSTNAME,SUM(QTY)
FROM orders
GROUP BY FIRSTNAME
HAVING SUM(QTY)>25;
Asked In: Many Interviews |
Alert Moderator