Created
March 19, 2023 11:18
-
-
Save Wqrld/dce9b16fc887fed530a9fa6204e13c3a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select SUM(amount) sum,DATE_FORMAT(STR_TO_DATE(date, '%d-%m-%Y %H:%i'), '%d-%m-%Y') as d | |
from Payments | |
WHERE (state = 'approved' or state = 'paid') and client != 1 | |
group by d | |
order by sum DESC; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment