Answer the question
In order to leave comments, you need to log in
How to choose the date of maximum sales?
Hello!
The task is to find the date of maximum sales. Table:
Now I grouped the sales (query in the screenshot) by dates and got:
Finally, I should get the date 2017-01-02, when the sales are maximum and amount to 1105.
How to do this?
Answer the question
In order to leave comments, you need to log in
SELECT `date`, SUM( total) AS bablo
FROM `sale`
GROUP BY `date`
ORDER BY bablo DESC
LIMIT 1
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question